ATLAS Offline Software
HGTD_DetectorFactory.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HGTD_GEOMODEL_HGTD_DETECTORFACTORY_H
6 #define HGTD_GEOMODEL_HGTD_DETECTORFACTORY_H
7 //
8 // Main class for building the GeoModel geometry, and handle the GeometryManager and
9 // DetectorManager.
10 //
11 #include "StoreGate/DataHandle.h"
12 #include "GeoModelKernel/GeoFullPhysVol.h"
15 #include <string>
16 #include <map>
17 #include <array>
18 #include <memory>
19 
20 namespace InDetDD {
21  class HGTD_ModuleDesign;
22  class SiCommonItems;
23 }
24 
25 class GeoTube ;
26 class GeoPhysVol;
29 
30 struct HgtdGeoParams {
31  double rMid{};
32  double rOuter{};
33  double disk1Rotation{};
34  double disk2Rotation{};
35  double rowSpaceSide{};
38  double moduleSpaceInner{};
39  double moduleSpaceOuter{};
40  double flexSheetSpacing{};
41 };
42 
44  double x{};
45  double y{};
46  double phiRotation{};
47  // below for backward compatibilty
48  bool flipped{};
49  int row{};
50  int el_in_row{};
51 };
52 
54  std::string name;
55  double rMin{};
56  double rMax{};
57  double zHalf{};
58  double zOffsetLocal{};
59  std::string material;
60 };
61 
63  std::string name;
64  double xHalf{};
65  double yHalf{};
66  double zHalf{};
67  double zOffsetLocal{};
68  std::string material;
69 };
70 
71 typedef std::array<std::vector<ModulePosition>,21> PositionsInQuadrant;
72 
73 
75 public:
77  virtual ~HGTD_DetectorFactory();
78 
79  // Creation of geometry:
80  virtual void create(GeoPhysVol* world) override;
81 
82  // Access to the results:
83  virtual const HGTD_DetectorManager* getDetectorManager() const override;
84 
85  void setPrintIdentifierDict( bool );
86 
87 private:
88  // Copy and assignments operations illegal and so are made private
91 
93  GeoLogVol* buildEndcapLogicalVolume(bool isPositiveSide);
94  GeoVPhysVol* build( const GeoLogVol* logicalEnvelope, bool bPos);
95 
96  InDetDD::HGTD_ModuleDesign* createHgtdDesign( double thickness );
97 
98  // below 3 members prepare 3-ring vs 2-ring layout controlled implicitly by geomVersion
99  std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants( unsigned int ) ;
100  PositionsInQuadrant prepareQuadrantsFromRows( int layer, unsigned int maxRow );
101  std::string formModuleName( int layer, int quadrant, unsigned int maxrows, int row, int mod,
102  const ModulePosition& module, double & myx, double & myy, double & myrot,
103  int & phi, int & eta ) ;
104 
105  // 3-ring layout
107  std::vector< ModulePosition > prepareModulePositionsInRowThreeRing( int row, int back = 0 );
108  int reorderRows( PositionsInQuadrant* quadrant );
109 
110  // 2-ring layout
111  std::vector<ModulePosition> prepareModulePositionsInRowTwoRing(int row, bool back = false);
112 
113  void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 >& arr);
114 
118 
120 
121  // whether print number of modules per row for to the input for Identifier dictionary
122  bool m_outputIdfr{};
123 
124  std::map<std::string,GeoCylVolParams> m_cylVolPars;
125  std::map<std::string,GeoBoxVolParams> m_boxVolPars;
127 
128  std::unique_ptr<const InDetDD::SiCommonItems> m_commonItems{};
129 };
130 
131 #endif // HGTD_GEOMODEL_HGTD_DETECTORFACTORY_H
query_example.row
row
Definition: query_example.py:24
HGTD_GeoModelAthenaComps
Class to hold various Athena components.
Definition: HGTD_GeoModelAthenaComps.h:14
GeoCylVolParams::rMin
double rMin
Definition: HGTD_DetectorFactory.h:55
InDetDD::DetectorFactoryBase
Definition: InDetDetectorFactoryBase.h:20
HGTD_DetectorFactory::reorderRows
int reorderRows(PositionsInQuadrant *quadrant)
Definition: HGTD_DetectorFactory.cxx:1005
GeoCylVolParams::name
std::string name
Definition: HGTD_DetectorFactory.h:54
HGTD_DetectorFactory::build
GeoVPhysVol * build(const GeoLogVol *logicalEnvelope, bool bPos)
Definition: HGTD_DetectorFactory.cxx:297
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
HgtdGeoParams::disk2Rotation
double disk2Rotation
Definition: HGTD_DetectorFactory.h:34
HGTD_DetectorFactory::m_athComps
HGTD_GeoModelAthenaComps * m_athComps
Definition: HGTD_DetectorFactory.h:116
GeoCylVolParams
Definition: HGTD_DetectorFactory.h:53
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
HGTD_DetectorFactory::mirrorModulesInQuadrant
PositionsInQuadrant mirrorModulesInQuadrant(const PositionsInQuadrant &)
Definition: HGTD_DetectorFactory.cxx:833
ModulePosition::phiRotation
double phiRotation
Definition: HGTD_DetectorFactory.h:46
GeoBoxVolParams::yHalf
double yHalf
Definition: HGTD_DetectorFactory.h:65
HGTD_DetectorFactory::operator=
HGTD_DetectorFactory & operator=(HGTD_DetectorFactory &right)
HGTD_DetectorFactory::m_cylVolPars
std::map< std::string, GeoCylVolParams > m_cylVolPars
Definition: HGTD_DetectorFactory.h:124
HgtdGeoParams::rowSpaceSide
double rowSpaceSide
Definition: HGTD_DetectorFactory.h:35
HGTD_DetectorFactory::HGTD_DetectorFactory
HGTD_DetectorFactory(HGTD_GeoModelAthenaComps *athenaComps)
Definition: HGTD_DetectorFactory.cxx:59
GeoBoxVolParams::name
std::string name
Definition: HGTD_DetectorFactory.h:63
PositionsInQuadrant
std::array< std::vector< ModulePosition >, 21 > PositionsInQuadrant
Definition: HGTD_DetectorFactory.h:71
HGTD_DetectorFactory::m_geomVersion
int m_geomVersion
Definition: HGTD_DetectorFactory.h:119
GeoBoxVolParams
Definition: HGTD_DetectorFactory.h:62
HgtdGeoParams::moduleSpaceInner
double moduleSpaceInner
Definition: HGTD_DetectorFactory.h:38
HgtdGeoParams::flexSheetSpacing
double flexSheetSpacing
Definition: HGTD_DetectorFactory.h:40
HGTD_DetectorFactory::setPrintIdentifierDict
void setPrintIdentifierDict(bool)
Definition: HGTD_DetectorFactory.cxx:83
DataHandle.h
HGTD_DetectorManager.h
HGTD_DetectorFactory::prepareLayersFromQuadrants
std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants(unsigned int)
Definition: HGTD_DetectorFactory.cxx:736
GeoBoxVolParams::zHalf
double zHalf
Definition: HGTD_DetectorFactory.h:66
HGTD_DetectorFactory::m_commonItems
std::unique_ptr< const InDetDD::SiCommonItems > m_commonItems
Definition: HGTD_DetectorFactory.h:128
GeoBoxVolParams::zOffsetLocal
double zOffsetLocal
Definition: HGTD_DetectorFactory.h:67
python.PyAthena.module
module
Definition: PyAthena.py:131
HGTD_DetectorFactory::buildEndcapLogicalVolume
GeoLogVol * buildEndcapLogicalVolume(bool isPositiveSide)
Definition: HGTD_DetectorFactory.cxx:282
ModulePosition
Definition: HGTD_DetectorFactory.h:43
HgtdGeoParams::moduleSpaceOuter
double moduleSpaceOuter
Definition: HGTD_DetectorFactory.h:39
HgtdGeoParams
Definition: HGTD_DetectorFactory.h:30
HGTD_DetectorFactory::m_outputIdfr
bool m_outputIdfr
Definition: HGTD_DetectorFactory.h:122
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
ModulePosition::y
double y
Definition: HGTD_DetectorFactory.h:45
HGTD_DetectorFactory::m_detectorManager
HGTD_DetectorManager * m_detectorManager
Definition: HGTD_DetectorFactory.h:115
GeoCylVolParams::rMax
double rMax
Definition: HGTD_DetectorFactory.h:56
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
HGTD_DetectorFactory::prepareModulePositionsInRowTwoRing
std::vector< ModulePosition > prepareModulePositionsInRowTwoRing(int row, bool back=false)
Definition: HGTD_DetectorFactory.cxx:1075
HGTD_DetectorFactory
Definition: HGTD_DetectorFactory.h:74
HGTD_DetectorFactory::HGTD_DetectorFactory
HGTD_DetectorFactory(HGTD_DetectorFactory &right)
ModulePosition::flipped
bool flipped
Definition: HGTD_DetectorFactory.h:48
HGTD_DetectorFactory::m_materialMgr
StoredMaterialManager * m_materialMgr
Definition: HGTD_DetectorFactory.h:117
ModulePosition::x
double x
Definition: HGTD_DetectorFactory.h:44
GeoCylVolParams::zHalf
double zHalf
Definition: HGTD_DetectorFactory.h:57
GeoBoxVolParams::material
std::string material
Definition: HGTD_DetectorFactory.h:68
HgtdGeoParams::rMid
double rMid
Definition: HGTD_DetectorFactory.h:31
HGTD_DetectorFactory::createHgtdDesign
InDetDD::HGTD_ModuleDesign * createHgtdDesign(double thickness)
Definition: HGTD_DetectorFactory.cxx:1035
GeoBoxVolParams::xHalf
double xHalf
Definition: HGTD_DetectorFactory.h:64
HGTD_DetectorFactory::m_hgtdPars
HgtdGeoParams m_hgtdPars
Definition: HGTD_DetectorFactory.h:126
HGTD_DetectorFactory::prepareModulePositionsInRowThreeRing
std::vector< ModulePosition > prepareModulePositionsInRowThreeRing(int row, int back=0)
Definition: HGTD_DetectorFactory.cxx:852
HGTD_DetectorFactory::~HGTD_DetectorFactory
virtual ~HGTD_DetectorFactory()
Definition: HGTD_DetectorFactory.cxx:79
GeoCylVolParams::material
std::string material
Definition: HGTD_DetectorFactory.h:59
HgtdGeoParams::disk1Rotation
double disk1Rotation
Definition: HGTD_DetectorFactory.h:33
GeoCylVolParams::zOffsetLocal
double zOffsetLocal
Definition: HGTD_DetectorFactory.h:58
ModulePosition::row
int row
Definition: HGTD_DetectorFactory.h:49
HGTD_DetectorFactory::m_boxVolPars
std::map< std::string, GeoBoxVolParams > m_boxVolPars
Definition: HGTD_DetectorFactory.h:125
HgtdGeoParams::rowBacksideInnerShift
double rowBacksideInnerShift
Definition: HGTD_DetectorFactory.h:36
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDetectorFactoryBase.h
HGTD_DetectorFactory::getDetectorManager
virtual const HGTD_DetectorManager * getDetectorManager() const override
Definition: HGTD_DetectorFactory.cxx:1070
HGTD_DetectorFactory::initializeGeoParameters
void initializeGeoParameters()
Definition: HGTD_DetectorFactory.cxx:129
HGTD_DetectorFactory::formModuleName
std::string formModuleName(int layer, int quadrant, unsigned int maxrows, int row, int mod, const ModulePosition &module, double &myx, double &myy, double &myrot, int &phi, int &eta)
Definition: HGTD_DetectorFactory.cxx:768
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
HGTD_DetectorFactory::prepareQuadrantsFromRows
PositionsInQuadrant prepareQuadrantsFromRows(int layer, unsigned int maxRow)
Definition: HGTD_DetectorFactory.cxx:811
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
InDetDD::HGTD_ModuleDesign
Definition: HGTD_ModuleDesign.h:43
HGTD_DetectorFactory::create
virtual void create(GeoPhysVol *world) override
Definition: HGTD_DetectorFactory.cxx:88
HgtdGeoParams::rOuter
double rOuter
Definition: HGTD_DetectorFactory.h:32
ModulePosition::el_in_row
int el_in_row
Definition: HGTD_DetectorFactory.h:50
HgtdGeoParams::rowBacksideOuterShift
double rowBacksideOuterShift
Definition: HGTD_DetectorFactory.h:37
HGTD_DetectorFactory::mirrorPositionsAroundYaxis
void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 > &arr)
Definition: HGTD_DetectorFactory.cxx:1024