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)
100 e = i_caljet->energy();
102 phi = i_caljet->phi();
103 eta = i_caljet->eta();
104 emEB = i_caljet->emEnergyInEB();
105 emEE = i_caljet->emEnergyInEE();
106 emHF = i_caljet->emEnergyInHF();
107 hadHB = i_caljet->hadEnergyInHB();
108 hadHE = i_caljet->hadEnergyInHE();
109 hadHO = i_caljet->hadEnergyInHO();
110 hadHF = i_caljet->hadEnergyInHF();
114 p4jet[jetInd] = i_caljet->p4();
120 FillHist1D(
"emEnergyFraction",i_caljet->emEnergyFraction());
148 evt.getByLabel(
genAlgo,genjets);
149 evt.getByLabel(
"genEventScale",genEventScale);
150 pthat = *genEventScale;
154 if (genjets->empty())
155 cout<<
"WARNING: NO gen jets in event "<<evt.id().event()<<
", Run "<<evt.id().run()<<
" !!!!"<<endl;
156 for(i_genjet = genjets->begin(); i_genjet != genjets->end() && jetInd<
Njets; ++i_genjet)
159 p4jet[jetInd] = i_genjet->p4();
165 for(i_caljet = caljets->begin(); i_caljet != caljets->end(); ++i_caljet)
167 dR =
deltaR(i_caljet->eta(),i_caljet->phi(),i_genjet->eta(),i_genjet->phi());
171 MatchedJet = *i_caljet;
176 pt = MatchedJet.
pt();
177 eta = MatchedJet.
eta();
185 if (dRmin<dRmatch && pt>
PtMin)
188 FillHistProfile(
"emErespVsEta",eta,(emEB+emEE+emHF)/i_genjet->energy());
189 FillHistProfile(
"hadErespVsEta",eta,(hadHB+hadHO+hadHE+hadHF)/i_genjet->energy());
190 if (fabs(i_genjet->eta())<1.)
float hadEnergyInHE() const
float emEnergyInEE() const
const unsigned int nTracks(const reco::Vertex &sv)
double eta() const final
momentum pseudorapidity
Jets made from CaloTowers.
float emEnergyInHF() const
double pt() const final
transverse momentum
void FillHist1D(const TString &histName, const Double_t &x)
void FillHistProfile(const TString &histName, const Double_t &x, const Double_t &y)
float hadEnergyInHO() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
float emEnergyInEB() const
double energy() const final
energy
std::string jetTracksAssociator
LorentzVector tracksP4(const Container &, const reco::JetBaseRef)
Get LorentzVector as sum of all tracks associated with jet.
float hadEnergyInHB() const
int tracksNumber(const Container &, const reco::JetBaseRef)
Get number of tracks associated with jet.
float hadEnergyInHF() const