1 | #ifndef __FASTJET_TOP_TAGGER_BASE_HH__ |
---|
2 | #define __FASTJET_TOP_TAGGER_BASE_HH__ |
---|
3 | |
---|
4 | //STARTHEADER |
---|
5 | // $Id: TopTaggerBase.hh 2689 2011-11-14 14:51:06Z soyez $ |
---|
6 | // |
---|
7 | // Copyright (c) 2005-2011, 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 and are described in hep-ph/0512210. If you use |
---|
19 | // FastJet as part of work towards a scientific publication, please |
---|
20 | // include a citation to the FastJet paper. |
---|
21 | // |
---|
22 | // FastJet is distributed in the hope that it will be useful, |
---|
23 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
24 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
25 | // GNU General Public License for more details. |
---|
26 | // |
---|
27 | // You should have received a copy of the GNU General Public License |
---|
28 | // along with FastJet. If not, see <http://www.gnu.org/licenses/>. |
---|
29 | //---------------------------------------------------------------------- |
---|
30 | //ENDHEADER |
---|
31 | |
---|
32 | #include <fastjet/internal/base.hh> |
---|
33 | #include <fastjet/tools/Transformer.hh> |
---|
34 | |
---|
35 | FASTJET_BEGIN_NAMESPACE |
---|
36 | |
---|
37 | class TopTaggerBase; |
---|
38 | class TopTaggerBaseStructure; |
---|
39 | |
---|
40 | //---------------------------------------------------------------------- |
---|
41 | /// @ingroup tools_taggers |
---|
42 | /// \class TopTaggerBase |
---|
43 | /// A base class that provides a common interface for top taggers |
---|
44 | /// that are able to return a W (in addition to the top itself). |
---|
45 | /// |
---|
46 | /// Top taggers that derive from this should satisfy the following |
---|
47 | /// criteria: |
---|
48 | /// |
---|
49 | /// - their underlying structure should derive from TopTaggerBaseStructure |
---|
50 | /// - tagged tops should have two pieces, the first of which is the W candidate |
---|
51 | /// - they should apply the top and W selectors to decide if the top has been |
---|
52 | /// tagged |
---|
53 | class TopTaggerBase : public Transformer { |
---|
54 | public: |
---|
55 | TopTaggerBase() : _top_selector(SelectorIdentity()), |
---|
56 | _W_selector(SelectorIdentity()), |
---|
57 | _top_selector_set(false), |
---|
58 | _W_selector_set(false) {} |
---|
59 | |
---|
60 | /// the type of the associated structure |
---|
61 | typedef TopTaggerBaseStructure StructureType; |
---|
62 | |
---|
63 | /// sets the selector that is applied to the top candidate |
---|
64 | void set_top_selector(const Selector & sel) {_top_selector = sel; _top_selector_set = true;} |
---|
65 | /// sets the selector that is applied to the W candidate |
---|
66 | void set_W_selector (const Selector & sel) {_W_selector = sel; _W_selector_set = true;} |
---|
67 | |
---|
68 | /// returns a description of the top and W selectors |
---|
69 | virtual std::string description_of_selectors() const { |
---|
70 | std::string descr; |
---|
71 | if (_top_selector_set) descr = ", top selector: "+_top_selector.description(); |
---|
72 | if (_W_selector_set) descr += ", W selector: "+_W_selector.description(); |
---|
73 | return descr; |
---|
74 | } |
---|
75 | |
---|
76 | protected: |
---|
77 | /// computes the W helicity angle |
---|
78 | double _cos_theta_W(const PseudoJet & result) const; |
---|
79 | |
---|
80 | Selector _top_selector, _W_selector; |
---|
81 | bool _top_selector_set, _W_selector_set; |
---|
82 | }; |
---|
83 | |
---|
84 | |
---|
85 | //---------------------------------------------------------------------- |
---|
86 | /// @ingroup tools_taggers |
---|
87 | /// \class TopTaggerBaseStructure |
---|
88 | /// class that specifies the structure common to all top taggers |
---|
89 | /// |
---|
90 | /// Note that this specifies only the W, non_W part of the |
---|
91 | /// interface. An actual top tagger structure class will also need to |
---|
92 | /// derive from a PseudoJetStructureBase type class |
---|
93 | /// (e.g. CompositeJetStructure) |
---|
94 | class TopTaggerBaseStructure { |
---|
95 | public: |
---|
96 | virtual const PseudoJet & W() const = 0; |
---|
97 | virtual const PseudoJet & non_W() const = 0; |
---|
98 | virtual ~TopTaggerBaseStructure() {} |
---|
99 | }; |
---|
100 | |
---|
101 | |
---|
102 | FASTJET_END_NAMESPACE |
---|
103 | |
---|
104 | #endif // __FASTJET_TOP_TAGGER_BASE_HH__ |
---|
105 | |
---|