ATLAS Offline Software
Loading...
Searching...
No Matches
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
37namespace 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,
54 const xAOD::PixelClusterContainer& clusters,
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
This is an Identifier helper class for the Pixel subdetector.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_clustercontainer_key
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_LorentzShift
SG::ReadHandleKey< ActsTrk::MeasurementToTruthParticleAssociation > m_associationMap_key
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xeta
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
PixelClusterTruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegay
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
StatusCode labelMeasurementToKeep(const EventContext &ctx, const xAOD::PixelClusterContainer &clusters, std::vector< bool > &labels) const
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegax
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_side
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_detectorElementID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_indices
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticlesKey
virtual ~PixelClusterTruthDecoratorAlg()=default
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_phi_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizePhi
SG::WriteDecorHandleKey< xAOD::PixelClusterContainer > m_trackMeasurement_link
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_layer
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_waferID
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_tots
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_SiWidth
An algorithm that can be simultaneously executed in multiple threads.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.