84 int jetInd, jetCounter,
nTracks;
85 double dRmin,
dR,
e,
eta, emEB, emEE, emHF, hadHB, hadHE, hadHO, hadHF,
pt,
phi, pthat, chf;
90 CaloJetCollection::const_iterator i_caljet;
91 GenJetCollection::const_iterator i_genjet;
92 evt.getByLabel(
calAlgo, caljets);
97 cout <<
"WARNING: NO calo jets in event " << evt.id().event() <<
", Run " << evt.id().run() <<
" !!!!" << endl;
98 for (i_caljet = caljets->begin(); i_caljet != caljets->end() && jetInd <
Njets; ++i_caljet) {
99 e = i_caljet->energy();
101 phi = i_caljet->phi();
102 eta = i_caljet->eta();
103 emEB = i_caljet->emEnergyInEB();
104 emEE = i_caljet->emEnergyInEE();
105 emHF = i_caljet->emEnergyInHF();
106 hadHB = i_caljet->hadEnergyInHB();
107 hadHE = i_caljet->hadEnergyInHE();
108 hadHO = i_caljet->hadEnergyInHO();
109 hadHF = i_caljet->hadEnergyInHF();
113 p4jet[jetInd] = i_caljet->p4();
118 FillHist1D(
"emEnergyFraction", i_caljet->emEnergyFraction());
145 evt.getByLabel(
genAlgo, genjets);
146 evt.getByLabel(
"genEventScale", genEventScale);
147 pthat = *genEventScale;
151 if (genjets->empty())
152 cout <<
"WARNING: NO gen jets in event " << evt.id().event() <<
", Run " << evt.id().run() <<
" !!!!" << endl;
153 for (i_genjet = genjets->begin(); i_genjet != genjets->end() && jetInd <
Njets; ++i_genjet) {
155 p4jet[jetInd] = i_genjet->p4();
159 FillHistProfile(
"GenEnergyVsEta", i_genjet->eta(), i_genjet->energy());
161 for (i_caljet = caljets->begin(); i_caljet != caljets->end(); ++i_caljet) {
162 dR =
deltaR(i_caljet->eta(), i_caljet->phi(), i_genjet->eta(), i_genjet->phi());
165 MatchedJet = *i_caljet;
170 pt = MatchedJet.
pt();
179 if (dRmin < dRmatch && pt >
PtMin) {
182 FillHistProfile(
"hadErespVsEta",
eta, (hadHB + hadHO + hadHE + hadHF) / i_genjet->energy());
183 if (fabs(i_genjet->eta()) < 1.)
Jets made from CaloTowers.
float emEnergyInHF() const
double pt() const final
transverse momentum
float emEnergyInEE() const
void FillHist1D(const TString &histName, const Double_t &x)
void FillHistProfile(const TString &histName, const Double_t &x, const Double_t &y)
float emEnergyInEB() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
float hadEnergyInHO() const
float hadEnergyInHF() const
float hadEnergyInHE() const
float hadEnergyInHB() const
std::string jetTracksAssociator
LorentzVector tracksP4(const Container &, const reco::JetBaseRef)
Get LorentzVector as sum of all tracks associated with jet.
int tracksNumber(const Container &, const reco::JetBaseRef)
Get number of tracks associated with jet.
double energy() const final
energy
double eta() const final
momentum pseudorapidity