162 string inputdir =
"Muons/EfficiencyAnalyzer/" +
ID_;
163 string numpath_pt = inputdir +
"/passProbes_ID_pt";
164 string denpath_pt = inputdir +
"/allProbes_pt";
169 if (Numerator_pt && Denominator_pt) {
170 TH1F *h_numerator_pt = Numerator_pt->
getTH1F();
171 TH1F *h_denominator_pt = Denominator_pt->
getTH1F();
174 if (h_eff_pt->GetSumw2N() == 0)
176 h_eff_pt->Divide(h_numerator_pt, h_denominator_pt, 1., 1.,
"B");
180 string numpath_inner_pt = inputdir +
"/passProbes_ID_inner_pt";
181 string denpath_inner_pt = inputdir +
"/allProbes_inner_pt";
186 if (Numerator_inner_pt && Denominator_inner_pt) {
187 TH1F *h_numerator_inner_pt = Numerator_inner_pt->
getTH1F();
188 TH1F *h_denominator_inner_pt = Denominator_inner_pt->
getTH1F();
191 if (h_eff_inner_pt->GetSumw2N() == 0)
192 h_eff_inner_pt->Sumw2();
193 h_eff_inner_pt->Divide(h_numerator_inner_pt, h_denominator_inner_pt, 1., 1.,
"B");
197 string numpath_inner_eta = inputdir +
"/passProbes_ID_inner_eta";
198 string denpath_inner_eta = inputdir +
"/allProbes_inner_eta";
203 if (Numerator_inner_eta && Denominator_inner_eta) {
204 TH1F *h_numerator_inner_eta = Numerator_inner_eta->
getTH1F();
205 TH1F *h_denominator_inner_eta = Denominator_inner_eta->
getTH1F();
208 if (h_eff_inner_eta->GetSumw2N() == 0)
209 h_eff_inner_eta->Sumw2();
210 h_eff_inner_eta->Divide(h_numerator_inner_eta, h_denominator_inner_eta, 1., 1.,
"B");
214 string numpath_inner_phi = inputdir +
"/passProbes_ID_inner_phi";
215 string denpath_inner_phi = inputdir +
"/allProbes_inner_phi";
220 if (Numerator_inner_phi && Denominator_inner_phi) {
221 TH1F *h_numerator_inner_phi = Numerator_inner_phi->
getTH1F();
222 TH1F *h_denominator_inner_phi = Denominator_inner_phi->
getTH1F();
225 if (h_eff_inner_phi->GetSumw2N() == 0)
226 h_eff_inner_phi->Sumw2();
227 h_eff_inner_phi->Divide(h_numerator_inner_phi, h_denominator_inner_phi, 1., 1.,
"B");
231 string numpath_EB_pt = inputdir +
"/passProbes_ID_EB_pt";
232 string denpath_EB_pt = inputdir +
"/allProbes_EB_pt";
237 if (Numerator_EB_pt && Denominator_EB_pt) {
238 TH1F *h_numerator_EB_pt = Numerator_EB_pt->
getTH1F();
239 TH1F *h_denominator_EB_pt = Denominator_EB_pt->
getTH1F();
242 if (h_eff_EB_pt->GetSumw2N() == 0)
243 h_eff_EB_pt->Sumw2();
244 h_eff_EB_pt->Divide(h_numerator_EB_pt, h_denominator_EB_pt, 1., 1.,
"B");
248 string numpath_EE_pt = inputdir +
"/passProbes_ID_EE_pt";
249 string denpath_EE_pt = inputdir +
"/allProbes_EE_pt";
254 if (Numerator_EE_pt && Denominator_EE_pt) {
255 TH1F *h_numerator_EE_pt = Numerator_EE_pt->
getTH1F();
256 TH1F *h_denominator_EE_pt = Denominator_EE_pt->
getTH1F();
259 if (h_eff_EE_pt->GetSumw2N() == 0)
260 h_eff_EE_pt->Sumw2();
261 h_eff_EE_pt->Divide(h_numerator_EE_pt, h_denominator_EE_pt, 1., 1.,
"B");
265 string numpath_eta = inputdir +
"/passProbes_ID_eta";
266 string denpath_eta = inputdir +
"/allProbes_eta";
271 if (Numerator_eta && Denominator_eta) {
272 TH1F *h_numerator_eta = Numerator_eta->
getTH1F();
273 TH1F *h_denominator_eta = Denominator_eta->
getTH1F();
277 if (h_eff_eta->GetSumw2N() == 0)
280 h_eff_eta->Divide(h_numerator_eta, h_denominator_eta, 1., 1.,
"B");
285 string numpath_hp_eta = inputdir +
"/passProbes_ID_hp_eta";
286 string denpath_hp_eta = inputdir +
"/allProbes_hp_eta";
291 if (Numerator_hp_eta && Denominator_hp_eta) {
292 TH1F *h_numerator_hp_eta = Numerator_hp_eta->
getTH1F();
293 TH1F *h_denominator_hp_eta = Denominator_hp_eta->
getTH1F();
297 if (h_eff_hp_eta->GetSumw2N() == 0)
298 h_eff_hp_eta->Sumw2();
300 h_eff_hp_eta->Divide(h_numerator_hp_eta, h_denominator_hp_eta, 1., 1.,
"B");
305 string numpath_phi = inputdir +
"/passProbes_ID_phi";
306 string denpath_phi = inputdir +
"/allProbes_phi";
311 if (Numerator_phi && Denominator_phi) {
312 TH1F *h_numerator_phi = Numerator_phi->
getTH1F();
313 TH1F *h_denominator_phi = Denominator_phi->
getTH1F();
317 if (h_eff_phi->GetSumw2N() == 0)
320 h_eff_phi->Divide(h_numerator_phi, h_denominator_phi, 1., 1.,
"B");
324 string numpath_detIso_pt = inputdir +
"/passProbes_detIsoID_pt";
325 string denpath_detIso_pt = inputdir +
"/allProbes_ID_pt";
330 if (Numerator_detIso_pt && Denominator_detIso_pt) {
331 TH1F *h_numerator_detIso_pt = Numerator_detIso_pt->
getTH1F();
332 TH1F *h_denominator_detIso_pt = Denominator_detIso_pt->
getTH1F();
336 if (h_eff_detIso_pt->GetSumw2N() == 0)
337 h_eff_detIso_pt->Sumw2();
338 h_eff_detIso_pt->Divide(h_numerator_detIso_pt, h_denominator_detIso_pt, 1., 1.,
"B");
342 string numpath_detIso_EB_pt = inputdir +
"/passProbes_EB_detIsoID_pt";
343 string denpath_detIso_EB_pt = inputdir +
"/allProbes_EB_ID_pt";
348 if (Numerator_detIso_EB_pt && Denominator_detIso_EB_pt) {
349 TH1F *h_numerator_detIso_EB_pt = Numerator_detIso_EB_pt->
getTH1F();
350 TH1F *h_denominator_detIso_EB_pt = Denominator_detIso_EB_pt->
getTH1F();
354 if (h_eff_detIso_EB_pt->GetSumw2N() == 0)
355 h_eff_detIso_EB_pt->Sumw2();
357 h_eff_detIso_EB_pt->Divide(h_numerator_detIso_EB_pt, h_denominator_detIso_EB_pt, 1., 1.,
"B");
361 string numpath_detIso_EE_pt = inputdir +
"/passProbes_EE_detIsoID_pt";
362 string denpath_detIso_EE_pt = inputdir +
"/allProbes_EE_ID_pt";
367 if (Numerator_detIso_EE_pt && Denominator_detIso_EE_pt) {
368 TH1F *h_numerator_detIso_EE_pt = Numerator_detIso_EE_pt->
getTH1F();
369 TH1F *h_denominator_detIso_EE_pt = Denominator_detIso_EE_pt->
getTH1F();
373 if (h_eff_detIso_EE_pt->GetSumw2N() == 0)
374 h_eff_detIso_EE_pt->Sumw2();
376 h_eff_detIso_EE_pt->Divide(h_numerator_detIso_EE_pt, h_denominator_detIso_EE_pt, 1., 1.,
"B");
380 string numpath_pfIso_pt = inputdir +
"/passProbes_pfIsoID_pt";
381 string denpath_pfIso_pt = inputdir +
"/allProbes_ID_pt";
386 if (Numerator_pfIso_pt && Denominator_pfIso_pt) {
387 TH1F *h_numerator_pfIso_pt = Numerator_pfIso_pt->
getTH1F();
388 TH1F *h_denominator_pfIso_pt = Denominator_pfIso_pt->
getTH1F();
392 if (h_eff_pfIso_pt->GetSumw2N() == 0)
393 h_eff_pfIso_pt->Sumw2();
395 h_eff_pfIso_pt->Divide(h_numerator_pfIso_pt, h_denominator_pfIso_pt, 1., 1.,
"B");
400 string numpath_pfIso_EB_pt = inputdir +
"/passProbes_EB_pfIsoID_pt";
401 string denpath_pfIso_EB_pt = inputdir +
"/allProbes_EB_ID_pt";
406 if (Numerator_pfIso_EB_pt && Denominator_pfIso_EB_pt) {
407 TH1F *h_numerator_pfIso_EB_pt = Numerator_pfIso_EB_pt->
getTH1F();
408 TH1F *h_denominator_pfIso_EB_pt = Denominator_pfIso_EB_pt->
getTH1F();
412 if (h_eff_pfIso_EB_pt->GetSumw2N() == 0)
413 h_eff_pfIso_EB_pt->Sumw2();
414 h_eff_pfIso_EB_pt->Divide(h_numerator_pfIso_EB_pt, h_denominator_pfIso_EB_pt, 1., 1.,
"B");
418 string numpath_pfIso_EE_pt = inputdir +
"/passProbes_EE_pfIsoID_pt";
419 string denpath_pfIso_EE_pt = inputdir +
"/allProbes_EE_ID_pt";
424 if (Numerator_pfIso_EE_pt && Denominator_pfIso_EE_pt) {
425 TH1F *h_numerator_pfIso_EE_pt = Numerator_pfIso_EE_pt->
getTH1F();
426 TH1F *h_denominator_pfIso_EE_pt = Denominator_pfIso_EE_pt->
getTH1F();
430 if (h_eff_pfIso_EE_pt->GetSumw2N() == 0)
431 h_eff_pfIso_EE_pt->Sumw2();
433 h_eff_pfIso_EE_pt->Divide(h_numerator_pfIso_EE_pt, h_denominator_pfIso_EE_pt, 1., 1.,
"B");
438 string numpath_pfIso_nvtx = inputdir +
"/passProbes_pfIsoID_nVtx";
439 string denpath_pfIso_nvtx = inputdir +
"/allProbes_ID_nVtx";
444 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx) {
445 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
446 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
450 if (h_eff_pfIso_nvtx->GetSumw2N() == 0)
451 h_eff_pfIso_nvtx->Sumw2();
453 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
457 string numpath_detIso_nvtx = inputdir +
"/passProbes_detIsoID_nVtx";
458 string denpath_detIso_nvtx = inputdir +
"/allProbes_ID_nVtx";
463 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx) {
464 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
465 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
469 if (h_eff_detIso_nvtx->GetSumw2N() == 0)
470 h_eff_detIso_nvtx->Sumw2();
472 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
476 numpath_detIso_nvtx = inputdir +
"/passProbes_EB_detIsoID_nVtx";
477 denpath_detIso_nvtx = inputdir +
"/allProbes_EB_ID_nVtx";
479 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
480 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
482 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx) {
483 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
484 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
488 if (h_eff_detIso_nvtx->GetSumw2N() == 0)
489 h_eff_detIso_nvtx->Sumw2();
490 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
494 numpath_detIso_nvtx = inputdir +
"/passProbes_EE_detIsoID_nVtx";
495 denpath_detIso_nvtx = inputdir +
"/allProbes_EE_ID_nVtx";
497 Numerator_detIso_nvtx = igetter.
get(numpath_detIso_nvtx);
498 Denominator_detIso_nvtx = igetter.
get(denpath_detIso_nvtx);
500 if (Numerator_detIso_nvtx && Denominator_detIso_nvtx) {
501 TH1F *h_numerator_detIso_nvtx = Numerator_detIso_nvtx->
getTH1F();
502 TH1F *h_denominator_detIso_nvtx = Denominator_detIso_nvtx->
getTH1F();
506 if (h_eff_detIso_nvtx->GetSumw2N() == 0)
507 h_eff_detIso_nvtx->Sumw2();
509 h_eff_detIso_nvtx->Divide(h_numerator_detIso_nvtx, h_denominator_detIso_nvtx, 1., 1.,
"B");
513 numpath_pfIso_nvtx = inputdir +
"/passProbes_EB_pfIsoID_nVtx";
514 denpath_pfIso_nvtx = inputdir +
"/allProbes_EB_ID_nVtx";
516 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
517 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
519 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx) {
520 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
521 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
525 if (h_eff_pfIso_nvtx->GetSumw2N() == 0)
526 h_eff_pfIso_nvtx->Sumw2();
528 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
532 numpath_pfIso_nvtx = inputdir +
"/passProbes_EE_pfIsoID_nVtx";
533 denpath_pfIso_nvtx = inputdir +
"/allProbes_EE_ID_nVtx";
535 Numerator_pfIso_nvtx = igetter.
get(numpath_pfIso_nvtx);
536 Denominator_pfIso_nvtx = igetter.
get(denpath_pfIso_nvtx);
538 if (Numerator_pfIso_nvtx && Denominator_pfIso_nvtx) {
539 TH1F *h_numerator_pfIso_nvtx = Numerator_pfIso_nvtx->
getTH1F();
540 TH1F *h_denominator_pfIso_nvtx = Denominator_pfIso_nvtx->
getTH1F();
544 if (h_eff_pfIso_nvtx->GetSumw2N() == 0)
545 h_eff_pfIso_nvtx->Sumw2();
547 h_eff_pfIso_nvtx->Divide(h_numerator_pfIso_nvtx, h_denominator_pfIso_nvtx, 1., 1.,
"B");
551 string numpath_pfIsodB_pt = inputdir +
"/passProbes_pfIsodBID_pt";
552 string denpath_pfIsodB_pt = inputdir +
"/allProbes_ID_pt";
557 if (Numerator_pfIsodB_pt && Denominator_pfIsodB_pt) {
558 TH1F *h_numerator_pfIsodB_pt = Numerator_pfIsodB_pt->
getTH1F();
559 TH1F *h_denominator_pfIsodB_pt = Denominator_pfIsodB_pt->
getTH1F();
563 if (h_eff_pfIsodB_pt->GetSumw2N() == 0)
564 h_eff_pfIsodB_pt->Sumw2();
566 h_eff_pfIsodB_pt->Divide(h_numerator_pfIsodB_pt, h_denominator_pfIsodB_pt, 1., 1.,
"B");
571 string numpath_pfIsodB_EB_pt = inputdir +
"/passProbes_EB_pfIsodBID_pt";
572 string denpath_pfIsodB_EB_pt = inputdir +
"/allProbes_EB_ID_pt";
577 if (Numerator_pfIsodB_EB_pt && Denominator_pfIsodB_EB_pt) {
578 TH1F *h_numerator_pfIsodB_EB_pt = Numerator_pfIsodB_EB_pt->
getTH1F();
579 TH1F *h_denominator_pfIsodB_EB_pt = Denominator_pfIsodB_EB_pt->
getTH1F();
583 if (h_eff_pfIsodB_EB_pt->GetSumw2N() == 0)
584 h_eff_pfIsodB_EB_pt->Sumw2();
585 h_eff_pfIsodB_EB_pt->Divide(h_numerator_pfIsodB_EB_pt, h_denominator_pfIsodB_EB_pt, 1., 1.,
"B");
589 string numpath_pfIsodB_EE_pt = inputdir +
"/passProbes_EE_pfIsodBID_pt";
590 string denpath_pfIsodB_EE_pt = inputdir +
"/allProbes_EE_ID_pt";
595 if (Numerator_pfIsodB_EE_pt && Denominator_pfIsodB_EE_pt) {
596 TH1F *h_numerator_pfIsodB_EE_pt = Numerator_pfIsodB_EE_pt->
getTH1F();
597 TH1F *h_denominator_pfIsodB_EE_pt = Denominator_pfIsodB_EE_pt->
getTH1F();
601 if (h_eff_pfIsodB_EE_pt->GetSumw2N() == 0)
602 h_eff_pfIsodB_EE_pt->Sumw2();
604 h_eff_pfIsodB_EE_pt->Divide(h_numerator_pfIsodB_EE_pt, h_denominator_pfIsodB_EE_pt, 1., 1.,
"B");
609 string numpath_pfIsodB_nvtx = inputdir +
"/passProbes_pfIsodBID_nVtx";
610 string denpath_pfIsodB_nvtx = inputdir +
"/allProbes_ID_nVtx";
615 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx) {
616 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
617 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
621 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0)
622 h_eff_pfIsodB_nvtx->Sumw2();
624 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
628 numpath_pfIsodB_nvtx = inputdir +
"/passProbes_EB_pfIsodBID_nVtx";
629 denpath_pfIsodB_nvtx = inputdir +
"/allProbes_EB_ID_nVtx";
631 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
632 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
634 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx) {
635 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
636 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
640 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0)
641 h_eff_pfIsodB_nvtx->Sumw2();
643 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");
647 numpath_pfIsodB_nvtx = inputdir +
"/passProbes_EE_pfIsodBID_nVtx";
648 denpath_pfIsodB_nvtx = inputdir +
"/allProbes_EE_ID_nVtx";
650 Numerator_pfIsodB_nvtx = igetter.
get(numpath_pfIsodB_nvtx);
651 Denominator_pfIsodB_nvtx = igetter.
get(denpath_pfIsodB_nvtx);
653 if (Numerator_pfIsodB_nvtx && Denominator_pfIsodB_nvtx) {
654 TH1F *h_numerator_pfIsodB_nvtx = Numerator_pfIsodB_nvtx->
getTH1F();
655 TH1F *h_denominator_pfIsodB_nvtx = Denominator_pfIsodB_nvtx->
getTH1F();
659 if (h_eff_pfIsodB_nvtx->GetSumw2N() == 0)
660 h_eff_pfIsodB_nvtx->Sumw2();
662 h_eff_pfIsodB_nvtx->Divide(h_numerator_pfIsodB_nvtx, h_denominator_pfIsodB_nvtx, 1., 1.,
"B");