Fork me on GitHub

source: git/external/fastjet/tools/JHTopTagger.hh@ 406b698

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 406b698 was 35cdc46, checked in by Pavel Demin <demin@…>, 10 years ago

upgrade FastJet to version 3.1.0-beta.1, upgrade Nsubjettiness to version 2.1.0, add SoftKiller version 1.0.0

  • Property mode set to 100644
File size: 8.3 KB
Line 
1#ifndef __FASTJET_JH_TOP_TAGGER_HH__
2#define __FASTJET_JH_TOP_TAGGER_HH__
3
4//FJSTARTHEADER
5// $Id: JHTopTagger.hh 3433 2014-07-23 08:17:03Z salam $
6//
7// Copyright (c) 2005-2014, 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
35#include <fastjet/tools/TopTaggerBase.hh>
36#include <fastjet/CompositeJetStructure.hh>
37#include <fastjet/LimitedWarning.hh>
38
39FASTJET_BEGIN_NAMESPACE
40
41class JHTopTagger;
42class JHTopTaggerStructure;
43
44//----------------------------------------------------------------------
45/// @ingroup tools_taggers
46/// \class JHTopTagger
47/// Class that helps perform boosted top tagging using the "Johns Hopkins"
48/// method from arXiv:0806.0848 (Kaplan, Rehermann, Schwartz
49/// and Tweedie)
50///
51///The tagger proceeds as follows:
52/// - start from a jet J obtained with the Cambridge/Aachen algorithm
53/// - undo the last iteration j -> j_1,j_2 (with pt_1>pt_2) until the
54/// two subjets satisfy pt_1 > delta_p pt_J (with pt_J the pt of
55/// the original jet) and |y_1 - y_2| + |phi_1 - phi_2| > delta_r.
56/// - if one of these criteria is not satisfied, carry on the
57/// procedure with j_1 (discarding j_2)
58/// - for each of the subjets found, repeat the procedure. If some
59/// new substructure is found, keep these 2 new subjets, otherwise
60/// keep the original subjet (found during the first iteration)
61/// - at this stage, one has at most 4 subjets. If one has less than
62/// 3, the tagger has failed.
63/// - reconstruct the W from the 2 subjets with a mass closest to the
64/// W mass
65/// - impose that the W helicity angle be less than a threshold
66/// cos_theta_W_max.
67///
68/// \section input Input conditions
69///
70/// - the original jet must have an associated (and valid)
71/// ClusterSequence
72/// - the tagger is designed to work with jets formed by the
73/// Cambridge/Aachen (C/A) algorithm; if a non-C/A jet is passed to
74/// the tagger, a warning will be issued
75///
76/// \section Example
77///
78/// A JHTopTagger can be used as follows:
79///
80/// \code
81/// double delta_p = 0.10; // subjets must carry at least this fraction of the original jet's p_t
82/// double delta_r = 0.19; // subjets must be separated by at least this Manhattan distance
83/// double cos_theta_W_max = 0.7; // the maximal allowed value of the W helicity angle
84/// JHTopTagger top_tagger(delta_p, delta_r, cos_theta_W_max);
85/// // indicate the acceptable range of top, W masses (default: no limits)
86/// top_tagger.set_top_selector(SelectorMassRange(150,200));
87/// top_tagger.set_W_selector (SelectorMassRange( 65, 95));
88/// // now try and tag a jet
89/// PseudoJet top_candidate = top_tagger(jet); // jet should come from a Cambridge/Aachen clustering
90/// if (top_candidate != 0) { // successful tagging
91/// double top_mass = top_candidate.m();
92/// double W_mass = top_candidate.structure_of<JHTopTagger>().W().m();
93/// }
94/// \endcode
95///
96/// The full set of information available from the structure_of<JHTopTagger>()
97/// call is
98///
99/// - PseudoJet W() : the W subjet of the top candidate
100/// - PseudoJet non_W(): non-W subjet(s) of the top candidate (i.e. the b)
101/// - double cos_theta_W(): the W helicity angle
102/// - PseudoJet W1(): the harder of the two prongs of the W
103/// - PseudoJet W2(): the softer of the two prongs of the W
104///
105/// The structure of the top_candidate can also be accessed through its
106/// pieces() function:
107///
108/// - top_candidate.pieces()[0]: W
109/// - top_candidate.pieces()[1]: non_W
110///
111/// The W itself has two pieces (corresponding to W1, W2).
112///
113/// The existence of the first two of the structural calls (W(),
114/// non_W()) and the fact that the top is made of two pieces (W,
115/// non_W) are features that should be common to all taggers derived
116/// from TopTaggerBase.
117///
118/// See also \subpage Example13 for a full usage example.
119///
120class JHTopTagger : public TopTaggerBase {
121public:
122 /// default ctor
123 /// The parameters are the following:
124 /// \param delta_p fractional pt cut imposed on the subjets
125 /// (computed as a fraction of the original jet)
126 /// \param delta_r minimal distance between 2 subjets
127 /// (computed as |y1-y2|+|phi1-phi2|)
128 /// \param cos_theta_W_max the maximal value for the polarisation
129 /// angle of the W
130 /// \param mW the W mass
131 ///
132 /// The default values of all these parameters are taken from
133 /// arXiv:0806:0848
134 JHTopTagger(const double delta_p=0.10, const double delta_r=0.19,
135 double cos_theta_W_max=0.7, double mW=80.4)
136 : _delta_p(delta_p), _delta_r(delta_r),
137 _cos_theta_W_max(cos_theta_W_max), _mW(mW){};
138
139 /// returns a textual description of the tagger
140 virtual std::string description() const;
141
142 /// runs the tagger on the given jet and
143 /// returns the tagged PseudoJet if successful, or a PseudoJet==0 otherwise
144 /// (standard access is through operator()).
145 /// \param jet the PseudoJet to tag
146 virtual PseudoJet result(const PseudoJet & jet) const;
147
148 // the type of the associated structure
149 typedef JHTopTaggerStructure StructureType;
150
151protected:
152 /// runs the Johns Hopkins decomposition procedure
153 std::vector<PseudoJet> _split_once(const PseudoJet & jet_to_split,
154 const PseudoJet & reference_jet) const;
155
156 double _delta_p, _delta_r, _cos_theta_W_max, _mW;
157 static LimitedWarning _warnings_nonca;
158};
159
160
161//------------------------------------------------------------------------
162/// @ingroup tools_taggers
163/// \class JHTopTaggerStructure
164/// the structure returned by the JHTopTagger transformer.
165///
166/// See the JHTopTagger class description for the details of what
167/// is inside this structure
168///
169class JHTopTaggerStructure : public CompositeJetStructure, public TopTaggerBaseStructure {
170public:
171 /// ctor with pieces initialisation
172 JHTopTaggerStructure(std::vector<PseudoJet> pieces_in,
173 const JetDefinition::Recombiner *recombiner = 0) :
174 CompositeJetStructure(pieces_in, recombiner), _cos_theta_w(0.0){}
175
176 /// returns the W subjet
177 inline const PseudoJet & W() const{
178 return _pieces[0];
179 }
180
181 /// returns the first W subjet (the harder)
182 inline PseudoJet W1() const{
183 assert(W().pieces().size()>0);
184 return W().pieces()[0];
185 }
186
187 /// returns the second W subjet
188 inline PseudoJet W2() const{
189 assert(W().pieces().size()>1);
190 return W().pieces()[1];
191 }
192
193 /// returns the non-W subjet
194 /// It will have 1 or 2 pieces depending on whether the tagger has
195 /// found 3 or 4 pieces
196 inline const PseudoJet & non_W() const{
197 return _pieces[1];
198 }
199
200 /// returns the W helicity angle
201 inline double cos_theta_W() const {return _cos_theta_w;}
202
203// /// returns the original jet (before tagging)
204// const PseudoJet & original() const {return _original_jet;}
205
206
207protected:
208 double _cos_theta_w; ///< the W helicity angle
209 //PseudoJet _W; ///< the tagged W
210 //PseudoJet _non_W; ///< the remaining pieces
211// PseudoJet _original_jet; ///< the original jet (before tagging)
212
213 // allow the tagger to set these
214 friend class JHTopTagger;
215};
216
217
218
219FASTJET_END_NAMESPACE
220
221#endif // __FASTJET_JH_TOP_TAGGER_HH__
222
Note: See TracBrowser for help on using the repository browser.