ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsGPUEventCnv
src
RDOtoTracccCellConverterCommons.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_RDOTOTRACCCCELLCONVERTERCOMMONS_H
5
#define ACTSGPUEVENT_RDOTOTRACCCCELLCONVERTERCOMMONS_H
6
7
#include "
AthenaBaseComps/AthMessaging.h
"
8
#include "
StoreGate/WriteHandleKey.h
"
9
#include "
StoreGate/ReadHandleKey.h
"
10
#include "
ActsGPUEvent/TracccSiliconCellCollection.h
"
11
#include "
ActsGPUEvent/TracccDetectorConditionsDescription.h
"
12
#include "
AthDeviceInterfaces/IMemoryResourceTool.h
"
13
#include "
AthDeviceInterfaces/ICopiesTool.h
"
14
#include "
InDetIdentifier/PixelID.h
"
15
#include "
InDetIdentifier/SCT_ID.h
"
16
#include "Identifier/Identifier.h"
17
#include "GaudiKernel/ToolHandle.h"
18
#include "
ActsGPUEvent/GeometryIdMapping.h
"
19
20
#include <traccc/io/csv/cell.hpp>
21
22
#include <unordered_map>
23
#include <cstdint>
24
#include <bitset>
25
26
class
AthReentrantAlgorithm
;
27
28
namespace
ActsTrk
{
29
36
37
struct
RDOtoTracccCellConverterCommons
:
public
AthMessaging
38
{
39
RDOtoTracccCellConverterCommons
(
AthReentrantAlgorithm
& parent);
40
41
StatusCode
initialize
();
42
StatusCode
finalize
();
43
44
AthReentrantAlgorithm
&
m_parent
;
45
46
SG::WriteHandleKey<traccc::edm::silicon_cell_collection::buffer>
m_tracccCellsKey
;
47
48
mutable
std::atomic<int>
m_nPix
= 0;
49
mutable
std::atomic<int>
m_nStrip
= 0;
50
mutable
std::atomic<int>
m_nCells
= 0;
51
52
const
PixelID
*
m_pixelID
{
nullptr
};
53
const
SCT_ID
*
m_stripID
{
nullptr
};
54
55
ToolHandle<AthDevice::IMemoryResourceTool>
m_hostMR
;
56
ToolHandle<AthDevice::IMemoryResourceTool>
m_deviceMR
;
57
ToolHandle<AthDevice::ICopiesTool>
m_copiesTool
;
58
59
Gaudi::Property<std::string>
m_geoIdMappingObjectName
;
60
const
ActsTrk::GeometryIdMapping
*
m_geoIdMapping
{
nullptr
};
61
Gaudi::Property<std::string>
m_hostCondObjectName
;
62
const
traccc::detector_conditions_description::host*
m_hostCond
{
nullptr
};
63
64
// Geometry conversion maps
65
const
std::unordered_map<Identifier, uint64_t>*
m_athenaToDetray
{
nullptr
};
66
std::unordered_map<uint64_t, unsigned int>
m_DetrayIdToDetDescrIndexMap
{};
67
68
Gaudi::Property<bool>
m_CPUCellSorting
;
69
Gaudi::Property<bool>
m_UsePixelToTForCellActivation
;
70
71
// Returns the input cells sorted in a object setup with host_copy
72
traccc::edm::silicon_cell_collection::buffer
sortCells
(
73
vecmem::copy
const
& host_copy
74
, traccc::edm::silicon_cell_collection::device
const
& cells
75
)
const
;
76
StatusCode
copyToGpuAndRecordToSG
(
77
EventContext
const
& ctx
78
, traccc::edm::silicon_cell_collection::buffer
const
& cells
79
)
const
;
80
81
StringProperty
m_stripRDOTimeBinStr
;
82
int
m_stripRDOTimeBinBits
[3]{-1, -1, -1};
83
// decode the property string into bits
84
StatusCode
decodeTimeBins
();
85
// check if the time pattern matches the requirements of strip RDO "timeBins"
86
bool
passTiming
(
const
std::bitset<3>& timePattern)
const
;
87
StatusCode
buildDetrayMaps
()
const
;
88
};
89
90
void
sort_traccc_soa
(
91
traccc::edm::silicon_cell_collection::device & sorted_cells
92
, traccc::edm::silicon_cell_collection::device
const
& cells
93
);
94
95
}
// namespace ActsTrk
96
97
#endif
AthMessaging.h
GeometryIdMapping.h
ICopiesTool.h
IMemoryResourceTool.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.
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.
TracccDetectorConditionsDescription.h
TracccSiliconCellCollection.h
ActsTrk::GeometryIdMapping
Lookup table between the three surface-identifier "worlds" used across the ACTS / Detray / Athena tra...
Definition
GeometryIdMapping.h:32
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
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::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
ActsTrk::sort_traccc_soa
void sort_traccc_soa(traccc::edm::silicon_cell_collection::device &sorted_cells, traccc::edm::silicon_cell_collection::device const &cells)
Definition
RDOtoTracccCellConverterCommons.cxx:119
ActsTrk::RDOtoTracccCellConverterCommons::m_stripRDOTimeBinStr
StringProperty m_stripRDOTimeBinStr
Definition
RDOtoTracccCellConverterCommons.h:81
ActsTrk::RDOtoTracccCellConverterCommons::m_DetrayIdToDetDescrIndexMap
std::unordered_map< uint64_t, unsigned int > m_DetrayIdToDetDescrIndexMap
Definition
RDOtoTracccCellConverterCommons.h:66
ActsTrk::RDOtoTracccCellConverterCommons::m_deviceMR
ToolHandle< AthDevice::IMemoryResourceTool > m_deviceMR
Definition
RDOtoTracccCellConverterCommons.h:56
ActsTrk::RDOtoTracccCellConverterCommons::m_geoIdMapping
const ActsTrk::GeometryIdMapping * m_geoIdMapping
Definition
RDOtoTracccCellConverterCommons.h:60
ActsTrk::RDOtoTracccCellConverterCommons::m_CPUCellSorting
Gaudi::Property< bool > m_CPUCellSorting
Definition
RDOtoTracccCellConverterCommons.h:68
ActsTrk::RDOtoTracccCellConverterCommons::m_hostCondObjectName
Gaudi::Property< std::string > m_hostCondObjectName
Definition
RDOtoTracccCellConverterCommons.h:61
ActsTrk::RDOtoTracccCellConverterCommons::m_pixelID
const PixelID * m_pixelID
Definition
RDOtoTracccCellConverterCommons.h:52
ActsTrk::RDOtoTracccCellConverterCommons::RDOtoTracccCellConverterCommons
RDOtoTracccCellConverterCommons(AthReentrantAlgorithm &parent)
Definition
RDOtoTracccCellConverterCommons.cxx:18
ActsTrk::RDOtoTracccCellConverterCommons::m_stripID
const SCT_ID * m_stripID
Definition
RDOtoTracccCellConverterCommons.h:53
ActsTrk::RDOtoTracccCellConverterCommons::m_stripRDOTimeBinBits
int m_stripRDOTimeBinBits[3]
Definition
RDOtoTracccCellConverterCommons.h:82
ActsTrk::RDOtoTracccCellConverterCommons::m_athenaToDetray
const std::unordered_map< Identifier, uint64_t > * m_athenaToDetray
Definition
RDOtoTracccCellConverterCommons.h:65
ActsTrk::RDOtoTracccCellConverterCommons::m_tracccCellsKey
SG::WriteHandleKey< traccc::edm::silicon_cell_collection::buffer > m_tracccCellsKey
Definition
RDOtoTracccCellConverterCommons.h:46
ActsTrk::RDOtoTracccCellConverterCommons::m_nPix
std::atomic< int > m_nPix
Definition
RDOtoTracccCellConverterCommons.h:48
ActsTrk::RDOtoTracccCellConverterCommons::decodeTimeBins
StatusCode decodeTimeBins()
Definition
RDOtoTracccCellConverterCommons.cxx:142
ActsTrk::RDOtoTracccCellConverterCommons::m_nCells
std::atomic< int > m_nCells
Definition
RDOtoTracccCellConverterCommons.h:50
ActsTrk::RDOtoTracccCellConverterCommons::m_parent
AthReentrantAlgorithm & m_parent
Definition
RDOtoTracccCellConverterCommons.h:44
ActsTrk::RDOtoTracccCellConverterCommons::m_UsePixelToTForCellActivation
Gaudi::Property< bool > m_UsePixelToTForCellActivation
Definition
RDOtoTracccCellConverterCommons.h:69
ActsTrk::RDOtoTracccCellConverterCommons::finalize
StatusCode finalize()
Definition
RDOtoTracccCellConverterCommons.cxx:77
ActsTrk::RDOtoTracccCellConverterCommons::sortCells
traccc::edm::silicon_cell_collection::buffer sortCells(vecmem::copy const &host_copy, traccc::edm::silicon_cell_collection::device const &cells) const
Definition
RDOtoTracccCellConverterCommons.cxx:88
ActsTrk::RDOtoTracccCellConverterCommons::buildDetrayMaps
StatusCode buildDetrayMaps() const
Definition
RDOtoTracccCellConverterCommons.cxx:58
ActsTrk::RDOtoTracccCellConverterCommons::passTiming
bool passTiming(const std::bitset< 3 > &timePattern) const
Definition
RDOtoTracccCellConverterCommons.cxx:162
ActsTrk::RDOtoTracccCellConverterCommons::m_nStrip
std::atomic< int > m_nStrip
Definition
RDOtoTracccCellConverterCommons.h:49
ActsTrk::RDOtoTracccCellConverterCommons::m_copiesTool
ToolHandle< AthDevice::ICopiesTool > m_copiesTool
Definition
RDOtoTracccCellConverterCommons.h:57
ActsTrk::RDOtoTracccCellConverterCommons::m_hostMR
ToolHandle< AthDevice::IMemoryResourceTool > m_hostMR
Definition
RDOtoTracccCellConverterCommons.h:55
ActsTrk::RDOtoTracccCellConverterCommons::m_hostCond
const traccc::detector_conditions_description::host * m_hostCond
Definition
RDOtoTracccCellConverterCommons.h:62
ActsTrk::RDOtoTracccCellConverterCommons::copyToGpuAndRecordToSG
StatusCode copyToGpuAndRecordToSG(EventContext const &ctx, traccc::edm::silicon_cell_collection::buffer const &cells) const
Definition
RDOtoTracccCellConverterCommons.cxx:101
ActsTrk::RDOtoTracccCellConverterCommons::initialize
StatusCode initialize()
Definition
RDOtoTracccCellConverterCommons.cxx:38
ActsTrk::RDOtoTracccCellConverterCommons::m_geoIdMappingObjectName
Gaudi::Property< std::string > m_geoIdMappingObjectName
Definition
RDOtoTracccCellConverterCommons.h:59
Generated on
for ATLAS Offline Software by
1.17.0