31 cout <<
"EfficiencyPlotter(): Constructor " << endl;
39 phiBin =
parameters.getParameter<
int>(
"phiBin");
40 phiMin =
parameters.getParameter<
double>(
"phiMin");
41 phiMax =
parameters.getParameter<
double>(
"phiMax");
45 ptMax =
parameters.getParameter<
double>(
"ptMax");
47 vtxBin =
parameters.getParameter<
int>(
"vtxBin");
48 vtxMin =
parameters.getParameter<
double>(
"vtxMin");
49 vtxMax =
parameters.getParameter<
double>(
"vtxMax");
51 ID_ =
parameters.getParameter<
string>(
"MuonID");
62 h_eff_phi_ID = ibooker.
book1D(
"Eff_phi_"+ID_, ID_+
" Eff. vs #phi", phiBin, phiMin, phiMax);
63 h_eff_pt_ID = ibooker.
book1D(
"Eff_pt_"+ID_, ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
64 h_eff_pt_EB_ID = ibooker.
book1D(
"Eff_pt_EB_"+ID_,
"Barrel: "+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
65 h_eff_pt_EE_ID = ibooker.
book1D(
"Eff_pt_EE_"+ID_,
"Endcap: "+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
66 h_eff_pt_detIsoID = ibooker.
book1D(
"Eff_pt_detIso"+ID_,
"detIso"+ID_+
" Efficiency vs Pt", ptBin,
ptMin, ptMax);
67 h_eff_pt_EB_detIsoID = ibooker.
book1D(
"Eff_pt_EB_detIso"+ID_,
"Barrel: detIso"+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
68 h_eff_pt_EE_detIsoID = ibooker.
book1D(
"Eff_pt_EE_detIso"+ID_,
"Endcap: detIso"+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
69 h_eff_pt_pfIsoID = ibooker.
book1D(
"Eff_pt_pfIso"+ID_,
"pfIso"+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
70 h_eff_pt_EB_pfIsoID = ibooker.
book1D(
"Eff_pt_EB_pfIso"+ID_,
"Barrel: pfIso"+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
71 h_eff_pt_EE_pfIsoID = ibooker.
book1D(
"Eff_pt_EE_pfIso"+ID_,
"Endcap: pfIso"+ID_+
" Eff. vs Pt", ptBin,
ptMin, ptMax);
72 h_eff_vtx_detIsoID = ibooker.
book1D(
"Eff_vtx_detIso"+ID_,
"detIso"+ID_+
" Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
73 h_eff_vtx_pfIsoID = ibooker.
book1D(
"Eff_vtx_pfIso"+ID_,
"pfIso"+ID_+
" Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
74 h_eff_vtx_EB_detIsoID = ibooker.
book1D(
"Eff_vtx_EB_detIso"+ID_,
"Barrel: detIso"+ID_+
" Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
75 h_eff_vtx_EB_pfIsoID = ibooker.
book1D(
"Eff_vtx_EB_pfIso"+ID_,
"Barrel: pfIso"+ID_+
" Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
76 h_eff_vtx_EE_detIsoID = ibooker.
book1D(
"Eff_vtx_EE_detIso"+ID_,
"Endcap: detIso"+ID_+
" Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
77 h_eff_vtx_EE_pfIsoID = ibooker.
book1D(
"Eff_vtx_EE_pfIso"+ID_,
"Endcap: pfIso"+ID_+
" Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
79 h_eff_pt_pfIsodBID = ibooker.
book1D(
"Eff_pt_pfIsodB"+ID_,
"pfIso"+ID_+
" (deltaBeta) Eff. vs Pt", ptBin,
ptMin, ptMax);
80 h_eff_pt_EB_pfIsodBID = ibooker.
book1D(
"Eff_pt_EB_pfIsodB"+ID_,
"Barrel: pfIso"+ID_+
" (deltaBeta) Eff. vs Pt", ptBin,
ptMin, ptMax);
81 h_eff_pt_EE_pfIsodBID = ibooker.
book1D(
"Eff_pt_EE_pfIsodB"+ID_,
"Endcap: pfIso"+ID_+
" (deltaBeta) Eff. vs Pt", ptBin,
ptMin, ptMax);
82 h_eff_vtx_pfIsodBID = ibooker.
book1D(
"Eff_vtx_pfIsodB"+ID_,
"pfIso"+ID_+
" (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
83 h_eff_vtx_EB_pfIsodBID = ibooker.
book1D(
"Eff_vtx_EB_pfIsodB"+ID_,
"Barrel: pfIso"+ID_+
" (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
84 h_eff_vtx_EE_pfIsodBID = ibooker.
book1D(
"Eff_vtx_EE_pfIsodB"+ID_,
"Endcap: pfIso"+ID_+
" (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
88 h_eff_hp_eta_ID ->setEfficiencyFlag();
89 h_eff_phi_ID ->setEfficiencyFlag();
90 h_eff_pt_ID ->setEfficiencyFlag();
91 h_eff_pt_EB_ID ->setEfficiencyFlag();
92 h_eff_pt_EE_ID ->setEfficiencyFlag();
93 h_eff_pt_detIsoID ->setEfficiencyFlag();
94 h_eff_pt_EB_detIsoID ->setEfficiencyFlag();
95 h_eff_pt_EE_detIsoID ->setEfficiencyFlag();
96 h_eff_pt_pfIsoID ->setEfficiencyFlag();
97 h_eff_pt_EB_pfIsoID ->setEfficiencyFlag();
98 h_eff_pt_EE_pfIsoID ->setEfficiencyFlag();
99 h_eff_vtx_detIsoID ->setEfficiencyFlag();
100 h_eff_vtx_pfIsoID ->setEfficiencyFlag();
101 h_eff_vtx_EB_detIsoID->setEfficiencyFlag();
102 h_eff_vtx_EB_pfIsoID ->setEfficiencyFlag();
103 h_eff_vtx_EE_detIsoID->setEfficiencyFlag();
104 h_eff_vtx_EE_pfIsoID ->setEfficiencyFlag();
106 h_eff_pt_pfIsodBID ->setEfficiencyFlag();
107 h_eff_pt_EB_pfIsodBID ->setEfficiencyFlag();
108 h_eff_pt_EE_pfIsodBID ->setEfficiencyFlag();
109 h_eff_vtx_pfIsodBID ->setEfficiencyFlag();
110 h_eff_vtx_EB_pfIsodBID ->setEfficiencyFlag();
111 h_eff_vtx_EE_pfIsodBID ->setEfficiencyFlag();
115 h_eff_hp_eta_ID ->setAxisTitle(
"#eta", 1);
116 h_eff_eta_ID ->setAxisTitle(
"#eta", 1);
117 h_eff_phi_ID ->setAxisTitle(
"#phi", 1);
118 h_eff_pt_ID ->setAxisTitle(
"p_{T} (GeV)", 1);
119 h_eff_pt_EB_ID ->setAxisTitle(
"p_{T} (GeV)", 1);
120 h_eff_pt_EE_ID ->setAxisTitle(
"p_{T} (GeV)", 1);
121 h_eff_pt_detIsoID ->setAxisTitle(
"p_{T} (GeV)", 1);
122 h_eff_pt_EB_detIsoID ->setAxisTitle(
"p_{T} (GeV)", 1);
123 h_eff_pt_EE_detIsoID ->setAxisTitle(
"p_{T} (GeV)", 1);
124 h_eff_pt_pfIsoID ->setAxisTitle(
"p_{T} (GeV)", 1);
125 h_eff_pt_EB_pfIsoID ->setAxisTitle(
"p_{T} (GeV)", 1);
126 h_eff_pt_EE_pfIsoID ->setAxisTitle(
"p_{T} (GeV)", 1);
127 h_eff_vtx_detIsoID ->setAxisTitle(
"Number of PV", 1);
128 h_eff_vtx_pfIsoID ->setAxisTitle(
"Number of PV", 1);
129 h_eff_vtx_EB_detIsoID->setAxisTitle(
"Number of PV", 1);
130 h_eff_vtx_EB_pfIsoID ->setAxisTitle(
"Number of PV", 1);
131 h_eff_vtx_EE_detIsoID->setAxisTitle(
"Number of PV", 1);
132 h_eff_vtx_EE_pfIsoID ->setAxisTitle(
"Number of PV", 1);
134 h_eff_pt_pfIsodBID ->setAxisTitle(
"p_{T} (GeV)", 1);
135 h_eff_pt_EB_pfIsodBID ->setAxisTitle(
"p_{T} (GeV)", 1);
136 h_eff_pt_EE_pfIsodBID ->setAxisTitle(
"p_{T} (GeV)", 1);
137 h_eff_vtx_pfIsodBID ->setAxisTitle(
"Number of PV", 1);
138 h_eff_vtx_EB_pfIsodBID ->setAxisTitle(
"Number of PV", 1);
139 h_eff_vtx_EE_pfIsodBID ->setAxisTitle(
"Number of PV", 1);
143 string inputdir =
"Muons/EfficiencyAnalyzer/"+ID_;
144 string numpath_pt = inputdir+
"/passProbes_ID_pt";
145 string denpath_pt = inputdir+
"/allProbes_pt";
150 if (Numerator_pt && Denominator_pt){
151 TH1F *h_numerator_pt = Numerator_pt->
getTH1F();
152 TH1F *h_denominator_pt = Denominator_pt->
getTH1F();
153 TH1F *h_eff_pt = h_eff_pt_ID->getTH1F();
155 if (h_eff_pt->GetSumw2N() == 0) h_eff_pt->Sumw2();
156 h_eff_pt->Divide(h_numerator_pt, h_denominator_pt, 1., 1.,
"B");
160 string numpath_EB_pt = inputdir+
"/passProbes_ID_EB_pt";
161 string denpath_EB_pt = inputdir+
"/allProbes_EB_pt";
166 if (Numerator_EB_pt && Denominator_EB_pt){
167 TH1F *h_numerator_EB_pt = Numerator_EB_pt->
getTH1F();
168 TH1F *h_denominator_EB_pt = Denominator_EB_pt->
getTH1F();
169 TH1F *h_eff_EB_pt = h_eff_pt_EB_ID->getTH1F();
171 if (h_eff_EB_pt->GetSumw2N() == 0) h_eff_EB_pt->Sumw2();
172 h_eff_EB_pt->Divide(h_numerator_EB_pt, h_denominator_EB_pt, 1., 1.,
"B");
176 string numpath_EE_pt = inputdir+
"/passProbes_ID_EE_pt";
177 string denpath_EE_pt = inputdir+
"/allProbes_EE_pt";
182 if (Numerator_EE_pt && Denominator_EE_pt){
183 TH1F *h_numerator_EE_pt = Numerator_EE_pt->
getTH1F();
184 TH1F *h_denominator_EE_pt = Denominator_EE_pt->
getTH1F();
185 TH1F *h_eff_EE_pt = h_eff_pt_EE_ID->getTH1F();
187 if (h_eff_EE_pt->GetSumw2N() == 0) h_eff_EE_pt->Sumw2();
188 h_eff_EE_pt->Divide(h_numerator_EE_pt, h_denominator_EE_pt, 1., 1.,
"B");
192 string numpath_eta = inputdir+
"/passProbes_ID_eta";
193 string denpath_eta = inputdir+
"/allProbes_eta";
198 if (Numerator_eta && Denominator_eta){
200 TH1F *h_numerator_eta = Numerator_eta->
getTH1F();
201 TH1F *h_denominator_eta = Denominator_eta->
getTH1F();
203 TH1F *h_eff_eta = h_eff_eta_ID->getTH1F();
205 if (h_eff_eta->GetSumw2N() == 0) h_eff_eta->Sumw2();
207 h_eff_eta->Divide(h_numerator_eta, h_denominator_eta, 1., 1.,
"B");
213 string numpath_hp_eta = inputdir+
"/passProbes_ID_hp_eta";
214 string denpath_hp_eta = inputdir+
"/allProbes_hp_eta";
219 if (Numerator_hp_eta && Denominator_hp_eta){
221 TH1F *h_numerator_hp_eta = Numerator_hp_eta->
getTH1F();
222 TH1F *h_denominator_hp_eta = Denominator_hp_eta->
getTH1F();
224 TH1F *h_eff_hp_eta = h_eff_hp_eta_ID->getTH1F();
226 if (h_eff_hp_eta->GetSumw2N() == 0) h_eff_hp_eta->Sumw2();
228 h_eff_hp_eta->Divide(h_numerator_hp_eta, h_denominator_hp_eta, 1., 1.,
"B");
234 string numpath_phi = inputdir+
"/passProbes_ID_phi";
235 string denpath_phi = inputdir+
"/allProbes_phi";
240 if (Numerator_phi && Denominator_phi){
242 TH1F *h_numerator_phi = Numerator_phi->
getTH1F();
243 TH1F *h_denominator_phi = Denominator_phi->
getTH1F();
245 TH1F *h_eff_phi = h_eff_phi_ID->getTH1F();
247 if (h_eff_phi->GetSumw2N() == 0) h_eff_phi->Sumw2();
249 h_eff_phi->Divide(h_numerator_phi, h_denominator_phi, 1., 1.,
"B");
255 string numpath_detIso_pt = inputdir+
"/passProbes_detIsoID_pt";
256 string denpath_detIso_pt = inputdir+
"/allProbes_ID_pt";
261 if (Numerator_detIso_pt && Denominator_detIso_pt){
263 TH1F *h_numerator_detIso_pt = Numerator_detIso_pt->
getTH1F();
264 TH1F *h_denominator_detIso_pt = Denominator_detIso_pt->
getTH1F();
266 TH1F *h_eff_detIso_pt = h_eff_pt_detIsoID->getTH1F();
268 if (h_eff_detIso_pt->GetSumw2N() == 0) h_eff_detIso_pt->Sumw2();
269 h_eff_detIso_pt->Divide(h_numerator_detIso_pt, h_denominator_detIso_pt, 1., 1.,
"B");
275 string numpath_detIso_EB_pt = inputdir+
"/passProbes_EB_detIsoID_pt";
276 string denpath_detIso_EB_pt = inputdir+
"/allProbes_EB_ID_pt";
281 if (Numerator_detIso_EB_pt && Denominator_detIso_EB_pt){
283 TH1F *h_numerator_detIso_EB_pt = Numerator_detIso_EB_pt->
getTH1F();
284 TH1F *h_denominator_detIso_EB_pt = Denominator_detIso_EB_pt->
getTH1F();
286 TH1F *h_eff_detIso_EB_pt = h_eff_pt_EB_detIsoID->getTH1F();
288 if (h_eff_detIso_EB_pt->GetSumw2N() == 0) h_eff_detIso_EB_pt->Sumw2();
290 h_eff_detIso_EB_pt->Divide(h_numerator_detIso_EB_pt, h_denominator_detIso_EB_pt, 1., 1.,
"B");
296 string numpath_detIso_EE_pt = inputdir+
"/passProbes_EE_detIsoID_pt";
297 string denpath_detIso_EE_pt = inputdir+
"/allProbes_EE_ID_pt";
302 if (Numerator_detIso_EE_pt && Denominator_detIso_EE_pt){
304 TH1F *h_numerator_detIso_EE_pt = Numerator_detIso_EE_pt->
getTH1F();
305 TH1F *h_denominator_detIso_EE_pt = Denominator_detIso_EE_pt->
getTH1F();
307 TH1F *h_eff_detIso_EE_pt = h_eff_pt_EE_detIsoID->getTH1F();
309 if (h_eff_detIso_EE_pt->GetSumw2N() == 0) h_eff_detIso_EE_pt->Sumw2();
311 h_eff_detIso_EE_pt->Divide(h_numerator_detIso_EE_pt, h_denominator_detIso_EE_pt, 1., 1.,
"B");
317 string numpath_pfIso_pt = inputdir+
"/passProbes_pfIsoID_pt";
318 string denpath_pfIso_pt = inputdir+
"/allProbes_ID_pt";
323 if (Numerator_pfIso_pt && Denominator_pfIso_pt){
325 TH1F *h_numerator_pfIso_pt = Numerator_pfIso_pt->
getTH1F();
326 TH1F *h_denominator_pfIso_pt = Denominator_pfIso_pt->
getTH1F();
328 TH1F *h_eff_pfIso_pt = h_eff_pt_pfIsoID->getTH1F();
330 if (h_eff_pfIso_pt->GetSumw2N() == 0) h_eff_pfIso_pt->Sumw2();
332 h_eff_pfIso_pt->Divide(h_numerator_pfIso_pt, h_denominator_pfIso_pt, 1., 1.,
"B");
338 string numpath_pfIso_EB_pt = inputdir+
"/passProbes_EB_pfIsoID_pt";
339 string denpath_pfIso_EB_pt = inputdir+
"/allProbes_EB_ID_pt";
344 if (Numerator_pfIso_EB_pt && Denominator_pfIso_EB_pt){
346 TH1F *h_numerator_pfIso_EB_pt = Numerator_pfIso_EB_pt->
getTH1F();
347 TH1F *h_denominator_pfIso_EB_pt = Denominator_pfIso_EB_pt->
getTH1F();
349 TH1F *h_eff_pfIso_EB_pt = h_eff_pt_EB_pfIsoID->getTH1F();
351 if (h_eff_pfIso_EB_pt->GetSumw2N() == 0) h_eff_pfIso_EB_pt->Sumw2();
352 h_eff_pfIso_EB_pt->Divide(h_numerator_pfIso_EB_pt, h_denominator_pfIso_EB_pt, 1., 1.,
"B");
358 string numpath_pfIso_EE_pt = inputdir+
"/passProbes_EE_pfIsoID_pt";
359 string denpath_pfIso_EE_pt = inputdir+
"/allProbes_EE_ID_pt";
364 if (Numerator_pfIso_EE_pt && Denominator_pfIso_EE_pt){
366 TH1F *h_numerator_pfIso_EE_pt = Numerator_pfIso_EE_pt->
getTH1F();
367 TH1F *h_denominator_pfIso_EE_pt = Denominator_pfIso_EE_pt->
getTH1F();
369 TH1F *h_eff_pfIso_EE_pt = h_eff_pt_EE_pfIsoID->getTH1F();
371 if (h_eff_pfIso_EE_pt->GetSumw2N() == 0) h_eff_pfIso_EE_pt->Sumw2();
373 h_eff_pfIso_EE_pt->Divide(h_numerator_pfIso_EE_pt, h_denominator_pfIso_EE_pt, 1., 1.,
"B");
380 string numpath_pfIso_nvtx = inputdir+
"/passProbes_pfIsoID_nVtx";
381 string denpath_pfIso_nvtx = inputdir+
"/allProbes_ID_nVtx";
386 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
388 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
389 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
391 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_pfIsoID->getTH1F();
393 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
395 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
402 string numpath_detIso_nvtx = inputdir+
"/passProbes_detIsoID_nVtx";
403 string denpath_detIso_nvtx = inputdir+
"/allProbes_ID_nVtx";
408 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
410 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
411 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
413 TH1F *h_eff_detIso_nvtx = h_eff_vtx_detIsoID->getTH1F();
415 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
417 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
423 numpath_detIso_nvtx = inputdir+
"/passProbes_EB_detIsoID_nVtx";
424 denpath_detIso_nvtx = inputdir+
"/allProbes_EB_ID_nVtx";
426 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
427 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
429 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
430 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
431 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
433 TH1F *h_eff_detIso_nvtx = h_eff_vtx_EB_detIsoID->getTH1F();
435 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
436 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
440 numpath_detIso_nvtx = inputdir+
"/passProbes_EE_detIsoID_nVtx";
441 denpath_detIso_nvtx = inputdir+
"/allProbes_EE_ID_nVtx";
443 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
444 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
446 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
448 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
449 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
451 TH1F *h_eff_detIso_nvtx = h_eff_vtx_EE_detIsoID->getTH1F();
453 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
455 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
461 numpath_pfIso_nvtx = inputdir+
"/passProbes_EB_pfIsoID_nVtx";
462 denpath_pfIso_nvtx = inputdir+
"/allProbes_EB_ID_nVtx";
464 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
465 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
467 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
469 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
470 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
472 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_EB_pfIsoID->getTH1F();
474 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
476 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
480 numpath_pfIso_nvtx = inputdir+
"/passProbes_EE_pfIsoID_nVtx";
481 denpath_pfIso_nvtx = inputdir+
"/allProbes_EE_ID_nVtx";
483 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
484 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
486 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
488 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
489 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
491 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_EE_pfIsoID->getTH1F();
493 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
495 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
502 string numpath_pfIsodB_pt = inputdir+
"/passProbes_pfIsodBID_pt";
503 string denpath_pfIsodB_pt = inputdir+
"/allProbes_ID_pt";
508 if (Numerator_pfIsodB_pt && Denominator_pfIsodB_pt){
510 TH1F *h_numerator_pfIsodB_pt = Numerator_pfIsodB_pt->
getTH1F();
511 TH1F *h_denominator_pfIsodB_pt = Denominator_pfIsodB_pt->
getTH1F();
513 TH1F *h_eff_pfIsodB_pt = h_eff_pt_pfIsodBID->getTH1F();
515 if (h_eff_pfIsodB_pt->GetSumw2N() == 0) h_eff_pfIsodB_pt->Sumw2();
517 h_eff_pfIsodB_pt->Divide(h_numerator_pfIsodB_pt, h_denominator_pfIsodB_pt, 1., 1.,
"B");
523 string numpath_pfIsodB_EB_pt = inputdir+
"/passProbes_EB_pfIsodBID_pt";
524 string denpath_pfIsodB_EB_pt = inputdir+
"/allProbes_EB_ID_pt";
529 if (Numerator_pfIsodB_EB_pt && Denominator_pfIsodB_EB_pt){
531 TH1F *h_numerator_pfIsodB_EB_pt = Numerator_pfIsodB_EB_pt->
getTH1F();
532 TH1F *h_denominator_pfIsodB_EB_pt = Denominator_pfIsodB_EB_pt->
getTH1F();
534 TH1F *h_eff_pfIsodB_EB_pt = h_eff_pt_EB_pfIsodBID->getTH1F();
536 if (h_eff_pfIsodB_EB_pt->GetSumw2N() == 0) h_eff_pfIsodB_EB_pt->Sumw2();
537 h_eff_pfIsodB_EB_pt->Divide(h_numerator_pfIsodB_EB_pt, h_denominator_pfIsodB_EB_pt, 1., 1.,
"B");
543 string numpath_pfIsodB_EE_pt = inputdir+
"/passProbes_EE_pfIsodBID_pt";
544 string denpath_pfIsodB_EE_pt = inputdir+
"/allProbes_EE_ID_pt";
549 if (Numerator_pfIsodB_EE_pt && Denominator_pfIsodB_EE_pt){
551 TH1F *h_numerator_pfIsodB_EE_pt = Numerator_pfIsodB_EE_pt->
getTH1F();
552 TH1F *h_denominator_pfIsodB_EE_pt = Denominator_pfIsodB_EE_pt->
getTH1F();
554 TH1F *h_eff_pfIsodB_EE_pt = h_eff_pt_EE_pfIsodBID->getTH1F();
556 if (h_eff_pfIsodB_EE_pt->GetSumw2N() == 0) h_eff_pfIsodB_EE_pt->Sumw2();
558 h_eff_pfIsodB_EE_pt->Divide(h_numerator_pfIsodB_EE_pt, h_denominator_pfIsodB_EE_pt, 1., 1.,
"B");
565 string numpath_pfIsodB_nvtx = inputdir+
"/passProbes_pfIsodBID_nVtx";
566 string denpath_pfIsodB_nvtx = inputdir+
"/allProbes_ID_nVtx";
571 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
573 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
574 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
576 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_pfIsodBID->getTH1F();
578 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
580 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
586 numpath_pfIsodB_nvtx = inputdir+
"/passProbes_EB_pfIsodBID_nVtx";
587 denpath_pfIsodB_nvtx = inputdir+
"/allProbes_EB_ID_nVtx";
589 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
590 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
592 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
594 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
595 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
597 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_EB_pfIsodBID->getTH1F();
599 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
601 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
606 numpath_pfIsodB_nvtx = inputdir+
"/passProbes_EE_pfIsodBID_nVtx";
607 denpath_pfIsodB_nvtx = inputdir+
"/allProbes_EE_ID_nVtx";
609 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
610 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
612 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
614 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
615 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
617 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_EE_pfIsodBID->getTH1F();
619 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
621 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
MonitorElement * get(const std::string &path)
EfficiencyPlotter(const edm::ParameterSet &ps)
Constructor.
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
DQM Client Diagnostic.
virtual ~EfficiencyPlotter()
Destructor.
MonitorElement * book1D(Args &&...args)
void setCurrentFolder(const std::string &fullpath)
TH1F * getTH1F(void) const
void setEfficiencyFlag(void)