ATLAS Offline Software
AFP_GeoModelFactory.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 AFP_GeoModelFactory_h
6 #define AFP_GeoModelFactory_h 1
7 
9 #include "AFP_GeoModelManager.h" //covariant return type, needs defined inheritance
11 #include "GeoModelKernel/GeoIntrusivePtr.h"
12 #include "GeoModelKernel/GeoVDetectorFactory.h"
14 #include <string>
15 #include <map>
16 
17 class AFP_Geometry;
18 class StoreGateSvc;
19 class GeoOpticalSurface;
20 class GeoOpticalPhysVol;
21 class StatusCode;
22 
23 
24 #define SLIMCUT (0.01*CLHEP::mm)
25 
27  float fBpmMRRX, fBpmMRRY; //BPMR.6R1.B1 (231.535 m from IP)
28  float fBpmMRLX, fBpmMRLY; //BPMR.6L1.B2 (225.245 m from IP)
29  float fBpmSARX, fBpmSARY; //BPMSA.7R1.B1 (on ALFA station A7R1 237.7505 m from IP)
30  float fBpmSALX, fBpmSALY; //BPMSA.7L1.B2 (on ALFA station A7L1 237.7505 m from IP)
31 
32  float fBpmWBRX, fBpmWBRY; //BPMWB.4R1.B1 (151.0945 m from IP)
33  float fBpmYALX, fBpmYALY; //BPMYA.4L1.B2 (172.227 m from the IP)
34 };
35 
36 
37 
38 class AFP_GeoModelFactory : public GeoVDetectorFactory
39 {
40 
41 public:
42  AFP_GeoModelFactory(StoreGateSvc *pDetStore, AFP_Geometry* pGeometry);
44 
45  // Creation of geometry:
46  virtual void create(GeoPhysVol *world);
47 
48  // Access to the results:
49  virtual const AFP_GeoModelManager * getDetectorManager() const;
50  void updatePositions(AFP_BPMCOOLPARAMS* pBpmParams);
51 
52 private:
53  std::map<std::string, GeoRef<const GeoMaterial> > m_MapMaterials;
54 
55  void defineMaterials();
56 
57  // Illegal operations:
60 
61  // The manager:
64 
65  //common auxiliary map of solid shapes
66  std::map<std::string,const GeoShape*> m_MapShape;
69  const bool m_addSeparationWindow{};
70 
71  //Si detector part
72  GeoShape* createSolidSIDPlate();
73  void addSiDetector(GeoPhysVol* pPhysMotherVol, const char* pszStationName, HepGeom::Transform3D& TransInMotherVolume);
74  void addRomanPot(GeoPhysVol* pPhysMotherVol, const char* pszStationName, HepGeom::Transform3D& TransInMotherVolume);
75 
76  //TOF part
77  GeoIntrusivePtr<GeoOpticalSurface> m_pOpticalSurface{};
78  GeoIntrusivePtr<GeoOpticalSurface> m_pReflectionOptSurface{};
80  StatusCode addTimingDetector(const char* pszStationName, GeoOpticalPhysVol* pPhysMotherVol, HepGeom::Transform3D& TransInMotherVolume, GeoBorderSurfaceContainer* bsContainer);
81  void addLQBarSegment(const char* pszStationName, const int nQuarticID, const int nLQBarID,AFPTOF_LBARDIMENSIONS& LQBarDims, GeoOpticalPhysVol* pPhysMotherVolume, HepGeom::Transform3D& TransInMotherVolume, GeoBorderSurfaceContainer* bsContainer);
82  void addSepRadLBar(const char* pszStationName, const int nQuarticID, const int nBarID, GeoOpticalPhysVol* pPhysMotherVolume, HepGeom::Transform3D& TransInMotherVolume, GeoBorderSurfaceContainer* bsContainer);
83  HepGeom::Vector3D<double> getBarShift(AFPTOF_LBARDIMENSIONS& LQBarDims, eLBarType eSpecType=ELBT_UNDEFINED);
84  void addHorizontalArm(const char* pszStationName, const int nQuarticID, const int nLQBarID, AFPTOF_LBARDIMENSIONS& LQBarDims, GeoOpticalPhysVol* pPhysMotherVolume, HepGeom::Transform3D& PartialTransInMotherVolume, GeoBorderSurfaceContainer* bsContainer);
85  void addSensor(const char* pszStationName, const int nQuarticID, GeoOpticalPhysVol* pPhysMotherVolume, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer* bsContainer);
86  void addLBarSensorSeparationWindow(const char* pszStationName, const int nQuarticID, GeoOpticalPhysVol* pPhysMotherVolume, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer* bsContainer);
87  void getLQBarDimensions(const int nRowID, const int nColID, AFPTOF_LBARDIMENSIONS* pLQBarDims);
88 };
89 
90 // Class AFP_GeoModelFactory
91 #endif
92 
93 
GeoOpticalPhysVol
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoOpticalPhysVol.h:14
AFP_GeoModelFactory::~AFP_GeoModelFactory
~AFP_GeoModelFactory()
Definition: AFP_GeoModelFactory.cxx:50
AFP_BPMCOOLPARAMS::fBpmYALX
float fBpmYALX
Definition: AFP_GeoModelFactory.h:33
AFP_BPMCOOLPARAMS::fBpmMRLY
float fBpmMRLY
Definition: AFP_GeoModelFactory.h:28
GeoRef.h
Simple smart-pointer class for GeoModel objects.
AFP_GeoModelFactory::getBarShift
HepGeom::Vector3D< double > getBarShift(AFPTOF_LBARDIMENSIONS &LQBarDims, eLBarType eSpecType=ELBT_UNDEFINED)
AFP_BPMCOOLPARAMS::fBpmWBRY
float fBpmWBRY
Definition: AFP_GeoModelFactory.h:32
AFP_GeoModelFactory::m_pReflectionOptSurface
GeoIntrusivePtr< GeoOpticalSurface > m_pReflectionOptSurface
Definition: AFP_GeoModelFactory.h:78
AFP_GeoModelFactory::AFP_GeoModelFactory
AFP_GeoModelFactory(StoreGateSvc *pDetStore, AFP_Geometry *pGeometry)
Definition: AFP_GeoModelFactory.cxx:40
AFP_GeoModelFactory::addTimingDetector
StatusCode addTimingDetector(const char *pszStationName, GeoOpticalPhysVol *pPhysMotherVol, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer *bsContainer)
Definition: AFP_GeoModelTD.cxx:58
AFP_GeoModelFactory::addRomanPot
void addRomanPot(GeoPhysVol *pPhysMotherVol, const char *pszStationName, HepGeom::Transform3D &TransInMotherVolume)
Definition: AFP_GeoModelRP.cxx:60
AFP_ConfigParams.h
AFP_GeoModelFactory::m_pOpticalSurface
GeoIntrusivePtr< GeoOpticalSurface > m_pOpticalSurface
Definition: AFP_GeoModelFactory.h:77
AFP_BPMCOOLPARAMS::fBpmSARY
float fBpmSARY
Definition: AFP_GeoModelFactory.h:29
AFP_BPMCOOLPARAMS::fBpmSARX
float fBpmSARX
Definition: AFP_GeoModelFactory.h:29
AFP_GeoModelFactory
Definition: AFP_GeoModelFactory.h:39
eLBarType
eLBarType
Definition: AFP_ConfigParams.h:20
AFP_GeoModelFactory::addSepRadLBar
void addSepRadLBar(const char *pszStationName, const int nQuarticID, const int nBarID, GeoOpticalPhysVol *pPhysMotherVolume, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer *bsContainer)
Definition: AFP_GeoModelTD.cxx:91
GeoBorderSurfaceContainer.h
AFP_GeoModelFactory::createSolidSIDPlate
GeoShape * createSolidSIDPlate()
Definition: AFP_GeoModelSID.cxx:111
AFP_GeoModelFactory::m_CfgParams
AFP_CONFIGURATION m_CfgParams
Definition: AFP_GeoModelFactory.h:67
AFP_GeoModelFactory::m_MapShape
std::map< std::string, const GeoShape * > m_MapShape
Definition: AFP_GeoModelFactory.h:66
AFP_GeoModelFactory::m_pDetectorManager
AFP_GeoModelManager * m_pDetectorManager
Definition: AFP_GeoModelFactory.h:62
AFP_GeoModelFactory::addLBarSensorSeparationWindow
void addLBarSensorSeparationWindow(const char *pszStationName, const int nQuarticID, GeoOpticalPhysVol *pPhysMotherVolume, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer *bsContainer)
Definition: AFP_GeoModelTD.cxx:210
AFP_GeoModelFactory::m_pGeometry
AFP_Geometry * m_pGeometry
Definition: AFP_GeoModelFactory.h:68
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AFP_CONFIGURATION
Definition: AFP_ConfigParams.h:135
ELBT_UNDEFINED
@ ELBT_UNDEFINED
Definition: AFP_ConfigParams.h:20
AFP_GeoModelFactory::addSensor
void addSensor(const char *pszStationName, const int nQuarticID, GeoOpticalPhysVol *pPhysMotherVolume, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer *bsContainer)
Definition: AFP_GeoModelTD.cxx:246
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AFP_GeoModelFactory::create
virtual void create(GeoPhysVol *world)
Definition: AFP_GeoModelFactory.cxx:216
AFP_GeoModelFactory::getDetectorManager
virtual const AFP_GeoModelManager * getDetectorManager() const
Definition: AFP_GeoModelFactory.cxx:334
GeoOpticalSurface
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoOpticalSurface.h:19
AFP_BPMCOOLPARAMS
Definition: AFP_GeoModelFactory.h:26
AFP_Geometry
Definition: AFP_Geometry.h:20
AFP_BPMCOOLPARAMS::fBpmMRLX
float fBpmMRLX
Definition: AFP_GeoModelFactory.h:28
AFP_GeoModelFactory::addLQBarSegment
void addLQBarSegment(const char *pszStationName, const int nQuarticID, const int nLQBarID, AFPTOF_LBARDIMENSIONS &LQBarDims, GeoOpticalPhysVol *pPhysMotherVolume, HepGeom::Transform3D &TransInMotherVolume, GeoBorderSurfaceContainer *bsContainer)
AFP_GeoModelFactory::initializeTDParameters
void initializeTDParameters()
Definition: AFP_GeoModelTD.cxx:45
AFP_GeoModelFactory::operator=
const AFP_GeoModelFactory & operator=(const AFP_GeoModelFactory &right)
AFP_GeoModelManager
Definition: AFP_GeoModelManager.h:11
AFP_GeoModelManager.h
AFP_GeoModelFactory::AFP_GeoModelFactory
AFP_GeoModelFactory(const AFP_GeoModelFactory &right)
AFPTOF_LBARDIMENSIONS
Definition: AFP_ConfigParams.h:61
AFP_BPMCOOLPARAMS::fBpmSALX
float fBpmSALX
Definition: AFP_GeoModelFactory.h:30
AFP_GeoModelFactory::defineMaterials
void defineMaterials()
Definition: AFP_GeoModelFactory.cxx:55
AFP_BPMCOOLPARAMS::fBpmMRRY
float fBpmMRRY
Definition: AFP_GeoModelFactory.h:27
AFP_BPMCOOLPARAMS::fBpmMRRX
float fBpmMRRX
Definition: AFP_GeoModelFactory.h:27
AFP_GeoModelFactory::m_pDetectorStore
StoreGateSvc * m_pDetectorStore
Definition: AFP_GeoModelFactory.h:63
AFP_GeoModelFactory::m_addSeparationWindow
const bool m_addSeparationWindow
Definition: AFP_GeoModelFactory.h:69
GeoBorderSurfaceContainer
std::vector< GeoBorderSurface > GeoBorderSurfaceContainer
Definition: GeoBorderSurfaceContainer.h:12
AFP_BPMCOOLPARAMS::fBpmWBRX
float fBpmWBRX
Definition: AFP_GeoModelFactory.h:32
AFP_BPMCOOLPARAMS::fBpmSALY
float fBpmSALY
Definition: AFP_GeoModelFactory.h:30
AFP_GeoModelFactory::updatePositions
void updatePositions(AFP_BPMCOOLPARAMS *pBpmParams)
Definition: AFP_GeoModelFactory.cxx:340
AFP_BPMCOOLPARAMS::fBpmYALY
float fBpmYALY
Definition: AFP_GeoModelFactory.h:33
AFP_GeoModelFactory::getLQBarDimensions
void getLQBarDimensions(const int nRowID, const int nColID, AFPTOF_LBARDIMENSIONS *pLQBarDims)
AFP_GeoModelFactory::addHorizontalArm
void addHorizontalArm(const char *pszStationName, const int nQuarticID, const int nLQBarID, AFPTOF_LBARDIMENSIONS &LQBarDims, GeoOpticalPhysVol *pPhysMotherVolume, HepGeom::Transform3D &PartialTransInMotherVolume, GeoBorderSurfaceContainer *bsContainer)
AFP_GeoModelFactory::addSiDetector
void addSiDetector(GeoPhysVol *pPhysMotherVol, const char *pszStationName, HepGeom::Transform3D &TransInMotherVolume)
Definition: AFP_GeoModelSID.cxx:41
AFP_GeoModelFactory::m_MapMaterials
std::map< std::string, GeoRef< const GeoMaterial > > m_MapMaterials
Definition: AFP_GeoModelFactory.h:53