64 gROOT->SetStyle(
"ATLAS");
65 TStyle* plotStyle = gROOT->GetStyle(
"ATLAS");
66 plotStyle->SetOptTitle(0);
67 plotStyle->SetHistLineWidth(1.);
88 for(
int i=0; i<
m_tree->GetEntries(); ++i){
113 m_c = std::make_unique<TCanvas>();
191 TString::Format(
"#splitline{Used in}{reconstruction: %d}",
int(
m_h_objReco_eta->GetEntries())), TString::Format(
"Total: %d",
int(
m_h_obj_eta->GetEntries())),
194 TString::Format(
"#splitline{Used in}{reconstruction: %d}",
int(
m_h_objReco_phi_b->GetEntries())), TString::Format(
"Total: %d",
int(
m_h_obj_phi_b->GetEntries())),
195 TString(
"objN_stack_b; Number of objects in the barrel; Events / bin"),
m_plotdir_inputObjects+
"objN_stack_b");
197 TString::Format(
"#splitline{Used in}{reconstruction: %d}",
int(
m_h_objReco_phi_e->GetEntries())), TString::Format(
"Total: %d",
int(
m_h_obj_phi_e->GetEntries())),
198 TString(
"objN_stack_e; Number of objects in the endcaps; Events / bin"),
m_plotdir_inputObjects+
"objN_stack_e");
200 TString::Format(
"#splitline{Used in}{reconstruction: %d}",
int(
m_h_objReco_eta->GetEntries())), TString::Format(
"Total: %d",
int(
m_h_obj_eta->GetEntries())),
201 TString(
"objEta_stack; Object #kern[-0.425]{#eta }; Events / bin"),
m_plotdir_inputObjects+
"objEta_stack");
203 TString::Format(
"#splitline{Used in}{reconstruction: %d}",
int(
m_h_objReco_phi_b->GetEntries())), TString::Format(
"Total: %d",
int(
m_h_obj_phi_b->GetEntries())),
204 TString(
"objPhi_stack_b; Object #kern[-0.09]{#phi in the barrel}; Events / bin"),
m_plotdir_inputObjects+
"objPhi_stack_b");
206 TString::Format(
"#splitline{Used in}{reconstruction: %d}",
int(
m_h_objReco_phi_e->GetEntries())), TString::Format(
"Total: %d",
int(
m_h_obj_phi_e->GetEntries())),
207 TString(
"objPhi_stack_e; Object #kern[-0.09]{#phi in the endcaps}; Events / bin"),
m_plotdir_inputObjects+
"objPhi_stack_e");
246 TString::Format(
"#splitline{Truth vertices}{matched to reco: %d}",
int(
m_h_TruthReco_Lxy_b->GetEntries())), TString::Format(
"Truth vertices: %d",
int(
m_h_Truth_Lxy_b->GetEntries())),
247 TString(
"stack_vtxeff_Lxy_b; Truth vertex L_{xy} [m]; Vertices / bin"),
m_plotdir_vtxEfficiency+
"num_denom_vtxeff_Lxy_b");
249 TString(
"vtxeff_Lxy_b; Truth vertex L_{xy} [m]; Efficiency: n_{truth}^{reco matched} / n_{truth}"),
m_plotdir_vtxEfficiency+
"vtxeff_Lxy_b");
253 TString::Format(
"#splitline{Truth vertices}{matched to reco: %d}",
int(
m_h_TruthReco_z_e->GetEntries())), TString::Format(
"Truth vertices: %d",
int(
m_h_Truth_z_e->GetEntries())),
254 TString(
"stack_vtxeff_z_e; Truth vertex |z| [m]; Vertices / bin"),
m_plotdir_vtxEfficiency+
"num_denom_vtxeff_z_e");
256 TString(
"vtxeff_z_e; Truth vertex |z| [m]; Efficiency: n_{truth}^{reco matched} / n_{truth}"),
m_plotdir_vtxEfficiency+
"vtxeff_z_e");
260 TString::Format(
"#splitline{Truth vertices}{matched to reco: %d}",
int(
m_h_TruthReco_eta->GetEntries())), TString::Format(
"Truth vertices: %d",
int(
m_h_Truth_eta->GetEntries())),
261 TString(
"stack_vtxeff_eta; Truth vertex #kern[-0.425]{#eta }; Vertices / bin"),
m_plotdir_vtxEfficiency+
"num_denom_vtxeff_eta");
263 TString(
"vtxeff_eta; Truth vertex #kern[-0.425]{#eta }; Efficiency: n_{truth}^{reco matched} / n_{truth}"),
m_plotdir_vtxEfficiency+
"vtxeff_eta");
267 TString::Format(
"#splitline{Truth vertices}{matched to reco: %d}",
int(
m_h_TruthReco_r_b->GetEntries())), TString::Format(
"Truth vertices: %d",
int(
m_h_Truth_r_b->GetEntries())),
268 TString(
"stack_vtxeff_r_b; Truth vertex |#bf{r}| [m]; Vertices / bin"),
m_plotdir_vtxEfficiency+
"num_denom_vtxeff_r_b");
270 TString(
"vtxeff_r_b; Truth vertex |#bf{r}| [m]; Efficiency: n_{truth}^{reco matched} / n_{truth}"),
m_plotdir_vtxEfficiency+
"vtxeff_r_b");
274 TString::Format(
"#splitline{Truth vertices}{matched to reco: %d}",
int(
m_h_TruthReco_r_e->GetEntries())), TString::Format(
"Truth vertices: %d",
int(
m_h_Truth_r_e->GetEntries())),
275 TString(
"stack_vtxeff_r_e; Truth vertex |#bf{r}| [m]; Vertices / bin"),
m_plotdir_vtxEfficiency+
"num_denom_vtxeff_r_e");
277 TString(
"vtxeff_r_e; Truth vertex |#bf{r}| [m]; Efficiency: n_{truth}^{reco matched} / n_{truth}"),
m_plotdir_vtxEfficiency+
"vtxeff_r_e");
284 TString::Format(
"#splitline{Reco vertices}{not matched to truth: %d}",
int(h_RecoNoTruth_Lxy_b->GetEntries())), TString::Format(
"Reco vertices: %d",
int(
m_h_Reco_Lxy_b->GetEntries())),
285 TString(
"stack_vtxfrate_Lxy_b; Reco vertex L_{xy} [m]; Vertices / bin"),
m_plotdir_vtxFakeRate+
"num_denom_vtxfrate_Lxy_b");
287 TString(
"vtxfrate_Lxy_b; Reco vertex L_{xy} [m]; Fake rate: n_{reco}^{not truth matched} / n_{reco}"),
m_plotdir_vtxFakeRate+
"vtxfrate_Lxy_b");
291 TString::Format(
"#splitline{Reco vertices}{not matched to truth: %d}",
int(h_RecoNoTruth_z_e->GetEntries())), TString::Format(
"Reco vertices: %d",
int(
m_h_Reco_z_e->GetEntries())),
292 TString(
"stack_vtxfrate_z_e; Reco vertex |z| [m]; Vertices / bin"),
m_plotdir_vtxFakeRate+
"num_denom_vtxfrate_z_e");
294 TString(
"vtxfrate_z_e; Reco vertex |z| [m]; Fake rate: n_{reco}^{not truth matched} / n_{reco}"),
m_plotdir_vtxFakeRate+
"vtxfrate_z_e");
299 TString::Format(
"#splitline{Reco vertices}{not matched to truth: %d}",
int(h_RecoNoTruth_eta->GetEntries())), TString::Format(
"Reco vertices: %d",
int(
m_h_Reco_eta->GetEntries())),
300 TString(
"stack_vtxfrate_eta; Reco vertex #kern[-0.425]{#eta }; Vertices / bin"),
m_plotdir_vtxFakeRate+
"num_denom_vtxfrate_eta");
302 TString(
"vtxfrate_eta; Reco vertex #kern[-0.425]{#eta }; Fake rate: n_{reco}^{not truth matched} / n_{reco}"),
m_plotdir_vtxFakeRate+
"vtxfrate_eta");
307 TString::Format(
"#splitline{Reco vertices}{not matched to truth: %d}",
int(h_RecoNoTruth_r_b->GetEntries())), TString::Format(
"Reco vertices: %d",
int(
m_h_Reco_r_b->GetEntries())),
308 TString(
"stack_vtxfrate_r_b; Reco vertex |#bf{r}| [m]; Vertices / bin"),
m_plotdir_vtxFakeRate+
"num_denom_vtxfrate_r_b");
310 TString(
"vtxfrate_r_b; Reco vertex |#bf{r}| [m]; Fake rate: n_{reco}^{not truth matched} / n_{reco}"),
m_plotdir_vtxFakeRate+
"vtxfrate_r_b");
315 TString::Format(
"#splitline{Reco vertices}{not matched to truth: %d}",
int(h_RecoNoTruth_r_e->GetEntries())), TString::Format(
"Reco vertices: %d",
int(
m_h_Reco_r_e->GetEntries())),
316 TString(
"stack_vtxfrate_r_e; Reco vertex |#bf{r}| [m]; Vertices / bin"),
m_plotdir_vtxFakeRate+
"num_denom_vtxfrate_r_e");
318 TString(
"vtxfrate_r_e; Reco vertex |#bf{r}| [m]; Fake rate: n_{reco}^{not truth matched} / n_{reco}"),
m_plotdir_vtxFakeRate+
"vtxfrate_r_e");
380 m_zLxy_truth->SetTitle(
"zLxy_truth; Truth vertex z [m]; Truth vertex L_{xy} [m]");
385 m_etaphi_truth->SetTitle(
"etaphi_truth; Truth vertex #eta; Truth vertex #phi [rad]");
391 m_zLxy->SetTitle(
"zLxy; Reco vertex z [m]; Reco vertex L_{xy} [m]");
396 m_etaphi->SetTitle(
"etaphi; Reco vertex #eta; Reco vertex #phi [rad]");
421 int Nobj_count_b{0}, Nobj_count_e{0};
422 int NobjReco_count{0};
423 int NobjReco_count_b{0}, NobjReco_count_e{0};
425 for (
int i=0; i<Nobj_count; ++i){
426 double obj_phi = (*m_obj_phi)[i];
427 double obj_eta = (*m_obj_eta)[i];
428 bool used_in_reco = (*m_obj_vtxLink)[i] != -1;
469 for (
unsigned int j=0; j<reco_vertices.size(); ++j){
498 double d_theta = vtx.theta() - truth_vtx.theta();
500 double d_Lxy = (vtx.perp() - truth_vtx.perp())/Gaudi::Units::cm;
501 double d_z = (vtx.z() - truth_vtx.z())/Gaudi::Units::cm;
502 double d_phys =
Amg::distance(vtx, truth_vtx)/Gaudi::Units::cm;
513 std::unique_ptr<EffInputTH1> &denomHists, std::unique_ptr<EffInputTH1> &numHists){
521 if (!
hasMatch(vtx, match_candidates))
continue;
545 graphs->zLxy_b->SetPoint(
graphs->zLxy_b->GetN(), vtx.z()/Gaudi::Units::m, vtx.perp()/Gaudi::Units::m);
546 graphs->etaphi_b->SetPoint(
graphs->etaphi_b->GetN(), vtx.eta(), vtx.phi());
549 graphs->zLxy_e->SetPoint(
graphs->zLxy_e->GetN(), vtx.z()/Gaudi::Units::m, vtx.perp()/Gaudi::Units::m);
550 graphs->etaphi_e->SetPoint(
graphs->etaphi_e->GetN(), vtx.eta(), vtx.phi());
553 graphs->zLxy_out->SetPoint(
graphs->zLxy_out->GetN(), vtx.z()/Gaudi::Units::m, vtx.perp()/Gaudi::Units::m);
554 graphs->etaphi_out->SetPoint(
graphs->etaphi_out->GetN(), vtx.eta(), vtx.phi());
568 hists->h_zLxy->Fill(vtx.z()/Gaudi::Units::m, vtx.perp()/Gaudi::Units::m);
569 hists->h_etaphi->Fill(vtx.eta(), vtx.phi());
570 hists->h_distanceToIP->Fill(vtx.mag()/Gaudi::Units::m);
579 hists->h_chi2->Fill(
chi2);
580 hists->h_chi2nDoF->Fill(
chi2/NDoF);
581 hists->h_chi2prob->Fill( TMath::Prob(
chi2, NDoF-1));
590 if (consti.size() == 0)
return;
592 double dphi{-1}, deta{-1},
deltaR{-1};
593 double dphi_max{0}, deta_max{0}, dR_max{0};
597 deta = vtx.eta() - c.eta();
599 hists->h_dR->Fill(
deltaR);
600 if (std::abs(dphi) > std::abs(dphi_max)) dphi_max = dphi;
601 if (std::abs(deta) > std::abs(deta_max)) deta_max = deta;
605 hists->h_dphimax->Fill(dphi_max);
606 hists->h_detamax->Fill(deta_max);
607 hists->h_dRmax->Fill(dR_max);
616 if (total < 0)
return;
618 hists->h_total->Fill(total);
619 hists->h_I->Fill(inner);
620 hists->h_M->Fill(middle);
621 hists->h_O->Fill(outer);
622 hists->h_inwardsTotal->Fill(inwards/total);
623 if (middle > 0) hists->h_IM->Fill(inner/middle);
624 if (outer > 0) hists->h_IO->Fill(inner/outer);
625 if (outer > 0) hists->h_MO->Fill(middle/outer);
634 hists->h_delta_R->Fill(dR);
635 hists->h_delta_theta->Fill(d_theta);
636 hists->h_delta_phi->Fill(d_phi);
637 hists->h_delta_Lxy->Fill(d_Lxy);
638 hists->h_delta_z->Fill(d_z);
639 hists->h_delta_phys->Fill(d_phys);
642 hists->h_delta_Lxy_posEta->Fill(d_Lxy);
643 hists->h_delta_z_posEta->Fill(d_z);
646 hists->h_delta_Lxy_negEta->Fill(d_Lxy);
647 hists->h_delta_z_negEta->Fill(d_z);
658 hists->h_Lxy->Fill(vtx.perp()/Gaudi::Units::m);
659 hists->h_distanceToIP_b->Fill(vtx.mag()/Gaudi::Units::m);
662 hists->h_z->Fill(std::abs(vtx.z()/Gaudi::Units::m));
663 hists->h_distanceToIP_e->Fill(vtx.mag()/Gaudi::Units::m);
665 hists->h_eta->Fill(vtx.eta());
675 saveTH2(hists->h_zLxy, plotdir+
"zLxy");
676 saveTH2(hists->h_etaphi, plotdir+
"etaphi");
679 const TString extra = plotdir.Contains(
"truth") ? TString(
"_truth") : TString(
"");
681 saveTH1(hists->h_zLxy->ProjectionX(
"z"+extra), plotdir+
"z"+extra,
"",
"Vertices / bin");
682 saveTH1(hists->h_zLxy->ProjectionY(
"Lxy"+extra), plotdir+
"Lxy"+extra,
"",
"Vertices / bin");
683 saveTH1(hists->h_etaphi->ProjectionX(
"eta"+extra), plotdir+
"eta"+extra,
"",
"Vertices / bin");
684 TH1* h_phi = hists->h_etaphi->ProjectionY(
"phi"+extra);
685 h_phi->GetXaxis()->SetRangeUser(-TMath::Pi(), TMath::Pi());
686 saveTH1(h_phi, plotdir+
"phi"+extra,
"",
"Vertices / bin");
687 saveTH1(hists->h_distanceToIP, plotdir+
"distanceToIP");
695 zLxy->Add(
graphs->zLxy_b,
"P");
696 zLxy->Add(
graphs->zLxy_e,
"P");
697 zLxy->Add(
graphs->zLxy_out,
"P");
698 zLxy->GetXaxis()->SetRangeUser(-16,16);
699 zLxy->GetYaxis()->SetRangeUser(-1,12);
702 TLegend* legend_zLxy =
makeLegend(0.16, 0.02, 0.65, 0.07, 0.05);
703 legend_zLxy->SetNColumns(3);
704 legend_zLxy->AddEntry(
graphs->zLxy_b,
"Barrel",
"p");
705 legend_zLxy->AddEntry(
graphs->zLxy_e,
"Endcaps",
"p");
706 legend_zLxy->AddEntry(
graphs->zLxy_out,
"Outside",
"p");
708 m_c->SaveAs(plotdir+
"map_zLxy.pdf");
711 etaphi->Add(
graphs->etaphi_b,
"P");
712 etaphi->Add(
graphs->etaphi_e,
"P");
713 etaphi->Add(
graphs->etaphi_out,
"P");
714 etaphi->GetXaxis()->SetRangeUser(-2.6,2.6);
715 etaphi->GetYaxis()->SetRangeUser(-TMath::Pi()-0.25,TMath::Pi()+1);
718 TLegend* legend_etaphi =
makeLegend(0.16, 0.02, 0.65, 0.07, 0.05);
719 legend_etaphi->SetNColumns(3);
720 legend_etaphi->AddEntry(
graphs->etaphi_b,
"Barrel",
"p");
721 legend_etaphi->AddEntry(
graphs->etaphi_e,
"Endcaps",
"p");
722 legend_etaphi->AddEntry(
graphs->etaphi_out,
"Outside",
"p");
723 legend_etaphi->Draw();
724 m_c->SaveAs(plotdir+
"map_etaphi.pdf");
736 double maxy_factor = 1.4;
739 h->Scale(1. /
h->Integral());
740 h->SetName(TString(
h->GetName())+
"_norm");
741 plotpath = plotpath.Insert(plotpath.Last(*
"."),
"_norm");
746 h->SetName(TString(
h->GetName())+
"_log");
747 plotpath = plotpath.Insert(plotpath.Last(*
"."),
"_log");
752 h->GetYaxis()->SetTitle(new_ylabel);
755 h->SetMaximum(
h->GetMaximum()*maxy_factor);
759 m_c->SaveAs(plotpath+
".pdf");
770 const TString &h1_legend,
const TString &h2_legend,
771 const TString &title,
const TString &plotpath,
772 int color1,
int color2){
775 TObjArray *tx_stack = title.Tokenize(
";");
776 auto name = ((TObjString*)(tx_stack->At(0)))->String();
777 THStack *h_stack =
new THStack(name, name);
778 h1->SetLineColor(color1);
779 h2->SetLineColor(color2);
783 double maxy = h2->GetMaximum()>h1->GetMaximum() ? h2->GetMaximum() : h1->GetMaximum();
784 h_stack->SetMaximum(1.4*maxy);
785 h_stack->Draw(
"nostack");
786 h_stack->GetXaxis()->SetTitle(((TObjString*)(tx_stack->At(1)))->String());
787 h_stack->GetYaxis()->SetTitle(((TObjString*)(tx_stack->At(2)))->String());
790 legend->AddEntry(h1, h1_legend,
"l");
791 legend->AddEntry(h2, h2_legend,
"l");
796 m_c->SaveAs(plotpath+
".pdf");
804 const TString &title,
const TString &plotpath){
807 TEfficiency* h_eff =
new TEfficiency(*h_num, *h_denom);
808 h_eff->SetTitle(title);
809 TObjArray *tx_eff = title.Tokenize(
";");
810 h_eff->SetName(((TObjString*)(tx_eff->At(0)))->String());
812 h_eff->SetLineColor(1);
813 h_eff->SetMarkerColor(1);
814 h_eff->SetMarkerSize(0.5);
815 h_eff->SetMarkerStyle(24);
819 TGraphAsymmErrors* g_eff = h_eff->GetPaintedGraph();
821 g_eff->GetYaxis()->SetRangeUser(0, 1.4*maxy);
822 g_eff->GetXaxis()->SetTitle(((TObjString*)(tx_eff->At(1)))->String());
823 g_eff->GetYaxis()->SetTitle(((TObjString*)(tx_eff->At(2)))->String());
831 m_c->SaveAs(plotpath+
".pdf");
840 gPad->SetRightMargin(0.15);
843 m_c->SaveAs(plotpath+
".pdf");
844 gPad->SetRightMargin(0.05);
858 Double_t Red[] = {0.0, 0.0, 1.0, 1.0};
859 Double_t Green[] = {1.0, 1.0, 1.0, 0.0};
860 Double_t Blue[] = {1.0, 0.0, 0.0, 0.0};
861 Double_t Length[] = {0.0, 0.33, 0.66, 1.0};
862 Int_t firstColorIdx = TColor::CreateGradientColorTable(std::size(Length), Length, Red, Green, Blue, std::size(palette));
864 for (
unsigned int i=0; i<std::size(palette); i++) palette[i] = firstColorIdx+i;
866 plotStyle->SetPalette(std::size(palette), palette);
868 plotStyle->SetNumberContours(100);
876 TH1* h_unmatched = (TH1*)h_all->Clone(name_unmatched);
877 h_unmatched->Add(h_matched, -1);
Scalar eta() const
pseudorapidity method
Scalar deltaR(const MatrixBase< Derived > &vec) const
std::vector< double > * m_msVtx_y
TH1 * m_h_delta_Lxy_negEta_b
std::vector< double > * m_msVtx_chi2
TGraph * m_etaphi_truth_e
TH1 * m_h_TruthReco_Lxy_b
std::vector< double > * m_obj_phi
TH1 * m_h_delta_z_posEta_e
TH1 * m_h_nTGC_InwardsTotal
std::vector< int > * m_msVtx_nMDT_inwards
std::unique_ptr< ResidualTH1 > m_h_VtxResiduals_e
void fillNvtxHists(const std::vector< Amg::Vector3D > &vertices, std::unique_ptr< NVtxTH1 > &hists)
TH1 * m_h_VtxConsti_dRmax_b
TH1 * m_h_VtxConsti_detamax_b
std::vector< int > * m_msVtx_Ntrklet
std::vector< double > * m_obj_eta
std::unique_ptr< TFile > m_input_file
TH1 * m_h_VtxConsti_detamax_e
void saveVtxPos(std::unique_ptr< VtxPosTH > &hists, const TString &plotdir)
std::unique_ptr< NHitsTH1 > m_h_Nhits_TGC
TString m_plotdir_inputObjects
TH1 * m_h_VtxConsti_dphimax_e
TH1 * m_h_VtxConsti_dRmax_e
void fillTruthComparisonHists(const std::vector< Amg::Vector3D > &reco_vertices, const std::vector< Amg::Vector3D > &truth_vertices)
TMultiGraph * m_etaphi_truth
std::unique_ptr< VtxPosTGraph > m_h_VtxPos
std::vector< int > * m_msVtx_nRPC
std::vector< int > * m_msVtx_nRPC_inwards
std::unique_ptr< AngularVtxConstiTH1 > m_h_AngularVtxConsti_b
TH1 * m_h_delta_z_negEta_b
std::vector< int > * m_msVtx_nMDT_M
std::unique_ptr< EffInputTH1 > m_h_TruthRecoMatched
void saveTGraph(TMultiGraph *zLxy, TMultiGraph *etaphi, std::unique_ptr< VtxPosTGraph > &graphs, const TString &plotdir)
TGraph * m_etaphi_truth_out
std::unique_ptr< Chi2TH1 > m_h_VtxChi2_e
std::unique_ptr< NVtxTH1 > m_h_NVtx
TH1 * m_h_nMDT_InwardsTotal_e
std::vector< int > * m_msVtx_nTGC_O
TString m_plotdir_recoVtxHits
std::vector< double > * m_msVtx_z
void fillTruthVtxPlots(const std::vector< Amg::Vector3D > &truth_vertices)
TString m_plotdir_recoVtx
void fillResidualHists(double eta, double dR, double d_theta, double d_phi, double d_Lxy, double d_z, double d_phys, std::unique_ptr< ResidualTH1 > &hists)
void fillReconstructionObjectsHists()
void fillRecoVtxPlots(const std::vector< Amg::Vector3D > &reco_vertices, const std::vector< std::vector< Amg::Vector3D > > &reco_constituentPos)
std::vector< double > * m_obj_theta
void saveTH1(TH1 *h, TString plotpath, const char *dectectorLabel="", const char *new_ylabel=nullptr, bool norm=false, bool logy=false)
std::vector< int > * m_msVtx_nTGC_M
TH1 * m_h_delta_Lxy_posEta_b
std::unique_ptr< VtxPosTH > m_h_VtxPosHists
std::unique_ptr< ResidualTH1 > m_h_VtxResiduals_b
std::vector< int > * m_msVtx_nRPC_I
std::vector< int > * m_obj_vtxLink
std::unique_ptr< VtxPosTGraph > m_h_VtxPos_truth
void fillEfficiency_NumeratorDenominatorHists(const std::vector< Amg::Vector3D > &vertices, const std::vector< Amg::Vector3D > &match_candidates, std::unique_ptr< EffInputTH1 > &denomHists, std::unique_ptr< EffInputTH1 > &numHists)
std::unique_ptr< NHitsTH1 > m_h_Nhits_MDT_b
std::vector< double > * m_obj_x
TMultiGraph * m_zLxy_truth
std::vector< int > * m_msVtx_nMDT_O
TH1 * m_h_VtxConsti_dphimax_b
void fillVtxPosHists(const std::vector< Amg::Vector3D > &vertices, std::unique_ptr< VtxPosTH > &hists)
std::vector< int > * m_msVtx_nRPC_M
TString m_plotdir_truthVtx
virtual ~MSVtxPlotMaker()
void fillVtxNhitsHists(double total, double inwards, double inner, double middle, double outer, std::unique_ptr< NHitsTH1 > &hists)
void saveTHStack(TH1 *h1, TH1 *h2, const TString &h1_legend, const TString &h2_legend, const TString &title, const TString &plotpath, int color1=2, int color2=1)
TH1 * m_h_RecoTruth_Lxy_b
TString m_plotdir_vtxResiduals
std::vector< double > * m_truthVtx_y
std::vector< int > * m_msVtx_nRPC_O
TH1 * m_h_delta_Lxy_negEta_e
TGraph * m_zLxy_truth_out
std::unique_ptr< TCanvas > m_c
TH1 * m_h_nMDT_InwardsTotal_b
TString m_plotdir_vtxEfficiency
std::vector< double > * m_truthVtx_x
std::unique_ptr< Chi2TH1 > m_h_VtxChi2_b
std::vector< int > * m_msVtx_nMDT_I
std::unique_ptr< NHitsTH1 > m_h_Nhits_RPC
std::vector< int > * m_msVtx_nMDT
std::vector< double > * m_truthVtx_z
MSVtxPlotMaker(const std::string &datapath, const std::string &pltdir, const std::string &treename="MSVtxValidTree")
TString m_plotdir_vtxFakeRate
std::unique_ptr< VtxPosTH > m_h_VtxPosHists_truth
TH1 * m_h_delta_z_negEta_e
std::vector< int > * m_msVtx_nTGC
TH1 * getUnmatchedHist(TH1 *h_all, TH1 *h_matched, const TString &name_unmatched)
std::unique_ptr< AngularVtxConstiTH1 > m_h_AngularVtxConsti_e
TGraph * m_etaphi_truth_b
TH1 * m_h_delta_Lxy_posEta_e
std::unique_ptr< NVtxTH1 > m_h_NVtx_truth
TH1 * m_h_nRPC_InwardsTotal
void setColorPalette(TStyle *plotStyle)
std::unique_ptr< EffInputTH1 > m_h_Truth
std::vector< double > * m_obj_y
std::unique_ptr< NHitsTH1 > m_h_Nhits_MDT_e
std::vector< double > * m_msVtx_x
std::unique_ptr< EffInputTH1 > m_h_RecoTruthMatched
TH1 * m_h_delta_z_posEta_b
void fillVtxPosMaps(const std::vector< Amg::Vector3D > &vertices, std::unique_ptr< VtxPosTGraph > &graphs)
void saveTEfficiency(TH1 *h_num, TH1 *h_denom, const TString &title, const TString &plotpath)
std::vector< int > * m_msVtx_nTGC_inwards
void saveTH2(TH2 *h, const TString &plotpath)
std::vector< int > * m_msVtx_nTGC_I
void fillAngularVtxConstiHists(const Amg::Vector3D &vtx, const std::vector< Amg::Vector3D > &consti, std::unique_ptr< AngularVtxConstiTH1 > &hists)
std::vector< double > * m_obj_z
void fillVtxPosFiducialVolHists(const Amg::Vector3D &vtx, std::unique_ptr< EffInputTH1 > &hists)
std::unique_ptr< EffInputTH1 > m_h_Reco
void fillChi2Hists(double chi2, double NDoF, std::unique_ptr< Chi2TH1 > &hists)
std::unique_ptr< TFile > m_output_file
double chi2(TH1 *h0, TH1 *h1)
static std::string treename
double deltaPhi(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Eigen::Matrix< double, 3, 1 > Vector3D
double getMaxy(const TGraphAsymmErrors *graph, double current_max)
void drawATLASlabel(const char *text, double x, double y, double textsize)
TLegend * makeLegend(double lower_x, double lower_y, double upper_x, double upper_y, double textsize)
void drawDetectorRegionLabel(const char *name, const char *customlabel, double x, double y, double textsize)
void drawDetectorBoundaryLines(const char *bin_var, double y_max)
int getNvtxDetectorRegion(const std::vector< Amg::Vector3D > &vertices)
bool isValidMatch(const Amg::Vector3D &match_candidate)
constexpr double fidVol_barrel_etaCut
bool inFiducialVol(const Amg::Vector3D &vtx)
constexpr double fidVol_endcaps_etaCut_low
bool isGoodVtx(const Amg::Vector3D &vtx)
bool inEndcaps(double eta)
constexpr double fidVol_endcaps_etaCut_up
bool hasMatch(const Amg::Vector3D &vtx1, const std::vector< Amg::Vector3D > &vtx2_vec)
std::vector< Amg::Vector3D > getVertexPos(const std::vector< double > &vtx_x, const std::vector< double > &vtx_y, const std::vector< double > &vtx_z)
bool inDetectorRegion(const Amg::Vector3D &vtx)
Amg::Vector3D findBestMatch(const Amg::Vector3D &vtx, const std::vector< Amg::Vector3D > &candidates)
bool inFiducialVolEndcaps(const Amg::Vector3D &vtx)
int getNvtxEndcaps(const std::vector< Amg::Vector3D > &vertices)
bool inBarrel(double eta)
int getNvtxBarrel(const std::vector< Amg::Vector3D > &vertices)
bool inFiducialVolBarrel(const Amg::Vector3D &vtx)
std::vector< std::vector< Amg::Vector3D > > getConstituentPos(int Nvtx, const std::vector< int > &obj_vtx_link, const std::vector< double > &obj_x, const std::vector< double > &obj_y, const std::vector< double > &obj_z)
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi