ATLAS Offline Software
Loading...
Searching...
No Matches
ActsLayerBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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/Utilities/Logger.hpp"
18#include "Acts/Utilities/BinningType.hpp"
19
20
21#include <mutex>
22#include <array>
23#include <iosfwd>
24#include <vector>
25#include <memory>
26#include <utility>
27#include <functional>
28
29class ActsTrackingGeomtrySvc;
30
31namespace InDetDD {
33}
34
35namespace Acts {
36class Surface;
37class LayerCreator;
38class GeometryContext;
39}
40
42class ActsLayerBuilder : public Acts::ILayerBuilder
43{
44public:
48
50
53
54 struct Config
55 {
57 std::string configurationName = "undefined";
60 std::shared_ptr<const Acts::LayerCreator> layerCreator = nullptr;
63 Acts::BinningType bTypePhi = Acts::equidistant;
66 Acts::BinningType bTypeR = Acts::equidistant;
69 Acts::BinningType bTypeZ = Acts::equidistant;
70 std::shared_ptr<ElementVector> elementStore;
71
72 std::array<double, 2> endcapEnvelopeR = {2 * Acts::UnitConstants::mm,
73 2 * Acts::UnitConstants::mm};
74 std::array<double, 2> endcapEnvelopeZ = {2 * Acts::UnitConstants::mm,
75 2 * Acts::UnitConstants::mm};
76
77 std::array<double, 2> barrelEnvelopeR = {2 * Acts::UnitConstants::mm,
78 2 * Acts::UnitConstants::mm};
79 std::array<double, 2> barrelEnvelopeZ = {2 * Acts::UnitConstants::mm,
80 2 * Acts::UnitConstants::mm};
81
86 std::vector<float> passiveBarrelLayerRadii = {};
87 std::vector<float> passiveBarrelLayerHalflengthZ = {};
88 std::vector<float> passiveBarrelLayerThickness = {};
89
90 std::pair<size_t, size_t> endcapMaterialBins = {20, 5};
91 std::pair<size_t, size_t> barrelMaterialBins = {10, 10};
92
93 std::function<bool(const Acts::GeometryContext &, Acts::AxisDirection,
94 const Acts::Surface *, const Acts::Surface *)>
96
98
99 bool objDebugOutput = false;
100
104 double numberOfBinsFactor = 5.0;
105
108
109 };
110
114 ActsLayerBuilder(const Config& cfg,
115 std::unique_ptr<const Acts::Logger> logger
116 = Acts::getDefaultLogger("GMLayBldr", Acts::Logging::INFO));
117
120
121 const Acts::LayerVector
122 negativeLayers(const Acts::GeometryContext& gctx) const override;
123
124 const Acts::LayerVector
125 centralLayers(const Acts::GeometryContext& gctx) const override;
126
127 const Acts::LayerVector
128 positiveLayers(const Acts::GeometryContext& gctx) const override;
129
130
132 // const std::string&
133 // identification() const final;
134
137 void
139
141 // Config
142 // getConfiguration() const;
143
146 {
147 return m_cfg;
148 }
149
150 virtual
151 const std::string&
152 identification() const override
153 {
154 return m_cfg.configurationName;
155 }
156
158 void
159 setLogger(std::unique_ptr<const Acts::Logger> logger);
160
161private:
164
166 const Acts::Logger&
167 logger() const
168 {
169 return *m_logger;
170 }
171
172 std::vector<std::shared_ptr<const ActsDetectorElement>>
173 getDetectorElements() const;
174
176 std::unique_ptr<const Acts::Logger> m_logger;
177
179 //std::vector<std::shared_ptr<const ActsDetectorElement>> m_elementStore;
180
181
182 // Private helper method : build layers
183 // @param layers is goint to be filled
184 // @param type is the indication which ones to build -1 | 0 | 1
185 void
186 buildBarrel(const Acts::GeometryContext& gctx, Acts::LayerVector& layersOutput) const;
187
188 void
189 buildEndcap(const Acts::GeometryContext& gctx, Acts::LayerVector& layersOutput, int type = 0) const;
190
191};
192
193std::ostream& operator<<(std::ostream& os, const ActsLayerBuilder::Mode& mode);
194
195#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
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::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)
double numberOfInnermostLayerBinsFactor
Special treatment for the innermost pixel layer to have more control on bin size to account for shall...
std::function< bool(const Acts::GeometryContext &, Acts::AxisDirection, const Acts::Surface *, const Acts::Surface *)> surfaceMatcher