CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSBoostedTauSeedingAlgorithm.h
Go to the documentation of this file.
1 #ifndef __RecoJets_JetAlgorithms_CMSBoostedTauSeedingAlgorithm_h__
2 #define __RecoJets_JetAlgorithms_CMSBoostedTauSeedingAlgorithm_h__
3 
4 // CMSBoostedTau Package
5 //
6 // Find subjets corresponding to decay products of tau lepton pair
7 // and produce data-formats neccessary to seed tau reconstruction.
8 //
9 // Questions/Comments?
10 // for physics : Christian.Veelken@cern.ch
11 // for implementation : Salvatore.Rappoccio@cern.ch
12 //
13 //----------------------------------------------------------------------
14 // This file is part of FastJet contrib.
15 //
16 // It is free software; you can redistribute it and/or modify it under
17 // the terms of the GNU General Public License as published by the
18 // Free Software Foundation; either version 2 of the License, or (at
19 // your option) any later version.
20 //
21 // It is distributed in the hope that it will be useful, but WITHOUT
22 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
24 // License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with this code. If not, see <http://www.gnu.org/licenses/>.
28 //----------------------------------------------------------------------
29 
30 #include <fastjet/internal/base.hh>
31 #include <fastjet/tools/Transformer.hh>
32 #include <fastjet/CompositeJetStructure.hh>
33 
34 #include <fastjet/ClusterSequence.hh>
35 #include <fastjet/Error.hh>
36 #include <fastjet/JetDefinition.hh>
37 //#include "fastjet/FunctionOfPseudoJet.hh"
38 
39 #include <map>
40 #include <sstream>
41 #include <string>
42 
43 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
44 
45 namespace contrib{
46 
48 
49  //------------------------------------------------------------------------
53  class CMSBoostedTauSeedingAlgorithm : public Transformer {
54 
55  public:
56  // constructors
57  CMSBoostedTauSeedingAlgorithm(double ptMin, double muMin, double muMax, double yMin, double yMax, double dRMin, double dRMax, int maxDepth, int verbosity = 0);
58 
59  // destructor
61 
62  // standard usage
63  virtual std::string description() const;
64 
65  virtual PseudoJet result(const PseudoJet & jet) const;
66 
67  // the type of the associated structure
69 
70  protected:
71  void dumpSubJetStructure(const fastjet::PseudoJet& jet, int depth, int maxDepth, const std::string& depth_and_idx_string) const;
72  std::pair<PseudoJet, PseudoJet> findSubjets(const PseudoJet& jet, int depth, bool& subjetsFound) const;
73 
74  private:
75  double ptMin_;
76  double muMin_;
77  double muMax_;
78  double yMin_;
79  double yMax_;
80  double dRMin_;
81  double dRMax_;
82  int maxDepth_;
83 
84  int verbosity_;
85  };
86 
87 
88  //------------------------------------------------------------------------
96  class CMSBoostedTauSeedingAlgorithmStructure : public CompositeJetStructure {
97  public:
101  CMSBoostedTauSeedingAlgorithmStructure(const PseudoJet& result_jet, const JetDefinition::Recombiner* rec = 0)
102  : CompositeJetStructure(result_jet.pieces(), rec),
103  _mu(0.0), _y(0.0), _dR(0.0), _pt(0.0)
104  {}
105 
107  inline double mu() const { return _mu; }
108 
111  inline double y() const { return _y; }
112 
114  inline double dR() const { return _dR; }
115 
117  inline double pt() const { return _pt; }
118 
119  // /// returns the original jet (before tagging)
120  //const PseudoJet& original() const { return _original_jet; }
121 
122  protected:
123  double _mu;
124  double _y;
125  double _dR;
126  double _pt;
127  // allow the tagger to set these
129  };
130 
131 
132 } // namespace contrib
133 
134 FASTJET_END_NAMESPACE
135 
136 #endif // __FASTJET_CONTRIB_CMSBOOSTEDTAUSEEDINGALGORITHM_HH__
void dumpSubJetStructure(const fastjet::PseudoJet &jet, int depth, int maxDepth, const std::string &depth_and_idx_string) const
double dRMax_
the max value of the dR parameter
int maxDepth_
the max depth for descending into clustering sequence
tuple pieces
Definition: csv2json.py:31
double _mu
the value of the mass-drop parameter
double mu() const
returns the mass-drop ratio, pieces[0].m()/jet.m()
double yMax_
the max value of the asymmetry parameter
virtual PseudoJet result(const PseudoJet &jet) const
double yMin_
the min value of the asymmetry parameter
CMSBoostedTauSeedingAlgorithm(double ptMin, double muMin, double muMax, double yMin, double yMax, double dRMin, double dRMax, int maxDepth, int verbosity=0)
double muMax_
the max value of the mass-drop parameter
double _y
the value of the asymmetry parameter
std::pair< PseudoJet, PseudoJet > findSubjets(const PseudoJet &jet, int depth, bool &subjetsFound) const
int verbosity_
flag to enable/disable debug output
double dRMin_
the min value of the dR parameter
CMSBoostedTauSeedingAlgorithmStructure StructureType
CMSBoostedTauSeedingAlgorithmStructure(const PseudoJet &result_jet, const JetDefinition::Recombiner *rec=0)
double muMin_
the min value of the mass-drop parameter