163 string inputdir =
"Muons/EfficiencyAnalyzer/" +
ID_;
164 string numpath_pt = inputdir +
"/passProbes_ID_pt";
165 string denpath_pt = inputdir +
"/allProbes_pt";
170 if (Numerator_pt && Denominator_pt) {
171 TH1F *h_numerator_pt = Numerator_pt->
getTH1F();
172 TH1F *h_denominator_pt = Denominator_pt->
getTH1F();
175 if (h_eff_pt->GetSumw2N() == 0)
177 h_eff_pt->Divide(h_numerator_pt, h_denominator_pt, 1., 1.,
"B");
181 string numpath_inner_pt = inputdir +
"/passProbes_ID_inner_pt";
182 string denpath_inner_pt = inputdir +
"/allProbes_inner_pt";
187 if (Numerator_inner_pt && Denominator_inner_pt) {
188 TH1F *h_numerator_inner_pt = Numerator_inner_pt->
getTH1F();
189 TH1F *h_denominator_inner_pt = Denominator_inner_pt->
getTH1F();
192 if (h_eff_inner_pt->GetSumw2N() == 0)
193 h_eff_inner_pt->Sumw2();
194 h_eff_inner_pt->Divide(h_numerator_inner_pt, h_denominator_inner_pt, 1., 1.,
"B");
198 string numpath_inner_eta = inputdir +
"/passProbes_ID_inner_eta";
199 string denpath_inner_eta = inputdir +
"/allProbes_inner_eta";
204 if (Numerator_inner_eta && Denominator_inner_eta) {
205 TH1F *h_numerator_inner_eta = Numerator_inner_eta->
getTH1F();
206 TH1F *h_denominator_inner_eta = Denominator_inner_eta->
getTH1F();
209 if (h_eff_inner_eta->GetSumw2N() == 0)
210 h_eff_inner_eta->Sumw2();
211 h_eff_inner_eta->Divide(h_numerator_inner_eta, h_denominator_inner_eta, 1., 1.,
"B");
215 string numpath_inner_phi = inputdir +
"/passProbes_ID_inner_phi";
216 string denpath_inner_phi = inputdir +
"/allProbes_inner_phi";
221 if (Numerator_inner_phi && Denominator_inner_phi) {
222 TH1F *h_numerator_inner_phi = Numerator_inner_phi->
getTH1F();
223 TH1F *h_denominator_inner_phi = Denominator_inner_phi->
getTH1F();
226 if (h_eff_inner_phi->GetSumw2N() == 0)
227 h_eff_inner_phi->Sumw2();
228 h_eff_inner_phi->Divide(h_numerator_inner_phi, h_denominator_inner_phi, 1., 1.,
"B");
232 string numpath_EB_pt = inputdir +
"/passProbes_ID_EB_pt";
233 string denpath_EB_pt = inputdir +
"/allProbes_EB_pt";
238 if (Numerator_EB_pt && Denominator_EB_pt) {
239 TH1F *h_numerator_EB_pt = Numerator_EB_pt->
getTH1F();
240 TH1F *h_denominator_EB_pt = Denominator_EB_pt->
getTH1F();
243 if (h_eff_EB_pt->GetSumw2N() == 0)
244 h_eff_EB_pt->Sumw2();
245 h_eff_EB_pt->Divide(h_numerator_EB_pt, h_denominator_EB_pt, 1., 1.,
"B");
249 string numpath_EE_pt = inputdir +
"/passProbes_ID_EE_pt";
250 string denpath_EE_pt = inputdir +
"/allProbes_EE_pt";
255 if (Numerator_EE_pt && Denominator_EE_pt) {
256 TH1F *h_numerator_EE_pt = Numerator_EE_pt->
getTH1F();
257 TH1F *h_denominator_EE_pt = Denominator_EE_pt->
getTH1F();
260 if (h_eff_EE_pt->GetSumw2N() == 0)
261 h_eff_EE_pt->Sumw2();
262 h_eff_EE_pt->Divide(h_numerator_EE_pt, h_denominator_EE_pt, 1., 1.,
"B");
266 string numpath_eta = inputdir +
"/passProbes_ID_eta";
267 string denpath_eta = inputdir +
"/allProbes_eta";
272 if (Numerator_eta && Denominator_eta) {
273 TH1F *h_numerator_eta = Numerator_eta->
getTH1F();
274 TH1F *h_denominator_eta = Denominator_eta->
getTH1F();
278 if (h_eff_eta->GetSumw2N() == 0)
281 h_eff_eta->Divide(h_numerator_eta, h_denominator_eta, 1., 1.,
"B");
286 string numpath_hp_eta = inputdir +
"/passProbes_ID_hp_eta";
287 string denpath_hp_eta = inputdir +
"/allProbes_hp_eta";
292 if (Numerator_hp_eta && Denominator_hp_eta) {
293 TH1F *h_numerator_hp_eta = Numerator_hp_eta->
getTH1F();
294 TH1F *h_denominator_hp_eta = Denominator_hp_eta->
getTH1F();
298 if (h_eff_hp_eta->GetSumw2N() == 0)
299 h_eff_hp_eta->Sumw2();
301 h_eff_hp_eta->Divide(h_numerator_hp_eta, h_denominator_hp_eta, 1., 1.,
"B");
306 string numpath_phi = inputdir +
"/passProbes_ID_phi";
307 string denpath_phi = inputdir +
"/allProbes_phi";
312 if (Numerator_phi && Denominator_phi) {
313 TH1F *h_numerator_phi = Numerator_phi->
getTH1F();
314 TH1F *h_denominator_phi = Denominator_phi->
getTH1F();
318 if (h_eff_phi->GetSumw2N() == 0)
321 h_eff_phi->Divide(h_numerator_phi, h_denominator_phi, 1., 1.,
"B");
325 string numpath_detIso_pt = inputdir +
"/passProbes_detIsoID_pt";
326 string denpath_detIso_pt = inputdir +
"/allProbes_ID_pt";
331 if (Numerator_detIso_pt && Denominator_detIso_pt) {
332 TH1F *h_numerator_detIso_pt = Numerator_detIso_pt->
getTH1F();
333 TH1F *h_denominator_detIso_pt = Denominator_detIso_pt->
getTH1F();
337 if (h_eff_detIso_pt->GetSumw2N() == 0)
338 h_eff_detIso_pt->Sumw2();
339 h_eff_detIso_pt->Divide(h_numerator_detIso_pt, h_denominator_detIso_pt, 1., 1.,
"B");
343 string numpath_detIso_EB_pt = inputdir +
"/passProbes_EB_detIsoID_pt";
344 string denpath_detIso_EB_pt = inputdir +
"/allProbes_EB_ID_pt";
349 if (Numerator_detIso_EB_pt && Denominator_detIso_EB_pt) {
350 TH1F *h_numerator_detIso_EB_pt = Numerator_detIso_EB_pt->
getTH1F();
351 TH1F *h_denominator_detIso_EB_pt = Denominator_detIso_EB_pt->
getTH1F();
355 if (h_eff_detIso_EB_pt->GetSumw2N() == 0)
356 h_eff_detIso_EB_pt->Sumw2();
358 h_eff_detIso_EB_pt->Divide(h_numerator_detIso_EB_pt, h_denominator_detIso_EB_pt, 1., 1.,
"B");
362 string numpath_detIso_EE_pt = inputdir +
"/passProbes_EE_detIsoID_pt";
363 string denpath_detIso_EE_pt = inputdir +
"/allProbes_EE_ID_pt";
368 if (Numerator_detIso_EE_pt && Denominator_detIso_EE_pt) {
369 TH1F *h_numerator_detIso_EE_pt = Numerator_detIso_EE_pt->
getTH1F();
370 TH1F *h_denominator_detIso_EE_pt = Denominator_detIso_EE_pt->
getTH1F();
374 if (h_eff_detIso_EE_pt->GetSumw2N() == 0)
375 h_eff_detIso_EE_pt->Sumw2();
377 h_eff_detIso_EE_pt->Divide(h_numerator_detIso_EE_pt, h_denominator_detIso_EE_pt, 1., 1.,
"B");
381 string numpath_pfIso_pt = inputdir +
"/passProbes_pfIsoID_pt";
382 string denpath_pfIso_pt = inputdir +
"/allProbes_ID_pt";
387 if (Numerator_pfIso_pt && Denominator_pfIso_pt) {
388 TH1F *h_numerator_pfIso_pt = Numerator_pfIso_pt->
getTH1F();
389 TH1F *h_denominator_pfIso_pt = Denominator_pfIso_pt->
getTH1F();
393 if (h_eff_pfIso_pt->GetSumw2N() == 0)
394 h_eff_pfIso_pt->Sumw2();
396 h_eff_pfIso_pt->Divide(h_numerator_pfIso_pt, h_denominator_pfIso_pt, 1., 1.,
"B");
401 string numpath_pfIso_EB_pt = inputdir +
"/passProbes_EB_pfIsoID_pt";
402 string denpath_pfIso_EB_pt = inputdir +
"/allProbes_EB_ID_pt";
407 if (Numerator_pfIso_EB_pt && Denominator_pfIso_EB_pt) {
408 TH1F *h_numerator_pfIso_EB_pt = Numerator_pfIso_EB_pt->
getTH1F();
409 TH1F *h_denominator_pfIso_EB_pt = Denominator_pfIso_EB_pt->
getTH1F();
413 if (h_eff_pfIso_EB_pt->GetSumw2N() == 0)
414 h_eff_pfIso_EB_pt->Sumw2();
415 h_eff_pfIso_EB_pt->Divide(h_numerator_pfIso_EB_pt, h_denominator_pfIso_EB_pt, 1., 1.,
"B");
419 string numpath_pfIso_EE_pt = inputdir +
"/passProbes_EE_pfIsoID_pt";
420 string denpath_pfIso_EE_pt = inputdir +
"/allProbes_EE_ID_pt";
425 if (Numerator_pfIso_EE_pt && Denominator_pfIso_EE_pt) {
426 TH1F *h_numerator_pfIso_EE_pt = Numerator_pfIso_EE_pt->
getTH1F();
427 TH1F *h_denominator_pfIso_EE_pt = Denominator_pfIso_EE_pt->
getTH1F();
431 if (h_eff_pfIso_EE_pt->GetSumw2N() == 0)
432 h_eff_pfIso_EE_pt->Sumw2();
434 h_eff_pfIso_EE_pt->Divide(h_numerator_pfIso_EE_pt, h_denominator_pfIso_EE_pt, 1., 1.,
"B");
439 string numpath_pfIso_nvtx = inputdir +
"/passProbes_pfIsoID_nVtx";
440 string denpath_pfIso_nvtx = inputdir +
"/allProbes_ID_nVtx";
445 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx) {
446 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
447 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
451 if (h_eff_pfIso_nvtx->GetSumw2N() == 0)
452 h_eff_pfIso_nvtx->Sumw2();
454 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
458 string numpath_detIso_nvtx = inputdir +
"/passProbes_detIsoID_nVtx";
459 string denpath_detIso_nvtx = inputdir +
"/allProbes_ID_nVtx";
464 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx) {
465 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
466 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
470 if (h_eff_detIso_nvtx->GetSumw2N() == 0)
471 h_eff_detIso_nvtx->Sumw2();
473 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
477 numpath_detIso_nvtx = inputdir +
"/passProbes_EB_detIsoID_nVtx";
478 denpath_detIso_nvtx = inputdir +
"/allProbes_EB_ID_nVtx";
480 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
481 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
483 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx) {
484 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
485 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
489 if (h_eff_detIso_nvtx->GetSumw2N() == 0)
490 h_eff_detIso_nvtx->Sumw2();
491 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
495 numpath_detIso_nvtx = inputdir +
"/passProbes_EE_detIsoID_nVtx";
496 denpath_detIso_nvtx = inputdir +
"/allProbes_EE_ID_nVtx";
498 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
499 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
501 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx) {
502 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
503 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
507 if (h_eff_detIso_nvtx->GetSumw2N() == 0)
508 h_eff_detIso_nvtx->Sumw2();
510 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
514 numpath_pfIso_nvtx = inputdir +
"/passProbes_EB_pfIsoID_nVtx";
515 denpath_pfIso_nvtx = inputdir +
"/allProbes_EB_ID_nVtx";
517 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
518 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
520 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx) {
521 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
522 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
526 if (h_eff_pfIso_nvtx->GetSumw2N() == 0)
527 h_eff_pfIso_nvtx->Sumw2();
529 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
533 numpath_pfIso_nvtx = inputdir +
"/passProbes_EE_pfIsoID_nVtx";
534 denpath_pfIso_nvtx = inputdir +
"/allProbes_EE_ID_nVtx";
536 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
537 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
539 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx) {
540 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
541 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
545 if (h_eff_pfIso_nvtx->GetSumw2N() == 0)
546 h_eff_pfIso_nvtx->Sumw2();
548 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
552 string numpath_pfIsodB_pt = inputdir +
"/passProbes_pfIsodBID_pt";
553 string denpath_pfIsodB_pt = inputdir +
"/allProbes_ID_pt";
558 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();
564 if (h_eff_pfIsodB_pt->GetSumw2N() == 0)
565 h_eff_pfIsodB_pt->Sumw2();
567 h_eff_pfIsodB_pt->Divide(h_numerator_pfIsodB_pt, h_denominator_pfIsodB_pt, 1., 1.,
"B");
572 string numpath_pfIsodB_EB_pt = inputdir +
"/passProbes_EB_pfIsodBID_pt";
573 string denpath_pfIsodB_EB_pt = inputdir +
"/allProbes_EB_ID_pt";
578 if (Numerator_pfIsodB_EB_pt && Denominator_pfIsodB_EB_pt) {
579 TH1F *h_numerator_pfIsodB_EB_pt = Numerator_pfIsodB_EB_pt->
getTH1F();
580 TH1F *h_denominator_pfIsodB_EB_pt = Denominator_pfIsodB_EB_pt->
getTH1F();
584 if (h_eff_pfIsodB_EB_pt->GetSumw2N() == 0)
585 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");
590 string numpath_pfIsodB_EE_pt = inputdir +
"/passProbes_EE_pfIsodBID_pt";
591 string denpath_pfIsodB_EE_pt = inputdir +
"/allProbes_EE_ID_pt";
596 if (Numerator_pfIsodB_EE_pt && Denominator_pfIsodB_EE_pt) {
597 TH1F *h_numerator_pfIsodB_EE_pt = Numerator_pfIsodB_EE_pt->
getTH1F();
598 TH1F *h_denominator_pfIsodB_EE_pt = Denominator_pfIsodB_EE_pt->
getTH1F();
602 if (h_eff_pfIsodB_EE_pt->GetSumw2N() == 0)
603 h_eff_pfIsodB_EE_pt->Sumw2();
605 h_eff_pfIsodB_EE_pt->Divide(h_numerator_pfIsodB_EE_pt, h_denominator_pfIsodB_EE_pt, 1., 1.,
"B");
610 string numpath_pfIsodB_nvtx = inputdir +
"/passProbes_pfIsodBID_nVtx";
611 string denpath_pfIsodB_nvtx = inputdir +
"/allProbes_ID_nVtx";
616 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx) {
617 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
618 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
622 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0)
623 h_eff_pfIsodB_nvtx->Sumw2();
625 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
629 numpath_pfIsodB_nvtx = inputdir +
"/passProbes_EB_pfIsodBID_nVtx";
630 denpath_pfIsodB_nvtx = inputdir +
"/allProbes_EB_ID_nVtx";
632 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
633 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
635 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx) {
636 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
637 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
641 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0)
642 h_eff_pfIsodB_nvtx->Sumw2();
644 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
648 numpath_pfIsodB_nvtx = inputdir +
"/passProbes_EE_pfIsodBID_nVtx";
649 denpath_pfIsodB_nvtx = inputdir +
"/allProbes_EE_ID_nVtx";
651 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
652 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
654 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx) {
655 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
656 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
660 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0)
661 h_eff_pfIsodB_nvtx->Sumw2();
663 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
MonitorElement * h_eff_vtx_EE_detIsoID
virtual void setCurrentFolder(std::string const &fullpath)
virtual TH1F * getTH1F() const
MonitorElement * h_eff_pt_EE_pfIsoID
MonitorElement * h_eff_inner_eta_ID
MonitorElement * h_eff_pt_EB_pfIsodBID
MonitorElement * h_eff_pt_EB_pfIsoID
MonitorElement * h_eff_pt_pfIsoID
MonitorElement * h_eff_vtx_EB_pfIsodBID
MonitorElement * h_eff_pt_EB_detIsoID
MonitorElement * h_eff_pt_ID
virtual MonitorElement * get(std::string const &fullpath) const
MonitorElement * h_eff_inner_phi_ID
MonitorElement * h_eff_inner_pt_ID
MonitorElement * h_eff_vtx_EE_pfIsoID
MonitorElement * h_eff_vtx_detIsoID
MonitorElement * h_eff_phi_ID
MonitorElement * h_eff_eta_ID
MonitorElement * h_eff_pt_detIsoID
MonitorElement * h_eff_vtx_pfIsodBID
MonitorElement * h_eff_vtx_EE_pfIsodBID
MonitorElement * h_eff_hp_eta_ID
MonitorElement * h_eff_pt_EE_pfIsodBID
MonitorElement * h_eff_pt_pfIsodBID
MonitorElement * h_eff_vtx_pfIsoID
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * h_eff_pt_EE_detIsoID
MonitorElement * h_eff_vtx_EB_pfIsoID
MonitorElement * h_eff_pt_EB_ID
MonitorElement * h_eff_pt_EE_ID
MonitorElement * h_eff_vtx_EB_detIsoID
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)