ATLAS Offline Software
Loading...
Searching...
No Matches
CylinderVolumeCreator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CylinderVolumeCreator.h, (c) ATLAS Detector software
8
9#ifndef TRKDETDESCRTOOLS_CYLINDERVOLUMECREATOR_H
10#define TRKDETDESCRTOOLS_CYLINDERVOLUMECREATOR_H
11
12
13// Trk
19// Amg
21// Gaudi & Athena
23#include "GaudiKernel/ToolHandle.h"
24#include "GaudiKernel/SystemOfUnits.h"
25// STL
26#include <string>
27#include <vector>
28
30namespace Trk {
31
32class Layer;
33class CylinderLayer;
34class DiscLayer;
35class TrackingVolume;
36class VolumeBounds;
38class Material;
39
47
49 : public AthAlgTool
50 , virtual public ITrackingVolumeCreator
51{
52
53public:
55 CylinderVolumeCreator(const std::string&,
56 const std::string&,
57 const IInterface*);
58
60 virtual StatusCode initialize() override;
61
67 const std::vector<Layer*>& layers,
68 Material& matprop,
69 VolumeBounds* volBounds = 0,
70 Amg::Transform3D* transform = 0,
71 const std::string& volumeName = "UndefinedVolume",
72 BinningType btype = arbitrary) const override final;
73
79 const std::vector<Layer*>& layers,
80 Material& matprop,
81 double loc1Min,
82 double loc1Max,
83 double loc2Min,
84 double loc2Max,
85 const std::string& volumeName = "UndefinedVolume",
86 BinningType btype = arbitrary) const override final;
87
93 Material& matprop,
94 double rMin,
95 double rMax,
96 double zMin,
97 double zMax,
98 unsigned int materialLayers,
99 bool cylinder = true,
100 const std::string& volumeName = "UndefinedVolume") const override final;
101
107 Material& matprop,
108 double rMin,
109 double rMax,
110 double zMin,
111 double zMax,
112 const std::vector<double>& layerPositions,
113 bool cylinder = true,
114 const std::string& volumeName = "UndefinedVolume",
115 BinningType btype = arbitrary) const override final;
116
122 (const std::vector<TrackingVolume*>& volumes,
123 const Material& matprop,
124 const std::string& volumeName = "UndefinedVolume",
125 bool buildBoundaryLayers = false,
126 bool replaceBoundaryFace = false) const override final;
127
128private:
133
134 StatusCode estimateAndCheckDimension(
135 const std::vector<Layer*>& layers,
136 Trk::CylinderVolumeBounds*& cylBounds,
137 Amg::Transform3D*& translation,
138 std::vector<CylinderLayer*>& cylLayers,
139 std::vector<DiscLayer*>& discLayers,
140 double& rMinClean,
141 double& rMaxClean,
142 double& zMinClean,
143 double& zMaxClean,
144 BinningType bType = arbitrary) const;
145
148 StatusCode interGlueTrackingVolume
149 (TrackingVolume& tVolume,
150 bool rBinned,
151 bool buildBoundaryLayers,
152 bool replaceBoundaryFace = false) const;
153
157 std::vector<Trk::TrackingVolume*>& vols) const;
158
160 void glueTrackingVolumes(TrackingVolume& volumeOne,
161 BoundarySurfaceFace faceOne,
162 TrackingVolume& volumeTwo,
163 BoundarySurfaceFace faceTwo,
164 bool buildBoundaryLayers,
165 bool replaceBoundaryFace = false) const;
166
169 double r,
170 double halflength,
171 double thickness,
172 int binsPhi,
173 int binsZ) const;
174
177 double rMin,
178 double rMax,
179 double thickness,
180 int binsPhi,
181 int binsR) const;
182
183 // helper tools
185 ToolHandle<ILayerArrayCreator> m_layerArrayCreator
186 {this, "LayerArrayCreator", "Trk::LayerArrayCreator/LayerArrayCreator"};
187
188 ToolHandle<ITrackingVolumeArrayCreator> m_trackingVolumeArrayCreator
189 {this, "TrackingVolumeArrayCreator",
190 "Trk::TrackingVolumeArrayCreator/TrackingVolumeArrayCreator"};
191
192 ToolHandle<ITrackingVolumeHelper> m_trackingVolumeHelper
193 {this, "TrackingVolumeHelper",
194 "Trk::TrackingVolumeHelper/TrackingVolumeHelper"};
195
196 Gaudi::Property<double> m_passiveLayerThickness
197 {this, "PassiveLayerThickness", 1*Gaudi::Units::mm,
198 "thickness of passive layers"};
199 Gaudi::Property<int> m_passiveLayerPhiBins
200 {this, "PassiveLayerBinsPhi", 1, "bins in phi for the passive layer"};
201 Gaudi::Property<int> m_passiveLayerRzBins
202 {this, "PassiveLayerBinsRZ", 100, "bins in r/z for the passive layer"};
203};
204}
205
206#endif
207
Define macros for attributes used to control the static checker.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Class to describe a cylindrical detector layer for tracking, it inhertis from both,...
Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces:
ToolHandle< ITrackingVolumeHelper > m_trackingVolumeHelper
CylinderLayer * createCylinderLayer(double z, double r, double halflength, double thickness, int binsPhi, int binsZ) const
Private method - helper method to save some code.
void glueTrackingVolumes(TrackingVolume &volumeOne, BoundarySurfaceFace faceOne, TrackingVolume &volumeTwo, BoundarySurfaceFace faceTwo, bool buildBoundaryLayers, bool replaceBoundaryFace=false) const
Private method - glue volume to the other – use trackingVolume helper.
void addFaceVolumes(TrackingVolume &tvol, Trk::BoundarySurfaceFace bsf, std::vector< Trk::TrackingVolume * > &vols) const
Private method - helper method not to duplicate code.
ToolHandle< ILayerArrayCreator > m_layerArrayCreator
< A Tool for coherent LayerArray creation
virtual TrackingVolume * createGapTrackingVolume(Material &matprop, double rMin, double rMax, double zMin, double zMax, unsigned int materialLayers, bool cylinder=true, const std::string &volumeName="UndefinedVolume") const override final
DiscLayer * createDiscLayer(double z, double rMin, double rMax, double thickness, int binsPhi, int binsR) const
Private method - helper method to save some code.
virtual TrackingVolume * createContainerTrackingVolume(const std::vector< TrackingVolume * > &volumes, const Material &matprop, const std::string &volumeName="UndefinedVolume", bool buildBoundaryLayers=false, bool replaceBoundaryFace=false) const override final
;
Gaudi::Property< int > m_passiveLayerRzBins
ToolHandle< ITrackingVolumeArrayCreator > m_trackingVolumeArrayCreator
TrackingVolume helper.
StatusCode interGlueTrackingVolume(TrackingVolume &tVolume, bool rBinned, bool buildBoundaryLayers, bool replaceBoundaryFace=false) const
Private method - interglue all volumes contained by a TrackingVolume and set the outside glue volumes...
CylinderVolumeCreator(const std::string &, const std::string &, const IInterface *)
Constructor.
Gaudi::Property< double > m_passiveLayerThickness
virtual StatusCode initialize() override
AlgTool initialize method.
Gaudi::Property< int > m_passiveLayerPhiBins
virtual TrackingVolume * createTrackingVolume(const std::vector< Layer * > &layers, Material &matprop, VolumeBounds *volBounds=0, Amg::Transform3D *transform=0, const std::string &volumeName="UndefinedVolume", BinningType btype=arbitrary) const override final
;
StatusCode estimateAndCheckDimension(const std::vector< Layer * > &layers, Trk::CylinderVolumeBounds *&cylBounds, Amg::Transform3D *&translation, std::vector< CylinderLayer * > &cylLayers, std::vector< DiscLayer * > &discLayers, double &rMinClean, double &rMaxClean, double &zMinClean, double &zMaxClean, BinningType bType=arbitrary) const
Private method - it estimates the CylinderBounds and Translation of layers, if given,...
Class to describe a disc-like detector layer for tracking, it inhertis from both, Layer base class an...
Definition DiscLayer.h:45
Interface class ITrackingVolumeCreators It inherits from IAlgTool.
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
A common object to be contained by.
Definition Material.h:117
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Pure Absract Base Class for Volume bounds.
int r
Definition globals.cxx:22
Eigen::Affine3d Transform3D
Ensure that the ATLAS eigen extensions are properly loaded.
BoundarySurfaceFace
Enum to describe the position of the BoundarySurface respectively to the frame orientatin of the volu...
@ z
global position (cartesian)
Definition ParamDefs.h:57
BinningType
, BinningOption & BinningAccess
Definition BinningType.h:31
@ arbitrary
Definition BinningType.h:34