ATLAS Offline Software
AGDD2GeoModelBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef AGDD2GeoModelBuilder_H
6 #define AGDD2GeoModelBuilder_H
7 
10 #include "GeoModelKernel/GeoPhysVol.h"
11 #include "AGDDKernel/AGDDBuilder.h"
12 
13 class GeoMaterial;
14 class GeoElement;
15 class AGDDComposition;
16 class AGDDBox;
17 class AGDDTubs;
18 class AGDDElcyl;
19 class AGDDTrd;
20 class AGDDCons;
21 class AGDDPcon;
22 class AGDDPgon;
23 class AGDDGvxy;
24 class AGDDSnake;
25 class AGDDUnion;
26 class AGDDIntersection;
27 class AGDDSubtraction;
28 class AGDDVolume;
29 class AGDDBolt;
30 class AGDDIbeam;
31 class AGDDUbeam;
32 
33 class AGDDDetectorStore;
34 class AGDDVolumeStore;
35 class AGDDSectionStore;
36 class AliasStore;
37 class AGDDMaterialStore;
38 
39 
40 #include <string>
41 
43 public:
44  // constructor
46  AGDDVolumeStore& vs,
48  AliasStore& as,
51  // elements & materials
52  GeoElement* CreateElement(const std::string&);
53  const GeoMaterial* CreateMaterial(const std::string&);
54  virtual void CreateElements() override;
55  virtual void CreateMaterial() override;
56 
57  virtual void CreateBox(AGDDBox*) const override;
58  virtual void CreateTrd(AGDDTrd*) const override;
59  virtual void CreateTubs(AGDDTubs*) const override;
60  virtual void CreateElcyl(AGDDElcyl*) const override;
61  virtual void CreateCons(AGDDCons*) const override;
62  virtual void CreatePcon(AGDDPcon*) const override;
63  virtual void CreatePgon(AGDDPgon*) const override;
64  virtual void CreateGvxy(AGDDGvxy*) const override;
65  virtual void CreateSnake(AGDDSnake*) const override;
66  virtual void CreateUnion(AGDDUnion*) const override;
67  virtual void CreateIntersection(AGDDIntersection*) const override;
68  virtual void CreateSubtraction(AGDDSubtraction*) const override;
69 
70  virtual void CreateBolt(AGDDBolt*) const override;
71  virtual void CreateIbeam(AGDDIbeam*) const override;
72  virtual void CreateUbeam(AGDDUbeam*) const override;
73 
74  virtual void CreateVolume(AGDDVolume*) override;
75  virtual void CreateComposition(AGDDComposition*) override;
76 
77  virtual void SetMotherVolume(GeoPhysVol *v) {m_mother=v;}
78  virtual void BuildAllVolumes();
79  virtual void BuildFromSection(const std::string&) override;
80  virtual void BuildFromVolume(const std::string&) override;
81 
82  virtual StoredMaterialManager& GetMaterialManager() const override;
83 
84 private:
85  GeoPhysVol *m_mother;
91 
92  const GeoMaterial* GetMMMaterial(const std::string&) const;
93 
95  inline double phi(const GeoTrf::Vector3D &vec) const {
96  if (vec.rows() < 2) return 0.;
97  return std::atan2(vec[1],vec[0]);
98  }
100  inline double theta(const GeoTrf::Vector3D &vec) const {
101  if (vec.rows() < 3) return 0.;
102  return std::atan2(std::hypot(vec[0],vec[1]),vec[2]);
103  }
104 };
105 
106 #endif
AGDD2GeoModelBuilder::CreateBox
virtual void CreateBox(AGDDBox *) const override
Definition: AGDD2GeoModelBuilder.cxx:204
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:260
AliasStore
Definition: AliasStore.h:11
AGDD2GeoModelBuilder::CreateUbeam
virtual void CreateUbeam(AGDDUbeam *) const override
Definition: AGDD2GeoModelBuilder.cxx:729
AGDD2GeoModelBuilder::CreateElement
GeoElement * CreateElement(const std::string &)
Definition: AGDD2GeoModelBuilder.cxx:83
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
AGDD2GeoModelBuilder::CreateGvxy
virtual void CreateGvxy(AGDDGvxy *) const override
Definition: AGDD2GeoModelBuilder.cxx:341
AGDDComposition
Definition: AGDDComposition.h:13
AGDDBuilder.h
AGDD2GeoModelBuilder::CreatePcon
virtual void CreatePcon(AGDDPcon *) const override
Definition: AGDD2GeoModelBuilder.cxx:432
AGDD2GeoModelBuilder::CreateElcyl
virtual void CreateElcyl(AGDDElcyl *) const override
Definition: AGDD2GeoModelBuilder.cxx:331
AGDDTubs
Definition: AGDDTubs.h:13
AGDD2GeoModelBuilder::CreateUnion
virtual void CreateUnion(AGDDUnion *) const override
Definition: AGDD2GeoModelBuilder.cxx:370
AGDDVolumeStore
Definition: AGDDVolumeStore.h:15
AGDD2GeoModelBuilder::m_ms
AGDDMaterialStore & m_ms
Definition: AGDD2GeoModelBuilder.h:90
AGDD2GeoModelBuilder::phi
double phi(const GeoTrf::Vector3D &vec) const
phi method (cf.
Definition: AGDD2GeoModelBuilder.h:95
AGDD2GeoModelBuilder::GetMaterialManager
virtual StoredMaterialManager & GetMaterialManager() const override
Definition: AGDD2GeoModelBuilder.cxx:754
AGDDBolt
Definition: AGDDBolt.h:13
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
AGDD2GeoModelBuilder::CreateSubtraction
virtual void CreateSubtraction(AGDDSubtraction *) const override
Definition: AGDD2GeoModelBuilder.cxx:411
AGDD2GeoModelBuilder::CreateCons
virtual void CreateCons(AGDDCons *) const override
Definition: AGDD2GeoModelBuilder.cxx:312
AGDD2GeoModelBuilder::GetMMMaterial
const GeoMaterial * GetMMMaterial(const std::string &) const
Definition: AGDD2GeoModelBuilder.cxx:748
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
AGDD2GeoModelBuilder::CreateTrd
virtual void CreateTrd(AGDDTrd *) const override
Definition: AGDD2GeoModelBuilder.cxx:213
AGDD2GeoModelBuilder::CreateTubs
virtual void CreateTubs(AGDDTubs *) const override
Definition: AGDD2GeoModelBuilder.cxx:321
AGDDSectionStore
Definition: AGDDSectionStore.h:15
GeoPrimitives.h
AGDDBuilder
Definition: AGDDBuilder.h:31
AGDD2GeoModelBuilder::AGDD2GeoModelBuilder
AGDD2GeoModelBuilder(AGDDDetectorStore &ds, AGDDVolumeStore &vs, AGDDSectionStore &ss, AliasStore &as, AGDDMaterialStore &ms)
Definition: AGDD2GeoModelBuilder.cxx:68
AGDDCons
Definition: AGDDCons.h:13
AGDDGvxy
Definition: AGDDGvxy.h:14
AGDDIntersection
Definition: AGDDIntersection.h:13
AGDD2GeoModelBuilder::CreatePgon
virtual void CreatePgon(AGDDPgon *) const override
Definition: AGDD2GeoModelBuilder.cxx:450
AGDD2GeoModelBuilder::m_as
AliasStore & m_as
Definition: AGDD2GeoModelBuilder.h:89
AGDD2GeoModelBuilder::BuildFromVolume
virtual void BuildFromVolume(const std::string &) override
Definition: AGDD2GeoModelBuilder.cxx:666
AGDDUnion
Definition: AGDDUnion.h:13
AGDD2GeoModelBuilder
Definition: AGDD2GeoModelBuilder.h:42
AGDDMaterialStore
Definition: AGDDMaterialStore.h:23
AGDDSubtraction
Definition: AGDDSubtraction.h:13
AGDD2GeoModelBuilder::CreateBolt
virtual void CreateBolt(AGDDBolt *) const override
Definition: AGDD2GeoModelBuilder.cxx:691
AGDD2GeoModelBuilder::m_vs
AGDDVolumeStore & m_vs
Definition: AGDD2GeoModelBuilder.h:87
AGDD2GeoModelBuilder::BuildFromSection
virtual void BuildFromSection(const std::string &) override
Definition: AGDD2GeoModelBuilder.cxx:594
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
AGDDDetectorStore
Definition: AGDDDetectorStore.h:18
AGDD2GeoModelBuilder::CreateIbeam
virtual void CreateIbeam(AGDDIbeam *) const override
Definition: AGDD2GeoModelBuilder.cxx:706
python.PyAthena.v
v
Definition: PyAthena.py:154
AGDD2GeoModelBuilder::m_ds
AGDDDetectorStore & m_ds
Definition: AGDD2GeoModelBuilder.h:86
AGDD2GeoModelBuilder::CreateVolume
virtual void CreateVolume(AGDDVolume *) override
Definition: AGDD2GeoModelBuilder.cxx:538
AGDD2GeoModelBuilder::CreateIntersection
virtual void CreateIntersection(AGDDIntersection *) const override
Definition: AGDD2GeoModelBuilder.cxx:391
AGDD2GeoModelBuilder::SetMotherVolume
virtual void SetMotherVolume(GeoPhysVol *v)
Definition: AGDD2GeoModelBuilder.h:77
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
AGDD2GeoModelBuilder::CreateElements
virtual void CreateElements() override
Definition: AGDD2GeoModelBuilder.cxx:188
AGDD2GeoModelBuilder::~AGDD2GeoModelBuilder
~AGDD2GeoModelBuilder()=default
AGDDIbeam
Definition: AGDDIbeam.h:13
AGDDVolume
Definition: AGDDVolume.h:16
AGDD2GeoModelBuilder::theta
double theta(const GeoTrf::Vector3D &vec) const
theta method (cf.
Definition: AGDD2GeoModelBuilder.h:100
AGDD2GeoModelBuilder::CreateMaterial
virtual void CreateMaterial() override
Definition: AGDD2GeoModelBuilder.cxx:196
AGDD2GeoModelBuilder::m_ss
AGDDSectionStore & m_ss
Definition: AGDD2GeoModelBuilder.h:88
AGDDTrd
Definition: AGDDTrd.h:13
AGDDPcon
Definition: AGDDPcon.h:13
AGDDSnake
Definition: AGDDSnake.h:14
AGDDPgon
Definition: AGDDPgon.h:13
AGDDBox
Definition: AGDDBox.h:13
AGDDUbeam
Definition: AGDDUbeam.h:13
AGDD2GeoModelBuilder::CreateSnake
virtual void CreateSnake(AGDDSnake *) const override
Definition: AGDD2GeoModelBuilder.cxx:223
AGDD2GeoModelBuilder::m_mother
GeoPhysVol * m_mother
Definition: AGDD2GeoModelBuilder.h:85
AGDDElcyl
Definition: AGDDElcyl.h:13
AGDD2GeoModelBuilder::BuildAllVolumes
virtual void BuildAllVolumes()
Definition: AGDD2GeoModelBuilder.cxx:561
AGDD2GeoModelBuilder::CreateComposition
virtual void CreateComposition(AGDDComposition *) override
Definition: AGDD2GeoModelBuilder.cxx:469