ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetValidation
InDetPhysValMonitoring
src
InDetPhysHitDecoratorAlg.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_InDetPhysHitDecoratorAlg_H
6
#define INDETPHYSVALMONITORING_InDetPhysHitDecoratorAlg_H
13
// STL includes
14
#include <mutex>
15
#include <string>
16
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
17
#include "GaudiKernel/ToolHandle.h"
18
#include "
xAODTracking/TrackParticleContainer.h
"
19
#include "
StoreGate/WriteDecorHandle.h
"
20
#include "GaudiKernel/EventContext.h"
21
#include "
InDetCondTools/ISiLorentzAngleTool.h
"
22
#include "
TrkToolInterfaces/ITrackHoleSearchTool.h
"
23
#include "
TrkToolInterfaces/IUpdator.h
"
24
#include "
TrkToolInterfaces/IResidualPullCalculator.h
"
25
26
class
Identifier
;
27
class
AtlasDetectorID
;
28
class
PixelID
;
29
class
SCT_ID
;
30
class
TRT_ID
;
31
32
// class to decorate xAOD::TruthParticles with additional information required by validation
33
class
InDetPhysHitDecoratorAlg
:
public
AthReentrantAlgorithm
{
34
public
:
35
// L0PIXBARR : layer0 of pixel barrel (IBL in Run2)
36
// PIXEL : in barrel all layers appart from layer0. In end-caps all disks/rings.
37
enum
Subdetector
{
38
INVALID_DETECTOR
=-1,
L0PIXBARR
,
PIXEL
,
SCT
,
TRT
,
N_SUBDETECTORS
39
};
40
enum
Region
{
41
INVALID_REGION
=-1,
BARREL
,
ENDCAP
42
};
43
InDetPhysHitDecoratorAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
44
virtual
45
~InDetPhysHitDecoratorAlg
();
46
virtual
StatusCode
initialize
()
override
;
47
virtual
StatusCode
finalize
()
override
;
48
virtual
StatusCode
execute
(
const
EventContext &ctx)
const override
;
49
50
private
:
51
bool
52
decorateTrack
(
const
xAOD::TrackParticle
&particle,
53
std::vector<
SG::WriteDecorHandle
<
xAOD::TrackParticleContainer
,std::vector<float> > > &float_decor,
54
std::vector<
SG::WriteDecorHandle
<
xAOD::TrackParticleContainer
,std::vector<int> > > &int_decor,
55
std::vector<
SG::WriteDecorHandle
<
xAOD::TrackParticleContainer
,std::vector<uint64_t> > > &uint64_decor)
const
;
56
57
ToolHandle<Trk::ITrackHoleSearchTool>
m_holeSearchTool
58
{
this
,
"InDetTrackHoleSearchTool"
,
"InDet::InDetTrackHoleSearchTool"
};
59
ToolHandle<Trk::IUpdator>
m_updatorHandle
60
{
this
,
"Updator"
,
"Trk::KalmanUpdator/TrkKalmanUpdator"
,
61
"Tool handle of updator for unbiased states"
};
62
ToolHandle<Trk::IResidualPullCalculator>
m_residualPullCalculator
63
{
this
,
"ResidualPullCalculator"
,
64
"Trk::ResidualPullCalculator/ResidualPullCalculator"
};
65
ToolHandle<ISiLorentzAngleTool>
m_lorentzAngleTool
{
this
,
"LorentzAngleTool"
,
"SiLorentzAngleTool"
,
"Tool to retrieve Lorentz angle"
};
66
67
enum
EIntDecorations
{
68
kDecorRegion
,
69
kDecorDet
,
70
kDecorILayer
,
71
kDecorType
,
72
kDecorPhiWidth
,
73
kDecorEtaWidth
,
74
kNIntDecorators
75
};
76
enum
EUInt64Decorations
{
77
kDecorID
,
78
kNUInt64Decorators
79
};
80
enum
EDecorations
{
81
kDecorResidualLocX
,
82
kDecorPullLocX
,
83
kDecorMeasLocX
,
84
kDecorTrkParamLocX
,
85
kDecorMeasLocCovX
,
86
kDecorResidualLocY
,
87
kDecorPullLocY
,
88
kDecorMeasLocY
,
89
kDecorTrkParamLocY
,
90
kDecorMeasLocCovY
,
91
kDecorAngle
,
92
kDecorEtaLoc
,
93
kNFloatDecorators
94
};
95
// need tracks particle key, to compose decoration keys
96
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_trkParticleName
97
{
this
,
"TrackParticleContainerName"
,
"InDetTrackParticles"
,
""
};
98
99
std::vector<SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> >
m_intDecor
;
100
std::vector<SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> >
m_uint64Decor
;
101
std::vector<SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> >
m_floatDecor
;
102
103
Gaudi::Property<std::string>
m_prefix
104
{
this
,
"Prefix"
,
""
,
"Decoration prefix to avoid clashes."
};
105
106
Gaudi::Property<bool>
m_useTRT
107
{
this
,
"useTRT"
,
false
,
"Use TRT geometry"
};
108
109
mutable
std::atomic<bool>
m_alreadyWarned
{
false
};
110
// the following help identify a surface in the detector
111
const
AtlasDetectorID
*
m_idHelper
{
nullptr
};
112
const
PixelID
*
m_pixelID
{
nullptr
};
113
const
SCT_ID
*
m_sctID
{
nullptr
};
114
const
TRT_ID
*
m_trtID
{
nullptr
};
115
116
// private member functions
117
bool
decideDetectorRegion
(
const
Identifier
&
id
,
Subdetector
& det,
Region
&
r
,
int
& layer)
const
;
118
const
Trk::TrackParameters
*
119
getUnbiasedTrackParameters
(
const
Trk::TrackParameters
* trkParameters,
120
const
Trk::MeasurementBase
* measurement,
121
bool
&isUnbiased)
const
;
122
};
123
124
#endif
AthReentrantAlgorithm.h
TrackParticleContainer.h
IResidualPullCalculator.h
ISiLorentzAngleTool.h
ITrackHoleSearchTool.h
IUpdator.h
WriteDecorHandle.h
Handle class for adding a decoration to an object.
Region
Region
Definition
TrigL2HitResidual.h:14
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition
AtlasDetectorID.h:53
InDetPhysHitDecoratorAlg::decideDetectorRegion
bool decideDetectorRegion(const Identifier &id, Subdetector &det, Region &r, int &layer) const
Definition
InDetPhysHitDecoratorAlg.cxx:446
InDetPhysHitDecoratorAlg::decorateTrack
bool decorateTrack(const xAOD::TrackParticle &particle, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< float > > > &float_decor, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< int > > > &int_decor, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< uint64_t > > > &uint64_decor) const
Definition
InDetPhysHitDecoratorAlg.cxx:127
InDetPhysHitDecoratorAlg::m_trtID
const TRT_ID * m_trtID
Definition
InDetPhysHitDecoratorAlg.h:114
InDetPhysHitDecoratorAlg::m_useTRT
Gaudi::Property< bool > m_useTRT
Definition
InDetPhysHitDecoratorAlg.h:107
InDetPhysHitDecoratorAlg::InDetPhysHitDecoratorAlg
InDetPhysHitDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
InDetPhysHitDecoratorAlg.cxx:27
InDetPhysHitDecoratorAlg::m_prefix
Gaudi::Property< std::string > m_prefix
Definition
InDetPhysHitDecoratorAlg.h:104
InDetPhysHitDecoratorAlg::m_holeSearchTool
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
Definition
InDetPhysHitDecoratorAlg.h:58
InDetPhysHitDecoratorAlg::getUnbiasedTrackParameters
const Trk::TrackParameters * getUnbiasedTrackParameters(const Trk::TrackParameters *trkParameters, const Trk::MeasurementBase *measurement, bool &isUnbiased) const
Definition
InDetPhysHitDecoratorAlg.cxx:483
InDetPhysHitDecoratorAlg::~InDetPhysHitDecoratorAlg
virtual ~InDetPhysHitDecoratorAlg()
Definition
InDetPhysHitDecoratorAlg.cxx:30
InDetPhysHitDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition
InDetPhysHitDecoratorAlg.cxx:34
InDetPhysHitDecoratorAlg::m_idHelper
const AtlasDetectorID * m_idHelper
Definition
InDetPhysHitDecoratorAlg.h:111
InDetPhysHitDecoratorAlg::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
Definition
InDetPhysHitDecoratorAlg.h:63
InDetPhysHitDecoratorAlg::m_sctID
const SCT_ID * m_sctID
Definition
InDetPhysHitDecoratorAlg.h:113
InDetPhysHitDecoratorAlg::Subdetector
Subdetector
Definition
InDetPhysHitDecoratorAlg.h:37
InDetPhysHitDecoratorAlg::INVALID_DETECTOR
@ INVALID_DETECTOR
Definition
InDetPhysHitDecoratorAlg.h:38
InDetPhysHitDecoratorAlg::PIXEL
@ PIXEL
Definition
InDetPhysHitDecoratorAlg.h:38
InDetPhysHitDecoratorAlg::N_SUBDETECTORS
@ N_SUBDETECTORS
Definition
InDetPhysHitDecoratorAlg.h:38
InDetPhysHitDecoratorAlg::L0PIXBARR
@ L0PIXBARR
Definition
InDetPhysHitDecoratorAlg.h:38
InDetPhysHitDecoratorAlg::Region
Region
Definition
InDetPhysHitDecoratorAlg.h:40
InDetPhysHitDecoratorAlg::ENDCAP
@ ENDCAP
Definition
InDetPhysHitDecoratorAlg.h:41
InDetPhysHitDecoratorAlg::INVALID_REGION
@ INVALID_REGION
Definition
InDetPhysHitDecoratorAlg.h:41
InDetPhysHitDecoratorAlg::BARREL
@ BARREL
Definition
InDetPhysHitDecoratorAlg.h:41
InDetPhysHitDecoratorAlg::EIntDecorations
EIntDecorations
Definition
InDetPhysHitDecoratorAlg.h:67
InDetPhysHitDecoratorAlg::kDecorPhiWidth
@ kDecorPhiWidth
Definition
InDetPhysHitDecoratorAlg.h:72
InDetPhysHitDecoratorAlg::kNIntDecorators
@ kNIntDecorators
Definition
InDetPhysHitDecoratorAlg.h:74
InDetPhysHitDecoratorAlg::kDecorILayer
@ kDecorILayer
Definition
InDetPhysHitDecoratorAlg.h:70
InDetPhysHitDecoratorAlg::kDecorType
@ kDecorType
Definition
InDetPhysHitDecoratorAlg.h:71
InDetPhysHitDecoratorAlg::kDecorEtaWidth
@ kDecorEtaWidth
Definition
InDetPhysHitDecoratorAlg.h:73
InDetPhysHitDecoratorAlg::kDecorRegion
@ kDecorRegion
Definition
InDetPhysHitDecoratorAlg.h:68
InDetPhysHitDecoratorAlg::kDecorDet
@ kDecorDet
Definition
InDetPhysHitDecoratorAlg.h:69
InDetPhysHitDecoratorAlg::m_intDecor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_intDecor
Definition
InDetPhysHitDecoratorAlg.h:99
InDetPhysHitDecoratorAlg::EDecorations
EDecorations
Definition
InDetPhysHitDecoratorAlg.h:80
InDetPhysHitDecoratorAlg::kDecorMeasLocCovX
@ kDecorMeasLocCovX
Definition
InDetPhysHitDecoratorAlg.h:85
InDetPhysHitDecoratorAlg::kDecorMeasLocCovY
@ kDecorMeasLocCovY
Definition
InDetPhysHitDecoratorAlg.h:90
InDetPhysHitDecoratorAlg::kDecorMeasLocY
@ kDecorMeasLocY
Definition
InDetPhysHitDecoratorAlg.h:88
InDetPhysHitDecoratorAlg::kDecorTrkParamLocX
@ kDecorTrkParamLocX
Definition
InDetPhysHitDecoratorAlg.h:84
InDetPhysHitDecoratorAlg::kDecorEtaLoc
@ kDecorEtaLoc
Definition
InDetPhysHitDecoratorAlg.h:92
InDetPhysHitDecoratorAlg::kDecorResidualLocY
@ kDecorResidualLocY
Definition
InDetPhysHitDecoratorAlg.h:86
InDetPhysHitDecoratorAlg::kDecorPullLocX
@ kDecorPullLocX
Definition
InDetPhysHitDecoratorAlg.h:82
InDetPhysHitDecoratorAlg::kNFloatDecorators
@ kNFloatDecorators
Definition
InDetPhysHitDecoratorAlg.h:93
InDetPhysHitDecoratorAlg::kDecorPullLocY
@ kDecorPullLocY
Definition
InDetPhysHitDecoratorAlg.h:87
InDetPhysHitDecoratorAlg::kDecorTrkParamLocY
@ kDecorTrkParamLocY
Definition
InDetPhysHitDecoratorAlg.h:89
InDetPhysHitDecoratorAlg::kDecorMeasLocX
@ kDecorMeasLocX
Definition
InDetPhysHitDecoratorAlg.h:83
InDetPhysHitDecoratorAlg::kDecorAngle
@ kDecorAngle
Definition
InDetPhysHitDecoratorAlg.h:91
InDetPhysHitDecoratorAlg::kDecorResidualLocX
@ kDecorResidualLocX
Definition
InDetPhysHitDecoratorAlg.h:81
InDetPhysHitDecoratorAlg::m_trkParticleName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkParticleName
Definition
InDetPhysHitDecoratorAlg.h:97
InDetPhysHitDecoratorAlg::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition
InDetPhysHitDecoratorAlg.h:65
InDetPhysHitDecoratorAlg::m_updatorHandle
ToolHandle< Trk::IUpdator > m_updatorHandle
Definition
InDetPhysHitDecoratorAlg.h:60
InDetPhysHitDecoratorAlg::m_floatDecor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_floatDecor
Definition
InDetPhysHitDecoratorAlg.h:101
InDetPhysHitDecoratorAlg::m_alreadyWarned
std::atomic< bool > m_alreadyWarned
Definition
InDetPhysHitDecoratorAlg.h:109
InDetPhysHitDecoratorAlg::m_uint64Decor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_uint64Decor
Definition
InDetPhysHitDecoratorAlg.h:100
InDetPhysHitDecoratorAlg::EUInt64Decorations
EUInt64Decorations
Definition
InDetPhysHitDecoratorAlg.h:76
InDetPhysHitDecoratorAlg::kDecorID
@ kDecorID
Definition
InDetPhysHitDecoratorAlg.h:77
InDetPhysHitDecoratorAlg::kNUInt64Decorators
@ kNUInt64Decorators
Definition
InDetPhysHitDecoratorAlg.h:78
InDetPhysHitDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
InDetPhysHitDecoratorAlg.cxx:103
InDetPhysHitDecoratorAlg::m_pixelID
const PixelID * m_pixelID
Definition
InDetPhysHitDecoratorAlg.h:112
InDetPhysHitDecoratorAlg::finalize
virtual StatusCode finalize() override
Definition
InDetPhysHitDecoratorAlg.cxx:97
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition
StoreGate/StoreGate/WriteDecorHandle.h:100
TRT_ID
This is an Identifier helper class for the TRT subdetector.
Definition
TRT_ID.h:84
Trk::MeasurementBase
This class is the pure abstract base class for all fittable tracking measurements.
Definition
MeasurementBase.h:58
r
int r
Definition
globals.cxx:22
Identifier
Definition
IdentifierFieldParser.cxx:14
SCT
Definition
SCT_ChipUtils.h:14
TRT
Definition
HitInfo.h:33
Trk::TrackParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
Definition
Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:27
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::TrackParticleContainer
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainer.h:14
Generated on
for ATLAS Offline Software by
1.17.0