ATLAS Offline Software
Loading...
Searching...
No Matches
CylinderVolumeCreator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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
16// Amg
18// Gaudi & Athena
20#include "GaudiKernel/ToolHandle.h"
21// STL
22#include <string>
23#include <vector>
24
26namespace Trk {
27
31class Layer;
32class CylinderLayer;
33class DiscLayer;
34class TrackingVolume;
35class VolumeBounds;
37class Material;
38
46
48 : public AthAlgTool
49 , virtual public ITrackingVolumeCreator
50{
51
52public:
54 CylinderVolumeCreator(const std::string&,
55 const std::string&,
56 const IInterface*);
59
61 virtual StatusCode initialize() override;
62
68 const std::vector<Layer*>& layers,
69 Material& matprop,
70 VolumeBounds* volBounds = 0,
71 Amg::Transform3D* transform = 0,
72 const std::string& volumeName = "UndefinedVolume",
73 BinningType btype = arbitrary) const override final;
74
80 const std::vector<Layer*>& layers,
81 Material& matprop,
82 double loc1Min,
83 double loc1Max,
84 double loc2Min,
85 double loc2Max,
86 const std::string& volumeName = "UndefinedVolume",
87 BinningType btype = arbitrary) const override final;
88
94 Material& matprop,
95 double rMin,
96 double rMax,
97 double zMin,
98 double zMax,
99 unsigned int materialLayers,
100 bool cylinder = true,
101 const std::string& volumeName = "UndefinedVolume") const override final;
102
108 Material& matprop,
109 double rMin,
110 double rMax,
111 double zMin,
112 double zMax,
113 const std::vector<double>& layerPositions,
114 bool cylinder = true,
115 const std::string& volumeName = "UndefinedVolume",
116 BinningType btype = arbitrary) const override final;
117
123 (const std::vector<TrackingVolume*>& volumes,
124 const Material& matprop,
125 const std::string& volumeName = "UndefinedVolume",
126 bool buildBoundaryLayers = false,
127 bool replaceBoundaryFace = false) const override final;
128
129private:
134
135 StatusCode estimateAndCheckDimension(
136 const std::vector<Layer*>& layers,
137 Trk::CylinderVolumeBounds*& cylBounds,
138 Amg::Transform3D*& translation,
139 std::vector<CylinderLayer*>& cylLayers,
140 std::vector<DiscLayer*>& discLayers,
141 double& rMinClean,
142 double& rMaxClean,
143 double& zMinClean,
144 double& zMaxClean,
145 BinningType bType = arbitrary) const;
146
149 StatusCode interGlueTrackingVolume
150 (TrackingVolume& tVolume,
151 bool rBinned,
152 bool buildBoundaryLayers,
153 bool replaceBoundaryFace = false) const;
154
158 std::vector<Trk::TrackingVolume*>& vols) const;
159
161 void glueTrackingVolumes(TrackingVolume& volumeOne,
162 BoundarySurfaceFace faceOne,
163 TrackingVolume& volumeTwo,
164 BoundarySurfaceFace faceTwo,
165 bool buildBoundaryLayers,
166 bool replaceBoundaryFace = false) const;
167
170 double r,
171 double halflength,
172 double thickness,
173 int binsPhi,
174 int binsZ) const;
175
178 double rMin,
179 double rMax,
180 double thickness,
181 int binsPhi,
182 int binsR) const;
183
184 // helper tools
191
195};
196}
197
198#endif
199
Eigen::Affine3d Transform3D
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.
double m_passiveLayerThickness
thickness of passive layers
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
;
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.
int m_passiveLayerPhiBins
bins in phi for the passive layer
int m_passiveLayerRzBins
bins in r/z for the passive layer
virtual StatusCode initialize() override
AlgTool initialize method.
~CylinderVolumeCreator()
Destructor.
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 ILayerArrayCreators It inherits from IAlgTool.
Interface class ITrackingVolumeArrayCreators It inherits from IAlgTool.
Interface class ITrackingVolumeCreators It inherits from IAlgTool.
Interface class ITrackingVolumeHelpers 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
Definition of ATLAS Math & Geometry primitives (Amg)
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
STL namespace.
#define private