ATLAS Offline Software
PixelClusterTruthDecoratorAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Header file for class PixelClusterTruthDecoratorAlg
7 //
8 // The algorithm extends xAOD::PixelClusterContainer
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 PIXELCLUSTERTRUTHDECORATORALG_H
15 #define PIXELCLUSTERTRUTHDECORATORALG_H
16 
18 #include "GaudiKernel/ServiceHandle.h"
22 
25 
30 
31 #include "Identifier/Identifier.h"
32 
36 
37 namespace ActsTrk {
38 
40  : public AthReentrantAlgorithm {
41  public:
42  PixelClusterTruthDecoratorAlg(const std::string &name,
43  ISvcLocator *pSvcLocator);
44  virtual ~PixelClusterTruthDecoratorAlg() = default;
45 
46  virtual StatusCode initialize() override;
47  virtual StatusCode execute(const EventContext& ctx) const override;
48 
49  private:
50  // This function is used to mark the clusters and decide which one to keep
51  // and which one to skip. It does so by filling a std::vector<bool>, which
52  // size is the same as the cluster collection.
53  StatusCode labelMeasurementToKeep(const EventContext& ctx,
55  std::vector<bool>& labels) const;
56 
57  private:
58  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool {this, "LorentzAngleTool", ""};
59 
60  SG::ReadHandleKey<xAOD::PixelClusterContainer> m_clustercontainer_key {this,"ClusterContainer", "","Input Pixel Cluster container"};
61  SG::ReadHandleKey<ActsTrk::MeasurementToTruthParticleAssociation> m_associationMap_key {this,"AssociationMapOut","", "Association map between measurements and truth particles"};
62 
63  SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticlesKey {this, "TrackParticles", {}, "Input xAOD::TrackParticles"};
64 
65  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection"};
66  SG::WriteHandleKey<xAOD::TrackMeasurementValidationContainer> m_write_xaod_key{this,"MeasurementContainer","", "Output Pixel Validation Clusters"};
67 
68  // Decorations
70 
73 
89 
91 
92  Gaudi::Property<bool> m_useTruthInfo {this, "UseTruthInfo", true};
93  Gaudi::Property<bool> m_keepOnlyOnTrackMeasurements {this, "KeepOnlyOnTrackMeasurements", false, "Keep on on-track measurements instead of the full collection"};
94 
95  const PixelID *m_PixelHelper {nullptr};
96  };
97 
98 }
99 
100 #endif
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
ActsTrk::PixelClusterTruthDecoratorAlg::m_PixelHelper
const PixelID * m_PixelHelper
Definition: PixelClusterTruthDecoratorAlg.h:95
ActsTrk::PixelClusterTruthDecoratorAlg::PixelClusterTruthDecoratorAlg
PixelClusterTruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: PixelClusterTruthDecoratorAlg.cxx:16
ActsTrk::PixelClusterTruthDecoratorAlg::m_keepOnlyOnTrackMeasurements
Gaudi::Property< bool > m_keepOnlyOnTrackMeasurements
Definition: PixelClusterTruthDecoratorAlg.h:93
ActsTrk::PixelClusterTruthDecoratorAlg::m_trackMeasurement_link
SG::WriteDecorHandleKey< xAOD::PixelClusterContainer > m_trackMeasurement_link
Definition: PixelClusterTruthDecoratorAlg.h:69
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_centroid_xphi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
Definition: PixelClusterTruthDecoratorAlg.h:86
TrackMeasurementValidationAuxContainer.h
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_centroid_xeta
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xeta
Definition: PixelClusterTruthDecoratorAlg.h:87
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_phi_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_phi_module
Definition: PixelClusterTruthDecoratorAlg.h:82
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_layer
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_layer
Definition: PixelClusterTruthDecoratorAlg.h:77
ActsTrk::PixelClusterTruthDecoratorAlg::m_clustercontainer_key
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_clustercontainer_key
Definition: PixelClusterTruthDecoratorAlg.h:60
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_bec
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
Definition: PixelClusterTruthDecoratorAlg.h:76
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_LorentzShift
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_LorentzShift
Definition: PixelClusterTruthDecoratorAlg.h:85
ISiLorentzAngleTool.h
ActsTrk::PixelClusterTruthDecoratorAlg::~PixelClusterTruthDecoratorAlg
virtual ~PixelClusterTruthDecoratorAlg()=default
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_sizeZ
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
Definition: PixelClusterTruthDecoratorAlg.h:79
SG::ReadHandleKey< xAOD::PixelClusterContainer >
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_eta_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
Definition: PixelClusterTruthDecoratorAlg.h:81
ActsTrk::PixelClusterTruthDecoratorAlg
Definition: PixelClusterTruthDecoratorAlg.h:40
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
ActsTrk::PixelClusterTruthDecoratorAlg::m_associationMap_key
SG::ReadHandleKey< ActsTrk::MeasurementToTruthParticleAssociation > m_associationMap_key
Definition: PixelClusterTruthDecoratorAlg.h:61
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1446
ActsTrk::PixelClusterTruthDecoratorAlg::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: PixelClusterTruthDecoratorAlg.h:65
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_truth_barcodes
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
Definition: PixelClusterTruthDecoratorAlg.h:72
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::PixelClusterTruthDecoratorAlg::m_measurement_omegay
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegay
Definition: PixelClusterTruthDecoratorAlg.h:84
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_tots
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_tots
Definition: PixelClusterTruthDecoratorAlg.h:90
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_side
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_side
Definition: PixelClusterTruthDecoratorAlg.h:88
PixelClusterContainer.h
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_truth_indices
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_indices
Definition: PixelClusterTruthDecoratorAlg.h:71
ActsTrk::PixelClusterTruthDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: PixelClusterTruthDecoratorAlg.cxx:65
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_waferID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_waferID
Definition: PixelClusterTruthDecoratorAlg.h:75
ActsTrk::PixelClusterTruthDecoratorAlg::m_useTruthInfo
Gaudi::Property< bool > m_useTruthInfo
Definition: PixelClusterTruthDecoratorAlg.h:92
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsTrk::PixelClusterTruthDecoratorAlg::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: PixelClusterTruthDecoratorAlg.h:58
ActsTrk::PixelClusterTruthDecoratorAlg::m_write_xaod_key
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
Definition: PixelClusterTruthDecoratorAlg.h:66
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SiDetectorElementCollection.h
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_sizePhi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizePhi
Definition: PixelClusterTruthDecoratorAlg.h:78
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_detectorElementID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_detectorElementID
Definition: PixelClusterTruthDecoratorAlg.h:74
ActsTrk::PixelClusterTruthDecoratorAlg::labelMeasurementToKeep
StatusCode labelMeasurementToKeep(const EventContext &ctx, const xAOD::PixelClusterContainer &clusters, std::vector< bool > &labels) const
Definition: PixelClusterTruthDecoratorAlg.cxx:252
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
ActsTrk::PixelClusterTruthDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition: PixelClusterTruthDecoratorAlg.cxx:21
TrackMeasurementValidationContainer.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MSTrackingVolumeBuilder.cxx:25
MeasurementToTruthParticleAssociation.h
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_omegax
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegax
Definition: PixelClusterTruthDecoratorAlg.h:83
PixelID
Definition: PixelID.h:67
ActsTrk::PixelClusterTruthDecoratorAlg::m_measurement_SiWidth
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_SiWidth
Definition: PixelClusterTruthDecoratorAlg.h:80
TrackParticleContainer.h
ActsTrk::PixelClusterTruthDecoratorAlg::m_trackParticlesKey
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticlesKey
Definition: PixelClusterTruthDecoratorAlg.h:63