ATLAS Offline Software
ServiceVolumeMaker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ServiceVolumeMaker_H
6 #define ServiceVolumeMaker_H
7 
8 #include <string>
9 #include <vector>
12 
13 class IGeometryDBSvc;
14 
15 namespace InDetDD {
16 
17  class ServiceVolume;
18  class AthenaComps;
19 
21  public:
23 
24  void setPixelSchema();
25  void setDefaultSchema();
26  void setSimpleSchema();
27 
28  const std::string& rmin() const {return m_rmin;}
29  const std::string& rmax() const {return m_rmax;}
30  const std::string& rmin2() const {return m_rmin2;}
31  const std::string& rmax2() const {return m_rmax2;}
32  const std::string& zmin() const {return m_zmin;}
33  const std::string& zmax() const {return m_zmax;}
34  const std::string& zsymm() const {return m_zsymm;}
35  const std::string& shapeType() const {return m_shapeType;}
36  const std::string& materialName() const {return m_materialName;}
37  const std::string& volName() const {return m_volName;}
38  const std::string& phiWidth() const {return m_phiWidth;}
39  const std::string& width() const {return m_width;}
40  const std::string& repeat() const {return m_repeat;}
41  const std::string& phiStart() const {return m_phiStart;}
42  const std::string& phiDelta() const {return m_phiDelta;}
43  const std::string& phiStep() const {return m_phiStep;}
44  const std::string& radialDiv() const {return m_radialDiv;}
45  const std::string& volId() const {return m_volId;}
46  const std::string& shiftFlag() const {return m_shiftFlag;}
47 
48  void set_rmin (const std::string & s) {m_rmin = s;}
49  void set_rmax (const std::string & s) {m_rmax = s;}
50  void set_rmin2 (const std::string & s) {m_rmin2 = s;}
51  void set_rmax2 (const std::string & s) {m_rmax2 = s;}
52  void set_zmin (const std::string & s) {m_zmin = s;}
53  void set_zmax (const std::string & s) {m_zmax = s;}
54  void set_zsymm (const std::string & s) {m_zsymm = s;}
55  void set_shapeType (const std::string & s) {m_shapeType = s;}
56  void set_materialName(const std::string & s) {m_materialName = s;}
57  void set_volName (const std::string & s) {m_volName = s;}
58  void set_phiWidth (const std::string & s) {m_phiWidth = s;}
59  void set_width (const std::string & s) {m_width = s;}
60  void set_repeat (const std::string & s) {m_repeat = s;}
61  void set_phiStart (const std::string & s) {m_phiStart = s;}
62  void set_phiDelta (const std::string & s) {m_phiDelta = s;}
63  void set_phiStep (const std::string & s) {m_phiStep = s;}
64  void set_radialDiv (const std::string & s) {m_radialDiv = s;}
65  void set_volId (const std::string & s) {m_volId = s;}
66  void set_shiftFlag (const std::string & s) {m_shiftFlag = s;}
67 
68  bool simple() const {return m_rmin2.empty();}
69  bool has_volId() const {return !m_volId.empty();}
70  bool has_shiftFlag() const {return !m_shiftFlag.empty();}
71  bool has_shapeType() const {return !m_shapeType.empty();}
72  bool has_width() const {return !m_width.empty();}
73  bool has_radial() const {return !m_radialDiv.empty();}
74  bool has_phiStep() const {return !m_phiStep.empty();}
75 
76  private:
77  std::string m_rmin;
78  std::string m_rmax;
79  std::string m_rmin2;
80  std::string m_rmax2;
81  std::string m_zmin;
82  std::string m_zmax;
83  std::string m_zsymm;
84  std::string m_shapeType;
85  std::string m_materialName;
86  std::string m_volName;
87  std::string m_phiWidth;
88  std::string m_width;
89  std::string m_repeat;
90  std::string m_phiStart;
91  std::string m_phiDelta;
92  std::string m_phiStep;
93  std::string m_radialDiv;
94  std::string m_volId;
95  std::string m_shiftFlag;
96 
97  };
98 
100  public:
102  InDetDD::AthenaComps * athenaComps);
103 
104  double rmin(int index) const;
105  double rmax(int index) const;
106  double rmin2(int index) const;
107  double rmax2(int index) const;
108  double zmin(int index) const;
109  double zmax(int index) const;
110  double width(int index) const;
111  double phiStart(int index) const;
112  double phiDelta(int index) const;
113  double phiStep(int index) const;
114  bool zsymm(int index) const;
115  int repeat(int index) const;
116  int radialDiv(int index) const;
117  int volId(int index) const;
118  int shiftFlag(int index) const;
119  std::string shapeType(int index) const;
120  std::string volName(int index) const;
121  std::string materialName(int index) const;
122  std::vector<double> readLayerShift();
123 
124  unsigned int numElements() const;
125 
126  const IGeometryDBSvc *db() const;
127  const ServiceVolumeSchema & schema() const {return m_schema;}
128 
129  private:
134  };
135 
137  public:
138  ServiceVolumeMaker(const std::string & label,
140  const ServiceVolumeSchema & schema,
145  const std::vector<const ServiceVolume *> & makeAll();
146  ServiceVolume * make(int index);
147  unsigned int numElements() const;
148 
149  private:
150  std::string m_label;
152  std::vector<const ServiceVolume *> m_services;
153  std::vector<double> m_layerShift;
154  };
155 } // end namespace
156 
157 #endif
InDetDD::ServiceVolumeSchema::set_repeat
void set_repeat(const std::string &s)
Definition: ServiceVolumeMaker.h:60
InDetDD::ServiceVolumeMakerMgr
Definition: ServiceVolumeMaker.h:99
ServiceVolume
Definition: InDetServMatGeoModel/src/ServiceVolume.h:14
InDetDD::ServiceVolumeMakerMgr::m_schema
ServiceVolumeSchema m_schema
Definition: ServiceVolumeMaker.h:132
InDetDD::ServiceVolumeSchema::rmax2
const std::string & rmax2() const
Definition: ServiceVolumeMaker.h:31
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
InDetDD::ServiceVolumeSchema::phiStep
const std::string & phiStep() const
Definition: ServiceVolumeMaker.h:43
InDetDD::ServiceVolumeMakerMgr::shapeType
std::string shapeType(int index) const
Definition: ServiceVolumeMaker.cxx:178
InDetDD::ServiceVolumeMakerMgr::m_table
IRDBRecordset_ptr m_table
Definition: ServiceVolumeMaker.h:130
InDetDD::ServiceVolumeSchema::has_shapeType
bool has_shapeType() const
Definition: ServiceVolumeMaker.h:71
InDetDD::ServiceVolumeSchema::m_zmax
std::string m_zmax
Definition: ServiceVolumeMaker.h:82
InDetDD::ServiceVolumeMakerMgr::zsymm
bool zsymm(int index) const
Definition: ServiceVolumeMaker.cxx:159
InDetDD::ServiceVolumeMaker::ServiceVolumeMaker
ServiceVolumeMaker(const std::string &label, IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *)
Definition: ServiceVolumeMaker.cxx:249
InDetDD::ServiceVolumeSchema::m_rmax2
std::string m_rmax2
Definition: ServiceVolumeMaker.h:80
InDetDD::ServiceVolumeSchema::set_phiStart
void set_phiStart(const std::string &s)
Definition: ServiceVolumeMaker.h:61
InDetDD::ServiceVolumeMakerMgr::width
double width(int index) const
Definition: ServiceVolumeMaker.cxx:138
InDetDD::ServiceVolumeMaker::m_services
std::vector< const ServiceVolume * > m_services
Definition: ServiceVolumeMaker.h:152
index
Definition: index.py:1
InDetDD::ServiceVolumeMakerMgr::m_layer
IRDBRecordset_ptr m_layer
Definition: ServiceVolumeMaker.h:131
InDetDD::ServiceVolumeSchema::set_radialDiv
void set_radialDiv(const std::string &s)
Definition: ServiceVolumeMaker.h:64
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
InDetDD::ServiceVolumeMaker::m_label
std::string m_label
Definition: ServiceVolumeMaker.h:150
InDetDD::ServiceVolumeMaker::makeAll
const std::vector< const ServiceVolume * > & makeAll()
Definition: ServiceVolumeMaker.cxx:267
InDetDD::ServiceVolumeMakerMgr::repeat
int repeat(int index) const
Definition: ServiceVolumeMaker.cxx:164
InDetDD::ServiceVolumeSchema::setDefaultSchema
void setDefaultSchema()
Definition: ServiceVolumeMaker.cxx:47
InDetDD::AthenaComps
Class to hold various Athena components.
Definition: InDetDDAthenaComps.h:21
InDetDD::ServiceVolumeSchema::set_zmax
void set_zmax(const std::string &s)
Definition: ServiceVolumeMaker.h:53
InDetDD::ServiceVolumeSchema::set_volId
void set_volId(const std::string &s)
Definition: ServiceVolumeMaker.h:65
InDetDD::ServiceVolumeMaker::numElements
unsigned int numElements() const
Definition: ServiceVolumeMaker.cxx:275
InDetDD::ServiceVolumeSchema::m_shapeType
std::string m_shapeType
Definition: ServiceVolumeMaker.h:84
InDetDD::ServiceVolumeSchema::set_zmin
void set_zmin(const std::string &s)
Definition: ServiceVolumeMaker.h:52
InDetDD::ServiceVolumeMakerMgr::volId
int volId(int index) const
Definition: ServiceVolumeMaker.cxx:208
InDetDD::ServiceVolumeSchema::m_rmin
std::string m_rmin
Definition: ServiceVolumeMaker.h:77
InDetDD::ServiceVolumeSchema::zsymm
const std::string & zsymm() const
Definition: ServiceVolumeMaker.h:34
InDetDD::ServiceVolumeSchema::has_phiStep
bool has_phiStep() const
Definition: ServiceVolumeMaker.h:74
InDetDD::ServiceVolumeMakerMgr::zmin
double zmin(int index) const
Definition: ServiceVolumeMaker.cxx:123
InDetDD::ServiceVolumeMaker::m_layerShift
std::vector< double > m_layerShift
Definition: ServiceVolumeMaker.h:153
InDetDD::ServiceVolumeSchema::setPixelSchema
void setPixelSchema()
Definition: ServiceVolumeMaker.cxx:25
CheckTagAssociation.schema
schema
Definition: CheckTagAssociation.py:22
InDetDD::ServiceVolumeSchema::m_phiWidth
std::string m_phiWidth
Definition: ServiceVolumeMaker.h:87
InDetDD::ServiceVolumeSchema::rmin2
const std::string & rmin2() const
Definition: ServiceVolumeMaker.h:30
InDetDD::ServiceVolumeSchema::zmax
const std::string & zmax() const
Definition: ServiceVolumeMaker.h:33
InDetDD::ServiceVolumeMaker::make
ServiceVolume * make(int index)
Definition: ServiceVolumeMaker.cxx:280
InDetDD::ServiceVolumeMakerMgr::phiStart
double phiStart(int index) const
Definition: ServiceVolumeMaker.cxx:146
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
InDetDD::ServiceVolumeMakerMgr::rmax2
double rmax2(int index) const
Definition: ServiceVolumeMaker.cxx:118
InDetDD::ServiceVolumeMakerMgr::ServiceVolumeMakerMgr
ServiceVolumeMakerMgr(IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *athenaComps)
Definition: ServiceVolumeMaker.cxx:90
InDetDD::ServiceVolumeSchema::m_rmin2
std::string m_rmin2
Definition: ServiceVolumeMaker.h:79
InDetDD::ServiceVolumeSchema::m_rmax
std::string m_rmax
Definition: ServiceVolumeMaker.h:78
InDetDD::ServiceVolumeSchema::has_radial
bool has_radial() const
Definition: ServiceVolumeMaker.h:73
InDetDD::ServiceVolumeSchema::set_rmax
void set_rmax(const std::string &s)
Definition: ServiceVolumeMaker.h:49
InDetDD::ServiceVolumeMakerMgr::zmax
double zmax(int index) const
Definition: ServiceVolumeMaker.cxx:128
InDetDD::ServiceVolumeSchema::set_width
void set_width(const std::string &s)
Definition: ServiceVolumeMaker.h:59
InDetDD::ServiceVolumeSchema::set_phiWidth
void set_phiWidth(const std::string &s)
Definition: ServiceVolumeMaker.h:58
InDetDD::ServiceVolumeSchema::has_shiftFlag
bool has_shiftFlag() const
Definition: ServiceVolumeMaker.h:70
InDetDD::ServiceVolumeSchema::simple
bool simple() const
Definition: ServiceVolumeMaker.h:68
InDetDD::ServiceVolumeSchema::m_materialName
std::string m_materialName
Definition: ServiceVolumeMaker.h:85
InDetDD::ServiceVolumeSchema::m_radialDiv
std::string m_radialDiv
Definition: ServiceVolumeMaker.h:93
InDetDD::ServiceVolumeSchema::set_shapeType
void set_shapeType(const std::string &s)
Definition: ServiceVolumeMaker.h:55
InDetDD::ServiceVolumeMakerMgr::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: ServiceVolumeMaker.h:133
IGeometryDBSvc
Definition: IGeometryDBSvc.h:21
InDetDD::ServiceVolumeSchema::has_width
bool has_width() const
Definition: ServiceVolumeMaker.h:72
InDetDD::ServiceVolumeSchema::m_repeat
std::string m_repeat
Definition: ServiceVolumeMaker.h:89
InDetDD::ServiceVolumeSchema::width
const std::string & width() const
Definition: ServiceVolumeMaker.h:39
InDetDD::ServiceVolumeMakerMgr::materialName
std::string materialName(int index) const
Definition: ServiceVolumeMaker.cxx:198
InDetDD::ServiceVolumeSchema::m_volId
std::string m_volId
Definition: ServiceVolumeMaker.h:94
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
InDetDD::ServiceVolumeSchema::set_rmax2
void set_rmax2(const std::string &s)
Definition: ServiceVolumeMaker.h:51
InDetDD::ServiceVolumeSchema::set_phiDelta
void set_phiDelta(const std::string &s)
Definition: ServiceVolumeMaker.h:62
InDetDD::ServiceVolumeMakerMgr::volName
std::string volName(int index) const
Definition: ServiceVolumeMaker.cxx:190
InDetDD::ServiceVolumeSchema::setSimpleSchema
void setSimpleSchema()
Definition: ServiceVolumeMaker.cxx:69
InDetDD::ServiceVolumeSchema::set_phiStep
void set_phiStep(const std::string &s)
Definition: ServiceVolumeMaker.h:63
InDetDD::ServiceVolumeSchema::m_zsymm
std::string m_zsymm
Definition: ServiceVolumeMaker.h:83
InDetDD::ServiceVolumeMaker
Definition: ServiceVolumeMaker.h:136
InDetDD::ServiceVolumeSchema::has_volId
bool has_volId() const
Definition: ServiceVolumeMaker.h:69
python.ext.table_printer.table
list table
Definition: table_printer.py:81
InDetDD::ServiceVolumeSchema::volId
const std::string & volId() const
Definition: ServiceVolumeMaker.h:45
InDetDD::ServiceVolumeMakerMgr::shiftFlag
int shiftFlag(int index) const
Definition: ServiceVolumeMaker.cxx:216
InDetDD::ServiceVolumeMakerMgr::readLayerShift
std::vector< double > readLayerShift()
Definition: ServiceVolumeMaker.cxx:225
InDetDD::ServiceVolumeMakerMgr::numElements
unsigned int numElements() const
Definition: ServiceVolumeMaker.cxx:203
InDetDD::ServiceVolumeMakerMgr::db
const IGeometryDBSvc * db() const
Definition: ServiceVolumeMaker.cxx:98
InDetDD::ServiceVolumeMaker::~ServiceVolumeMaker
~ServiceVolumeMaker()
Definition: ServiceVolumeMaker.cxx:259
InDetDD::ServiceVolumeMakerMgr::rmin2
double rmin2(int index) const
Definition: ServiceVolumeMaker.cxx:113
InDetDD::ServiceVolumeSchema::set_rmin
void set_rmin(const std::string &s)
Definition: ServiceVolumeMaker.h:48
InDetDD::ServiceVolumeSchema::m_shiftFlag
std::string m_shiftFlag
Definition: ServiceVolumeMaker.h:95
InDetDD::ServiceVolumeSchema::repeat
const std::string & repeat() const
Definition: ServiceVolumeMaker.h:40
InDetDD::ServiceVolumeSchema::zmin
const std::string & zmin() const
Definition: ServiceVolumeMaker.h:32
InDetDD::ServiceVolumeSchema::m_volName
std::string m_volName
Definition: ServiceVolumeMaker.h:86
InDetDD::ServiceVolumeSchema::rmax
const std::string & rmax() const
Definition: ServiceVolumeMaker.h:29
InDetDD::ServiceVolumeSchema::shapeType
const std::string & shapeType() const
Definition: ServiceVolumeMaker.h:35
InDetDD::ServiceVolumeSchema::ServiceVolumeSchema
ServiceVolumeSchema()
Definition: ServiceVolumeMaker.cxx:20
InDetDD::ServiceVolumeSchema::set_materialName
void set_materialName(const std::string &s)
Definition: ServiceVolumeMaker.h:56
InDetDD::ServiceVolumeSchema::materialName
const std::string & materialName() const
Definition: ServiceVolumeMaker.h:36
InDetDD::ServiceVolumeMakerMgr::phiStep
double phiStep(int index) const
Definition: ServiceVolumeMaker.cxx:151
InDetDD::ServiceVolumeSchema::volName
const std::string & volName() const
Definition: ServiceVolumeMaker.h:37
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::ServiceVolumeSchema::rmin
const std::string & rmin() const
Definition: ServiceVolumeMaker.h:28
InDetDD::ServiceVolumeSchema::m_phiDelta
std::string m_phiDelta
Definition: ServiceVolumeMaker.h:91
InDetDD::ServiceVolumeMakerMgr::rmax
double rmax(int index) const
Definition: ServiceVolumeMaker.cxx:108
InDetDD::ServiceVolumeSchema::m_phiStep
std::string m_phiStep
Definition: ServiceVolumeMaker.h:92
InDetDD::ServiceVolumeMakerMgr::phiDelta
double phiDelta(int index) const
Definition: ServiceVolumeMaker.cxx:133
InDetDD::ServiceVolumeSchema::shiftFlag
const std::string & shiftFlag() const
Definition: ServiceVolumeMaker.h:46
InDetDD::ServiceVolumeSchema::set_zsymm
void set_zsymm(const std::string &s)
Definition: ServiceVolumeMaker.h:54
InDetDD::ServiceVolumeSchema::set_rmin2
void set_rmin2(const std::string &s)
Definition: ServiceVolumeMaker.h:50
InDetDD::ServiceVolumeSchema
Definition: ServiceVolumeMaker.h:20
InDetDD::ServiceVolume
Definition: InDetGeoModelUtils/InDetGeoModelUtils/ServiceVolume.h:24
InDetDD::ServiceVolumeMakerMgr::schema
const ServiceVolumeSchema & schema() const
Definition: ServiceVolumeMaker.h:127
InDetDD::ServiceVolumeSchema::m_zmin
std::string m_zmin
Definition: ServiceVolumeMaker.h:81
InDetDD::ServiceVolumeMaker::ServiceVolumeMaker
ServiceVolumeMaker(const ServiceVolumeMaker &)=delete
InDetDD::ServiceVolumeSchema::radialDiv
const std::string & radialDiv() const
Definition: ServiceVolumeMaker.h:44
InDetDD::ServiceVolumeSchema::set_volName
void set_volName(const std::string &s)
Definition: ServiceVolumeMaker.h:57
InDetDD::ServiceVolumeSchema::m_width
std::string m_width
Definition: ServiceVolumeMaker.h:88
checker_macros.h
Define macros for attributes used to control the static checker.
InDetDD::ServiceVolumeSchema::phiWidth
const std::string & phiWidth() const
Definition: ServiceVolumeMaker.h:38
InDetDD::ServiceVolumeMakerMgr::radialDiv
int radialDiv(int index) const
Definition: ServiceVolumeMaker.cxx:169
InDetDD::ServiceVolumeMaker::m_mgr
ServiceVolumeMakerMgr * m_mgr
Definition: ServiceVolumeMaker.h:151
InDetDD::ServiceVolumeSchema::set_shiftFlag
void set_shiftFlag(const std::string &s)
Definition: ServiceVolumeMaker.h:66
InDetDD::ServiceVolumeMakerMgr::rmin
double rmin(int index) const
Definition: ServiceVolumeMaker.cxx:103
InDetDD::ServiceVolumeSchema::phiDelta
const std::string & phiDelta() const
Definition: ServiceVolumeMaker.h:42
InDetDD::ServiceVolumeMaker::operator=
ServiceVolumeMaker & operator=(const ServiceVolumeMaker &)=delete
InDetDD::ServiceVolumeSchema::phiStart
const std::string & phiStart() const
Definition: ServiceVolumeMaker.h:41
InDetDD::ServiceVolumeSchema::m_phiStart
std::string m_phiStart
Definition: ServiceVolumeMaker.h:90