ATLAS Offline Software
HitsOnTracksPlots.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTRACKPERFMON_PLOTS_HITSONTRACKSPLOTS_H
6 #define INDETTRACKPERFMON_PLOTS_HITSONTRACKSPLOTS_H
7 
13 #include "../PlotMgr.h"
15 
16 
17 namespace IDTPM {
18 
19  class HitsOnTracksPlots : public PlotMgr {
20 
21  public:
22 
27  PlotMgr* pParent,
28  const std::string& dirName,
29  const std::string& anaTag,
30  const std::string& testType,
31  const std::string& refType,
32  bool isITk,
33  bool doGlobalPlots = false,
34  bool do1D = false );
35 
40  PlotMgr* pParent,
41  const std::string& dirName,
42  const std::string& anaTag,
43  const std::string& trackType,
44  bool isITk,
45  bool doGlobalPlots = false );
46 
48  virtual ~HitsOnTracksPlots() = default;
49 
51  void initializePlots(); // needed to override PlotBase
53 
56  template< typename PTEST, typename PREF=PTEST >
58  const PTEST& ptest, const PREF& pref,
59  float truthMu, float actualMu, float weight );
60 
63  template< typename PARTICLE >
65  const PARTICLE& particle,
66  float truthMu, float actualMu, float weight );
67 
69  void finalizePlots();
70 
71  private:
72 
73  std::string m_testType;
74  std::string m_refType;
75  bool m_isITk;
77  bool m_do1D;
78 
79  enum HitParam {
110  NHITPARAMSBASE = 13
111  };
112  unsigned int m_NHITPARAMS;
113 
114  std::string m_hitParamName[ NHITPARAMSTOT ] = {
115  "nInnerMostPixelHits",
116  "nInnerMostPixelEndcapHits",
117  "nNextToInnerMostPixelHits",
118  "nNextToInnerMostPixelEndcapHits",
119  "nInnerMostPixelSharedHits",
120  "nInnerMostPixelSharedEndcapHits",
121  "nPixelHits",
122  "nPixelHoles",
123  "nPixelSharedHits",
124  "pixeldEdx",
125  "nSCTHits",
126  "nSCTHoles",
127  "nSCTSharedHits",
129  "nInnerMostPixelOutliers",
130  "nInnerMostPixelEndcapOutliers",
131  "nInnerMostPixelSplitHits",
132  "nInnerMostPixelSplitEndcapHits",
133  "nExpectedInnerMostPixelHits",
134  "nExpectedNextToInnerMostPixelHits",
135  "nPixelOutliers",
136  "nPixelContribLayers",
137  "nPixelSplitHits",
138  "nPixelGangedHits",
139  "nPixelGangedHitsFlaggedFakes",
140  "nPixelDeadSensors",
141  "nSCTOutliers",
142  "nSCTDoubleHoles",
143  "nSCTDeadSensors"
144  };
145 
157  NRUN3HITPARAMSBASE = 6
158  };
159  unsigned int m_NRUN3HITPARAMS;
160 
162  "nTRTHits",
163  "nTRTHitsXe",
164  "nTRTHitsAr",
165  "nTRTHighThresholdHits",
166  "nTRTHighThresholdHitsXe",
167  "nTRTHighThresholdHitsAr",
169  "nTRTOutliers",
170  "nTRTHighThresholdOutliers"
171  };
172 
173  enum Param { PT, ETA, PHI, NPARAMS };
174  std::string m_paramName[ NPARAMS ] = { "pt", "eta", "phi" };
175 
177  std::string m_paramMuName[ NPARAMSMU ] = { "truthMu", "actualMu" };
178 
182 
186 
188  TProfile2D* m_hits_vs2D[ NHITPARAMSTOT ][ NPARAMS ][ NPARAMS ];
190 
194 
198 
199  }; // class HitsOnTracksPlots
200 
201 } // namespace IDTPM
202 
203 #endif // > ! INDETTRACKPERFMON_PLOTS_HITSONTRACKSPLOTS_H
IDTPM::HitsOnTracksPlots::NPixelGangedHitsFlaggedFakes
@ NPixelGangedHitsFlaggedFakes
Definition: HitsOnTracksPlots.h:104
IDTPM::HitsOnTracksPlots::NPARAMSMU
@ NPARAMSMU
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::m_NHITPARAMS
unsigned int m_NHITPARAMS
Definition: HitsOnTracksPlots.h:112
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
IDTPM::HitsOnTracksPlots::NTRTHighThresholdHits
@ NTRTHighThresholdHits
Definition: HitsOnTracksPlots.h:150
IDTPM::HitsOnTracksPlots::m_isITk
bool m_isITk
Definition: HitsOnTracksPlots.h:75
IDTPM::HitsOnTracksPlots::NInnerMostPixelEndcapHits
@ NInnerMostPixelEndcapHits
Definition: HitsOnTracksPlots.h:81
IDTPM::HitsOnTracksPlots::m_hits_vsMu_vs
TProfile2D * m_hits_vsMu_vs[NHITPARAMSTOT][NPARAMSMU][NPARAMS]
TProfile2D plots vs mu (truth and actual) vs NPARAMS.
Definition: HitsOnTracksPlots.h:196
IDTPM::HitsOnTracksPlots::ETA
@ ETA
Definition: HitsOnTracksPlots.h:173
IDTPM::HitsOnTracksPlots::PixeldEdx
@ PixeldEdx
Definition: HitsOnTracksPlots.h:89
IDTPM::HitsOnTracksPlots::NSCTDeadSensors
@ NSCTDeadSensors
Definition: HitsOnTracksPlots.h:108
IDTPM::HitsOnTracksPlots::TRUTHMU
@ TRUTHMU
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::NRUN3HITPARAMSBASE
@ NRUN3HITPARAMSBASE
Definition: HitsOnTracksPlots.h:157
IDTPM::HitsOnTracksPlots::m_hits_vs2D
TProfile2D * m_hits_vs2D[NHITPARAMSTOT][NPARAMS][NPARAMS]
TProfile2D plots vs NPARAMS vs NPARAMS.
Definition: HitsOnTracksPlots.h:188
IDTPM::HitsOnTracksPlots::NTRTOutliers
@ NTRTOutliers
for greater detail level plots
Definition: HitsOnTracksPlots.h:154
IDTPM::HitsOnTracksPlots::Run3HitParam
Run3HitParam
Definition: HitsOnTracksPlots.h:146
IDTPM::HitsOnTracksPlots::m_hitsRun3_vsMu
TProfile * m_hitsRun3_vsMu[NRUN3HITPARAMSTOT][NPARAMSMU]
Definition: HitsOnTracksPlots.h:193
IDTPM::HitsOnTracksPlots::NHITPARAMSTOT
@ NHITPARAMSTOT
Definition: HitsOnTracksPlots.h:109
IDTPM::HitsOnTracksPlots::NInnerMostPixelOutliers
@ NInnerMostPixelOutliers
for greater detail level plots
Definition: HitsOnTracksPlots.h:94
IDTPM::HitsOnTracksPlots::m_hits_vs
TProfile * m_hits_vs[NHITPARAMSTOT][NPARAMS]
TProfile plots vs NPARAMS.
Definition: HitsOnTracksPlots.h:184
IDTPM::HitsOnTracksPlots::m_hitsRun3_vsMu_vs
TProfile2D * m_hitsRun3_vsMu_vs[NRUN3HITPARAMSTOT][NPARAMSMU][NPARAMS]
Definition: HitsOnTracksPlots.h:197
IDTPM::HitsOnTracksPlots::NExpectedNextToInnerMostPixelHits
@ NExpectedNextToInnerMostPixelHits
Definition: HitsOnTracksPlots.h:99
IDTPM::HitsOnTracksPlots::NInnerMostPixelSharedHits
@ NInnerMostPixelSharedHits
Definition: HitsOnTracksPlots.h:84
IDTPM::HitsOnTracksPlots::m_hitsRun3_vs
TProfile * m_hitsRun3_vs[NRUN3HITPARAMSTOT][NPARAMS]
Definition: HitsOnTracksPlots.h:185
IDTPM::HitsOnTracksPlots::NPixelSharedHits
@ NPixelSharedHits
Definition: HitsOnTracksPlots.h:88
IDTPM::HitsOnTracksPlots::NInnerMostPixelHits
@ NInnerMostPixelHits
Definition: HitsOnTracksPlots.h:80
IDTPM::HitsOnTracksPlots::PT
@ PT
Definition: HitsOnTracksPlots.h:173
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
IDTPM::HitsOnTracksPlots::NExpectedInnerMostPixelHits
@ NExpectedInnerMostPixelHits
Definition: HitsOnTracksPlots.h:98
IDTPM::HitsOnTracksPlots
Definition: HitsOnTracksPlots.h:19
IDTPM::HitsOnTracksPlots::bookPlots
StatusCode bookPlots()
Definition: HitsOnTracksPlots.cxx:66
IDTPM::PlotMgr
Definition: PlotMgr.h:33
IDTPM::HitsOnTracksPlots::m_doGlobalPlots
bool m_doGlobalPlots
Definition: HitsOnTracksPlots.h:76
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
IDTPM::HitsOnTracksPlots::NInnerMostPixelSharedEndcapHits
@ NInnerMostPixelSharedEndcapHits
Definition: HitsOnTracksPlots.h:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IDTPM::HitsOnTracksPlots::~HitsOnTracksPlots
virtual ~HitsOnTracksPlots()=default
Destructor.
IDTPM::HitsOnTracksPlots::NSCTHits
@ NSCTHits
Definition: HitsOnTracksPlots.h:90
IDTPM::HitsOnTracksPlots::NNextToInnerMostPixelHits
@ NNextToInnerMostPixelHits
Definition: HitsOnTracksPlots.h:82
IDTPM::HitsOnTracksPlots::initializePlots
void initializePlots()
Book the histograms.
Definition: HitsOnTracksPlots.cxx:57
IDTPM::HitsOnTracksPlots::m_refType
std::string m_refType
Definition: HitsOnTracksPlots.h:74
IDTPM::HitsOnTracksPlots::NTRTHits
@ NTRTHits
Definition: HitsOnTracksPlots.h:147
IDTPM::HitsOnTracksPlots::NSCTSharedHits
@ NSCTSharedHits
Definition: HitsOnTracksPlots.h:92
IDTPM::HitsOnTracksPlots::HitsOnTracksPlots
HitsOnTracksPlots(PlotMgr *pParent, const std::string &dirName, const std::string &anaTag, const std::string &testType, const std::string &refType, bool isITk, bool doGlobalPlots=false, bool do1D=false)
Constructor A for test_Hits-vs-reference plots e.g.
Definition: HitsOnTracksPlots.cxx:18
IDTPM::HitsOnTracksPlots::NSCTHoles
@ NSCTHoles
Definition: HitsOnTracksPlots.h:91
IDTPM::HitsOnTracksPlots::NNextToInnerMostPixelEndcapHits
@ NNextToInnerMostPixelEndcapHits
Definition: HitsOnTracksPlots.h:83
IDTPM::HitsOnTracksPlots::NRUN3HITPARAMSTOT
@ NRUN3HITPARAMSTOT
Definition: HitsOnTracksPlots.h:156
IDTPM::HitsOnTracksPlots::NHITPARAMSBASE
@ NHITPARAMSBASE
Definition: HitsOnTracksPlots.h:110
IDTPM::HitsOnTracksPlots::NTRTHighThresholdOutliers
@ NTRTHighThresholdOutliers
Definition: HitsOnTracksPlots.h:155
IDTPM::HitsOnTracksPlots::m_hitParamName
std::string m_hitParamName[NHITPARAMSTOT]
Definition: HitsOnTracksPlots.h:114
IDTPM::HitsOnTracksPlots::NTRTHitsAr
@ NTRTHitsAr
Definition: HitsOnTracksPlots.h:149
IDTPM::HitsOnTracksPlots::m_hitsRun3_vs2D
TProfile2D * m_hitsRun3_vs2D[NRUN3HITPARAMSTOT][NPARAMS][NPARAMS]
Definition: HitsOnTracksPlots.h:189
IDTPM::HitsOnTracksPlots::NPixelHoles
@ NPixelHoles
Definition: HitsOnTracksPlots.h:87
IDTPM::HitsOnTracksPlots::NSCTOutliers
@ NSCTOutliers
Definition: HitsOnTracksPlots.h:106
IDTPM::HitsOnTracksPlots::NPARAMS
@ NPARAMS
Definition: HitsOnTracksPlots.h:173
IDTPM::HitsOnTracksPlots::m_paramName
std::string m_paramName[NPARAMS]
Definition: HitsOnTracksPlots.h:174
IDTPM::HitsOnTracksPlots::NPixelDeadSensors
@ NPixelDeadSensors
Definition: HitsOnTracksPlots.h:105
IDTPM::HitsOnTracksPlots::finalizePlots
void finalizePlots()
Print out final stats on histograms.
Definition: HitsOnTracksPlots.cxx:310
IDTPM::HitsOnTracksPlots::m_run3HitParamName
std::string m_run3HitParamName[NRUN3HITPARAMSTOT]
Definition: HitsOnTracksPlots.h:161
IDTPM::HitsOnTracksPlots::m_testType
std::string m_testType
Definition: HitsOnTracksPlots.h:73
IDTPM::HitsOnTracksPlots::NPixelContribLayers
@ NPixelContribLayers
Definition: HitsOnTracksPlots.h:101
IDTPM::HitsOnTracksPlots::m_hits_vsMu
TProfile * m_hits_vsMu[NHITPARAMSTOT][NPARAMSMU]
TProfile plots vs mu (truth and actual)
Definition: HitsOnTracksPlots.h:192
IDTPM::HitsOnTracksPlots::m_paramMuName
std::string m_paramMuName[NPARAMSMU]
Definition: HitsOnTracksPlots.h:177
IDTPM::HitsOnTracksPlots::NTRTHitsXe
@ NTRTHitsXe
Definition: HitsOnTracksPlots.h:148
IDTPM::HitsOnTracksPlots::m_NRUN3HITPARAMS
unsigned int m_NRUN3HITPARAMS
Definition: HitsOnTracksPlots.h:159
IDTPM::HitsOnTracksPlots::NPixelGangedHits
@ NPixelGangedHits
Definition: HitsOnTracksPlots.h:103
IDTPM::HitsOnTracksPlots::ParamMu
ParamMu
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::ACTUALMU
@ ACTUALMU
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::NPixelSplitHits
@ NPixelSplitHits
Definition: HitsOnTracksPlots.h:102
IDTPM::HitsOnTracksPlots::NPixelHits
@ NPixelHits
Definition: HitsOnTracksPlots.h:86
IDTPM::HitsOnTracksPlots::PHI
@ PHI
Definition: HitsOnTracksPlots.h:173
IDTPM::HitsOnTracksPlots::HitParam
HitParam
Definition: HitsOnTracksPlots.h:79
IDTPM::HitsOnTracksPlots::NInnerMostPixelEndcapOutliers
@ NInnerMostPixelEndcapOutliers
Definition: HitsOnTracksPlots.h:95
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
IDTPM::HitsOnTracksPlots::fillPlots
StatusCode fillPlots(const PTEST &ptest, const PREF &pref, float truthMu, float actualMu, float weight)
Dedicated fill method A (for tracks and/or truth particles) for test_Hits-vs-reference plots.
Definition: HitsOnTracksPlots.cxx:162
IDTPM::HitsOnTracksPlots::NSCTDoubleHoles
@ NSCTDoubleHoles
Definition: HitsOnTracksPlots.h:107
IDTPM::HitsOnTracksPlots::NPixelOutliers
@ NPixelOutliers
Definition: HitsOnTracksPlots.h:100
IDTPM::HitsOnTracksPlots::NTRTHighThresholdHitsAr
@ NTRTHighThresholdHitsAr
Definition: HitsOnTracksPlots.h:152
IDTPM::HitsOnTracksPlots::Param
Param
Definition: HitsOnTracksPlots.h:173
IDTPM::HitsOnTracksPlots::m_hitsRun3
TH1 * m_hitsRun3[NRUN3HITPARAMSTOT]
Definition: HitsOnTracksPlots.h:181
IDTPM::HitsOnTracksPlots::NTRTHighThresholdHitsXe
@ NTRTHighThresholdHitsXe
Definition: HitsOnTracksPlots.h:151
IDTPM::HitsOnTracksPlots::m_hits
TH1 * m_hits[NHITPARAMSTOT]
1D plots
Definition: HitsOnTracksPlots.h:180
IDTPM::HitsOnTracksPlots::NInnerMostPixelSplitHits
@ NInnerMostPixelSplitHits
Definition: HitsOnTracksPlots.h:96
IDTPM::HitsOnTracksPlots::m_do1D
bool m_do1D
Definition: HitsOnTracksPlots.h:77
IDTPM::HitsOnTracksPlots::NInnerMostPixelSplitEndcapHits
@ NInnerMostPixelSplitEndcapHits
Definition: HitsOnTracksPlots.h:97