ATLAS Offline Software
Loading...
Searching...
No Matches
InDetPerfPlot_VertexTruthMatching.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETPHYSVALMONITORING_INDETPERFPLOT_VERTEXTRUTHMATCHING
6#define INDETPHYSVALMONITORING_INDETPERFPLOT_VERTEXTRUTHMATCHING
11
12// local includes
13#include "InDetPlotBase.h"
15
16// Tracking includes:
20
21// xAOD truth object includes:
25
26// Vertex validation:
29
31
32// std includes
33#include <string>
34
35// root includes
36class TH1;
37class TH2;
38class TProfile;
39class TEfficiency;
40
41
44public:
45 InDetPerfPlot_VertexTruthMatching(InDetPlotBase* pParent, const std::string& dirName, const int detailLevel = 10, bool isITk = false);
46 void fill(const xAOD::Vertex& vertex, const xAOD::TruthVertex * tvrt =0, float weight=1.0);
47 void fill(const xAOD::Vertex* recoHardScatter, const xAOD::VertexContainer& vertexContainer, const std::vector<const xAOD::TruthVertex*>& truthHSVertices, const std::vector<const xAOD::TruthVertex*>& truthPUVertices, float actualMu, float weight=1.0);
48private:
49 bool m_isITk{false};
53 TH1* m_vx_type_truth = nullptr;
54 TH1* m_vx_x_diff = nullptr;
55 TH1* m_vx_x_diff_pull = nullptr;
56 TH1* m_vx_y_diff = nullptr;
57 TH1* m_vx_y_diff_pull = nullptr;
58 TH1* m_vx_z_diff = nullptr;
59 TH1* m_vx_z_diff_pull = nullptr;
60
62 TH1* m_vx_time_diff = nullptr;
63 TH1* m_vx_time_diff_pull = nullptr;
64
66 TH1* m_vx_hs_classification = nullptr;
68 TProfile* m_vx_nReco_vs_nTruth_inclusive = nullptr;
69 TProfile* m_vx_nReco_vs_nTruth_matched = nullptr;
70 TProfile* m_vx_nReco_vs_nTruth_merged = nullptr;
71 TProfile* m_vx_nReco_vs_nTruth_split = nullptr;
72 TProfile* m_vx_nReco_vs_nTruth_fake = nullptr;
73 TProfile* m_vx_nReco_vs_nTruth_dummy = nullptr;
74 TProfile* m_vx_nReco_vs_nTruth_clean = nullptr;
75 TProfile* m_vx_nReco_vs_nTruth_lowpu = nullptr;
76 TProfile* m_vx_nReco_vs_nTruth_highpu = nullptr;
77 TProfile* m_vx_nReco_vs_nTruth_hssplit = nullptr;
78 TProfile* m_vx_nReco_vs_nTruth_none = nullptr;
79 // HS vertex reconstruction efficiency vs PU
80 TEfficiency* m_vx_hs_reco_eff = nullptr;
81 // HS vertex selection efficiency vs PU
82 TEfficiency* m_vx_hs_sel_eff = nullptr;
83 // HS vertex selection efficiency vs nReco vertices
84 TEfficiency* m_vx_hs_sel_eff_vs_nReco = nullptr;
85 // HS vertex reconstruction and selection efficiency vs PU
86 TEfficiency* m_vx_hs_reco_sel_eff = nullptr;
87 // HS vertex selection efficiency vs PU (distance based)
88 TEfficiency* m_vx_hs_sel_eff_dist = nullptr;
89 // HS vertex selection efficiency vs PU (actualInteractionsPerCrossing)
90 TEfficiency* m_vx_hs_sel_eff_mu = nullptr;
91 // HS vertex selection efficiency vs nReco vertices (distance based)
92 TEfficiency* m_vx_hs_sel_eff_dist_vs_nReco = nullptr;
93 // HS vertex reconstruction efficiency vs n truth vertices
94 TEfficiency* m_vx_hs_reco_eff_vs_ntruth = nullptr;
95 // HS vertex selection efficiency vs PU (actualInteractionsPerCrossing)
96 TEfficiency* m_vx_hs_reco_eff_mu = nullptr;
97 // HS vertex selection efficiency vs n truth vertices
98 TEfficiency* m_vx_hs_sel_eff_vs_ntruth = nullptr;
99 // HS vertex reconstruction and selection efficiency vs n truth vertices
100 TEfficiency* m_vx_hs_reco_sel_eff_vs_ntruth = nullptr;
101
102
103 // For reco (covariance) resolutions:
104 TProfile* m_vx_hs_reco_long_reso = nullptr;
105 TProfile* m_vx_hs_reco_trans_reso = nullptr;
106
107 // For reco-truth resolutions:
110
120
121 TH1* m_vx_hs_z_pull = nullptr;
122 TH1* m_vx_hs_y_pull = nullptr;
123 TH1* m_vx_hs_x_pull = nullptr;
124 TH1* m_vx_all_z_pull = nullptr;
125 TH1* m_vx_all_y_pull = nullptr;
126 TH1* m_vx_all_x_pull = nullptr;
127
128 TH1* m_vx_hs_z_res = nullptr;
129 TH1* m_vx_hs_y_res = nullptr;
130 TH1* m_vx_hs_x_res = nullptr;
131 TH1* m_vx_all_z_res = nullptr;
132 TH1* m_vx_all_y_res = nullptr;
133 TH1* m_vx_all_x_res = nullptr;
134
141
148
155
162
163 // New Histograms for Expert Plots for observables for different vertex classifications
164 using TH1_map = std::map<int, std::map<InDetVertexTruthMatchUtils::VertexMatchType, TH1*>>;
175
176 // delta z plot
177 TH1* m_vx_all_dz = nullptr;
178 TH1* m_vx_hs_mindz = nullptr;
179
180 TH1* m_vx_PUdensity = nullptr;
181 TH1* m_vx_nTruth = nullptr;
183
185private:
186 // plot base has no default implementation of this; we use it to book the histos
187 void initializePlots();
188 static const xAOD::Vertex* getHSRecoVertexSumPt2(const xAOD::VertexContainer& recoVertices) ;
189 template<typename U, typename V>
190 float getRadialDiff2(const U* vtx1, const V* vtx2) const;
191 float getLocalPUDensity(const xAOD::TruthVertex* vtxOfInterest, const std::vector<const xAOD::TruthVertex*>& truthHSVertices, const std::vector<const xAOD::TruthVertex*>& truthPUVertices, const float radialWindow = 2.0) const;
192 static float getRecoLongitudinalReso(const xAOD::Vertex* recoVtx) ;
193 static float getRecoTransverseReso(const xAOD::Vertex* recoVtx) ;
194 const xAOD::TruthVertex* getTruthVertex(const xAOD::Vertex* recoVtx) const;
195 void finalizePlots();
196};
197
198#endif
static const xAOD::Vertex * getHSRecoVertexSumPt2(const xAOD::VertexContainer &recoVertices)
void fill(const xAOD::Vertex &vertex, const xAOD::TruthVertex *tvrt=0, float weight=1.0)
TH1 * m_vx_hs_classification
hardscatter classification
static float getRecoLongitudinalReso(const xAOD::Vertex *recoVtx)
float getLocalPUDensity(const xAOD::TruthVertex *vtxOfInterest, const std::vector< const xAOD::TruthVertex * > &truthHSVertices, const std::vector< const xAOD::TruthVertex * > &truthPUVertices, const float radialWindow=2.0) const
TProfile * m_vx_nReco_vs_nTruth_inclusive
vertex reco efficiency
std::map< int, std::map< InDetVertexTruthMatchUtils::VertexMatchType, TH1 * > > TH1_map
static float getRecoTransverseReso(const xAOD::Vertex *recoVtx)
float getRadialDiff2(const U *vtx1, const V *vtx2) const
const xAOD::TruthVertex * getTruthVertex(const xAOD::Vertex *recoVtx) const
InDetPerfPlot_VertexTruthMatching(InDetPlotBase *pParent, const std::string &dirName, const int detailLevel=10, bool isITk=false)
IDPVM::ResolutionHelper::methods m_resolutionMethod
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition TruthVertex.h:15
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.