ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsGPUEventCnv
src
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
7
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
8
#include "
StoreGate/ReadHandleKey.h
"
9
#include "
StoreGate/WriteHandleKey.h
"
10
#include "GaudiKernel/ToolHandle.h"
11
12
#include "
ActsGPUEvent/TracccMeasurementCollection.h
"
13
#include "
ActsGPUEvent/TracccDetectorConditionsDescription.h
"
14
#include "
ActsGPUEvent/TracccDetectorDesignDescription.h
"
15
#include "
ActsGPUEvent/GeometryIdMapping.h
"
16
17
#include "
AthDeviceInterfaces/IMemoryResourcesTool.h
"
18
#include "
AthDeviceInterfaces/ICopiesTool.h
"
19
20
#include "
xAODInDetMeasurement/PixelClusterContainer.h
"
21
#include "
xAODInDetMeasurement/StripClusterContainer.h
"
22
#include "
InDetIdentifier/PixelID.h
"
23
#include "
InDetIdentifier/SCT_ID.h
"
24
#include "
SGTools/StlVectorClids.h
"
25
26
#include <array>
27
#include <atomic>
28
#include <memory_resource>
29
#include <cstdint>
30
#include <unordered_map>
31
#include <vector>
32
33
namespace
ActsTrk
{
34
51
class
xAODToTracccMeasurementConverterAlg
:
public
AthReentrantAlgorithm
52
{
53
public
:
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
63
private
:
65
struct
MeasurementRecord
{
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
80
SG::ReadHandleKey<xAOD::PixelClusterContainer>
m_inputPixelClustersKey
{
81
this
,
"InputPixelClusters"
,
"ITkPixelClusters"
,
"Input xAOD pixel clusters"
};
82
SG::ReadHandleKey<xAOD::StripClusterContainer>
m_inputStripClustersKey
{
83
this
,
"InputStripClusters"
,
"ITkStripClusters"
,
"Input xAOD strip clusters"
};
84
85
88
SG::WriteHandleKey<traccc::edm::measurement_collection::buffer>
m_outputMeasKey
{
89
this
,
"OutputTracccMeasurements"
,
"TracccMeasurementCollection"
,
90
"Output traccc measurement collection buffer"
};
91
92
95
SG::WriteHandleKey<std::vector<unsigned int>
>
m_outputMeasToPixelKey
{
96
this
,
"OutputMeasToPixelCluster"
,
"TracccMeasToPixelCluster"
,
97
"Output mapping from traccc measurement index to xAOD pixel cluster index"
};
98
SG::WriteHandleKey<std::vector<unsigned int>
>
m_outputMeasToStripKey
{
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"
};
123
const
ActsTrk::GeometryIdMapping
*
m_geoIdMapping
{
nullptr
};
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
AthReentrantAlgorithm.h
PixelClusterContainer.h
GeometryIdMapping.h
ICopiesTool.h
IMemoryResourcesTool.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
SCT_ID.h
This is an Identifier helper class for the SCT subdetector.
StlVectorClids.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
StripClusterContainer.h
TracccDetectorConditionsDescription.h
TracccDetectorDesignDescription.h
TracccMeasurementCollection.h
ActsTrk::GeometryIdMapping
Lookup table between the three surface-identifier "worlds" used across the ACTS / Detray / Athena tra...
Definition
GeometryIdMapping.h:32
ActsTrk::xAODToTracccMeasurementConverterAlg
Algorithm converting xAOD clusters (host container) to traccc measurements (device buffer).
Definition
xAODToTracccMeasurementConverterAlg.h:52
ActsTrk::xAODToTracccMeasurementConverterAlg::m_copiesTool
ToolHandle< AthDevice::ICopiesTool > m_copiesTool
Definition
xAODToTracccMeasurementConverterAlg.h:108
ActsTrk::xAODToTracccMeasurementConverterAlg::condIndexFor
StatusCode condIndexFor(const Identifier &moduleId, unsigned int &condIndex) const
Look up the traccc conditions index for an Athena module identifier.
Definition
xAODToTracccMeasurementConverterAlg.cxx:53
ActsTrk::xAODToTracccMeasurementConverterAlg::m_nStrip
std::atomic< unsigned long > m_nStrip
Definition
xAODToTracccMeasurementConverterAlg.h:136
ActsTrk::xAODToTracccMeasurementConverterAlg::m_MRs
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
Definition
xAODToTracccMeasurementConverterAlg.h:105
ActsTrk::xAODToTracccMeasurementConverterAlg::finalize
virtual StatusCode finalize() override
Function finalizing the algorithm.
Definition
xAODToTracccMeasurementConverterAlg.cxx:209
ActsTrk::xAODToTracccMeasurementConverterAlg::m_inputStripClustersKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClustersKey
Definition
xAODToTracccMeasurementConverterAlg.h:82
ActsTrk::xAODToTracccMeasurementConverterAlg::m_pixelID
const PixelID * m_pixelID
Definition
xAODToTracccMeasurementConverterAlg.h:128
ActsTrk::xAODToTracccMeasurementConverterAlg::initialize
virtual StatusCode initialize() override
Function initializing the algorithm.
Definition
xAODToTracccMeasurementConverterAlg.cxx:19
ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasToPixelKey
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToPixelKey
Definition
xAODToTracccMeasurementConverterAlg.h:95
ActsTrk::xAODToTracccMeasurementConverterAlg::m_inputPixelClustersKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClustersKey
Definition
xAODToTracccMeasurementConverterAlg.h:80
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostDesignObjectName
Gaudi::Property< std::string > m_hostDesignObjectName
Definition
xAODToTracccMeasurementConverterAlg.h:120
ActsTrk::xAODToTracccMeasurementConverterAlg::m_detrayIdToCondIndex
std::unordered_map< std::uint64_t, unsigned int > m_detrayIdToCondIndex
Definition
xAODToTracccMeasurementConverterAlg.h:131
ActsTrk::xAODToTracccMeasurementConverterAlg::m_geoIdMapping
const ActsTrk::GeometryIdMapping * m_geoIdMapping
Definition
xAODToTracccMeasurementConverterAlg.h:123
ActsTrk::xAODToTracccMeasurementConverterAlg::m_geoIdMappingObjectName
Gaudi::Property< std::string > m_geoIdMappingObjectName
Definition
xAODToTracccMeasurementConverterAlg.h:114
ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasKey
SG::WriteHandleKey< traccc::edm::measurement_collection::buffer > m_outputMeasKey
Definition
xAODToTracccMeasurementConverterAlg.h:88
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostDesign
const traccc::detector_design_description::host * m_hostDesign
Definition
xAODToTracccMeasurementConverterAlg.h:125
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostCondObjectName
Gaudi::Property< std::string > m_hostCondObjectName
Definition
xAODToTracccMeasurementConverterAlg.h:117
ActsTrk::xAODToTracccMeasurementConverterAlg::m_stripID
const SCT_ID * m_stripID
Definition
xAODToTracccMeasurementConverterAlg.h:129
ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasToStripKey
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToStripKey
Definition
xAODToTracccMeasurementConverterAlg.h:98
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostCond
const traccc::detector_conditions_description::host * m_hostCond
Definition
xAODToTracccMeasurementConverterAlg.h:124
ActsTrk::xAODToTracccMeasurementConverterAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition
xAODToTracccMeasurementConverterAlg.cxx:70
ActsTrk::xAODToTracccMeasurementConverterAlg::m_nPixel
std::atomic< unsigned long > m_nPixel
The object counters for debug prints in finalize method {.
Definition
xAODToTracccMeasurementConverterAlg.h:135
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
Identifier
Definition
IdentifierFieldParser.cxx:14
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord
Host side description of a measurement before it is written to the traccc collection.
Definition
xAODToTracccMeasurementConverterAlg.h:65
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::geometryId
std::uint64_t geometryId
Definition
xAODToTracccMeasurementConverterAlg.h:66
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::condIndex
unsigned int condIndex
Definition
xAODToTracccMeasurementConverterAlg.h:67
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::hostIndex
unsigned int hostIndex
Definition
xAODToTracccMeasurementConverterAlg.h:69
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::localPosition
std::array< float, 2u > localPosition
Definition
xAODToTracccMeasurementConverterAlg.h:70
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::diameter
float diameter
Definition
xAODToTracccMeasurementConverterAlg.h:72
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::isPixel
bool isPixel
Definition
xAODToTracccMeasurementConverterAlg.h:68
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::localVariance
std::array< float, 2u > localVariance
Definition
xAODToTracccMeasurementConverterAlg.h:71
Generated on
for ATLAS Offline Software by
1.17.0