CMS 3D CMS Logo

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 {
47 
48  //------------------------------------------------------------------------
52  class CMSBoostedTauSeedingAlgorithm : public Transformer {
53  public:
54  // constructors
56  double muMin,
57  double muMax,
58  double yMin,
59  double yMax,
60  double dRMin,
61  double dRMax,
62  int maxDepth,
63  int verbosity = 0);
64 
65  // destructor
67 
68  // standard usage
69  std::string description() const override;
70 
71  PseudoJet result(const PseudoJet& jet) const override;
72 
73  // the type of the associated structure
75 
76  protected:
77  void dumpSubJetStructure(const fastjet::PseudoJet& jet,
78  int depth,
79  int maxDepth,
80  const std::string& depth_and_idx_string) const;
81  std::pair<PseudoJet, PseudoJet> findSubjets(const PseudoJet& jet, int depth, bool& subjetsFound) const;
82 
83  private:
84  double ptMin_;
85  double muMin_;
86  double muMax_;
87  double yMin_;
88  double yMax_;
89  double dRMin_;
90  double dRMax_;
91  int maxDepth_;
92 
93  int verbosity_;
94  };
95 
96  //------------------------------------------------------------------------
104  class CMSBoostedTauSeedingAlgorithmStructure : public CompositeJetStructure {
105  public:
109  CMSBoostedTauSeedingAlgorithmStructure(const PseudoJet& result_jet, const JetDefinition::Recombiner* rec = nullptr)
110  : CompositeJetStructure(result_jet.pieces(), rec), _mu(0.0), _y(0.0), _dR(0.0), _pt(0.0) {}
111 
113  inline double mu() const { return _mu; }
114 
117  inline double y() const { return _y; }
118 
120  inline double dR() const { return _dR; }
121 
123  inline double pt() const { return _pt; }
124 
125  // /// returns the original jet (before tagging)
126  //const PseudoJet& original() const { return _original_jet; }
127 
128  protected:
129  double _mu;
130  double _y;
131  double _dR;
132  double _pt;
133  // allow the tagger to set these
135  };
136 
137 } // namespace contrib
138 
139 FASTJET_END_NAMESPACE
140 
141 #endif // __FASTJET_CONTRIB_CMSBOOSTEDTAUSEEDINGALGORITHM_HH__
double dRMax_
the max value of the dR parameter
void dumpSubJetStructure(const fastjet::PseudoJet &jet, int depth, int maxDepth, const std::string &depth_and_idx_string) const
int maxDepth_
the max depth for descending into clustering sequence
double _mu
the value of the mass-drop parameter
constexpr float ptMin
CMSBoostedTauSeedingAlgorithmStructure(const PseudoJet &result_jet, const JetDefinition::Recombiner *rec=nullptr)
std::pair< PseudoJet, PseudoJet > findSubjets(const PseudoJet &jet, int depth, bool &subjetsFound) const
double yMax_
the max value of the asymmetry parameter
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
double mu() const
returns the mass-drop ratio, pieces[0].m()/jet.m()
int verbosity_
flag to enable/disable debug output
double dRMin_
the min value of the dR parameter
CMSBoostedTauSeedingAlgorithmStructure StructureType
double muMin_
the min value of the mass-drop parameter
PseudoJet result(const PseudoJet &jet) const override