FastJet  3.0.6
RestFrameNSubjettinessTagger.hh
1 #ifndef __FASTJET_RESTFRAMENSUBJETTINESS_TAGGER_HH__
2 #define __FASTJET_RESTFRAMENSUBJETTINESS_TAGGER_HH__
3 
4 //STARTHEADER
5 // $Id: RestFrameNSubjettinessTagger.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/PseudoJet.hh>
33 #include <fastjet/JetDefinition.hh>
34 #include <fastjet/CompositeJetStructure.hh>
35 #include <fastjet/tools/Transformer.hh>
36 
37 FASTJET_BEGIN_NAMESPACE
38 
39 class RestFrameNSubjettinessTagger;
40 class RestFrameNSubjettinessTaggerStructure;
41 
42 //----------------------------------------------------------------------
43 /// @ingroup tools_taggers
44 /// \class RestFrameNSubjettinessTagger
45 /// Class that helps perform 2-pronged boosted tagging using
46 /// a reclustering in the jet's rest frame, supplemented with a cut on N-subjettiness
47 /// (and a decay angle), as discussed by Ji-Hun Kim in arXiv:1011.1493.
48 ///
49 /// To tag a fat jet, the tagger proceeds as follows:
50 ///
51 /// - boost its constituents into the rest frame of the jet
52 ///
53 /// - recluster them using another jet definition (the original
54 /// choice was SISCone in spherical coordinates with R=0.6 and
55 /// f=0.75.
56 ///
57 /// - keep the 2 most energetic subjets (\f$q_{1,2}\f$) and compute
58 /// the 2-subjettiness
59 /// \f[
60 /// \tau_2^j = \frac{2}{m_{\rm jet}^2}\,
61 /// \sum_{k\in {\rm jet}} {\rm min}(q_1.p_k,q_2.p_k)
62 /// \f]
63 /// where the sum runs over the constituents of the jet.
64 ///
65 /// - require \f$\tau_2^j < \tau_2^{\rm cut}\f$ [0.08 by default]
66 ///
67 /// - impose that (in the rest frame of the fat jet), the angles
68 /// between the 2 most energetic subjets and the boost axis are
69 /// both large enough: \f$\cos(\theta_s)<c_\theta^{\rm cut}\f$
70 /// [0.8 by default]
71 ///
72 /// Note that in the original version, the jets to be tagged were reconstructed
73 /// using SISCone with R=0.8 and f=0.75. Also, b-tagging was imposed
74 /// on the 2 subjets found in the rest-frame tagging procedure.
75 ///
76 /// \section desc Options
77 ///
78 /// The constructor has the following arguments:
79 /// - The first argument is the jet definition to be used to
80 /// recluster the constituents of the jet to be filtered (in the
81 /// rest frame of the tagged jet).
82 /// - The second argument is the cut on tau_2 [0.08 by default]
83 /// - The 3rd argument is the cut on cos(theta_s) [0.8 by default]
84 /// - If the 4th argument is true, 2 exclusive rest-frame jets will
85 /// be considered in place of the 2 most energetic inclusive jets
86 ///
87 /// \section input Input conditions
88 ///
89 /// - the original jet must have constituents
90 ///
91 /// \section output Output/structure
92 ///
93 /// - the 2 subjets are kept as pieces if some substructure is found,
94 /// otherwise a single 0-momentum piece
95 /// - the tau2 and maximal cos(theta_s) values computed during the
96 /// tagging can be obtained via the resulting jet's structure_of<...>()
97 /// function
98 ///
100 public:
101  /// ctor with arguments (see the class description above)
103  const double tau2cut=0.08,
104  const double costhetascut=0.8,
105  const bool use_exclusive = false)
106  : _subjet_def(subjet_def), _t2cut(tau2cut), _costscut(costhetascut),
107  _use_exclusive(use_exclusive){};
108 
109  /// returns a textual description of the tagger
110  virtual std::string description() const;
111 
112  /// runs the tagger on the given jet and
113  /// returns the tagged PseudoJet if successful, a PseudoJet==0 otherwise
114  /// (standard access is through operator()).
115  virtual PseudoJet result(const PseudoJet & jet) const;
116 
117  /// the type of Structure returned
119 
120 protected:
121  JetDefinition _subjet_def;
122  double _t2cut, _costscut;
123  bool _use_exclusive;
124 };
125 
126 
127 //------------------------------------------------------------------------
128 /// @ingroup tools_taggers
129 /// \class RestFrameNSubjettinessTaggerStructure
130 /// the structure returned by the RestFrameNSubjettinessTagger transformer.
131 ///
132 /// See the RestFrameNSubjettinessTagger class description for the details of
133 /// what is inside this structure
134 ///
136 public:
137  /// ctor with pieces initialisation
138  RestFrameNSubjettinessTaggerStructure(const std::vector<PseudoJet> & pieces_in) :
139  CompositeJetStructure(pieces_in), _tau2(0.0), _costhetas(1.0){}
140 
141  /// returns the associated N-subjettiness
142  inline double tau2() const{return _tau2;}
143 
144  /// returns the associated angle with the boosted axis
145  inline double costhetas() const {return _costhetas;}
146 
147 // /// returns the original jet (before tagging)
148 // const PseudoJet & original() const {return _original_jet;}
149 
150 protected:
151  double _tau2; ///< the value of the N-subjettiness
152  double _costhetas; ///< the minimal angle between the dijets
153  ///< and the boost axis
154 // PseudoJet _original_jet; ///< the original jet (before tagging)
155 
156  // allow the tagger to set these
157  friend class RestFrameNSubjettinessTagger;
158 };
159 
160 FASTJET_END_NAMESPACE
161 #endif // __FASTJET_RESTFRAMENSUBJETTINESS_TAGGER_HH__
162 
fastjet::CompositeJetStructure
Definition: CompositeJetStructure.hh:47
fastjet::RestFrameNSubjettinessTaggerStructure
Definition: RestFrameNSubjettinessTagger.hh:135
fastjet::RestFrameNSubjettinessTagger::RestFrameNSubjettinessTagger
RestFrameNSubjettinessTagger(const JetDefinition subjet_def, const double tau2cut=0.08, const double costhetascut=0.8, const bool use_exclusive=false)
ctor with arguments (see the class description above)
Definition: RestFrameNSubjettinessTagger.hh:102
fastjet::JetDefinition
Definition: JetDefinition.hh:173
fastjet::RestFrameNSubjettinessTagger::StructureType
RestFrameNSubjettinessTaggerStructure StructureType
the type of Structure returned
Definition: RestFrameNSubjettinessTagger.hh:118
fastjet::RestFrameNSubjettinessTaggerStructure::_tau2
double _tau2
the value of the N-subjettiness
Definition: RestFrameNSubjettinessTagger.hh:151
fastjet::RestFrameNSubjettinessTaggerStructure::tau2
double tau2() const
returns the associated N-subjettiness
Definition: RestFrameNSubjettinessTagger.hh:142
fastjet::PseudoJet
Definition: PseudoJet.hh:65
fastjet::Transformer
Definition: Transformer.hh:69
fastjet::RestFrameNSubjettinessTaggerStructure::RestFrameNSubjettinessTaggerStructure
RestFrameNSubjettinessTaggerStructure(const std::vector< PseudoJet > &pieces_in)
ctor with pieces initialisation
Definition: RestFrameNSubjettinessTagger.hh:138
fastjet::RestFrameNSubjettinessTagger
Definition: RestFrameNSubjettinessTagger.hh:99
fastjet::RestFrameNSubjettinessTaggerStructure::_costhetas
double _costhetas
the minimal angle between the dijets and the boost axis
Definition: RestFrameNSubjettinessTagger.hh:152
fastjet::RestFrameNSubjettinessTaggerStructure::costhetas
double costhetas() const
returns the associated angle with the boosted axis
Definition: RestFrameNSubjettinessTagger.hh:145