ATLAS Offline Software
Loading...
Searching...
No Matches
DeviceDetectorDescriptionSvc.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 ACTSGPUGEOMETRY_DEVICEDETECTORDESCRIPTIONSVC_H
5#define ACTSGPUGEOMETRY_DEVICEDETECTORDESCRIPTIONSVC_H
6
8#include "GaudiKernel/ToolHandle.h"
10
13
30
31#include "Acts/Surfaces/Surface.hpp"
32#include "Acts/Geometry/TrackingGeometry.hpp"
33#include "Acts/Geometry/GeometryIdentifier.hpp"
38
39#include "traccc/io/read_detector.hpp"
40#include "traccc/geometry/detector_design_description.hpp"
41
42#include "detray/geometry/tracking_surface.hpp"
43
44#include <memory>
45#include <mutex>
46#include <string>
47#include <unordered_map>
48
49struct moduleInfo {
50 bool pixel{false};
51 bool isAnnulus{false};
53 std::vector<traccc::scalar> row_centres;
54 std::vector<traccc::scalar> column_centres;
55 float module_width{0.f};
56 float module_length{0.f};
57 int columns{0};
58 int rows{0};
59 int side{0};
60 float lorentz_shift_x = 0.f;
61 float lorentz_shift_y = 0.f;
62};
63
64struct designKey {
65 bool pixel{false};
66 bool isAnnulus{false};
67 std::vector<traccc::scalar> edgesX;
68 std::vector<traccc::scalar> edgesY;
69 float width{0.f};
70 float length{0.f};
71
72 bool operator<(const designKey& other) const {
73 return std::tie(pixel, isAnnulus, edgesX, edgesY, width, length) <
74 std::tie(other.pixel, other.isAnnulus, other.edgesX, other.edgesY, other.width,
75 other.length);
76 }
77};
78
79namespace ActsTrk {
80
104 : public extends<AthService, IDeviceDetectorDescriptionSvc>
105{
106public:
107
108 using extends::extends;
109
111 virtual StatusCode initialize() override;
112
114 virtual const std::vector<StaticCondEntry>& staticCondEntries() const override {
115 return m_staticCondEntries;
116 }
117
118private:
119
120 ServiceHandle<StoreGateSvc> m_detStore{this, "DetectorStore", "StoreGateSvc/DetectorStore"};
121
124 ToolHandle<AthDevice::IMemoryResourcesTool> m_MRs{
125 this, "MemoryResourcesTool", "",
126 "The memory resources tool to use for allocating memory on the device"};
127
128
130 ToolHandle<AthDevice::ICopyTool> m_copy{
131 this, "CopyProviderTool", "", "Vecmem copy provider tool"};
132
133 Gaudi::Property<std::string> m_hostDetectorName{
134 this, "HostDetectorName", "",
135 "Detray host detector object"};
136
137 Gaudi::Property<std::string> m_deviceDetectorName{
138 this, "DeviceDetectorName", "",
139 "StoreGate name for the device (buffer) detector object"};
140
143 Gaudi::Property<std::string> m_deviceDesignObjectName{
144 this, "DeviceDigitizationObjectName", "",
145 "Traccc device digitization object"};
146 Gaudi::Property<std::string> m_hostDesignObjectName{
147 this, "HostDigitizationObjectName", "",
148 "Traccc host digitization object"};
149
150
151 Gaudi::Property<std::string> m_geoIdMappingObjectName{
152 this, "GeoIdMappingObjectName", "",
153 "StoreGate name for the detray/acts/athena geo id mapping"};
154
157 const PixelID* m_pixelID{nullptr};
158 const SCT_ID* m_stripID{nullptr};
159 Gaudi::Property<std::string> m_pixelIdHelperName {this, "PixelIDHelperName", "PixelID",
160 "Pixel-like ID helper name to retrieve from DetectorStore"};
161 Gaudi::Property<std::string> m_stripIdHelperName{this, "StripIDHelperName", "SCT_ID",
162 "Strip-like ID helper name to retrieve from DetectorStore"};
163
166
168
169 std::vector<StaticCondEntry> m_staticCondEntries;
170
171 std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry;
172 std::map<Identifier, moduleInfo> m_atlasModuleInfo;
173
174 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
175
176};
177
178} // namespace ActsTrk
179
180#endif // ACTSGPUGEOMETRY_DEVICEDETECTORDESCRIPTIONSVC_H
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
Service providing the static device detector description.
const PixelID * m_pixelID
Conversion helpers (to retrieve module design, hash, etc.) {.
const InDetDD::SCT_DetectorManager * m_stripManager
ToolHandle< AthDevice::ICopyTool > m_copy
The copy tool used for copying data to device.
virtual const std::vector< StaticCondEntry > & staticCondEntries() const override
Static per-module entries, indexed like the detector conditions description.
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
Gaudi::Property< std::string > m_geoIdMappingObjectName
Gaudi::Property< std::string > m_deviceDesignObjectName
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
const InDetDD::PixelDetectorManager * m_pixelManager
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
virtual StatusCode initialize() override
Function initializing and executing the geometry conversion.
std::map< Identifier, moduleInfo > m_atlasModuleInfo
Gaudi::Property< std::string > m_hostDesignObjectName
Gaudi::Property< std::string > m_deviceDetectorName
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
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
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
bool operator<(const designKey &other) const
std::vector< traccc::scalar > edgesX
std::vector< traccc::scalar > edgesY
std::vector< traccc::scalar > row_centres
std::vector< traccc::scalar > column_centres