ATLAS Offline Software
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 
26 namespace Trk {
27 
28 class ILayerArrayCreator;
29 class ITrackingVolumeArrayCreator;
30 class ITrackingVolumeHelper;
31 class Layer;
32 class CylinderLayer;
33 class DiscLayer;
34 class TrackingVolume;
35 class VolumeBounds;
36 class CylinderVolumeBounds;
37 class Material;
38 
48  : public AthAlgTool
49  , virtual public ITrackingVolumeCreator
50 {
51 
52 public:
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,
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 
129 private:
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 
150  (TrackingVolume& tVolume,
151  bool rBinned,
152  bool buildBoundaryLayers,
153  bool replaceBoundaryFace = false) const;
154 
156  void addFaceVolumes(TrackingVolume& tvol,
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 
177  DiscLayer* createDiscLayer(double z,
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 
Trk::ILayerArrayCreator
Definition: ILayerArrayCreator.h:42
beamspotman.r
def r
Definition: beamspotman.py:676
Trk::CylinderVolumeCreator::addFaceVolumes
void addFaceVolumes(TrackingVolume &tvol, Trk::BoundarySurfaceFace bsf, std::vector< Trk::TrackingVolume * > &vols) const
Private method - helper method not to duplicate code.
Definition: CylinderVolumeCreator.cxx:714
Trk::CylinderVolumeCreator::~CylinderVolumeCreator
~CylinderVolumeCreator()
Destructor.
Trk::CylinderVolumeCreator::createDiscLayer
DiscLayer * createDiscLayer(double z, double rMin, double rMax, double thickness, int binsPhi, int binsR) const
Private method - helper method to save some code.
Definition: CylinderVolumeCreator.cxx:867
Trk::CylinderVolumeCreator::createCylinderLayer
CylinderLayer * createCylinderLayer(double z, double r, double halflength, double thickness, int binsPhi, int binsZ) const
Private method - helper method to save some code.
Definition: CylinderVolumeCreator.cxx:812
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
Trk::CylinderVolumeCreator::CylinderVolumeCreator
CylinderVolumeCreator(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: CylinderVolumeCreator.cxx:33
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
Trk::CylinderVolumeCreator::initialize
virtual StatusCode initialize() override
AlgTool initialize method.
Definition: CylinderVolumeCreator.cxx:59
ChangeHistoRange.binsZ
list binsZ
Definition: ChangeHistoRange.py:63
Trk::CylinderVolumeCreator::m_passiveLayerPhiBins
int m_passiveLayerPhiBins
bins in phi for the passive layer
Definition: CylinderVolumeCreator.h:193
Trk::BinningType
BinningType
Definition: BinningType.h:31
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::CylinderVolumeCreator::m_trackingVolumeArrayCreator
ToolHandle< ITrackingVolumeArrayCreator > m_trackingVolumeArrayCreator
TrackingVolume helper.
Definition: CylinderVolumeCreator.h:188
Trk::CylinderVolumeCreator::estimateAndCheckDimension
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,...
Definition: CylinderVolumeCreator.cxx:472
Trk::BoundarySurfaceFace
BoundarySurfaceFace
Definition: BoundarySurfaceFace.h:31
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::arbitrary
@ arbitrary
Definition: BinningType.h:34
Trk::CylinderVolumeCreator::glueTrackingVolumes
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.
Definition: CylinderVolumeCreator.cxx:742
GeoPrimitives.h
Trk::VolumeBounds
Definition: VolumeBounds.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
Trk::CylinderVolumeCreator::createContainerTrackingVolume
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
Definition: CylinderVolumeCreator.cxx:344
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthAlgTool.h
ITrackingVolumeCreator.h
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Trk::DiscLayer
Definition: DiscLayer.h:45
Trk::ITrackingVolumeCreator
Definition: ITrackingVolumeCreator.h:41
Trk::CylinderLayer
Definition: CylinderLayer.h:43
Trk::CylinderVolumeBounds
Definition: CylinderVolumeBounds.h:70
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::CylinderVolumeCreator::createGapTrackingVolume
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
Definition: CylinderVolumeCreator.cxx:244
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::ITrackingVolumeArrayCreator
Definition: ITrackingVolumeArrayCreator.h:44
Trk::CylinderVolumeCreator::m_trackingVolumeHelper
ToolHandle< ITrackingVolumeHelper > m_trackingVolumeHelper
Definition: CylinderVolumeCreator.h:190
BoundarySurfaceFace.h
Trk::CylinderVolumeCreator::createTrackingVolume
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
Definition: CylinderVolumeCreator.cxx:94
Trk::CylinderVolumeCreator
Definition: CylinderVolumeCreator.h:50
Trk::CylinderVolumeCreator::m_layerArrayCreator
ToolHandle< ILayerArrayCreator > m_layerArrayCreator
< A Tool for coherent LayerArray creation
Definition: CylinderVolumeCreator.h:186
Trk::CylinderVolumeCreator::m_passiveLayerThickness
double m_passiveLayerThickness
thickness of passive layers
Definition: CylinderVolumeCreator.h:192
Trk::CylinderVolumeCreator::m_passiveLayerRzBins
int m_passiveLayerRzBins
bins in r/z for the passive layer
Definition: CylinderVolumeCreator.h:194
Trk::Material
Definition: Material.h:116
AthAlgTool
Definition: AthAlgTool.h:26
Trk::ITrackingVolumeHelper
Definition: ITrackingVolumeHelper.h:42
checker_macros.h
Define macros for attributes used to control the static checker.
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Material
@ Material
Definition: MaterialTypes.h:8
Trk::CylinderVolumeCreator::interGlueTrackingVolume
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...
Definition: CylinderVolumeCreator.cxx:634
Trk::Layer
Definition: Layer.h:73