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
CATopJetParameters_cfi.etFrac
etFrac
Definition: CATopJetParameters_cfi.py:25
CaloJetCollection.h
CaloJet.h
CaloTower.h
CATopJetParameters_cfi.useAdjacency
useAdjacency
Definition: CATopJetParameters_cfi.py:10
CATopJetAlgorithm::useAdjacency_
int useAdjacency_
Definition: CATopJetAlgorithm.h:87
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
CATopJetAlgorithm::adjacentCells
bool adjacentCells(const fastjet::PseudoJet &jet1, const fastjet::PseudoJet &jet2, const std::vector< fastjet::PseudoJet > &cell_particles, const fastjet::ClusterSequence &theClusterSequence, double nCellMin) const
Definition: CATopJetAlgorithm.cc:295
BasicJetCollection.h
CATopJetAlgorithm::sumEtBins_
std::vector< double > sumEtBins_
Definition: CATopJetAlgorithm.h:95
CATopJetParameters_cfi.deltarBins
deltarBins
Definition: CATopJetParameters_cfi.py:19
multiplicitycorr_cfi.rBins
rBins
Definition: multiplicitycorr_cfi.py:7
CATopJetParameters_cfi.sumEtEtaCut
sumEtEtaCut
Definition: CATopJetParameters_cfi.py:24
CATopJetParameters_cfi.ptFracBins
ptFracBins
Definition: CATopJetParameters_cfi.py:18
JetAlgoHelper.h
CATopJetAlgorithm::ptFracBins_
std::vector< double > ptFracBins_
Definition: CATopJetAlgorithm.h:97
CATopJetAlgorithm::verbose_
bool verbose_
Definition: CATopJetAlgorithm.h:85
CATopJetAlgorithm::rBins_
std::vector< double > rBins_
Definition: CATopJetAlgorithm.h:96
CaloTowerDefs.h
LeafCandidate.h
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
CATopJetAlgorithm::mSrc_
edm::InputTag mSrc_
Definition: CATopJetAlgorithm.h:84
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CATopJetParameters_cfi.nCellBins
nCellBins
Definition: CATopJetParameters_cfi.py:20
Event.h
deltaR.h
qcdUeDQM_cfi.algorithm
algorithm
Definition: qcdUeDQM_cfi.py:32
CATopJetAlgorithm::jetType_
std::string jetType_
Definition: CATopJetAlgorithm.h:106
CATopJetAlgorithm::run
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.
Definition: CATopJetAlgorithm.cc:18
CATopJetAlgorithm::ptMin_
double ptMin_
Definition: CATopJetAlgorithm.h:93
CATopJetAlgorithm::CATopJetAlgorithm
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)
Definition: CATopJetAlgorithm.h:45
CATopJetAlgorithm::decomposeJet
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
Definition: CATopJetAlgorithm.cc:314
CompoundPseudoJet.h
CATopJetParameters_cfi.sumEtBins
sumEtBins
Definition: CATopJetParameters_cfi.py:16
CATopJetParameters_cfi.useMaxTower
useMaxTower
Definition: CATopJetParameters_cfi.py:23
CATopJetParameters_cfi.centralEtaCut
centralEtaCut
Definition: CATopJetParameters_cfi.py:15
CATopJetAlgorithm
Definition: CATopJetAlgorithm.h:41
CATopJetAlgorithm::deltarBins_
std::vector< double > deltarBins_
Definition: CATopJetAlgorithm.h:98
CATopJetAlgorithm::useMaxTower_
bool useMaxTower_
Definition: CATopJetAlgorithm.h:103
BasicJet.h
CATopJetAlgorithm::sumEtEtaCut_
double sumEtEtaCut_
Definition: CATopJetAlgorithm.h:104
CATopJetAlgorithm::seedThreshold_
double seedThreshold_
Definition: CATopJetAlgorithm.h:102
Candidate.h
CATopJetAlgorithm::centralEtaCut_
double centralEtaCut_
Definition: CATopJetAlgorithm.h:92
edm::InputTag
Definition: InputTag.h:15
UEAnalysisJets_cfi.seedThreshold
seedThreshold
Definition: UEAnalysisJets_cfi.py:8
CATopJetAlgorithm::nCellBins_
std::vector< double > nCellBins_
Definition: CATopJetAlgorithm.h:100
CATopJetAlgorithm::etFrac_
double etFrac_
Definition: CATopJetAlgorithm.h:105
CATopJetAlgorithm::algorithm_
int algorithm_
Definition: CATopJetAlgorithm.h:86