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 
16 namespace InDetDD {
17  class HGTD_ModuleDesign;
18  class SiCommonItems;
19 }
20 
21 class GeoTube ;
22 class GeoPhysVol;
25 
26 struct HgtdGeoParams {
27  double rMid;
28  double rOuter;
29  double disk1Rotation;
30  double disk2Rotation;
31  double rowSpaceSide;
37 };
38 
40  double x;
41  double y;
42  double phiRotation;
43  // below for backward compatibilty
44  bool flipped;
45  int row;
46  int el_in_row;
47 };
48 
50  std::string name;
51  double rMin;
52  double rMax;
53  double zHalf;
54  double zOffsetLocal;
55  std::string material;
56 };
57 
59  std::string name;
60  double xHalf;
61  double yHalf;
62  double zHalf;
63  double zOffsetLocal;
64  std::string material;
65 };
66 
67 typedef std::array<std::vector<ModulePosition>,21> PositionsInQuadrant;
68 
69 
71 public:
73  virtual ~HGTD_DetectorFactory();
74 
75  // Creation of geometry:
76  virtual void create(GeoPhysVol* world) override;
77 
78  // Access to the results:
79  virtual const HGTD_DetectorManager* getDetectorManager() const override;
80 
81  void setPrintIdentifierDict( bool );
82 
83 private:
84  // Copy and assignments operations illegal and so are made private
87 
89  GeoLogVol* buildEndcapLogicalVolume(bool isPositiveSide);
90  GeoVPhysVol* build( const GeoLogVol* logicalEnvelope, bool bPos);
91 
92  InDetDD::HGTD_ModuleDesign* createHgtdDesign( double thickness );
93 
94  // below 3 members prepare 3-ring vs 2-ring layout controlled implicitly by geomVersion
95  std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants( unsigned int ) ;
96  PositionsInQuadrant prepareQuadrantsFromRows( int layer, unsigned int maxRow );
97  std::string formModuleName( int layer, int quadrant, unsigned int maxrows, int row, int mod,
98  const ModulePosition& module, double & myx, double & myy, double & myrot,
99  int & phi, int & eta ) ;
100 
101  // 3-ring layout
103  std::vector< ModulePosition > prepareModulePositionsInRowThreeRing( int row, int back = 0 );
104  int reorderRows( PositionsInQuadrant* quadrant );
105 
106  // 2-ring layout
107  std::vector<ModulePosition> prepareModulePositionsInRowTwoRing(int row, bool back = false);
108 
109  void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 >& arr);
110 
114 
116 
117  // whether print number of modules per row for to the input for Identifier dictionary
119 
120  std::map<std::string,GeoCylVolParams> m_cylVolPars;
121  std::map<std::string,GeoBoxVolParams> m_boxVolPars;
123 
124  std::unique_ptr<const InDetDD::SiCommonItems> m_commonItems;
125 };
126 
127 #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:51
InDetDD::DetectorFactoryBase
Definition: InDetDetectorFactoryBase.h:20
HGTD_DetectorFactory::reorderRows
int reorderRows(PositionsInQuadrant *quadrant)
Definition: HGTD_DetectorFactory.cxx:1002
GeoCylVolParams::name
std::string name
Definition: HGTD_DetectorFactory.h:50
HGTD_DetectorFactory::build
GeoVPhysVol * build(const GeoLogVol *logicalEnvelope, bool bPos)
Definition: HGTD_DetectorFactory.cxx:296
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
HgtdGeoParams::disk2Rotation
double disk2Rotation
Definition: HGTD_DetectorFactory.h:30
HGTD_DetectorFactory::m_athComps
HGTD_GeoModelAthenaComps * m_athComps
Definition: HGTD_DetectorFactory.h:112
GeoCylVolParams
Definition: HGTD_DetectorFactory.h:49
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ModulePosition::phiRotation
double phiRotation
Definition: HGTD_DetectorFactory.h:42
GeoBoxVolParams::yHalf
double yHalf
Definition: HGTD_DetectorFactory.h:61
HGTD_DetectorFactory::operator=
HGTD_DetectorFactory & operator=(HGTD_DetectorFactory &right)
HGTD_DetectorFactory::m_cylVolPars
std::map< std::string, GeoCylVolParams > m_cylVolPars
Definition: HGTD_DetectorFactory.h:120
HgtdGeoParams::rowSpaceSide
double rowSpaceSide
Definition: HGTD_DetectorFactory.h:31
HGTD_DetectorFactory::HGTD_DetectorFactory
HGTD_DetectorFactory(HGTD_GeoModelAthenaComps *athenaComps)
Definition: HGTD_DetectorFactory.cxx:58
GeoBoxVolParams::name
std::string name
Definition: HGTD_DetectorFactory.h:59
PositionsInQuadrant
std::array< std::vector< ModulePosition >, 21 > PositionsInQuadrant
Definition: HGTD_DetectorFactory.h:67
HGTD_DetectorFactory::m_geomVersion
int m_geomVersion
Definition: HGTD_DetectorFactory.h:115
GeoBoxVolParams
Definition: HGTD_DetectorFactory.h:58
HgtdGeoParams::moduleSpaceInner
double moduleSpaceInner
Definition: HGTD_DetectorFactory.h:34
HgtdGeoParams::flexSheetSpacing
double flexSheetSpacing
Definition: HGTD_DetectorFactory.h:36
HGTD_DetectorFactory::setPrintIdentifierDict
void setPrintIdentifierDict(bool)
Definition: HGTD_DetectorFactory.cxx:82
DataHandle.h
HGTD_DetectorManager.h
HGTD_DetectorFactory::prepareLayersFromQuadrants
std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants(unsigned int)
Definition: HGTD_DetectorFactory.cxx:733
GeoBoxVolParams::zHalf
double zHalf
Definition: HGTD_DetectorFactory.h:62
HGTD_DetectorFactory::m_commonItems
std::unique_ptr< const InDetDD::SiCommonItems > m_commonItems
Definition: HGTD_DetectorFactory.h:124
GeoBoxVolParams::zOffsetLocal
double zOffsetLocal
Definition: HGTD_DetectorFactory.h:63
python.PyAthena.module
module
Definition: PyAthena.py:134
HGTD_DetectorFactory::buildEndcapLogicalVolume
GeoLogVol * buildEndcapLogicalVolume(bool isPositiveSide)
Definition: HGTD_DetectorFactory.cxx:281
ModulePosition
Definition: HGTD_DetectorFactory.h:39
HgtdGeoParams::moduleSpaceOuter
double moduleSpaceOuter
Definition: HGTD_DetectorFactory.h:35
HgtdGeoParams
Definition: HGTD_DetectorFactory.h:26
HGTD_DetectorFactory::m_outputIdfr
bool m_outputIdfr
Definition: HGTD_DetectorFactory.h:118
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
ModulePosition::y
double y
Definition: HGTD_DetectorFactory.h:41
HGTD_DetectorFactory::m_detectorManager
HGTD_DetectorManager * m_detectorManager
Definition: HGTD_DetectorFactory.h:111
GeoCylVolParams::rMax
double rMax
Definition: HGTD_DetectorFactory.h:52
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
HGTD_DetectorFactory::prepareModulePositionsInRowTwoRing
std::vector< ModulePosition > prepareModulePositionsInRowTwoRing(int row, bool back=false)
Definition: HGTD_DetectorFactory.cxx:1072
HGTD_DetectorFactory
Definition: HGTD_DetectorFactory.h:70
HGTD_DetectorFactory::HGTD_DetectorFactory
HGTD_DetectorFactory(HGTD_DetectorFactory &right)
ModulePosition::flipped
bool flipped
Definition: HGTD_DetectorFactory.h:44
HGTD_DetectorFactory::m_materialMgr
StoredMaterialManager * m_materialMgr
Definition: HGTD_DetectorFactory.h:113
ModulePosition::x
double x
Definition: HGTD_DetectorFactory.h:40
GeoCylVolParams::zHalf
double zHalf
Definition: HGTD_DetectorFactory.h:53
GeoBoxVolParams::material
std::string material
Definition: HGTD_DetectorFactory.h:64
HGTD_DetectorFactory::mirrorModulesInQuadrant
PositionsInQuadrant mirrorModulesInQuadrant(PositionsInQuadrant)
Definition: HGTD_DetectorFactory.cxx:830
HgtdGeoParams::rMid
double rMid
Definition: HGTD_DetectorFactory.h:27
HGTD_DetectorFactory::createHgtdDesign
InDetDD::HGTD_ModuleDesign * createHgtdDesign(double thickness)
Definition: HGTD_DetectorFactory.cxx:1032
GeoBoxVolParams::xHalf
double xHalf
Definition: HGTD_DetectorFactory.h:60
HGTD_DetectorFactory::m_hgtdPars
HgtdGeoParams m_hgtdPars
Definition: HGTD_DetectorFactory.h:122
HGTD_DetectorFactory::prepareModulePositionsInRowThreeRing
std::vector< ModulePosition > prepareModulePositionsInRowThreeRing(int row, int back=0)
Definition: HGTD_DetectorFactory.cxx:849
HGTD_DetectorFactory::~HGTD_DetectorFactory
virtual ~HGTD_DetectorFactory()
Definition: HGTD_DetectorFactory.cxx:78
GeoCylVolParams::material
std::string material
Definition: HGTD_DetectorFactory.h:55
HgtdGeoParams::disk1Rotation
double disk1Rotation
Definition: HGTD_DetectorFactory.h:29
GeoCylVolParams::zOffsetLocal
double zOffsetLocal
Definition: HGTD_DetectorFactory.h:54
ModulePosition::row
int row
Definition: HGTD_DetectorFactory.h:45
HGTD_DetectorFactory::m_boxVolPars
std::map< std::string, GeoBoxVolParams > m_boxVolPars
Definition: HGTD_DetectorFactory.h:121
HgtdGeoParams::rowBacksideInnerShift
double rowBacksideInnerShift
Definition: HGTD_DetectorFactory.h:32
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDetectorFactoryBase.h
HGTD_DetectorFactory::getDetectorManager
virtual const HGTD_DetectorManager * getDetectorManager() const override
Definition: HGTD_DetectorFactory.cxx:1067
HGTD_DetectorFactory::initializeGeoParameters
void initializeGeoParameters()
Definition: HGTD_DetectorFactory.cxx:128
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:765
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
HGTD_DetectorFactory::prepareQuadrantsFromRows
PositionsInQuadrant prepareQuadrantsFromRows(int layer, unsigned int maxRow)
Definition: HGTD_DetectorFactory.cxx:808
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:87
HgtdGeoParams::rOuter
double rOuter
Definition: HGTD_DetectorFactory.h:28
ModulePosition::el_in_row
int el_in_row
Definition: HGTD_DetectorFactory.h:46
HgtdGeoParams::rowBacksideOuterShift
double rowBacksideOuterShift
Definition: HGTD_DetectorFactory.h:33
HGTD_DetectorFactory::mirrorPositionsAroundYaxis
void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 > &arr)
Definition: HGTD_DetectorFactory.cxx:1021