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
11#include "GaudiKernel/ToolHandle.h"
12
17
20
26
27#include <array>
28#include <atomic>
29#include <memory_resource>
30#include <cstdint>
31#include <unordered_map>
32#include <vector>
33
34namespace ActsTrk {
35
53{
54public:
55 using AthReentrantAlgorithm::AthReentrantAlgorithm;
56
58 virtual StatusCode initialize() override;
60 virtual StatusCode execute(const EventContext& ctx) const override;
62 virtual StatusCode finalize() override;
63
64private:
67 std::uint64_t geometryId{0};
68 unsigned int condIndex{0};
69 bool isPixel{true};
70 unsigned int hostIndex{0};
71 std::array<float, 2u> localPosition{0.f, 0.f};
72 std::array<float, 2u> localVariance{0.f, 0.f};
73 float diameter{0.f};
74 };
75
77 StatusCode condIndexFor(const Identifier& moduleId, unsigned int& condIndex) const;
78
82 this, "InputPixelClusters", "ITkPixelClusters", "Input xAOD pixel clusters"};
84 this, "InputStripClusters", "ITkStripClusters", "Input xAOD strip clusters"};
85
86
90 this, "OutputTracccMeasurements", "TracccMeasurementCollection",
91 "Output traccc measurement collection buffer"};
92
93
97 this, "OutputMeasToPixelCluster", "TracccMeasToPixelCluster",
98 "Output mapping from traccc measurement index to the index of the xAOD pixel cluster in its owning container"};
100 this, "OutputMeasToStripCluster", "TracccMeasToStripCluster",
101 "Output mapping from traccc measurement index to the index of the xAOD strip cluster in its owning container"};
102
103
106 ToolHandle<AthDevice::IMemoryResourcesTool> m_MRs{
107 this, "MemoryResourcesTool", "",
108 "The memory resources tool to use for allocating memory on the host and the device"};
109 ToolHandle<AthDevice::ICopiesTool> m_copiesTool{
110 this, "CopiesTool", "", "Tool that provides host and device copy objects"};
111
112
115 Gaudi::Property<std::string> m_geoIdMappingObjectName{
116 this, "GeoIdMappingObjectName", "TracccGeometryIdMapping",
117 "StoreGate name for the detray/acts/athena geo id mapping"};
119 this, "HostConditionsObjectName", "TracccHostCondConfig",
120 "Traccc host conditions object"};
121 Gaudi::Property<std::string> m_hostDesignObjectName{
122 this, "HostDigitizationObjectName", "TracccHostDigitizationConfig",
123 "Traccc host digitization object"};
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
133 mutable std::atomic<unsigned long> m_nPixel = 0;
134 mutable std::atomic<unsigned long> m_nStrip = 0;
136};
137
138} // namespace ActsTrk
139
140#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).
SG::ReadCondHandleKey< traccc::detector_conditions_description::host > m_hostCondKey
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
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
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.