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