ATLAS Offline Software
Loading...
Searching...
No Matches
JSONDeviceDetectorDescriptionProviderSvc.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 ACTSGPUDATAPREPARATION_JSONDEVICEDETECTORDESCRIPTIONPROVIDERSVC_H
5#define ACTSGPUDATAPREPARATION_JSONDEVICEDETECTORDESCRIPTIONPROVIDERSVC_H
6
8#include "GaudiKernel/ToolHandle.h"
11
20
21#include "traccc/geometry/detector_design_description.hpp"
22#include "traccc/geometry/detector_conditions_description.hpp"
23
24#include "detray/core/detail/container_views.hpp"
25#include "detray/core/detector.hpp"
26#include "detray/detectors/itk_metadata.hpp"
27
28
29#include "vecmem/utils/cuda/copy.hpp"
30
31#include <memory>
32#include <string>
33#include <unordered_map>
34
35namespace ActsTrk {
36
62 : public extends<AthService, ActsTrk::IDeviceDetectorDescriptionProviderSvc>
63{
64public:
65
66 using extends::extends;
67
69 virtual StatusCode initialize() override;
70
73 virtual const std::unordered_map<uint64_t, Identifier>&
74 detrayToAthenaMap() const override;
75 virtual const std::unordered_map<Identifier, uint64_t>&
76 athenaToDetrayMap() const override;
78
79private:
80
81 ServiceHandle<StoreGateSvc> m_detStore{this, "DetectorStore", "StoreGateSvc/DetectorStore"};
83 ToolHandle<AthDevice::IMemoryResourcesTool> m_MRs{
84 this, "MemoryResourcesTool", "",
85 "The memory resources tool to use for allocating memory on the device"};
86
88 ToolHandle<AthDevice::ICopyTool> m_copy{
89 this, "CopyProviderTool", "", "Vecmem copy provider tool"};
90
93 Gaudi::Property<std::string> m_geometryFile{
94 this, "GeometryFile", "",
95 "Detray geometry JSON file"};
96 Gaudi::Property<std::string> m_digitizationFile{
97 this, "DigitizationFile", "",
98 "Traccc digitization config JSON file"};
99 Gaudi::Property<std::string> m_conditionsFile{
100 this, "ConditionsFile", "",
101 "Traccc conditions config JSON file"};
102 Gaudi::Property<std::string> m_mapFile{
103 this, "MapFile", "",
104 "Path to the athena<->detray ID map CSV file"};
105
106
109 Gaudi::Property<std::string> m_deviceDesignObjectName{
110 this, "DeviceDigitizationObjectName", "",
111 "Traccc device digitization object"};
112 Gaudi::Property<std::string> m_deviceCondObjectName{
113 this, "DeviceConditionsObjectName", "",
114 "Traccc device conditions object"};
115 Gaudi::Property<std::string> m_hostDesignObjectName{
116 this, "HostDigitizationObjectName", "",
117 "Traccc host digitization object"};
118 Gaudi::Property<std::string> m_hostCondObjectName{
119 this, "HostConditionsObjectName", "",
120 "Traccc host conditions object"};
121 Gaudi::Property<std::string> m_deviceDetectorName{
122 this, "DeviceDetectorName", "",
123 "Detray device detector object"};
124 Gaudi::Property<std::string> m_hostDetectorName{
125 this, "HostDetectorName", "",
126 "Detray host detector object"};
127
128
130 StatusCode loadIdMaps();
131
132 std::unordered_map<uint64_t, Identifier> m_detrayToAthena;
133 std::unordered_map<Identifier, uint64_t> m_athenaToDetray;
134
135};
136
137} // namespace ActsTrk
138
139#endif // ACTSGPUDATAPREPARATION_JSONDEVICEDETECTORDESCRIPTIONPROVIDERSVC_H
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
Service providing device detector description from JSON files.
ToolHandle< AthDevice::ICopyTool > m_copy
The copy tool used for copying data to device.
virtual const std::unordered_map< uint64_t, Identifier > & detrayToAthenaMap() const override
virtual StatusCode initialize() override
Function initializing and executing the file loading.
virtual const std::unordered_map< Identifier, uint64_t > & athenaToDetrayMap() const override
StatusCode loadIdMaps()
Helper function to load Athena<->detray ID maps from csv.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...