ATLAS Offline Software
MSVtxPlotMaker.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "Utils.h"
6 #include "PlotAnnotations.h"
7 #include "MSVtxPlotMaker.h"
8 
9 
10 using namespace MuonVertexValidationMacroUtils;
12 
13 MSVtxPlotMaker::MSVtxPlotMaker(const std::string &datapath, const std::string &pltdir, const std::string &treename) :
14  m_datapath(datapath), m_treename(treename),
15  m_plotdir(pltdir),
16  m_plotdir_truthVtx(m_plotdir+"truthVtx/"),
17  m_plotdir_recoVtx(m_plotdir+"recoVtx/"),
18  m_plotdir_recoVtxHits(m_plotdir_recoVtx+"hits/"),
19  m_plotdir_vtxResiduals(m_plotdir+"vtxResiduals/"),
20  m_plotdir_inputObjects(m_plotdir+"inputObjects/"),
21  m_plotdir_vtxEfficiency(m_plotdir+"vtxEfficiency/"),
22  m_plotdir_vtxFakeRate(m_plotdir+"vtxFakeRate/")
23  {}
24 
25 
27 
28 
29 // --- core functions --- //
30 
32  // Generates a series of plots from the input data (m_datapath and m_treename) and stores these at m_plotdir
33  // as a figure and in a root file.
34  setup();
35  setPlotStyle();
36  formatPlots();
37  fillPlots();
38  outputResults();
39 }
40 
41 
43  // set up input file and its tree as well as the output root file.
44  m_input_file = std::make_unique<TFile>(m_datapath.c_str(), "read");
45  m_tree = (TTree*)m_input_file->Get(m_treename.c_str());
46  setupBranches();
47 
48  gSystem->mkdir(m_plotdir, kTRUE);
49  gSystem->mkdir(m_plotdir_truthVtx, kTRUE);
50  gSystem->mkdir(m_plotdir_recoVtx, kTRUE);
51  gSystem->mkdir(m_plotdir_recoVtxHits, kTRUE);
52  gSystem->mkdir(m_plotdir_vtxResiduals, kTRUE);
53  gSystem->mkdir(m_plotdir_inputObjects, kTRUE);
54  gSystem->mkdir(m_plotdir_vtxEfficiency, kTRUE);
55  gSystem->mkdir(m_plotdir_vtxFakeRate, kTRUE);
56  m_output_file = std::make_unique<TFile>(m_plotdir+"Histograms.root", "recreate");
57 
58  return;
59 }
60 
61 
63  // set the plot style and the color palette
64  gROOT->SetStyle("ATLAS");
65  TStyle* plotStyle = gROOT->GetStyle("ATLAS");
66  plotStyle->SetOptTitle(0);
67  plotStyle->SetHistLineWidth(1.);
68 
69  setColorPalette(plotStyle);
70  plotStyle->cd();
71  gROOT->ForceStyle();
72 
73  return;
74 }
75 
76 
78  // Call formating routines for the plots
79  formatTGraphs();
80 
81  return;
82 }
83 
84 
86  // main loop over the events which fills the plots
87 
88  for(int i=0; i<m_tree->GetEntries(); ++i){
89  m_tree->GetEntry(i);
90 
91  const std::vector<Amg::Vector3D> truth_vertices = getVertexPos(*m_truthVtx_x, *m_truthVtx_y, *m_truthVtx_z);
92  const std::vector<Amg::Vector3D> reco_vertices = getVertexPos(*m_msVtx_x, *m_msVtx_y, *m_msVtx_z);
93  const std::vector<std::vector<Amg::Vector3D>> reco_constituentPos = getConstituentPos(reco_vertices.size(), *m_obj_vtxLink,
94  *m_obj_x, *m_obj_y, *m_obj_z);
95 
96  fillTruthVtxPlots(truth_vertices);
98  fillRecoVtxPlots(reco_vertices, reco_constituentPos);
99  fillTruthComparisonHists(reco_vertices, truth_vertices);
100 
101  // histograms for vertex efficiency: fraction of truth vertices that are reconstructed
103  // histograms for vertex purity: fraction of reconstructed vertices that are truth vertices
105  }
106 
107  return;
108 }
109 
110 
112  // draw, save, write the plots
113  m_c = std::make_unique<TCanvas>();
114  m_output_file->cd();
115 
116 
117  // truth vertices
121  // position
124 
125 
126  // reconstructed vertices
130  // position
133  // chi squared
138  saveTH1(m_h_chi2prob_b, m_plotdir_recoVtx+"chi2_prob_b");
139  saveTH1(m_h_chi2prob_e, m_plotdir_recoVtx+"chi2_prob_e");
140  // constituents
141  saveTH1(m_h_Nconsti_b, m_plotdir_recoVtx+"Nconstituents_b");
142  saveTH1(m_h_Nconsti_e, m_plotdir_recoVtx+"Nconstituents_e");
143  saveTH1(m_h_VtxConsti_dR_b, m_plotdir_recoVtx+"VtxConsti_dR_b");
144  saveTH1(m_h_VtxConsti_dRmax_b, m_plotdir_recoVtx+"VtxConsti_dRmax_b");
145  saveTH1(m_h_VtxConsti_dphimax_b, m_plotdir_recoVtx+"VtxConsti_dphimax_b");
146  saveTH1(m_h_VtxConsti_detamax_b, m_plotdir_recoVtx+"VtxConsti_detamax_b");
147  saveTH1(m_h_VtxConsti_dR_e, m_plotdir_recoVtx+"VtxConsti_dR_e");
148  saveTH1(m_h_VtxConsti_dRmax_e, m_plotdir_recoVtx+"VtxConsti_dRmax_e");
149  saveTH1(m_h_VtxConsti_dphimax_e, m_plotdir_recoVtx+"VtxConsti_dphimax_e");
150  saveTH1(m_h_VtxConsti_detamax_e, m_plotdir_recoVtx+"VtxConsti_detamax_e");
151  // MDT hits
160  saveTH1(m_h_nMDT_InwardsTotal_b, m_plotdir_recoVtxHits+"nMDT_InwardsTotal_b");
161  saveTH1(m_h_nMDT_InwardsTotal_e, m_plotdir_recoVtxHits+"nMDT_InwardsTotal_e");
168  // RPC hits
177  // TGC hits
186 
187 
188  // input objects for the vertex reconstruction
189  // use counts from eta and phi histograms to fill the total number of objects available and used for reconstruction
191  TString::Format("#splitline{Used in}{reconstruction: %d}", int(m_h_objReco_eta->GetEntries())), TString::Format("Total: %d", int(m_h_obj_eta->GetEntries())),
192  TString("objN_stack; Number of objects; Events / bin"), m_plotdir_inputObjects+"objN_stack");
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");
208  // objects used for reconstruction
215 
216 
217  // vertex residuals
218  // barrel
225  // endcaps
232  // split into positive and negative eta
233  saveTH1(m_h_delta_Lxy_posEta_b, m_plotdir_vtxResiduals+"delta_Lxy_posEta_b", TString::Format("0 < #kern[-0.45]{#eta <} %.2f", fidVol_barrel_etaCut).Data());
234  saveTH1(m_h_delta_Lxy_negEta_b, m_plotdir_vtxResiduals+"delta_Lxy_negEta_b", TString::Format("-%.2f < #kern[-0.45]{#eta <} 0", fidVol_barrel_etaCut).Data());
236  saveTH1(m_h_delta_Lxy_negEta_e, m_plotdir_vtxResiduals+"delta_Lxy_negEta_e", TString::Format("-%.2f < #kern[-0.45]{#eta <} -%.2f", fidVol_endcaps_etaCut_up, fidVol_endcaps_etaCut_low).Data());
237  saveTH1(m_h_delta_z_posEta_b, m_plotdir_vtxResiduals+"delta_z_posEta_b", TString::Format("0 < #kern[-0.45]{#eta <} %.2f", fidVol_barrel_etaCut).Data());
238  saveTH1(m_h_delta_z_negEta_b, m_plotdir_vtxResiduals+"delta_z_negEta_b", TString::Format("-%.2f < #kern[-0.45]{#eta <} 0", fidVol_barrel_etaCut).Data());
240  saveTH1(m_h_delta_z_negEta_e, m_plotdir_vtxResiduals+"delta_z_negEta_e", TString::Format("-%.2f < #kern[-0.45]{#eta <} -%.2f", fidVol_endcaps_etaCut_up, fidVol_endcaps_etaCut_low).Data());
241 
242 
243  // vertex efficiency
244  // transverse distance: barrel
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");
250 
251  // longitudinal distance: endcap
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");
257 
258  // eta-binned
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");
264 
265  // distance form IP: barrel
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");
271 
272  // distance form IP: endcap
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");
278 
279 
280  // vertex fakerate
281  // transverse distance: barrel
282  TH1 *h_RecoNoTruth_Lxy_b = getUnmatchedHist(m_h_Reco_Lxy_b, m_h_RecoTruth_Lxy_b, TString("RecoNoTruth_b"));
283  saveTHStack(h_RecoNoTruth_Lxy_b, m_h_Reco_Lxy_b,
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");
286  saveTEfficiency(h_RecoNoTruth_Lxy_b, m_h_Reco_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");
288  // longitudinal distance: endcap
289  TH1 *h_RecoNoTruth_z_e = getUnmatchedHist(m_h_Reco_z_e, m_h_RecoTruth_z_e, TString("RecoNoTruth_e"));
290  saveTHStack(h_RecoNoTruth_z_e, m_h_Reco_z_e,
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");
293  saveTEfficiency(h_RecoNoTruth_z_e, m_h_Reco_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");
295 
296  // eta-binned
297  TH1 *h_RecoNoTruth_eta = getUnmatchedHist(m_h_Reco_eta, m_h_RecoTruth_eta, TString("RecoNoTruth_eta"));
298  saveTHStack(h_RecoNoTruth_eta, m_h_Reco_eta,
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");
301  saveTEfficiency(h_RecoNoTruth_eta, m_h_Reco_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");
303 
304  // distance form IP: barrel
305  TH1 *h_RecoNoTruth_r_b = getUnmatchedHist(m_h_Reco_r_b, m_h_RecoTruth_r_b, TString("RecoNoTruth_r_b"));
306  saveTHStack(h_RecoNoTruth_r_b, m_h_Reco_r_b,
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");
309  saveTEfficiency(h_RecoNoTruth_r_b, m_h_Reco_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");
311 
312  // distance form IP: endcaps
313  TH1 *h_RecoNoTruth_r_e = getUnmatchedHist(m_h_Reco_r_e, m_h_RecoTruth_r_e, TString("RecoNoTruth_r_e"));
314  saveTHStack(h_RecoNoTruth_r_e, m_h_Reco_r_e,
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");
317  saveTEfficiency(h_RecoNoTruth_r_e, m_h_Reco_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");
319 
320 
321  m_output_file->Write();
322  m_output_file->Delete("*;2"); // delete all nameclye 2 objects
323  m_output_file->Close();
324 
325  return;
326 }
327 
328 
329 
330 // --- setup branches and declare plots --- //
331 
333  // truth vertex variables
334  m_tree->SetBranchAddress("llpVtx_X", &m_truthVtx_x);
335  m_tree->SetBranchAddress("llpVtx_Y", &m_truthVtx_y);
336  m_tree->SetBranchAddress("llpVtx_Z", &m_truthVtx_z);
337 
338  // reconstructed vertex variables
339  m_tree->SetBranchAddress("msVtx_chi2", &m_msVtx_chi2);
340  m_tree->SetBranchAddress("msVtx_Ntrklet", &m_msVtx_Ntrklet);
341  m_tree->SetBranchAddress("msVtx_X", &m_msVtx_x);
342  m_tree->SetBranchAddress("msVtx_Y", &m_msVtx_y);
343  m_tree->SetBranchAddress("msVtx_Z", &m_msVtx_z);
344  // MDT hits near the vertex: total and per layer
345  m_tree->SetBranchAddress("msVtx_nMDT", &m_msVtx_nMDT);
346  m_tree->SetBranchAddress("msVtx_nMDT_inwards", &m_msVtx_nMDT_inwards);
347  m_tree->SetBranchAddress("msVtx_nMDT_I", &m_msVtx_nMDT_I);
348  m_tree->SetBranchAddress("msVtx_nMDT_M", &m_msVtx_nMDT_M);
349  m_tree->SetBranchAddress("msVtx_nMDT_O", &m_msVtx_nMDT_O);
350  // RPC hits near the vertex: total and per layer
351  m_tree->SetBranchAddress("msVtx_nRPC", &m_msVtx_nRPC);
352  m_tree->SetBranchAddress("msVtx_nRPC_inwards", &m_msVtx_nRPC_inwards);
353  m_tree->SetBranchAddress("msVtx_nRPC_I", &m_msVtx_nRPC_I);
354  m_tree->SetBranchAddress("msVtx_nRPC_M", &m_msVtx_nRPC_M);
355  m_tree->SetBranchAddress("msVtx_nRPC_O", &m_msVtx_nRPC_O);
356  // TGC hits near the vertex: total and per layer
357  m_tree->SetBranchAddress("msVtx_nTGC", &m_msVtx_nTGC);
358  m_tree->SetBranchAddress("msVtx_nTGC_inwards", &m_msVtx_nTGC_inwards);
359  m_tree->SetBranchAddress("msVtx_nTGC_I", &m_msVtx_nTGC_I);
360  m_tree->SetBranchAddress("msVtx_nTGC_M", &m_msVtx_nTGC_M);
361  m_tree->SetBranchAddress("msVtx_nTGC_O", &m_msVtx_nTGC_O);
362 
363  // input objects for the vertex reconstruction
364  m_tree->SetBranchAddress("trklet_posX", &m_obj_x);
365  m_tree->SetBranchAddress("trklet_posY", &m_obj_y);
366  m_tree->SetBranchAddress("trklet_posZ", &m_obj_z);
367  m_tree->SetBranchAddress("trklet_phi", &m_obj_phi);
368  m_tree->SetBranchAddress("trklet_theta", &m_obj_theta);
369  m_tree->SetBranchAddress("trklet_eta", &m_obj_eta);
370  m_tree->SetBranchAddress("trklet_vtxLink", &m_obj_vtxLink);
371 
372  return;
373 }
374 
375 
377  // Set the formating options for TGraph and TMultiGraph
378 
379  // Lxy-z map of truth vertices
380  m_zLxy_truth->SetTitle("zLxy_truth; Truth vertex z [m]; Truth vertex L_{xy} [m]");
381  m_zLxy_truth_b->SetMarkerColor(1); m_zLxy_truth_b->SetMarkerStyle(20); m_zLxy_truth_b->SetMarkerSize(0.5);
382  m_zLxy_truth_e->SetMarkerColor(2); m_zLxy_truth_e->SetMarkerStyle(20); m_zLxy_truth_e->SetMarkerSize(0.5);
383  m_zLxy_truth_out->SetMarkerColor(14); m_zLxy_truth_out->SetMarkerStyle(24); m_zLxy_truth_out->SetMarkerSize(0.5);
384  // eta-phi map of truth vertices
385  m_etaphi_truth->SetTitle("etaphi_truth; Truth vertex #eta; Truth vertex #phi [rad]");
386  m_etaphi_truth_b->SetMarkerColor(1); m_etaphi_truth_b->SetMarkerStyle(20); m_etaphi_truth_b->SetMarkerSize(0.5);
387  m_etaphi_truth_e->SetMarkerColor(2); m_etaphi_truth_e->SetMarkerStyle(20); m_etaphi_truth_e->SetMarkerSize(0.5);
388  m_etaphi_truth_out->SetMarkerColor(14); m_etaphi_truth_out->SetMarkerStyle(24); m_etaphi_truth_out->SetMarkerSize(0.5);
389 
390  // Lxy-z map of reconstructed vertices
391  m_zLxy->SetTitle("zLxy; Reco vertex z [m]; Reco vertex L_{xy} [m]");
392  m_zLxy_b->SetMarkerColor(1); m_zLxy_b->SetMarkerStyle(20); m_zLxy_b->SetMarkerSize(0.5);
393  m_zLxy_e->SetMarkerColor(2); m_zLxy_e->SetMarkerStyle(20); m_zLxy_e->SetMarkerSize(0.5);
394  m_zLxy_out->SetMarkerColor(14); m_zLxy_out->SetMarkerStyle(24); m_zLxy_out->SetMarkerSize(0.5);
395  // eta-phi map of reconstructed vertices
396  m_etaphi->SetTitle("etaphi; Reco vertex #eta; Reco vertex #phi [rad]");
397  m_etaphi_b->SetMarkerColor(1); m_etaphi_b->SetMarkerStyle(20); m_etaphi_b->SetMarkerSize(0.5);
398  m_etaphi_e->SetMarkerColor(2); m_etaphi_e->SetMarkerStyle(20); m_etaphi_e->SetMarkerSize(0.5);
399  m_etaphi_out->SetMarkerColor(14); m_etaphi_out->SetMarkerStyle(24); m_etaphi_out->SetMarkerSize(0.5);
400 
401  return;
402 }
403 
404 
405 // --- main filling functions --- //
406 
407 void MSVtxPlotMaker::fillTruthVtxPlots(const std::vector<Amg::Vector3D> &truth_vertices){
408 
409  fillNvtxHists(truth_vertices, m_h_NVtx_truth);
410  fillVtxPosMaps(truth_vertices, m_h_VtxPos_truth);
411  fillVtxPosHists(truth_vertices, m_h_VtxPosHists_truth);
412 
413  return;
414 }
415 
416 
418  // fill histograms for the objects from which vertices can be reconstructed
419 
420  int Nobj_count = m_obj_phi->size();
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};
424 
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;
429  m_h_obj_eta->Fill(obj_eta);
430  if (used_in_reco){
431  ++NobjReco_count;
432  m_h_objReco_eta->Fill(obj_eta);
433  }
434 
435  if (inBarrel(obj_eta)){
436  ++Nobj_count_b;
437  m_h_obj_phi_b->Fill(obj_phi);
438  if (used_in_reco){
439  ++NobjReco_count_b;
440  m_h_objReco_phi_b->Fill(obj_phi);
441  }
442  }
443  if (inEndcaps(obj_eta)){
444  ++Nobj_count_e;
445  m_h_obj_phi_e->Fill(obj_phi);
446  if (used_in_reco){
447  ++NobjReco_count_e;
448  m_h_objReco_phi_e->Fill(obj_phi);
449  }
450  }
451  }
452  m_h_Nobj->Fill(Nobj_count);
453  m_h_Nobj_b->Fill(Nobj_count_b);
454  m_h_Nobj_e->Fill(Nobj_count_e);
455  m_h_NobjReco->Fill(NobjReco_count);
456  m_h_NobjReco_b->Fill(NobjReco_count_b);
457  m_h_NobjReco_e->Fill(NobjReco_count_e);
458 
459  return;
460 }
461 
462 
463 void MSVtxPlotMaker::fillRecoVtxPlots(const std::vector<Amg::Vector3D> &reco_vertices, const std::vector<std::vector<Amg::Vector3D>> &reco_constituentPos){
464 
465  fillNvtxHists(reco_vertices, m_h_NVtx);
466  fillVtxPosMaps(reco_vertices, m_h_VtxPos);
467  fillVtxPosHists(reco_vertices, m_h_VtxPosHists);
468 
469  for (unsigned int j=0; j<reco_vertices.size(); ++j){
470  if (inBarrel(reco_vertices[j])){
471  m_h_Nconsti_b->Fill((*m_msVtx_Ntrklet)[j]);
473  fillAngularVtxConstiHists(reco_vertices[j], reco_constituentPos[j], m_h_AngularVtxConsti_b);
476  }
477  if (inEndcaps(reco_vertices[j])){
478  m_h_Nconsti_e->Fill((*m_msVtx_Ntrklet)[j]);
480  fillAngularVtxConstiHists(reco_vertices[j], reco_constituentPos[j], m_h_AngularVtxConsti_e);
483  }
484  }
485 
486  return;
487 }
488 
489 
490 void MSVtxPlotMaker::fillTruthComparisonHists(const std::vector<Amg::Vector3D> &reco_vertices, const std::vector<Amg::Vector3D> &truth_vertices){
491  // fills the histograms detailing the differences between reconstructed and truth vertices
492  for (const Amg::Vector3D &vtx : reco_vertices){
493  if (!inFiducialVol(vtx)) continue;
494  Amg::Vector3D truth_vtx = findBestMatch(vtx, truth_vertices);
495  if (!isValidMatch(truth_vtx)) continue;
496 
497  double dR = xAOD::P4Helpers::deltaR(vtx.eta(), vtx.phi(), truth_vtx.eta(), truth_vtx.phi()); // angular distance
498  double d_theta = vtx.theta() - truth_vtx.theta();
499  double d_phi = Amg::deltaPhi(vtx, truth_vtx);
500  double d_Lxy = (vtx.perp() - truth_vtx.perp())/Gaudi::Units::cm; // distance in transverse plane
501  double d_z = (vtx.z() - truth_vtx.z())/Gaudi::Units::cm; // in cm
502  double d_phys = Amg::distance(vtx, truth_vtx)/Gaudi::Units::cm; // distance to the IP in cm
503 
504  if (inFiducialVolBarrel(vtx)) fillResidualHists(truth_vtx.eta(), dR, d_theta, d_phi, d_Lxy, d_z, d_phys, m_h_VtxResiduals_b);
505  if (inFiducialVolEndcaps(vtx)) fillResidualHists(truth_vtx.eta(), dR, d_theta, d_phi, d_Lxy, d_z, d_phys, m_h_VtxResiduals_e);
506  }
507 
508  return;
509 }
510 
511 
512 void MSVtxPlotMaker::fillEfficiency_NumeratorDenominatorHists(const std::vector<Amg::Vector3D> &vertices, const std::vector<Amg::Vector3D> &match_candidates,
513  std::unique_ptr<EffInputTH1> &denomHists, std::unique_ptr<EffInputTH1> &numHists){
514  // Fills the transverse distance (barrel vertices only), longitudinal distance (endcaps vertices only), eta-binned, and distance to the IP binned histograms
515  // for vertices passing the good vertex selection. These are the denominator histograms for efficiency calculations.
516  // If additionally, the vertex can be macthed to an element in match_candidates, the numerator histograms are filled.
517 
518  for(const Amg::Vector3D &vtx : vertices){
519  if (!isGoodVtx(vtx)) continue;
520  fillVtxPosFiducialVolHists(vtx, denomHists);
521  if (!hasMatch(vtx, match_candidates)) continue;
522  fillVtxPosFiducialVolHists(vtx, numHists);
523  }
524 
525  return;
526 }
527 
528 
529 // --- helper filling functions --- //
530 
531 void MSVtxPlotMaker::fillNvtxHists(const std::vector<Amg::Vector3D> &vertices, std::unique_ptr<NVtxTH1> &hists){
532  // Fills the number of vertices in the whole detector region and split into barrel and endcaps.
533  hists->h_Nvtx->Fill(getNvtxDetectorRegion(vertices));
534  hists->h_Nvtx_b->Fill(getNvtxBarrel(vertices));
535  hists->h_Nvtx_e->Fill(getNvtxEndcaps(vertices));
536 
537  return;
538 }
539 
540 
541 void MSVtxPlotMaker::fillVtxPosMaps(const std::vector<Amg::Vector3D> &vertices, std::unique_ptr<VtxPosTGraph> &graphs){
542  // Fills the barrel, endcaps, or outside the detector region z-Lxy and eta-phi maps with the vertex position.
543  for (const Amg::Vector3D &vtx : vertices){
544  if (inBarrel(vtx)){
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());
547  }
548  else if (inEndcaps(vtx)){
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());
551  }
552  else {
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());
555  }
556  }
557 
558  return;
559 }
560 
561 
562 void MSVtxPlotMaker::fillVtxPosHists(const std::vector<Amg::Vector3D> &vertices, std::unique_ptr<VtxPosTH> &hists){
563  // Fills the transverse distance, longitudinal distance, eta-binned, phi-binned and distance to the IP -binned histograms
564  // Requires the vertex to be within the detector region (inside the barrel or endcaps).
565 
566  for (const Amg::Vector3D &vtx : vertices){
567  if (!inDetectorRegion(vtx)) continue;
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);
571  }
572 
573  return;
574 }
575 
576 
577 void MSVtxPlotMaker::fillChi2Hists(double chi2, double NDoF, std::unique_ptr<Chi2TH1> &hists){
578  // Fills histograms related to the chi2 value of the vertex fit.
579  hists->h_chi2->Fill(chi2);
580  hists->h_chi2nDoF->Fill(chi2/NDoF);
581  hists->h_chi2prob->Fill( TMath::Prob(chi2, NDoF-1));
582 
583  return;
584 }
585 
586 
587 void MSVtxPlotMaker::fillAngularVtxConstiHists(const Amg::Vector3D &vtx, const std::vector<Amg::Vector3D> &consti, std::unique_ptr<AngularVtxConstiTH1> &hists){
588  // Fills histograms with the angular differences between the vertex and its constituents.
589 
590  if (consti.size() == 0) return; // no constituents
591 
592  double dphi{-1}, deta{-1}, deltaR{-1};
593  double dphi_max{0}, deta_max{0}, dR_max{0};
594 
595  for (const Amg::Vector3D &c : consti){
596  dphi = xAOD::P4Helpers::deltaPhi(vtx.phi(), c.phi());
597  deta = vtx.eta() - c.eta();
598  deltaR = xAOD::P4Helpers::deltaR(vtx.eta(), vtx.phi(), c.eta(), c.phi());
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;
602  if (deltaR > dR_max) dR_max = deltaR;
603  }
604 
605  hists->h_dphimax->Fill(dphi_max);
606  hists->h_detamax->Fill(deta_max);
607  hists->h_dRmax->Fill(dR_max);
608 
609  return;
610 }
611 
612 
613 void MSVtxPlotMaker::fillVtxNhitsHists(double total, double inwards, double inner, double middle, double outer, std::unique_ptr<NHitsTH1> &hists){
614  // Fills histograms with the number of hits associated to the vertex, hits inwards of the vertex and the ratios between hits in different muon spectrometer layers.
615 
616  if (total < 0) return; // no hits
617 
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);
626 
627  return;
628 }
629 
630 
631 void MSVtxPlotMaker::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){
632  // Fills histograms with the differences between the reconstructed and the matched truth vertex.
633  // The value of eta can be used to split the histograms into positive and negative eta regions.
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);
640 
641  if (eta >= 0){
642  hists->h_delta_Lxy_posEta->Fill(d_Lxy);
643  hists->h_delta_z_posEta->Fill(d_z);
644  }
645  else {
646  hists->h_delta_Lxy_negEta->Fill(d_Lxy);
647  hists->h_delta_z_negEta->Fill(d_z);
648  }
649 
650  return;
651 }
652 
653 
654 void MSVtxPlotMaker::fillVtxPosFiducialVolHists(const Amg::Vector3D &vtx, std::unique_ptr<EffInputTH1> &hists){
655  // Fills the transverse distance (barrel vertices only), longitudinal distance (endcaps vertices only),
656  // eta-binned, and distance to the IP binned histograms.
657  if (inFiducialVolBarrel(vtx)){
658  hists->h_Lxy->Fill(vtx.perp()/Gaudi::Units::m);
659  hists->h_distanceToIP_b->Fill(vtx.mag()/Gaudi::Units::m);
660  }
661  if (inFiducialVolEndcaps(vtx)){
662  hists->h_z->Fill(std::abs(vtx.z()/Gaudi::Units::m));
663  hists->h_distanceToIP_e->Fill(vtx.mag()/Gaudi::Units::m);
664  }
665  hists->h_eta->Fill(vtx.eta());
666 
667  return;
668 }
669 
670 
671 // --- plots savers --- //
672 
673 void MSVtxPlotMaker::saveVtxPos(std::unique_ptr<VtxPosTH> &hists, const TString &plotdir){
674  // Saves the passed TH2s and TH1.
675  saveTH2(hists->h_zLxy, plotdir+"zLxy");
676  saveTH2(hists->h_etaphi, plotdir+"etaphi");
677 
678  // project and save the 1D histograms
679  const TString extra = plotdir.Contains("truth") ? TString("_truth") : TString("");
680 
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()); // adjust range
686  saveTH1(h_phi, plotdir+"phi"+extra, "", "Vertices / bin");
687  saveTH1(hists->h_distanceToIP, plotdir+"distanceToIP");
688 
689  return;
690 }
691 
692 
693 void MSVtxPlotMaker::saveTGraph(TMultiGraph* zLxy, TMultiGraph* etaphi, std::unique_ptr<VtxPosTGraph> &graphs, const TString &plotdir){
694  // Combines the TGraph objects to a the TMultiGraph and save it.
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);
700  zLxy->Draw("A");
701  drawATLASlabel("Simulation Internal");
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");
707  legend_zLxy->Draw();
708  m_c->SaveAs(plotdir+"map_zLxy.pdf");
709  zLxy->Write();
710 
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);
716  etaphi->Draw("A");
717  drawATLASlabel("Simulation Internal");
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");
725  etaphi->Write();
726 
727  return;
728 }
729 
730 
731 void MSVtxPlotMaker::saveTH1(TH1* h, TString plotpath, const char* dectectorLabel, const char* new_ylabel, bool norm, bool logy){
732  // Saves the histogram with a detector label annotation and optionally normalizes (giving the frequency probability for each bin) it.
733  // Also allows to set a new y axis label and plot with a log y scale
734  // If normalisation or log scaling is applied, "_norm" or "_log" are appended to the histogram and file name
735 
736  double maxy_factor = 1.4; // assures sufficeint space of annotations
737 
738  if (norm){
739  h->Scale(1. / h->Integral()); // Add the argument "width" to normalize by bin-count*width to get the approximate pdf
740  h->SetName(TString(h->GetName())+"_norm");
741  plotpath = plotpath.Insert(plotpath.Last(*"."),"_norm");
742  }
743 
744  if (logy){
745  gPad->SetLogy();
746  h->SetName(TString(h->GetName())+"_log");
747  plotpath = plotpath.Insert(plotpath.Last(*"."),"_log");
748  maxy_factor = 4;
749  }
750 
751  if (new_ylabel){
752  h->GetYaxis()->SetTitle(new_ylabel);
753  }
754 
755  h->SetMaximum(h->GetMaximum()*maxy_factor);
756  h->Draw("hist");
757  drawDetectorRegionLabel(h->GetName(), dectectorLabel);
758  drawATLASlabel("Simulation Internal");
759  m_c->SaveAs(plotpath+".pdf");
760  h->Write();
761 
762  // reset log scale for next plots
763  gPad->SetLogy(0);
764 
765  return;
766 }
767 
768 
769 void MSVtxPlotMaker::saveTHStack(TH1* h1, TH1* h2,
770  const TString &h1_legend, const TString &h2_legend,
771  const TString &title, const TString &plotpath,
772  int color1, int color2){
773  // save the passed TH1 as a THStack.
774  // The THStack title is required to have the format "name; x-axis label; y-axis label"
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);
780  h_stack->Add(h1);
781  h_stack->Add(h2);
782  // adjust maximum for sufficent space for annotations and draw
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());
788  // add annotations
789  TLegend* legend = makeLegend();
790  legend->AddEntry(h1, h1_legend, "l");
791  legend->AddEntry(h2, h2_legend, "l");
792  legend->Draw();
794  drawATLASlabel("Simulation Internal");
795 
796  m_c->SaveAs(plotpath+".pdf");
797  h_stack->Write();
798 
799  return;
800 }
801 
802 
803 void MSVtxPlotMaker::saveTEfficiency(TH1* h_num, TH1* h_denom,
804  const TString &title, const TString &plotpath){
805  // computes a TEfficiency object from the passed numerator and denominator histogram and saves it
806 
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());
811  // set drawing style and draw
812  h_eff->SetLineColor(1);
813  h_eff->SetMarkerColor(1);
814  h_eff->SetMarkerSize(0.5);
815  h_eff->SetMarkerStyle(24);
816  h_eff->Draw();
817  gPad->Update();
818  // adjust maximum for sufficient space for annotations and draw annotations
819  TGraphAsymmErrors* g_eff = h_eff->GetPaintedGraph();
820  double maxy = getMaxy(g_eff);
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());
824  // annotations
825  if (TString(h_eff->GetName()).Contains("_Lxy_")) drawDetectorBoundaryLines("Lxy", 1.1*maxy);
826  if (TString(h_eff->GetName()).Contains("_z_")) drawDetectorBoundaryLines("z", 1.1*maxy);
827  drawDetectorRegionLabel(h_eff->GetName());
828  drawATLASlabel("Simulation Internal");
829  gPad->Update();
830 
831  m_c->SaveAs(plotpath+".pdf");
832  h_eff->Write();
833 
834  return;
835 }
836 
837 
838 void MSVtxPlotMaker::saveTH2(TH2* h, const TString &plotpath){
839  // adjust margins to fit the palette on the pad
840  gPad->SetRightMargin(0.15);
841  h->Draw("colz");
842  drawATLASlabel("Simulation Internal");
843  m_c->SaveAs(plotpath+".pdf");
844  gPad->SetRightMargin(0.05); // reset margin for next plots
845 
846  return;
847 }
848 
849 
850 // --- other helper functions --- //
851 
852 
853 void MSVtxPlotMaker::setColorPalette(TStyle *plotStyle){
854  // define a custom colour palette
855  Int_t palette[100];
856  // define colours and compute the gradient between them.
857  // the i-th entry in the following arrays defines the rgb values
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));
863  // fill the pallette with the gradient
864  for (unsigned int i=0; i<std::size(palette); i++) palette[i] = firstColorIdx+i;
865 
866  plotStyle->SetPalette(std::size(palette), palette);
867  // plotStyle->SetPalette(kBlueRedYellow); // more standard color palette
868  plotStyle->SetNumberContours(100);
869 
870  return;
871 }
872 
873 
874 TH1* MSVtxPlotMaker::getUnmatchedHist(TH1* h_all, TH1* h_matched, const TString &name_unmatched){
875  // takes the difference between the all vertices and the matched vertices to get the unmatched vertices
876  TH1* h_unmatched = (TH1*)h_all->Clone(name_unmatched);
877  h_unmatched->Add(h_matched, -1);
878  return h_unmatched;
879 }
MSVtxPlotMaker::MSVtxPlotMaker
MSVtxPlotMaker(const std::string &datapath, const std::string &pltdir, const std::string &treename="MSVtxValidTree")
Definition: MSVtxPlotMaker.cxx:13
MSVtxPlotMaker::m_h_TruthReco_Lxy_b
TH1 * m_h_TruthReco_Lxy_b
Definition: MSVtxPlotMaker.h:382
MSVtxPlotMaker::m_h_nTGC_IO
TH1 * m_h_nTGC_IO
Definition: MSVtxPlotMaker.h:333
MSVtxPlotMaker::fillEfficiency_NumeratorDenominatorHists
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)
Definition: MSVtxPlotMaker.cxx:512
MSVtxPlotMaker::m_h_VtxConsti_dRmax_b
TH1 * m_h_VtxConsti_dRmax_b
Definition: MSVtxPlotMaker.h:288
MSVtxPlotMaker::m_h_delta_z_b
TH1 * m_h_delta_z_b
Definition: MSVtxPlotMaker.h:361
MSVtxPlotMaker::fillTruthVtxPlots
void fillTruthVtxPlots(const std::vector< Amg::Vector3D > &truth_vertices)
Definition: MSVtxPlotMaker.cxx:407
MSVtxPlotMaker::m_h_obj_eta
TH1 * m_h_obj_eta
Definition: MSVtxPlotMaker.h:347
MSVtxPlotMaker::m_etaphi_b
TGraph * m_etaphi_b
Definition: MSVtxPlotMaker.h:268
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
MSVtxPlotMaker::m_h_NobjReco
TH1 * m_h_NobjReco
Definition: MSVtxPlotMaker.h:341
MSVtxPlotMaker::m_h_chi2_b
TH1 * m_h_chi2_b
Definition: MSVtxPlotMaker.h:277
MSVtxPlotMaker::m_h_nMDT_MO_b
TH1 * m_h_nMDT_MO_b
Definition: MSVtxPlotMaker.h:315
MSVtxPlotMaker::m_h_Truth_r_b
TH1 * m_h_Truth_r_b
Definition: MSVtxPlotMaker.h:396
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
MSVtxPlotMaker::m_h_VtxConsti_dphimax_e
TH1 * m_h_VtxConsti_dphimax_e
Definition: MSVtxPlotMaker.h:293
MSVtxPlotMaker::m_h_Reco_r_e
TH1 * m_h_Reco_r_e
Definition: MSVtxPlotMaker.h:399
MuonVertexValidationMacroPlotAnnotations::getMaxy
double getMaxy(const TGraphAsymmErrors *graph, double current_max)
Definition: PlotAnnotations.cxx:103
MSVtxPlotMaker::fillAngularVtxConstiHists
void fillAngularVtxConstiHists(const Amg::Vector3D &vtx, const std::vector< Amg::Vector3D > &consti, std::unique_ptr< AngularVtxConstiTH1 > &hists)
Definition: MSVtxPlotMaker.cxx:587
MSVtxPlotMaker::m_h_Nhits_MDT_b
std::unique_ptr< NHitsTH1 > m_h_Nhits_MDT_b
Definition: MSVtxPlotMaker.h:423
MSVtxPlotMaker::m_truthVtx_x
std::vector< double > * m_truthVtx_x
Definition: MSVtxPlotMaker.h:197
MSVtxPlotMaker::m_h_Nobj
TH1 * m_h_Nobj
Definition: MSVtxPlotMaker.h:338
MSVtxPlotMaker::m_h_nRPC
TH1 * m_h_nRPC
Definition: MSVtxPlotMaker.h:318
MSVtxPlotMaker::m_msVtx_nMDT_M
std::vector< int > * m_msVtx_nMDT_M
Definition: MSVtxPlotMaker.h:209
MSVtxPlotMaker::m_h_delta_z_negEta_e
TH1 * m_h_delta_z_negEta_e
Definition: MSVtxPlotMaker.h:373
MSVtxPlotMaker::m_truthVtx_z
std::vector< double > * m_truthVtx_z
Definition: MSVtxPlotMaker.h:199
MSVtxPlotMaker::m_h_delta_Lxy_posEta_b
TH1 * m_h_delta_Lxy_posEta_b
Definition: MSVtxPlotMaker.h:366
MSVtxPlotMaker::m_h_delta_R_b
TH1 * m_h_delta_R_b
Definition: MSVtxPlotMaker.h:353
MSVtxPlotMaker::m_h_nMDT_IM_e
TH1 * m_h_nMDT_IM_e
Definition: MSVtxPlotMaker.h:312
MSVtxPlotMaker::m_h_Nhits_TGC
std::unique_ptr< NHitsTH1 > m_h_Nhits_TGC
Definition: MSVtxPlotMaker.h:426
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
graphs
Definition: graphs.py:1
MSVtxPlotMaker::m_h_nMDT_IO_e
TH1 * m_h_nMDT_IO_e
Definition: MSVtxPlotMaker.h:314
MSVtxPlotMaker::m_h_TruthReco_r_e
TH1 * m_h_TruthReco_r_e
Definition: MSVtxPlotMaker.h:402
Data
@ Data
Definition: BaseObject.h:11
Amg::deltaPhi
double deltaPhi(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
Definition: GeoPrimitivesHelpers.h:113
MSVtxPlotMaker::m_h_nMDT_IM_b
TH1 * m_h_nMDT_IM_b
Definition: MSVtxPlotMaker.h:311
MSVtxPlotMaker::m_h_VtxConsti_dphimax_b
TH1 * m_h_VtxConsti_dphimax_b
Definition: MSVtxPlotMaker.h:289
MSVtxPlotMaker::saveTH1
void saveTH1(TH1 *h, TString plotpath, const char *dectectorLabel="", const char *new_ylabel=nullptr, bool norm=false, bool logy=false)
Definition: MSVtxPlotMaker.cxx:731
MuonVertexValidationMacroUtils::getNvtxDetectorRegion
int getNvtxDetectorRegion(const std::vector< Amg::Vector3D > &vertices)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:49
MSVtxPlotMaker::m_zLxy_truth_e
TGraph * m_zLxy_truth_e
Definition: MSVtxPlotMaker.h:242
StateLessPT_NewConfig.Format
Format
Definition: StateLessPT_NewConfig.py:146
MSVtxPlotMaker::m_h_AngularVtxConsti_e
std::unique_ptr< AngularVtxConstiTH1 > m_h_AngularVtxConsti_e
Definition: MSVtxPlotMaker.h:419
MSVtxPlotMaker::m_h_Truth
std::unique_ptr< EffInputTH1 > m_h_Truth
Definition: MSVtxPlotMaker.h:428
MSVtxPlotMaker::m_h_delta_phys_e
TH1 * m_h_delta_phys_e
Definition: MSVtxPlotMaker.h:364
MuonVertexValidationMacroUtils::fidVol_endcaps_etaCut_low
constexpr double fidVol_endcaps_etaCut_low
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.h:22
MSVtxPlotMaker::m_msVtx_nRPC_O
std::vector< int > * m_msVtx_nRPC_O
Definition: MSVtxPlotMaker.h:215
MuonVertexValidationMacroUtils::getVertexPos
std::vector< Amg::Vector3D > getVertexPos(const std::vector< double > &vtx_x, const std::vector< double > &vtx_y, const std::vector< double > &vtx_z)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:131
MSVtxPlotMaker::m_h_Nvtx_b
TH1 * m_h_Nvtx_b
Definition: MSVtxPlotMaker.h:258
MSVtxPlotMaker::m_zLxy_e
TGraph * m_zLxy_e
Definition: MSVtxPlotMaker.h:264
MSVtxPlotMaker::m_h_delta_z_posEta_e
TH1 * m_h_delta_z_posEta_e
Definition: MSVtxPlotMaker.h:372
MSVtxPlotMaker::m_etaphi_out
TGraph * m_etaphi_out
Definition: MSVtxPlotMaker.h:270
MuonVertexValidationMacroUtils::isGoodVtx
bool isGoodVtx(const Amg::Vector3D &vtx)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:84
MuonVertexValidationMacroUtils::getConstituentPos
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)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:142
MSVtxPlotMaker::m_input_file
std::unique_ptr< TFile > m_input_file
Definition: MSVtxPlotMaker.h:192
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
MSVtxPlotMaker::fillChi2Hists
void fillChi2Hists(double chi2, double NDoF, std::unique_ptr< Chi2TH1 > &hists)
Definition: MSVtxPlotMaker.cxx:577
MSVtxPlotMaker::fillTruthComparisonHists
void fillTruthComparisonHists(const std::vector< Amg::Vector3D > &reco_vertices, const std::vector< Amg::Vector3D > &truth_vertices)
Definition: MSVtxPlotMaker.cxx:490
MSVtxPlotMaker::m_plotdir_inputObjects
TString m_plotdir_inputObjects
Definition: MSVtxPlotMaker.h:188
MSVtxPlotMaker::m_h_nTGC_M
TH1 * m_h_nTGC_M
Definition: MSVtxPlotMaker.h:329
MuonVertexValidationMacroPlotAnnotations::drawATLASlabel
void drawATLASlabel(const char *text, double x, double y, double textsize)
Definition: PlotAnnotations.cxx:23
MSVtxPlotMaker::m_h_nRPC_IM
TH1 * m_h_nRPC_IM
Definition: MSVtxPlotMaker.h:323
MSVtxPlotMaker::m_h_RecoTruth_z_e
TH1 * m_h_RecoTruth_z_e
Definition: MSVtxPlotMaker.h:385
MSVtxPlotMaker::m_h_Nhits_RPC
std::unique_ptr< NHitsTH1 > m_h_Nhits_RPC
Definition: MSVtxPlotMaker.h:425
MSVtxPlotMaker::m_msVtx_x
std::vector< double > * m_msVtx_x
Definition: MSVtxPlotMaker.h:203
MSVtxPlotMaker::m_msVtx_nTGC_O
std::vector< int > * m_msVtx_nTGC_O
Definition: MSVtxPlotMaker.h:220
MSVtxPlotMaker::m_h_nMDT_MO_e
TH1 * m_h_nMDT_MO_e
Definition: MSVtxPlotMaker.h:316
MSVtxPlotMaker::m_msVtx_nTGC
std::vector< int > * m_msVtx_nTGC
Definition: MSVtxPlotMaker.h:216
MSVtxPlotMaker::m_h_Nvtx_truth_e
TH1 * m_h_Nvtx_truth_e
Definition: MSVtxPlotMaker.h:237
MSVtxPlotMaker::m_obj_theta
std::vector< double > * m_obj_theta
Definition: MSVtxPlotMaker.h:226
MSVtxPlotMaker::m_msVtx_nMDT_I
std::vector< int > * m_msVtx_nMDT_I
Definition: MSVtxPlotMaker.h:208
MSVtxPlotMaker::m_h_nMDT_M_b
TH1 * m_h_nMDT_M_b
Definition: MSVtxPlotMaker.h:305
MSVtxPlotMaker::m_h_chi2_e
TH1 * m_h_chi2_e
Definition: MSVtxPlotMaker.h:278
MSVtxPlotMaker::makePlots
void makePlots()
Definition: MSVtxPlotMaker.cxx:31
MSVtxPlotMaker::m_obj_phi
std::vector< double > * m_obj_phi
Definition: MSVtxPlotMaker.h:225
MSVtxPlotMaker::saveTEfficiency
void saveTEfficiency(TH1 *h_num, TH1 *h_denom, const TString &title, const TString &plotpath)
Definition: MSVtxPlotMaker.cxx:803
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
MSVtxPlotMaker::m_h_nMDT_e
TH1 * m_h_nMDT_e
Definition: MSVtxPlotMaker.h:302
MSVtxPlotMaker::m_zLxy
TMultiGraph * m_zLxy
Definition: MSVtxPlotMaker.h:262
MSVtxPlotMaker::m_h_Nvtx
TH1 * m_h_Nvtx
Definition: MSVtxPlotMaker.h:257
MSVtxPlotMaker::m_h_delta_Lxy_posEta_e
TH1 * m_h_delta_Lxy_posEta_e
Definition: MSVtxPlotMaker.h:367
MSVtxPlotMaker::fillVtxNhitsHists
void fillVtxNhitsHists(double total, double inwards, double inner, double middle, double outer, std::unique_ptr< NHitsTH1 > &hists)
Definition: MSVtxPlotMaker.cxx:613
MSVtxPlotMaker::m_h_RecoTruth_eta
TH1 * m_h_RecoTruth_eta
Definition: MSVtxPlotMaker.h:390
MSVtxPlotMaker::m_h_nTGC_MO
TH1 * m_h_nTGC_MO
Definition: MSVtxPlotMaker.h:334
MSVtxPlotMaker::m_zLxy_out
TGraph * m_zLxy_out
Definition: MSVtxPlotMaker.h:265
MSVtxPlotMaker::formatPlots
void formatPlots()
Definition: MSVtxPlotMaker.cxx:77
MSVtxPlotMaker::m_h_nRPC_InwardsTotal
TH1 * m_h_nRPC_InwardsTotal
Definition: MSVtxPlotMaker.h:322
MuonVertexValidationMacroUtils
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:8
MSVtxPlotMaker::m_h_chi2prob_b
TH1 * m_h_chi2prob_b
Definition: MSVtxPlotMaker.h:281
MuonVertexValidationMacroUtils::fidVol_endcaps_etaCut_up
constexpr double fidVol_endcaps_etaCut_up
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.h:23
MSVtxPlotMaker::m_h_delta_phi_b
TH1 * m_h_delta_phi_b
Definition: MSVtxPlotMaker.h:357
MSVtxPlotMaker::m_h_nMDT_I_e
TH1 * m_h_nMDT_I_e
Definition: MSVtxPlotMaker.h:304
MSVtxPlotMaker::m_h_Reco
std::unique_ptr< EffInputTH1 > m_h_Reco
Definition: MSVtxPlotMaker.h:430
logy
bool logy
Definition: listroot.cxx:45
MSVtxPlotMaker::m_h_delta_Lxy_negEta_b
TH1 * m_h_delta_Lxy_negEta_b
Definition: MSVtxPlotMaker.h:368
MSVtxPlotMaker::saveTHStack
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)
Definition: MSVtxPlotMaker.cxx:769
MSVtxPlotMaker::m_h_nRPC_MO
TH1 * m_h_nRPC_MO
Definition: MSVtxPlotMaker.h:325
MSVtxPlotMaker::m_plotdir_recoVtxHits
TString m_plotdir_recoVtxHits
Definition: MSVtxPlotMaker.h:186
MSVtxPlotMaker::m_plotdir
TString m_plotdir
Definition: MSVtxPlotMaker.h:183
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
MSVtxPlotMaker::m_h_VtxConsti_dR_e
TH1 * m_h_VtxConsti_dR_e
Definition: MSVtxPlotMaker.h:291
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MSVtxPlotMaker::m_h_TruthRecoMatched
std::unique_ptr< EffInputTH1 > m_h_TruthRecoMatched
Definition: MSVtxPlotMaker.h:429
MSVtxPlotMaker::m_tree
TTree * m_tree
Definition: MSVtxPlotMaker.h:191
MSVtxPlotMaker::m_msVtx_nMDT_inwards
std::vector< int > * m_msVtx_nMDT_inwards
Definition: MSVtxPlotMaker.h:207
MSVtxPlotMaker::m_h_chi2nDoF_b
TH1 * m_h_chi2nDoF_b
Definition: MSVtxPlotMaker.h:279
MSVtxPlotMaker::m_h_delta_phys_b
TH1 * m_h_delta_phys_b
Definition: MSVtxPlotMaker.h:363
MSVtxPlotMaker::m_h_chi2nDoF_e
TH1 * m_h_chi2nDoF_e
Definition: MSVtxPlotMaker.h:280
MSVtxPlotMaker::m_h_delta_Lxy_e
TH1 * m_h_delta_Lxy_e
Definition: MSVtxPlotMaker.h:360
MSVtxPlotMaker::m_h_Reco_eta
TH1 * m_h_Reco_eta
Definition: MSVtxPlotMaker.h:389
MSVtxPlotMaker::m_h_nMDT_O_e
TH1 * m_h_nMDT_O_e
Definition: MSVtxPlotMaker.h:308
MSVtxPlotMaker::m_h_Reco_r_b
TH1 * m_h_Reco_r_b
Definition: MSVtxPlotMaker.h:394
MSVtxPlotMaker::m_h_nRPC_IO
TH1 * m_h_nRPC_IO
Definition: MSVtxPlotMaker.h:324
MuonVertexValidationMacroPlotAnnotations::drawDetectorRegionLabel
void drawDetectorRegionLabel(const char *name, const char *customlabel, double x, double y, double textsize)
Definition: PlotAnnotations.cxx:35
MSVtxPlotMaker::m_zLxy_truth
TMultiGraph * m_zLxy_truth
Definition: MSVtxPlotMaker.h:240
MSVtxPlotMaker::m_zLxy_truth_b
TGraph * m_zLxy_truth_b
Definition: MSVtxPlotMaker.h:241
MSVtxPlotMaker::m_etaphi_truth_out
TGraph * m_etaphi_truth_out
Definition: MSVtxPlotMaker.h:248
lumiFormat.i
int i
Definition: lumiFormat.py:85
MSVtxPlotMaker::m_h_RecoTruth_r_b
TH1 * m_h_RecoTruth_r_b
Definition: MSVtxPlotMaker.h:395
xAOD::P4Helpers::deltaR
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Definition: xAODP4Helpers.h:150
python.html.AtlRunQueryDQSummary.datapath
datapath
Definition: AtlRunQueryDQSummary.py:1205
PlotAnnotations.h
MSVtxPlotMaker::m_h_Nconsti_b
TH1 * m_h_Nconsti_b
Definition: MSVtxPlotMaker.h:284
h
MSVtxPlotMaker::m_h_nTGC
TH1 * m_h_nTGC
Definition: MSVtxPlotMaker.h:327
MSVtxPlotMaker::m_c
std::unique_ptr< TCanvas > m_c
Definition: MSVtxPlotMaker.h:194
MSVtxPlotMaker::m_h_Truth_eta
TH1 * m_h_Truth_eta
Definition: MSVtxPlotMaker.h:391
MSVtxPlotMaker::m_h_Nobj_b
TH1 * m_h_Nobj_b
Definition: MSVtxPlotMaker.h:339
MSVtxPlotMaker::m_h_nRPC_I
TH1 * m_h_nRPC_I
Definition: MSVtxPlotMaker.h:319
MSVtxPlotMaker::m_zLxy_b
TGraph * m_zLxy_b
Definition: MSVtxPlotMaker.h:263
Utils.h
covarianceTool.title
title
Definition: covarianceTool.py:542
MSVtxPlotMaker::m_treename
std::string m_treename
Definition: MSVtxPlotMaker.h:182
MuonVertexValidationMacroPlotAnnotations::drawDetectorBoundaryLines
void drawDetectorBoundaryLines(const char *bin_var, double y_max)
Definition: PlotAnnotations.cxx:84
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
MSVtxPlotMaker::m_h_VtxConsti_dR_b
TH1 * m_h_VtxConsti_dR_b
Definition: MSVtxPlotMaker.h:287
MSVtxPlotMaker::fillVtxPosHists
void fillVtxPosHists(const std::vector< Amg::Vector3D > &vertices, std::unique_ptr< VtxPosTH > &hists)
Definition: MSVtxPlotMaker.cxx:562
MSVtxPlotMaker::m_msVtx_nMDT
std::vector< int > * m_msVtx_nMDT
Definition: MSVtxPlotMaker.h:206
MSVtxPlotMaker::saveTGraph
void saveTGraph(TMultiGraph *zLxy, TMultiGraph *etaphi, std::unique_ptr< VtxPosTGraph > &graphs, const TString &plotdir)
Definition: MSVtxPlotMaker.cxx:693
MSVtxPlotMaker::m_plotdir_truthVtx
TString m_plotdir_truthVtx
Definition: MSVtxPlotMaker.h:184
MSVtxPlotMaker::m_h_Reco_Lxy_b
TH1 * m_h_Reco_Lxy_b
Definition: MSVtxPlotMaker.h:379
python.handimod.Green
int Green
Definition: handimod.py:524
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
MSVtxPlotMaker::m_h_nMDT_b
TH1 * m_h_nMDT_b
Definition: MSVtxPlotMaker.h:301
MSVtxPlotMaker::m_etaphi
TMultiGraph * m_etaphi
Definition: MSVtxPlotMaker.h:267
MuonVertexValidationMacroPlotAnnotations::makeLegend
TLegend * makeLegend(double lower_x, double lower_y, double upper_x, double upper_y, double textsize)
Definition: PlotAnnotations.cxx:13
MSVtxPlotMaker::m_h_nTGC_O
TH1 * m_h_nTGC_O
Definition: MSVtxPlotMaker.h:330
MSVtxPlotMaker::fillReconstructionObjectsHists
void fillReconstructionObjectsHists()
Definition: MSVtxPlotMaker.cxx:417
MSVtxPlotMaker::m_msVtx_nTGC_I
std::vector< int > * m_msVtx_nTGC_I
Definition: MSVtxPlotMaker.h:218
MSVtxPlotMaker::m_etaphi_truth_e
TGraph * m_etaphi_truth_e
Definition: MSVtxPlotMaker.h:247
MuonVertexValidationMacroUtils::inDetectorRegion
bool inDetectorRegion(const Amg::Vector3D &vtx)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:32
MSVtxPlotMaker::fillVtxPosMaps
void fillVtxPosMaps(const std::vector< Amg::Vector3D > &vertices, std::unique_ptr< VtxPosTGraph > &graphs)
Definition: MSVtxPlotMaker.cxx:541
MSVtxPlotMaker::setPlotStyle
void setPlotStyle()
Definition: MSVtxPlotMaker.cxx:62
MSVtxPlotMaker::m_h_nRPC_M
TH1 * m_h_nRPC_M
Definition: MSVtxPlotMaker.h:320
MSVtxPlotMaker::m_h_Reco_z_e
TH1 * m_h_Reco_z_e
Definition: MSVtxPlotMaker.h:384
MSVtxPlotMaker::m_msVtx_Ntrklet
std::vector< int > * m_msVtx_Ntrklet
Definition: MSVtxPlotMaker.h:202
MSVtxPlotMaker::m_h_nTGC_I
TH1 * m_h_nTGC_I
Definition: MSVtxPlotMaker.h:328
MSVtxPlotMaker::m_h_objReco_eta
TH1 * m_h_objReco_eta
Definition: MSVtxPlotMaker.h:350
MSVtxPlotMaker::m_h_Truth_Lxy_b
TH1 * m_h_Truth_Lxy_b
Definition: MSVtxPlotMaker.h:381
MSVtxPlotMaker::m_h_delta_z_negEta_b
TH1 * m_h_delta_z_negEta_b
Definition: MSVtxPlotMaker.h:371
MSVtxPlotMaker::m_h_VtxPos
std::unique_ptr< VtxPosTGraph > m_h_VtxPos
Definition: MSVtxPlotMaker.h:410
MuonVertexValidationMacroUtils::getNvtxBarrel
int getNvtxBarrel(const std::vector< Amg::Vector3D > &vertices)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:37
MSVtxPlotMaker::m_h_objReco_phi_e
TH1 * m_h_objReco_phi_e
Definition: MSVtxPlotMaker.h:349
python.handimod.extra
int extra
Definition: handimod.py:522
MSVtxPlotMaker::m_h_NobjReco_e
TH1 * m_h_NobjReco_e
Definition: MSVtxPlotMaker.h:343
MSVtxPlotMaker::m_h_nMDT_InwardsTotal_b
TH1 * m_h_nMDT_InwardsTotal_b
Definition: MSVtxPlotMaker.h:309
python.handimod.Red
Red
Definition: handimod.py:551
MSVtxPlotMaker::setup
void setup()
Definition: MSVtxPlotMaker.cxx:42
plotBeamSpotVxVal.legend
legend
Definition: plotBeamSpotVxVal.py:98
MSVtxPlotMaker::m_h_obj_phi_b
TH1 * m_h_obj_phi_b
Definition: MSVtxPlotMaker.h:345
MSVtxPlotMaker::m_zLxy_truth_out
TGraph * m_zLxy_truth_out
Definition: MSVtxPlotMaker.h:243
MSVtxPlotMaker::m_msVtx_nTGC_M
std::vector< int > * m_msVtx_nTGC_M
Definition: MSVtxPlotMaker.h:219
MSVtxPlotMaker::m_h_delta_phi_e
TH1 * m_h_delta_phi_e
Definition: MSVtxPlotMaker.h:358
MSVtxPlotMaker::m_h_VtxChi2_e
std::unique_ptr< Chi2TH1 > m_h_VtxChi2_e
Definition: MSVtxPlotMaker.h:416
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonVertexValidationMacroUtils::isValidMatch
bool isValidMatch(const Amg::Vector3D &match_candidate)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:119
MSVtxPlotMaker::m_h_delta_theta_b
TH1 * m_h_delta_theta_b
Definition: MSVtxPlotMaker.h:355
MSVtxPlotMaker::m_h_TruthReco_eta
TH1 * m_h_TruthReco_eta
Definition: MSVtxPlotMaker.h:392
MSVtxPlotMaker::fillVtxPosFiducialVolHists
void fillVtxPosFiducialVolHists(const Amg::Vector3D &vtx, std::unique_ptr< EffInputTH1 > &hists)
Definition: MSVtxPlotMaker.cxx:654
MSVtxPlotMaker.h
MSVtxPlotMaker::m_h_NVtx_truth
std::unique_ptr< NVtxTH1 > m_h_NVtx_truth
Definition: MSVtxPlotMaker.h:407
MSVtxPlotMaker::formatTGraphs
void formatTGraphs()
Definition: MSVtxPlotMaker.cxx:376
MSVtxPlotMaker::m_plotdir_vtxResiduals
TString m_plotdir_vtxResiduals
Definition: MSVtxPlotMaker.h:187
MuonVertexValidationMacroUtils::inFiducialVol
bool inFiducialVol(const Amg::Vector3D &vtx)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:71
MSVtxPlotMaker::m_h_NVtx
std::unique_ptr< NVtxTH1 > m_h_NVtx
Definition: MSVtxPlotMaker.h:408
MSVtxPlotMaker::m_h_nTGC_InwardsTotal
TH1 * m_h_nTGC_InwardsTotal
Definition: MSVtxPlotMaker.h:331
MSVtxPlotMaker::m_h_VtxConsti_dRmax_e
TH1 * m_h_VtxConsti_dRmax_e
Definition: MSVtxPlotMaker.h:292
MSVtxPlotMaker::m_h_Nvtx_e
TH1 * m_h_Nvtx_e
Definition: MSVtxPlotMaker.h:259
MSVtxPlotMaker::m_h_VtxPosHists
std::unique_ptr< VtxPosTH > m_h_VtxPosHists
Definition: MSVtxPlotMaker.h:412
MSVtxPlotMaker::m_h_delta_Lxy_b
TH1 * m_h_delta_Lxy_b
Definition: MSVtxPlotMaker.h:359
MuonVertexValidationMacroUtils::inEndcaps
bool inEndcaps(double eta)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:22
MSVtxPlotMaker::fillResidualHists
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)
Definition: MSVtxPlotMaker.cxx:631
MSVtxPlotMaker::m_h_delta_z_posEta_b
TH1 * m_h_delta_z_posEta_b
Definition: MSVtxPlotMaker.h:370
MSVtxPlotMaker::m_h_delta_Lxy_negEta_e
TH1 * m_h_delta_Lxy_negEta_e
Definition: MSVtxPlotMaker.h:369
MSVtxPlotMaker::m_h_objReco_phi_b
TH1 * m_h_objReco_phi_b
Definition: MSVtxPlotMaker.h:348
MSVtxPlotMaker::m_plotdir_recoVtx
TString m_plotdir_recoVtx
Definition: MSVtxPlotMaker.h:185
MSVtxPlotMaker::m_plotdir_vtxEfficiency
TString m_plotdir_vtxEfficiency
Definition: MSVtxPlotMaker.h:189
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MSVtxPlotMaker::m_h_TruthReco_z_e
TH1 * m_h_TruthReco_z_e
Definition: MSVtxPlotMaker.h:387
MSVtxPlotMaker::m_h_delta_z_e
TH1 * m_h_delta_z_e
Definition: MSVtxPlotMaker.h:362
MuonVertexValidationMacroUtils::inFiducialVolEndcaps
bool inFiducialVolEndcaps(const Amg::Vector3D &vtx)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:64
MSVtxPlotMaker::m_plotdir_vtxFakeRate
TString m_plotdir_vtxFakeRate
Definition: MSVtxPlotMaker.h:190
MuonVertexValidationMacroUtils::inFiducialVolBarrel
bool inFiducialVolBarrel(const Amg::Vector3D &vtx)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:57
MSVtxPlotMaker::m_h_Nhits_MDT_e
std::unique_ptr< NHitsTH1 > m_h_Nhits_MDT_e
Definition: MSVtxPlotMaker.h:424
MSVtxPlotMaker::m_h_nMDT_M_e
TH1 * m_h_nMDT_M_e
Definition: MSVtxPlotMaker.h:306
MSVtxPlotMaker::m_msVtx_nMDT_O
std::vector< int > * m_msVtx_nMDT_O
Definition: MSVtxPlotMaker.h:210
MuonVertexValidationMacroUtils::inBarrel
bool inBarrel(double eta)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:12
MSVtxPlotMaker::m_msVtx_nRPC
std::vector< int > * m_msVtx_nRPC
Definition: MSVtxPlotMaker.h:211
MSVtxPlotMaker::m_msVtx_chi2
std::vector< double > * m_msVtx_chi2
Definition: MSVtxPlotMaker.h:201
MSVtxPlotMaker::m_h_Truth_r_e
TH1 * m_h_Truth_r_e
Definition: MSVtxPlotMaker.h:401
MSVtxPlotMaker::m_truthVtx_y
std::vector< double > * m_truthVtx_y
Definition: MSVtxPlotMaker.h:198
MSVtxPlotMaker::saveVtxPos
void saveVtxPos(std::unique_ptr< VtxPosTH > &hists, const TString &plotdir)
Definition: MSVtxPlotMaker.cxx:673
MSVtxPlotMaker::~MSVtxPlotMaker
virtual ~MSVtxPlotMaker()
MSVtxPlotMaker::getUnmatchedHist
TH1 * getUnmatchedHist(TH1 *h_all, TH1 *h_matched, const TString &name_unmatched)
Definition: MSVtxPlotMaker.cxx:874
MuonVertexValidationMacroUtils::getNvtxEndcaps
int getNvtxEndcaps(const std::vector< Amg::Vector3D > &vertices)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:43
MSVtxPlotMaker::m_msVtx_nTGC_inwards
std::vector< int > * m_msVtx_nTGC_inwards
Definition: MSVtxPlotMaker.h:217
MSVtxPlotMaker::m_h_RecoTruth_r_e
TH1 * m_h_RecoTruth_r_e
Definition: MSVtxPlotMaker.h:400
MSVtxPlotMaker::m_h_VtxResiduals_e
std::unique_ptr< ResidualTH1 > m_h_VtxResiduals_e
Definition: MSVtxPlotMaker.h:422
MSVtxPlotMaker::m_h_Truth_z_e
TH1 * m_h_Truth_z_e
Definition: MSVtxPlotMaker.h:386
MSVtxPlotMaker::m_output_file
std::unique_ptr< TFile > m_output_file
Definition: MSVtxPlotMaker.h:193
MSVtxPlotMaker::m_h_RecoTruth_Lxy_b
TH1 * m_h_RecoTruth_Lxy_b
Definition: MSVtxPlotMaker.h:380
MSVtxPlotMaker::m_datapath
std::string m_datapath
Definition: MSVtxPlotMaker.h:181
MSVtxPlotMaker::m_obj_z
std::vector< double > * m_obj_z
Definition: MSVtxPlotMaker.h:224
MSVtxPlotMaker::m_h_delta_R_e
TH1 * m_h_delta_R_e
Definition: MSVtxPlotMaker.h:354
MSVtxPlotMaker::m_obj_y
std::vector< double > * m_obj_y
Definition: MSVtxPlotMaker.h:223
MSVtxPlotMaker::m_h_VtxPos_truth
std::unique_ptr< VtxPosTGraph > m_h_VtxPos_truth
Definition: MSVtxPlotMaker.h:411
MSVtxPlotMaker::m_obj_vtxLink
std::vector< int > * m_obj_vtxLink
Definition: MSVtxPlotMaker.h:228
MSVtxPlotMaker::m_h_VtxChi2_b
std::unique_ptr< Chi2TH1 > m_h_VtxChi2_b
Definition: MSVtxPlotMaker.h:415
MSVtxPlotMaker::m_h_nMDT_IO_b
TH1 * m_h_nMDT_IO_b
Definition: MSVtxPlotMaker.h:313
MSVtxPlotMaker::m_msVtx_y
std::vector< double > * m_msVtx_y
Definition: MSVtxPlotMaker.h:204
MSVtxPlotMaker::m_h_VtxResiduals_b
std::unique_ptr< ResidualTH1 > m_h_VtxResiduals_b
Definition: MSVtxPlotMaker.h:421
MSVtxPlotMaker::m_h_delta_theta_e
TH1 * m_h_delta_theta_e
Definition: MSVtxPlotMaker.h:356
MSVtxPlotMaker::m_msVtx_nRPC_M
std::vector< int > * m_msVtx_nRPC_M
Definition: MSVtxPlotMaker.h:214
MSVtxPlotMaker::m_h_VtxConsti_detamax_b
TH1 * m_h_VtxConsti_detamax_b
Definition: MSVtxPlotMaker.h:290
MSVtxPlotMaker::m_h_NobjReco_b
TH1 * m_h_NobjReco_b
Definition: MSVtxPlotMaker.h:342
MSVtxPlotMaker::setupBranches
void setupBranches()
Definition: MSVtxPlotMaker.cxx:332
MSVtxPlotMaker::m_msVtx_z
std::vector< double > * m_msVtx_z
Definition: MSVtxPlotMaker.h:205
MSVtxPlotMaker::m_h_nTGC_IM
TH1 * m_h_nTGC_IM
Definition: MSVtxPlotMaker.h:332
MSVtxPlotMaker::m_msVtx_nRPC_inwards
std::vector< int > * m_msVtx_nRPC_inwards
Definition: MSVtxPlotMaker.h:212
MSVtxPlotMaker::outputResults
void outputResults()
Definition: MSVtxPlotMaker.cxx:111
MSVtxPlotMaker::m_obj_x
std::vector< double > * m_obj_x
Definition: MSVtxPlotMaker.h:222
MSVtxPlotMaker::m_etaphi_truth_b
TGraph * m_etaphi_truth_b
Definition: MSVtxPlotMaker.h:246
MSVtxPlotMaker::m_h_nMDT_I_b
TH1 * m_h_nMDT_I_b
Definition: MSVtxPlotMaker.h:303
MSVtxPlotMaker::m_h_Nconsti_e
TH1 * m_h_Nconsti_e
Definition: MSVtxPlotMaker.h:285
MSVtxPlotMaker::m_h_Nvtx_truth
TH1 * m_h_Nvtx_truth
Definition: MSVtxPlotMaker.h:235
MSVtxPlotMaker::m_h_nMDT_O_b
TH1 * m_h_nMDT_O_b
Definition: MSVtxPlotMaker.h:307
MSVtxPlotMaker::m_h_RecoTruthMatched
std::unique_ptr< EffInputTH1 > m_h_RecoTruthMatched
Definition: MSVtxPlotMaker.h:431
MuonVertexValidationMacroUtils::findBestMatch
Amg::Vector3D findBestMatch(const Amg::Vector3D &vtx, const std::vector< Amg::Vector3D > &candidates)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:100
MSVtxPlotMaker::m_h_Nvtx_truth_b
TH1 * m_h_Nvtx_truth_b
Definition: MSVtxPlotMaker.h:236
MSVtxPlotMaker::m_h_AngularVtxConsti_b
std::unique_ptr< AngularVtxConstiTH1 > m_h_AngularVtxConsti_b
Definition: MSVtxPlotMaker.h:418
MSVtxPlotMaker::m_etaphi_truth
TMultiGraph * m_etaphi_truth
Definition: MSVtxPlotMaker.h:245
MSVtxPlotMaker::m_h_Nobj_e
TH1 * m_h_Nobj_e
Definition: MSVtxPlotMaker.h:340
MSVtxPlotMaker::m_msVtx_nRPC_I
std::vector< int > * m_msVtx_nRPC_I
Definition: MSVtxPlotMaker.h:213
MSVtxPlotMaker::m_h_TruthReco_r_b
TH1 * m_h_TruthReco_r_b
Definition: MSVtxPlotMaker.h:397
MSVtxPlotMaker::fillNvtxHists
void fillNvtxHists(const std::vector< Amg::Vector3D > &vertices, std::unique_ptr< NVtxTH1 > &hists)
Definition: MSVtxPlotMaker.cxx:531
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
python.compressB64.c
def c
Definition: compressB64.py:93
MSVtxPlotMaker::m_etaphi_e
TGraph * m_etaphi_e
Definition: MSVtxPlotMaker.h:269
MuonVertexValidationMacroUtils::hasMatch
bool hasMatch(const Amg::Vector3D &vtx1, const std::vector< Amg::Vector3D > &vtx2_vec)
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.cxx:124
MSVtxPlotMaker::m_h_chi2prob_e
TH1 * m_h_chi2prob_e
Definition: MSVtxPlotMaker.h:282
MSVtxPlotMaker::m_h_nMDT_InwardsTotal_e
TH1 * m_h_nMDT_InwardsTotal_e
Definition: MSVtxPlotMaker.h:310
MSVtxPlotMaker::setColorPalette
void setColorPalette(TStyle *plotStyle)
Definition: MSVtxPlotMaker.cxx:853
MuonVertexValidationMacroUtils::fidVol_barrel_etaCut
constexpr double fidVol_barrel_etaCut
Definition: MuonSpectrometer/MuonValidation/MuonVertexValidation/util/Utils.h:18
MSVtxPlotMaker::fillPlots
void fillPlots()
Definition: MSVtxPlotMaker.cxx:85
MuonVertexValidationMacroPlotAnnotations
Definition: PlotAnnotations.cxx:11
MSVtxPlotMaker::fillRecoVtxPlots
void fillRecoVtxPlots(const std::vector< Amg::Vector3D > &reco_vertices, const std::vector< std::vector< Amg::Vector3D >> &reco_constituentPos)
Definition: MSVtxPlotMaker.cxx:463
MSVtxPlotMaker::m_h_nRPC_O
TH1 * m_h_nRPC_O
Definition: MSVtxPlotMaker.h:321
MSVtxPlotMaker::m_h_VtxPosHists_truth
std::unique_ptr< VtxPosTH > m_h_VtxPosHists_truth
Definition: MSVtxPlotMaker.h:413
MSVtxPlotMaker::m_h_VtxConsti_detamax_e
TH1 * m_h_VtxConsti_detamax_e
Definition: MSVtxPlotMaker.h:294
MSVtxPlotMaker::m_obj_eta
std::vector< double > * m_obj_eta
Definition: MSVtxPlotMaker.h:227
MSVtxPlotMaker::m_h_obj_phi_e
TH1 * m_h_obj_phi_e
Definition: MSVtxPlotMaker.h:346
MSVtxPlotMaker::saveTH2
void saveTH2(TH2 *h, const TString &plotpath)
Definition: MSVtxPlotMaker.cxx:838