CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CATopJetAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoJets_JetAlgorithms_CATopJetAlgorithm_h
2 #define RecoJets_JetAlgorithms_CATopJetAlgorithm_h
3 
4 
5 
6 /* *********************************************************
7  * \class CATopJetAlgorithm
8  * Jet producer to produce top jets using the C-A algorithm to break
9  * jets into subjets as described here:
10  * "Top-tagging: A Method for Identifying Boosted Hadronic Tops"
11  * David E. Kaplan, Keith Rehermann, Matthew D. Schwartz, Brock Tweedie
12  * arXiv:0806.0848v1 [hep-ph]
13  *
14  ************************************************************/
15 
16 #include <vector>
17 #include <list>
18 #include <functional>
19 #include <TMath.h>
20 #include <iostream>
21 
34 
36 
37 
38 #include <fastjet/JetDefinition.hh>
39 #include <fastjet/PseudoJet.hh>
40 #include <fastjet/ClusterSequence.hh>
41 #include <fastjet/ActiveAreaSpec.hh>
42 #include <fastjet/ClusterSequenceArea.hh>
43 
45  public:
49  bool verbose,
50  int algorithm,
51  int useAdjacency,
52  double centralEtaCut,
53  double ptMin,
54  const std::vector<double> & sumEtBins,
55  const std::vector<double> & rBins,
56  const std::vector<double> & ptFracBins,
57  const std::vector<double> & deltarBins,
58  const std::vector<double> & nCellBins,
59  double seedThreshold,
60  bool useMaxTower,
61  double sumEtEtaCut,
62  double etFrac,
63  boost::shared_ptr<fastjet::JetDefinition> fjJetDefinition,
64  bool doAreaFastjet,
65  boost::shared_ptr<fastjet::ActiveAreaSpec> fjActiveArea,
66  double voronoiRfact) :
67  mSrc_ (mSrc ),
68  verbose_ (verbose ),
69  algorithm_ (algorithm ),
70  useAdjacency_ (useAdjacency ),
71  centralEtaCut_ (centralEtaCut ),
72  ptMin_ (ptMin ),
73  sumEtBins_ (sumEtBins ),
74  rBins_ (rBins ),
75  ptFracBins_ (ptFracBins ),
76  deltarBins_ (deltarBins ),
77  nCellBins_ (nCellBins ),
78  seedThreshold_ (seedThreshold ),
79  useMaxTower_ (useMaxTower ),
80  sumEtEtaCut_ (sumEtEtaCut ),
81  etFrac_ (etFrac ),
82  fjJetDefinition_(fjJetDefinition),
83  doAreaFastjet_ (doAreaFastjet),
84  fjActiveArea_ (fjActiveArea),
85  voronoiRfact_ (voronoiRfact)
86  { }
87 
89  void run( const std::vector<fastjet::PseudoJet> & cell_particles,
90  std::vector<CompoundPseudoJet> & hardjetsOutput
91  );
92 
93  private:
94 
95  edm::InputTag mSrc_; //<! calo tower input source
96  bool verbose_; //<!
97  int algorithm_; //<! 0 = KT, 1 = CA, 2 = anti-KT
98  int useAdjacency_; //<! choose adjacency requirement:
99  //<! 0 = no adjacency
100  //<! 1 = deltar adjacency
101  //<! 2 = modified adjacency
102  //<! 3 = calotower neirest neigbor based adjacency (untested)
103  double centralEtaCut_; //<! eta for defining "central" jets
104  double ptMin_; //<! lower pt cut on which jets to reco
105  std::vector<double> sumEtBins_; //<! sumEt bins over which cuts vary. vector={bin 0 lower bound, bin 1 lower bound, ...}
106  std::vector<double> rBins_; //<! Jet distance paramter R. R values depend on sumEt bins.
107  std::vector<double> ptFracBins_; //<! deltap = fraction of full jet pt for a subjet to be consider "hard".
108  std::vector<double> deltarBins_; //<! Applicable only if useAdjacency=1. deltar adjacency values for each sumEtBin
109  std::vector<double> nCellBins_; //<! Applicable only if useAdjacency=3. number of cells apart for two subjets to be considered "independent"
110  // NOT USED:
111  double seedThreshold_; //<! calo tower seed threshold - NOT USED
112  bool useMaxTower_; //<! use max tower for jet adjacency criterion, false is to use the centroid - NOT USED
113  double sumEtEtaCut_; //<! eta for event SumEt - NOT USED
114  double etFrac_; //<! fraction of event sumEt / 2 for a jet to be considered "hard" - NOT USED
115  std::string jetType_; //<! CaloJets or GenJets - NOT USED
116  boost::shared_ptr<fastjet::JetDefinition> fjJetDefinition_; //<! jet definition to use
117  bool doAreaFastjet_; //<! whether or not to use the fastjet area
118  boost::shared_ptr<fastjet::ActiveAreaSpec> fjActiveArea_; //<! fastjet area spec
119  double voronoiRfact_; //<! fastjet voronoi area R factor
120 
121  // Decide if the two jets are in adjacent cells
122  bool adjacentCells(const fastjet::PseudoJet & jet1, const fastjet::PseudoJet & jet2,
123  const std::vector<fastjet::PseudoJet> & cell_particles,
124  const fastjet::ClusterSequence & theClusterSequence,
125  double nCellMin ) const;
126 
127 
128  // Attempt to break up one "hard" jet into two "soft" jets
129 
130  bool decomposeJet(const fastjet::PseudoJet & theJet,
131  const fastjet::ClusterSequence & theClusterSequence,
132  const std::vector<fastjet::PseudoJet> & cell_particles,
133  double ptHard, double nCellMin, double deltarcut,
134  fastjet::PseudoJet & ja, fastjet::PseudoJet & jb,
135  std::vector<fastjet::PseudoJet> & leftovers) const;
136 
137 };
138 
139 
140 
141 #endif
boost::shared_ptr< fastjet::ActiveAreaSpec > fjActiveArea_
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Ecal cluster collections</td ></tr >< tr >< td >< ahref="classreco_1_1BasicCluster.html"> reco::BasicCluster</a ></td >< td >< ahref="DataFormats_EgammaReco.html"> reco::BasicClusterCollection</a ></td >< td >< ahref="#"> hybridSuperClusters</a ></td >< tdclass="description"> Basic clusters reconstructed with hybrid algorithm(barrel only)</td >< td >S.Rahatlou</td ></tr >< tr >< td >< a href
std::vector< double > sumEtBins_
CATopJetAlgorithm(edm::InputTag mSrc, bool verbose, int algorithm, int useAdjacency, double centralEtaCut, double ptMin, const std::vector< double > &sumEtBins, const std::vector< double > &rBins, const std::vector< double > &ptFracBins, const std::vector< double > &deltarBins, const std::vector< double > &nCellBins, double seedThreshold, bool useMaxTower, double sumEtEtaCut, double etFrac, boost::shared_ptr< fastjet::JetDefinition > fjJetDefinition, bool doAreaFastjet, boost::shared_ptr< fastjet::ActiveAreaSpec > fjActiveArea, double voronoiRfact)
std::vector< double > rBins_
edm::InputTag mSrc_
bool adjacentCells(const fastjet::PseudoJet &jet1, const fastjet::PseudoJet &jet2, const std::vector< fastjet::PseudoJet > &cell_particles, const fastjet::ClusterSequence &theClusterSequence, double nCellMin) const
bool decomposeJet(const fastjet::PseudoJet &theJet, const fastjet::ClusterSequence &theClusterSequence, const std::vector< fastjet::PseudoJet > &cell_particles, double ptHard, double nCellMin, double deltarcut, fastjet::PseudoJet &ja, fastjet::PseudoJet &jb, std::vector< fastjet::PseudoJet > &leftovers) const
std::vector< double > ptFracBins_
boost::shared_ptr< fastjet::JetDefinition > fjJetDefinition_
std::vector< double > deltarBins_
void run(const std::vector< fastjet::PseudoJet > &cell_particles, std::vector< CompoundPseudoJet > &hardjetsOutput)
Find the ProtoJets from the collection of input Candidates.
std::vector< double > nCellBins_