ATLAS Offline Software
Loading...
Searching...
No Matches
SiLayerBuilderImpl.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 INDETTRACKINGGEOMETRY_SILAYERBUILDERIMPL_H
6#define INDETTRACKINGGEOMETRY_SILAYERBUILDERIMPL_H
7
8// Athena
12// Amg
14// Trk
17// STL
18#include <memory>
19#include <vector>
20#include <utility> //for std::pair
21
22class PixelID;
23class SCT_ID;
24
25#ifndef TRKDETDESCR_TAKESMALLERBIGGER
26#define TRKDETDESCR_TAKESMALLERBIGGER
27#define takeSmaller(current,test) current = current < test ? current : test
28#define takeBigger(current,test) current = current > test ? current : test
29#define takeSmallerBigger(cSmallest, cBiggest, test) takeSmaller(cSmallest, test); takeBigger(cBiggest, test)
30#endif
31
32namespace InDetDD {
34}
35
36namespace Trk {
37 class Surface;
38 class CylinderLayer;
39 class DiscLayer;
41 typedef std::pair< std::shared_ptr<Surface>, Amg::Vector3D > SurfaceOrderPosition;
42}
43
44namespace InDet {
45
60
61 public:
62
64 virtual ~SiLayerBuilderImpl() = default;
65
67 virtual StatusCode initialize() override;
69 virtual StatusCode finalize() override;
70
71 protected:
73 SiLayerBuilderImpl(const std::string&,const std::string&,const IInterface*);
74
75 void registerSurfacesToLayer(std::span<Trk::Surface * const >& layerSurfaces, Trk::Layer& lay) const;
76
77 std::unique_ptr<const std::vector<Trk::CylinderLayer*> >
78 cylindricalLayersImpl(const InDetDD::SiDetectorElementCollection& siDetElementCollection) const;
79
80 std::unique_ptr<std::vector< Trk::DiscLayer*> >
81 createDiscLayersImpl(const InDetDD::SiDetectorElementCollection& siDetElementCollection, std::unique_ptr<std::vector< Trk::DiscLayer*> > discLayers = nullptr) const;
82
83 std::unique_ptr<std::vector< Trk::DiscLayer*> >
84 createRingLayersImpl(const InDetDD::SiDetectorElementCollection& siDetElementCollection) const;
85
86 std::unique_ptr<std::vector<Trk::CylinderLayer*> >
87 dressCylinderLayers(const std::vector<Trk::CylinderLayer* >& dLayers) const;
88
91 double hz) const;
92
95 double rMax) const;
96
98 BooleanProperty m_pixelCase{this, "PixelCase", true};
100 StringProperty m_siMgrLocation{this, "SiDetManagerLocation", "Pixel"};
103
104 BooleanProperty m_setLayerAssociation{this, "SetLayerAssociation", true};
105
106 // For the Active Barrel Material
107 // barrel layer section
108 DoubleArrayProperty m_barrelAdditionalLayerR{this, "BarrelAdditionalLayerRadii", {} };
109 IntegerArrayProperty m_barrelAdditionalLayerType{this, "BarrelAdditionalLayerType", {} };
110 UnsignedIntegerProperty m_barrelLayerBinsZ{this, "BarrelLayerBinsZ", 100};
111 UnsignedIntegerProperty m_barrelLayerBinsPhi{this, "BarrelLayerBinsPhi", 1};
112 DoubleProperty m_barrelEnvelope{this, "BarrelEnvelope", 0.1};
113 DoubleProperty m_barrelEdbTolerance{this, "BarrelEdbTolerance", 0.05};
114
115 // For the Active Endcap Material
116 DoubleArrayProperty m_endcapAdditionalLayerPosZ{this, "EndcapAdditionalLayerPositionsZ", {} };
117 IntegerArrayProperty m_endcapAdditionalLayerType{this,"EndcapAdditionalLayerType" , {} };
118 UnsignedIntegerProperty m_endcapLayerBinsR{this, "EndcapLayerBinsR", 100};
119 UnsignedIntegerProperty m_endcapLayerBinsPhi{this, "EndcapLayerBinsPhi", 1};
120 DoubleProperty m_endcapEnvelope{this, "EndcapEnvelope", 0.1};
121 BooleanProperty m_endcapComplexRingBinning{this, "EndcapComplexRingBinning", true};
122
123 StringProperty m_identification{this, "Identification", "Pixel"};
124
125 BooleanProperty m_runGeometryValidation{this, "GeometryValidation", true};
126
127 IntegerArrayProperty m_layerIndicesBarrel{this, "LayerIndicesBarrel", {} };
128 IntegerArrayProperty m_layerIndicesEndcap{this, "LayerIndicesEndcap", {} };
129 BooleanProperty m_useRingLayout{this, "UseRingLayout", false};
130 BooleanProperty m_addMoreSurfaces{this, "AddMoreSurfaces", false};
131
132 // Properties only in SiLayerBuilderCond
133 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCT_ReadKey{this, "SCT_ReadKey", "SCT_DetectorElementCollection", "Key of output SiDetectorElementCollection for SCT"};
134 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_PixelReadKey{this, "PixelReadKey", "PixelDetectorElementCollection", "Key of output SiDetectorElementCollection for Pixel"};
135
136
137
138 };
139
140} // end of namespace
141
142
143#endif // INDETTRACKINGGEOMETRY_SILAYERBUILDERIMPL_H
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Class to hold the SiDetectorElement objects to be put in the detector store.
Base class for Pixel and SCT Detector managers.
DoubleProperty m_barrelEnvelope
envelope around rMin/rMax
BooleanProperty m_setLayerAssociation
Set Layer Association.
IntegerArrayProperty m_layerIndicesBarrel
indices to be used for layer creation (used for ITk specific case)
virtual StatusCode finalize() override
AlgTool finalize method.
BooleanProperty m_addMoreSurfaces
to add additional surfaces to the PixelOverlapDescriptor, SCT_OverlapDescriptor and DiscOverlapDescri...
UnsignedIntegerProperty m_endcapLayerBinsR
Barrel bins for the material in r.
std::unique_ptr< std::vector< Trk::CylinderLayer * > > dressCylinderLayers(const std::vector< Trk::CylinderLayer * > &dLayers) const
helper method to construct barrel material
virtual ~SiLayerBuilderImpl()=default
Destructor.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_PixelReadKey
StringProperty m_identification
string identification
void registerSurfacesToLayer(std::span< Trk::Surface *const > &layerSurfaces, Trk::Layer &lay) const
BooleanProperty m_runGeometryValidation
run the validation of the geometry ( no empty bins)
DoubleProperty m_endcapEnvelope
envelope around rMin/rMax
DoubleArrayProperty m_endcapAdditionalLayerPosZ
Create additional endcaps at these z positions.
UnsignedIntegerProperty m_barrelLayerBinsPhi
Barrel bins for the material in phi.
std::unique_ptr< std::vector< Trk::DiscLayer * > > createRingLayersImpl(const InDetDD::SiDetectorElementCollection &siDetElementCollection) const
DoubleArrayProperty m_barrelAdditionalLayerR
Create an additional layer at these radii.
const Trk::BinnedLayerMaterial endcapLayerMaterial(double rMin, double rMax) const
UnsignedIntegerProperty m_endcapLayerBinsPhi
Barrel bins for the material in phi.
const PixelID * m_pixIdHelper
pixel Id Helper
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCT_ReadKey
IntegerArrayProperty m_barrelAdditionalLayerType
material layer 1 - navigation layer 0
const InDetDD::SiDetectorManager * m_siMgr
the Si Detector Manager
BooleanProperty m_useRingLayout
to enable creation of rings for ITk pixel geometry (used for ITk specific case)
SiLayerBuilderImpl(const std::string &, const std::string &, const IInterface *)
AlgTool style constructor.
DoubleProperty m_barrelEdbTolerance
tolerance in percent how much the bin sizes can change
std::unique_ptr< std::vector< Trk::DiscLayer * > > createDiscLayersImpl(const InDetDD::SiDetectorElementCollection &siDetElementCollection, std::unique_ptr< std::vector< Trk::DiscLayer * > > discLayers=nullptr) const
std::unique_ptr< const std::vector< Trk::CylinderLayer * > > cylindricalLayersImpl(const InDetDD::SiDetectorElementCollection &siDetElementCollection) const
IntegerArrayProperty m_endcapAdditionalLayerType
material layer 1 - navigation layer 0 ( for volume adjustment )
BooleanProperty m_endcapComplexRingBinning
make std::vector<R> rings, could be different for layers
BooleanProperty m_pixelCase
Common properties.
const SCT_ID * m_sctIdHelper
sct Id Helper
IntegerArrayProperty m_layerIndicesEndcap
indices to be used for layer creation (used for ITk specific case)
const Trk::BinnedLayerMaterial barrelLayerMaterial(double r, double hz) const
helper method to construct endcap material
StringProperty m_siMgrLocation
the location of the Pixel Manager
UnsignedIntegerProperty m_barrelLayerBinsZ
Barrel bins for the material in z.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Base class for Pixel and SCT Detector managers.
It extends the LayerMaterialProperties base class.
Class to describe a cylindrical detector layer for tracking, it inhertis from both,...
Class to describe a disc-like detector layer for tracking, it inhertis from both, Layer base class an...
Definition DiscLayer.h:45
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
Abstract Base Class for tracking surfaces.
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
Message Stream Member.
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.
std::pair< std::shared_ptr< Surface >, Amg::Vector3D > SurfaceOrderPosition
void initialize()