1 |
amagnan |
1.1 |
#include <iostream>
|
2 |
|
|
#include <fstream>
|
3 |
|
|
#include <sstream>
|
4 |
amagnan |
1.6 |
#include <cmath>
|
5 |
|
|
#include <cstdlib>
|
6 |
amagnan |
1.1 |
|
7 |
|
|
#include "Math/VectorUtil.h"
|
8 |
|
|
|
9 |
|
|
#include "UserCode/HbbAnalysis/interface/HistosJetsBase.hh"
|
10 |
|
|
|
11 |
|
|
namespace HbbAnalysis {//namespace
|
12 |
|
|
|
13 |
|
|
void HistosJetsBase::Initialise(TFileDirectory & aDir, std::string aName, unsigned short aDebug){
|
14 |
|
|
|
15 |
|
|
CreateHistos(aName,aDir,aDebug);
|
16 |
|
|
|
17 |
|
|
p_nJets = aDir.make<TH1F>("p_nJets",";N_{jets};N_{entries}",50,0,50);
|
18 |
amagnan |
1.2 |
p_nbJets = aDir.make<TH1F>("p_nbJets",";N_{bjets};N_{entries}",50,0,50);
|
19 |
amagnan |
1.1 |
|
20 |
|
|
p_deltaRelectrons = aDir.make<TH1F>("p_deltaRelectrons",";#Delta R(electrons);N_{entries}",225,-1,8);
|
21 |
|
|
p_deltaRmuons = aDir.make<TH1F>("p_deltaRmuons",";#Delta R(muons);N_{entries}",225,-1,8);
|
22 |
|
|
p_deltaRtaus = aDir.make<TH1F>("p_deltaRtaus",";#Delta R(taus);N_{entries}",225,-1,8);
|
23 |
|
|
//p_deltaRpftaus = aDir.make<TH1F>("p_deltaRpftaus",";#Delta R(pftaus);N_{entries}",225,-1,8);
|
24 |
amagnan |
1.5 |
p_deltaRleadJet = aDir.make<TH1F>("p_deltaRleadJet",";#Delta R(leadJet);N_{entries}",225,-1,8);
|
25 |
|
|
p_deltaRntoleadJet = aDir.make<TH1F>("p_deltaRntoleadJet",";#Delta R(ntoleadJet);N_{entries}",225,-1,8);
|
26 |
amagnan |
1.1 |
|
27 |
|
|
|
28 |
amagnan |
1.5 |
p_partonFlavour = aDir.make<TH1F>("p_partonFlavour",";parton flavour;N_{entries}",50,-25,25);
|
29 |
amagnan |
1.1 |
p_hasJetCorrFactors = aDir.make<TH1F>("p_hasJetCorrFactors",";hasJetCorFactors;N_{entries}",2,0,2);
|
30 |
|
|
|
31 |
|
|
std::vector<std::string> btagAlgos;
|
32 |
|
|
btagAlgos.push_back("combinedSecondaryVertexBJetTags");
|
33 |
|
|
btagAlgos.push_back("combinedSecondaryVertexMVABJetTags");
|
34 |
|
|
btagAlgos.push_back("impactParameterMVABJetTags");
|
35 |
|
|
btagAlgos.push_back("jetBProbabilityBJetTags");
|
36 |
|
|
btagAlgos.push_back("jetProbabilityBJetTags");
|
37 |
|
|
btagAlgos.push_back("simpleSecondaryVertexBJetTags");
|
38 |
amagnan |
1.4 |
btagAlgos.push_back("softElectronByPtBJetTags");
|
39 |
|
|
btagAlgos.push_back("softElectronByIP3dBJetTags");
|
40 |
amagnan |
1.1 |
btagAlgos.push_back("softMuonBJetTags");
|
41 |
amagnan |
1.4 |
btagAlgos.push_back("softMuonByPtBJetTags");
|
42 |
|
|
btagAlgos.push_back("softMuonByIP3dBJetTags");
|
43 |
amagnan |
1.1 |
btagAlgos.push_back("trackCountingHighEffBJetTags");
|
44 |
|
|
btagAlgos.push_back("trackCountingHighPurBJetTags");
|
45 |
|
|
|
46 |
|
|
const unsigned int nTags = btagAlgos.size();
|
47 |
amagnan |
1.4 |
assert (nTags == 13);
|
48 |
amagnan |
1.3 |
//double min[11] = {0,0,-0.1,0,0,1,0,0,0,-5,-5};
|
49 |
|
|
//double max[11] = {1,1,1,6,2,5,1,1,1,20,20};
|
50 |
amagnan |
1.1 |
|
51 |
|
|
for (unsigned int i(0); i<nTags; i++){
|
52 |
|
|
for (int fs(0); fs<4; fs++){//loop on FS
|
53 |
|
|
std::ostringstream lTitle;
|
54 |
|
|
lTitle << "p_bDiscriminator_" << i << "_" << fs;
|
55 |
|
|
std::ostringstream lAxis;
|
56 |
|
|
lAxis << ";" << btagAlgos.at(i) << ";N_{entries}" ;
|
57 |
amagnan |
1.6 |
p_bDiscriminator[i][fs] = aDir.make<TH1F>(lTitle.str().c_str(),lAxis.str().c_str(),5280,-101,31);//100,min[i],max[i]);
|
58 |
amagnan |
1.1 |
}
|
59 |
|
|
}
|
60 |
|
|
|
61 |
|
|
p_nAssociatedTracks = aDir.make<TH1F>("p_nAssociatedTracks",";N_{tracks};N_{entries}",50,0,50);
|
62 |
|
|
p_isCaloJet = aDir.make<TH1F>("p_isCaloJet",";isCaloJet;N_{entries}",2,0,2);
|
63 |
|
|
p_isPFJet = aDir.make<TH1F>("p_isPFJet",";isPFJet;N_{entries}",2,0,2);
|
64 |
|
|
p_isBasicJet = aDir.make<TH1F>("p_isBasicJet",";isBasicJet;N_{entries}",2,0,2);
|
65 |
|
|
|
66 |
|
|
//================== Calo Jet specific information ====================
|
67 |
|
|
p_maxEInEmTowers = aDir.make<TH1F>("p_maxEInEmTowers",";maxEInEmTowers;N_{entries}",200,0,200);
|
68 |
|
|
p_maxEInHadTowers = aDir.make<TH1F>("p_maxEInHadTowers",";maxEInHadTowers;N_{entries}",200,0,200);
|
69 |
|
|
p_energyFractionHadronic = aDir.make<TH1F>("p_energyFractionHadronic",";energyFractionHadronic;N_{entries}",100,0,2);
|
70 |
|
|
p_emEnergyFraction = aDir.make<TH1F>("p_emEnergyFraction",";emEnergyFraction;N_{entries}",100,0,2);
|
71 |
|
|
p_hadEnergyInHB = aDir.make<TH1F>("p_hadEnergyInHB",";hadEnergyInHB;N_{entries}",200,0,200);
|
72 |
|
|
p_hadEnergyInHO = aDir.make<TH1F>("p_hadEnergyInHO",";hadEnergyInHO;N_{entries}",200,0,200);
|
73 |
|
|
p_hadEnergyInHE = aDir.make<TH1F>("p_hadEnergyInHE",";hadEnergyInHE;N_{entries}",200,0,200);
|
74 |
|
|
p_hadEnergyInHF = aDir.make<TH1F>("p_hadEnergyInHF",";hadEnergyInHF;N_{entries}",200,0,200);
|
75 |
|
|
p_emEnergyInEB = aDir.make<TH1F>("p_emEnergyInEB",";emEnergyInEB;N_{entries}",200,0,200);
|
76 |
|
|
p_emEnergyInEE = aDir.make<TH1F>("p_emEnergyInEE",";emEnergyInEE;N_{entries}",200,0,200);
|
77 |
|
|
p_emEnergyInHF = aDir.make<TH1F>("p_emEnergyInHF",";emEnergyInHF;N_{entries}",200,0,200);
|
78 |
|
|
p_towersArea = aDir.make<TH1F>("p_towersArea",";towersArea;N_{entries}",100,0,1);
|
79 |
|
|
p_n90 = aDir.make<TH1F>("p_n90",";n90;N_{entries}",20,0,20);
|
80 |
|
|
p_n60 = aDir.make<TH1F>("p_n60",";n60;N_{entries}",20,0,20);
|
81 |
|
|
|
82 |
|
|
//================== PF Jet specific information ====================
|
83 |
|
|
p_chargedHadronEnergy = aDir.make<TH1F>("p_chargedHadronEnergy",";chargedHadronEnergy;N_{entries}",200,0,200);
|
84 |
|
|
p_chargedHadronEnergyFraction = aDir.make<TH1F>("p_chargedHadronEnergyFraction",";chargedHadronEnergyFraction;N_{entries}",100,0,2);
|
85 |
|
|
p_neutralHadronEnergy = aDir.make<TH1F>("p_neutralHadronEnergy",";neutralHadronEnergy;N_{entries}",200,0,200);
|
86 |
|
|
p_neutralHadronEnergyFraction = aDir.make<TH1F>("p_neutralHadronEnergyFraction",";neutralHadronEnergyFraction;N_{entries}",100,0,2);
|
87 |
|
|
p_chargedEmEnergy = aDir.make<TH1F>("p_chargedEmEnergy",";chargedEmEnergy;N_{entries}",200,0,200);
|
88 |
|
|
p_chargedEmEnergyFraction = aDir.make<TH1F>("p_chargedEmEnergyFraction",";chargedEmEnergyFraction;N_{entries}",100,0,2);
|
89 |
|
|
p_chargedMuEnergy = aDir.make<TH1F>("p_chargedMuEnergy",";chargedMuEnergy;N_{entries}",200,0,200);
|
90 |
|
|
p_chargedMuEnergyFraction = aDir.make<TH1F>("p_chargedMuEnergyFraction",";chargedMuEnergyFraction;N_{entries}",100,0,2);
|
91 |
|
|
p_neutralEmEnergy = aDir.make<TH1F>("p_neutralEmEnergy",";neutralEmEnergy;N_{entries}",200,0,200);
|
92 |
|
|
p_neutralEmEnergyFraction = aDir.make<TH1F>("p_neutralEmEnergyFraction",";neutralEmEnergyFraction;N_{entries}",100,0,2);
|
93 |
|
|
p_chargedMultiplicity = aDir.make<TH1F>("p_chargedMultiplicity",";chargedMultiplicity;N_{entries}",20,0,20);
|
94 |
|
|
p_neutralMultiplicity = aDir.make<TH1F>("p_neutralMultiplicity",";neutralMultiplicity;N_{entries}",20,0,20);
|
95 |
|
|
p_muonMultiplicity = aDir.make<TH1F>("p_muonMultiplicity",";muonMultiplicity;N_{entries}",20,0,20);
|
96 |
|
|
|
97 |
|
|
//================== gen particle matching histograms ================
|
98 |
|
|
|
99 |
|
|
std::string lFSname[4] = {"All","had","e","mu"};
|
100 |
|
|
|
101 |
|
|
TFileDirectory lSubDir = aDir.mkdir("flavours");
|
102 |
|
|
for (int fs(0); fs<4; fs++){//loop on FS
|
103 |
|
|
|
104 |
|
|
TFileDirectory lSubSubDir = lSubDir.mkdir(lFSname[fs]);
|
105 |
|
|
|
106 |
|
|
std::ostringstream pttitle,etitle,phtitle,dr1title,dr1btitle;
|
107 |
|
|
pttitle << "p_pTgenjet_" << fs ;
|
108 |
|
|
etitle << "p_etagenjet_" << fs ;
|
109 |
|
|
phtitle << "p_phigenjet_" << fs ;
|
110 |
|
|
dr1title << "p_dRgenjetparton_" << fs ;
|
111 |
|
|
dr1btitle << "p_dRgenjetlepton_" << fs ;
|
112 |
|
|
p_pTgenjet[fs] = lSubSubDir.make<TH1F>(pttitle.str().c_str(),";E_{T}^{genjet};N_{entries}",200,0,200);
|
113 |
|
|
p_etagenjet[fs] = lSubSubDir.make<TH1F>(etitle.str().c_str(),";#eta^{genjet};N_{entries}",25,-5,5);
|
114 |
|
|
p_phigenjet[fs] = lSubSubDir.make<TH1F>(phtitle.str().c_str(),";#phi^{genjet};N_{entries}",63,-3.15,3.15);
|
115 |
|
|
p_dRgenjetparton[fs] = lSubSubDir.make<TH1F>(dr1title.str().c_str(),";dR(parton-genjet);N_{entries}",120,0,6.3);
|
116 |
|
|
p_dRgenjetlepton[fs] = lSubSubDir.make<TH1F>(dr1btitle.str().c_str(),";dR(lepton-genjet);N_{entries}",120,0,6.3);
|
117 |
|
|
|
118 |
|
|
std::ostringstream ptrectitle,erectitle,phrectitle,rtitle,dr2title,dr2btitle;
|
119 |
|
|
dr2title << "p_dRrecojetparton_" << fs ;
|
120 |
|
|
dr2btitle << "p_dRrecojetlepton_" << fs ;
|
121 |
|
|
ptrectitle << "p_pTrecojet_" << fs ;
|
122 |
|
|
erectitle << "p_etarecojet_" << fs ;
|
123 |
|
|
phrectitle << "p_phirecojet_" << fs ;
|
124 |
|
|
rtitle << "p_pTrecoOverpTgenjet_" << fs ;
|
125 |
|
|
p_dRrecojetparton[fs] = lSubSubDir.make<TH1F>(dr2title.str().c_str(),";dR(parton-recojet);N_{entries}",120,0,6.3);
|
126 |
|
|
p_dRrecojetlepton[fs] = lSubSubDir.make<TH1F>(dr2btitle.str().c_str(),";dR(lepton-recojet);N_{entries}",120,0,6.3);
|
127 |
|
|
p_pTrecojet[fs] = lSubSubDir.make<TH1F>(ptrectitle.str().c_str(),";E_{T}^{recojet};N_{entries}",200,0,200);
|
128 |
|
|
p_etarecojet[fs] = lSubSubDir.make<TH1F>(erectitle.str().c_str(),";#eta^{recojet};N_{entries}",25,-5,5);
|
129 |
|
|
p_phirecojet[fs] = lSubSubDir.make<TH1F>(phrectitle.str().c_str(),";#phi^{recojet};N_{entries}",63,-3.15,3.15);
|
130 |
|
|
p_pTrecoOverpTgenjet[fs] = lSubSubDir.make<TH1F>(rtitle.str().c_str(),";E_{T}^{reco}/E_{T}^{gen};N_{entries}",100,0,3);
|
131 |
|
|
|
132 |
|
|
for (unsigned int bin(0); bin<20; bin++){//loop on eta bins
|
133 |
|
|
std::ostringstream retatitle;
|
134 |
|
|
retatitle << "p_pTrecoOverpTgenjet_vseta_" << fs << "_" << bin ;
|
135 |
|
|
p_pTrecoOverpTgenjet_vseta[fs][bin] = lSubSubDir.make<TH1F>(retatitle.str().c_str(),";E_{T}^{reco}/E_{T}^{gen};N_{entries}",100,0,3);
|
136 |
|
|
}//loop on eta bins
|
137 |
|
|
|
138 |
|
|
for (unsigned int bin(0); bin<10; bin++){//loop on pt bins
|
139 |
|
|
std::ostringstream rpttitle;
|
140 |
|
|
rpttitle << "p_pTrecoOverpTgenjet_vspt_" << fs << "_" << bin;
|
141 |
|
|
p_pTrecoOverpTgenjet_vspt[fs][bin] = lSubSubDir.make<TH1F>(rpttitle.str().c_str(),";E_{T}^{reco}/E_{T}^{gen};N_{entries}",100,0,3);
|
142 |
|
|
}//loop on pt bins
|
143 |
|
|
|
144 |
|
|
|
145 |
|
|
}//loop on FS
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
}
|
149 |
|
|
|
150 |
amagnan |
1.2 |
void HistosJetsBase::FillEventHistograms(const std::vector<HbbAnalysis::Jet> & abJetCol,
|
151 |
amagnan |
1.5 |
const std::vector<HbbAnalysis::Jet> & anonbJetCol,
|
152 |
|
|
bool genMatched)
|
153 |
amagnan |
1.2 |
{
|
154 |
amagnan |
1.1 |
|
155 |
amagnan |
1.2 |
p_nJets->Fill(abJetCol.size()+anonbJetCol.size());
|
156 |
amagnan |
1.5 |
|
157 |
|
|
unsigned int nbjets = 0;
|
158 |
|
|
for (std::vector<HbbAnalysis::Jet>::const_iterator iJet = abJetCol.begin();
|
159 |
|
|
iJet != abJetCol.end();
|
160 |
|
|
iJet++)
|
161 |
|
|
{
|
162 |
|
|
if (genMatched){
|
163 |
|
|
if (abs((*iJet).commonVars().partonFlavour) == 5) {
|
164 |
|
|
nbjets++;
|
165 |
|
|
}
|
166 |
|
|
}
|
167 |
|
|
// else {
|
168 |
|
|
// const HbbAnalysis::BaseVars v1 = (*iJet).recoVars();
|
169 |
|
|
// bool isBad = false;
|
170 |
|
|
// //loop from the beginning, mark lowest btag discri jet as bad
|
171 |
|
|
// for (std::vector<HbbAnalysis::Jet>::const_iterator iSec = abJetCol.begin();
|
172 |
|
|
// iSec != abJetCol.end(); iSec++){//loop on second jet
|
173 |
|
|
// if (iSec != iJet) {
|
174 |
|
|
// const HbbAnalysis::BaseVars v2 = (*iSec).recoVars();
|
175 |
|
|
// if (HbbAnalysis::DeltaR(v1,v2) < 0.7){
|
176 |
|
|
// if ((*iJet).btagVars().tCHP < (*iSec).btagVars().tCHP) isBad = true;
|
177 |
|
|
// }
|
178 |
|
|
// }
|
179 |
|
|
// }
|
180 |
|
|
// if (!isBad) nbjets++;
|
181 |
|
|
// }
|
182 |
|
|
}
|
183 |
|
|
if (genMatched) p_nbJets->Fill(nbjets);
|
184 |
|
|
else p_nbJets->Fill(abJetCol.size());
|
185 |
|
|
|
186 |
amagnan |
1.1 |
}
|
187 |
|
|
|
188 |
|
|
|
189 |
|
|
void HistosJetsBase::FillIsolationHistograms(const double deltaRele,
|
190 |
|
|
const double deltaRmu,
|
191 |
|
|
const double deltaRtau
|
192 |
|
|
//const double deltaRpftau
|
193 |
|
|
)
|
194 |
|
|
{
|
195 |
|
|
p_deltaRelectrons->Fill(deltaRele);
|
196 |
|
|
p_deltaRmuons->Fill(deltaRmu);
|
197 |
|
|
p_deltaRtaus->Fill(deltaRtau);
|
198 |
|
|
//p_deltaRpftaus->Fill(deltaRpftau);
|
199 |
|
|
}
|
200 |
|
|
|
201 |
amagnan |
1.5 |
void HistosJetsBase::FillHistograms(const HbbAnalysis::Jet & aJet,
|
202 |
|
|
const HbbAnalysis::Jet & aLeadJet,
|
203 |
|
|
const HbbAnalysis::Jet & aNtoLeadJet
|
204 |
|
|
){
|
205 |
|
|
const HbbAnalysis::BaseVars v1 = aJet.recoVars();
|
206 |
|
|
const HbbAnalysis::BaseVars vL = aLeadJet.recoVars();
|
207 |
|
|
const HbbAnalysis::BaseVars vNtoL = aNtoLeadJet.recoVars();
|
208 |
|
|
|
209 |
|
|
p_deltaRleadJet->Fill(HbbAnalysis::DeltaR(v1,vL));
|
210 |
|
|
p_deltaRntoleadJet->Fill(HbbAnalysis::DeltaR(v1,vNtoL));
|
211 |
|
|
}
|
212 |
amagnan |
1.1 |
|
213 |
|
|
void HistosJetsBase::FillHistograms(const HbbAnalysis::Jet & aJet){//FillHistograms
|
214 |
|
|
|
215 |
|
|
FillBaseHistograms(aJet.recoVars().pT,
|
216 |
|
|
aJet.recoVars().eta,
|
217 |
|
|
aJet.recoVars().phi,
|
218 |
|
|
aJet.recoVars().charge);
|
219 |
|
|
|
220 |
|
|
p_partonFlavour->Fill(aJet.commonVars().partonFlavour);
|
221 |
|
|
|
222 |
|
|
bool isMatched = aJet.commonVars().flavour>0 && aJet.genJetVars().valid;
|
223 |
|
|
unsigned int lFlav = aJet.commonVars().flavour;
|
224 |
|
|
|
225 |
|
|
p_bDiscriminator[0][0]->Fill(aJet.btagVars().cSV);
|
226 |
|
|
if (isMatched) p_bDiscriminator[0][lFlav]->Fill(aJet.btagVars().cSV);
|
227 |
|
|
p_bDiscriminator[1][0]->Fill(aJet.btagVars().cSVMVA);
|
228 |
|
|
if (isMatched) p_bDiscriminator[1][lFlav]->Fill(aJet.btagVars().cSVMVA);
|
229 |
|
|
p_bDiscriminator[2][0]->Fill(aJet.btagVars().iPMVA);
|
230 |
|
|
if (isMatched) p_bDiscriminator[2][lFlav]->Fill(aJet.btagVars().iPMVA);
|
231 |
|
|
p_bDiscriminator[3][0]->Fill(aJet.btagVars().bProba);
|
232 |
|
|
if (isMatched) p_bDiscriminator[3][lFlav]->Fill(aJet.btagVars().bProba);
|
233 |
|
|
p_bDiscriminator[4][0]->Fill(aJet.btagVars().probability);
|
234 |
|
|
if (isMatched) p_bDiscriminator[4][lFlav]->Fill(aJet.btagVars().probability);
|
235 |
|
|
p_bDiscriminator[5][0]->Fill(aJet.btagVars().sSV);
|
236 |
|
|
if (isMatched) p_bDiscriminator[5][lFlav]->Fill(aJet.btagVars().sSV);
|
237 |
amagnan |
1.4 |
p_bDiscriminator[6][0]->Fill(aJet.btagVars().softElectronByPt);
|
238 |
|
|
if (isMatched) p_bDiscriminator[6][lFlav]->Fill(aJet.btagVars().softElectronByPt);
|
239 |
|
|
p_bDiscriminator[7][0]->Fill(aJet.btagVars().softElectronByIP3d);
|
240 |
|
|
if (isMatched) p_bDiscriminator[7][lFlav]->Fill(aJet.btagVars().softElectronByIP3d);
|
241 |
|
|
p_bDiscriminator[8][0]->Fill(aJet.btagVars().softMuon);
|
242 |
|
|
if (isMatched) p_bDiscriminator[8][lFlav]->Fill(aJet.btagVars().softMuon);
|
243 |
|
|
p_bDiscriminator[9][0]->Fill(aJet.btagVars().softMuonByPt);
|
244 |
|
|
if (isMatched) p_bDiscriminator[9][lFlav]->Fill(aJet.btagVars().softMuonByPt);
|
245 |
|
|
p_bDiscriminator[10][0]->Fill(aJet.btagVars().softMuonByIP3d);
|
246 |
|
|
if (isMatched) p_bDiscriminator[10][lFlav]->Fill(aJet.btagVars().softMuonByIP3d);
|
247 |
|
|
p_bDiscriminator[11][0]->Fill(aJet.btagVars().tCHE);
|
248 |
|
|
if (isMatched) p_bDiscriminator[11][lFlav]->Fill(aJet.btagVars().tCHE);
|
249 |
|
|
p_bDiscriminator[12][0]->Fill(aJet.btagVars().tCHP);
|
250 |
|
|
if (isMatched) p_bDiscriminator[12][lFlav]->Fill(aJet.btagVars().tCHP);
|
251 |
amagnan |
1.1 |
|
252 |
|
|
if (aJet.genJetVars().valid){
|
253 |
|
|
p_pTgenjet[0]->Fill(aJet.genJetVars().pT);
|
254 |
|
|
p_etagenjet[0]->Fill(aJet.genJetVars().eta);
|
255 |
|
|
p_phigenjet[0]->Fill(aJet.genJetVars().phi);
|
256 |
|
|
p_pTrecojet[0]->Fill(aJet.recoVars().pT);
|
257 |
|
|
p_etarecojet[0]->Fill(aJet.recoVars().eta);
|
258 |
|
|
p_phirecojet[0]->Fill(aJet.recoVars().phi);
|
259 |
|
|
if (aJet.genJetVars().pT > 0) p_pTrecoOverpTgenjet[0]->Fill(aJet.recoVars().pT/aJet.genJetVars().pT);
|
260 |
|
|
if (isMatched) {
|
261 |
|
|
p_pTgenjet[lFlav]->Fill(aJet.genJetVars().pT);
|
262 |
|
|
p_etagenjet[lFlav]->Fill(aJet.genJetVars().eta);
|
263 |
|
|
p_phigenjet[lFlav]->Fill(aJet.genJetVars().phi);
|
264 |
|
|
p_pTrecojet[lFlav]->Fill(aJet.recoVars().pT);
|
265 |
|
|
p_etarecojet[lFlav]->Fill(aJet.recoVars().eta);
|
266 |
|
|
p_phirecojet[lFlav]->Fill(aJet.recoVars().phi);
|
267 |
|
|
if (aJet.genJetVars().pT > 0) p_pTrecoOverpTgenjet[lFlav]->Fill(aJet.recoVars().pT/aJet.genJetVars().pT);
|
268 |
|
|
}
|
269 |
|
|
}
|
270 |
|
|
|
271 |
|
|
if (aJet.genJetVars().valid && fabs(aJet.genJetVars().eta)<2 && aJet.genJetVars().pT>20) {
|
272 |
|
|
int binEta = static_cast<int>((aJet.genJetVars().eta+2.)/0.2);
|
273 |
|
|
int binpt;
|
274 |
|
|
if (aJet.genJetVars().pT < 100) binpt = static_cast<int>((aJet.genJetVars().pT-20)/10.);
|
275 |
|
|
else if (aJet.genJetVars().pT < 120) binpt = 8;
|
276 |
|
|
else binpt = 9;
|
277 |
|
|
|
278 |
|
|
p_pTrecoOverpTgenjet_vseta[0][binEta]->Fill(aJet.recoVars().pT/aJet.genJetVars().pT);
|
279 |
|
|
p_pTrecoOverpTgenjet_vspt[0][binpt]->Fill(aJet.recoVars().pT/aJet.genJetVars().pT);
|
280 |
|
|
if (lFlav){
|
281 |
|
|
p_pTrecoOverpTgenjet_vseta[lFlav][binEta]->Fill(aJet.recoVars().pT/aJet.genJetVars().pT);
|
282 |
|
|
p_pTrecoOverpTgenjet_vspt[lFlav][binpt]->Fill(aJet.recoVars().pT/aJet.genJetVars().pT);
|
283 |
|
|
}
|
284 |
|
|
}
|
285 |
|
|
|
286 |
|
|
p_nAssociatedTracks->Fill(aJet.commonVars().nAssociatedTracks);
|
287 |
|
|
p_isCaloJet->Fill(aJet.jetType() == 0);
|
288 |
|
|
p_isPFJet->Fill(aJet.jetType() == 1);
|
289 |
|
|
|
290 |
|
|
//================== Calo Jet specific information ====================
|
291 |
|
|
if (aJet.jetType() == 0) {
|
292 |
|
|
p_maxEInEmTowers->Fill(aJet.caloVars().maxEInEmTowers);
|
293 |
|
|
p_maxEInHadTowers->Fill(aJet.caloVars().maxEInHadTowers);
|
294 |
|
|
p_energyFractionHadronic->Fill(aJet.caloVars().energyFractionHadronic);
|
295 |
|
|
p_emEnergyFraction->Fill(aJet.caloVars().emEnergyFraction);
|
296 |
|
|
p_hadEnergyInHB->Fill(aJet.caloVars().hadEnergyInHB);
|
297 |
|
|
p_hadEnergyInHO->Fill(aJet.caloVars().hadEnergyInHO);
|
298 |
|
|
p_hadEnergyInHE->Fill(aJet.caloVars().hadEnergyInHE);
|
299 |
|
|
p_hadEnergyInHF->Fill(aJet.caloVars().hadEnergyInHF);
|
300 |
|
|
p_emEnergyInEB->Fill(aJet.caloVars().emEnergyInEB);
|
301 |
|
|
p_emEnergyInEE->Fill(aJet.caloVars().emEnergyInEE);
|
302 |
|
|
p_emEnergyInHF->Fill(aJet.caloVars().emEnergyInHF);
|
303 |
|
|
p_towersArea->Fill(aJet.caloVars().towersArea);
|
304 |
|
|
p_n90->Fill(aJet.caloVars().n90);
|
305 |
|
|
p_n60->Fill(aJet.caloVars().n60);
|
306 |
|
|
}
|
307 |
|
|
|
308 |
|
|
// //================== PF Jet specific information ====================
|
309 |
|
|
if (aJet.jetType() == 1){
|
310 |
|
|
p_chargedHadronEnergy->Fill(aJet.pfVars().chargedHadronEnergy);
|
311 |
|
|
p_chargedHadronEnergyFraction->Fill(aJet.pfVars().chargedHadronEnergyFraction);
|
312 |
|
|
p_neutralHadronEnergy->Fill(aJet.pfVars().neutralHadronEnergy);
|
313 |
|
|
p_neutralHadronEnergyFraction->Fill(aJet.pfVars().neutralHadronEnergyFraction);
|
314 |
|
|
p_chargedEmEnergy->Fill(aJet.pfVars().chargedEmEnergy);
|
315 |
|
|
p_chargedEmEnergyFraction->Fill(aJet.pfVars().chargedEmEnergyFraction);
|
316 |
|
|
p_chargedMuEnergy->Fill(aJet.pfVars().chargedMuEnergy);
|
317 |
|
|
p_chargedMuEnergyFraction->Fill(aJet.pfVars().chargedMuEnergyFraction);
|
318 |
|
|
p_neutralEmEnergy->Fill(aJet.pfVars().neutralEmEnergy);
|
319 |
|
|
p_neutralEmEnergyFraction->Fill(aJet.pfVars().neutralEmEnergyFraction);
|
320 |
|
|
p_chargedMultiplicity->Fill(aJet.pfVars().chargedMultiplicity);
|
321 |
|
|
p_neutralMultiplicity->Fill(aJet.pfVars().neutralMultiplicity);
|
322 |
|
|
p_muonMultiplicity->Fill(aJet.pfVars().muonMultiplicity);
|
323 |
|
|
}
|
324 |
|
|
|
325 |
|
|
|
326 |
|
|
}//FillHistograms
|
327 |
|
|
|
328 |
|
|
}//namespace
|