ATLAS Offline Software
ActsHGTDLayerBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSGEOMETRY_ACTSHGTDLAYERBUILDER_H
6 #define ACTSGEOMETRY_ACTSHGTDLAYERBUILDER_H
7 
8 // PACKAGE
11 
12 // ATHENA
14 #include <mutex>
15 
16 // ACTS
17 #include "Acts/Geometry/ILayerBuilder.hpp"
18 #include "Acts/Utilities/Logger.hpp"
19 #include "Acts/Utilities/BinningType.hpp"
20 #include "Acts/Geometry/GeometryContext.hpp"
21 #include "Acts/Definitions/Units.hpp"
22 
23 class ActsTrackingGeomtrySvc;
24 
25 class HGTD_ID;
28 
29 namespace Acts {
30 class Surface;
31 class LayerCreator;
32 }
33 
35 class ActsHGTDLayerBuilder : public Acts::ILayerBuilder
36 {
37 public:
38 
40 
43 
44  struct Config
45  {
47  std::string configurationName = "undefined";
48  const HGTD_DetectorManager* mng {nullptr};
49  const HGTD_ID* idHelper = nullptr;
50  std::shared_ptr<const Acts::LayerCreator> layerCreator = nullptr;
58 
59  std::shared_ptr<ElementVector> elementStore {nullptr};
60 
61  std::array<double, 2> endcapEnvelopeR = {50 * Acts::UnitConstants::mm,
62  50 * Acts::UnitConstants::mm}; // m_discEnvelopeR in athena/HighGranularityTimingDetector/HGTD_Reconstruction/HGTD_TrackingGeometry/src/HGTD_LayerBuilderCond.cxx
63  std::array<double, 2> endcapEnvelopeZ = {0.2 * Acts::UnitConstants::mm,
64  0.2 * Acts::UnitConstants::mm}; // m_discThickness
65 
66  std::pair<size_t, size_t> endcapMaterialBins = {20, 50}; //{Phi, R}
67 
68  bool objDebugOutput = false;
69  };
70 
74 
76  std::unique_ptr<const Acts::Logger> logger);
77 
79  virtual ~ActsHGTDLayerBuilder() = default;
80 
81  virtual const Acts::LayerVector
82  negativeLayers(const Acts::GeometryContext& gctx) const override;
83 
84  virtual const Acts::LayerVector
85  centralLayers(const Acts::GeometryContext& gctx) const override;
86 
87  virtual const Acts::LayerVector
88  positiveLayers(const Acts::GeometryContext& gctx) const override;
89 
90  virtual
91  const std::string&
92  identification() const override
93  {
94  return m_cfg.configurationName;
95  }
96 
97 private:
100 
102  const Acts::Logger&
103  logger() const
104  {
105  return *m_logger;
106  }
107 
108  std::vector<std::shared_ptr<const ActsDetectorElement>>
109  getDetectorElements() const;
110 
112  std::unique_ptr<const Acts::Logger> m_logger;
113 
114  // Private helper method : build layers
115  // @param layers is goint to be filled
116  // @param type is the indication which ones to build -1 | 0 | 1
117  void
118  buildEndcap(const Acts::GeometryContext& gctx, Acts::LayerVector& layersOutput, int type = 0) const;
119 
120 };
121 
122 #endif
ActsHGTDLayerBuilder::Config::endcapEnvelopeZ
std::array< double, 2 > endcapEnvelopeZ
Definition: ActsHGTDLayerBuilder.h:63
ActsHGTDLayerBuilder::Config::layerCreator
std::shared_ptr< const Acts::LayerCreator > layerCreator
Definition: ActsHGTDLayerBuilder.h:50
ActsHGTDLayerBuilder::getDetectorElements
std::vector< std::shared_ptr< const ActsDetectorElement > > getDetectorElements() const
Definition: ActsHGTDLayerBuilder.cxx:234
ActsHGTDLayerBuilder::Config::bTypeR
Acts::BinningType bTypeR
the binning type of the contained surfaces in r (equidistant/arbitrary)
Definition: ActsHGTDLayerBuilder.h:54
ActsHGTDLayerBuilder::logger
const Acts::Logger & logger() const
Private access to the logger.
Definition: ActsHGTDLayerBuilder.h:103
Trk::equidistant
@ equidistant
Definition: BinningType.h:32
ActsHGTDLayerBuilder::Config
Definition: ActsHGTDLayerBuilder.h:45
ActsHGTDLayerBuilder::negativeLayers
virtual const Acts::LayerVector negativeLayers(const Acts::GeometryContext &gctx) const override
Definition: ActsHGTDLayerBuilder.cxx:48
ActsHGTDLayerBuilder::buildEndcap
void buildEndcap(const Acts::GeometryContext &gctx, Acts::LayerVector &layersOutput, int type=0) const
Definition: ActsHGTDLayerBuilder.cxx:70
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Trk::BinningType
BinningType
Definition: BinningType.h:31
ActsHGTDLayerBuilder::Config::bTypeZ
Acts::BinningType bTypeZ
the binning type of the contained surfaces in z (equidistant/arbitrary)
Definition: ActsHGTDLayerBuilder.h:57
ActsHGTDLayerBuilder::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: ActsHGTDLayerBuilder.h:112
ActsHGTDLayerBuilder::Config::idHelper
const HGTD_ID * idHelper
Definition: ActsHGTDLayerBuilder.h:49
ActsHGTDLayerBuilder::Config::configurationName
std::string configurationName
string based identification
Definition: ActsHGTDLayerBuilder.h:47
Acts
Definition: ChamberAssembleTool.h:18
ActsHGTDLayerBuilder::Config::objDebugOutput
bool objDebugOutput
Definition: ActsHGTDLayerBuilder.h:68
HGTD_ID
Definition: HGTD_ID.h:47
ActsHGTDLayerBuilder::positiveLayers
virtual const Acts::LayerVector positiveLayers(const Acts::GeometryContext &gctx) const override
Definition: ActsHGTDLayerBuilder.cxx:63
ActsDetectorElement
Definition: ActsDetectorElement.h:42
ActsDetectorElement.h
ActsHGTDLayerBuilder::~ActsHGTDLayerBuilder
virtual ~ActsHGTDLayerBuilder()=default
Destructor.
ActsHGTDLayerBuilder::ActsHGTDLayerBuilder
ActsHGTDLayerBuilder(const Config &cfg, std::unique_ptr< const Acts::Logger > logger)
Constructor.
Definition: ActsHGTDLayerBuilder.cxx:40
ActsHGTDLayerBuilder
Definition: ActsHGTDLayerBuilder.h:36
ActsElementVector
Helper to hold elements for deletion.
Definition: ActsElementVector.h:30
ActsHGTDLayerBuilder::Config::endcapEnvelopeR
std::array< double, 2 > endcapEnvelopeR
Definition: ActsHGTDLayerBuilder.h:61
WriteCaloSwCorrections.cfg
cfg
Definition: WriteCaloSwCorrections.py:23
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
ActsHGTDLayerBuilder::Config::bTypePhi
Acts::BinningType bTypePhi
Definition: ActsHGTDLayerBuilder.h:51
ActsHGTDLayerBuilder::Config::mng
const HGTD_DetectorManager * mng
Definition: ActsHGTDLayerBuilder.h:48
ActsHGTDLayerBuilder::centralLayers
virtual const Acts::LayerVector centralLayers(const Acts::GeometryContext &gctx) const override
Definition: ActsHGTDLayerBuilder.cxx:56
ActsHGTDLayerBuilder::Config::elementStore
std::shared_ptr< ElementVector > elementStore
Definition: ActsHGTDLayerBuilder.h:59
ActsHGTDLayerBuilder::identification
virtual const std::string & identification() const override
Definition: ActsHGTDLayerBuilder.h:92
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
ActsHGTDLayerBuilder::Config::endcapMaterialBins
std::pair< size_t, size_t > endcapMaterialBins
Definition: ActsHGTDLayerBuilder.h:66
checker_macros.h
Define macros for attributes used to control the static checker.
ActsElementVector.h
Helper to hold elements for deletion.
ActsHGTDLayerBuilder::m_cfg
Config m_cfg
configuration object
Definition: ActsHGTDLayerBuilder.h:99