ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_DetectorFactory.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 "GeoModelKernel/GeoFullPhysVol.h"
14#include <string>
15#include <map>
16#include <array>
17#include <memory>
18
19namespace InDetDD {
21 class SiCommonItems;
22}
23
24class GeoTube ;
25class GeoPhysVol;
28
30 double rMid{};
31 double rOuter{};
32 double disk1Rotation{};
33 double disk2Rotation{};
34 double rowSpaceSide{};
40};
41
43 double x{};
44 double y{};
45 double phiRotation{};
46 // below for backward compatibilty
47 bool flipped{};
48 int row{};
49 int el_in_row{};
50};
51
53 std::string name;
54 double rMin{};
55 double rMax{};
56 double zHalf{};
57 double zOffsetLocal{};
58 std::string material;
59};
60
62 std::string name;
63 double xHalf{};
64 double yHalf{};
65 double zHalf{};
66 double zOffsetLocal{};
67 std::string material;
68};
69
70typedef std::array<std::vector<ModulePosition>,21> PositionsInQuadrant;
71
72
74public:
76 virtual ~HGTD_DetectorFactory();
77
78 // Creation of geometry:
79 virtual void create(GeoPhysVol* world) override;
80
81 // Access to the results:
82 virtual const HGTD_DetectorManager* getDetectorManager() const override;
83
84 void setPrintIdentifierDict( bool );
85
86private:
87 // Copy and assignments operations illegal and so are made private
90
92 GeoLogVol* buildEndcapLogicalVolume(bool isPositiveSide);
93 GeoVPhysVol* build( const GeoLogVol* logicalEnvelope, bool bPos);
94
96
97 // below 3 members prepare 3-ring vs 2-ring layout controlled implicitly by geomVersion
98 std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants( unsigned int ) ;
99 PositionsInQuadrant prepareQuadrantsFromRows( int layer, unsigned int maxRow );
100 std::string formModuleName( int layer, int quadrant, unsigned int maxrows, int row, int mod,
101 const ModulePosition& module, double & myx, double & myy, double & myrot,
102 int & phi, int & eta ) ;
103
104 // 3-ring layout
106 std::vector< ModulePosition > prepareModulePositionsInRowThreeRing( int row, int back = 0 );
107 int reorderRows( PositionsInQuadrant* quadrant );
108
109 // 2-ring layout
110 std::vector<ModulePosition> prepareModulePositionsInRowTwoRing(int row, bool back = false);
111
112 void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 >& arr);
113
117
119
120 // whether print number of modules per row for to the input for Identifier dictionary
122
123 std::map<std::string,GeoCylVolParams> m_cylVolPars;
124 std::map<std::string,GeoBoxVolParams> m_boxVolPars;
126
127 std::unique_ptr<const InDetDD::SiCommonItems> m_commonItems{};
128};
129
130#endif // HGTD_GEOMODEL_HGTD_DETECTORFACTORY_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::array< std::vector< ModulePosition >, 21 > PositionsInQuadrant
GeoLogVol * buildEndcapLogicalVolume(bool isPositiveSide)
virtual void create(GeoPhysVol *world) override
InDetDD::HGTD_ModuleDesign * createHgtdDesign(double thickness)
PositionsInQuadrant prepareQuadrantsFromRows(int layer, unsigned int maxRow)
int reorderRows(PositionsInQuadrant *quadrant)
HGTD_DetectorFactory(HGTD_DetectorFactory &right)
HGTD_GeoModelAthenaComps * m_athComps
PositionsInQuadrant mirrorModulesInQuadrant(const PositionsInQuadrant &)
std::vector< ModulePosition > prepareModulePositionsInRowTwoRing(int row, bool back=false)
std::vector< ModulePosition > prepareModulePositionsInRowThreeRing(int row, int back=0)
std::map< std::string, GeoBoxVolParams > m_boxVolPars
HGTD_DetectorManager * m_detectorManager
GeoVPhysVol * build(const GeoLogVol *logicalEnvelope, bool bPos)
std::unique_ptr< const InDetDD::SiCommonItems > m_commonItems
StoredMaterialManager * m_materialMgr
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)
HGTD_DetectorFactory & operator=(HGTD_DetectorFactory &right)
virtual const HGTD_DetectorManager * getDetectorManager() const override
std::map< std::string, GeoCylVolParams > m_cylVolPars
HGTD_DetectorFactory(HGTD_GeoModelAthenaComps *athenaComps)
void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 > &arr)
std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants(unsigned int)
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
Class to hold various Athena components.
Class used to describe the design of a module (diode segmentation and readout scheme)
Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool ...
This class holds one or more material managers and makes them storeable, under StoreGate.
Message Stream Member.