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/ReadCondHandleKey.h
"
10
#include "
StoreGate/WriteHandleKey.h
"
11
#include "GaudiKernel/ToolHandle.h"
12
13
#include "
ActsGPUEvent/TracccMeasurementCollection.h
"
14
#include "
ActsGPUEvent/TracccDetectorConditionsDescription.h
"
15
#include "
ActsGPUEvent/TracccDetectorDesignDescription.h
"
16
#include "
ActsGPUEvent/GeometryIdMapping.h
"
17
18
#include "
AthDeviceInterfaces/IMemoryResourcesTool.h
"
19
#include "
AthDeviceInterfaces/ICopiesTool.h
"
20
21
#include "
xAODInDetMeasurement/PixelClusterContainer.h
"
22
#include "
xAODInDetMeasurement/StripClusterContainer.h
"
23
#include "
InDetIdentifier/PixelID.h
"
24
#include "
InDetIdentifier/SCT_ID.h
"
25
#include "
SGTools/StlVectorClids.h
"
26
27
#include <array>
28
#include <atomic>
29
#include <memory_resource>
30
#include <cstdint>
31
#include <unordered_map>
32
#include <vector>
33
34
namespace
ActsTrk
{
35
52
class
xAODToTracccMeasurementConverterAlg
:
public
AthReentrantAlgorithm
53
{
54
public
:
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
64
private
:
66
struct
MeasurementRecord
{
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
81
SG::ReadHandleKey<xAOD::PixelClusterContainer>
m_inputPixelClustersKey
{
82
this
,
"InputPixelClusters"
,
"ITkPixelClusters"
,
"Input xAOD pixel clusters"
};
83
SG::ReadHandleKey<xAOD::StripClusterContainer>
m_inputStripClustersKey
{
84
this
,
"InputStripClusters"
,
"ITkStripClusters"
,
"Input xAOD strip clusters"
};
85
86
89
SG::WriteHandleKey<traccc::edm::measurement_collection::buffer>
m_outputMeasKey
{
90
this
,
"OutputTracccMeasurements"
,
"TracccMeasurementCollection"
,
91
"Output traccc measurement collection buffer"
};
92
93
96
SG::WriteHandleKey<std::vector<unsigned int>
>
m_outputMeasToPixelKey
{
97
this
,
"OutputMeasToPixelCluster"
,
"TracccMeasToPixelCluster"
,
98
"Output mapping from traccc measurement index to the index of the xAOD pixel cluster in its owning container"
};
99
SG::WriteHandleKey<std::vector<unsigned int>
>
m_outputMeasToStripKey
{
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"
};
118
SG::ReadCondHandleKey<traccc::detector_conditions_description::host>
m_hostCondKey
{
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"
};
124
const
ActsTrk::GeometryIdMapping
*
m_geoIdMapping
{
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
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
AthReentrantAlgorithm.h
PixelClusterContainer.h
GeometryIdMapping.h
ICopiesTool.h
IMemoryResourcesTool.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
ReadCondHandleKey.h
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:31
ActsTrk::xAODToTracccMeasurementConverterAlg
Algorithm converting xAOD clusters (host container) to traccc measurements (device buffer).
Definition
xAODToTracccMeasurementConverterAlg.h:53
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostCondKey
SG::ReadCondHandleKey< traccc::detector_conditions_description::host > m_hostCondKey
Definition
xAODToTracccMeasurementConverterAlg.h:118
ActsTrk::xAODToTracccMeasurementConverterAlg::m_copiesTool
ToolHandle< AthDevice::ICopiesTool > m_copiesTool
Definition
xAODToTracccMeasurementConverterAlg.h:109
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:44
ActsTrk::xAODToTracccMeasurementConverterAlg::m_nStrip
std::atomic< unsigned long > m_nStrip
Definition
xAODToTracccMeasurementConverterAlg.h:134
ActsTrk::xAODToTracccMeasurementConverterAlg::m_MRs
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
Definition
xAODToTracccMeasurementConverterAlg.h:106
ActsTrk::xAODToTracccMeasurementConverterAlg::finalize
virtual StatusCode finalize() override
Function finalizing the algorithm.
Definition
xAODToTracccMeasurementConverterAlg.cxx:204
ActsTrk::xAODToTracccMeasurementConverterAlg::m_inputStripClustersKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClustersKey
Definition
xAODToTracccMeasurementConverterAlg.h:83
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:20
ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasToPixelKey
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToPixelKey
Definition
xAODToTracccMeasurementConverterAlg.h:96
ActsTrk::xAODToTracccMeasurementConverterAlg::m_inputPixelClustersKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClustersKey
Definition
xAODToTracccMeasurementConverterAlg.h:81
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostDesignObjectName
Gaudi::Property< std::string > m_hostDesignObjectName
Definition
xAODToTracccMeasurementConverterAlg.h:121
ActsTrk::xAODToTracccMeasurementConverterAlg::m_geoIdMapping
const ActsTrk::GeometryIdMapping * m_geoIdMapping
Definition
xAODToTracccMeasurementConverterAlg.h:124
ActsTrk::xAODToTracccMeasurementConverterAlg::m_geoIdMappingObjectName
Gaudi::Property< std::string > m_geoIdMappingObjectName
Definition
xAODToTracccMeasurementConverterAlg.h:115
ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasKey
SG::WriteHandleKey< traccc::edm::measurement_collection::buffer > m_outputMeasKey
Definition
xAODToTracccMeasurementConverterAlg.h:89
ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostDesign
const traccc::detector_design_description::host * m_hostDesign
Definition
xAODToTracccMeasurementConverterAlg.h:125
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:99
ActsTrk::xAODToTracccMeasurementConverterAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition
xAODToTracccMeasurementConverterAlg.cxx:61
ActsTrk::xAODToTracccMeasurementConverterAlg::m_nPixel
std::atomic< unsigned long > m_nPixel
The object counters for debug prints in finalize method {.
Definition
xAODToTracccMeasurementConverterAlg.h:133
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::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
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:66
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::geometryId
std::uint64_t geometryId
Definition
xAODToTracccMeasurementConverterAlg.h:67
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::condIndex
unsigned int condIndex
Definition
xAODToTracccMeasurementConverterAlg.h:68
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::hostIndex
unsigned int hostIndex
Definition
xAODToTracccMeasurementConverterAlg.h:70
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::localPosition
std::array< float, 2u > localPosition
Definition
xAODToTracccMeasurementConverterAlg.h:71
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::diameter
float diameter
Definition
xAODToTracccMeasurementConverterAlg.h:73
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::isPixel
bool isPixel
Definition
xAODToTracccMeasurementConverterAlg.h:69
ActsTrk::xAODToTracccMeasurementConverterAlg::MeasurementRecord::localVariance
std::array< float, 2u > localVariance
Definition
xAODToTracccMeasurementConverterAlg.h:72
Generated on
for ATLAS Offline Software by
1.17.0