ATLAS Offline Software
Loading...
Searching...
No Matches
TileDddbManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * Updates:
7 * - 2022 Jan, Riccardo Maria BIANCHI <riccardo.maria.bianchi@cern.ch>
8 * Added support to input data from SQLite, for the DetectorFactoryLite for Run4
9 */
10
11#ifndef TileDddbManager_H
12#define TileDddbManager_H
13
14#include <string>
15#include <vector>
18
19class IRDBRecord;
20class MsgStream;
21
35
37 : public AthMessaging
38{
39public:
49
51 const std::string& version_tag,
52 const std::string& version_node,
53 bool sqliteInput = false);
54
57
58 virtual ~TileDddbManager() {}
59
60 // ---------------- T I L E ---------------
61 //fields of TILE structure
62 int TILEnmodul() const;
63 double TILErmim() const;
64 double TILErmam() const;
65 double TILEzmam() const;
66 double TILErmin() const;
67 double TILErmax() const;
68 double TILEzshift() const;
69
70 // -------------- TILE GLOBALS ---------------
71 int GetNumberOfEnv() const;
72 int GetEnvType() const;
73 int SetCurrentEnvByType(unsigned int envelope);
74 int SetCurrentEnvByIndex(unsigned int envelope);
75 int GetEnvSide() const;
76 int GetEnvNModules() const;
77 double GetEnvRin() const;
78 double GetEnvRout() const;
79 double GetEnvZLength() const;
80 double GetEnvDPhi() const;
81 double GetEnvDZ() const;
82 double GetEnvDX() const;
83 double GetEnvDY() const;
84 double GetEnvDPsi() const;
85 double GetEnvDTheta() const;
86 double GetEnvZShift() const;
87
88 // -------------- TILE MODULES ---------------
89 int SetCurrentModuleByIndex(unsigned int Id);
90 int SetCurrentModuleByNumber(unsigned int Number);
91 int GetModNumber() const;
92 int GetModType() const;
93 double GetModDX() const;
94 double GetModDY() const;
95 double GetModDZ() const;
96 double GetModDPhi() const;
97 double GetModDPsi() const;
98 double GetModDTheta() const;
99
100 // -------------- TILE MODULE TYPES ---------------
101 int SetCurrentTypeByIndex(unsigned int Id);
102 int SetCurrentTypeByNumber(unsigned int Number);
103 unsigned int GetModType(unsigned int Id) const;
104 unsigned int GetModTypeSize() const;
105
106 // -------------- S E C T I O N --------------
107 unsigned int GetNumTilb() const;
108
109 int SetCurrentSectionByIndex(unsigned int IdSection);
110 int SetCurrentSectionByNumber(unsigned int section);
111 int SetCurrentSection(unsigned int section, bool print=true);
112
113 //fields of TILB structure
114 int TILBsection() const;
115 int TILBnperiod() const;
116 int TILBnmodul() const;
117 double TILBrmin() const;
118 double TILBrmax() const;
119 double TILBrminimal() const;
120 double TILBrmaximal() const;
121 double TILBdzperio() const;
122 double TILBdrfront() const;
123 double TILBdzend() const;
124 double TILBflangex() const;
125 double TILBflangey() const;
126 double TILBzoffset() const;
127 double TILBphigap() const;
128 double TILBisci_st() const;
129 double TILBdzmodul() const;
130 double TILBdzmast() const;
131 double TILBdzspac() const;
132 double TILBdzend1() const;
133 double TILBdzend2() const;
134 int TILBngirder() const;
135 int TILBnscin() const;
136 int TILBfingpattern() const;
137 int TILBnpercutpos() const;
138 int TILBnpercutneg() const;
139 int TILBcurscint() const;
140 double TILBdzgir() const;
141
142
143 // -------- S C I N T I L L A T O R ----------
144 int SetCurrentScin(int item);
145
156 int SCNTitem() const;
157 double SCNTdr() const;
158 double SCNTrc() const;
159 double SCNTzp() const;
160 double SCNTdrw() const;
161 double SCNTdt() const;
162 double SCNTdtw() const;
163 double SCNTdphi() const;
164
165 // -------- Extended Barrel Cuts ----------
176
177 int SetCurrentCuts(const std::string& input);
178 bool BoolCuts();
179 std::string CutsName() const;
180 double CutsDX1() const;
181 double CutsDX2() const;
182 double CutsDY1() const;
183 double CutsDY2() const;
184 double CutsDZ1() const;
185 double CutsXpos() const;
186 double CutsYpos() const;
187
188 // ------------- S a d d l e -----------------
193
194 int SetCurrentSaddle(unsigned int index);
195 bool BoolSaddle();
196 double DzSaddleSupport() const;
197 double RadiusSaddle() const;
198
199 // ------------- G I R D E R -----------------
200 int SetCurrentGird(int item);
201
202 // fields of TIGR structure
203 int TIGRitem() const;
204 int TIGRmaterial() const;
205 double TIGRrc() const;
206 double TIGRdr() const;
207 double TIGRdw() const;
208 double TIGRoff() const;
209
210 // -------------- T I F G --------------------
211 int SetCurrentTifg(int section);
212
213 // fields of TIFG structure
214 int TIFGsection() const;
215 int TIFGnelem() const;
216 double TIFGdz() const;
217
218 // -------------- T I C G --------------------
219 int SetCurrentTicg(int item);
220
221 // fields of TICG structure
222 int TICGitem() const;
223 int TICGmaterial() const;
224 int TICGshape() const;
225 double TICGrc() const;
226 double TICGdr() const;
227 double TICGdx1() const;
228 double TICGdx2() const;
229 double TICGoff() const;
230 double TICGdz() const;
231 double TICGzc() const;
232
233 // -------------- T I C L --------------------
234 unsigned int GetNumTicl() const;
235
236 int SetCurrentTicl(int detector, double sample, double tower);
237 int SetCurrentTicl(unsigned int index);
238
239 // Find first TICL for given detector
240 // 1 - success; 0 - doesn't exist any TICL for given detector
241 int SetFirstTiclInDet(int detector);
242
243 // Find first TICL for given detector and sample
244 // 1 - success; 0 - doesn't exist any such TICL
245 int SetFirstTiclInDetSamp(int detector, double sample);
246
247 // Move to the next TICL with the same detector field
248 // 1 - success; 0 - the current is last one, it remains unchanged
249 int SetNextTiclInDet();
250
251 // Move to the next TICL with the same detector and sample fields
252 // 1 - success; 0 - the current is last one, it remains unchanged
254
255 // fields of TICL structure
256 int TICLdetector() const;
257 double TICLncell() const;
258 double TICLtower() const;
259 double TICLsample() const;
260 double TICLeta() const;
261 double TICLdeta() const;
262 double TICLfirstrow() const;
263 double TICLlastrow() const;
264 double TICLntilesrow(unsigned int ind) const;
265 double TICLnpmt() const;
266 double TICLholes(unsigned int ind) const;
267
268 // fields of tile switches
269 int getSwitch (const char *name, int def_val) const;
270 int addPlatesToCell() const { return getSwitch("ADDPLATESTOCELL",1); }
271 int uShape() const { return getSwitch("USHAPE",0); }
272 int glue() const { return getSwitch("GLUE",1); }
273 int PVT() const { return getSwitch("PVT",0); }
274 int steel() const { return getSwitch("STEEL",0); }
275 int csTube() const { return getSwitch("CSTUBE",0); }
276
277private:
278
291
292
293 unsigned int m_n_tiglob{0};
294 unsigned int m_n_timod{0};
295 unsigned int m_n_tilb{0};
296 unsigned int m_n_tigr{0};
297 unsigned int m_n_scnt{0};
298 unsigned int m_n_tifg{0};
299 unsigned int m_n_ticg{0};
300 unsigned int m_n_ticl{0};
301 unsigned int m_EnvNum{0};
302 unsigned int m_EnvSize{0};
303 unsigned int m_EnvBegin{0};
304 unsigned int m_n_cuts{0};
305 unsigned int m_n_saddle{0};
306 unsigned int m_n_tileSwitches;
307
311 const IRDBRecord* m_currentGird{nullptr};
312 const IRDBRecord* m_currentScin{nullptr};
313 const IRDBRecord* m_currentTifg{nullptr};
314 const IRDBRecord* m_currentTicg{nullptr};
315 const IRDBRecord* m_currentTicl{nullptr};
316 const IRDBRecord* m_currentCuts{nullptr};
318
319 int m_currentTiclInd{-1}; // Index of current TICL structure
320
321 std::string m_tag{};
322 std::string m_node{};
323
325
326 std::vector<unsigned int> m_modTypes;
327 void FillModTypes();
328
329 bool m_buildCuts{false};
330 bool m_buildSaddle{false};
331};
332
333#endif
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
void print(char *figname, TCanvas *c1)
void section(const std::string &sec)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
IRDBRecord is one record in the IRDBRecordset object.
Definition IRDBRecord.h:27
std::vector< unsigned int > m_modTypes
double TILBrminimal() const
double TICLncell() const
int SetCurrentTypeByIndex(unsigned int Id)
int SetFirstTiclInDet(int detector)
double TILBdzend1() const
double GetEnvDY() const
double TILBdzperio() const
double GetEnvRin() const
int GetNumberOfEnv() const
int SetCurrentModuleByIndex(unsigned int Id)
double DzSaddleSupport() const
const IRDBRecord * m_currentTileGlob
double GetEnvDZ() const
double SCNTdrw() const
unsigned int m_n_ticl
double CutsYpos() const
double SCNTdr() const
double TICGrc() const
const IRDBRecord * m_currentCuts
int SetCurrentTifg(int section)
double GetEnvDX() const
int TILBnpercutpos() const
double TICGdr() const
double TIGRdw() const
double CutsXpos() const
double GetEnvDPhi() const
double SCNTrc() const
unsigned int GetModTypeSize() const
const IRDBRecord * m_currentTileMod
double TIFGdz() const
double TICLlastrow() const
int SetCurrentGird(int item)
int TILBsection() const
TileDddbManager(IRDBAccessSvc *access, const std::string &version_tag, const std::string &version_node, bool sqliteInput=false)
const IRDBRecord * m_currentScin
const IRDBRecord * m_currentSection
int TILBngirder() const
double TICLholes(unsigned int ind) const
double TICLfirstrow() const
virtual ~TileDddbManager()
double TILBrmax() const
double TILErmax() const
int getSwitch(const char *name, int def_val) const
int TILBnpercutneg() const
IRDBRecordset_ptr m_ticg
double TIGRrc() const
double TILBzoffset() const
int SetCurrentSectionByIndex(unsigned int IdSection)
unsigned int m_EnvBegin
IRDBRecordset_ptr m_tifg
unsigned int m_n_tileSwitches
double GetModDZ() const
double TILBisci_st() const
double TILBdrfront() const
const IRDBRecord * m_currentTicl
double CutsDZ1() const
unsigned int GetNumTicl() const
int SetCurrentCuts(const std::string &input)
Fields of CUTS structure (see also Oracle comments):
unsigned int m_n_scnt
double TILBflangex() const
unsigned int m_n_tilb
double TILBflangey() const
int SCNTitem() const
Fields of SCNT structure (see also Oracle comments):
double TILBdzend() const
double TICLnpmt() const
IRDBRecordset_ptr m_timod
int SetCurrentSaddle(unsigned int index)
Fields of SADDLE structure (see also Oracle comments):
unsigned int m_n_tigr
double GetEnvZShift() const
double TILBdzspac() const
double TILBdzgir() const
const IRDBRecord * m_currentSaddle
double TICGdx1() const
std::string CutsName() const
double TICLsample() const
int SetCurrentModuleByNumber(unsigned int Number)
double GetModDY() const
int addPlatesToCell() const
double CutsDX1() const
double CutsDY2() const
double GetEnvDTheta() const
int SetCurrentTicg(int item)
int SetCurrentTypeByNumber(unsigned int Number)
const IRDBRecord * m_currentTifg
IRDBRecordset_ptr m_tileSwitches
double TICLeta() const
int GetModNumber() const
double TIGRoff() const
IRDBRecordset_ptr m_tile
int GetEnvNModules() const
double SCNTzp() const
IRDBRecordset_ptr m_ticl
double TILBdzend2() const
double GetEnvDPsi() const
double TILEzshift() const
double SCNTdtw() const
double TICLdeta() const
double TILErmam() const
double GetModDTheta() const
int SetCurrentEnvByIndex(unsigned int envelope)
unsigned int m_n_cuts
int SetCurrentSectionByNumber(unsigned int section)
double GetEnvZLength() const
int SetCurrentSection(unsigned int section, bool print=true)
double TICGoff() const
int SetFirstTiclInDetSamp(int detector, double sample)
IRDBRecordset_ptr m_scnt
int TILEnmodul() const
unsigned int m_n_tifg
int SetCurrentScin(int item)
IRDBRecordset_ptr m_tigr
double CutsDX2() const
double TILBdzmast() const
unsigned int m_n_saddle
unsigned int GetNumTilb() const
const IRDBRecord * m_currentTicg
TileDddbManager & operator=(const TileDddbManager &)=delete
double TICGzc() const
double GetModDPhi() const
double TICGdx2() const
int TILBfingpattern() const
IRDBRecordset_ptr m_tiglob
double TICLntilesrow(unsigned int ind) const
double TILBrmin() const
double SCNTdt() const
double CutsDY1() const
TileDddbManager(const TileDddbManager &)=delete
IRDBRecordset_ptr m_tilb
double TICLtower() const
double TILEzmam() const
double RadiusSaddle() const
unsigned int m_EnvSize
double TILBdzmodul() const
unsigned int m_n_tiglob
double TILBphigap() const
unsigned int m_n_ticg
double GetModDX() const
unsigned int m_n_timod
int TILBnperiod() const
int SetCurrentEnvByType(unsigned int envelope)
double GetModDPsi() const
unsigned int m_EnvNum
double TILErmin() const
double TIGRdr() const
double GetEnvRout() const
double TILErmim() const
IRDBRecordset_ptr m_cuts
IRDBRecordset_ptr m_saddle
double TILBrmaximal() const
int TILBcurscint() const
double SCNTdphi() const
int SetCurrentTicl(int detector, double sample, double tower)
double TICGdz() const
const IRDBRecord * m_currentGird
Definition index.py:1