138 auto chargedIdx = chargedHypo.getIndex();
140 if (chargedPdgId < 0) {
146 m_p[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
147 m_pt[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
148 m_trkTheta[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
149 m_trkPhi[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
150 m_clusterTheta[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
151 m_clusterPhi[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
152 m_clusterReg[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
154 m_logl_sig[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
155 m_logl_bkg[chargedIdx] = std::numeric_limits<float>::quiet_NaN();
158 m_pids_glob[chargedIdx][chargedStable.getIndex()] = std::numeric_limits<float>::quiet_NaN();
171 if (std::abs(particle.getPDG()) != std::abs(chargedPdgId))
continue;
174 if (particle.getPDG() != chargedPdgId)
continue;
180 double p_max(-999.0);
181 for (
const auto& track : particle.getRelationsFrom<
Track>()) {
182 const auto fitRes = track.getTrackFitResultWithClosestMass(
Const::pion);
183 if (!fitRes)
continue;
184 if (fitRes->getMomentum().R() > p_max) {
185 p_max = fitRes->getMomentum().R();
190 if (itrack_max < 0)
continue;
192 const auto track = particle.getRelationsFrom<
Track>()[itrack_max];
193 const auto fitRes = track->getTrackFitResultWithClosestMass(
Const::pion);
195 m_p[chargedIdx] = p_max;
196 m_pt[chargedIdx] = fitRes->get4Momentum().Pt();
197 m_trkTheta[chargedIdx] = fitRes->get4Momentum().Theta();
198 m_trkPhi[chargedIdx] = fitRes->get4Momentum().Phi();
201 int icluster_match(-1);
202 auto eclClusters = track->getRelationsTo<
ECLCluster>();
203 for (
unsigned int icluster(0); icluster < eclClusters.size(); ++icluster) {
204 const auto eclCluster = eclClusters[icluster];
206 if (!eclCluster->isTrack())
continue;
207 icluster_match = icluster;
211 if (icluster_match < 0) {
216 const auto eclCluster = eclClusters[icluster_match];
220 m_clusterReg[chargedIdx] = eclCluster->getDetectorRegion();
233 if (not eclLikelihood)
236 double lh_sig = eclLikelihood->
getLikelihood(chargedStableSig);
237 double lh_bkg = eclLikelihood->getLikelihood(chargedStableBkg);
246 lh_all += eclLikelihood->getLikelihood(chargedStable);
249 m_pids_glob[chargedIdx][chargedStable.getIndex()] = eclLikelihood->getLikelihood(chargedStable) / lh_all;
254 m_tree[chargedIdx]->Fill();
270 if (mergeCharge && chargedPdgId <= 0)
continue;
273 const auto chargeSign =
static_cast<int>(chargedPdgId / std::abs(chargedPdgId));
276 const auto chargedStableSig = chargedStableSample;
283 auto chargedSampleIdx = (chargeSign > 0) ? chargedStableSig.getIndex() : chargedStableSig.getIndex() +
288 auto pdgIdDesc = (mergeCharge) ? std::to_string(chargedPdgId) +
" and -" + std::to_string(chargedPdgId) : std::to_string(
292 TNamed(
"Description", TString::Format(
"ECL Charged PID control plots for charged stable particles/antiparticles ; Sample PDG = %s",
293 pdgIdDesc.c_str()).Data()).Write();
296 dumpPIDVars(
m_tree[chargedSampleIdx], chargedStableSig, chargeSign, chargedStableBkg, mergeCharge);
309 m_tree[chargedSampleIdx]->Write();
323 const auto sigHypoIdx = sigHypo.
getIndex();
324 const auto sigHypoPdgId = sigHypo.
getPDGCode();
327 const auto bkgHypoPdgId = bkgHypo.
getPDGCode();
331 TString pidSigBranch = TString::Format(
"pids_glob[%i]", sigHypoIdx);
334 TString h_pid_name = TString::Format(
"h_pid_sig_%i", sigHypoPdgId);
335 TH1F* h_pid =
new TH1F(h_pid_name.Data(), h_pid_name.Data(), 50, -0.5, 1.2);
336 h_pid->GetXaxis()->SetTitle(TString::Format(
"Likelihood ratio (%i/ALL) (ECL)", sigHypoPdgId).Data());
339 TString h_deltalogl_name = TString::Format(
"h_deltalogl_bkg_%i_sig_%i", bkgHypoPdgId, sigHypoPdgId);
340 double deltalogl_min = -20.0;
341 double deltalogl_max = 20.0;
342 TH1F* h_deltalogl =
new TH1F(h_deltalogl_name.Data(), h_deltalogl_name.Data(), 40, deltalogl_min, deltalogl_max);
343 h_deltalogl->GetXaxis()->SetTitle(TString::Format(
"#Deltaln(L) (%i/%i) (ECL)", bkgHypoPdgId, sigHypoPdgId).Data());
346 TString h_trkclusmatch_name = TString::Format(
"h_trkclusmatch_sig_%i", sigHypoPdgId);
347 TH1F* h_trkclusmatch =
new TH1F(h_trkclusmatch_name.Data(), h_trkclusmatch_name.Data(), 4, -1.5, 2.5);
348 h_trkclusmatch->GetXaxis()->SetTitle(TString::Format(
"Track-ECLCluster match (%i)", sigHypoPdgId).Data());
351 sampleTree->Project(h_pid_name.Data(), pidSigBranch.Data());
352 sampleTree->Project(h_deltalogl_name.Data(),
"deltalogl_sig_bkg");
353 sampleTree->Project(h_trkclusmatch_name.Data(),
"trackClusterMatch");
360 h_pid->SetOption(
"HIST");
361 h_deltalogl->SetOption(
"HIST");
362 h_trkclusmatch->SetOption(
"HIST");
365 std::string metaopts(
"pvalue-warn=0.1,pvalue-error=0.01");
366 std::string shifteropt(
"");
369 shifteropt =
"shifter,";
372 auto pdgIdDesc = (!mergeSigCharge) ? std::to_string(sigHypoPdgId * sigCharge) : std::to_string(
373 sigHypoPdgId) +
" and -" + std::to_string(sigHypoPdgId);
376 h_pid->GetListOfFunctions()->Add(
new TNamed(
"Description",
377 TString::Format(
"Sample PDG = %s ; ECL global PID(%i) distribution. U/O flow is added to first (last) bin.",
379 sigHypoPdgId).Data()));
380 h_pid->GetListOfFunctions()->Add(
new TNamed(
"Check",
381 "The more peaked at 1, the better. Non-zero O-flow indicates either failure of MC matching for reco tracks (unlikely), or failure of track-ECL-cluster matching (more likely). Both cases result in PID=nan."));
382 h_pid->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Marcel Hohmann. mhohmann@student.unimelb.edu.au"));
383 h_pid->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
385 h_deltalogl->GetListOfFunctions()->Add(
new TNamed(
"Description",
386 TString::Format(
"Sample PDG = %s ; ECL distribution of binary $\\Delta log(L)$ = log(L(%i)) - log(L(%i)). U/O flow is added to first (last) bin.",
389 sigHypoPdgId).Data()));
390 h_deltalogl->GetListOfFunctions()->Add(
new TNamed(
"Check",
391 "Basic metric for signal/bkg separation. The more negative, the better separation is achieved. Non-zero U-flow indicates a non-normal PDF value (of sig OR bkg) for some p,clusterTheta range, which might be due to a non-optimal definition of the x-axis range of the PDF templates. Non-zero O-flow indicates either failure of MC matching for reco tracks (unlikely), or failure of track-ECL-cluster matching (more likely)."));
392 h_deltalogl->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Marcel Hohmann. mhohmann@student.unimelb.edu.au"));
393 h_deltalogl->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
395 h_trkclusmatch->GetListOfFunctions()->Add(
new TNamed(
"Description",
396 TString::Format(
"Sample PDG = %s ; Track-ECLCluster match flag distribution.",
397 pdgIdDesc.c_str()).Data()));
398 h_trkclusmatch->GetListOfFunctions()->Add(
new TNamed(
"Check",
399 "The more peaked at 1, the better. Non-zero population in the bins w/ flag != 0|1 indicates failure of MC matching for reco tracks. In such cases, flag=nan."));
400 h_trkclusmatch->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Priyanka Cheema. priyanka.cheema@kit.edu"));
401 h_trkclusmatch->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", metaopts.c_str()));
404 h_deltalogl->Write();
405 h_trkclusmatch->Write();
409 delete h_trkclusmatch;
419 const std::string ratioType = (sampleHypo == sigHypo) ?
"Efficiency" :
"FakeRate";
422 const int sampleHypoPdgId = sampleHypo.
getPDGCode() * sampleCharge;
425 const auto sigHypoIdx = sigHypo.
getIndex();
426 const auto sigHypoPdgId = sigHypo.
getPDGCode();
430 TString pidSigCut = TString::Format(
"pids_glob[%i] > %f", sigHypoIdx,
c_PID);
433 TString h_p_N_name = TString::Format(
"h_p_N_%i", sigHypoPdgId);
434 TString h_p_D_name = TString::Format(
"h_p_D_%i", sigHypoPdgId);
435 TH1F* h_p_N =
new TH1F(h_p_N_name.Data(),
"h_p_N", 10, 0.0, 5.0);
436 TH1F* h_p_D =
new TH1F(h_p_D_name.Data(),
"h_p_D", 10, 0.0, 5.0);
438 TString h_th_N_name = TString::Format(
"h_th_N_%i", sigHypoPdgId);
439 TString h_th_D_name = TString::Format(
"h_th_D_%i", sigHypoPdgId);
443 TString h_eclreg_N_name = TString::Format(
"h_eclreg_N_%i", sigHypoPdgId);
444 TString h_eclreg_D_name = TString::Format(
"h_eclreg_D_%i", sigHypoPdgId);
445 TH1F* h_eclreg_N =
new TH1F(h_eclreg_N_name.Data(),
"h_eclreg_N", 5, -0.5, 4.5);
446 TH1F* h_eclreg_D =
new TH1F(h_eclreg_D_name.Data(),
"h_eclreg_D", 5, -0.5, 4.5);
448 TString h_phi_N_name = TString::Format(
"h_phi_N_%i", sigHypoPdgId);
449 TString h_phi_D_name = TString::Format(
"h_phi_D_%i", sigHypoPdgId);
450 TH1F* h_phi_N =
new TH1F(h_phi_N_name.Data(),
"h_phi_N", 5, -3.14159, 3.14159);
451 TH1F* h_phi_D =
new TH1F(h_phi_D_name.Data(),
"h_phi_D", 5, -3.14159, 3.14159);
455 sampleTree->Project(h_p_N_name.Data(),
"p", pidSigCut.Data());
456 sampleTree->Project(h_p_D_name.Data(),
"p");
458 sampleTree->Project(h_th_N_name.Data(),
"clusterTheta", pidSigCut.Data());
459 sampleTree->Project(h_th_D_name.Data(),
"clusterTheta");
461 sampleTree->Project(h_eclreg_N_name.Data(),
"clusterReg", pidSigCut.Data());
462 sampleTree->Project(h_eclreg_D_name.Data(),
"clusterReg");
466 sampleTree->Project(h_phi_N_name.Data(),
"clusterPhi", pidSigCut.Data());
467 sampleTree->Project(h_phi_D_name.Data(),
"clusterPhi");
471 TString pid_glob_ratio_p_name = TString::Format(
"pid_glob_%i_%s__VS_p", sigHypoPdgId, ratioType.c_str());
472 TString pid_glob_ratio_th_name = TString::Format(
"pid_glob_%i_%s__VS_th", sigHypoPdgId, ratioType.c_str());
473 TString pid_glob_ratio_eclreg_name = TString::Format(
"pid_glob_%i_%s__VS_eclreg", sigHypoPdgId, ratioType.c_str());
474 TString pid_glob_ratio_phi_name = TString::Format(
"pid_glob_%i_%s__VS_phi", sigHypoPdgId, ratioType.c_str());
477 std::string metaopts(
"pvalue-warn=0.01,pvalue-error=0.001,nostats");
478 std::string shifteropt(
"");
481 shifteropt =
"shifter,";
484 auto pdgIdDesc = (!mergeSampleCharge) ? std::to_string(sampleHypoPdgId) : std::to_string(std::abs(
485 sampleHypoPdgId)) +
" and -" + std::to_string(std::abs(sampleHypoPdgId));
487 if (TEfficiency::CheckConsistency(*h_p_N, *h_p_D)) {
489 TEfficiency* t_pid_glob_ratio_p =
new TEfficiency(*h_p_N, *h_p_D);
490 t_pid_glob_ratio_p->SetName(pid_glob_ratio_p_name.Data());
491 t_pid_glob_ratio_p->SetTitle(TString::Format(
"%s;p [GeV/c];#varepsilon/f", pid_glob_ratio_p_name.Data()).Data());
493 t_pid_glob_ratio_p->SetConfidenceLevel(0.683);
494 t_pid_glob_ratio_p->SetStatisticOption(TEfficiency::kBUniform);
495 t_pid_glob_ratio_p->SetPosteriorMode();
497 t_pid_glob_ratio_p->GetListOfFunctions()->Add(
new TNamed(
"Description",
498 TString::Format(
"Sample PDG = %s ; %s of ECL global PID(%i) > %.2f as a function of $p_{trk}$.",
503 t_pid_glob_ratio_p->GetListOfFunctions()->Add(
new TNamed(
"Check",
504 "Shape should be consistent. Obviously, check for decreasing efficiency / increasing fake rate."));
505 t_pid_glob_ratio_p->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Marcel Hohmann. mhohmann@student.unimelb.edu.au"));
506 t_pid_glob_ratio_p->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
508 t_pid_glob_ratio_p->Write();
510 delete t_pid_glob_ratio_p;
513 if (TEfficiency::CheckConsistency(*h_th_N, *h_th_D)) {
515 TEfficiency* t_pid_glob_ratio_th =
new TEfficiency(*h_th_N, *h_th_D);
516 t_pid_glob_ratio_th->SetName(pid_glob_ratio_th_name.Data());
517 t_pid_glob_ratio_th->SetTitle(TString::Format(
"%s;#theta_{cluster} [rad];#varepsilon/f", pid_glob_ratio_th_name.Data()).Data());
519 t_pid_glob_ratio_th->SetConfidenceLevel(0.683);
520 t_pid_glob_ratio_th->SetStatisticOption(TEfficiency::kBUniform);
521 t_pid_glob_ratio_th->SetPosteriorMode();
523 t_pid_glob_ratio_th->GetListOfFunctions()->Add(
new TNamed(
"Description",
524 TString::Format(
"Sample PDG = %s ; %s of ECL global PID(%i) > %.2f as a function of $\\theta_{cluster}$.",
529 t_pid_glob_ratio_th->GetListOfFunctions()->Add(
new TNamed(
"Check",
530 "Shape should be consistent. Obviously, check for decreasing efficiency / increasing fake rate."));
531 t_pid_glob_ratio_th->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Marcel Hohmann. mhohmann@student.unimelb.edu.au"));
532 t_pid_glob_ratio_th->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
534 t_pid_glob_ratio_th->Write();
536 delete t_pid_glob_ratio_th;
538 if (TEfficiency::CheckConsistency(*h_eclreg_N, *h_eclreg_D)) {
540 TEfficiency* t_pid_glob_ratio_eclreg =
new TEfficiency(*h_eclreg_N, *h_eclreg_D);
541 t_pid_glob_ratio_eclreg->SetName(pid_glob_ratio_eclreg_name.Data());
542 t_pid_glob_ratio_eclreg->SetTitle(TString::Format(
"%s;ECL Region;#varepsilon/f", pid_glob_ratio_eclreg_name.Data()).Data());
544 t_pid_glob_ratio_eclreg->SetConfidenceLevel(0.683);
545 t_pid_glob_ratio_eclreg->SetStatisticOption(TEfficiency::kBUniform);
546 t_pid_glob_ratio_eclreg->SetPosteriorMode();
548 t_pid_glob_ratio_eclreg->GetListOfFunctions()->Add(
new TNamed(
"Description",
549 TString::Format(
"Sample PDG = %s ; %s of ECL global PID(%i) > %.2f as a function of ECL cluster region ($\\theta_{cluster}$). Regions are labelled: 0 (outside ECL acceptance), 1 (ECL FWD), 2 (ECL Barrel), 3 (ECL BWD), 4 (ECL FWD/BWD gaps).",
554 t_pid_glob_ratio_eclreg->GetListOfFunctions()->Add(
new TNamed(
"Check",
555 "Shape should be consistent. Obviously, check for decreasing efficiency / increasing fake rate."));
556 t_pid_glob_ratio_eclreg->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Marcel Hohmann. mhohmann@student.unimelb.edu.au"));
557 t_pid_glob_ratio_eclreg->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", metaopts.c_str()));
559 t_pid_glob_ratio_eclreg->Write();
561 delete t_pid_glob_ratio_eclreg;
564 if (TEfficiency::CheckConsistency(*h_phi_N, *h_phi_D)) {
566 TEfficiency* t_pid_glob_ratio_phi =
new TEfficiency(*h_phi_N, *h_phi_D);
567 t_pid_glob_ratio_phi->SetName(pid_glob_ratio_phi_name.Data());
568 t_pid_glob_ratio_phi->SetTitle(TString::Format(
"%s;#phi_{cluster} [rad];#varepsilon/f", pid_glob_ratio_phi_name.Data()).Data());
570 t_pid_glob_ratio_phi->SetConfidenceLevel(0.683);
571 t_pid_glob_ratio_phi->SetStatisticOption(TEfficiency::kBUniform);
572 t_pid_glob_ratio_phi->SetPosteriorMode();
574 t_pid_glob_ratio_phi->GetListOfFunctions()->Add(
new TNamed(
"Description",
575 TString::Format(
"Sample PDG = %s ; %s of ECL global PID(%i) > %.2f as a function of $\\phi_{cluster}$.",
580 t_pid_glob_ratio_phi->GetListOfFunctions()->Add(
new TNamed(
"Check",
581 "Shape should be consistent. Obviously, check for decreasing efficiency / increasing fake rate."));
582 t_pid_glob_ratio_phi->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Marcel Hohmann. mhohmann@student.unimelb.edu.au"));
583 t_pid_glob_ratio_phi->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
585 t_pid_glob_ratio_phi->Write();
587 delete t_pid_glob_ratio_phi;
603 const int sampleCharge,
bool mergeSampleCharge)
607 const auto sampleHypoPdgId = sampleHypo.
getPDGCode();
610 TString h_pt_N_name = TString::Format(
"h_pt_N_%i", sampleHypoPdgId);
611 TString h_pt_D_name = TString::Format(
"h_pt_D_%i", sampleHypoPdgId);
612 TH1F* h_pt_N =
new TH1F(h_pt_N_name.Data(),
"h_pt_N", 10, 0.0, 5.0);
613 TH1F* h_pt_D =
new TH1F(h_pt_D_name.Data(),
"h_pt_D", 10, 0.0, 5.0);
615 TString h_th_N_name = TString::Format(
"h_th_N_%i", sampleHypoPdgId);
616 TString h_th_D_name = TString::Format(
"h_th_D_%i", sampleHypoPdgId);
620 TString h_phi_N_name = TString::Format(
"h_phi_N_%i", sampleHypoPdgId);
621 TString h_phi_D_name = TString::Format(
"h_phi_D_%i", sampleHypoPdgId);
622 TH1F* h_phi_N =
new TH1F(h_phi_N_name.Data(),
"h_phi_N", 5, -3.14159, 3.14159);
623 TH1F* h_phi_D =
new TH1F(h_phi_D_name.Data(),
"h_phi_D", 5, -3.14159, 3.14159);
625 TString match_cut_N(
"trackClusterMatch == 1");
626 TString match_cut_D(
"trackClusterMatch >= 0");
630 tree->Project(h_pt_N_name.Data(),
"pt", match_cut_N.Data());
631 tree->Project(h_pt_D_name.Data(),
"pt", match_cut_D.Data());
633 tree->Project(h_th_N_name.Data(),
"trkTheta", match_cut_N.Data());
634 tree->Project(h_th_D_name.Data(),
"trkTheta", match_cut_D.Data());
636 tree->Project(h_phi_N_name.Data(),
"trkPhi", match_cut_N.Data());
637 tree->Project(h_phi_D_name.Data(),
"trkPhi", match_cut_D.Data());
641 TString match_eff_pt_name = TString::Format(
"trkclusmatch_%i_Efficiency__VS_pt", sampleHypoPdgId);
642 TString match_eff_th_name = TString::Format(
"trkclusmatch_%i_Efficiency__VS_th", sampleHypoPdgId);
643 TString match_eff_phi_name = TString::Format(
"trkclusmatch_%i_Efficiency__VS_phi", sampleHypoPdgId);
646 std::string metaopts(
"pvalue-warn=0.01,pvalue-error=0.001,nostats");
647 std::string shifteropt(
"");
650 shifteropt =
"shifter,";
653 auto pdgIdDesc = (!mergeSampleCharge) ? std::to_string(sampleHypoPdgId * sampleCharge) : std::to_string(
654 sampleHypoPdgId) +
" and -" + std::to_string(sampleHypoPdgId);
656 if (TEfficiency::CheckConsistency(*h_pt_N, *h_pt_D)) {
658 TEfficiency* t_match_eff_pt =
new TEfficiency(*h_pt_N, *h_pt_D);
659 t_match_eff_pt->SetName(match_eff_pt_name.Data());
660 t_match_eff_pt->SetTitle(TString::Format(
"%s;p_{T}^{trk} [GeV/c];#varepsilon", match_eff_pt_name.Data()).Data());
661 t_match_eff_pt->SetTitle(match_eff_pt_name.Data());
663 t_match_eff_pt->SetConfidenceLevel(0.683);
664 t_match_eff_pt->SetStatisticOption(TEfficiency::kBUniform);
665 t_match_eff_pt->SetPosteriorMode();
667 t_match_eff_pt->GetListOfFunctions()->Add(
new TNamed(
"Description",
668 TString::Format(
"Sample PDG = %s ; Efficiency of track-ECL-cluster matching as a function of $p_{T}^{trk}$.",
669 pdgIdDesc.c_str()).Data()));
670 t_match_eff_pt->GetListOfFunctions()->Add(
new TNamed(
"Check",
671 "Shape should be consistent. Obviously, check for decreasing efficiency."));
672 t_match_eff_pt->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Priyanka Cheema. priyanka.cheema@kit.edu"));
673 t_match_eff_pt->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
675 t_match_eff_pt->Write();
677 delete t_match_eff_pt;
680 if (TEfficiency::CheckConsistency(*h_th_N, *h_th_D)) {
682 TEfficiency* t_match_eff_th =
new TEfficiency(*h_th_N, *h_th_D);
683 t_match_eff_th->SetName(match_eff_th_name.Data());
684 t_match_eff_th->SetTitle(TString::Format(
"%s;#theta_{trk} [rad];#varepsilon", match_eff_th_name.Data()).Data());
685 t_match_eff_th->SetTitle(match_eff_th_name.Data());
687 t_match_eff_th->SetConfidenceLevel(0.683);
688 t_match_eff_th->SetStatisticOption(TEfficiency::kBUniform);
689 t_match_eff_th->SetPosteriorMode();
691 t_match_eff_th->GetListOfFunctions()->Add(
new TNamed(
"Description",
692 TString::Format(
"Sample PDG = %s ; Efficiency of track-ECL-cluster matching as a function of $\\theta_{trk}$.",
693 pdgIdDesc.c_str()).Data()));
694 t_match_eff_th->GetListOfFunctions()->Add(
new TNamed(
"Check",
695 "Shape should be consistent. Obviously, check for decreasing efficiency."));
696 t_match_eff_th->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Priyanka Cheema. priyanka.cheema@kit.edu"));
697 t_match_eff_th->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
699 t_match_eff_th->Write();
701 delete t_match_eff_th;
704 if (TEfficiency::CheckConsistency(*h_phi_N, *h_phi_D)) {
706 TEfficiency* t_match_eff_phi =
new TEfficiency(*h_phi_N, *h_phi_D);
707 t_match_eff_phi->SetName(match_eff_phi_name.Data());
708 t_match_eff_phi->SetTitle(TString::Format(
"%s;#phi_{trk} [rad];#varepsilon", match_eff_phi_name.Data()).Data());
710 t_match_eff_phi->SetConfidenceLevel(0.683);
711 t_match_eff_phi->SetStatisticOption(TEfficiency::kBUniform);
712 t_match_eff_phi->SetPosteriorMode();
714 t_match_eff_phi->GetListOfFunctions()->Add(
new TNamed(
"Description",
715 TString::Format(
"Sample PDG = %s ; Efficiency of track-ECL-cluster matching as a function of $\\phi_{trk}$.",
716 pdgIdDesc.c_str()).Data()));
717 t_match_eff_phi->GetListOfFunctions()->Add(
new TNamed(
"Check",
718 "Shape should be consistent. Obviously, check for decreasing efficiency."));
719 t_match_eff_phi->GetListOfFunctions()->Add(
new TNamed(
"Contact",
"Priyanka Cheema. priyanka.cheema@kit.edu"));
720 t_match_eff_phi->GetListOfFunctions()->Add(
new TNamed(
"MetaOptions", (shifteropt + metaopts).c_str()));
722 t_match_eff_phi->Write();
724 delete t_match_eff_phi;