ATLAS Offline Software
MeasurementVectorNtupleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PerigeeParametersNtupleTool.h
7 // Header file for PerigeeParametersNtupleTool
9 // (c) ATLAS Detector software
11 // Sebastian.Fleischmann -at- cern.ch, Wolfgang.Liebig -at- cern.ch
13 #ifndef TRK_MEASUREMENTVECTORNTUPLETOOL_H
14 #define TRK_MEASUREMENTVECTORNTUPLETOOL_H
15 
18 #include "GaudiKernel/ToolHandle.h"
20 
21 class AtlasDetectorID;
22 
23 namespace Trk {
24 
25  class IUpdator;
26  class ITrackHoleSearchTool;
27  class IValidationNtupleHelperTool;
28  class IResidualPullCalculator;
29  class MeasurementBase;
30  class MeasurementTypeID;
31 
53 public:
54 
55  // standard AlgToolmethods
56  MeasurementVectorNtupleTool(const std::string&,const std::string&,const IInterface*);
58 
59  // standard Athena methods
62 
66  virtual StatusCode addNtupleItems ( TTree* tree );
67 
70  virtual StatusCode fillTrackData (
71  const Trk::Track&,
72  const int iterationIndex,
73  const unsigned int fitStatCode );
74 
78 
81  const TrackTruth&,
82  const int);
83 
85  virtual void resetVariables( );
86 
87 private:
88 
91  const Trk::MeasurementBase*,
92  const Trk::TrackParameters*,
93  const bool& isOutlier,
94  const int& detectorType);
97  const Trk::MeasurementBase*,
98  const Trk::TrackParameters*,
99  const bool& isOutlier,
100  const int& detectorType,
101  const int& nCurrentHit);
103  virtual StatusCode fillHoleData (
104  const Trk::TrackStateOnSurface&);
105 
108 
109  ToolHandle<Trk::IUpdator> m_updatorHandle;
111 
112  ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator;
113  ToolHandle<Trk::ITrackHoleSearchTool> m_holeSearchTool;
114  ToolHandleArray<IValidationNtupleHelperTool> m_PixelNtupleHelperToolHandles;
115  ToolHandleArray<IValidationNtupleHelperTool> m_SCTNtupleHelperToolHandles;
116  ToolHandleArray<IValidationNtupleHelperTool> m_TRTNtupleHelperToolHandles;
117  ToolHandleArray<IValidationNtupleHelperTool> m_MDTNtupleHelperToolHandles;
118  ToolHandleArray<IValidationNtupleHelperTool> m_CSCNtupleHelperToolHandles;
119  ToolHandleArray<IValidationNtupleHelperTool> m_RPCNtupleHelperToolHandles;
120  ToolHandleArray<IValidationNtupleHelperTool> m_TGCNtupleHelperToolHandles;
121  ToolHandleArray<IValidationNtupleHelperTool> m_GeneralNtupleHelperToolHandles;
122 
125  std::vector<IValidationNtupleHelperTool*> m_PixelHelperTools;
126  std::vector<IValidationNtupleHelperTool*> m_SCTHelperTools;
127  std::vector<IValidationNtupleHelperTool*> m_TRTHelperTools;
128  std::vector<IValidationNtupleHelperTool*> m_MDTHelperTools;
129  std::vector<IValidationNtupleHelperTool*> m_CSCHelperTools;
130  std::vector<IValidationNtupleHelperTool*> m_RPCHelperTools;
131  std::vector<IValidationNtupleHelperTool*> m_TGCHelperTools;
132  std::vector<IValidationNtupleHelperTool*> m_GeneralHelperTools;
133  // DNA ToolHandle< ITrackBreakpointAnalyser > m_brempointAnalyser;
137  bool m_doTruth;
139  std::map<const IValidationNtupleHelperTool*, bool> m_helperToolWarning;
140 
142  std::vector<float>* m_residualLocX;
143  std::vector<float>* m_residualLocY;
144  std::vector<float>* m_pullLocX;
145  std::vector<float>* m_pullLocY;
146  std::vector<int>* m_DetectorType;
147  std::vector<int>* m_isOutlier;
148 
156 
157  std::vector<int>* m_pixelHitIndex;
158  std::vector<int>* m_sctHitIndex;
159  std::vector<int>* m_trtHitIndex;
160  std::vector<int>* m_mdtHitIndex;
161  std::vector<int>* m_cscHitIndex;
162  std::vector<int>* m_rpcHitIndex;
163  std::vector<int>* m_tgcHitIndex;
164 
165  // hole data:
166  int m_nHoles;
169  std::vector<int>* m_HoleDetectorType;
170 
171 
172 };
173 
174 
175 } // end of namespace
176 
177 
178 #endif // TRK_PERIGEEPARAMETERSNTUPLETOOL_H
Trk::MeasurementVectorNtupleTool::m_trkParametersWarning
bool m_trkParametersWarning
warn once only, if no track parameters exist
Definition: MeasurementVectorNtupleTool.h:136
Trk::MeasurementVectorNtupleTool::callHelperTools
StatusCode callHelperTools(const Trk::MeasurementBase *, const Trk::TrackParameters *, const bool &isOutlier, const int &detectorType, const int &nCurrentHit)
call the helper tools
Definition: MeasurementVectorNtupleTool.cxx:786
Trk::MeasurementVectorNtupleTool::m_pullLocX
std::vector< float > * m_pullLocX
pull in Trk::LocX for each measurement on the track, vector of size nHits, value set to -1000 if meas...
Definition: MeasurementVectorNtupleTool.h:144
Trk::MeasurementVectorNtupleTool::m_PixelNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_PixelNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for Pixel
Definition: MeasurementVectorNtupleTool.h:114
Trk::MeasurementVectorNtupleTool::m_isUnbiased
int m_isUnbiased
flag if track states are unbiased to the related measurements (0:no, 1:yes)
Definition: MeasurementVectorNtupleTool.h:141
Trk::MeasurementVectorNtupleTool::finalize
StatusCode finalize()
Definition: MeasurementVectorNtupleTool.cxx:299
Trk::MeasurementVectorNtupleTool::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool.
Definition: MeasurementVectorNtupleTool.h:112
TrackParameters.h
Trk::MeasurementVectorNtupleTool::m_mdtHitIndex
std::vector< int > * m_mdtHitIndex
corresp.
Definition: MeasurementVectorNtupleTool.h:160
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::MeasurementVectorNtupleTool::m_sctHitIndex
std::vector< int > * m_sctHitIndex
corresp.
Definition: MeasurementVectorNtupleTool.h:158
Trk::MeasurementVectorNtupleTool::m_TRTHelperTools
std::vector< IValidationNtupleHelperTool * > m_TRTHelperTools
the helper tools for TRT data
Definition: MeasurementVectorNtupleTool.h:127
Trk::MeasurementVectorNtupleTool::m_doTruth
bool m_doTruth
switch to turn truth on/off
Definition: MeasurementVectorNtupleTool.h:137
Trk::MeasurementVectorNtupleTool::m_rpcHitIndex
std::vector< int > * m_rpcHitIndex
corresp.
Definition: MeasurementVectorNtupleTool.h:162
Trk::MeasurementVectorNtupleTool::m_pullLocY
std::vector< float > * m_pullLocY
pull in Trk::LocY for each measurement on the track (value is set to -1000 if no second local coord.
Definition: MeasurementVectorNtupleTool.h:145
Trk::MeasurementVectorNtupleTool
This validation tool writes basic information about Trk::Track into an ntuple; it is also the steerin...
Definition: MeasurementVectorNtupleTool.h:52
Trk::MeasurementVectorNtupleTool::m_residualLocX
std::vector< float > * m_residualLocX
residual in Trk::LocX for each measurement on the track, vector of size nHits, value set to -1000 if ...
Definition: MeasurementVectorNtupleTool.h:142
tree
TChain * tree
Definition: tile_monitor.h:30
Trk::MeasurementVectorNtupleTool::m_detTypeHelper
MeasurementTypeID * m_detTypeHelper
Definition: MeasurementVectorNtupleTool.h:107
Trk::MeasurementVectorNtupleTool::m_CSCHelperTools
std::vector< IValidationNtupleHelperTool * > m_CSCHelperTools
the helper tools for CSC data
Definition: MeasurementVectorNtupleTool.h:129
Trk::MeasurementVectorNtupleTool::m_idHelper
const AtlasDetectorID * m_idHelper
Used to find out the sub-det from PRD->identify().
Definition: MeasurementVectorNtupleTool.h:106
Trk::MeasurementVectorNtupleTool::m_nHoles
int m_nHoles
number of holes on track
Definition: MeasurementVectorNtupleTool.h:166
Trk::MeasurementVectorNtupleTool::m_residualLocY
std::vector< float > * m_residualLocY
residual in Trk::LocY for each meas't on the track (value is set to -1000 if no second local coord.
Definition: MeasurementVectorNtupleTool.h:143
Trk::MeasurementVectorNtupleTool::m_tgcHitIndex
std::vector< int > * m_tgcHitIndex
icorresp.
Definition: MeasurementVectorNtupleTool.h:163
Trk::MeasurementVectorNtupleTool::m_DetectorType
std::vector< int > * m_DetectorType
Detector type of the measurement, enum according to TrkEventPrimitives/TrackStateDefs....
Definition: MeasurementVectorNtupleTool.h:146
Trk::MeasurementVectorNtupleTool::m_cscHitIndex
std::vector< int > * m_cscHitIndex
corresp.
Definition: MeasurementVectorNtupleTool.h:161
Trk::MeasurementVectorNtupleTool::m_RPCNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_RPCNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for RPC
Definition: MeasurementVectorNtupleTool.h:119
Trk::ITrackValidationNtupleTool
Definition: ITrackValidationNtupleTool.h:38
Trk::MeasurementVectorNtupleTool::m_nRPCHits
int m_nRPCHits
number of measurements in the RPC (without outliers)
Definition: MeasurementVectorNtupleTool.h:154
Trk::MeasurementVectorNtupleTool::fillTrackData
virtual StatusCode fillTrackData(const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
fill ntuple data of a given track without writing the record.
Definition: MeasurementVectorNtupleTool.cxx:448
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::MeasurementVectorNtupleTool::MeasurementVectorNtupleTool
MeasurementVectorNtupleTool(const std::string &, const std::string &, const IInterface *)
Definition: MeasurementVectorNtupleTool.cxx:29
Trk::MeasurementVectorNtupleTool::m_MDTNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_MDTNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for MDT
Definition: MeasurementVectorNtupleTool.h:117
Trk::MeasurementVectorNtupleTool::m_useROTwithMaxAssgnProb
bool m_useROTwithMaxAssgnProb
jobOption: use ROT with max.
Definition: MeasurementVectorNtupleTool.h:123
Trk::MeasurementVectorNtupleTool::m_isOutlier
std::vector< int > * m_isOutlier
flag if measurement is outlier (1) or not (0), vector of size nHits UNIT:0:no, 1:yes
Definition: MeasurementVectorNtupleTool.h:147
Trk::MeasurementVectorNtupleTool::m_TGCHelperTools
std::vector< IValidationNtupleHelperTool * > m_TGCHelperTools
the helper tools for TGC data
Definition: MeasurementVectorNtupleTool.h:131
Trk::MeasurementVectorNtupleTool::m_GeneralHelperTools
std::vector< IValidationNtupleHelperTool * > m_GeneralHelperTools
the helper tools for data independent from detector technology
Definition: MeasurementVectorNtupleTool.h:132
Trk::MeasurementVectorNtupleTool::m_pullWarning
bool m_pullWarning
warn only ones, if pull cannot be calculated
Definition: MeasurementVectorNtupleTool.h:134
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::MeasurementVectorNtupleTool::m_MDTHelperTools
std::vector< IValidationNtupleHelperTool * > m_MDTHelperTools
the helper tools for MDT data
Definition: MeasurementVectorNtupleTool.h:128
Trk::MeasurementVectorNtupleTool::m_CSCNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_CSCNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for CSC
Definition: MeasurementVectorNtupleTool.h:118
AthAlgTool.h
Trk::MeasurementVectorNtupleTool::m_TRTNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_TRTNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for TRT
Definition: MeasurementVectorNtupleTool.h:116
Trk::MeasurementVectorNtupleTool::m_RPCHelperTools
std::vector< IValidationNtupleHelperTool * > m_RPCHelperTools
the helper tools for RPC data
Definition: MeasurementVectorNtupleTool.h:130
Trk::MeasurementVectorNtupleTool::m_TGCNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_TGCNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for TGC
Definition: MeasurementVectorNtupleTool.h:120
Trk::MeasurementVectorNtupleTool::m_updatorHandle
ToolHandle< Trk::IUpdator > m_updatorHandle
Tool handle of updator for unbiased states.
Definition: MeasurementVectorNtupleTool.h:109
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::MeasurementVectorNtupleTool::m_ignoreMissTrkCov
bool m_ignoreMissTrkCov
jobOption: ignore missing covariance of track parameters for pull calculation?
Definition: MeasurementVectorNtupleTool.h:124
Trk::MeasurementVectorNtupleTool::m_nMDTHits
int m_nMDTHits
number of measurements in the MDTs (without outliers)
Definition: MeasurementVectorNtupleTool.h:152
Trk::MeasurementVectorNtupleTool::m_nTGCHits
int m_nTGCHits
number of measurements in the TGC (without outliers)
Definition: MeasurementVectorNtupleTool.h:155
Trk::MeasurementVectorNtupleTool::m_PixelHelperTools
std::vector< IValidationNtupleHelperTool * > m_PixelHelperTools
the helper tools for Pixel data
Definition: MeasurementVectorNtupleTool.h:125
Trk::MeasurementVectorNtupleTool::m_nPixelHits
int m_nPixelHits
number of measurements in the Pixels (without outliers)
Definition: MeasurementVectorNtupleTool.h:149
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::MeasurementVectorNtupleTool::m_nCSCHits
int m_nCSCHits
number of measurements in the CSC (without outliers)
Definition: MeasurementVectorNtupleTool.h:153
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
ITrackValidationNtupleTool.h
Trk::MeasurementVectorNtupleTool::m_trtHitIndex
std::vector< int > * m_trtHitIndex
corresp.
Definition: MeasurementVectorNtupleTool.h:159
Trk::MeasurementVectorNtupleTool::fillTrackParticleData
virtual StatusCode fillTrackParticleData(const Trk::TrackParticleBase &)
fill ntuple data of a given TrackParticle without writing the record.
Definition: MeasurementVectorNtupleTool.cxx:582
Trk::MeasurementVectorNtupleTool::m_HoleDetectorType
std::vector< int > * m_HoleDetectorType
detector type of the hole (vector of size nHoles)
Definition: MeasurementVectorNtupleTool.h:169
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
Trk::MeasurementTypeID
classifies a MeasurementBase into one of the known inherited flavours or one of the detector types fo...
Definition: MeasurementTypeID.h:26
Trk::MeasurementVectorNtupleTool::m_nTRTHits
int m_nTRTHits
number of measurements in the TRT (without outliers)
Definition: MeasurementVectorNtupleTool.h:151
Trk::MeasurementVectorNtupleTool::initialize
StatusCode initialize()
Definition: MeasurementVectorNtupleTool.cxx:117
Trk::MeasurementVectorNtupleTool::m_SCTNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_SCTNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for SCT
Definition: MeasurementVectorNtupleTool.h:115
Trk::MeasurementVectorNtupleTool::resetVariables
virtual void resetVariables()
reset the variables after writing the record to disk ntuple
Definition: MeasurementVectorNtupleTool.cxx:593
Trk::IUpdator
Set of interfaces for methods operating on track states, mainly for Kalman filtering.
Definition: IUpdator.h:64
Trk::MeasurementVectorNtupleTool::m_pixelHitIndex
std::vector< int > * m_pixelHitIndex
corresp.
Definition: MeasurementVectorNtupleTool.h:157
Trk::MeasurementVectorNtupleTool::fillMeasurementData
StatusCode fillMeasurementData(const Trk::MeasurementBase *, const Trk::TrackParameters *, const bool &isOutlier, const int &detectorType)
fill variables with call for each measurement TSoS
Definition: MeasurementVectorNtupleTool.cxx:715
Trk::MeasurementVectorNtupleTool::m_nSCTHits
int m_nSCTHits
number of measurements in the SCT (without outliers)
Definition: MeasurementVectorNtupleTool.h:150
Trk::MeasurementVectorNtupleTool::m_UpdatorWarning
bool m_UpdatorWarning
warn only ones, if unbiased track states can not be calculated
Definition: MeasurementVectorNtupleTool.h:135
Trk::MeasurementVectorNtupleTool::m_nPixelHoles
int m_nPixelHoles
number of Pixel holes on track
Definition: MeasurementVectorNtupleTool.h:167
TrackTruth
MC particle associated with a reco track + the quality of match.
Definition: TrackTruth.h:14
Trk::MeasurementVectorNtupleTool::m_GeneralNtupleHelperToolHandles
ToolHandleArray< IValidationNtupleHelperTool > m_GeneralNtupleHelperToolHandles
jobOption: List of Ntuple validation helper tools for data independent from detector technology
Definition: MeasurementVectorNtupleTool.h:121
Trk::MeasurementVectorNtupleTool::addNtupleItems
virtual StatusCode addNtupleItems(TTree *tree)
add branches to the tree Should be called once (per track collection and tree) dunring the initialisa...
Definition: MeasurementVectorNtupleTool.cxx:324
Trk::MeasurementVectorNtupleTool::~MeasurementVectorNtupleTool
~MeasurementVectorNtupleTool()
Trk::MeasurementVectorNtupleTool::m_helperToolWarning
std::map< const IValidationNtupleHelperTool *, bool > m_helperToolWarning
Definition: MeasurementVectorNtupleTool.h:139
Trk::MeasurementVectorNtupleTool::m_updator
Trk::IUpdator * m_updator
updator for unbiased states
Definition: MeasurementVectorNtupleTool.h:110
AthAlgTool
Definition: AthAlgTool.h:26
Trk::MeasurementVectorNtupleTool::m_SCTHelperTools
std::vector< IValidationNtupleHelperTool * > m_SCTHelperTools
the helper tools for SCT data
Definition: MeasurementVectorNtupleTool.h:126
Trk::MeasurementVectorNtupleTool::fillHoleData
virtual StatusCode fillHoleData(const Trk::TrackStateOnSurface &)
fill ntuple data of holes on track without writing the record
Definition: MeasurementVectorNtupleTool.cxx:889
Trk::MeasurementVectorNtupleTool::m_nSctHoles
int m_nSctHoles
number of SCT holes on track
Definition: MeasurementVectorNtupleTool.h:168
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Trk::MeasurementVectorNtupleTool::fillTrackTruthData
virtual StatusCode fillTrackTruthData(const TrackParameters *&, const TrackTruth &, const int)
fill data about the truth match (score, parameter-pulls etc)
Definition: MeasurementVectorNtupleTool.cxx:704
Trk::MeasurementVectorNtupleTool::m_holeSearchTool
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
The hole search tool.
Definition: MeasurementVectorNtupleTool.h:113
Trk::MeasurementVectorNtupleTool::m_doHoleSearch
bool m_doHoleSearch
switch to turn hole search on/off
Definition: MeasurementVectorNtupleTool.h:138