CMS 3D CMS Logo

CATopJetAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoJets_JetAlgorithms_CATopJetAlgorithm_h
2 #define RecoJets_JetAlgorithms_CATopJetAlgorithm_h
3 
4 /* *********************************************************
5  * \class CATopJetAlgorithm
6  * Jet producer to produce top jets using the C-A algorithm to break
7  * jets into subjets as described here:
8  * "Top-tagging: A Method for Identifying Boosted Hadronic Tops"
9  * David E. Kaplan, Keith Rehermann, Matthew D. Schwartz, Brock Tweedie
10  * arXiv:0806.0848v1 [hep-ph]
11  *
12  ************************************************************/
13 
14 #include <vector>
15 #include <list>
16 #include <functional>
17 #include <TMath.h>
18 #include <iostream>
19 
32 
34 
35 #include <fastjet/JetDefinition.hh>
36 #include <fastjet/PseudoJet.hh>
37 #include <fastjet/ClusterSequence.hh>
38 #include <fastjet/GhostedAreaSpec.hh>
39 #include <fastjet/ClusterSequenceArea.hh>
40 
42 public:
46  bool verbose,
47  int algorithm,
48  int useAdjacency,
49  double centralEtaCut,
50  double ptMin,
51  const std::vector<double>& sumEtBins,
52  const std::vector<double>& rBins,
53  const std::vector<double>& ptFracBins,
54  const std::vector<double>& deltarBins,
55  const std::vector<double>& nCellBins,
56  double seedThreshold,
57  bool useMaxTower,
58  double sumEtEtaCut,
59  double etFrac)
60  : mSrc_(mSrc),
65  ptMin_(ptMin),
67  rBins_(rBins),
75 
76  {}
77 
79  void run(const std::vector<fastjet::PseudoJet>& cell_particles,
80  std::vector<fastjet::PseudoJet>& hardjetsOutput,
81  std::shared_ptr<fastjet::ClusterSequence>& fjClusterSeq);
82 
83 private:
84  edm::InputTag mSrc_; //<! calo tower input source
85  bool verbose_; //<!
86  int algorithm_; //<! 0 = KT, 1 = CA, 2 = anti-KT
87  int useAdjacency_; //<! choose adjacency requirement:
88  //<! 0 = no adjacency
89  //<! 1 = deltar adjacency
90  //<! 2 = modified adjacency
91  //<! 3 = calotower neirest neigbor based adjacency (untested)
92  double centralEtaCut_; //<! eta for defining "central" jets
93  double ptMin_; //<! lower pt cut on which jets to reco
94  std::vector<double>
95  sumEtBins_; //<! sumEt bins over which cuts vary. vector={bin 0 lower bound, bin 1 lower bound, ...}
96  std::vector<double> rBins_; //<! Jet distance paramter R. R values depend on sumEt bins.
97  std::vector<double> ptFracBins_; //<! deltap = fraction of full jet pt for a subjet to be consider "hard".
98  std::vector<double> deltarBins_; //<! Applicable only if useAdjacency=1. deltar adjacency values for each sumEtBin
99  std::vector<double>
100  nCellBins_; //<! Applicable only if useAdjacency=3. number of cells apart for two subjets to be considered "independent"
101  // NOT USED:
102  double seedThreshold_; //<! calo tower seed threshold - NOT USED
103  bool useMaxTower_; //<! use max tower for jet adjacency criterion, false is to use the centroid - NOT USED
104  double sumEtEtaCut_; //<! eta for event SumEt - NOT USED
105  double etFrac_; //<! fraction of event sumEt / 2 for a jet to be considered "hard" - NOT USED
106  std::string jetType_; //<! CaloJets or GenJets - NOT USED
107 
108  // Decide if the two jets are in adjacent cells
109  bool adjacentCells(const fastjet::PseudoJet& jet1,
110  const fastjet::PseudoJet& jet2,
111  const std::vector<fastjet::PseudoJet>& cell_particles,
112  const fastjet::ClusterSequence& theClusterSequence,
113  double nCellMin) const;
114 
115  // Attempt to break up one "hard" jet into two "soft" jets
116 
117  bool decomposeJet(const fastjet::PseudoJet& theJet,
118  const fastjet::ClusterSequence& theClusterSequence,
119  const std::vector<fastjet::PseudoJet>& cell_particles,
120  double ptHard,
121  double nCellMin,
122  double deltarcut,
123  fastjet::PseudoJet& ja,
124  fastjet::PseudoJet& jb,
125  std::vector<fastjet::PseudoJet>& leftovers) const;
126 };
127 
128 #endif
bool adjacentCells(const fastjet::PseudoJet &jet1, const fastjet::PseudoJet &jet2, const std::vector< fastjet::PseudoJet > &cell_particles, const fastjet::ClusterSequence &theClusterSequence, double nCellMin) const
std::vector< double > sumEtBins_
bool verbose
constexpr float ptMin
std::vector< double > rBins_
edm::InputTag mSrc_
CATopJetAlgorithm(const 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)
std::vector< double > ptFracBins_
void run(const std::vector< fastjet::PseudoJet > &cell_particles, std::vector< fastjet::PseudoJet > &hardjetsOutput, std::shared_ptr< fastjet::ClusterSequence > &fjClusterSeq)
Find the ProtoJets from the collection of input Candidates.
std::vector< double > deltarBins_
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 > nCellBins_