ATLAS Offline Software
Loading...
Searching...
No Matches
ActsLayerBuilder.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 ACTSGEOMETRY_ACTSLAYERBUILDER_H
6#define ACTSGEOMETRY_ACTSLAYERBUILDER_H
7
8// PACKAGE
11
12// ATHENA
14
15// ACTS
16#include "Acts/Geometry/ILayerBuilder.hpp"
17#include "Acts/Surfaces/SurfaceArray.hpp"
18#include "Acts/Utilities/Logger.hpp"
19#include "Acts/Utilities/BinningType.hpp"
20
21
22#include <mutex>
23#include <array>
24#include <cstdint>
25#include <iosfwd>
26#include <vector>
27#include <memory>
28#include <utility>
29#include <functional>
30
31class ActsTrackingGeomtrySvc;
32
33namespace InDetDD {
35}
36
37namespace Acts {
38class Surface;
39class LayerCreator;
40class GeometryContext;
41}
42
44class ActsLayerBuilder : public Acts::ILayerBuilder
45{
46public:
50
52
55
56 struct Config
57 {
59 std::string configurationName = "undefined";
62 std::shared_ptr<const Acts::LayerCreator> layerCreator = nullptr;
65 Acts::BinningType bTypePhi = Acts::equidistant;
68 Acts::BinningType bTypeR = Acts::equidistant;
71 Acts::BinningType bTypeZ = Acts::equidistant;
72 std::shared_ptr<ElementVector> elementStore;
73
74 std::array<double, 2> endcapEnvelopeR = {2 * Acts::UnitConstants::mm,
75 2 * Acts::UnitConstants::mm};
76 std::array<double, 2> endcapEnvelopeZ = {2 * Acts::UnitConstants::mm,
77 2 * Acts::UnitConstants::mm};
78
79 std::array<double, 2> barrelEnvelopeR = {2 * Acts::UnitConstants::mm,
80 2 * Acts::UnitConstants::mm};
81 std::array<double, 2> barrelEnvelopeZ = {2 * Acts::UnitConstants::mm,
82 2 * Acts::UnitConstants::mm};
83
88 std::vector<float> passiveBarrelLayerRadii = {};
89 std::vector<float> passiveBarrelLayerHalflengthZ = {};
90 std::vector<float> passiveBarrelLayerThickness = {};
91
92 std::pair<size_t, size_t> endcapMaterialBins = {20, 5};
93 std::pair<size_t, size_t> barrelMaterialBins = {10, 10};
94
95 std::function<bool(const Acts::GeometryContext &, Acts::AxisDirection,
96 const Acts::Surface *, const Acts::Surface *)>
98
100
101 bool objDebugOutput = false;
102
106 double numberOfBinsFactor = 5.0;
107
112 Acts::SurfaceArray::NeighborWindow barrelNeighborWindow{{0, 0}, {1, 2}};
113
116 Acts::SurfaceArray::NeighborWindow endcapNeighborWindow{{0, 0}, {2, 1}};
117
120 std::uint8_t surfaceArrayOverfill = 0;
121 };
122
126 ActsLayerBuilder(const Config& cfg,
127 std::unique_ptr<const Acts::Logger> logger
128 = Acts::getDefaultLogger("GMLayBldr", Acts::Logging::INFO));
129
132
133 const Acts::LayerVector
134 negativeLayers(const Acts::GeometryContext& gctx) const override;
135
136 const Acts::LayerVector
137 centralLayers(const Acts::GeometryContext& gctx) const override;
138
139 const Acts::LayerVector
140 positiveLayers(const Acts::GeometryContext& gctx) const override;
141
142
144 // const std::string&
145 // identification() const final;
146
149 void
151
153 // Config
154 // getConfiguration() const;
155
158 {
159 return m_cfg;
160 }
161
162 virtual
163 const std::string&
164 identification() const override
165 {
166 return m_cfg.configurationName;
167 }
168
170 void
171 setLogger(std::unique_ptr<const Acts::Logger> logger);
172
173private:
176
178 const Acts::Logger&
179 logger() const
180 {
181 return *m_logger;
182 }
183
184 std::vector<std::shared_ptr<const ActsDetectorElement>>
185 getDetectorElements() const;
186
188 std::unique_ptr<const Acts::Logger> m_logger;
189
191 //std::vector<std::shared_ptr<const ActsDetectorElement>> m_elementStore;
192
193
194 // Private helper method : build layers
195 // @param layers is goint to be filled
196 // @param type is the indication which ones to build -1 | 0 | 1
197 void
198 buildBarrel(const Acts::GeometryContext& gctx, Acts::LayerVector& layersOutput) const;
199
200 void
201 buildEndcap(const Acts::GeometryContext& gctx, Acts::LayerVector& layersOutput, int type = 0) const;
202
203};
204
205std::ostream& operator<<(std::ostream& os, const ActsLayerBuilder::Mode& mode);
206
207#endif
Helper to hold elements for deletion.
std::ostream & operator<<(std::ostream &os, const ActsLayerBuilder::Mode &mode)
@ Undefined
Define macros for attributes used to control the static checker.
Helper to hold elements for deletion.
ActsElementVector ElementVector
void setConfiguration(const Config &cfg)
Name identification.
const ActsLayerBuilder::Config & getConfiguration() const
get the configuration object
void buildBarrel(const Acts::GeometryContext &gctx, Acts::LayerVector &layersOutput) const
~ActsLayerBuilder()
Destructor.
void setLogger(std::unique_ptr< const Acts::Logger > logger)
set logging instance
const Acts::LayerVector centralLayers(const Acts::GeometryContext &gctx) const override
void buildEndcap(const Acts::GeometryContext &gctx, Acts::LayerVector &layersOutput, int type=0) const
std::unique_ptr< const Acts::Logger > m_logger
logging instance
const Acts::LayerVector positiveLayers(const Acts::GeometryContext &gctx) const override
const Acts::LayerVector negativeLayers(const Acts::GeometryContext &gctx) const override
std::vector< std::shared_ptr< const ActsDetectorElement > > getDetectorElements() const
virtual const std::string & identification() const override
const Acts::Logger & logger() const
Private access to the logger.
ActsLayerBuilder(const Config &cfg, std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("GMLayBldr", Acts::Logging::INFO))
Constructor.
Config m_cfg
configuration object
Base class for Pixel and SCT Detector managers.
Message Stream Member.
Definition HitInfo.h:33
nested configuration struct for steering of the layer builder
Acts::SurfaceArray::NeighborWindow endcapNeighborWindow
Bounds on the neighbor window of the endcap surface arrays, in bins along (r, phi).
std::string configurationName
string based identification
std::array< double, 2 > endcapEnvelopeZ
std::vector< float > passiveBarrelLayerHalflengthZ
std::vector< float > passiveBarrelLayerThickness
double numberOfBinsFactor
controls how many bins are created for the sensitive surface grid.
Acts::BinningType bTypeZ
the binning type of the contained surfaces in z (equidistant/arbitrary)
std::uint8_t surfaceArrayOverfill
Extra cells per direction and axis that each surface fills around its footprint in the surface arrays...
std::pair< size_t, size_t > endcapMaterialBins
std::vector< float > passiveBarrelLayerRadii
the specifications for building additional passive cylinders in the barrel region: for each cylinder ...
std::shared_ptr< const Acts::LayerCreator > layerCreator
std::array< double, 2 > barrelEnvelopeZ
const InDetDD::SiDetectorManager * mng
std::array< double, 2 > barrelEnvelopeR
Acts::BinningType bTypeR
the binning type of the contained surfaces in r (equidistant/arbitrary)
std::shared_ptr< ElementVector > elementStore
std::array< double, 2 > endcapEnvelopeR
std::pair< size_t, size_t > barrelMaterialBins
Acts::BinningType bTypePhi
the binning type of the contained surfaces in phi (equidistant/arbitrary)
std::function< bool(const Acts::GeometryContext &, Acts::AxisDirection, const Acts::Surface *, const Acts::Surface *)> surfaceMatcher
Acts::SurfaceArray::NeighborWindow barrelNeighborWindow
Bounds on the neighbor window of the barrel surface arrays, in bins along (phi, z).