ATLAS Offline Software
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 
18 #include "GaudiKernel/ServiceHandle.h"
21 
25 
29 
30 #include "Identifier/Identifier.h"
31 #include "InDetIdentifier/SCT_ID.h"
32 
35 
36 namespace ActsTrk {
37 
39  public:
40  StripClusterTruthDecoratorAlg(const std::string &name,ISvcLocator *pSvcLocator);
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,
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 
64 
67 
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
ReadHandleKeyArray.h
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
ActsTrk::StripClusterTruthDecoratorAlg::m_trackMeasurement_link
SG::WriteDecorHandleKey< xAOD::StripClusterContainer > m_trackMeasurement_link
Definition: StripClusterTruthDecoratorAlg.h:63
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_centroid_xeta
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xeta
Definition: StripClusterTruthDecoratorAlg.h:81
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ActsTrk::StripClusterTruthDecoratorAlg::m_stripHelper
const SCT_ID * m_stripHelper
Definition: StripClusterTruthDecoratorAlg.h:87
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_layer
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_layer
Definition: StripClusterTruthDecoratorAlg.h:71
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_SiWidth
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_SiWidth
Definition: StripClusterTruthDecoratorAlg.h:74
TrackMeasurementValidationAuxContainer.h
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_sizeZ
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
Definition: StripClusterTruthDecoratorAlg.h:73
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_centroid_xphi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
Definition: StripClusterTruthDecoratorAlg.h:80
ActsTrk::StripClusterTruthDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition: StripClusterTruthDecoratorAlg.cxx:20
ActsTrk::StripClusterTruthDecoratorAlg::m_write_xaod_key
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
Definition: StripClusterTruthDecoratorAlg.h:61
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_truth_barcodes
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
Definition: StripClusterTruthDecoratorAlg.h:66
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_LorentzShift
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_LorentzShift
Definition: StripClusterTruthDecoratorAlg.h:79
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_truth_indices
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_indices
Definition: StripClusterTruthDecoratorAlg.h:65
SG::ReadHandleKey< xAOD::StripClusterContainer >
ActsTrk::StripClusterTruthDecoratorAlg::m_stripDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Definition: StripClusterTruthDecoratorAlg.h:57
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_omegax
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegax
Definition: StripClusterTruthDecoratorAlg.h:77
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_side
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_side
Definition: StripClusterTruthDecoratorAlg.h:82
ActsTrk::StripClusterTruthDecoratorAlg::m_associationMap_key
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_associationMap_key
Definition: StripClusterTruthDecoratorAlg.h:56
ActsTrk::StripClusterTruthDecoratorAlg::labelMeasurementToKeep
StatusCode labelMeasurementToKeep(const EventContext &ctx, const xAOD::StripClusterContainer &clusters, std::vector< bool > &labels) const
Definition: StripClusterTruthDecoratorAlg.cxx:211
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
ActsTrk::StripClusterTruthDecoratorAlg::StripClusterTruthDecoratorAlg
StripClusterTruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: StripClusterTruthDecoratorAlg.cxx:14
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1446
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_bec
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
Definition: StripClusterTruthDecoratorAlg.h:70
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_sizePhi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizePhi
Definition: StripClusterTruthDecoratorAlg.h:72
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_waferID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_waferID
Definition: StripClusterTruthDecoratorAlg.h:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_omegay
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegay
Definition: StripClusterTruthDecoratorAlg.h:78
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_detectorElementID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_detectorElementID
Definition: StripClusterTruthDecoratorAlg.h:68
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_phi_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_phi_module
Definition: StripClusterTruthDecoratorAlg.h:76
AthReentrantAlgorithm.h
ActsTrk::StripClusterTruthDecoratorAlg::m_keepOnlyOnTrackMeasurements
Gaudi::Property< bool > m_keepOnlyOnTrackMeasurements
Definition: StripClusterTruthDecoratorAlg.h:85
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::StripClusterTruthDecoratorAlg::~StripClusterTruthDecoratorAlg
virtual ~StripClusterTruthDecoratorAlg()=default
SiDetectorElementCollection.h
ActsTrk::StripClusterTruthDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: StripClusterTruthDecoratorAlg.cxx:61
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
ActsTrk::StripClusterTruthDecoratorAlg::m_trackParticlesKey
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticlesKey
Definition: StripClusterTruthDecoratorAlg.h:59
SCT_ID
Definition: SCT_ID.h:68
StripClusterContainer.h
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
ActsTrk::StripClusterTruthDecoratorAlg
Definition: StripClusterTruthDecoratorAlg.h:38
TrackMeasurementValidationContainer.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MSTrackingVolumeBuilder.cxx:24
ActsTrk::StripClusterTruthDecoratorAlg::m_clustercontainer_key
SG::ReadHandleKey< xAOD::StripClusterContainer > m_clustercontainer_key
Definition: StripClusterTruthDecoratorAlg.h:55
MeasurementToTruthParticleAssociation.h
TrackParticleContainer.h
ActsTrk::StripClusterTruthDecoratorAlg::m_measurement_eta_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
Definition: StripClusterTruthDecoratorAlg.h:75
ActsTrk::StripClusterTruthDecoratorAlg::m_useTruthInfo
Gaudi::Property< bool > m_useTruthInfo
Definition: StripClusterTruthDecoratorAlg.h:84