ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsObjectDecoration
src
StripClusterTruthDecoratorAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// Header file for class StipClusterTruthDecoratorAlg
7
//
8
// The algorithm extends xAOD::StripClusterContainer
9
// with additional decorations associated to truth information
10
// And stores the results in a TrackMeasurementValidationContainer
11
// for compatibility with monitoring tools
13
14
#ifndef STRIPCLUSTERTRUTHDECORATORALG_H
15
#define STRIPCLUSTERTRUTHDECORATORALG_H
16
17
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
18
#include "GaudiKernel/ServiceHandle.h"
19
#include "
StoreGate/ReadHandleKeyArray.h
"
20
#include "
xAODTracking/TrackParticleContainer.h
"
21
22
#include "
StoreGate/ReadDecorHandleKey.h
"
23
#include "
StoreGate/WriteDecorHandleKey.h
"
24
#include "
StoreGate/WriteDecorHandle.h
"
25
26
#include "
xAODInDetMeasurement/StripClusterContainer.h
"
27
#include "
xAODTracking/TrackMeasurementValidationContainer.h
"
28
#include "
xAODTracking/TrackMeasurementValidationAuxContainer.h
"
29
30
#include "Identifier/Identifier.h"
31
#include "
InDetIdentifier/SCT_ID.h
"
32
33
#include "
ActsEvent/MeasurementToTruthParticleAssociation.h
"
34
#include "
InDetReadoutGeometry/SiDetectorElementCollection.h
"
35
36
namespace
ActsTrk
{
37
38
class
StripClusterTruthDecoratorAlg
:
public
AthReentrantAlgorithm
{
39
public
:
40
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
41
virtual
~StripClusterTruthDecoratorAlg
() =
default
;
42
43
virtual
StatusCode
initialize
()
override
;
44
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
45
46
private
:
47
// This function is used to mark the clusters and decide which one to keep
48
// and which one to skip. It does so by filling a std::vector<bool>, which
49
// size is the same as the cluster collection.
50
StatusCode
labelMeasurementToKeep
(
const
EventContext& ctx,
51
const
xAOD::StripClusterContainer
& clusters,
52
std::vector<bool>& labels)
const
;
53
54
private
:
55
SG::ReadHandleKey<xAOD::StripClusterContainer>
m_clustercontainer_key
{
this
,
"ClusterContainer"
,
""
,
"Input Strip Cluster container"
};
56
SG::ReadHandleKey<MeasurementToTruthParticleAssociation>
m_associationMap_key
{
this
,
"AssociationMapOut"
,
""
,
"Association map between measurements and truth particles"
};
57
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_stripDetEleCollKey
{
this
,
"StripDetectorElements"
,
"ITkStripDetectorElementCollection"
};
58
59
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer >
m_trackParticlesKey
{
this
,
"TrackParticles"
, {},
"Input xAOD::TrackParticles"
};
60
61
SG::WriteHandleKey<xAOD::TrackMeasurementValidationContainer>
m_write_xaod_key
{
this
,
"MeasurementContainer"
,
""
,
"Output Strip Validation Clusters"
};
62
63
SG::WriteDecorHandleKey< xAOD::StripClusterContainer >
m_trackMeasurement_link
{
this
,
"MeasurementLink"
,
m_clustercontainer_key
,
"validationMeasurementLink"
};
64
65
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_truth_indices
{
this
,
"MeasurementTruthIndices"
,
m_write_xaod_key
,
"truth_index"
};
66
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_truth_barcodes
{
this
,
"MeasurementTruthBarcode"
,
m_write_xaod_key
,
"truth_barcode"
};
67
68
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_detectorElementID
{
this
,
"MeasurementDetectorElementID"
,
m_write_xaod_key
,
"detectorElementID"
};
69
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_waferID
{
this
,
"MeasurementWaferID"
,
m_write_xaod_key
,
"waferID"
};
70
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_bec
{
this
,
"MeasurementBEC"
,
m_write_xaod_key
,
"bec"
};
71
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_layer
{
this
,
"MeasurementLayer"
,
m_write_xaod_key
,
"layer"
};
72
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_sizePhi
{
this
,
"MeasurementSizePhi"
,
m_write_xaod_key
,
"sizePhi"
};
73
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_sizeZ
{
this
,
"MeasurementSizeZ"
,
m_write_xaod_key
,
"sizeZ"
};
74
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_SiWidth
{
this
,
"MeasurementSiWidth"
,
m_write_xaod_key
,
"SiWidth"
};
75
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_eta_module
{
this
,
"MeasurementEtaModule"
,
m_write_xaod_key
,
"eta_module"
};
76
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_phi_module
{
this
,
"MeasurementPhiModule"
,
m_write_xaod_key
,
"phi_module"
};
77
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_omegax
{
this
,
"MeasurementOmegaX"
,
m_write_xaod_key
,
"omegax"
};
78
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_omegay
{
this
,
"MeasurementOmegaY"
,
m_write_xaod_key
,
"omegay"
};
79
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_LorentzShift
{
this
,
"MeasurementLorentzShift"
,
m_write_xaod_key
,
"LorentzShift"
};
80
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_centroid_xphi
{
this
,
"MeasurementCentroidXphi"
,
m_write_xaod_key
,
"centroid_xphi"
};
81
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_centroid_xeta
{
this
,
"MeasurementCentroidXeta"
,
m_write_xaod_key
,
"centroid_xeta"
};
82
SG::WriteDecorHandleKey<xAOD::TrackMeasurementValidationContainer>
m_measurement_side
{
this
,
"MeasurementSide"
,
m_write_xaod_key
,
"side"
};
83
84
Gaudi::Property<bool>
m_useTruthInfo
{
this
,
"UseTruthInfo"
,
true
};
85
Gaudi::Property<bool>
m_keepOnlyOnTrackMeasurements
{
this
,
"KeepOnlyOnTrackMeasurements"
,
false
,
"Keep on on-track measurements instead of the full collection"
};
86
87
const
SCT_ID
*
m_stripHelper
{
nullptr
};
88
};
89
}
90
91
92
#endif
AthReentrantAlgorithm.h
TrackParticleContainer.h
MeasurementToTruthParticleAssociation.h
SCT_ID.h
This is an Identifier helper class for the SCT subdetector.
SiDetectorElementCollection.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ReadHandleKeyArray.h
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
WriteDecorHandle.h
Handle class for adding a decoration to an object.
StripClusterContainer.h
TrackMeasurementValidationAuxContainer.h
TrackMeasurementValidationContainer.h
ActsTrk::StripClusterTruthDecoratorAlg
Definition
StripClusterTruthDecoratorAlg.h:38
ActsTrk::StripClusterTruthDecoratorAlg::m_stripDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Definition
StripClusterTruthDecoratorAlg.h:57
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_phi_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_phi_module
Definition
StripClusterTruthDecoratorAlg.h:76
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_SiWidth
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_SiWidth
Definition
StripClusterTruthDecoratorAlg.h:74
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_layer
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_layer
Definition
StripClusterTruthDecoratorAlg.h:71
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_eta_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
Definition
StripClusterTruthDecoratorAlg.h:75
ActsTrk::StripClusterTruthDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
StripClusterTruthDecoratorAlg.cxx:58
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_centroid_xeta
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xeta
Definition
StripClusterTruthDecoratorAlg.h:81
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_detectorElementID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_detectorElementID
Definition
StripClusterTruthDecoratorAlg.h:68
ActsTrk::StripClusterTruthDecoratorAlg::m_clustercontainer_key
SG::ReadHandleKey< xAOD::StripClusterContainer > m_clustercontainer_key
Definition
StripClusterTruthDecoratorAlg.h:55
ActsTrk::StripClusterTruthDecoratorAlg::~StripClusterTruthDecoratorAlg
virtual ~StripClusterTruthDecoratorAlg()=default
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_side
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_side
Definition
StripClusterTruthDecoratorAlg.h:82
ActsTrk::StripClusterTruthDecoratorAlg::m_trackParticlesKey
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticlesKey
Definition
StripClusterTruthDecoratorAlg.h:59
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_waferID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_waferID
Definition
StripClusterTruthDecoratorAlg.h:69
ActsTrk::StripClusterTruthDecoratorAlg::m_write_xaod_key
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
Definition
StripClusterTruthDecoratorAlg.h:61
ActsTrk::StripClusterTruthDecoratorAlg::m_keepOnlyOnTrackMeasurements
Gaudi::Property< bool > m_keepOnlyOnTrackMeasurements
Definition
StripClusterTruthDecoratorAlg.h:85
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_sizePhi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizePhi
Definition
StripClusterTruthDecoratorAlg.h:72
ActsTrk::StripClusterTruthDecoratorAlg::m_trackMeasurement_link
SG::WriteDecorHandleKey< xAOD::StripClusterContainer > m_trackMeasurement_link
Definition
StripClusterTruthDecoratorAlg.h:63
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_LorentzShift
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_LorentzShift
Definition
StripClusterTruthDecoratorAlg.h:79
ActsTrk::StripClusterTruthDecoratorAlg::m_useTruthInfo
Gaudi::Property< bool > m_useTruthInfo
Definition
StripClusterTruthDecoratorAlg.h:84
ActsTrk::StripClusterTruthDecoratorAlg::m_stripHelper
const SCT_ID * m_stripHelper
Definition
StripClusterTruthDecoratorAlg.h:87
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_sizeZ
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
Definition
StripClusterTruthDecoratorAlg.h:73
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_omegay
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegay
Definition
StripClusterTruthDecoratorAlg.h:78
ActsTrk::StripClusterTruthDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition
StripClusterTruthDecoratorAlg.cxx:17
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_centroid_xphi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
Definition
StripClusterTruthDecoratorAlg.h:80
ActsTrk::StripClusterTruthDecoratorAlg::labelMeasurementToKeep
StatusCode labelMeasurementToKeep(const EventContext &ctx, const xAOD::StripClusterContainer &clusters, std::vector< bool > &labels) const
Definition
StripClusterTruthDecoratorAlg.cxx:209
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_omegax
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegax
Definition
StripClusterTruthDecoratorAlg.h:77
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_bec
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
Definition
StripClusterTruthDecoratorAlg.h:70
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_truth_barcodes
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
Definition
StripClusterTruthDecoratorAlg.h:66
ActsTrk::StripClusterTruthDecoratorAlg::m_associationMap_key
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_associationMap_key
Definition
StripClusterTruthDecoratorAlg.h:56
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_truth_indices
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_indices
Definition
StripClusterTruthDecoratorAlg.h:65
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition
StoreGate/StoreGate/ReadHandleKeyArray.h:32
xAOD::StripClusterContainer
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
Definition
StripClusterContainer.h:14
Generated on
for ATLAS Offline Software by
1.17.0