31 cout <<
"EfficiencyPlotter(): Constructor " << endl;
35 etaBin =
parameters.getParameter<
int>(
"etaBin");
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");
59 h_eff_eta_TightMu = ibooker.
book1D(
"Eff_eta_TightMu",
"TightMu Eff. vs #eta", etaBin,
etaMin,
etaMax);
60 h_eff_hp_eta_TightMu = ibooker.
book1D(
"Eff_hp_eta_TightMu",
"High Pt TightMu Eff. vs #eta", etaBin,
etaMin,
etaMax);
61 h_eff_phi_TightMu = ibooker.
book1D(
"Eff_phi_TightMu",
"TightMu Eff. vs #phi", phiBin, phiMin, phiMax);
62 h_eff_pt_TightMu = ibooker.
book1D(
"Eff_pt_TightMu",
"TightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
63 h_eff_pt_EB_TightMu = ibooker.
book1D(
"Eff_pt_EB_TightMu",
"Barrel: TightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
64 h_eff_pt_EE_TightMu = ibooker.
book1D(
"Eff_pt_EE_TightMu",
"Endcap: TightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
65 h_eff_pt_detIsoTightMu = ibooker.
book1D(
"Eff_pt_detIsoTightMu",
"detIsoTightMu Efficiency vs Pt", ptBin,
ptMin, ptMax);
66 h_eff_pt_EB_detIsoTightMu = ibooker.
book1D(
"Eff_pt_EB_detIsoTightMu",
"Barrel: detIsoTightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
67 h_eff_pt_EE_detIsoTightMu = ibooker.
book1D(
"Eff_pt_EE_detIsoTightMu",
"Endcap: detIsoTightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
68 h_eff_pt_pfIsoTightMu = ibooker.
book1D(
"Eff_pt_pfIsoTightMu",
"pfIsoTightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
69 h_eff_pt_EB_pfIsoTightMu = ibooker.
book1D(
"Eff_pt_EB_pfIsoTightMu",
"Barrel: pfIsoTightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
70 h_eff_pt_EE_pfIsoTightMu = ibooker.
book1D(
"Eff_pt_EE_pfIsoTightMu",
"Endcap: pfIsoTightMu Eff. vs Pt", ptBin,
ptMin, ptMax);
71 h_eff_vtx_detIsoTightMu = ibooker.
book1D(
"Eff_vtx_detIsoTightMu",
"detIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
72 h_eff_vtx_pfIsoTightMu = ibooker.
book1D(
"Eff_vtx_pfIsoTightMu",
"pfIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
73 h_eff_vtx_EB_detIsoTightMu = ibooker.
book1D(
"Eff_vtx_EB_detIsoTightMu",
"Barrel: detIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
74 h_eff_vtx_EB_pfIsoTightMu = ibooker.
book1D(
"Eff_vtx_EB_pfIsoTightMu",
"Barrel: pfIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
75 h_eff_vtx_EE_detIsoTightMu = ibooker.
book1D(
"Eff_vtx_EE_detIsoTightMu",
"Endcap: detIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
76 h_eff_vtx_EE_pfIsoTightMu = ibooker.
book1D(
"Eff_vtx_EE_pfIsoTightMu",
"Endcap: pfIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
78 h_eff_pt_pfIsodBTightMu = ibooker.
book1D(
"Eff_pt_pfIsodBTightMu",
"pfIsoTightMu (deltaBeta) Eff. vs Pt", ptBin,
ptMin, ptMax);
79 h_eff_pt_EB_pfIsodBTightMu = ibooker.
book1D(
"Eff_pt_EB_pfIsodBTightMu",
"Barrel: pfIsoTightMu (deltaBeta) Eff. vs Pt", ptBin,
ptMin, ptMax);
80 h_eff_pt_EE_pfIsodBTightMu = ibooker.
book1D(
"Eff_pt_EE_pfIsodBTightMu",
"Endcap: pfIsoTightMu (deltaBeta) Eff. vs Pt", ptBin,
ptMin, ptMax);
81 h_eff_vtx_pfIsodBTightMu = ibooker.
book1D(
"Eff_vtx_pfIsodBTightMu",
"pfIsoTightMu (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
82 h_eff_vtx_EB_pfIsodBTightMu = ibooker.
book1D(
"Eff_vtx_EB_pfIsodBTightMu",
"Barrel: pfIsoTightMu (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
83 h_eff_vtx_EE_pfIsodBTightMu = ibooker.
book1D(
"Eff_vtx_EE_pfIsodBTightMu",
"Endcap: pfIsoTightMu (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
89 h_eff_hp_eta_TightMu ->setEfficiencyFlag();
90 h_eff_phi_TightMu ->setEfficiencyFlag();
91 h_eff_pt_TightMu ->setEfficiencyFlag();
92 h_eff_pt_EB_TightMu ->setEfficiencyFlag();
93 h_eff_pt_EE_TightMu ->setEfficiencyFlag();
94 h_eff_pt_detIsoTightMu ->setEfficiencyFlag();
95 h_eff_pt_EB_detIsoTightMu ->setEfficiencyFlag();
96 h_eff_pt_EE_detIsoTightMu ->setEfficiencyFlag();
97 h_eff_pt_pfIsoTightMu ->setEfficiencyFlag();
98 h_eff_pt_EB_pfIsoTightMu ->setEfficiencyFlag();
99 h_eff_pt_EE_pfIsoTightMu ->setEfficiencyFlag();
100 h_eff_vtx_detIsoTightMu ->setEfficiencyFlag();
101 h_eff_vtx_pfIsoTightMu ->setEfficiencyFlag();
102 h_eff_vtx_EB_detIsoTightMu->setEfficiencyFlag();
103 h_eff_vtx_EB_pfIsoTightMu ->setEfficiencyFlag();
104 h_eff_vtx_EE_detIsoTightMu->setEfficiencyFlag();
105 h_eff_vtx_EE_pfIsoTightMu ->setEfficiencyFlag();
107 h_eff_pt_pfIsodBTightMu ->setEfficiencyFlag();
108 h_eff_pt_EB_pfIsodBTightMu ->setEfficiencyFlag();
109 h_eff_pt_EE_pfIsodBTightMu ->setEfficiencyFlag();
110 h_eff_vtx_pfIsodBTightMu ->setEfficiencyFlag();
111 h_eff_vtx_EB_pfIsodBTightMu ->setEfficiencyFlag();
112 h_eff_vtx_EE_pfIsodBTightMu ->setEfficiencyFlag();
117 h_eff_hp_eta_TightMu ->setAxisTitle(
"#eta", 1);
118 h_eff_eta_TightMu ->setAxisTitle(
"#eta", 1);
119 h_eff_phi_TightMu ->setAxisTitle(
"#phi", 1);
120 h_eff_pt_TightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
121 h_eff_pt_EB_TightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
122 h_eff_pt_EE_TightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
123 h_eff_pt_detIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
124 h_eff_pt_EB_detIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
125 h_eff_pt_EE_detIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
126 h_eff_pt_pfIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
127 h_eff_pt_EB_pfIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
128 h_eff_pt_EE_pfIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
129 h_eff_vtx_detIsoTightMu ->setAxisTitle(
"Number of PV", 1);
130 h_eff_vtx_pfIsoTightMu ->setAxisTitle(
"Number of PV", 1);
131 h_eff_vtx_EB_detIsoTightMu->setAxisTitle(
"Number of PV", 1);
132 h_eff_vtx_EB_pfIsoTightMu ->setAxisTitle(
"Number of PV", 1);
133 h_eff_vtx_EE_detIsoTightMu->setAxisTitle(
"Number of PV", 1);
134 h_eff_vtx_EE_pfIsoTightMu ->setAxisTitle(
"Number of PV", 1);
136 h_eff_pt_pfIsodBTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
137 h_eff_pt_EB_pfIsodBTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
138 h_eff_pt_EE_pfIsodBTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
139 h_eff_vtx_pfIsodBTightMu ->setAxisTitle(
"Number of PV", 1);
140 h_eff_vtx_EB_pfIsodBTightMu ->setAxisTitle(
"Number of PV", 1);
141 h_eff_vtx_EE_pfIsodBTightMu ->setAxisTitle(
"Number of PV", 1);
145 string numpath_pt =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_pt";
146 string denpath_pt =
"Muons/EfficiencyAnalyzer/allProbes_pt";
151 if (Numerator_pt && Denominator_pt){
152 TH1F *h_numerator_pt = Numerator_pt->
getTH1F();
153 TH1F *h_denominator_pt = Denominator_pt->
getTH1F();
154 TH1F *h_eff_pt = h_eff_pt_TightMu->getTH1F();
156 if (h_eff_pt->GetSumw2N() == 0) h_eff_pt->Sumw2();
157 h_eff_pt->Divide(h_numerator_pt, h_denominator_pt, 1., 1.,
"B");
161 string numpath_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_EB_pt";
162 string denpath_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_pt";
167 if (Numerator_EB_pt && Denominator_EB_pt){
168 TH1F *h_numerator_EB_pt = Numerator_EB_pt->
getTH1F();
169 TH1F *h_denominator_EB_pt = Denominator_EB_pt->
getTH1F();
170 TH1F *h_eff_EB_pt = h_eff_pt_EB_TightMu->getTH1F();
172 if (h_eff_EB_pt->GetSumw2N() == 0) h_eff_EB_pt->Sumw2();
173 h_eff_EB_pt->Divide(h_numerator_EB_pt, h_denominator_EB_pt, 1., 1.,
"B");
177 string numpath_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_EE_pt";
178 string denpath_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_pt";
183 if (Numerator_EE_pt && Denominator_EE_pt){
184 TH1F *h_numerator_EE_pt = Numerator_EE_pt->
getTH1F();
185 TH1F *h_denominator_EE_pt = Denominator_EE_pt->
getTH1F();
186 TH1F *h_eff_EE_pt = h_eff_pt_EE_TightMu->getTH1F();
188 if (h_eff_EE_pt->GetSumw2N() == 0) h_eff_EE_pt->Sumw2();
189 h_eff_EE_pt->Divide(h_numerator_EE_pt, h_denominator_EE_pt, 1., 1.,
"B");
193 string numpath_eta =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_eta";
194 string denpath_eta =
"Muons/EfficiencyAnalyzer/allProbes_eta";
199 if (Numerator_eta && Denominator_eta){
201 TH1F *h_numerator_eta = Numerator_eta->
getTH1F();
202 TH1F *h_denominator_eta = Denominator_eta->
getTH1F();
204 TH1F *h_eff_eta = h_eff_eta_TightMu->getTH1F();
206 if (h_eff_eta->GetSumw2N() == 0) h_eff_eta->Sumw2();
208 h_eff_eta->Divide(h_numerator_eta, h_denominator_eta, 1., 1.,
"B");
214 string numpath_hp_eta =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_hp_eta";
215 string denpath_hp_eta =
"Muons/EfficiencyAnalyzer/allProbes_hp_eta";
220 if (Numerator_hp_eta && Denominator_hp_eta){
222 TH1F *h_numerator_hp_eta = Numerator_hp_eta->
getTH1F();
223 TH1F *h_denominator_hp_eta = Denominator_hp_eta->
getTH1F();
225 TH1F *h_eff_hp_eta = h_eff_hp_eta_TightMu->getTH1F();
227 if (h_eff_hp_eta->GetSumw2N() == 0) h_eff_hp_eta->Sumw2();
229 h_eff_hp_eta->Divide(h_numerator_hp_eta, h_denominator_hp_eta, 1., 1.,
"B");
235 string numpath_phi =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_phi";
236 string denpath_phi =
"Muons/EfficiencyAnalyzer/allProbes_phi";
241 if (Numerator_phi && Denominator_phi){
243 TH1F *h_numerator_phi = Numerator_phi->
getTH1F();
244 TH1F *h_denominator_phi = Denominator_phi->
getTH1F();
246 TH1F *h_eff_phi = h_eff_phi_TightMu->getTH1F();
248 if (h_eff_phi->GetSumw2N() == 0) h_eff_phi->Sumw2();
250 h_eff_phi->Divide(h_numerator_phi, h_denominator_phi, 1., 1.,
"B");
256 string numpath_detIso_pt =
"Muons/EfficiencyAnalyzer/passProbes_detIsoTightMu_pt";
257 string denpath_detIso_pt =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_pt";
262 if (Numerator_detIso_pt && Denominator_detIso_pt){
264 TH1F *h_numerator_detIso_pt = Numerator_detIso_pt->
getTH1F();
265 TH1F *h_denominator_detIso_pt = Denominator_detIso_pt->
getTH1F();
267 TH1F *h_eff_detIso_pt = h_eff_pt_detIsoTightMu->getTH1F();
269 if (h_eff_detIso_pt->GetSumw2N() == 0) h_eff_detIso_pt->Sumw2();
270 h_eff_detIso_pt->Divide(h_numerator_detIso_pt, h_denominator_detIso_pt, 1., 1.,
"B");
276 string numpath_detIso_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_EB_detIsoTightMu_pt";
277 string denpath_detIso_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_pt";
282 if (Numerator_detIso_EB_pt && Denominator_detIso_EB_pt){
284 TH1F *h_numerator_detIso_EB_pt = Numerator_detIso_EB_pt->
getTH1F();
285 TH1F *h_denominator_detIso_EB_pt = Denominator_detIso_EB_pt->
getTH1F();
287 TH1F *h_eff_detIso_EB_pt = h_eff_pt_EB_detIsoTightMu->getTH1F();
289 if (h_eff_detIso_EB_pt->GetSumw2N() == 0) h_eff_detIso_EB_pt->Sumw2();
291 h_eff_detIso_EB_pt->Divide(h_numerator_detIso_EB_pt, h_denominator_detIso_EB_pt, 1., 1.,
"B");
297 string numpath_detIso_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_EE_detIsoTightMu_pt";
298 string denpath_detIso_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_pt";
303 if (Numerator_detIso_EE_pt && Denominator_detIso_EE_pt){
305 TH1F *h_numerator_detIso_EE_pt = Numerator_detIso_EE_pt->
getTH1F();
306 TH1F *h_denominator_detIso_EE_pt = Denominator_detIso_EE_pt->
getTH1F();
308 TH1F *h_eff_detIso_EE_pt = h_eff_pt_EE_detIsoTightMu->getTH1F();
310 if (h_eff_detIso_EE_pt->GetSumw2N() == 0) h_eff_detIso_EE_pt->Sumw2();
312 h_eff_detIso_EE_pt->Divide(h_numerator_detIso_EE_pt, h_denominator_detIso_EE_pt, 1., 1.,
"B");
318 string numpath_pfIso_pt =
"Muons/EfficiencyAnalyzer/passProbes_pfIsoTightMu_pt";
319 string denpath_pfIso_pt =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_pt";
324 if (Numerator_pfIso_pt && Denominator_pfIso_pt){
326 TH1F *h_numerator_pfIso_pt = Numerator_pfIso_pt->
getTH1F();
327 TH1F *h_denominator_pfIso_pt = Denominator_pfIso_pt->
getTH1F();
329 TH1F *h_eff_pfIso_pt = h_eff_pt_pfIsoTightMu->getTH1F();
331 if (h_eff_pfIso_pt->GetSumw2N() == 0) h_eff_pfIso_pt->Sumw2();
333 h_eff_pfIso_pt->Divide(h_numerator_pfIso_pt, h_denominator_pfIso_pt, 1., 1.,
"B");
339 string numpath_pfIso_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsoTightMu_pt";
340 string denpath_pfIso_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_pt";
345 if (Numerator_pfIso_EB_pt && Denominator_pfIso_EB_pt){
347 TH1F *h_numerator_pfIso_EB_pt = Numerator_pfIso_EB_pt->
getTH1F();
348 TH1F *h_denominator_pfIso_EB_pt = Denominator_pfIso_EB_pt->
getTH1F();
350 TH1F *h_eff_pfIso_EB_pt = h_eff_pt_EB_pfIsoTightMu->getTH1F();
352 if (h_eff_pfIso_EB_pt->GetSumw2N() == 0) h_eff_pfIso_EB_pt->Sumw2();
353 h_eff_pfIso_EB_pt->Divide(h_numerator_pfIso_EB_pt, h_denominator_pfIso_EB_pt, 1., 1.,
"B");
359 string numpath_pfIso_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsoTightMu_pt";
360 string denpath_pfIso_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_pt";
365 if (Numerator_pfIso_EE_pt && Denominator_pfIso_EE_pt){
367 TH1F *h_numerator_pfIso_EE_pt = Numerator_pfIso_EE_pt->
getTH1F();
368 TH1F *h_denominator_pfIso_EE_pt = Denominator_pfIso_EE_pt->
getTH1F();
370 TH1F *h_eff_pfIso_EE_pt = h_eff_pt_EE_pfIsoTightMu->getTH1F();
372 if (h_eff_pfIso_EE_pt->GetSumw2N() == 0) h_eff_pfIso_EE_pt->Sumw2();
374 h_eff_pfIso_EE_pt->Divide(h_numerator_pfIso_EE_pt, h_denominator_pfIso_EE_pt, 1., 1.,
"B");
381 string numpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_pfIsoTightMu_nVtx";
382 string denpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_nVtx";
387 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
389 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
390 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
392 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_pfIsoTightMu->getTH1F();
394 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
396 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
403 string numpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_detIsoTightMu_nVtx";
404 string denpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_nVtx";
409 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
411 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
412 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
414 TH1F *h_eff_detIso_nvtx = h_eff_vtx_detIsoTightMu->getTH1F();
416 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
418 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
424 numpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EB_detIsoTightMu_nVtx";
425 denpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_nVtx";
427 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
428 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
430 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
431 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
432 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
434 TH1F *h_eff_detIso_nvtx = h_eff_vtx_EB_detIsoTightMu->getTH1F();
436 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
437 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
441 numpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EE_detIsoTightMu_nVtx";
442 denpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_nVtx";
444 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
445 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
447 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
449 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
450 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
452 TH1F *h_eff_detIso_nvtx = h_eff_vtx_EE_detIsoTightMu->getTH1F();
454 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
456 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
462 numpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsoTightMu_nVtx";
463 denpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_nVtx";
465 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
466 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
468 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
470 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
471 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
473 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_EB_pfIsoTightMu->getTH1F();
475 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
477 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
481 numpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsoTightMu_nVtx";
482 denpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_nVtx";
484 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
485 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
487 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
489 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
490 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
492 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_EE_pfIsoTightMu->getTH1F();
494 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
496 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
503 string numpath_pfIsodB_pt =
"Muons/EfficiencyAnalyzer/passProbes_pfIsodBTightMu_pt";
504 string denpath_pfIsodB_pt =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_pt";
509 if (Numerator_pfIsodB_pt && Denominator_pfIsodB_pt){
511 TH1F *h_numerator_pfIsodB_pt = Numerator_pfIsodB_pt->
getTH1F();
512 TH1F *h_denominator_pfIsodB_pt = Denominator_pfIsodB_pt->
getTH1F();
514 TH1F *h_eff_pfIsodB_pt = h_eff_pt_pfIsodBTightMu->getTH1F();
516 if (h_eff_pfIsodB_pt->GetSumw2N() == 0) h_eff_pfIsodB_pt->Sumw2();
518 h_eff_pfIsodB_pt->Divide(h_numerator_pfIsodB_pt, h_denominator_pfIsodB_pt, 1., 1.,
"B");
524 string numpath_pfIsodB_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsodBTightMu_pt";
525 string denpath_pfIsodB_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_pt";
530 if (Numerator_pfIsodB_EB_pt && Denominator_pfIsodB_EB_pt){
532 TH1F *h_numerator_pfIsodB_EB_pt = Numerator_pfIsodB_EB_pt->
getTH1F();
533 TH1F *h_denominator_pfIsodB_EB_pt = Denominator_pfIsodB_EB_pt->
getTH1F();
535 TH1F *h_eff_pfIsodB_EB_pt = h_eff_pt_EB_pfIsodBTightMu->getTH1F();
537 if (h_eff_pfIsodB_EB_pt->GetSumw2N() == 0) h_eff_pfIsodB_EB_pt->Sumw2();
538 h_eff_pfIsodB_EB_pt->Divide(h_numerator_pfIsodB_EB_pt, h_denominator_pfIsodB_EB_pt, 1., 1.,
"B");
544 string numpath_pfIsodB_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsodBTightMu_pt";
545 string denpath_pfIsodB_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_pt";
550 if (Numerator_pfIsodB_EE_pt && Denominator_pfIsodB_EE_pt){
552 TH1F *h_numerator_pfIsodB_EE_pt = Numerator_pfIsodB_EE_pt->
getTH1F();
553 TH1F *h_denominator_pfIsodB_EE_pt = Denominator_pfIsodB_EE_pt->
getTH1F();
555 TH1F *h_eff_pfIsodB_EE_pt = h_eff_pt_EE_pfIsodBTightMu->getTH1F();
557 if (h_eff_pfIsodB_EE_pt->GetSumw2N() == 0) h_eff_pfIsodB_EE_pt->Sumw2();
559 h_eff_pfIsodB_EE_pt->Divide(h_numerator_pfIsodB_EE_pt, h_denominator_pfIsodB_EE_pt, 1., 1.,
"B");
566 string numpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_pfIsodBTightMu_nVtx";
567 string denpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_nVtx";
572 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
574 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
575 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
577 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_pfIsodBTightMu->getTH1F();
579 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
581 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
587 numpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsodBTightMu_nVtx";
588 denpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_nVtx";
590 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
591 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
593 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
595 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
596 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
598 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_EB_pfIsodBTightMu->getTH1F();
600 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
602 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
607 numpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsodBTightMu_nVtx";
608 denpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_nVtx";
610 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
611 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
613 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
615 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
616 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
618 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_EE_pfIsodBTightMu->getTH1F();
620 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
622 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)