7 #define BOOK1D(name, title, nbinsx, lowx, highx) \ 9 dbe_ ? dbe_->book1D(#name, title, nbinsx, lowx, highx)->getTH1F() : new TH1F(#name, title, nbinsx, lowx, highx) 12 #define BOOK2D(name, title, nbinsx, lowx, highx, nbinsy, lowy, highy) \ 13 h##name = dbe_ ? dbe_->book2D(#name, title, nbinsx, lowx, highx, nbinsy, lowy, highy)->getTH2F() \ 14 : new TH2F(#name, title, nbinsx, lowx, highx, nbinsy, lowy, highy) 17 #define DBOOK1D(name, title, nbinsx, lowx, highx) \ 18 BOOK1D(B##name, "Barrel " #title, nbinsx, lowx, highx); \ 19 BOOK1D(E##name, "Endcap " #title, nbinsx, lowx, highx); \ 20 BOOK1D(F##name, "Forward " #title, nbinsx, lowx, highx); 21 #define DBOOK2D(name, title, nbinsx, lowx, highx, nbinsy, lowy, highy) \ 22 BOOK2D(B##name, "Barrel " #title, nbinsx, lowx, highx, nbinsy, lowy, highy); \ 23 BOOK2D(E##name, "Endcap " #title, nbinsx, lowx, highx, nbinsy, lowy, highy); \ 24 BOOK2D(F##name, "Forward " #title, nbinsx, lowx, highx, nbinsy, lowy, highy); 28 #define SETAXES(name, xtitle, ytitle) \ 29 h##name->GetXaxis()->SetTitle(xtitle); \ 30 h##name->GetYaxis()->SetTitle(ytitle) 33 #define DSETAXES(name, xtitle, ytitle) \ 34 SETAXES(B##name, xtitle, ytitle); \ 35 SETAXES(E##name, xtitle, ytitle); \ 36 SETAXES(F##name, xtitle, ytitle); 41 #define PT (plotAgainstReco_) ? "reconstructed P_{T}" : "generated P_{T}" 42 #define P (plotAgainstReco_) ? "generated P" : "generated P" 62 cout <<
"Benchmark output written to file " <<
outputFile_.c_str() << endl;
66 cout <<
"No output file specified (" <<
outputFile_ <<
"). Results will not be saved!" << endl;
88 cout <<
"PFJetBenchmark Setup parameters ==============================================" << endl;
89 cout <<
"Filename to write histograms " << Filename << endl;
90 cout <<
"PFJetBenchmark debug " <<
debug_ << endl;
112 cout <<
"Info: DQM is not available to provide data storage service. Using TFile to save histograms. " << endl;
116 sprintf(cutString,
"Jet multiplicity P_{T}>%4.1f GeV",
recPt_cut);
119 BOOK1D(jetsPt,
"Jets P_{T} Distribution", 100, 0, 500);
121 sprintf(cutString,
"Jets #eta Distribution |#eta|<%4.1f",
maxEta_cut);
122 BOOK1D(jetsEta, cutString, 100, -5, 5);
124 BOOK2D(RPtvsEta,
"#DeltaP_{T}/P_{T} vs #eta", 200, -5., 5., 200, -1, 1);
125 BOOK2D(RNeutvsEta,
"R_{Neutral} vs #eta", 200, -5., 5., 200, -1, 1);
126 BOOK2D(RNEUTvsEta,
"R_{HCAL+ECAL} vs #eta", 200, -5., 5., 200, -1, 1);
127 BOOK2D(RNONLvsEta,
"R_{HCAL+ECAL - Hcal Only} vs #eta", 200, -5., 5., 200, -1, 1);
128 BOOK2D(RHCALvsEta,
"R_{HCAL} vs #eta", 200, -5., 5., 200, -1, 1);
129 BOOK2D(RHONLvsEta,
"R_{HCAL only} vs #eta", 200, -5., 5., 200, -1, 1);
130 BOOK2D(RCHEvsEta,
"R_{Charged} vs #eta", 200, -5., 5., 200, -1, 1);
131 BOOK2D(NCHvsEta,
"N_{Charged} vs #eta", 200, -5., 5., 200, 0., 200.);
132 BOOK2D(NCH0vsEta,
"N_{Charged} vs #eta, iter 0", 200, -5., 5., 200, 0., 200.);
133 BOOK2D(NCH1vsEta,
"N_{Charged} vs #eta, iter 1", 200, -5., 5., 200, 0., 200.);
134 BOOK2D(NCH2vsEta,
"N_{Charged} vs #eta, iter 2", 200, -5., 5., 200, 0., 200.);
135 BOOK2D(NCH3vsEta,
"N_{Charged} vs #eta, iter 3", 200, -5., 5., 200, 0., 200.);
136 BOOK2D(NCH4vsEta,
"N_{Charged} vs #eta, iter 4", 200, -5., 5., 200, 0., 200.);
137 BOOK2D(NCH5vsEta,
"N_{Charged} vs #eta, iter 5", 200, -5., 5., 200, 0., 200.);
138 BOOK2D(NCH6vsEta,
"N_{Charged} vs #eta, iter 6", 200, -5., 5., 200, 0., 200.);
140 DBOOK1D(RPt, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
141 DBOOK1D(RCHE, #DeltaE / E(charged had), 80, -2, 2);
142 DBOOK1D(RNHE, #DeltaE / E(neutral had), 80, -2, 2);
143 DBOOK1D(RNEE, #DeltaE / E(neutral em), 80, -2, 2);
144 DBOOK1D(Rneut, #DeltaE / E(neutral), 80, -2, 2);
146 DBOOK2D(RPtvsPt, #DeltaP_{
T} / P_{
T} vs P_{
T}, 250, 0, 500, 200, -1, 1);
147 DBOOK2D(RCHEvsPt, #DeltaE / E(charged had) vs P_{
T}, 250, 0, 500, 120, -1, 2);
148 DBOOK2D(RNHEvsPt, #DeltaE / E(neutral had) vs P_{
T}, 250, 0, 500, 120, -1, 2);
149 DBOOK2D(RNEEvsPt, #DeltaE / E(neutral em) vs P_{
T}, 250, 0, 500, 120, -1, 2);
150 DBOOK2D(RneutvsPt, #DeltaE / E(neutral) vs P_{
T}, 250, 0, 500, 120, -1, 2);
151 DBOOK2D(NCHvsPt, N_{charged} vs P_{
T}, 250, 0, 500, 200, 0., 200.);
152 DBOOK2D(NCH0vsPt, N_{charged} vs P_{
T} iter 0, 250, 0, 500, 200, 0., 200.);
153 DBOOK2D(NCH1vsPt, N_{charged} vs P_{
T} iter 1, 250, 0, 500, 200, 0., 200.);
154 DBOOK2D(NCH2vsPt, N_{charged} vs P_{
T} iter 2, 250, 0, 500, 200, 0., 200.);
155 DBOOK2D(NCH3vsPt, N_{charged} vs P_{
T} iter 3, 250, 0, 500, 200, 0., 200.);
156 DBOOK2D(NCH4vsPt, N_{charged} vs P_{
T} iter 4, 250, 0, 500, 200, 0., 200.);
157 DBOOK2D(NCH5vsPt, N_{charged} vs P_{
T} iter 5, 250, 0, 500, 200, 0., 200.);
158 DBOOK2D(NCH6vsPt, N_{charged} vs P_{
T} iter 6, 250, 0, 500, 200, 0., 200.);
160 DBOOK2D(RNEUTvsP, #DeltaE / E(
ECAL +
HCAL) vs
P, 250, 0, 1000, 150, -1.5, 1.5);
161 DBOOK2D(RNONLvsP, #DeltaE / E(
ECAL +
HCAL - only) vs
P, 250, 0, 1000, 150, -1.5, 1.5);
162 DBOOK2D(RHCALvsP, #DeltaE / E(
HCAL) vs
P, 250, 0, 1000, 150, -1.5, 1.5);
163 DBOOK2D(RHONLvsP, #DeltaE / E(
HCAL only) vs
P, 250, 0, 1000, 150, -1.5, 1.5);
164 DBOOK1D(RPt20_40, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
165 DBOOK1D(RPt40_60, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
166 DBOOK1D(RPt60_80, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
167 DBOOK1D(RPt80_100, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
168 DBOOK1D(RPt100_150, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
169 DBOOK1D(RPt150_200, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
170 DBOOK1D(RPt200_250, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
171 DBOOK1D(RPt250_300, #DeltaP_{
T} / P_{
T}, 80, -1, 1);
172 DBOOK1D(RPt300_400, #DeltaP_{
T} / P_{
T}, 160, -1, 1);
173 DBOOK1D(RPt400_500, #DeltaP_{
T} / P_{
T}, 160, -1, 1);
174 DBOOK1D(RPt500_750, #DeltaP_{
T} / P_{
T}, 160, -1, 1);
175 DBOOK1D(RPt750_1250, #DeltaP_{
T} / P_{
T}, 160, -1, 1);
176 DBOOK1D(RPt1250_2000, #DeltaP_{
T} / P_{
T}, 160, -1, 1);
177 DBOOK1D(RPt2000_5000, #DeltaP_{
T} / P_{
T}, 160, -1, 1);
179 DBOOK2D(DEtavsPt, #Delta #
eta vs P_{
T}, 1000, 0, 2000, 500, -0.5, 0.5);
180 DBOOK2D(DPhivsPt, #Delta #
phi vs P_{
T}, 1000, 0, 2000, 500, -0.5, 0.5);
181 BOOK2D(DEtavsEta,
"#Delta#eta vs P_{T}", 1000, -5., +5., 500, -0.5, 0.5);
182 BOOK2D(DPhivsEta,
"#Delta#phi vs P_{T}", 1000, -5., +5., 500, -0.5, 0.5);
189 SETAXES(jetsEta,
"#eta",
"Number of Events");
190 SETAXES(RNeutvsEta,
"#eta",
"#DeltaE/E (Neutral)");
191 SETAXES(RNEUTvsEta,
"#eta",
"#DeltaE/E (ECAL+HCAL)");
192 SETAXES(RNONLvsEta,
"#eta",
"#DeltaE/E (ECAL+HCAL-only)");
193 SETAXES(RHCALvsEta,
"#eta",
"#DeltaE/E (HCAL)");
194 SETAXES(RHONLvsEta,
"#eta",
"#DeltaE/E (HCAL Only)");
195 SETAXES(RCHEvsEta,
"#eta",
"#DeltaE/E (Charged)");
196 SETAXES(RPtvsEta,
"#eta",
"#DeltaP_{T}/P_{T}");
197 SETAXES(DEtavsEta,
"#eta",
"#Delta#eta");
198 SETAXES(DPhivsEta,
"#eta",
"#Delta#phi");
200 DSETAXES(RPt,
"#DeltaP_{T}/P_{T}",
"Events");
201 DSETAXES(RPt20_40,
"#DeltaP_{T}/P_{T}",
"Events");
202 DSETAXES(RPt40_60,
"#DeltaP_{T}/P_{T}",
"Events");
203 DSETAXES(RPt60_80,
"#DeltaP_{T}/P_{T}",
"Events");
204 DSETAXES(RPt80_100,
"#DeltaP_{T}/P_{T}",
"Events");
205 DSETAXES(RPt100_150,
"#DeltaP_{T}/P_{T}",
"Events");
206 DSETAXES(RPt150_200,
"#DeltaP_{T}/P_{T}",
"Events");
207 DSETAXES(RPt200_250,
"#DeltaP_{T}/P_{T}",
"Events");
208 DSETAXES(RPt250_300,
"#DeltaP_{T}/P_{T}",
"Events");
209 DSETAXES(RPt300_400,
"#DeltaP_{T}/P_{T}",
"Events");
210 DSETAXES(RPt400_500,
"#DeltaP_{T}/P_{T}",
"Events");
211 DSETAXES(RPt500_750,
"#DeltaP_{T}/P_{T}",
"Events");
212 DSETAXES(RPt750_1250,
"#DeltaP_{T}/P_{T}",
"Events");
213 DSETAXES(RPt1250_2000,
"#DeltaP_{T}/P_{T}",
"Events");
214 DSETAXES(RPt2000_5000,
"#DeltaP_{T}/P_{T}",
"Events");
215 DSETAXES(RCHE,
"#DeltaE/E(charged had)",
"Events");
216 DSETAXES(RNHE,
"#DeltaE/E(neutral had)",
"Events");
217 DSETAXES(RNEE,
"#DeltaE/E(neutral em)",
"Events");
218 DSETAXES(Rneut,
"#DeltaE/E(neutral)",
"Events");
220 DSETAXES(RCHEvsPt,
PT,
"#DeltaE/E(charged had)");
221 DSETAXES(RNHEvsPt,
PT,
"#DeltaE/E(neutral had)");
222 DSETAXES(RNEEvsPt,
PT,
"#DeltaE/E(neutral em)");
223 DSETAXES(RneutvsPt,
PT,
"#DeltaE/E(neutral)");
224 DSETAXES(RHCALvsP,
P,
"#DeltaE/E(HCAL)");
225 DSETAXES(RHONLvsP,
P,
"#DeltaE/E(HCAL-only)");
226 DSETAXES(RNEUTvsP,
P,
"#DeltaE/E(ECAL+HCAL)");
227 DSETAXES(RNONLvsP,
P,
"#DeltaE/E(ECAL+HCAL-only)");
240 for (
unsigned i = 0;
i <
pfJets.size();
i++) {
242 unsigned highJets = 0;
243 for (
unsigned j = 0;
j <
pfJets.size();
j++) {
251 double rec_pt = pfj.
pt();
252 double rec_eta = pfj.
eta();
253 double rec_phi = pfj.
phi();
272 bool Forward =
false;
297 double true_E = truth->
p();
298 double true_pt = truth->
pt();
299 double true_eta = truth->
eta();
300 double true_phi = truth->
phi();
308 double true_ChargedHadEnergy;
309 double true_NeutralHadEnergy;
310 double true_NeutralEmEnergy;
311 gettrue(truth, true_ChargedHadEnergy, true_NeutralHadEnergy, true_NeutralEmEnergy);
312 double true_NeutralEnergy = true_NeutralHadEnergy + true_NeutralEmEnergy;
316 double rec_NeutralEnergy = rec_NeutralHadEnergy + rec_NeutralEmEnergy;
319 std::vector<unsigned int> chMult(9, static_cast<unsigned int>(0));
320 for (
unsigned ic = 0; ic < constituents.size(); ++ic) {
321 if (constituents[ic]->particleId() > 3)
330 unsigned int iter = trackRef->algo() > 6 ? 6 : trackRef->algo();
341 double cut1 = 0.0001;
342 double cut2 = 0.0001;
343 double cut3 = 0.0001;
344 double cut4 = 0.0001;
345 double cut5 = 0.0001;
346 double cut6 = 0.0001;
347 double cut7 = 0.0001;
349 double resChargedHadEnergy = 0.;
350 double resNeutralHadEnergy = 0.;
351 double resNeutralEmEnergy = 0.;
352 double resNeutralEnergy = 0.;
354 double resHCALEnergy = 0.;
355 double resNEUTEnergy = 0.;
356 if (rec_NeutralHadEnergy > cut6 && rec_ChargedHadEnergy < cut1) {
357 double true_NEUTEnergy = true_NeutralHadEnergy + true_NeutralEmEnergy;
358 double true_HCALEnergy = true_NEUTEnergy - rec_NeutralEmEnergy;
359 double rec_NEUTEnergy = rec_NeutralHadEnergy + rec_NeutralEmEnergy;
360 double rec_HCALEnergy = rec_NeutralHadEnergy;
361 resHCALEnergy = (rec_HCALEnergy - true_HCALEnergy) / rec_HCALEnergy;
362 resNEUTEnergy = (rec_NEUTEnergy - true_NEUTEnergy) / rec_NEUTEnergy;
363 if (rec_NeutralEmEnergy > cut7) {
371 if (true_pt > 0.0001) {
372 resPt = (rec_pt - true_pt) / true_pt;
375 if (true_ChargedHadEnergy > cut1) {
376 resChargedHadEnergy = (rec_ChargedHadEnergy - true_ChargedHadEnergy) / true_ChargedHadEnergy;
379 if (true_NeutralHadEnergy > cut2) {
380 resNeutralHadEnergy = (rec_NeutralHadEnergy - true_NeutralHadEnergy) / true_NeutralHadEnergy;
382 }
else if (rec_NeutralHadEnergy > cut3) {
383 resNeutralHadEnergy = (rec_NeutralHadEnergy - true_NeutralHadEnergy) / rec_NeutralHadEnergy;
386 if (true_NeutralEmEnergy > cut4) {
387 resNeutralEmEnergy = (rec_NeutralEmEnergy - true_NeutralEmEnergy) / true_NeutralEmEnergy;
390 if (true_NeutralEnergy > cut5) {
391 resNeutralEnergy = (rec_NeutralEnergy - true_NeutralEnergy) / true_NeutralEnergy;
399 if ((resPt > 0.2 && true_pt > 100.) || (resPt < -0.5 && true_pt > 100.)) {
403 std::cout <<
"Entry " <<
entry_ <<
" resPt = " << resPt <<
" resCharged " << resChargedHadEnergy
404 <<
" resNeutralHad " << resNeutralHadEnergy <<
" resNeutralEm " << resNeutralEmEnergy
405 <<
" pT (T/R) " << true_pt <<
"/" << rec_pt <<
" Eta (T/R) " << truth->
eta() <<
"/" << rec_eta
406 <<
" Phi (T/R) " << truth->
phi() <<
"/" << rec_phi << std::endl;
411 for (
unsigned j = 0;
j <
pfJets.size();
j++) {
423 for (
unsigned j = 0;
j <
genJets.size();
j++) {
425 if (gjo != truth &&
algo_->
deltaR(truth, gjo) < dRgo && gjo->
pt() > 0.25 * truth->
pt()) {
431 if (dRo < 0.8 && dRgo < 0.8 && algo_->
deltaR(genoj, pfoj) < 2. *
deltaRMax_)
432 std::cout <<
"Excess probably due to overlapping jets (DR = " <<
algo_->
deltaR(genoj, pfoj) <<
")," 433 <<
" at DeltaR(T/R) = " << dRgo <<
"/" << dRo <<
" with pT(T/R) " << genoj->
pt() <<
"/" 434 << pfoj->
pt() <<
" and Eta (T/R) " << genoj->
eta() <<
"/" << pfoj->
eta() <<
" and Phi (T/R) " 435 << genoj->
phi() <<
"/" << pfoj->
phi() << std::endl;
447 cout <<
i <<
" =========PFJet Pt " << rec_pt <<
" eta " << rec_eta <<
" phi " << rec_phi
448 <<
" Charged Had Energy " << rec_ChargedHadEnergy <<
" Neutral Had Energy " << rec_NeutralHadEnergy
449 <<
" Neutral elm Energy " << rec_NeutralEmEnergy << endl;
450 cout <<
" matching Gen Jet Pt " << true_pt <<
" eta " << truth->
eta() <<
" phi " << truth->
phi()
451 <<
" Charged Had Energy " << true_ChargedHadEnergy <<
" Neutral Had Energy " << true_NeutralHadEnergy
452 <<
" Neutral elm Energy " << true_NeutralEmEnergy << endl;
458 cout <<
"==============deltaR " <<
deltaR <<
" resPt " << resPt <<
" resChargedHadEnergy " 459 << resChargedHadEnergy <<
" resNeutralHadEnergy " << resNeutralHadEnergy <<
" resNeutralEmEnergy " 460 << resNeutralEmEnergy << endl;
465 hDEtavsEta->Fill(true_eta, rec_eta - true_eta);
467 hDEtavsEta->Fill(true_eta, -rec_eta + true_eta);
468 hDPhivsEta->Fill(true_eta, rec_phi - true_phi);
471 hNCHvsEta->Fill(true_eta, rec_ChargedMultiplicity);
482 hRCHEvsEta->Fill(true_eta, resChargedHadEnergy);
499 if (pt_denom > 20. && pt_denom < 40.)
501 if (pt_denom > 40. && pt_denom < 60.)
503 if (pt_denom > 60. && pt_denom < 80.)
505 if (pt_denom > 80. && pt_denom < 100.)
507 if (pt_denom > 100. && pt_denom < 150.)
509 if (pt_denom > 150. && pt_denom < 200.)
511 if (pt_denom > 200. && pt_denom < 250.)
513 if (pt_denom > 250. && pt_denom < 300.)
515 if (pt_denom > 300. && pt_denom < 400.)
517 if (pt_denom > 400. && pt_denom < 500.)
519 if (pt_denom > 500. && pt_denom < 750.)
521 if (pt_denom > 750. && pt_denom < 1250.)
523 if (pt_denom > 1250. && pt_denom < 2000.)
525 if (pt_denom > 2000. && pt_denom < 5000.)
527 hBNCH->Fill(rec_ChargedMultiplicity);
536 hBNCHvsPt->Fill(pt_denom, rec_ChargedMultiplicity);
538 hBDEtavsPt->Fill(pt_denom, rec_eta - true_eta);
540 hBDEtavsPt->Fill(pt_denom, -rec_eta + true_eta);
541 hBDPhivsPt->Fill(pt_denom, rec_phi - true_phi);
544 hBRCHE->Fill(resChargedHadEnergy);
546 hBRNHE->Fill(resNeutralHadEnergy);
548 hBRNEE->Fill(resNeutralEmEnergy);
550 hBRneut->Fill(resNeutralEnergy);
554 hBRCHEvsPt->Fill(pt_denom, resChargedHadEnergy);
556 hBRNHEvsPt->Fill(pt_denom, resNeutralHadEnergy);
558 hBRNEEvsPt->Fill(pt_denom, resNeutralEmEnergy);
574 if (pt_denom > 20. && pt_denom < 40.)
576 if (pt_denom > 40. && pt_denom < 60.)
578 if (pt_denom > 60. && pt_denom < 80.)
580 if (pt_denom > 80. && pt_denom < 100.)
582 if (pt_denom > 100. && pt_denom < 150.)
584 if (pt_denom > 150. && pt_denom < 200.)
586 if (pt_denom > 200. && pt_denom < 250.)
588 if (pt_denom > 250. && pt_denom < 300.)
590 if (pt_denom > 300. && pt_denom < 400.)
592 if (pt_denom > 400. && pt_denom < 500.)
594 if (pt_denom > 500. && pt_denom < 750.)
596 if (pt_denom > 750. && pt_denom < 1250.)
598 if (pt_denom > 1250. && pt_denom < 2000.)
600 if (pt_denom > 2000. && pt_denom < 5000.)
602 hENCH->Fill(rec_ChargedMultiplicity);
603 hENCHvsPt->Fill(pt_denom, rec_ChargedMultiplicity);
613 hEDEtavsPt->Fill(pt_denom, rec_eta - true_eta);
615 hEDEtavsPt->Fill(pt_denom, -rec_eta + true_eta);
616 hEDPhivsPt->Fill(pt_denom, rec_phi - true_phi);
619 hERCHE->Fill(resChargedHadEnergy);
621 hERNHE->Fill(resNeutralHadEnergy);
623 hERNEE->Fill(resNeutralEmEnergy);
625 hERneut->Fill(resNeutralEnergy);
629 hERCHEvsPt->Fill(pt_denom, resChargedHadEnergy);
631 hERNHEvsPt->Fill(pt_denom, resNeutralHadEnergy);
633 hERNEEvsPt->Fill(pt_denom, resNeutralEmEnergy);
649 if (pt_denom > 20. && pt_denom < 40.)
651 if (pt_denom > 40. && pt_denom < 60.)
653 if (pt_denom > 60. && pt_denom < 80.)
655 if (pt_denom > 80. && pt_denom < 100.)
657 if (pt_denom > 100. && pt_denom < 150.)
659 if (pt_denom > 150. && pt_denom < 200.)
661 if (pt_denom > 200. && pt_denom < 250.)
663 if (pt_denom > 250. && pt_denom < 300.)
665 if (pt_denom > 300. && pt_denom < 400.)
667 if (pt_denom > 400. && pt_denom < 500.)
669 if (pt_denom > 500. && pt_denom < 750.)
671 if (pt_denom > 750. && pt_denom < 1250.)
673 if (pt_denom > 1250. && pt_denom < 2000.)
675 if (pt_denom > 2000. && pt_denom < 5000.)
678 hFDEtavsPt->Fill(pt_denom, rec_eta - true_eta);
680 hFDEtavsPt->Fill(pt_denom, -rec_eta + true_eta);
681 hFDPhivsPt->Fill(pt_denom, rec_phi - true_phi);
684 hFRCHE->Fill(resChargedHadEnergy);
686 hFRNHE->Fill(resNeutralHadEnergy);
688 hFRNEE->Fill(resNeutralEmEnergy);
690 hFRneut->Fill(resNeutralEnergy);
694 hFRCHEvsPt->Fill(pt_denom, resChargedHadEnergy);
696 hFRNHEvsPt->Fill(pt_denom, resNeutralHadEnergy);
698 hFRNEEvsPt->Fill(pt_denom, resNeutralEmEnergy);
719 double& true_ChargedHadEnergy,
720 double& true_NeutralHadEnergy,
721 double& true_NeutralEmEnergy) {
723 true_NeutralEmEnergy = 0.;
724 true_ChargedHadEnergy = 0.;
725 true_NeutralHadEnergy = 0.;
727 for (
unsigned i = 0;
i < mcparts.size();
i++) {
733 true_NeutralEmEnergy +=
e;
739 true_ChargedHadEnergy +=
e;
745 true_NeutralHadEnergy +=
e;
753 cout << setiosflags(ios::right);
755 cout << setprecision(3);
757 cout <<
"PFJet p/px/py/pz/pt: " << pfj->
p() <<
"/" << pfj->
px() <<
"/" << pfj->
py() <<
"/" << pfj->
pz() <<
"/" 759 <<
" eta/phi: " << pfj->
eta() <<
"/" << pfj->
phi() << endl
760 <<
" PFJet specific:" << std::endl
776 cout <<
"GenJet p/px/py/pz/pt: " << truth->
p() <<
'/' << truth->
px() <<
'/' << truth->
py() <<
'/' << truth->
pz()
777 <<
'/' << truth->
pt() << endl
778 <<
" eta/phi: " << truth->
eta() <<
'/' << truth->
phi() << endl
779 <<
" # of constituents: " << mcparts.size() << endl;
780 cout <<
" constituents:" << endl;
781 for (
unsigned i = 0;
i < mcparts.size();
i++) {
783 cout <<
" #" <<
i <<
" PDG code:" << mcpart->
pdgId() <<
", p/pt/eta/phi: " << mcpart->
p() <<
'/' 784 << mcpart->
pt() <<
'/' << mcpart->
eta() <<
'/' << mcpart->
phi() << endl;
#define BOOK1D(name, title, nbinsx, lowx, highx)
double pz() const final
z coordinate of momentum vector
float neutralHadronEnergy() const
neutralHadronEnergy
double pt() const final
transverse momentum
int chargedMultiplicity() const
chargedMultiplicity
float chargedEmEnergy() const
chargedEmEnergy
std::string print() const override
Print object in details.
float neutralEmEnergy() const
neutralEmEnergy
void setCurrentFolder(std::string const &fullpath) override
std::vector< GenJet > GenJetCollection
collection of GenJet objects
#define SETAXES(name, xtitle, ytitle)
int neutralMultiplicity() const
neutralMultiplicity
Jets made from PFObjects.
virtual ~PFJetBenchmark()
int pdgId() const final
PDG identifier.
void gettrue(const reco::GenJet *truth, double &true_ChargedHadEnergy, double &true_NeutralHadEnergy, double &true_NeutralEmEnergy)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
double px() const final
x coordinate of momentum vector
double p() const final
magnitude of momentum vector
#define BOOK2D(name, title, nbinsx, lowx, highx, nbinsy, lowy, highy)
static double deltaR(const T *, const U *)
#define DBOOK2D(name, title, nbinsx, lowx, highx, nbinsy, lowy, highy)
Abs< T >::type abs(const T &t)
Jets made from MC generator particles.
double py() const final
y coordinate of momentum vector
bool isNull() const
Checks for null.
void process(const reco::PFJetCollection &, const reco::GenJetCollection &)
double resChargedHadEnergyMax_
static const Collection::value_type * matchByDeltaR(const T *, const Collection *)
std::pair< OmniClusterRef, TrackingParticleRef > P
float chargedMuEnergy() const
chargedMuEnergy
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
std::vector< PFJet > PFJetCollection
collection of PFJet objects
double resNeutralHadEnergyMax_
void printPFJet(const reco::PFJet *)
virtual std::vector< const GenParticle * > getGenConstituents() const
get all constituents
float chargedHadronEnergy() const
chargedHadronEnergy
double resNeutralEmEnergyMax_
#define DSETAXES(name, xtitle, ytitle)
void setup(std::string Filename, bool debug, bool plotAgainstReco=false, bool onlyTwoJets=true, double deltaRMax=0.1, std::string benchmarkLabel_="ParticleFlow", double recPt=-1, double maxEta=-1, DQMStore *dbe_store=nullptr)
double phi() const final
momentum azimuthal angle
void printGenJet(const reco::GenJet *)
#define DBOOK1D(name, title, nbinsx, lowx, highx)
double energy() const final
energy
double eta() const final
momentum pseudorapidity