ATLAS Offline Software
Loading...
Searching...
No Matches
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
13class IGeometryDBSvc;
14
15namespace 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,
139 IRDBRecordset_ptr table,
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
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
const double width
Define macros for attributes used to control the static checker.
Interface class to access geometry database with possibility to override parameters from a text file.
Class to hold various Athena components.
std::vector< double > readLayerShift()
const ServiceVolumeSchema & schema() const
ServiceVolumeMakerMgr(IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *athenaComps)
InDetDD::AthenaComps * m_athenaComps
std::string volName(int index) const
const IGeometryDBSvc * db() const
std::string shapeType(int index) const
std::string materialName(int index) const
std::vector< const ServiceVolume * > m_services
std::vector< double > m_layerShift
ServiceVolumeMakerMgr * m_mgr
ServiceVolumeMaker(const std::string &label, IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *)
ServiceVolumeMaker(const ServiceVolumeMaker &)=delete
const std::vector< const ServiceVolume * > & makeAll()
ServiceVolume * make(int index)
ServiceVolumeMaker & operator=(const ServiceVolumeMaker &)=delete
void set_materialName(const std::string &s)
void set_rmin2(const std::string &s)
const std::string & zsymm() const
void set_rmin(const std::string &s)
void set_width(const std::string &s)
const std::string & phiStart() const
const std::string & radialDiv() const
void set_zmax(const std::string &s)
const std::string & zmax() const
const std::string & rmax2() const
void set_phiStart(const std::string &s)
const std::string & shiftFlag() const
void set_zsymm(const std::string &s)
void set_shapeType(const std::string &s)
const std::string & volId() const
void set_phiDelta(const std::string &s)
void set_volName(const std::string &s)
const std::string & zmin() const
const std::string & rmin2() const
const std::string & rmax() const
const std::string & volName() const
void set_rmax2(const std::string &s)
void set_shiftFlag(const std::string &s)
const std::string & phiWidth() const
void set_zmin(const std::string &s)
const std::string & repeat() const
const std::string & materialName() const
void set_phiStep(const std::string &s)
const std::string & width() const
void set_volId(const std::string &s)
const std::string & phiStep() const
void set_phiWidth(const std::string &s)
const std::string & shapeType() const
const std::string & rmin() const
void set_repeat(const std::string &s)
const std::string & phiDelta() const
void set_rmax(const std::string &s)
void set_radialDiv(const std::string &s)
std::string label(const std::string &format, int i)
Definition label.h:19
Message Stream Member.
Definition index.py:1