1 |
tboccali |
1.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 |
|
|
|
22 |
|
|
#include "DataFormats/Candidate/interface/Candidate.h"
|
23 |
|
|
#include "DataFormats/CaloTowers/interface/CaloTower.h"
|
24 |
|
|
#include "DataFormats/CaloTowers/interface/CaloTowerFwd.h"
|
25 |
|
|
#include "DataFormats/JetReco/interface/CaloJet.h"
|
26 |
|
|
#include "DataFormats/JetReco/interface/CaloJetCollection.h"
|
27 |
|
|
#include "DataFormats/JetReco/interface/BasicJet.h"
|
28 |
|
|
#include "DataFormats/JetReco/interface/BasicJetCollection.h"
|
29 |
|
|
#include "DataFormats/Math/interface/deltaR.h"
|
30 |
|
|
#include "RecoJets/JetAlgorithms/interface/JetAlgoHelper.h"
|
31 |
|
|
#include "RecoJets/JetAlgorithms/interface/CompoundPseudoJet.h"
|
32 |
|
|
#include "DataFormats/Candidate/interface/LeafCandidate.h"
|
33 |
|
|
#include "FWCore/Framework/interface/Event.h"
|
34 |
|
|
|
35 |
|
|
#include "RecoJets/JetAlgorithms/interface/CompoundPseudoJet.h"
|
36 |
|
|
|
37 |
|
|
#include <fastjet/JetDefinition.hh>
|
38 |
|
|
#include <fastjet/PseudoJet.hh>
|
39 |
|
|
#include <fastjet/ClusterSequence.hh>
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
class CATopJetAlgorithm{
|
43 |
|
|
public:
|
44 |
|
|
/** Constructor
|
45 |
|
|
*/
|
46 |
|
|
CATopJetAlgorithm(edm::InputTag mSrc,
|
47 |
|
|
bool verbose,
|
48 |
|
|
int algorithm,
|
49 |
|
|
int useAdjacency,
|
50 |
|
|
double centralEtaCut,
|
51 |
|
|
double ptMin,
|
52 |
|
|
const std::vector<double> & sumEtBins,
|
53 |
|
|
const std::vector<double> & rBins,
|
54 |
|
|
const std::vector<double> & ptFracBins,
|
55 |
|
|
const std::vector<double> & deltarBins,
|
56 |
|
|
const std::vector<double> & nCellBins,
|
57 |
|
|
double seedThreshold,
|
58 |
|
|
bool useMaxTower,
|
59 |
|
|
double sumEtEtaCut,
|
60 |
|
|
double etFrac) :
|
61 |
|
|
mSrc_ (mSrc ),
|
62 |
|
|
verbose_ (verbose ),
|
63 |
|
|
algorithm_ (algorithm ),
|
64 |
|
|
useAdjacency_ (useAdjacency ),
|
65 |
|
|
centralEtaCut_ (centralEtaCut ),
|
66 |
|
|
ptMin_ (ptMin ),
|
67 |
|
|
sumEtBins_ (sumEtBins ),
|
68 |
|
|
rBins_ (rBins ),
|
69 |
|
|
ptFracBins_ (ptFracBins ),
|
70 |
|
|
deltarBins_ (deltarBins ),
|
71 |
|
|
nCellBins_ (nCellBins ),
|
72 |
|
|
seedThreshold_ (seedThreshold ),
|
73 |
|
|
useMaxTower_ (useMaxTower ),
|
74 |
|
|
sumEtEtaCut_ (sumEtEtaCut ),
|
75 |
|
|
etFrac_ (etFrac )
|
76 |
|
|
{ }
|
77 |
|
|
|
78 |
|
|
/// Find the ProtoJets from the collection of input Candidates.
|
79 |
|
|
void run( const std::vector<fastjet::PseudoJet> & cell_particles,
|
80 |
|
|
std::vector<CompoundPseudoJet> & hardjetsOutput,
|
81 |
|
|
edm::EventSetup const & c
|
82 |
|
|
);
|
83 |
|
|
|
84 |
|
|
private:
|
85 |
|
|
|
86 |
|
|
edm::InputTag mSrc_; //<! calo tower input source
|
87 |
|
|
bool verbose_; //<!
|
88 |
|
|
int algorithm_; //<! 0 = KT, 1 = CA, 2 = anti-KT
|
89 |
|
|
int useAdjacency_; //<! choose adjacency requirement:
|
90 |
|
|
//<! 0 = no adjacency
|
91 |
|
|
//<! 1 = deltar adjacency
|
92 |
|
|
//<! 2 = modified adjacency
|
93 |
|
|
//<! 3 = calotower neirest neigbor based adjacency (untested)
|
94 |
|
|
double centralEtaCut_; //<! eta for defining "central" jets
|
95 |
|
|
double ptMin_; //<! lower pt cut on which jets to reco
|
96 |
|
|
std::vector<double> sumEtBins_; //<! sumEt bins over which cuts vary. vector={bin 0 lower bound, bin 1 lower bound, ...}
|
97 |
|
|
std::vector<double> rBins_; //<! Jet distance paramter R. R values depend on sumEt bins.
|
98 |
|
|
std::vector<double> ptFracBins_; //<! deltap = fraction of full jet pt for a subjet to be consider "hard".
|
99 |
|
|
std::vector<double> deltarBins_; //<! Applicable only if useAdjacency=1. deltar adjacency values for each sumEtBin
|
100 |
|
|
std::vector<double> 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 |
|
|
|
109 |
|
|
// Decide if the two jets are in adjacent cells
|
110 |
|
|
bool adjacentCells(const fastjet::PseudoJet & jet1, const fastjet::PseudoJet & jet2,
|
111 |
|
|
const std::vector<fastjet::PseudoJet> & cell_particles,
|
112 |
|
|
const fastjet::ClusterSequence & theClusterSequence,
|
113 |
|
|
double nCellMin ) const;
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
// Attempt to break up one "hard" jet into two "soft" jets
|
117 |
|
|
|
118 |
|
|
bool decomposeJet(const fastjet::PseudoJet & theJet,
|
119 |
|
|
const fastjet::ClusterSequence & theClusterSequence,
|
120 |
|
|
const std::vector<fastjet::PseudoJet> & cell_particles,
|
121 |
|
|
double ptHard, double nCellMin, double deltarcut,
|
122 |
|
|
fastjet::PseudoJet & ja, fastjet::PseudoJet & jb,
|
123 |
|
|
std::vector<fastjet::PseudoJet> & leftovers) const;
|
124 |
|
|
|
125 |
|
|
};
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
#endif
|