ATLAS Offline Software
Loading...
Searching...
No Matches
TracccTrackConverterAlg.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 ACTSGPUEVENT_TRACCCTRACKCONVERTERALG_H
5#define ACTSGPUEVENT_TRACCCTRACKCONVERTERALG_H
6
10
14
18
21
25
26#include "GaudiKernel/ToolHandle.h"
27
29
30namespace ActsTrk {
31
46{
47public:
48 using AthReentrantAlgorithm::AthReentrantAlgorithm;
49
51 virtual StatusCode initialize() override;
53 virtual StatusCode execute(const EventContext& ctx) const override;
55 virtual StatusCode finalize() override;
56
57private:
58
59 // helper functions
61 const unsigned int& meas_index,
62 std::span<const unsigned int> pixelMap,
63 std::span<const unsigned int> stripMap,
64 const xAOD::PixelClusterContainer& pixel_clusters,
65 const xAOD::StripClusterContainer& strip_clusters) const;
66
67 const Acts::Surface& findActsSurface(const Acts::GeometryIdentifier& actsID) const;
68
69 std::optional<Acts::BoundTrackParameters> convertGlobalToActsParameters(
70 traccc::bound_track_parameters<traccc::default_algebra> const& trkParams) const;
71
72 template <typename state_t>
73 std::optional<Acts::BoundTrackParameters> convertSmoothedToActsParameters(traccc::edm::track_state<state_t> const& state) const;
74
78 this, "InputPixelClusters", "",
79 "Input xAOD pixel clusters converted from Traccc"};
81 this, "InputStripClusters", "",
82 "Input xAOD strip clusters converted from Traccc"};
84 this, "InputMeasToPixelSP", "",
85 "Input mapping from traccc measurement index to pixel spacepoint index"};
87 this, "InputMeasToStripCl", "",
88 "Input mapping from traccc measurement index to strip cluster index"};
90 this, "InputTracks", "",
91 "Input traccc track collection buffer"};
92
93
97 this, "OutputTracks", "",
98 "Output ACTS track container"};
99
100
102 ToolHandle<AthDevice::IMemoryResourceTool> m_hostMR{
103 this, "HostMR", "", "Host memory resource tool"};
104
105 ToolHandle<AthDevice::ICopyTool> m_copy{
106 this, "CopyProviderTool", "", "Vecmem copy provider tool"};
107
108 std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry;
109 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
110 std::map<Acts::GeometryIdentifier, const Acts::Surface*> m_actsSurfaceMap;
111 // acts helper for the output
114
115 Gaudi::Property<std::string> m_geoIdMappingObjectName{this, "GeoIdMapping", "", "ID mapping between the three detector description realms."};
117 Gaudi::Property<std::string> m_hostDetectorObjectName{
118 this, "HostDetectorName", "",
119 "Detray host detector object"};
120 const traccc::host_detector* m_hostDetector = nullptr;
123 mutable std::atomic<int> m_nTracksIn = 0;
124 mutable std::atomic<int> m_nTracksOut = 0;
125 mutable std::atomic<int> m_nExcludedFitOutcome = 0;
126 mutable std::atomic<int> m_nExcludedNoState = 0;
127 mutable std::atomic<int> m_nExcludedBadNdf = 0;
128 mutable std::atomic<int> m_nExcludedWeirdState = 0;
129 mutable std::atomic<int> m_nExcludedWeirdGlobal = 0;
131
132};
133
134} // namespace ActsTrk
135
136#endif // ACTSGPUEVENT_TRACCCTRACKCONVERTERALG_H
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.
@ kInvalidGlobalParams
Lookup table between the three surface-identifier "worlds" used across the ACTS / Detray / Athena tra...
Algorithm converting traccc tracks ( tracks + track states sdevice buffer) to ACTS tracks (host conta...
Gaudi::Property< std::string > m_hostDetectorObjectName
virtual StatusCode initialize() override
Function initializing the algorithm.
std::optional< Acts::BoundTrackParameters > convertGlobalToActsParameters(traccc::bound_track_parameters< traccc::default_algebra > const &trkParams) const
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
std::map< Acts::GeometryIdentifier, const Acts::Surface * > m_actsSurfaceMap
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Gaudi::Property< std::string > m_geoIdMappingObjectName
virtual StatusCode finalize() override
Function finalizing the algorthm.
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClustersKey
const xAOD::UncalibratedMeasurement & makeSourceLink(const unsigned int &meas_index, std::span< const unsigned int > pixelMap, std::span< const unsigned int > stripMap, const xAOD::PixelClusterContainer &pixel_clusters, const xAOD::StripClusterContainer &strip_clusters) const
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
const Acts::Surface & findActsSurface(const Acts::GeometryIdentifier &actsID) const
ToolHandle< AthDevice::ICopyTool > m_copy
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClustersKey
SG::ReadHandleKey< std::vector< unsigned int > > m_inputMeasToStripClKey
std::atomic< int > m_nTracksIn
The object counters for debug prints in finalize method {.
ActsTrk::MutableTrackContainerHandlesHelper m_tracksBackendHandlesHelper
SG::ReadHandleKey< traccc_track_container::buffer > m_inputTracksKey
SG::WriteHandleKey< ActsTrk::TrackContainer > m_outputTracksKey
const traccc::host_detector * m_hostDetector
const ActsTrk::GeometryIdMapping * m_idMapping
ToolHandle< AthDevice::IMemoryResourceTool > m_hostMR
SG::ReadHandleKey< std::vector< unsigned int > > m_inputMeasToPixelSPKey
std::optional< Acts::BoundTrackParameters > convertSmoothedToActsParameters(traccc::edm::track_state< state_t > const &state) const
An algorithm that can be simultaneously executed in multiple threads.
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.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.