ATLAS Offline Software
Loading...
Searching...
No Matches
TritonTracccTrackMaker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TritonTracccTrackMaker_H
6#define TritonTracccTrackMaker_H
7
8// System include(s).
9#include <filesystem>
10#include <format>
11#include <fstream>
12#include <memory>
13#include <string>
14
19
20// Athena includes
29#include "Acts/EventData/BoundTrackParameters.hpp"
31
35#include "GaudiKernel/IChronoStatSvc.h"
36#include "GaudiKernel/ServiceHandle.h"
37
44
52
54
55// Tool handles
56#include "ITracccTritonTool.h"
57
68
69public:
70 using AthReentrantAlgorithm::AthReentrantAlgorithm;
71
72 virtual StatusCode initialize() override;
73 virtual StatusCode execute(const EventContext& ctx) const override;
74
75protected:
79
80
81 // Input helpers
84 this, "TracccCells", "TracccCells",
85 "Input traccc cell collection (from RDOtoTracccCellConverterAlg)"};
86
87 StatusCode serializeCells(
88 const traccc::edm::silicon_cell_collection::const_device& cells,
89 std::vector<uint8_t>& out) const;
90
91 const PixelID* m_pixelID{nullptr};
92 const SCT_ID* m_stripID{nullptr};
93
94 std::unordered_map<int64_t, int> readAndConvertClusters(
95 const EventContext& eventContext) const;
96
98 const InDet::PixelCluster& indetCluster,
99 const InDetDD::SiDetectorElement& element, xAOD::PixelCluster& xaodCluster) const;
100
101 StatusCode convertInDetToXaodCluster(
102 const InDet::SCT_Cluster& indetCluster,
103 const InDetDD::SiDetectorElement& element, xAOD::StripCluster& xaodCluster) const;
105
109
110 // output container
111 // TODO: this should return type PersistentTrackContainer
112 // The tool ActsTrackToTrackParticleCnvAlgCfg needs to be appropriately updated
114 this, "TracccTracks", "TracccTracks",
115 "Output track collection (ActsTrk variant)"};
116
117 // acts helper for the output
121
122 std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry;
124
125 const Acts::Surface* actsSurfaceFromAtlasId(const Identifier& atlasID) const;
126
127 Acts::BoundMatrix buildBoundCovariance(
128 const LocalMeasurementInfoInTracks& state) const;
129
130 std::optional<Acts::BoundTrackParameters> convertToActsParameters(
131 const LocalMeasurementInfoInTracks& state) const;
132
133 StatusCode convertTracks(
134 EventContext const& eventContext,
135 std::vector<TracccTrackParameters>& trackParams,
136 std::vector<LocalMeasurementInfoInTracks>& measInfo,
137 const std::unordered_map<int64_t, int>& cluster_map,
138 unsigned& nb_output_tracks) const;
139
141
145
146 ToolHandle<ITracccTritonTool> m_tracccTrackingTool{
147 this, "TracccTritonTool", "TracccTritonTool"};
148
150 this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
151 // @}
152
155
156 StringProperty m_featureNames{this, "FeatureNames",
157 "geometry_id,measurement_id,channel0,channel1,timestamp,value"};
158 std::vector<std::string> m_featureNamesVec;
159
160
162 Gaudi::Property<bool> m_doTruth{
163 this, "doTruth", true,
164 "Create output containers and link to truth"};
165
168 this, "PixelClustersToTruthParticlesMap",
169 "PixelClustersForTruthSeedingToTruthParticlesMap",
170 "Association map from pixel measurements to generator particles."};
171
174 this, "StripClustersToTruthParticlesMap",
175 "StripClustersForTruthSeedingToTruthParticlesMap",
176 "Association map from strip measurements to generator particles."};
177
180 this, "InputPixelClustersName", "ITkPixelClusters",
181 "name of the input InDet pixel cluster container"};
184 this, "InputStripClustersName", "ITkStripClusters",
185 "name of the input InDet strip cluster container"};
186
189 this, "xAODPixelClusterFromInDetClusterKey",
190 "xAODPixelClustersFromInDetCluster",
191 "InDet cluster->xAOD PixelClusters Container"};
194 this, "xAODStripClusterFromInDetClusterKey",
195 "xAODStripClustersFromInDetCluster",
196 "InDet cluster ->xAOD StripClusters Container"};
199 this, "xAODSpacepointFromInDetClusterKey",
200 "xAODSpacepointFromInDetCluster",
201 "InDet cluster->xAOD Spacepoint Container"};
202
204 m_pixelDetEleCollKey{this, "PixelDetEleCollKey",
205 "ITkPixelDetectorElementCollection",
206 "Key of SiDetectorElementCollection for Pixel"};
208 m_stripDetEleCollKey{this, "StripDetEleCollKey",
209 "ITkStripDetectorElementCollection",
210 "Key of SiDetectorElementCollection for Strip"};
211
212
213}; // TritonTracccTrackMaker
214
215#endif
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
An algorithm that can be simultaneously executed in multiple threads.
Class to hold geometrical description of a silicon detector element.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
TritonTracccTrackMaker is an algorithm that uses the Traccc-algorithm to reconstruct tracks from cell...
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_inputStripClusterContainerKey
const Acts::Surface * actsSurfaceFromAtlasId(const Identifier &atlasID) const
StatusCode serializeCells(const traccc::edm::silicon_cell_collection::const_device &cells, std::vector< uint8_t > &out) const
Acts::BoundMatrix buildBoundCovariance(const LocalMeasurementInfoInTracks &state) const
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
StatusCode convertInDetToXaodCluster(const InDet::PixelCluster &indetCluster, const InDetDD::SiDetectorElement &element, xAOD::PixelCluster &xaodCluster) const
ActsTrk::MutableTrackContainerHandlesHelper m_tracksBackendHandlesHelper
Trk::PdgToParticleHypothesis m_pdgToParticleHypothesis
std::unordered_map< int64_t, int > readAndConvertClusters(const EventContext &eventContext) const
StatusCode convertTracks(EventContext const &eventContext, std::vector< TracccTrackParameters > &trackParams, std::vector< LocalMeasurementInfoInTracks > &measInfo, const std::unordered_map< int64_t, int > &cluster_map, unsigned &nb_output_tracks) const
SG::WriteHandleKey< xAOD::SpacePointContainer > m_xAODSpacepointFromInDetClusterKey
SG::WriteHandleKey< ActsTrk::TrackContainer > m_ActsTracccTrackContainerKey
SG::ReadHandleKey< InDet::PixelClusterContainer > m_inputPixelClusterContainerKey
ActsTrk::ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
SG::ReadHandleKey< ActsTrk::MeasurementToTruthParticleAssociation > m_stripClustersToTruth
const ActsTrk::DetectorElementToActsGeometryIdMap * m_detEleToGeoIdMap
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_xAODPixelClusterFromInDetClusterKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
std::optional< Acts::BoundTrackParameters > convertToActsParameters(const LocalMeasurementInfoInTracks &state) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Gaudi::Property< bool > m_doTruth
Truth association for plotting and debugging.
SG::ReadHandleKey< traccc::edm::silicon_cell_collection::const_view > m_tracccCellsKey
virtual StatusCode initialize() override
std::vector< std::string > m_featureNamesVec
SG::ReadHandleKey< ActsTrk::MeasurementToTruthParticleAssociation > m_pixelClustersToTruth
SG::WriteHandleKey< xAOD::StripClusterContainer > m_xAODStripClusterFromInDetClusterKey
ToolHandle< ITracccTritonTool > m_tracccTrackingTool
small converter from the (abs) PDG code to the particle hypothsis used in Tracking
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.