31 cout <<
"EfficiencyPlotter(): Constructor " << endl;
40 cout <<
"EfficiencyPlotter::beginJob " << endl;
43 theDbe->setCurrentFolder(
"Muons/EfficiencyAnalyzer");
46 LogTrace(
metname)<<
"[EfficiencyPlotter] beginJob: Parameters initialization";
49 etaBin =
parameters.getParameter<
int>(
"etaBin");
53 phiBin =
parameters.getParameter<
int>(
"phiBin");
61 vtxBin =
parameters.getParameter<
int>(
"vtxBin");
62 vtxMin =
parameters.getParameter<
double>(
"vtxMin");
63 vtxMax =
parameters.getParameter<
double>(
"vtxMax");
65 h_eff_eta_TightMu = theDbe->book1D(
"Eff_eta_TightMu",
"TightMu Eff. vs #eta", etaBin, etaMin, etaMax);
66 h_eff_hp_eta_TightMu = theDbe->book1D(
"Eff_hp_eta_TightMu",
"High Pt TightMu Eff. vs #eta", etaBin, etaMin, etaMax);
67 h_eff_phi_TightMu = theDbe->book1D(
"Eff_phi_TightMu",
"TightMu Eff. vs #phi", phiBin, phiMin, phiMax);
68 h_eff_pt_TightMu = theDbe->book1D(
"Eff_pt_TightMu",
"TightMu Eff. vs Pt", ptBin, ptMin, ptMax);
69 h_eff_pt_EB_TightMu = theDbe->book1D(
"Eff_pt_EB_TightMu",
"Barrel: TightMu Eff. vs Pt", ptBin, ptMin, ptMax);
70 h_eff_pt_EE_TightMu = theDbe->book1D(
"Eff_pt_EE_TightMu",
"Endcap: TightMu Eff. vs Pt", ptBin, ptMin, ptMax);
71 h_eff_pt_detIsoTightMu = theDbe->book1D(
"Eff_pt_detIsoTightMu",
"detIsoTightMu Efficiency vs Pt", ptBin, ptMin, ptMax);
72 h_eff_pt_EB_detIsoTightMu = theDbe->book1D(
"Eff_pt_EB_detIsoTightMu",
"Barrel: detIsoTightMu Eff. vs Pt", ptBin, ptMin, ptMax);
73 h_eff_pt_EE_detIsoTightMu = theDbe->book1D(
"Eff_pt_EE_detIsoTightMu",
"Endcap: detIsoTightMu Eff. vs Pt", ptBin, ptMin, ptMax);
74 h_eff_pt_pfIsoTightMu = theDbe->book1D(
"Eff_pt_pfIsoTightMu",
"pfIsoTightMu Eff. vs Pt", ptBin, ptMin, ptMax);
75 h_eff_pt_EB_pfIsoTightMu = theDbe->book1D(
"Eff_pt_EB_pfIsoTightMu",
"Barrel: pfIsoTightMu Eff. vs Pt", ptBin, ptMin, ptMax);
76 h_eff_pt_EE_pfIsoTightMu = theDbe->book1D(
"Eff_pt_EE_pfIsoTightMu",
"Endcap: pfIsoTightMu Eff. vs Pt", ptBin, ptMin, ptMax);
77 h_eff_vtx_detIsoTightMu = theDbe->book1D(
"Eff_vtx_detIsoTightMu",
"detIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
78 h_eff_vtx_pfIsoTightMu = theDbe->book1D(
"Eff_vtx_pfIsoTightMu",
"pfIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
79 h_eff_vtx_EB_detIsoTightMu = theDbe->book1D(
"Eff_vtx_EB_detIsoTightMu",
"Barrel: detIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
80 h_eff_vtx_EB_pfIsoTightMu = theDbe->book1D(
"Eff_vtx_EB_pfIsoTightMu",
"Barrel: pfIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
81 h_eff_vtx_EE_detIsoTightMu = theDbe->book1D(
"Eff_vtx_EE_detIsoTightMu",
"Endcap: detIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
82 h_eff_vtx_EE_pfIsoTightMu = theDbe->book1D(
"Eff_vtx_EE_pfIsoTightMu",
"Endcap: pfIsoTightMu Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
84 h_eff_pt_pfIsodBTightMu = theDbe->book1D(
"Eff_pt_pfIsodBTightMu",
"pfIsoTightMu (deltaBeta) Eff. vs Pt", ptBin, ptMin, ptMax);
85 h_eff_pt_EB_pfIsodBTightMu = theDbe->book1D(
"Eff_pt_EB_pfIsodBTightMu",
"Barrel: pfIsoTightMu (deltaBeta) Eff. vs Pt", ptBin, ptMin, ptMax);
86 h_eff_pt_EE_pfIsodBTightMu = theDbe->book1D(
"Eff_pt_EE_pfIsodBTightMu",
"Endcap: pfIsoTightMu (deltaBeta) Eff. vs Pt", ptBin, ptMin, ptMax);
87 h_eff_vtx_pfIsodBTightMu = theDbe->book1D(
"Eff_vtx_pfIsodBTightMu",
"pfIsoTightMu (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
88 h_eff_vtx_EB_pfIsodBTightMu = theDbe->book1D(
"Eff_vtx_EB_pfIsodBTightMu",
"Barrel: pfIsoTightMu (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
89 h_eff_vtx_EE_pfIsodBTightMu = theDbe->book1D(
"Eff_vtx_EE_pfIsodBTightMu",
"Endcap: pfIsoTightMu (deltaBeta) Eff. vs nVtx", vtxBin, vtxMin, vtxMax);
94 h_eff_eta_TightMu ->setEfficiencyFlag();
95 h_eff_hp_eta_TightMu ->setEfficiencyFlag();
96 h_eff_phi_TightMu ->setEfficiencyFlag();
97 h_eff_pt_TightMu ->setEfficiencyFlag();
98 h_eff_pt_EB_TightMu ->setEfficiencyFlag();
99 h_eff_pt_EE_TightMu ->setEfficiencyFlag();
100 h_eff_pt_detIsoTightMu ->setEfficiencyFlag();
101 h_eff_pt_EB_detIsoTightMu ->setEfficiencyFlag();
102 h_eff_pt_EE_detIsoTightMu ->setEfficiencyFlag();
103 h_eff_pt_pfIsoTightMu ->setEfficiencyFlag();
104 h_eff_pt_EB_pfIsoTightMu ->setEfficiencyFlag();
105 h_eff_pt_EE_pfIsoTightMu ->setEfficiencyFlag();
106 h_eff_vtx_detIsoTightMu ->setEfficiencyFlag();
107 h_eff_vtx_pfIsoTightMu ->setEfficiencyFlag();
108 h_eff_vtx_EB_detIsoTightMu->setEfficiencyFlag();
109 h_eff_vtx_EB_pfIsoTightMu ->setEfficiencyFlag();
110 h_eff_vtx_EE_detIsoTightMu->setEfficiencyFlag();
111 h_eff_vtx_EE_pfIsoTightMu ->setEfficiencyFlag();
113 h_eff_pt_pfIsodBTightMu ->setEfficiencyFlag();
114 h_eff_pt_EB_pfIsodBTightMu ->setEfficiencyFlag();
115 h_eff_pt_EE_pfIsodBTightMu ->setEfficiencyFlag();
116 h_eff_vtx_pfIsodBTightMu ->setEfficiencyFlag();
117 h_eff_vtx_EB_pfIsodBTightMu ->setEfficiencyFlag();
118 h_eff_vtx_EE_pfIsodBTightMu ->setEfficiencyFlag();
123 h_eff_hp_eta_TightMu ->setAxisTitle(
"#eta", 1);
124 h_eff_eta_TightMu ->setAxisTitle(
"#eta", 1);
125 h_eff_phi_TightMu ->setAxisTitle(
"#phi", 1);
126 h_eff_pt_TightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
127 h_eff_pt_EB_TightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
128 h_eff_pt_EE_TightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
129 h_eff_pt_detIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
130 h_eff_pt_EB_detIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
131 h_eff_pt_EE_detIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
132 h_eff_pt_pfIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
133 h_eff_pt_EB_pfIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
134 h_eff_pt_EE_pfIsoTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
135 h_eff_vtx_detIsoTightMu ->setAxisTitle(
"Number of PV", 1);
136 h_eff_vtx_pfIsoTightMu ->setAxisTitle(
"Number of PV", 1);
137 h_eff_vtx_EB_detIsoTightMu->setAxisTitle(
"Number of PV", 1);
138 h_eff_vtx_EB_pfIsoTightMu ->setAxisTitle(
"Number of PV", 1);
139 h_eff_vtx_EE_detIsoTightMu->setAxisTitle(
"Number of PV", 1);
140 h_eff_vtx_EE_pfIsoTightMu ->setAxisTitle(
"Number of PV", 1);
142 h_eff_pt_pfIsodBTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
143 h_eff_pt_EB_pfIsodBTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
144 h_eff_pt_EE_pfIsodBTightMu ->setAxisTitle(
"p_{T} (GeV)", 1);
145 h_eff_vtx_pfIsodBTightMu ->setAxisTitle(
"Number of PV", 1);
146 h_eff_vtx_EB_pfIsodBTightMu ->setAxisTitle(
"Number of PV", 1);
147 h_eff_vtx_EE_pfIsodBTightMu ->setAxisTitle(
"Number of PV", 1);
189 LogTrace(
metname)<<
"[EfficiencyPlotter]: endRun, performing the DQM end of run client operation";
193 string numpath_pt =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_pt";
194 string denpath_pt =
"Muons/EfficiencyAnalyzer/allProbes_pt";
199 if (Numerator_pt && Denominator_pt){
200 TH1F *h_numerator_pt = Numerator_pt->
getTH1F();
201 TH1F *h_denominator_pt = Denominator_pt->
getTH1F();
202 TH1F *h_eff_pt = h_eff_pt_TightMu->getTH1F();
204 if (h_eff_pt->GetSumw2N() == 0) h_eff_pt->Sumw2();
205 h_eff_pt->Divide(h_numerator_pt, h_denominator_pt, 1., 1.,
"B");
209 string numpath_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_EB_pt";
210 string denpath_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_pt";
215 if (Numerator_EB_pt && Denominator_EB_pt){
216 TH1F *h_numerator_EB_pt = Numerator_EB_pt->
getTH1F();
217 TH1F *h_denominator_EB_pt = Denominator_EB_pt->
getTH1F();
218 TH1F *h_eff_EB_pt = h_eff_pt_EB_TightMu->getTH1F();
220 if (h_eff_EB_pt->GetSumw2N() == 0) h_eff_EB_pt->Sumw2();
221 h_eff_EB_pt->Divide(h_numerator_EB_pt, h_denominator_EB_pt, 1., 1.,
"B");
225 string numpath_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_EE_pt";
226 string denpath_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_pt";
231 if (Numerator_EE_pt && Denominator_EE_pt){
232 TH1F *h_numerator_EE_pt = Numerator_EE_pt->
getTH1F();
233 TH1F *h_denominator_EE_pt = Denominator_EE_pt->
getTH1F();
234 TH1F *h_eff_EE_pt = h_eff_pt_EE_TightMu->getTH1F();
236 if (h_eff_EE_pt->GetSumw2N() == 0) h_eff_EE_pt->Sumw2();
237 h_eff_EE_pt->Divide(h_numerator_EE_pt, h_denominator_EE_pt, 1., 1.,
"B");
241 string numpath_eta =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_eta";
242 string denpath_eta =
"Muons/EfficiencyAnalyzer/allProbes_eta";
247 if (Numerator_eta && Denominator_eta){
249 TH1F *h_numerator_eta = Numerator_eta->
getTH1F();
250 TH1F *h_denominator_eta = Denominator_eta->
getTH1F();
252 TH1F *h_eff_eta = h_eff_eta_TightMu->getTH1F();
254 if (h_eff_eta->GetSumw2N() == 0) h_eff_eta->Sumw2();
256 h_eff_eta->Divide(h_numerator_eta, h_denominator_eta, 1., 1.,
"B");
262 string numpath_hp_eta =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_hp_eta";
263 string denpath_hp_eta =
"Muons/EfficiencyAnalyzer/allProbes_hp_eta";
268 if (Numerator_hp_eta && Denominator_hp_eta){
270 TH1F *h_numerator_hp_eta = Numerator_hp_eta->
getTH1F();
271 TH1F *h_denominator_hp_eta = Denominator_hp_eta->
getTH1F();
273 TH1F *h_eff_hp_eta = h_eff_hp_eta_TightMu->getTH1F();
275 if (h_eff_hp_eta->GetSumw2N() == 0) h_eff_hp_eta->Sumw2();
277 h_eff_hp_eta->Divide(h_numerator_hp_eta, h_denominator_hp_eta, 1., 1.,
"B");
283 string numpath_phi =
"Muons/EfficiencyAnalyzer/passProbes_TightMu_phi";
284 string denpath_phi =
"Muons/EfficiencyAnalyzer/allProbes_phi";
289 if (Numerator_phi && Denominator_phi){
291 TH1F *h_numerator_phi = Numerator_phi->
getTH1F();
292 TH1F *h_denominator_phi = Denominator_phi->
getTH1F();
294 TH1F *h_eff_phi = h_eff_phi_TightMu->getTH1F();
296 if (h_eff_phi->GetSumw2N() == 0) h_eff_phi->Sumw2();
298 h_eff_phi->Divide(h_numerator_phi, h_denominator_phi, 1., 1.,
"B");
304 string numpath_detIso_pt =
"Muons/EfficiencyAnalyzer/passProbes_detIsoTightMu_pt";
305 string denpath_detIso_pt =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_pt";
307 MonitorElement *Numerator_detIso_pt = theDbe->get(numpath_detIso_pt);
308 MonitorElement *Denominator_detIso_pt = theDbe->get(denpath_detIso_pt);
310 if (Numerator_detIso_pt && Denominator_detIso_pt){
312 TH1F *h_numerator_detIso_pt = Numerator_detIso_pt->
getTH1F();
313 TH1F *h_denominator_detIso_pt = Denominator_detIso_pt->
getTH1F();
315 TH1F *h_eff_detIso_pt = h_eff_pt_detIsoTightMu->getTH1F();
317 if (h_eff_detIso_pt->GetSumw2N() == 0) h_eff_detIso_pt->Sumw2();
318 h_eff_detIso_pt->Divide(h_numerator_detIso_pt, h_denominator_detIso_pt, 1., 1.,
"B");
324 string numpath_detIso_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_EB_detIsoTightMu_pt";
325 string denpath_detIso_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_pt";
327 MonitorElement *Numerator_detIso_EB_pt = theDbe->get(numpath_detIso_EB_pt);
328 MonitorElement *Denominator_detIso_EB_pt = theDbe->get(denpath_detIso_EB_pt);
330 if (Numerator_detIso_EB_pt && Denominator_detIso_EB_pt){
332 TH1F *h_numerator_detIso_EB_pt = Numerator_detIso_EB_pt->
getTH1F();
333 TH1F *h_denominator_detIso_EB_pt = Denominator_detIso_EB_pt->
getTH1F();
335 TH1F *h_eff_detIso_EB_pt = h_eff_pt_EB_detIsoTightMu->getTH1F();
337 if (h_eff_detIso_EB_pt->GetSumw2N() == 0) h_eff_detIso_EB_pt->Sumw2();
339 h_eff_detIso_EB_pt->Divide(h_numerator_detIso_EB_pt, h_denominator_detIso_EB_pt, 1., 1.,
"B");
345 string numpath_detIso_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_EE_detIsoTightMu_pt";
346 string denpath_detIso_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_pt";
348 MonitorElement *Numerator_detIso_EE_pt = theDbe->get(numpath_detIso_EE_pt);
349 MonitorElement *Denominator_detIso_EE_pt = theDbe->get(denpath_detIso_EE_pt);
351 if (Numerator_detIso_EE_pt && Denominator_detIso_EE_pt){
353 TH1F *h_numerator_detIso_EE_pt = Numerator_detIso_EE_pt->
getTH1F();
354 TH1F *h_denominator_detIso_EE_pt = Denominator_detIso_EE_pt->
getTH1F();
356 TH1F *h_eff_detIso_EE_pt = h_eff_pt_EE_detIsoTightMu->getTH1F();
358 if (h_eff_detIso_EE_pt->GetSumw2N() == 0) h_eff_detIso_EE_pt->Sumw2();
360 h_eff_detIso_EE_pt->Divide(h_numerator_detIso_EE_pt, h_denominator_detIso_EE_pt, 1., 1.,
"B");
366 string numpath_pfIso_pt =
"Muons/EfficiencyAnalyzer/passProbes_pfIsoTightMu_pt";
367 string denpath_pfIso_pt =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_pt";
369 MonitorElement *Numerator_pfIso_pt = theDbe->get(numpath_pfIso_pt);
370 MonitorElement *Denominator_pfIso_pt = theDbe->get(denpath_pfIso_pt);
372 if (Numerator_pfIso_pt && Denominator_pfIso_pt){
374 TH1F *h_numerator_pfIso_pt = Numerator_pfIso_pt->
getTH1F();
375 TH1F *h_denominator_pfIso_pt = Denominator_pfIso_pt->
getTH1F();
377 TH1F *h_eff_pfIso_pt = h_eff_pt_pfIsoTightMu->getTH1F();
379 if (h_eff_pfIso_pt->GetSumw2N() == 0) h_eff_pfIso_pt->Sumw2();
381 h_eff_pfIso_pt->Divide(h_numerator_pfIso_pt, h_denominator_pfIso_pt, 1., 1.,
"B");
387 string numpath_pfIso_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsoTightMu_pt";
388 string denpath_pfIso_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_pt";
390 MonitorElement *Numerator_pfIso_EB_pt = theDbe->get(numpath_pfIso_EB_pt);
391 MonitorElement *Denominator_pfIso_EB_pt = theDbe->get(denpath_pfIso_EB_pt);
393 if (Numerator_pfIso_EB_pt && Denominator_pfIso_EB_pt){
395 TH1F *h_numerator_pfIso_EB_pt = Numerator_pfIso_EB_pt->
getTH1F();
396 TH1F *h_denominator_pfIso_EB_pt = Denominator_pfIso_EB_pt->
getTH1F();
398 TH1F *h_eff_pfIso_EB_pt = h_eff_pt_EB_pfIsoTightMu->getTH1F();
400 if (h_eff_pfIso_EB_pt->GetSumw2N() == 0) h_eff_pfIso_EB_pt->Sumw2();
401 h_eff_pfIso_EB_pt->Divide(h_numerator_pfIso_EB_pt, h_denominator_pfIso_EB_pt, 1., 1.,
"B");
407 string numpath_pfIso_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsoTightMu_pt";
408 string denpath_pfIso_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_pt";
410 MonitorElement *Numerator_pfIso_EE_pt = theDbe->get(numpath_pfIso_EE_pt);
411 MonitorElement *Denominator_pfIso_EE_pt = theDbe->get(denpath_pfIso_EE_pt);
413 if (Numerator_pfIso_EE_pt && Denominator_pfIso_EE_pt){
415 TH1F *h_numerator_pfIso_EE_pt = Numerator_pfIso_EE_pt->
getTH1F();
416 TH1F *h_denominator_pfIso_EE_pt = Denominator_pfIso_EE_pt->
getTH1F();
418 TH1F *h_eff_pfIso_EE_pt = h_eff_pt_EE_pfIsoTightMu->getTH1F();
420 if (h_eff_pfIso_EE_pt->GetSumw2N() == 0) h_eff_pfIso_EE_pt->Sumw2();
422 h_eff_pfIso_EE_pt->Divide(h_numerator_pfIso_EE_pt, h_denominator_pfIso_EE_pt, 1., 1.,
"B");
429 string numpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_pfIsoTightMu_nVtx";
430 string denpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_nVtx";
432 MonitorElement *Numerator_pfIso_nvtx = theDbe->get(numpath_pfIso_nvtx);
433 MonitorElement *Denominator_pfIso_nvtx = theDbe->get(denpath_pfIso_nvtx);
435 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
437 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
438 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
440 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_pfIsoTightMu->getTH1F();
442 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
444 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
451 string numpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_detIsoTightMu_nVtx";
452 string denpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_nVtx";
454 MonitorElement *Numerator_detIso_nvtx = theDbe->get(numpath_detIso_nvtx);
455 MonitorElement *Denominator_detIso_nvtx = theDbe->get(denpath_detIso_nvtx);
457 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
459 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
460 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
462 TH1F *h_eff_detIso_nvtx = h_eff_vtx_detIsoTightMu->getTH1F();
464 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
466 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
472 numpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EB_detIsoTightMu_nVtx";
473 denpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_nVtx";
475 Numerator_detIso_nvtx = theDbe->get(numpath_detIso_nvtx);
476 Denominator_detIso_nvtx = theDbe->get(denpath_detIso_nvtx);
478 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
479 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
480 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
482 TH1F *h_eff_detIso_nvtx = h_eff_vtx_EB_detIsoTightMu->getTH1F();
484 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
485 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
489 numpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EE_detIsoTightMu_nVtx";
490 denpath_detIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_nVtx";
492 Numerator_detIso_nvtx = theDbe->get(numpath_detIso_nvtx);
493 Denominator_detIso_nvtx = theDbe->get(denpath_detIso_nvtx);
495 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx){
497 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
498 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
500 TH1F *h_eff_detIso_nvtx = h_eff_vtx_EE_detIsoTightMu->getTH1F();
502 if (h_eff_detIso_nvtx->GetSumw2N() == 0) h_eff_detIso_nvtx->Sumw2();
504 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
510 numpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsoTightMu_nVtx";
511 denpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_nVtx";
513 Numerator_pfIso_nvtx = theDbe->get(numpath_pfIso_nvtx);
514 Denominator_pfIso_nvtx = theDbe->get(denpath_pfIso_nvtx);
516 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
518 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
519 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
521 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_EB_pfIsoTightMu->getTH1F();
523 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
525 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
529 numpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsoTightMu_nVtx";
530 denpath_pfIso_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_nVtx";
532 Numerator_pfIso_nvtx = theDbe->get(numpath_pfIso_nvtx);
533 Denominator_pfIso_nvtx = theDbe->get(denpath_pfIso_nvtx);
535 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx){
537 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
538 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
540 TH1F *h_eff_pfIso_nvtx = h_eff_vtx_EE_pfIsoTightMu->getTH1F();
542 if (h_eff_pfIso_nvtx->GetSumw2N() == 0) h_eff_pfIso_nvtx->Sumw2();
544 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
551 string numpath_pfIsodB_pt =
"Muons/EfficiencyAnalyzer/passProbes_pfIsodBTightMu_pt";
552 string denpath_pfIsodB_pt =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_pt";
554 MonitorElement *Numerator_pfIsodB_pt = theDbe->get(numpath_pfIsodB_pt);
555 MonitorElement *Denominator_pfIsodB_pt = theDbe->get(denpath_pfIsodB_pt);
557 if (Numerator_pfIsodB_pt && Denominator_pfIsodB_pt){
559 TH1F *h_numerator_pfIsodB_pt = Numerator_pfIsodB_pt->
getTH1F();
560 TH1F *h_denominator_pfIsodB_pt = Denominator_pfIsodB_pt->
getTH1F();
562 TH1F *h_eff_pfIsodB_pt = h_eff_pt_pfIsodBTightMu->getTH1F();
564 if (h_eff_pfIsodB_pt->GetSumw2N() == 0) h_eff_pfIsodB_pt->Sumw2();
566 h_eff_pfIsodB_pt->Divide(h_numerator_pfIsodB_pt, h_denominator_pfIsodB_pt, 1., 1.,
"B");
572 string numpath_pfIsodB_EB_pt =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsodBTightMu_pt";
573 string denpath_pfIsodB_EB_pt =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_pt";
575 MonitorElement *Numerator_pfIsodB_EB_pt = theDbe->get(numpath_pfIsodB_EB_pt);
576 MonitorElement *Denominator_pfIsodB_EB_pt = theDbe->get(denpath_pfIsodB_EB_pt);
578 if (Numerator_pfIsodB_EB_pt && Denominator_pfIsodB_EB_pt){
580 TH1F *h_numerator_pfIsodB_EB_pt = Numerator_pfIsodB_EB_pt->
getTH1F();
581 TH1F *h_denominator_pfIsodB_EB_pt = Denominator_pfIsodB_EB_pt->
getTH1F();
583 TH1F *h_eff_pfIsodB_EB_pt = h_eff_pt_EB_pfIsodBTightMu->getTH1F();
585 if (h_eff_pfIsodB_EB_pt->GetSumw2N() == 0) h_eff_pfIsodB_EB_pt->Sumw2();
586 h_eff_pfIsodB_EB_pt->Divide(h_numerator_pfIsodB_EB_pt, h_denominator_pfIsodB_EB_pt, 1., 1.,
"B");
592 string numpath_pfIsodB_EE_pt =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsodBTightMu_pt";
593 string denpath_pfIsodB_EE_pt =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_pt";
595 MonitorElement *Numerator_pfIsodB_EE_pt = theDbe->get(numpath_pfIsodB_EE_pt);
596 MonitorElement *Denominator_pfIsodB_EE_pt = theDbe->get(denpath_pfIsodB_EE_pt);
598 if (Numerator_pfIsodB_EE_pt && Denominator_pfIsodB_EE_pt){
600 TH1F *h_numerator_pfIsodB_EE_pt = Numerator_pfIsodB_EE_pt->
getTH1F();
601 TH1F *h_denominator_pfIsodB_EE_pt = Denominator_pfIsodB_EE_pt->
getTH1F();
603 TH1F *h_eff_pfIsodB_EE_pt = h_eff_pt_EE_pfIsodBTightMu->getTH1F();
605 if (h_eff_pfIsodB_EE_pt->GetSumw2N() == 0) h_eff_pfIsodB_EE_pt->Sumw2();
607 h_eff_pfIsodB_EE_pt->Divide(h_numerator_pfIsodB_EE_pt, h_denominator_pfIsodB_EE_pt, 1., 1.,
"B");
614 string numpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_pfIsodBTightMu_nVtx";
615 string denpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_TightMu_nVtx";
617 MonitorElement *Numerator_pfIsodB_nvtx = theDbe->get(numpath_pfIsodB_nvtx);
618 MonitorElement *Denominator_pfIsodB_nvtx = theDbe->get(denpath_pfIsodB_nvtx);
620 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
622 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
623 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
625 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_pfIsodBTightMu->getTH1F();
627 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
629 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
635 numpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EB_pfIsodBTightMu_nVtx";
636 denpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EB_TightMu_nVtx";
638 Numerator_pfIsodB_nvtx = theDbe->get(numpath_pfIsodB_nvtx);
639 Denominator_pfIsodB_nvtx = theDbe->get(denpath_pfIsodB_nvtx);
641 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
643 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
644 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
646 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_EB_pfIsodBTightMu->getTH1F();
648 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
650 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
655 numpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/passProbes_EE_pfIsodBTightMu_nVtx";
656 denpath_pfIsodB_nvtx =
"Muons/EfficiencyAnalyzer/allProbes_EE_TightMu_nVtx";
658 Numerator_pfIsodB_nvtx = theDbe->get(numpath_pfIsodB_nvtx);
659 Denominator_pfIsodB_nvtx = theDbe->get(denpath_pfIsodB_nvtx);
661 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx){
663 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
664 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
666 TH1F *h_eff_pfIsodB_nvtx = h_eff_vtx_EE_pfIsodBTightMu->getTH1F();
668 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0) h_eff_pfIsodB_nvtx->Sumw2();
670 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
680 theDbe->rmdir(
"Muons/EfficiencyAnalyzer");
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
DQM Client Diagnostic.
LuminosityBlockID id() const
const std::string metname
EfficiencyPlotter(const edm::ParameterSet &ps)
Constructor.
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
virtual ~EfficiencyPlotter()
Destructor.
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
TH1F * getTH1F(void) const
void beginJob(void)
BeginJob.
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
LuminosityBlockNumber_t luminosityBlock() const