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 doTruthMuPlots = false,
35  bool do1D = false );
36 
41  PlotMgr* pParent,
42  const std::string& dirName,
43  const std::string& anaTag,
44  const std::string& trackType,
45  bool isITk,
46  bool doGlobalPlots = false,
47  bool doTruthMuPlots = false );
48 
50  virtual ~HitsOnTracksPlots() = default;
51 
53  void initializePlots(); // needed to override PlotBase
55 
58  template< typename PTEST, typename PREF=PTEST >
60  const PTEST& ptest, const PREF& pref,
61  float truthMu, float actualMu, float weight );
62 
65  template< typename PARTICLE >
67  const PARTICLE& particle,
68  float truthMu, float actualMu, float weight );
69 
71  void finalizePlots();
72 
73  private:
74 
75  std::string m_testType;
76  std::string m_refType;
77  bool m_isITk{};
80  bool m_do1D{};
81 
82  enum HitParam {
113  NHITPARAMSBASE = 13
114  };
115  unsigned int m_NHITPARAMS;
116 
117  std::string m_hitParamName[ NHITPARAMSTOT ] = {
118  "nInnerMostPixelHits",
119  "nInnerMostPixelEndcapHits",
120  "nNextToInnerMostPixelHits",
121  "nNextToInnerMostPixelEndcapHits",
122  "nInnerMostPixelSharedHits",
123  "nInnerMostPixelSharedEndcapHits",
124  "nPixelHits",
125  "nPixelHoles",
126  "nPixelSharedHits",
127  "pixeldEdx",
128  "nSCTHits",
129  "nSCTHoles",
130  "nSCTSharedHits",
132  "nInnerMostPixelOutliers",
133  "nInnerMostPixelEndcapOutliers",
134  "nInnerMostPixelSplitHits",
135  "nInnerMostPixelSplitEndcapHits",
136  "nExpectedInnerMostPixelHits",
137  "nExpectedNextToInnerMostPixelHits",
138  "nPixelOutliers",
139  "nPixelContribLayers",
140  "nPixelSplitHits",
141  "nPixelGangedHits",
142  "nPixelGangedHitsFlaggedFakes",
143  "nPixelDeadSensors",
144  "nSCTOutliers",
145  "nSCTDoubleHoles",
146  "nSCTDeadSensors"
147  };
148 
160  NRUN3HITPARAMSBASE = 6
161  };
162  unsigned int m_NRUN3HITPARAMS;
163 
165  "nTRTHits",
166  "nTRTHitsXe",
167  "nTRTHitsAr",
168  "nTRTHighThresholdHits",
169  "nTRTHighThresholdHitsXe",
170  "nTRTHighThresholdHitsAr",
172  "nTRTOutliers",
173  "nTRTHighThresholdOutliers"
174  };
175 
176  enum Param { PT, ETA, PHI, NPARAMS };
177  std::string m_paramName[ NPARAMS ] = { "pt", "eta", "phi" };
178 
180  std::string m_paramMuName[ NPARAMSMU ] = { "truthMu", "actualMu" };
181 
185 
189 
191  TProfile2D* m_hits_vs2D[ NHITPARAMSTOT ][ NPARAMS ][ NPARAMS ]{};
193 
197 
201 
202  }; // class HitsOnTracksPlots
203 
204 } // namespace IDTPM
205 
206 #endif // > ! INDETTRACKPERFMON_PLOTS_HITSONTRACKSPLOTS_H
IDTPM::HitsOnTracksPlots::NPixelGangedHitsFlaggedFakes
@ NPixelGangedHitsFlaggedFakes
Definition: HitsOnTracksPlots.h:107
IDTPM::HitsOnTracksPlots::NPARAMSMU
@ NPARAMSMU
Definition: HitsOnTracksPlots.h:179
IDTPM::HitsOnTracksPlots::m_NHITPARAMS
unsigned int m_NHITPARAMS
Definition: HitsOnTracksPlots.h:115
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
IDTPM::HitsOnTracksPlots::NTRTHighThresholdHits
@ NTRTHighThresholdHits
Definition: HitsOnTracksPlots.h:153
IDTPM::HitsOnTracksPlots::m_isITk
bool m_isITk
Definition: HitsOnTracksPlots.h:77
IDTPM::HitsOnTracksPlots::NInnerMostPixelEndcapHits
@ NInnerMostPixelEndcapHits
Definition: HitsOnTracksPlots.h:84
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:199
IDTPM::HitsOnTracksPlots::ETA
@ ETA
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::PixeldEdx
@ PixeldEdx
Definition: HitsOnTracksPlots.h:92
IDTPM::HitsOnTracksPlots::NSCTDeadSensors
@ NSCTDeadSensors
Definition: HitsOnTracksPlots.h:111
IDTPM::HitsOnTracksPlots::TRUTHMU
@ TRUTHMU
Definition: HitsOnTracksPlots.h:179
IDTPM::HitsOnTracksPlots::NRUN3HITPARAMSBASE
@ NRUN3HITPARAMSBASE
Definition: HitsOnTracksPlots.h:160
IDTPM::HitsOnTracksPlots::m_hits_vs2D
TProfile2D * m_hits_vs2D[NHITPARAMSTOT][NPARAMS][NPARAMS]
TProfile2D plots vs NPARAMS vs NPARAMS.
Definition: HitsOnTracksPlots.h:191
IDTPM::HitsOnTracksPlots::NTRTOutliers
@ NTRTOutliers
for greater detail level plots
Definition: HitsOnTracksPlots.h:157
IDTPM::HitsOnTracksPlots::Run3HitParam
Run3HitParam
Definition: HitsOnTracksPlots.h:149
IDTPM::HitsOnTracksPlots::m_hitsRun3_vsMu
TProfile * m_hitsRun3_vsMu[NRUN3HITPARAMSTOT][NPARAMSMU]
Definition: HitsOnTracksPlots.h:196
IDTPM::HitsOnTracksPlots::NHITPARAMSTOT
@ NHITPARAMSTOT
Definition: HitsOnTracksPlots.h:112
IDTPM::HitsOnTracksPlots::NInnerMostPixelOutliers
@ NInnerMostPixelOutliers
for greater detail level plots
Definition: HitsOnTracksPlots.h:97
IDTPM::HitsOnTracksPlots::m_hits_vs
TProfile * m_hits_vs[NHITPARAMSTOT][NPARAMS]
TProfile plots vs NPARAMS.
Definition: HitsOnTracksPlots.h:187
IDTPM::HitsOnTracksPlots::m_hitsRun3_vsMu_vs
TProfile2D * m_hitsRun3_vsMu_vs[NRUN3HITPARAMSTOT][NPARAMSMU][NPARAMS]
Definition: HitsOnTracksPlots.h:200
IDTPM::HitsOnTracksPlots::NExpectedNextToInnerMostPixelHits
@ NExpectedNextToInnerMostPixelHits
Definition: HitsOnTracksPlots.h:102
IDTPM::HitsOnTracksPlots::NInnerMostPixelSharedHits
@ NInnerMostPixelSharedHits
Definition: HitsOnTracksPlots.h:87
IDTPM::HitsOnTracksPlots::m_hitsRun3_vs
TProfile * m_hitsRun3_vs[NRUN3HITPARAMSTOT][NPARAMS]
Definition: HitsOnTracksPlots.h:188
IDTPM::HitsOnTracksPlots::NPixelSharedHits
@ NPixelSharedHits
Definition: HitsOnTracksPlots.h:91
IDTPM::HitsOnTracksPlots::NInnerMostPixelHits
@ NInnerMostPixelHits
Definition: HitsOnTracksPlots.h:83
IDTPM::HitsOnTracksPlots::PT
@ PT
Definition: HitsOnTracksPlots.h:176
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
IDTPM::HitsOnTracksPlots::NExpectedInnerMostPixelHits
@ NExpectedInnerMostPixelHits
Definition: HitsOnTracksPlots.h:101
IDTPM::HitsOnTracksPlots
Definition: HitsOnTracksPlots.h:19
IDTPM::HitsOnTracksPlots::bookPlots
StatusCode bookPlots()
Definition: HitsOnTracksPlots.cxx:68
IDTPM::PlotMgr
Definition: PlotMgr.h:33
IDTPM::HitsOnTracksPlots::m_doGlobalPlots
bool m_doGlobalPlots
Definition: HitsOnTracksPlots.h:78
IDTPM::HitsOnTracksPlots::m_doTruthMuPlots
bool m_doTruthMuPlots
Definition: HitsOnTracksPlots.h:79
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
IDTPM::HitsOnTracksPlots::NInnerMostPixelSharedEndcapHits
@ NInnerMostPixelSharedEndcapHits
Definition: HitsOnTracksPlots.h:88
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:93
IDTPM::HitsOnTracksPlots::NNextToInnerMostPixelHits
@ NNextToInnerMostPixelHits
Definition: HitsOnTracksPlots.h:85
IDTPM::HitsOnTracksPlots::initializePlots
void initializePlots()
Book the histograms.
Definition: HitsOnTracksPlots.cxx:59
IDTPM::HitsOnTracksPlots::m_refType
std::string m_refType
Definition: HitsOnTracksPlots.h:76
IDTPM::HitsOnTracksPlots::NTRTHits
@ NTRTHits
Definition: HitsOnTracksPlots.h:150
IDTPM::HitsOnTracksPlots::NSCTSharedHits
@ NSCTSharedHits
Definition: HitsOnTracksPlots.h:95
IDTPM::HitsOnTracksPlots::NSCTHoles
@ NSCTHoles
Definition: HitsOnTracksPlots.h:94
IDTPM::HitsOnTracksPlots::NNextToInnerMostPixelEndcapHits
@ NNextToInnerMostPixelEndcapHits
Definition: HitsOnTracksPlots.h:86
IDTPM::HitsOnTracksPlots::NRUN3HITPARAMSTOT
@ NRUN3HITPARAMSTOT
Definition: HitsOnTracksPlots.h:159
IDTPM::HitsOnTracksPlots::NHITPARAMSBASE
@ NHITPARAMSBASE
Definition: HitsOnTracksPlots.h:113
IDTPM::HitsOnTracksPlots::NTRTHighThresholdOutliers
@ NTRTHighThresholdOutliers
Definition: HitsOnTracksPlots.h:158
IDTPM::HitsOnTracksPlots::m_hitParamName
std::string m_hitParamName[NHITPARAMSTOT]
Definition: HitsOnTracksPlots.h:117
IDTPM::HitsOnTracksPlots::NTRTHitsAr
@ NTRTHitsAr
Definition: HitsOnTracksPlots.h:152
IDTPM::HitsOnTracksPlots::m_hitsRun3_vs2D
TProfile2D * m_hitsRun3_vs2D[NRUN3HITPARAMSTOT][NPARAMS][NPARAMS]
Definition: HitsOnTracksPlots.h:192
IDTPM::HitsOnTracksPlots::NPixelHoles
@ NPixelHoles
Definition: HitsOnTracksPlots.h:90
IDTPM::HitsOnTracksPlots::NSCTOutliers
@ NSCTOutliers
Definition: HitsOnTracksPlots.h:109
IDTPM::HitsOnTracksPlots::NPARAMS
@ NPARAMS
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::m_paramName
std::string m_paramName[NPARAMS]
Definition: HitsOnTracksPlots.h:177
IDTPM::HitsOnTracksPlots::NPixelDeadSensors
@ NPixelDeadSensors
Definition: HitsOnTracksPlots.h:108
IDTPM::HitsOnTracksPlots::finalizePlots
void finalizePlots()
Print out final stats on histograms.
Definition: HitsOnTracksPlots.cxx:314
IDTPM::HitsOnTracksPlots::m_run3HitParamName
std::string m_run3HitParamName[NRUN3HITPARAMSTOT]
Definition: HitsOnTracksPlots.h:164
IDTPM::HitsOnTracksPlots::m_testType
std::string m_testType
Definition: HitsOnTracksPlots.h:75
IDTPM::HitsOnTracksPlots::NPixelContribLayers
@ NPixelContribLayers
Definition: HitsOnTracksPlots.h:104
IDTPM::HitsOnTracksPlots::m_hits_vsMu
TProfile * m_hits_vsMu[NHITPARAMSTOT][NPARAMSMU]
TProfile plots vs mu (truth and actual)
Definition: HitsOnTracksPlots.h:195
IDTPM::HitsOnTracksPlots::m_paramMuName
std::string m_paramMuName[NPARAMSMU]
Definition: HitsOnTracksPlots.h:180
IDTPM::HitsOnTracksPlots::NTRTHitsXe
@ NTRTHitsXe
Definition: HitsOnTracksPlots.h:151
IDTPM::HitsOnTracksPlots::m_NRUN3HITPARAMS
unsigned int m_NRUN3HITPARAMS
Definition: HitsOnTracksPlots.h:162
IDTPM::HitsOnTracksPlots::NPixelGangedHits
@ NPixelGangedHits
Definition: HitsOnTracksPlots.h:106
IDTPM::HitsOnTracksPlots::ParamMu
ParamMu
Definition: HitsOnTracksPlots.h:179
IDTPM::HitsOnTracksPlots::ACTUALMU
@ ACTUALMU
Definition: HitsOnTracksPlots.h:179
IDTPM::HitsOnTracksPlots::NPixelSplitHits
@ NPixelSplitHits
Definition: HitsOnTracksPlots.h:105
IDTPM::HitsOnTracksPlots::NPixelHits
@ NPixelHits
Definition: HitsOnTracksPlots.h:89
IDTPM::HitsOnTracksPlots::PHI
@ PHI
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::HitParam
HitParam
Definition: HitsOnTracksPlots.h:82
IDTPM::HitsOnTracksPlots::NInnerMostPixelEndcapOutliers
@ NInnerMostPixelEndcapOutliers
Definition: HitsOnTracksPlots.h:98
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 doTruthMuPlots=false, bool do1D=false)
Constructor A for test_Hits-vs-reference plots e.g.
Definition: HitsOnTracksPlots.cxx:18
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:165
IDTPM::HitsOnTracksPlots::NSCTDoubleHoles
@ NSCTDoubleHoles
Definition: HitsOnTracksPlots.h:110
IDTPM::HitsOnTracksPlots::NPixelOutliers
@ NPixelOutliers
Definition: HitsOnTracksPlots.h:103
IDTPM::HitsOnTracksPlots::NTRTHighThresholdHitsAr
@ NTRTHighThresholdHitsAr
Definition: HitsOnTracksPlots.h:155
IDTPM::HitsOnTracksPlots::Param
Param
Definition: HitsOnTracksPlots.h:176
IDTPM::HitsOnTracksPlots::m_hitsRun3
TH1 * m_hitsRun3[NRUN3HITPARAMSTOT]
Definition: HitsOnTracksPlots.h:184
IDTPM::HitsOnTracksPlots::NTRTHighThresholdHitsXe
@ NTRTHighThresholdHitsXe
Definition: HitsOnTracksPlots.h:154
IDTPM::HitsOnTracksPlots::m_hits
TH1 * m_hits[NHITPARAMSTOT]
1D plots
Definition: HitsOnTracksPlots.h:183
IDTPM::HitsOnTracksPlots::NInnerMostPixelSplitHits
@ NInnerMostPixelSplitHits
Definition: HitsOnTracksPlots.h:99
IDTPM::HitsOnTracksPlots::m_do1D
bool m_do1D
Definition: HitsOnTracksPlots.h:80
IDTPM::HitsOnTracksPlots::NInnerMostPixelSplitEndcapHits
@ NInnerMostPixelSplitEndcapHits
Definition: HitsOnTracksPlots.h:100