ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_DetectorFactory.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ALFAGEOMODEL_ALFADETECTORFACTORY_H
6#define ALFAGEOMODEL_ALFADETECTORFACTORY_H
7
8#include "ALFA_Geometry/ALFA_GeometryReader.h" //unique_ptr template
9#include "GeoModelKernel/GeoVDetectorFactory.h" //inheritance
10#include "ALFA_GeoModel/ALFA_DetectorManager.h" //covariant return type
11#include "CLHEP/Geometry/Transform3D.h"
12
13#include <string>
14#include <vector>
15#include <map>
16
17class StoreGateSvc;
19class IRDBRecordset;
20class GeoShape;
21class GeoPhysVol;
22class GeoFullPhysVol;
23class IRDBAccessSvc;
24class GeoAlignableTransform;
25
26typedef struct _ALFAPHYSVOLUME {
27 GeoFullPhysVol* pPhysVolume{};
28 HepGeom::Transform3D Transform;
30
31typedef struct _ALIGNPARAMETERS {
32 double fYOffset[RPOTSCNT] = {};
33 double fXOffset[RPOTSCNT] = {};
34 double fTheta[RPOTSCNT] = {};
36
38
39typedef struct _CONFIGURATION {
41
43 bool bAddIBP{};
44
45 std::vector<bool> bIsTransformInStation;
46 std::vector<bool> bIsTransformInDetector;
47 std::vector<double> pointTransformInDetectorB7L1U;
48 std::vector<double> pointTransformInDetectorB7L1L;
49 std::vector<double> pointTransformInDetectorA7L1U;
50 std::vector<double> pointTransformInDetectorA7L1L;
51 std::vector<double> pointTransformInDetectorB7R1U;
52 std::vector<double> pointTransformInDetectorB7R1L;
53 std::vector<double> pointTransformInDetectorA7R1U;
54 std::vector<double> pointTransformInDetectorA7R1L;
55 std::vector<double> vecTransformInDetectorB7L1U;
56 std::vector<double> vecTransformInDetectorB7L1L;
57 std::vector<double> vecTransformInDetectorA7L1U;
58 std::vector<double> vecTransformInDetectorA7L1L;
59 std::vector<double> vecTransformInDetectorB7R1U;
60 std::vector<double> vecTransformInDetectorB7R1L;
61 std::vector<double> vecTransformInDetectorA7R1U;
62 std::vector<double> vecTransformInDetectorA7R1L;
63 std::vector<double> vecTransformInStationB7L1U;
64 std::vector<double> vecTransformInStationB7L1L;
65 std::vector<double> vecTransformInStationA7L1U;
66 std::vector<double> vecTransformInStationA7L1L;
67 std::vector<double> vecTransformInStationB7R1U;
68 std::vector<double> vecTransformInStationB7R1L;
69 std::vector<double> vecTransformInStationA7R1U;
70 std::vector<double> vecTransformInStationA7R1L;
71
72 void clear();
74
75class ALFA_DetectorFactory : public GeoVDetectorFactory
76{
77 private:
78 // The managers:
82
85 std::unique_ptr<ALFA_GeometryReader> m_pGeoReader;
86 std::list<eRPotName> m_ListExistingRPots;
87 std::map<std::string,const GeoMaterial*> m_MapMaterials;
88
89
90 public:
91 ALFA_DetectorFactory(StoreGateSvc *pDetStore,IRDBAccessSvc *pAccess, const PCONFIGURATION pConfig);
93
94 // Creation of geometry:
95 virtual void create(GeoPhysVol *pWorld);
96 // Access to the results:
98
99 void UpdateTransforms(PALIGNPARAMETERS pAlignParams);
100 bool ReadGeometry(bool bAlignCorrections=false);
101
102 private:
103 // Illegal operations:
106
107 private:
108 void SaveGeometry();
109 void DefineMaterials (StoredMaterialManager* pMaterialManager);
110 void ConstructUFiberCladdings(const eRPotName eRPName, GeoFullPhysVol* pMotherVolume, const HepGeom::Transform3D& MotherTransform, GeoAlignableTransform* pDetTransform);
111 void ConstructVFiberCladdings(const eRPotName eRPName, GeoFullPhysVol* pMotherVolume, const HepGeom::Transform3D& MotherTransform, GeoAlignableTransform* pDetTransform);
112 void ConstructODFiberCladdings(const eRPotName eRPName, GeoFullPhysVol* pPhysMotherVolume, const HepGeom::Transform3D& MotherTransform, GeoAlignableTransform* pDetTransform);
113
114 void ConstructODFibers00(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol* pMotherVolume, const HepGeom::Transform3D& MotherTransform, const HepGeom::Transform3D& TransODCladding);
115 void ConstructODFibers01(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol* pMotherVolume, const HepGeom::Transform3D& MotherTransform, const HepGeom::Transform3D& TransODCladding);
117 void CreateAxes(GeoPhysVol* pMotherVolume);
118 void ConstructAlfaStations(std::map<eAStationName,ALFAPHYSVOLUME>* pmapActiveStations, GeoPhysVol* pWorld);
119 void ConstructBeampipe(GeoPhysVol* pWorld);
120 void AddBeamPipeInStation(GeoFullPhysVol* pPhysStation, const char* pszStationLabel);
121 void AddGlobalVacuumSensorInStation(GeoFullPhysVol* pPhysStation, eAStationName eStatName);
122
123 GeoShape* CreateSolidRP();
124 GeoShape* CreateSolidAir();
125 GeoShape* CreateSolidTrigger();
126 GeoShape* CreateSolidRPSupport();
127 GeoShape* CreateSolidG10Shapes();
128 std::map<int,GeoShape*>* CreateSolidTiPlates();
129 std::map<int,GeoShape*>* CreateSolidODPlates();
130
131 private:
132 HepGeom::Transform3D UserTransformInDetector(eRPotName eRPName);
133 HepGeom::Transform3D UserTransformInStation(eRPotName eRPName);
134 HepGeom::Point3D<double> Point3DInDetector(eRPotName eRPName);
135};
136
137#endif
#define RPOTSCNT
struct _ALIGNPARAMETERS * PALIGNPARAMETERS
struct _CONFIGURATION * PCONFIGURATION
struct _CONFIGURATION CONFIGURATION
eTransformDeltaType
@ ETDT_RPTRANSFORM
struct _ALIGNPARAMETERS ALIGNPARAMETERS
struct _ALFAPHYSVOLUME ALFAPHYSVOLUME
struct _ALFAPHYSVOLUME * PALFAPHYSVOLUME
@ EMT_UNDEFINED
void AddGlobalVacuumSensorInStation(GeoFullPhysVol *pPhysStation, eAStationName eStatName)
ALFA_DetectorFactory(StoreGateSvc *pDetStore, IRDBAccessSvc *pAccess, const PCONFIGURATION pConfig)
virtual const ALFA_DetectorManager * getDetectorManager() const
void UpdateTransforms(PALIGNPARAMETERS pAlignParams)
HepGeom::Transform3D UserTransformInDetector(eRPotName eRPName)
HepGeom::Transform3D UserTransformInStation(eRPotName eRPName)
void AddBeamPipeInStation(GeoFullPhysVol *pPhysStation, const char *pszStationLabel)
HepGeom::Point3D< double > Point3DInDetector(eRPotName eRPName)
const ALFA_DetectorFactory & operator=(const ALFA_DetectorFactory &right)
void ConstructODFibers00(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
eMetrologyType m_eRequestedMetrologyType
void ConstructBeampipe(GeoPhysVol *pWorld)
ALFA_DetectorManager * m_pDetectorManager
void ConstructODFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pPhysMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
ALFA_DetectorFactory(const ALFA_DetectorFactory &right)
void ConstructVFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
std::map< std::string, const GeoMaterial * > m_MapMaterials
StoreGateSvc * m_pDetectorStore
void CreateAxes(GeoPhysVol *pMotherVolume)
void ConstructODFibers01(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
bool ReadGeometry(bool bAlignCorrections=false)
void ConstructAlfaStations(std::map< eAStationName, ALFAPHYSVOLUME > *pmapActiveStations, GeoPhysVol *pWorld)
std::unique_ptr< ALFA_GeometryReader > m_pGeoReader
std::map< int, GeoShape * > * CreateSolidTiPlates()
void DefineMaterials(StoredMaterialManager *pMaterialManager)
std::list< eRPotName > m_ListExistingRPots
std::map< int, GeoShape * > * CreateSolidODPlates()
IRDBAccessSvc * m_pIRDBAccess
virtual void create(GeoPhysVol *pWorld)
void ConstructUFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
IRDBRecordset is an abstract interface to the RDB Recordsets, which represent a snapshot of HVS-tagge...
The Athena Transient Store API.
This class holds one or more material managers and makes them storeable, under StoreGate.
HepGeom::Transform3D Transform
GeoFullPhysVol * pPhysVolume
double fTheta[RPOTSCNT]
double fYOffset[RPOTSCNT]
double fXOffset[RPOTSCNT]
std::vector< double > vecTransformInStationA7L1U
std::vector< double > vecTransformInStationB7L1U
std::vector< double > vecTransformInDetectorA7L1L
std::vector< double > vecTransformInDetectorA7R1L
std::vector< double > pointTransformInDetectorB7L1L
std::vector< double > vecTransformInStationB7L1L
std::vector< double > pointTransformInDetectorA7R1U
std::vector< double > vecTransformInStationB7R1L
std::vector< double > vecTransformInStationB7R1U
std::vector< double > vecTransformInStationA7R1U
std::vector< double > vecTransformInDetectorB7L1L
std::vector< double > pointTransformInDetectorA7L1L
std::vector< double > vecTransformInStationA7L1L
std::vector< double > pointTransformInDetectorB7R1U
std::vector< double > pointTransformInDetectorA7R1L
std::vector< double > vecTransformInDetectorB7R1U
std::vector< double > pointTransformInDetectorB7L1U
GEOMETRYCONFIGURATION GeometryConfig
std::vector< double > vecTransformInDetectorA7R1U
std::vector< double > vecTransformInDetectorB7L1U
std::vector< bool > bIsTransformInStation
std::vector< bool > bIsTransformInDetector
std::vector< double > pointTransformInDetectorB7R1L
std::vector< double > vecTransformInStationA7R1L
std::vector< double > pointTransformInDetectorA7L1U
std::vector< double > vecTransformInDetectorB7R1L
std::vector< double > vecTransformInDetectorA7L1U