ATLAS Offline Software
Loading...
Searching...
No Matches
GbtsLayerTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRK_GBTSLAYERTOOL_H
6#define ACTSTRK_GBTSLAYERTOOL_H
7
8// Athena
11
12#include <Gaudi/Property.h>
13
14// Acts Core
15#include "Acts/Seeding/GbtsLayerConnection.hpp"
16
17#include <map>
18#include <tuple>
19#include <vector>
20
21class SCT_ID;
22class PixelID;
23
24namespace InDetDD {
27} // namespace InDetDD
28
29namespace ActsTrk {
30
42class GbtsLayerTool final : public extends<AthAlgTool, IGbtsLayerTool> {
43 public:
44 GbtsLayerTool(const std::string& type, const std::string& name,
45 const IInterface* parent);
46 virtual ~GbtsLayerTool() = default;
47
48 virtual StatusCode initialize() override;
49
50 virtual const std::vector<Acts::Experimental::GbtsLayerDescription>&
51 layerDescriptions() const override {
53 }
54
55 virtual const std::vector<short>& pixelLayers() const override {
56 return m_pixelLayers;
57 }
58
59 virtual const std::vector<short>& stripLayers() const override {
60 return m_stripLayers;
61 }
62
68 StatusCode readConnections(
69 const std::vector<Acts::Experimental::GbtsLayerDescription>& layers,
70 std::vector<Acts::Experimental::GbtsLayerConnection>& connections,
71 float& etaBinWidth, std::string connectorInputFile, bool usePixel, bool useStrips) const override;
72
73 private:
75 struct ModuleEntry {
76 short phiIndex{};
77 short etaIndex{};
78 int hash{};
79 };
80
82 struct Connection {
83 std::uint32_t stage{};
84 std::uint32_t src{};
85 std::uint32_t dst{};
86 };
87
89 struct ReadResult {
91 float etaBinWidth{};
93 std::vector<Connection> connections;
94 };
95
105 ReadResult read(std::istream& inputStream) const;
106
109 using LayerKey = std::tuple<int, int, short, short>;
110
112 StatusCode buildLayers();
113
114 Gaudi::Property<bool> m_dumpGeometry{this, "dumpGbtsGeometry", false,
115 "dump the layer geometry to a file"};
116 Gaudi::Property<std::string> m_geometryDumpDir{
117 this, "geometryDump", "", "file to dump the layer geometry to"};
118
119 const PixelID* m_pixelId{nullptr};
120 const SCT_ID* m_stripId{nullptr};
123
124 std::vector<Acts::Experimental::GbtsLayerDescription> m_layerDescriptions;
126 std::vector<short> m_pixelLayers, m_stripLayers;
127};
128
129} // namespace ActsTrk
130
131#endif
virtual StatusCode initialize() override
const SCT_ID * m_stripId
virtual const std::vector< short > & pixelLayers() const override
std::vector< Acts::Experimental::GbtsLayerDescription > m_layerDescriptions
StatusCode buildLayers()
Group the modules into layers and fill the descriptions and hash maps.
virtual ~GbtsLayerTool()=default
const PixelID * m_pixelId
const InDetDD::PixelDetectorManager * m_pixelManager
virtual const std::vector< short > & stripLayers() const override
Gaudi::Property< std::string > m_geometryDumpDir
virtual const std::vector< Acts::Experimental::GbtsLayerDescription > & layerDescriptions() const override
Gaudi::Property< bool > m_dumpGeometry
std::tuple< int, int, short, short > LayerKey
Layer key: (side, technology, volume id, layer id).
GbtsLayerTool(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode readConnections(const std::vector< Acts::Experimental::GbtsLayerDescription > &layers, std::vector< Acts::Experimental::GbtsLayerConnection > &connections, float &etaBinWidth, std::string connectorInputFile, bool usePixel, bool useStrips) const override
Reads the connection table and keeps the connections this pass is for: both layers have to be layers ...
const InDetDD::SCT_DetectorManager * m_stripManager
ReadResult read(std::istream &inputStream) const
Read the GBTS layer connection table.
std::vector< short > m_stripLayers
std::vector< short > m_pixelLayers
Wafer hash addressable dense GBTS layer indices.
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...
Message Stream Member.
One row of the table: the two layers it connects, and the stage it is in.
One module, as grouped into a layer.
The table as it is on file.
std::vector< Connection > connections
The connections, in file order.
float etaBinWidth
The eta bin width the table was made for.