ATLAS Offline Software
Loading...
Searching...
No Matches
RobustTrackingGeometryBuilderImpl.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 INDETTRACKINGGEOMETRY_ROBUSTTRACKINGGEOMETRYBUILDERIMPL_H
6#define INDETTRACKINGGEOMETRY_ROBUSTTRACKINGGEOMETRYBUILDERIMPL_H
7
8// Trk
14// EnvelopeDefinitionService
16// Athena
20// Gaudi
21#include "GaudiKernel/ServiceHandle.h"
22#include "GaudiKernel/SystemOfUnits.h"
23#include "GaudiKernel/ToolHandle.h"
28#include "TrkGeometry/Layer.h"
35// STL
36#include <string>
37#include <vector>
38
40
41#ifndef TRKDETDESCR_TAKESMALLERBIGGER
42#define TRKDETDESCR_TAKESMALLERBIGGER
43#define takeSmaller(current, test) current = current < test ? current : test
44#define takeBigger(current, test) current = current > test ? current : test
45#define takeSmallerBigger(cSmallest, cBiggest, test) \
46 takeSamller(cSmallest, cBiggest, test); \
47 takeBigger(cSmallest, cBiggest, test)
48#endif
49
50namespace InDet {
51
66 RobustTrackingGeometryBuilderImpl // not safe indexStaticLayers
67 : public AthAlgTool,
69
70 public:
72 RobustTrackingGeometryBuilderImpl(const std::string&, const std::string&,
73 const IInterface*);
74
77
79 virtual StatusCode initialize() override;
80
81 protected:
82 enum ToolType {
83 Cond = 0,
84 Svc = 1,
85 };
86 template <ToolType type, typename LayerBuilders, typename PipeBuilder>
87 std::unique_ptr<Trk::TrackingGeometry> trackingGeometryImpl(
88 const LayerBuilders& layerHandles, const PipeBuilder& pipeHandle,
89 const EventContext* ctx = nullptr,
90 SG::WriteCondHandle<Trk::TrackingGeometry>* whandle = nullptr) const;
91
95 const std::vector<Trk::Layer*>& negLayers,
96 const std::vector<Trk::Layer*>& centralLayers,
97 const std::vector<Trk::Layer*>& posLayers, double rMin, double rMax,
98 double zMin, double zPosCentral,
99 const std::string& baseName = "UndefinedVolume", int colorCode = 21,
100 Trk::BinningType bintype = Trk::arbitrary) const;
101
105 const std::vector<Trk::TrackingVolume*>& negVolumes,
106 const std::vector<Trk::TrackingVolume*>& centralVolumes,
107 const std::vector<Trk::TrackingVolume*>& posVolumes,
108 const std::string& baseName = "UndefinedVolume") const;
109
110 // material configuration
113
114 // Configurable Properties
115 // helper tools for the geometry building
116 PublicToolHandle<Trk::ITrackingVolumeCreator> m_trackingVolumeCreator{
117 this, "TrackingVolumeCreator",
118 "Trk::CylinderVolumeCreator/"
119 "CylinderVolumeCreator"};
120
122 PublicToolHandle<Trk::ILayerArrayCreator> m_layerArrayCreator{
123 this, "LayerArrayCreator",
124 "Trk::LayerArrayCreator/LayerArrayCreator"};
125
126
127 // configurations for the layer builders
128 IntegerArrayProperty m_layerBinningType{
129 this, "LayerBinningType", {}};
130 IntegerArrayProperty m_colorCodesConfig{
131 this, "ColorCodes", {}};
132
133 // enclosing endcap/cylinder layer
135 this, "EnvelopeDefinitionSvc",
136 "AtlasEnvelopeDefSvc"};
137
138 DoubleArrayProperty m_enclosingCylinderRadius{
139 this,
140 "VolumeEnclosureCylinderRadii",
141 {}};
142 DoubleArrayProperty m_enclosingDiscPositionZ{
143 this,
144 "VolumeEnclosureDiscPositions",
145 {}};
146
147 DoubleProperty m_layerEnvelopeCover{
148 this, "EnvelopeCover", 2 * Gaudi::Units::mm};
149 BooleanProperty m_buildBoundaryLayers{this, "BuildBoundaryLayers",
150 true};
152 this, "ReplaceAllJointBoundaries",
153 true};
154
155 // outer envelope
156 DoubleProperty m_outwardsFraction{
157 this, "OutwardsFraction",
158 0.75};
159
160 // robust layer indexing
161 BooleanProperty m_indexStaticLayers{
162 this, "IndexStaticLayers", true};
163 // naming schema
164 StringProperty m_namespace{this, "VolumeNamespace",
165 "InDet::"};
166 // ID container
167 StringProperty m_exitVolume{
168 this, "ExitVolumeName",
169 "InDet::Containers::InnerDetector"};
170 BooleanProperty m_isITk{
171 this, "isITk",
172 false};
173};
174
175} // namespace InDet
177#endif // INDETTRACKINGGEOMETRY_ROBUSTTRACKINGGEOMETRYBUILDERIMPL_H
Cached unique_ptr with atomic update.
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:
Cached pointer with atomic update.
virtual ~RobustTrackingGeometryBuilderImpl()=default
Destructor.
RobustTrackingGeometryBuilderImpl(const std::string &, const std::string &, const IInterface *)
Constructor.
PublicToolHandle< Trk::ITrackingVolumeCreator > m_trackingVolumeCreator
Helper Tool to create TrackingVolumes.
IntegerArrayProperty m_layerBinningType
binning type for the provided layers
CxxUtils::CachedUniquePtrT< Trk::Material > m_materialProperties
overal material properties of the ID
DoubleProperty m_outwardsFraction
defines how much you orient yourself in an outwards way (see above)
DoubleArrayProperty m_enclosingDiscPositionZ
the disc position inside the enclosing volume
std::unique_ptr< Trk::TrackingGeometry > trackingGeometryImpl(const LayerBuilders &layerHandles, const PipeBuilder &pipeHandle, const EventContext *ctx=nullptr, SG::WriteCondHandle< Trk::TrackingGeometry > *whandle=nullptr) const
ServiceHandle< IEnvelopeDefSvc > m_enclosingEnvelopeSvc
the service to provide the ID envelope size
PublicToolHandle< Trk::ILayerArrayCreator > m_layerArrayCreator
Helper Tool to create BinnedArrays.
BooleanProperty m_indexStaticLayers
forces robust indexing for layers
BooleanProperty m_replaceJointBoundaries
run with replacement of all joint boundaries
Trk::TrackingVolume * packVolumeTriple(const std::vector< Trk::Layer * > &negLayers, const std::vector< Trk::Layer * > &centralLayers, const std::vector< Trk::Layer * > &posLayers, double rMin, double rMax, double zMin, double zPosCentral, const std::string &baseName="UndefinedVolume", int colorCode=21, Trk::BinningType bintype=Trk::arbitrary) const
Private method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap layers.
BooleanProperty m_isITk
changes volume boundary calculation for ITk layouts
BooleanProperty m_buildBoundaryLayers
create boundary layers
DoubleArrayProperty m_enclosingCylinderRadius
the cylinder layer inside the enclosing volume
The only way to change BoundarySurfaces etc from Tracking Volumes.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Primary Vertex Finder.
BinningType
, BinningOption & BinningAccess
Definition BinningType.h:31
@ arbitrary
Definition BinningType.h:34
void initialize()