ATLAS Offline Software
Loading...
Searching...
No Matches
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//
12#include "GeoModelKernel/GeoFullPhysVol.h"
15#include <string>
16#include <map>
17#include <array>
18#include <memory>
19
20namespace InDetDD {
22 class SiCommonItems;
23}
24
25class GeoTube ;
26class GeoPhysVol;
29
31 double rMid{};
32 double rOuter{};
33 double disk1Rotation{};
34 double disk2Rotation{};
35 double rowSpaceSide{};
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
71typedef std::array<std::vector<ModulePosition>,21> PositionsInQuadrant;
72
73
75public:
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
87private:
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
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
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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
defines an "iterator" over instances of a given type in StoreGateSvc
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.