FastJet 3.4.1
TopTaggerBase.hh
1#ifndef __FASTJET_TOP_TAGGER_BASE_HH__
2#define __FASTJET_TOP_TAGGER_BASE_HH__
3
4//FJSTARTHEADER
5// $Id$
6//
7// Copyright (c) 2005-2023, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
8//
9//----------------------------------------------------------------------
10// This file is part of FastJet.
11//
12// FastJet is free software; you can redistribute it and/or modify
13// it under the terms of the GNU General Public License as published by
14// the Free Software Foundation; either version 2 of the License, or
15// (at your option) any later version.
16//
17// The algorithms that underlie FastJet have required considerable
18// development. They are described in the original FastJet paper,
19// hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
20// FastJet as part of work towards a scientific publication, please
21// quote the version you use and include a citation to the manual and
22// optionally also to hep-ph/0512210.
23//
24// FastJet is distributed in the hope that it will be useful,
25// but WITHOUT ANY WARRANTY; without even the implied warranty of
26// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27// GNU General Public License for more details.
28//
29// You should have received a copy of the GNU General Public License
30// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
31//----------------------------------------------------------------------
32//FJENDHEADER
33
34#include "fastjet/internal/base.hh"
35#include "fastjet/tools/Transformer.hh"
36
37FASTJET_BEGIN_NAMESPACE
38
39class TopTaggerBase;
40class TopTaggerBaseStructure;
41
42//----------------------------------------------------------------------
43/// @ingroup tools_taggers
44/// \class TopTaggerBase
45/// A base class that provides a common interface for top taggers
46/// that are able to return a W (in addition to the top itself).
47///
48/// Top taggers that derive from this should satisfy the following
49/// criteria:
50///
51/// - their underlying structure should derive from TopTaggerBaseStructure
52/// - tagged tops should have two pieces, the first of which is the W candidate
53/// - they should apply the top and W selectors to decide if the top has been
54/// tagged
55class TopTaggerBase : public Transformer {
56public:
57 TopTaggerBase() : _top_selector(SelectorIdentity()),
58 _W_selector(SelectorIdentity()),
59 _top_selector_set(false),
60 _W_selector_set(false) {}
61
62 /// the type of the associated structure
64
65 /// sets the selector that is applied to the top candidate
66 void set_top_selector(const Selector & sel) {_top_selector = sel; _top_selector_set = true;}
67 /// sets the selector that is applied to the W candidate
68 void set_W_selector (const Selector & sel) {_W_selector = sel; _W_selector_set = true;}
69
70 /// returns a description of the top and W selectors
71 virtual std::string description_of_selectors() const {
72 std::string descr;
73 if (_top_selector_set) descr = ", top selector: "+_top_selector.description();
74 if (_W_selector_set) descr += ", W selector: "+_W_selector.description();
75 return descr;
76 }
77
78protected:
79 /// computes the W helicity angle
80 double _cos_theta_W(const PseudoJet & result) const;
81
82 Selector _top_selector, _W_selector;
83 bool _top_selector_set, _W_selector_set;
84};
85
86
87//----------------------------------------------------------------------
88/// @ingroup tools_taggers
89/// \class TopTaggerBaseStructure
90/// class that specifies the structure common to all top taggers
91///
92/// Note that this specifies only the W, non_W part of the
93/// interface. An actual top tagger structure class will also need to
94/// derive from a PseudoJetStructureBase type class
95/// (e.g. CompositeJetStructure)
97public:
98 virtual const PseudoJet & W() const = 0;
99 virtual const PseudoJet & non_W() const = 0;
100 virtual ~TopTaggerBaseStructure() {}
101};
102
103
104FASTJET_END_NAMESPACE
105
106#endif // __FASTJET_TOP_TAGGER_BASE_HH__
107
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
Definition: PseudoJet.hh:68
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
Definition: Selector.hh:149
class that specifies the structure common to all top taggers
A base class that provides a common interface for top taggers that are able to return a W (in additio...
void set_top_selector(const Selector &sel)
sets the selector that is applied to the top candidate
void set_W_selector(const Selector &sel)
sets the selector that is applied to the W candidate
virtual std::string description_of_selectors() const
returns a description of the top and W selectors
TopTaggerBaseStructure StructureType
the type of the associated structure
Base (abstract) class for a jet transformer.
Definition: Transformer.hh:71