ATLAS Offline Software
Loading...
Searching...
No Matches
xAODToTracccMeasurementConverterAlg.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 ACTSGPUEVENTCNV_XAODTOTRACCCMEASUREMENTCONVERTERALG_H
5#define ACTSGPUEVENTCNV_XAODTOTRACCCMEASUREMENTCONVERTERALG_H
6
10#include "GaudiKernel/ToolHandle.h"
11
16
19
25
26#include <array>
27#include <atomic>
28#include <memory_resource>
29#include <cstdint>
30#include <unordered_map>
31#include <vector>
32
33namespace ActsTrk {
34
52{
53public:
54 using AthReentrantAlgorithm::AthReentrantAlgorithm;
55
57 virtual StatusCode initialize() override;
59 virtual StatusCode execute(const EventContext& ctx) const override;
61 virtual StatusCode finalize() override;
62
63private:
66 std::uint64_t geometryId{0};
67 unsigned int condIndex{0};
68 bool isPixel{true};
69 unsigned int hostIndex{0};
70 std::array<float, 2u> localPosition{0.f, 0.f};
71 std::array<float, 2u> localVariance{0.f, 0.f};
72 float diameter{0.f};
73 };
74
76 StatusCode condIndexFor(const Identifier& moduleId, unsigned int& condIndex) const;
77
81 this, "InputPixelClusters", "ITkPixelClusters", "Input xAOD pixel clusters"};
83 this, "InputStripClusters", "ITkStripClusters", "Input xAOD strip clusters"};
84
85
89 this, "OutputTracccMeasurements", "TracccMeasurementCollection",
90 "Output traccc measurement collection buffer"};
91
92
96 this, "OutputMeasToPixelCluster", "TracccMeasToPixelCluster",
97 "Output mapping from traccc measurement index to xAOD pixel cluster index"};
99 this, "OutputMeasToStripCluster", "TracccMeasToStripCluster",
100 "Output mapping from traccc measurement index to xAOD strip cluster index"};
101
102
105 ToolHandle<AthDevice::IMemoryResourcesTool> m_MRs{
106 this, "MemoryResourcesTool", "",
107 "The memory resources tool to use for allocating memory on the host and the device"};
108 ToolHandle<AthDevice::ICopiesTool> m_copiesTool{
109 this, "CopiesTool", "", "Tool that provides host and device copy objects"};
110
111
114 Gaudi::Property<std::string> m_geoIdMappingObjectName{
115 this, "GeoIdMappingObjectName", "TracccGeometryIdMapping",
116 "StoreGate name for the detray/acts/athena geo id mapping"};
117 Gaudi::Property<std::string> m_hostCondObjectName{
118 this, "HostConditionsObjectName", "TracccHostCondConfig",
119 "Traccc host conditions object"};
120 Gaudi::Property<std::string> m_hostDesignObjectName{
121 this, "HostDigitizationObjectName", "TracccHostDigitizationConfig",
122 "Traccc host digitization object"};
124 const traccc::detector_conditions_description::host* m_hostCond{nullptr};
125 const traccc::detector_design_description::host* m_hostDesign{nullptr};
127
128 const PixelID* m_pixelID{nullptr};
129 const SCT_ID* m_stripID{nullptr};
130
131 std::unordered_map<std::uint64_t, unsigned int> m_detrayIdToCondIndex{};
132
135 mutable std::atomic<unsigned long> m_nPixel = 0;
136 mutable std::atomic<unsigned long> m_nStrip = 0;
138};
139
140} // namespace ActsTrk
141
142#endif // ACTSGPUEVENTCNV_XAODTOTRACCCMEASUREMENTCONVERTERALG_H
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.
Lookup table between the three surface-identifier "worlds" used across the ACTS / Detray / Athena tra...
Algorithm converting xAOD clusters (host container) to traccc measurements (device buffer).
StatusCode condIndexFor(const Identifier &moduleId, unsigned int &condIndex) const
Look up the traccc conditions index for an Athena module identifier.
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
virtual StatusCode finalize() override
Function finalizing the algorithm.
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClustersKey
virtual StatusCode initialize() override
Function initializing the algorithm.
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToPixelKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClustersKey
std::unordered_map< std::uint64_t, unsigned int > m_detrayIdToCondIndex
SG::WriteHandleKey< traccc::edm::measurement_collection::buffer > m_outputMeasKey
const traccc::detector_design_description::host * m_hostDesign
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToStripKey
const traccc::detector_conditions_description::host * m_hostCond
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
std::atomic< unsigned long > m_nPixel
The object counters for debug prints in finalize method {.
An algorithm that can be simultaneously executed in multiple threads.
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.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Host side description of a measurement before it is written to the traccc collection.