ATLAS Offline Software
Loading...
Searching...
No Matches
TruthTrackBuilderTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef ACTSTRK_TRUTHTRACKBUILDERTOOL_H
5#define ACTSTRK_TRUTHTRACKBUILDERTOOL_H
6
7#include <Gaudi/Property.h>
8
15
16namespace ActsTrk {
17
18// truth track builder class
19class TruthTrackBuilderTool final : public AthAlgTool {
20
21 public:
22 // defining all structs and type def used for naming
23 using Vector3 = Eigen::Vector3f;
24
30
31 using TruthHits = std::vector<TruthHit>;
32 using TruthTracks = std::unordered_map<const xAOD::TruthParticle*, TruthHits>;
33
34 TruthTrackBuilderTool(const std::string& type, const std::string& name,
35 const IInterface* parent);
36
37 StatusCode initialize() override;
38
39 StatusCode buildTruthTracks(const EventContext& ctx,
40 TruthTracks& truthTracks) const;
41
42 private:
43 // read handles for cluster to truth particle association
44 // along with actual cluster information for coorindates
45 // these will be used in all training algorithms
46 // pixel
48 this, "PixelClusters", "ITkPixelClusters",
49 "Input reconstructed pixel clusters"};
52 this, "PixelClustersToTruthAssociationMap",
53 "ITkPixelClustersToTruthParticles",
54 "Pixel cluster-to-truth-particle associations"};
55 // strips
57 this, "StripClusters", "ITkStripClusters",
58 "Input reconstructed strip clusters"};
61 this, "StripClustersToTruthAssociationMap",
62 "ITkStripClustersToTruthParticles",
63 "Strip cluster-to-truth-particle associations"};
64
65 // configurable gaudi properties for useinf strip, pixel or both clusters
66 Gaudi::Property<bool> m_usePixelClusters{this, "usePixelClusters", true,
67 "option for using pixel clusters"};
68 Gaudi::Property<bool> m_useStripClusters{this, "useStripClusters", true,
69 "option for using strip clusters"};
70
71 // templated function to fill truth tracks map for both pixel and strip
72 // clusters defined in the source file, where it is instantiated for the pixel
73 // and strip containers
74 template <typename ClusterContainer>
76 const ClusterContainer& clusters,
77 const MeasurementToTruthParticleAssociation& truthAssociations,
78 TruthTracks& truthTracks) const;
79};
80} // namespace ActsTrk
81
82#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadHandleKey< xAOD::StripClusterContainer > m_stripClustersKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_pixelClustersKey
StatusCode buildTruthTracks(const EventContext &ctx, TruthTracks &truthTracks) const
Gaudi::Property< bool > m_useStripClusters
Gaudi::Property< bool > m_usePixelClusters
void addClusterToTruthTracks(const ClusterContainer &clusters, const MeasurementToTruthParticleAssociation &truthAssociations, TruthTracks &truthTracks) const
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_pixelTruthAssociationKey
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_stripTruthAssociationKey
TruthTrackBuilderTool(const std::string &type, const std::string &name, const IInterface *parent)
std::unordered_map< const xAOD::TruthParticle *, TruthHits > TruthTracks
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Property holding a SG store/key/clid from which a ReadHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
const xAOD::UncalibratedMeasurement * hit