ATLAS Offline Software
Loading...
Searching...
No Matches
DBPixelGeoManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "DBPixelGeoManager.h"
7#include "PixelMaterialMap.h"
8#include "PixelStaveTypes.h"
12
13// to permit access to StoreGate
15
19#include "GeoModelKernel/GeoMaterial.h"
20#include "GeoModelKernel/Units.h"
21
22//
23// Get the pixelDD Manager from SG.
24//
29
30//
31// Distorted material manager
32//
34#include "GaudiKernel/SystemOfUnits.h"
35
37
38#include <string>
39#include <iostream>
40#include <sstream>
41
42using namespace std;
43
46 m_eta(0),
47 m_phi(0),
48 m_currentLD(0),
50 m_side(0),
52 m_servicesOnLadder(true),
53 m_services(true),
54 m_initialLayout(false),
55 m_dc1Geometry(false),
56 m_alignable(true),
57 m_ibl(false),
60 m_dbm(false),
61 m_legacyManager(nullptr),
62 m_gangedIndexMap(nullptr),
63 m_frameElementMap(nullptr),
64 m_diskRingIndexMap(nullptr),
65 m_zPositionMap(nullptr),
66 m_dbVersion(0),
68{
69 m_commonItems = nullptr;
70 m_pDDmgr = nullptr;
71
72 init();
73}
74
75void
77{
78 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Using ORACLE PIXEL GEOMETRY MANAGER" << endmsg;
79
81 const IGeoDbTagSvc *geoDbTag = athenaComps()->geoDbTagSvc();
82
83 // Get version tag and node for Pixel.
84 DecodeVersionKey versionKey(geoDbTag,"Pixel");
85 const std::string& detectorKey = versionKey.tag();
86 const std::string& detectorNode = versionKey.node();
87
88 // Get version tag and node for InnerDetector.
89 DecodeVersionKey indetVersionKey(geoDbTag,"InnerDetector");
90
91 if(geoDbTag->getParamSvcName().starts_with("RDB"))
92 m_versionTag = rdbSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node());
93
95//
96// Gets the structures from the det store
97//
99
100 if(msgLvl(MSG::INFO)) {
101 msg(MSG::INFO) << "Retrieving Record Sets from database ..." << endmsg;
102 msg(MSG::INFO) << "Key = " << detectorKey << " Node = " << detectorNode << endmsg;
103 }
104
105 //atls = rdbSvc->getRecordset("AtlasMother",geoModel->atlasVersion(), "ATLAS");
106 m_PixelSwitches = rdbSvc->getRecordsetPtr("PixelSwitches", detectorKey, detectorNode);
107 m_PixelBarrelGeneral = rdbSvc->getRecordsetPtr("PixelBarrelGeneral", detectorKey, detectorNode);
108 m_PixelBarrelService = rdbSvc->getRecordsetPtr("PixelBarrelService", detectorKey, detectorNode);
109 m_PixelCommon = rdbSvc->getRecordsetPtr("PixelCommon", detectorKey, detectorNode);
110 m_PixelEnvelope = rdbSvc->getRecordsetPtr("PixelEnvelope", detectorKey, detectorNode);
111 m_PixelDisk = rdbSvc->getRecordsetPtr("PixelDisk", detectorKey, detectorNode);
112 m_PixelDiskRing = rdbSvc->getRecordsetPtr("PixelDiskRing", detectorKey, detectorNode);
113 m_PixelRing = rdbSvc->getRecordsetPtr("PixelRing", detectorKey, detectorNode);
114 m_PixelEndcapGeneral = rdbSvc->getRecordsetPtr("PixelEndcapGeneral", detectorKey, detectorNode);
115 m_PixelEndcapService = rdbSvc->getRecordsetPtr("PixelEndcapService", detectorKey, detectorNode);
116 m_PixelEnvelopeService = rdbSvc->getRecordsetPtr("PixelEnvelopeService", detectorKey, detectorNode);
117 m_PixelLayer = rdbSvc->getRecordsetPtr("PixelLayer", detectorKey, detectorNode);
118 m_PixelModule = rdbSvc->getRecordsetPtr("PixelModule", detectorKey, detectorNode);
119 m_PixelModuleSvc = rdbSvc->getRecordsetPtr("PixelModuleSvc", detectorKey, detectorNode);
120 m_PixelStave = rdbSvc->getRecordsetPtr("PixelStave", detectorKey, detectorNode);
121 m_PixelStaveZ = rdbSvc->getRecordsetPtr("PixelStaveZ", detectorKey, detectorNode);
122 m_PixelTopLevel = rdbSvc->getRecordsetPtr("PixelTopLevel", detectorKey, detectorNode);
123 m_PixelReadout = rdbSvc->getRecordsetPtr("PixelReadout", detectorKey, detectorNode);
124 m_PixelGangedPixels = rdbSvc->getRecordsetPtr("GangedPixels", detectorKey, detectorNode);
125 m_PixelBarrelCable = rdbSvc->getRecordsetPtr("PixelBarrelCable", detectorKey, detectorNode);
126 m_PixelTMT = rdbSvc->getRecordsetPtr("PixelTMT", detectorKey, detectorNode);
127 m_PixelOmega = rdbSvc->getRecordsetPtr("PixelOmega", detectorKey, detectorNode);
128 m_PixelOmegaGlue = rdbSvc->getRecordsetPtr("PixelOmegaGlue", detectorKey, detectorNode);
129 m_PixelAlTube = rdbSvc->getRecordsetPtr("PixelAlTube", detectorKey, detectorNode);
130 m_PixelFluid = rdbSvc->getRecordsetPtr("PixelFluid", detectorKey, detectorNode);
131 m_PixelConnector = rdbSvc->getRecordsetPtr("PixelConnector", detectorKey, detectorNode);
132 m_PixelPigtail = rdbSvc->getRecordsetPtr("PixelPigtail", detectorKey, detectorNode);
133 m_PixelSimpleService = rdbSvc->getRecordsetPtr("PixelSimpleService", detectorKey, detectorNode);
134 m_PixelFrame = rdbSvc->getRecordsetPtr("PixelFrame", detectorKey, detectorNode);
135 m_PixelFrameSect = rdbSvc->getRecordsetPtr("PixelFrameSect", detectorKey, detectorNode);
136 m_PixelIBLStave = rdbSvc->getRecordsetPtr("PixelIBLStave" , detectorKey, detectorNode);
137 m_PixelIBLSupport = rdbSvc->getRecordsetPtr("PixelIBLSupport", detectorKey, detectorNode);
138 m_PixelIBLFlex = rdbSvc->getRecordsetPtr("PixelIBLFlex", detectorKey, detectorNode);
139 m_PixelIBLFlexMaterial = rdbSvc->getRecordsetPtr("PixelIBLFlexMaterial", detectorKey, detectorNode);
140 m_PixelIBLGlueGrease = rdbSvc->getRecordsetPtr("PixelIBLGlueGrease", detectorKey, detectorNode);
141 m_PixelConicalStave = rdbSvc->getRecordsetPtr("PixelConicalStave", detectorKey, detectorNode);
142
143 // Weights table
144 m_weightTable = rdbSvc->getRecordsetPtr("PixelWeights", detectorKey, detectorNode);
145
146 // Extra Scaling table. This is used for extra material studies. For nominal material the table should be empty.
147 // NB this is at InnerDetector level node.
148 m_scalingTable = rdbSvc->getRecordsetPtr("PixelMatScaling", indetVersionKey.tag(), indetVersionKey.node());
149
150 // MaterialMap
151 m_materialTable = rdbSvc->getRecordsetPtr("PixelMaterialMap", detectorKey, detectorNode);
152
153 // Pixel stave types
154 m_staveTypeTable = rdbSvc->getRecordsetPtr("PixelStaveType", detectorKey, detectorNode);
155
156 // DBM
157 m_DBMTelescope = rdbSvc->getRecordsetPtr("DBMTelescope", detectorKey, detectorNode);
158 m_DBMBracket = rdbSvc->getRecordsetPtr("DBMBracket", detectorKey, detectorNode);
159 m_DBMCage = rdbSvc->getRecordsetPtr("DBMCage", detectorKey, detectorNode);
160 m_DBMModule = rdbSvc->getRecordsetPtr("DBMModule", detectorKey, detectorNode);
161 m_dbmWeightTable = rdbSvc->getRecordsetPtr("DBMMaterials", detectorKey, detectorNode);
162
164
165 if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Database version number: " << m_dbVersion << endmsg;
166
167 if (m_dbVersion < 4) {
168 m_legacyManager = new PixelLegacyManager(rdbSvc, detectorKey, detectorNode);
169 }
170
171 if(msgLvl(MSG::INFO)) msg(MSG::INFO) << "... Record Sets retrieved." << endmsg;
172
174
175 // Set default lenth unit to Gaudi::Units::mm for newer version and Gaudi::Units::cm for older versions
176 m_defaultLengthUnit = (m_dbVersion < 3) ? Gaudi::Units::cm : Gaudi::Units::mm;
177
178 // Get the top level placements
180
181 // If all individual pieces are not present, then actually all are present.
182 m_allPartsPresent = (!m_placements->present("Barrel") && !m_placements->present("EndcapA") && !m_placements->present("EndcapC"));
183
184 // cache the number of inner frames
185 if (m_dbVersion < 3) {
186 m_barrelInFrames = (*m_PixelBarrelGeneral)[0]->getInt("NFRAMEIN");
187 m_endcapInFrames = (*m_PixelEndcapGeneral)[0]->getInt("NFRAMEIN");
188 } else {
191 }
192
193 //
194 // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
195 // with weights table if it exists
196
197 m_pMatMgr = new InDetMaterialManager("PixelMaterialManager", athenaComps());
198 m_pMatMgr->addWeightTable(m_weightTable, "pix");
199 m_pMatMgr->addScalingTable(m_scalingTable);
200
201 // add the DBM weight table
202 m_pMatMgr->addWeightTable(m_dbmWeightTable, "pix");
203
204 // Create material map
206 if (m_materialTable->size() == 0) addDefaultMaterials();
207
208 // Create stave type map
210
211
212 //
213 // Print the version number for the barrel and endcap geometry
214 //
215 //cout << "Instantiating Pixel Detector" << endl;
216 //cout << "Barrel Version " << this->PixelBarrelMajorVersion() << "." << this->PixelBarrelMinorVersion() << endl;
217 //cout << "Endcap Version " << this->PixelEndcapMajorVersion() << "." << this->PixelEndcapMinorVersion() << endl;
218}
219
224
229
230
232{
233 delete m_placements;
235 delete m_materialMap;
236 delete m_pixelStaveTypes;
237 delete m_legacyManager;
238 delete m_pMatMgr;
239 delete m_gangedIndexMap;
240 delete m_diskRingIndexMap;
241 delete m_zPositionMap;
242 delete m_frameElementMap;
243}
244
245
251
252
255{
256 return m_commonItems;
257}
258
259
260void
265
266
267const PixelID *
272
273
274const GeoTrf::Transform3D &
275DBPixelGeoManager::partTransform(const std::string & partName) const
276{
277 return m_placements->transform(partName);
278}
279
280
281bool
282DBPixelGeoManager::partPresent(const std::string & partName) const
283{
284 // First check if overridden from text file.
285 if (partName == "Barrel") {
286 if (db()->testField("PixelCommon","DOBARREL")) {
287 return db()->getInt("PixelCommon","DOBARREL");
288 }
289 } else if (partName == "EndcapA" || partName == "EndcapC") {
290 if (db()->testField("PixelCommon","DOENDCAPS")) {
291 return db()->getInt("PixelCommon","DOENDCAPS");
292 }
293 }
294 // otherwise check database.
295 return (m_allPartsPresent || m_placements->present(partName));
296}
297
299//
300// Setting of Layer/Disk and Barrel/EndCap
301//
304{
305 if(isBarrel() ) {
306 if(i <= PixelBarrelNLayer()) {
307 m_currentLD=i;
308 } else {
309 msg(MSG::ERROR) << "Layer set out of bounds: " << i << ", Setting it to 0" << endmsg;
310 m_currentLD = 0;
311 }
312 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<" Current layer set to " << m_currentLD << endmsg;
313 }
314 if(isEndcap() ) {
315 if (i<= PixelEndcapNDisk() ) {
316 m_currentLD=i;
317 } else {
318 msg(MSG::ERROR) << "Disk set out of bounds: " << i << ", Setting it to 0" << endmsg;
319 m_currentLD = 0;
320 }
321 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<" Current disk set to " << m_currentLD << endmsg;
322 }
323 if(isDBM() ) {
324 if (i<= 2 ) {
325 m_currentLD=i;
326 } else {
327 msg(MSG::ERROR) << "DBM: Disk set out of bounds: " << i << ", Setting it to 0" << endmsg;
328 m_currentLD = 0;
329 }
330 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<" Current disk set to " << m_currentLD << endmsg;
331 }
332}
333
335 //msg(MSG::DEBUG) << "Setting Barrel" << endmsg;
336 m_BarrelEndcap = 0;
337}
339 m_BarrelEndcap = 1;
340 //msg(MSG::DEBUG) << "Setting Endcap" << endmsg;
341}
343 m_BarrelEndcap = 2;
344 //msg(MSG::DEBUG) << "Setting DBM" << endmsg;
345}
346
347//
348// Check if the current layer/disk has to be retrieved
349// By default in MySQL all the three layers have to be retrieved
350// If m_initialLayout is true we ignore NOVA for layer/disk 1.
351// For initial layout layer=1 and disk=1 (2nd layer and disk) is missing.
352//
355 if(isBarrel()) {
356 if (m_initialLayout && m_currentLD == 1) return false;
357 std::ostringstream A;
358 A << "_" << m_currentLD;
359 // More than 3 layers not yet supported in database so
360 // if not present in text file assume using this layer
361 return db()->getInt(m_PixelBarrelGeneral,"USELAYER"+A.str());
362 }
363 if(isEndcap() ) {
364 if (m_initialLayout && m_currentLD == 1) return false;
365 std::ostringstream A;
366 A << "_" << m_currentLD;
367 // More than 3 disks not yet supported in database so
368 // if not present in text file assume using this disks
369 return db()->getInt(m_PixelEndcapGeneral,"USEDISK"+A.str());
370 }
371 return false;
372}
373
374
376 return m_BarrelEndcap == 0;
377}
379 return m_BarrelEndcap == 1;
380 return false;
381}
383 return m_BarrelEndcap == 2;
384}
385
392
394 return m_initialLayout;
395}
396
398 m_dc1Geometry = flag;
399 if (m_legacyManager) m_legacyManager->SetDC1Geometry(flag);
400}
401
403 return m_dc1Geometry;
404}
405
407 return m_alignable;
408}
409
410
412 if(m_pDDmgr == nullptr) {
413 //
414 // retrieve the pointer to the DD manager
415 //
416 StatusCode sc = athenaComps()->detStore()->retrieve(m_pDDmgr);
417 if (sc.isFailure()) {
418 msg(MSG::ERROR) << "Cannot retrieve PixelDetectorManager" << endmsg;
419 }
420 }
421 return m_pDDmgr;
422}
423
424
429
430
432//
433// Calculate Thickness. This is used for the materials
434// which thickness is given in % of r.l.
435//
437double DBPixelGeoManager::CalculateThickness(double tck,const string& mat) {
438 GeoIntrusivePtr<const GeoMaterial> material{m_pMatMgr->getMaterial(mat)};
439 double rl = material->getRadLength();
440 return -1.*rl*tck/100.;
441}
442
444{
445 int type = 0;
446 if (ibl()) {
447 if (isBarrel()) {
448 type = db()->getInt(m_PixelLayer,"MODULETYPE",m_currentLD);
449 }
450 } else {
451 if(isBarrel()) type = m_currentLD;
453 }
454 return type;
455}
456
458{
459 int type = -1;
460 if (!isBarrel()||m_currentLD>0) return type;
461
462 if (ibl()) {
463 try {
464 type = db()->getInt(m_PixelLayer,"MODULETYPE3D",m_currentLD);
465 return type;
466 }
467 catch(...)
468 {
469 return moduleType()+1;
470 }
471 }
472
473 return type;
474}
475
476
477
479//
480// Si Boards Parameters:
481//
484{
485 if(ibl()&&isModule3D){
486 return db()->getDouble(m_PixelModule,"BOARDWIDTH",moduleType3D())*mmcm();
487 }
488
489 return db()->getDouble(m_PixelModule,"BOARDWIDTH",moduleType())*mmcm();
490}
491
493{
494 if(ibl()&&isModule3D)
495 return db()->getDouble(m_PixelModule,"BOARDLENGTH",moduleType3D())*mmcm();
496
497 return db()->getDouble(m_PixelModule,"BOARDLENGTH",moduleType())*mmcm();
498}
499
501{
502 if (m_dc1Geometry && isBarrel() && (m_currentLD == 0)) {
503 return 200*Gaudi::Units::micrometer;
504 }
505
506 if(ibl()&&isModule3D)
507 return db()->getDouble(m_PixelModule,"BOARDTHICK",moduleType3D())*mmcm();
508 return db()->getDouble(m_PixelModule,"BOARDTHICK",moduleType())*mmcm();
509}
510
512{
513 return DesignZActiveArea(isModule3D);
514}
515
516
518//
519// Hybrid Parameters:
520//
523{
524 if(ibl()&&isModule3D)
525 return db()->getDouble(m_PixelModule,"HYBRIDWIDTH",moduleType3D())*mmcm();
526
527 return db()->getDouble(m_PixelModule,"HYBRIDWIDTH",moduleType())*mmcm();
528}
529
531{
532 if(ibl()&&isModule3D)
533 return db()->getDouble(m_PixelModule,"HYBRIDLENGTH",moduleType3D())*mmcm();
534
535 return db()->getDouble(m_PixelModule,"HYBRIDLENGTH",moduleType())*mmcm();
536}
537
539{
540 if(ibl()&&isModule3D)
541 return db()->getDouble(m_PixelModule,"HYBRIDTHICK",moduleType3D())*mmcm();
542
543 return db()->getDouble(m_PixelModule,"HYBRIDTHICK",moduleType())*mmcm();
544}
545
547//
548// Chip Parameters:
549//
551
552double DBPixelGeoManager::PixelChipWidth(bool isModule3D)
553{
554 if(ibl()&&isModule3D)
555 return db()->getDouble(m_PixelModule,"CHIPWIDTH",moduleType3D())*mmcm();
556
557 return db()->getDouble(m_PixelModule,"CHIPWIDTH",moduleType())*mmcm();
558}
559
561{
562 if(ibl()&&isModule3D)
563 return db()->getDouble(m_PixelModule,"CHIPLENGTH",moduleType3D())*mmcm();
564
565 return db()->getDouble(m_PixelModule,"CHIPLENGTH",moduleType())*mmcm();
566}
567
568double DBPixelGeoManager::PixelChipGap(bool isModule3D)
569{
570 if(ibl()&&isModule3D)
571 return db()->getDouble(m_PixelModule,"CHIPGAP",moduleType3D())*mmcm();
572
573 return db()->getDouble(m_PixelModule,"CHIPGAP",moduleType())*mmcm();
574}
575
577{
578 if(!ibl()||GetLD()!=0||!isBarrel()||!(db()->testField(m_PixelModule,"CHIPOFFSET"))){
579 return 0.;
580 }
581
582 if(isModule3D)
583 return db()->getDouble(m_PixelModule,"CHIPOFFSET",moduleType3D())*mmcm();
584
585 return db()->getDouble(m_PixelModule,"CHIPOFFSET",moduleType())*mmcm();
586}
587
589 if(ibl()&&isModule3D)
590 return db()->getDouble(m_PixelModule,"CHIPTHICK",moduleType3D())*mmcm();
591
592 return db()->getDouble(m_PixelModule,"CHIPTHICK",moduleType())*mmcm();
593}
594
595
596
598//
599// Module services
600//
602
604{
605 if(!ibl()||GetLD()>0||!isBarrel()) return 0;
606
607 if (db()->getTableSize(m_PixelModuleSvc))
609 return 0;
610}
611
613{
614 return db()->getDouble(m_PixelModuleSvc,"LENGTH",svc)*mmcm();
615}
616
618{
619 return db()->getDouble(m_PixelModuleSvc,"WIDTH",svc)*mmcm();
620}
621
623{
624 return db()->getDouble(m_PixelModuleSvc,"THICK",svc)*mmcm();
625}
626
628{
629 return db()->getDouble(m_PixelModuleSvc,"XOFFSET",svc)*mmcm();
630}
631
633{
634 return db()->getDouble(m_PixelModuleSvc,"YOFFSET",svc)*mmcm();
635}
636
638{
639 return db()->getDouble(m_PixelModuleSvc,"ZOFFSET",svc)*mmcm();
640}
641
643{
644 return db()->getInt(m_PixelModuleSvc,"FULLSIZE",svc);
645}
646
648{
649 return db()->getInt(m_PixelModuleSvc,"MODULE3D",svc)*mmcm();
650}
651
653{
654 return db()->getString(m_PixelModuleSvc,"NAME",svc);
655}
656
658{
659 return db()->getString(m_PixelModuleSvc,"MATERIAL",svc);
660}
661
662
663
665//
666// Pixel Disks carbon structure
667//
670
671 int isup=0;
672 if (a == "Inner") {
673 isup = 0;
674 } else if(a == "Central") {
675 isup = 1;
676 } else {
677 isup = 2;
678 }
679
680 return PixelDiskSupportRMin(isup);
681}
682
684 int isup=0;
685 if (a == "Inner") {
686 isup = 0;
687 } else if(a == "Central") {
688 isup = 1;
689 } else {
690 isup = 2;
691 }
692 return PixelDiskSupportRMax(isup);
693}
694
696
697 int isup=0;
698 if (a == "Inner") {
699 isup = 0;
700 } else if(a == "Central") {
701 isup = 1;
702 } else {
703 isup = 2;
704 }
705 return PixelDiskSupportThickness(isup);
706}
707
708
710
711 if (dbVersion() < 3) return 0;
712 int isup = 0;
713 if (a == "Inner") {
714 isup = 0;
715 } else if(a == "Central") {
716 isup = 1;
717 } else {
718 isup = 2;
719 }
721}
722
723
725//
726// Central Services
727//
729//
730// This is complicated in the DB...
731// If Rmin < 0 this means that the cylinder has to be placed only once
732// So I return RMin with its sign, for further processing by the service
733// methods.
734// If RMax is <0 the thickness is given in % of r.l. which have to be
735// calculated by the method calculatethickness
736//
737// If Zmin and Zmax have DIFFERENT sign, then the thickness is given in
738// % of r.l....
739//
740
742 // FIXME
743 /*
744 if (dbVersion() < 3) {
745 if(isBarrel() ) {
746 if(a == "Inside") return (*m_PixelBarrelGeneral)[0]->getInt("NFRAMEIN");
747 if(a == "Outside") return (*m_PixelBarrelGeneral)[0]->getInt("NFRAMEOUT");
748 }
749 if(isEndcap() ) {
750 if(a == "Inside") return (*m_PixelEndcapGeneral)[0]->getInt("NFRAMEIN");
751 if(a == "Outside") return (*m_PixelEndcapGeneral)[0]->getInt("NFRAMEOUT");
752 }
753 return 0;
754 } else {
755 */
756 // a is ignored. Use frame num to distinguish between inside (<1000) and ouside (>=1000).
757 if(type == "simple") return db()->getTableSize(m_PixelSimpleService);
758 if(type == "barrel") return db()->getTableSize(m_PixelBarrelService);
759 if(type == "endcap") return db()->getTableSize(m_PixelEndcapService);
760 if(type == "envelope") return db()->getTableSize(m_PixelEnvelopeService);
761 return 0;
762 //}
763}
764
765// Name used when naming G4/Geo volumes
766std::string DBPixelGeoManager::PixelServiceName(const std::string & type, int index) {
767
768 if (useLegacy() || !getPixelServiceRecordTestField("VOLNAME",type,index)) {
769 return "";
770 } else {
771 return getPixelServiceRecordString("VOLNAME",type,index);
772 }
773}
774
775
776// Flag to say whether volume should be described in both positive and
777// negative halves.
778bool DBPixelGeoManager::PixelServiceZsymm(const std::string & type, int index) {
779 if (dbVersion() < 3 || !getPixelServiceRecordTestField("ZSYMM",type,index)) {
780 // If ZSYMM not defined use old logic to determine if volume is
781 // duplicated in both positive and negative halves.
782 double rmin = getPixelServiceRecordDouble("RIN",type,index);
783 double zmin = getPixelServiceRecordDouble("ZIN",type,index);
784 return (rmin>0 && zmin > 0.000001);
785 } else {
786 return getPixelServiceRecordInt("ZSYMM",type,index);
787 }
788}
789
790
791double DBPixelGeoManager::PixelServiceRMin(const std::string & type, int index) {
792 return std::abs(getPixelServiceRecordDouble("RIN",type,index)) * mmcm();
793}
794
795double DBPixelGeoManager::PixelServiceRMax(const std::string & type, int index) {
796 double rtmp = getPixelServiceRecordDouble("ROUT",type,index);
797 // If this is negative this is the thickness of the cyl in % of r.l.
798 double rmin = PixelServiceRMin(type,index);
799 double rmax = 0;
800 if(rtmp > 0) {
801 rmax = rtmp * mmcm();
802 } else {
803 string material = PixelServiceMaterial(type,index);
804 rmax = rmin + CalculateThickness(rtmp, material);
805 }
806 return rmax;
807}
808
809double DBPixelGeoManager::PixelServiceRMin2(const std::string & type, int index) {
811 return 0;
812 } else {
813 return getPixelServiceRecordDouble("RIN2",type,index) * Gaudi::Units::mm;
814 }
815}
816
817double DBPixelGeoManager::PixelServiceRMax2(const std::string & type, int index) {
819 return 0;
820 } else {
821 return getPixelServiceRecordDouble("ROUT2",type,index) * Gaudi::Units::mm;
822 }
823}
824
825double DBPixelGeoManager::PixelServiceZMin(const std::string & type, int index) {
826 return getPixelServiceRecordDouble("ZIN",type,index) * mmcm();
827}
828
829double DBPixelGeoManager::PixelServiceZMax(const std::string & type, int index) {
830 double zout = getPixelServiceRecordDouble("ZOUT",type,index);
831 double zmin = PixelServiceZMin(type,index);
832 double zmax = 0;
833 // If zin and zout are opposite sign then zout is the thickness of the cyl in % of r.l.
834 if(zmin * zout > -0.000000001) {
835 zmax = zout * mmcm();
836 } else {
837 string material = PixelServiceMaterial(type,index);
838 double sign = (zmin > 0) ? 1: -1;
839 zmax = zmin + sign*CalculateThickness(zout, material);
840 }
841 return zmax;
842}
843
844double DBPixelGeoManager::PixelServicePhiLoc(const std::string & type, int index) {
846 return 0;
847 } else {
848 return getPixelServiceRecordDouble("PHI",type,index) * Gaudi::Units::degree;
849 }
850}
851
852double DBPixelGeoManager::PixelServiceWidth(const std::string & type, int index) {
854 return 0;
855 } else {
856 // Can be in degree or Gaudi::Units::mm. Leave it to GeoPixelServices to interpret.
857 return getPixelServiceRecordDouble("WIDTH",type,index);
858 }
859}
860
861int DBPixelGeoManager::PixelServiceRepeat(const std::string & type, int index) {
863 return 0;
864 } else {
865 return getPixelServiceRecordInt("REPEAT",type,index);
866 }
867}
868
869std::string DBPixelGeoManager::PixelServiceShape(const std::string & type, int index) {
870 if (type == "simple") return "TUBE";
872 return "TUBE";
873 } else {
874 return getPixelServiceRecordString("SHAPE",type,index);
875 }
876}
877
878
879int DBPixelGeoManager::PixelServiceShift(const std::string & type, int index) {
881 return 0;
882 } else {
883 return getPixelServiceRecordInt("SHIFT",type,index);
884 }
885}
886
887
888int DBPixelGeoManager::PixelServiceLD(const std::string & type, int index) {
889 return getPixelServiceRecordInt("LAYERNUM",type,index)-1;
890}
891
892string DBPixelGeoManager::PixelServiceMaterial(const std::string & type, int index) {
893
894 int imat = 0;
895 if (type != "simple") {
896 imat = getPixelServiceRecordInt("MATERIAL",type,index);
897 }
898 std::string materialName;
899 if (!imat) {
900 materialName = getPixelServiceRecordString("MATERIALNAME",type,index);
901 } else {
902 // Old
903 if(type == "barrel") {
904 string mat[11] = {
905 "std::Berillia",
906 "std::Carbon",
907 "pix::Services",
908 "pix::Titanium",
909 "pix::MatPP11",
910 "pix::MatPP12",
911 "pix::MatPP13",
912 "pix::MatPP14",
913 "pix::MatPP15",
914 "pix::MatPP16",
915 "pix::MatPP17"};
916 materialName = mat[imat-1];
917 }
918 if(type == "endcap") {
919 string mat[4] = {
920 "std::Berillia",
921 "std::Carbon",
922 "pix::ECServices",
923 "pix::Disk"};
924 materialName = mat[imat-1];
925 }
926 }
927 return materialName;
928}
929
930
932 // In older version frame num indicated "inside" or "outside"
933 // 0-999: Inside
934 // >=1000: Outside
935 // No frame number in simple table.
936 if (type == "simple") return index+1;
937 int framenum = getPixelServiceRecordInt("FRAMENUM",type,index);
938 if (framenum <= 0) return index+1;
939 if (dbVersion() < 3) {
940 if(type == "barrel") {
941 if (index >= m_barrelInFrames) framenum += 1000;
942 }
943 if(type == "endcap") {
944 if (index >= m_endcapInFrames) framenum += 1000;
945 }
946 }
947 return framenum;
948 // FIXME
949 /*
950 if (dbVersion() < 3) return framenum;
951 if (type == "Inside" && framenum < 1000) return framenum;
952 if (type == "Outside" && framenum >= 1000) return framenum%1000;
953 return -1;
954 */
955}
956
957// Access child/envelope service parameters
959
960 if (type != "envelope") return 0;
961
962 try{
963 int envnum = getPixelServiceRecordInt("ENVNUM",type,index);
964 return envnum;
965 }
966 catch(...)
967 {}
968
969 return 0;
970}
971
973
974 // if (type == "envelope") return 0;
975
976 if (type == "envelope"){
977 try{
978 int envnum = getPixelServiceRecordInt("ENVPARENT",type,index);
979 return envnum;
980 }
981 catch(...)
982 {}
983 }
984 else {
985
986 try{
987 int envnum = getPixelServiceRecordInt("ENVELOPE",type,index);
988 return envnum;
989 }
990 catch(...)
991 {
992 }
993 }
994
995
996 return 0;
997}
998
999std::string DBPixelGeoManager::getPixelServiceRecordString(const std::string & name, const std::string & type, int index) {
1001 return db()->getString(recordSet, name, index);
1002}
1003
1004int DBPixelGeoManager::getPixelServiceRecordInt(const std::string & name, const std::string & type, int index) {
1006 return db()->getInt(recordSet, name, index);
1007}
1008
1009
1010double DBPixelGeoManager::getPixelServiceRecordDouble(const std::string & name, const std::string & type, int index) {
1012 return db()->getDouble(recordSet, name, index);
1013}
1014
1015bool DBPixelGeoManager::getPixelServiceRecordTestField(const std::string & name, const std::string & type, int index) {
1016 try {
1018 return db()->testField(recordSet, name, index);
1019 }
1020 catch(...){}
1021 return false;
1022}
1023
1024
1025// Returns IRDBRecordset
1027 // m_barrelInFrames and m_endcapInFrames should be zero in dbVersion >= 3
1028 IRDBRecordset_ptr recordSet;
1029 if (type == "simple") {
1030 recordSet = m_PixelSimpleService;
1031 } else if(type == "barrel") {
1032 recordSet = m_PixelBarrelService;
1033 //if(type != "Inside") index += m_barrelInFrames;
1034 } else if(type == "endcap") {
1035 recordSet = m_PixelEndcapService;
1036 //if(type != "Inside") index += m_endcapInFrames;
1037 } else if(type == "envelope") {
1038 recordSet = m_PixelEnvelopeService;
1039 //if(type != "Inside") index += m_endcapInFrames;
1040 } else {
1041 msg(MSG::ERROR) << "ERROR: getPixelServiceRecord(), neither Barrel of Endcap selected!" << endmsg;
1042 }
1043 return recordSet;
1044}
1045
1047{
1048 double tck = db()->getDouble(m_PixelDisk,"CABLETHICK",m_currentLD);
1049 if( tck > 0.) {
1050 return tck*mmcm();
1051 } else {
1052 std::string matName = getMaterialName("DiskCable", m_currentLD);
1053 return CalculateThickness(tck,matName);
1054 }
1055}
1056
1057int
1059{
1060 if (dbVersion() < 3) return m_legacyManager->PixelCableElements();
1062}
1063
1064int
1066{
1067 if (dbVersion() < 3) return 0;
1068 return db()->getInt(m_PixelBarrelCable,"LAYER",index);
1069}
1070
1071int
1073{
1074 if (dbVersion() < 3) return 0;
1075 return db()->getInt(m_PixelBarrelCable,"BISTAVE",index);
1076}
1077
1078
1079double
1081{
1082 if (dbVersion() < 3) return m_legacyManager->PixelCableZStart(index);
1083 return db()->getDouble(m_PixelBarrelCable,"ZSTART",index) * Gaudi::Units::mm;
1084}
1085
1086double
1088{
1089 if (dbVersion() < 3) return m_legacyManager->PixelCableZEnd(index);
1090 return db()->getDouble(m_PixelBarrelCable,"ZEND",index) * Gaudi::Units::mm;
1091}
1092
1093double
1095{
1096 if (dbVersion() < 3) return m_legacyManager->PixelCableWidth(index);
1097 return db()->getDouble(m_PixelBarrelCable,"WIDTH",index) * Gaudi::Units::mm;
1098}
1099
1100double
1102{
1103 if (dbVersion() < 3) return m_legacyManager->PixelCableThickness(index);
1104 return db()->getDouble(m_PixelBarrelCable,"THICK",index) * Gaudi::Units::mm;
1105}
1106
1107double
1109{
1110 if (dbVersion() < 3) return m_legacyManager->PixelCableStackOffset(index);
1111 return db()->getDouble(m_PixelBarrelCable,"STACKPOS",index) * Gaudi::Units::mm;
1112}
1113
1114double
1116{
1117 if (dbVersion() < 3) return 0;
1118 return db()->getDouble(m_PixelBarrelCable,"WEIGHT",index) * GeoModelKernelUnits::g;
1119}
1120
1121std::string
1123{
1124 if (dbVersion() < 3) return m_legacyManager->PixelCableLabel(index);
1125 return db()->getString(m_PixelBarrelCable,"LABEL",index);
1126}
1127
1128
1129//
1130// Version of the Geometry
1131//
1132
1134 // This determines a version depending on various changes in the database;
1135 int version = 0;
1136
1137 if (!(*m_PixelLayer)[0]->isFieldNull("PHIOFMODULEZERO")) version = 1;
1138 if (m_PixelReadout->size() != 0) version = 2;
1139 if (m_weightTable->size() != 0) version = 3;
1140 if (m_PixelTMT->size() != 0) version = 4; // Removed all legacy tables
1141
1142 return version;
1143}
1144
1145
1146
1147std::string DBPixelGeoManager::getMaterialName(const std::string & volumeName, int layerdisk, int typenum) {
1148 return m_materialMap->getMaterial(layerdisk, typenum, volumeName);
1149}
1150
1151
1153 // This is for backward compatibilty. Newer geometies get the
1154 // gets them from the database.
1155 m_materialMap->addMaterial(0,0,"Sensor","std::Silicon");
1156 m_materialMap->addMaterial(0,0,"Chip","pix::Chip");
1157 m_materialMap->addMaterial(0,0,"Hybrid","pix::Hybrid");
1158 m_materialMap->addMaterial(0,0,"Omega","pix::MatOmega");
1159 m_materialMap->addMaterial(0,0,"AlTube","pix::MatAlTube");
1160 m_materialMap->addMaterial(1,0,"AlTube","pix::MatAlTube");
1161 m_materialMap->addMaterial(2,0,"AlTube","pix::MatAlTubeFix");
1162 m_materialMap->addMaterial(0,1,"Fluid","pix::MatCap1");
1163 m_materialMap->addMaterial(0,2,"Fluid","pix::MatCap2");
1164 m_materialMap->addMaterial(0,0,"TMT","pix::MatTMT");
1165 m_materialMap->addMaterial(0,0,"GlueOmegaStave","pix::MatGlue");
1166 m_materialMap->addMaterial(0,0,"Connector","pix::MatConn");
1167 m_materialMap->addMaterial(0,0,"PigtailCyl","pix::MatPigtail");
1168 m_materialMap->addMaterial(0,0,"PigtailFlat","pix::MatPigtail");
1169 m_materialMap->addMaterial(0,0,"Cable","pix::MatT0");
1170 m_materialMap->addMaterial(0,0,"DiskCable","pix::ECCables");
1171 m_materialMap->addMaterial(0,0,"DiskSupport","pix::Disk");
1172 m_materialMap->addMaterial(0,0,"Frame","std::Carbon");
1173 m_materialMap->addMaterial(0,0,"EndCone","std::Carbon");
1174}
1175
1177{
1178 std::ostringstream o;
1179 if(isBarrel()) {
1180 if (m_currentLD == 0) {
1181 o << "BL";
1182 } else {
1183 o << "L" << m_currentLD;
1184 }
1185 } else {
1186 o << "D" << m_currentLD;
1187 }
1188 return o.str();
1189}
1190
1192{
1193 return static_cast<int>((*m_PixelBarrelGeneral)[0]->getDouble("VERSION"));
1194}
1195
1197{
1198 return static_cast<int>(((*m_PixelBarrelGeneral)[0]->getDouble("VERSION") - PixelBarrelMajorVersion())*10 + 0.5);
1199}
1200
1202{
1203 return static_cast<int>((*m_PixelEndcapGeneral)[0]->getDouble("VERSION"));
1204}
1205
1207{
1208 return static_cast<int>(((*m_PixelEndcapGeneral)[0]->getDouble("VERSION") - PixelEndcapMajorVersion())*10 + 0.5);
1209}
1210
1211
1213{
1214 std::string description;
1215 if (db()->testField(m_PixelSwitches,"DESCRIPTION")) {
1216 description = db()->getString(m_PixelSwitches,"DESCRIPTION");
1217 }
1218 return description;
1219}
1220
1222{
1223 std::string name;
1224 if (db()->testField(m_PixelSwitches,"VERSIONNAME")) {
1225 name = db()->getString(m_PixelSwitches,"VERSIONNAME");
1226 }
1227 return name;
1228}
1229
1231{
1232 std::string layout;
1233 if (db()->testField(m_PixelSwitches,"LAYOUT")) {
1234 layout = db()->getString(m_PixelSwitches,"LAYOUT");
1235 }
1236 return layout;
1237}
1238
1239
1241{
1242 if (db()->getTableSize(m_PixelEnvelope)) {
1243 double rmin = PixelEnvelopeRMin(0);
1244 for (unsigned int i = 1; i < db()->getTableSize(m_PixelEnvelope); i++) {
1245 rmin = std::min(rmin, PixelEnvelopeRMin(i));
1246 }
1247 return rmin;
1248 } else {
1249 return db()->getDouble(m_PixelCommon,"RMIN")*mmcm();
1250 }
1251}
1252
1254{
1255 if (db()->getTableSize(m_PixelEnvelope)) {
1256 double rmax = PixelEnvelopeRMax(0);
1257 for (unsigned int i = 1; i < db()->getTableSize(m_PixelEnvelope); i++) {
1258 rmax = std::max(rmax, PixelEnvelopeRMax(i));
1259 }
1260 return rmax;
1261 } else {
1262 return db()->getDouble(m_PixelCommon,"RMAX")*mmcm();
1263 }
1264}
1265
1267{
1268
1269 if (db()->getTableSize(m_PixelEnvelope)) {
1270 // The table should contain only +ve z values.
1271 return PixelEnvelopeZ(db()->getTableSize(m_PixelEnvelope) - 1);
1272 } else {
1273 return db()->getDouble(m_PixelCommon,"HALFLENGTH")*mmcm();
1274 }
1275}
1276
1278{
1279 // Return true if the envelope can be built as a simple tube.
1280 // otherwise it will be built as a PCON.
1281 // True if size is 0 or 1.
1282 return (!(db()->getTableSize(m_PixelEnvelope) > 1));
1283}
1284
1289
1291{
1292 double zmin = db()->getDouble(m_PixelEnvelope,"Z",i) * Gaudi::Units::mm;
1293 if (zmin < 0) msg(MSG::ERROR) << "PixelEnvelope table should only contain +ve z values" << endmsg;
1294 return std::abs(zmin);
1295}
1296
1298{
1299 return db()->getDouble(m_PixelEnvelope,"RMIN",i) * Gaudi::Units::mm;
1300}
1301
1303{
1304 return db()->getDouble(m_PixelEnvelope,"RMAX",i) * Gaudi::Units::mm;
1305}
1306
1307
1309{
1310 return db()->getInt(m_PixelBarrelGeneral,"NLAYER");
1311}
1312
1313// m_PixelBarrelGeneral
1315{
1316 return db()->getDouble(m_PixelBarrelGeneral,"RMIN")*mmcm();
1317}
1318
1320{
1321 return db()->getDouble(m_PixelBarrelGeneral,"RMAX")*mmcm();
1322}
1323
1325{
1326 return db()->getDouble(m_PixelBarrelGeneral,"HALFLENGTH")*mmcm();
1327}
1328
1329// Described in general services for later geometries.
1331{
1332 if (useLegacy()) return m_legacyManager->oldFrame();
1333 return false;
1334}
1335
1336// For new geometry a detailed frame is built.
1341
1346
1348{
1349 return db()->getDouble(m_PixelFrame, "RMINSIDE", sectionIndex) * Gaudi::Units::mm;
1350}
1351
1353{
1354 return db()->getDouble(m_PixelFrame, "RMAXSIDE", sectionIndex) * Gaudi::Units::mm;
1355}
1356
1358{
1359 return db()->getDouble(m_PixelFrame, "SIDEWIDTH", sectionIndex) * Gaudi::Units::mm;
1360}
1361
1363{
1364 return db()->getDouble(m_PixelFrame, "ZMIN", sectionIndex) * Gaudi::Units::mm;
1365}
1366
1368{
1369 return db()->getDouble(m_PixelFrame, "ZMAX", sectionIndex) * Gaudi::Units::mm;
1370}
1371
1373{
1374 return db()->getDouble(m_PixelFrame, "PHISTART", sectionIndex) * Gaudi::Units::deg;
1375}
1376
1378{
1379 return db()->getInt(m_PixelFrame, "NUMSIDES", sectionIndex);
1380}
1381
1383{
1384 return db()->getInt(m_PixelFrame, "MIRRORSIDES", sectionIndex);
1385}
1386
1388{
1389 return db()->getString(m_PixelFrame, "SIDEMATERIAL", sectionIndex);
1390}
1391
1393{
1394 return db()->getString(m_PixelFrame, "CORNERMATERIAL", sectionIndex);
1395}
1396
1398{
1399 return db()->getInt(m_PixelFrame,"SECTION",sectionIndex);
1400}
1401
1402void
1404{
1405 if (!m_frameElementMap) {
1406 m_frameElementMap = new std::map<int,std::vector<int> >;
1407 for (unsigned int i = 0; i < db()->getTableSize(m_PixelFrameSect); ++i) {
1408 int section = db()->getInt(m_PixelFrameSect,"SECTION",i);
1409 (*m_frameElementMap)[section].push_back(i);
1410 }
1411 }
1412}
1413
1414int DBPixelGeoManager::getFrameElementIndex(int sectionIndex, int element)
1415{
1416 // make map if it is not already made.
1418
1419 int section = PixelFrameSectionFromIndex(sectionIndex);
1420
1421 int newIndex = -1;
1422 std::map<int,std::vector<int> >::const_iterator iter = m_frameElementMap->find(section);
1423 if (iter == m_frameElementMap->end()) {
1424 // Should never be the case as PixelFrameNumSideElements should generally be called first
1425 msg(MSG::ERROR) << "Frame section " << section << " has no elements." << endmsg;
1426 } else {
1427 const std::vector<int> & vec = iter->second;
1428 if (static_cast<unsigned int>(element) >= vec.size()) {
1429 msg(MSG::ERROR) << "Element index " << element << " for section " << section << " out of range." << endmsg;
1430 } else {
1431 newIndex = vec[element];
1432 }
1433 }
1434 return newIndex;
1435}
1436
1437
1439{
1440 // make map if it is not already made.
1442
1443 int section = PixelFrameSectionFromIndex(sectionIndex);
1444 int numElements = 0;
1445
1446 std::map<int,std::vector<int> >::const_iterator iter = m_frameElementMap->find(section);
1447 if (iter == m_frameElementMap->end()) {
1448 msg(MSG::DEBUG) << "Frame section " << section << " has no elements." << endmsg;
1449 } else {
1450 numElements = iter->second.size();
1451 }
1452 return numElements;
1453}
1454
1455double DBPixelGeoManager::PixelFrameElementZMin1(int sectionIndex, int element)
1456{
1457 int index = getFrameElementIndex(sectionIndex, element);
1458 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1459 return db()->getDouble(m_PixelFrameSect, "ZMIN1", index) * Gaudi::Units::mm;
1460}
1461
1462double DBPixelGeoManager::PixelFrameElementZMin2(int sectionIndex, int element)
1463{
1464 int index = getFrameElementIndex(sectionIndex, element);
1465 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1466 return db()->getDouble(m_PixelFrameSect, "ZMIN2", index) * Gaudi::Units::mm;
1467}
1468
1469double DBPixelGeoManager::PixelFrameElementZMax1(int sectionIndex, int element)
1470{
1471 int index = getFrameElementIndex(sectionIndex, element);
1472 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1473 return db()->getDouble(m_PixelFrameSect, "ZMAX1", index) * Gaudi::Units::mm;
1474}
1475
1476double DBPixelGeoManager::PixelFrameElementZMax2(int sectionIndex, int element)
1477{
1478 int index = getFrameElementIndex(sectionIndex, element);
1479 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1480 return db()->getDouble(m_PixelFrameSect, "ZMAX2", index) * Gaudi::Units::mm;
1481}
1482
1484{
1485 if (!ibl()) return 0;
1486 if (!db()->testField(m_PixelLayer,"STAVEINDEX",layer)) return 0;
1487 return db()->getInt(m_PixelLayer,"STAVEINDEX",layer);
1488}
1489
1491{
1492 if (!ibl()) return 0;
1493 int defaultLayout = 0;
1495
1496 if (!db()->testField(m_PixelStave,"LAYOUT",index)) return defaultLayout;
1497 return db()->getInt(m_PixelStave,"LAYOUT",index);
1498}
1499
1501{
1502 if (!ibl()) return 0;
1504
1505 if (db()->testField(m_PixelStave,"STAVEAXE",index))
1506 return db()->getInt(m_PixelStave,"STAVEAXE",index);
1507 return 0;
1508}
1509
1511{
1512 double radius = db()->getDouble(m_PixelLayer,"RLAYER",m_currentLD)*mmcm();
1513 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "PixelLayerRadius for layer " << m_currentLD
1514 << " is " << radius
1515 << endmsg;
1516 return radius;
1517}
1518
1520{
1521 if (db()->testField(m_PixelLayer,"GBLSHIFT",m_currentLD))
1522 return db()->getDouble(m_PixelLayer,"GBLSHIFT",m_currentLD);
1523 return 0.;
1524}
1525
1527{
1528 if (useLegacy()) return m_legacyManager->PixelLadderLength();
1530 return db()->getDouble(m_PixelStave,"ENVLENGTH",index)*Gaudi::Units::mm;
1531}
1532
1534{
1535 if (useLegacy()) return 0.9*Gaudi::Units::mm;
1537 return db()->getDouble(m_PixelStave,"CLEARANCEY",index)*Gaudi::Units::mm;
1538}
1539
1540// Only used if ladder thickness is automatically calculated it, ie ENVTHICK = 0
1541// IBL only
1543{
1545 if (db()->testField(m_PixelStave,"CLEARANCEX",index)) {
1546 return db()->getDouble(m_PixelStave,"CLEARANCEX",index)*Gaudi::Units::mm;
1547 }
1548 return 0.1*Gaudi::Units::mm;
1549}
1550
1552{
1553 if (useLegacy()) return m_legacyManager->PixelLadderThickness(); // 2*1.48972 mm
1555 return db()->getDouble(m_PixelStave,"ENVTHICK",index)*Gaudi::Units::mm;
1556}
1557
1559{
1560 return db()->getDouble(m_PixelLayer,"STAVETILT",m_currentLD)*Gaudi::Units::deg;
1561}
1562
1564{
1565 if (useLegacy()) return m_legacyManager->PixelLadderServicesX(); // 1.48972 mm
1567 return db()->getDouble(m_PixelStave,"SERVICEOFFSETX",index) * Gaudi::Units::mm;
1568}
1569
1571{
1572 if (useLegacy()) return m_legacyManager->PixelLadderServicesY(); // 3mm
1574 return db()->getDouble(m_PixelStave,"SERVICEOFFSETY",index) * Gaudi::Units::mm;
1575}
1576
1578{
1579 if (useLegacy()) return m_legacyManager->PixelLadderCableOffsetX(); // 0
1581 return db()->getDouble(m_PixelStave,"CABLEOFFSETX",index) * Gaudi::Units::mm;
1582}
1583
1585{
1586 if (useLegacy()) return m_legacyManager->PixelLadderCableOffsetY(); // 4mm
1588 return db()->getDouble(m_PixelStave,"CABLEOFFSETY",index) * Gaudi::Units::mm;
1589}
1590
1591// IBL only
1593{
1595 return db()->getDouble(m_PixelStave,"SUPPORTTHICK",index) * Gaudi::Units::mm;
1596}
1597
1598// IBL only
1600{
1602 return db()->getDouble(m_PixelStave,"SUPPORTWIDTH",index) * Gaudi::Units::mm;
1603}
1604
1605
1606
1607
1608
1609// IBL only
1611{
1612 if (!db()->testFieldTxt(m_PixelConicalStave,"BENTSTAVEANGLE")) return 0;
1614 return db()->getDouble(m_PixelConicalStave,"BENTSTAVEANGLE",index);
1615}
1616
1617// IBL only
1619{
1620 if (!db()->testFieldTxt(m_PixelConicalStave,"BENTSTAVENMODULE")) return 0;
1622 return db()->getInt(m_PixelConicalStave,"BENTSTAVENMODULE",index);
1623}
1624
1630
1631// IBL only
1633{
1635 if (db()->testField(m_PixelStave,"SUPPORTHLENGTH",index)) {
1636 double halflength = db()->getDouble(m_PixelStave,"SUPPORTHLENGTH",index) * Gaudi::Units::mm;
1637 if (halflength > 0) return 2 * halflength;
1638 }
1639 double safety = 0.01*Gaudi::Units::mm;
1640 return PixelLadderLength() - safety;
1641}
1642
1643// IBL detailed stave support only
1644
1646{
1647 // set layer to 0 (in order to read read IBL data)
1648 int currentLD_tmp = m_currentLD;
1649 m_currentLD = 0;
1650
1651 double boardThick = PixelBoardThickness();
1652 double chipThick = PixelChipThickness();
1653 double chipGap = PixelChipGap();
1654
1655 double xCenterCoolingPipe = boardThick*.5+chipThick+chipGap+ // from sensor sensor to plate
1656 IBLStaveFacePlateThickness() + IBLStaveFacePlateGreaseThickness() + // plate thickness (grease + plate)
1657 IBLStaveTubeMiddlePos(); // from plate to colling pipe center
1658 double yCenterCoolingPipe = IBLStaveMechanicalStaveOffset();
1659 GeoTrf::Vector3D centerCoolingPipe(xCenterCoolingPipe, yCenterCoolingPipe, 0.);
1660
1661 m_currentLD = currentLD_tmp;
1662 return centerCoolingPipe;
1663}
1664
1665
1667{
1668 // set layer to 0 (in order to read read IBL data)
1669 int currentLD_tmp = m_currentLD;
1670 m_currentLD = 0;
1671
1672 // Point that defines the center of the cooling pipe
1673 GeoTrf::Vector3D centerCoolingPipe_inv = -IBLStaveRotationAxis();
1674 GeoTrf::Vector3D origin(0.,0.,0.);
1675 double layerRadius = PixelLayerRadius();
1676 double ladderTilt = PixelLadderTilt();
1677
1678 // Transforms
1679 GeoTrf::Transform3D staveTrf = GeoTrf::RotateZ3D(ladderTilt)*GeoTrf::Translate3D(centerCoolingPipe_inv.x(),centerCoolingPipe_inv.y(),centerCoolingPipe_inv.z());
1680 GeoTrf::Vector3D sensorPos = staveTrf*origin;
1681
1682 double yPos = sensorPos.y();
1683 GeoTrf::Vector3D sensorPos_layer(sqrt(layerRadius*layerRadius-yPos*yPos),yPos,0.);
1684
1685 double staveRadius = sensorPos_layer.x()-sensorPos.x();
1686
1687 m_currentLD = currentLD_tmp;
1688 return staveRadius;
1689}
1690
1691
1693{
1694 // int index = PixelStaveIndex(m_currentLD);
1695 int index=0;
1696 if (db()->testField(m_PixelIBLStave,"FACEPLATETHICK",index)) {
1697 double thickness = db()->getDouble(m_PixelIBLStave,"FACEPLATETHICK",index) * Gaudi::Units::mm;
1698 if (thickness > 0) return thickness ;
1699 }
1700 return 0.0;
1701}
1702
1704{
1705 // int index = PixelStaveIndex(m_currentLD);
1706 int index=0;
1707 if (db()->testField(m_PixelIBLStave,"STAVEWIDTH",index)) {
1708 double value = db()->getDouble(m_PixelIBLStave,"STAVEWIDTH",index) * Gaudi::Units::mm;
1709 if (value > 0) return value ;
1710 }
1711 return 0.0;
1712}
1713
1715{
1716 // int index = PixelStaveIndex(m_currentLD);
1717 int index=0;
1718 if (db()->testField(m_PixelIBLStave,"ENDBLOCKLENGTH",index)) {
1719 double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKLENGTH",index) * Gaudi::Units::mm;
1720 if (value > 0) return value ;
1721 }
1722 return 0.0;
1723}
1724
1726{
1727 // int index = PixelStaveIndex(m_currentLD);
1728 int index=0;
1729 if (db()->testField(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index)) {
1730 double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index) * Gaudi::Units::mm;
1731 return value ;
1732 }
1733 return 0.0;
1734}
1735
1737{
1738 // try and catch (param availbale only if db tag > IBL-03-00-00)
1739 try{
1740 int index=0;
1741 if (db()->testField(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index)) {
1742 double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index) * Gaudi::Units::mm;
1743 return value ;
1744 }
1745 return 0.0;
1746 }
1747 catch(...){}
1748 return 0.;
1749}
1750
1752{
1753 // try and catch (param availbale only if db tag > IBL-03-00-00)
1754 try
1755 {
1756 int index=0;
1757 if (db()->testField(m_PixelIBLStave,"STAVELENGTH",index)) {
1758 double value = db()->getDouble(m_PixelIBLStave,"STAVELENGTH",index) * Gaudi::Units::mm;
1759 return value ;
1760 }
1761 }
1762 catch(...)
1763 {
1764 // FIXME : patch for initial IBL geometry (SES)
1765 // IBL stave length not eqal to other stave length
1766 }
1767
1768 return 748.0 * Gaudi::Units::mm;
1769}
1770
1772{
1773 // int index = PixelStaveIndex(m_currentLD);
1774 int index=0;
1775 if (!isModule3D&&db()->testField(m_PixelIBLStave,"MODULELATERALOFFSET",index)) {
1776 double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET",index) * Gaudi::Units::mm;
1777 return value ;
1778 }
1779 if (isModule3D&&db()->testField(m_PixelIBLStave,"MODULELATERALOFFSET3D",index)) {
1780 double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET3D",index) * Gaudi::Units::mm;
1781 return value ;
1782 }
1783 return 0.0;
1784}
1785
1787{
1788 // int index = PixelStaveIndex(m_currentLD);
1789 int index=0;
1790 if (db()->testField(m_PixelIBLStave,"STAVETOMODULEGAP",index)) {
1791 double value = db()->getDouble(m_PixelIBLStave,"STAVETOMODULEGAP",index) * Gaudi::Units::mm;
1792 return value ;
1793 }
1794 return 0.0;
1795}
1796
1798{
1799 // int index = PixelStaveIndex(m_currentLD);
1800 int index=0;
1801 if (db()->testField(m_PixelIBLStave,"TUBEOUTERDIAM",index)) {
1802 double value = db()->getDouble(m_PixelIBLStave,"TUBEOUTERDIAM",index) * Gaudi::Units::mm;
1803 if (value > 0) return value ;
1804 }
1805 return 0.0;
1806}
1807
1809{
1810 // int index = PixelStaveIndex(m_currentLD);
1811 int index=0;
1812 if (db()->testField(m_PixelIBLStave,"TUBEINNERDIAM",index)) {
1813 double value = db()->getDouble(m_PixelIBLStave,"TUBEINNERDIAM",index) * Gaudi::Units::mm;
1814 if (value > 0) return value ;
1815 }
1816 return 0.0;
1817}
1818
1820{
1821 // int index = PixelStaveIndex(m_currentLD);
1822 int index=0;
1823 if (db()->testField(m_PixelIBLStave,"TUBEMIDDLEPOS",index)) {
1824 double value = db()->getDouble(m_PixelIBLStave,"TUBEMIDDLEPOS",index) * Gaudi::Units::mm;
1825 return value ;
1826 }
1827 return 0.0;
1828}
1829
1831{
1832 // int index = PixelStaveIndex(m_currentLD);
1833 int index=0;
1834 if (db()->testField(m_PixelIBLStave,"FLEXLAYERTHICK",index)) {
1835 double value = db()->getDouble(m_PixelIBLStave,"FLEXLAYERTHICK",index) * Gaudi::Units::mm;
1836 if (value > 0) return value ;
1837 }
1838 return 0.0;
1839}
1840
1842{
1843 // int index = PixelStaveIndex(m_currentLD);
1844 int index=0;
1845 if (db()->testField(m_PixelIBLStave,"FLEXBASETHICK",index)) {
1846 double value = db()->getDouble(m_PixelIBLStave,"FLEXBASETHICK",index) * Gaudi::Units::mm;
1847 if (value > 0) return value ;
1848 }
1849 return 0.0;
1850}
1851
1853{
1854 // int index = PixelStaveIndex(m_currentLD);
1855 int index=0;
1856 if (db()->testField(m_PixelIBLStave,"FLEXWIDTH",index)) {
1857 double value = db()->getDouble(m_PixelIBLStave,"FLEXWIDTH",index) * Gaudi::Units::mm;
1858 if (value > 0) return value ;
1859 }
1860 return 0.0;
1861}
1862
1864{
1865 // int index = PixelStaveIndex(m_currentLD);
1866 int index=0;
1867 if (db()->testField(m_PixelIBLStave,"FLEXOFFSET",index)) {
1868 double value = db()->getDouble(m_PixelIBLStave,"FLEXOFFSET",index) * Gaudi::Units::mm;
1869 return value ;
1870 }
1871 return 0.0;
1872}
1873
1874
1876{
1877 // int index = PixelStaveIndex(m_currentLD);
1878 int index=0;
1879 if (db()->testField(m_PixelIBLStave,"OMEGATHICK",index)) {
1880 double value = db()->getDouble(m_PixelIBLStave,"OMEGATHICK",index) * Gaudi::Units::mm;
1881 return value ;
1882 }
1883 return 0.0;
1884}
1885
1887{
1888 // int index = PixelStaveIndex(m_currentLD);
1889 int index=0;
1890 if (db()->testField(m_PixelIBLStave,"OMEGAENDCENTERX",index)) {
1891 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERX",index) * Gaudi::Units::mm;
1892 return value ;
1893 }
1894 return 0.0;
1895}
1897{
1898 // int index = PixelStaveIndex(m_currentLD);
1899 int index=0;
1900 if (db()->testField(m_PixelIBLStave,"OMEGAENDCENTERY",index)) {
1901 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERY",index) * Gaudi::Units::mm;
1902 return value ;
1903 }
1904 return 0.0;
1905}
1907{
1908 // int index = PixelStaveIndex(m_currentLD);
1909 int index=0;
1910 if (db()->testField(m_PixelIBLStave,"OMEGAENDRADIUS",index)) {
1911 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDRADIUS",index) * Gaudi::Units::mm;
1912 return value ;
1913 }
1914 return 0.0;
1915}
1917{
1918 // int index = PixelStaveIndex(m_currentLD);
1919 int index=0;
1920 if (db()->testField(m_PixelIBLStave,"OMEGAENDANGLE",index)) {
1921 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDANGLE",index) * Gaudi::Units::deg;
1922 return value ;
1923 }
1924 return 0.0;
1925}
1926
1928{
1929 // int index = PixelStaveIndex(m_currentLD);
1930 int index=0;
1931 if (db()->testField(m_PixelIBLStave,"OMEGAMIDCENTERX",index)) {
1932 double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDCENTERX",index) * Gaudi::Units::mm;
1933 return value ;
1934 }
1935 return 0.0;
1936}
1937
1939{
1940 // int index = PixelStaveIndex(m_currentLD);
1941 int index=0;
1942 if (db()->testField(m_PixelIBLStave,"OMEGAMIDRADIUS",index)) {
1943 double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDRADIUS",index) * Gaudi::Units::mm;
1944 return value ;
1945 }
1946 return 0.0;
1947}
1949{
1950 // int index = PixelStaveIndex(m_currentLD);
1951 int index=0;
1952 if (db()->testField(m_PixelIBLStave,"OMEGAOPENINGANGLE",index)) {
1953 double value = db()->getDouble(m_PixelIBLStave,"OMEGAOPENINGANGLE",index) * Gaudi::Units::deg;
1954 return value ;
1955 }
1956 return 0.0;
1957}
1958
1960{
1961 // int index = PixelStaveIndex(m_currentLD);
1962 int index=0;
1963 if (db()->testField(m_PixelIBLStave,"NMODULE",index)) {
1964 int value = db()->getInt(m_PixelIBLStave,"NMODULE",index);
1965 if (value > 0) return value ;
1966 }
1967 return 0;
1968}
1969
1975
1977{
1978 // int index = PixelStaveIndex(m_currentLD);
1979 int index=0;
1980 if (db()->testField(m_PixelIBLStave,"MODULEGAP",index)) {
1981 double value = db()->getDouble(m_PixelIBLStave,"MODULEGAP",index) * Gaudi::Units::mm;
1982 if (value > 0) return value ;
1983 }
1984 return 0.0;
1985}
1986
1988{
1989 // int index = PixelStaveIndex(m_currentLD);
1990 int index=0;
1991 if (db()->testField(m_PixelIBLStave,"MODULETYPE",index)) {
1992 int value = db()->getInt(m_PixelIBLStave,"MODULETYPE",index) * Gaudi::Units::mm;
1993 if (value > 0) return value ;
1994 }
1995 return 0;
1996}
1997
1999{
2000 // try and catch (param availbale only if db tag > IBL-03-00-00)
2001 try{
2002 int index=0;
2003 if (db()->testField(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index)) {
2004 double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index) * Gaudi::Units::mm;
2005 return value ;
2006 }
2007 return 0.;
2008 }
2009 catch(...){}
2010 return 0.;
2011}
2012
2014{
2015 // try and catch (param availbale only if db tag > IBL-03-00-00)
2016 try{
2017 int index=0;
2018 if (db()->testField(m_PixelIBLGlueGrease,"FACEPLATEGLUETHICK",index)) {
2019 double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGLUETHICK",index) * Gaudi::Units::mm;
2020 return value ;
2021 }
2022 return 0.;
2023 }
2024 catch(...) {}
2025 return 0.;
2026}
2027
2029{
2030 // try and catch (param availbale only if db tag > IBL-03-00-00)
2031 try{
2032 int index=0;
2033 if (db()->testField(m_PixelIBLGlueGrease,"TUBEGLUETHICK",index)) {
2034 double value = db()->getDouble(m_PixelIBLGlueGrease,"TUBEGLUETHICK",index) * Gaudi::Units::mm;
2035 return value ;
2036 }
2037 return 0.;
2038 }
2039 catch(...) {}
2040 return 0.;
2041}
2042
2044{
2045 // try and catch (param availbale only if db tag > IBL-03-00-00)
2046 try{
2047 int index=0;
2048 if (db()->testField(m_PixelIBLGlueGrease,"OMEGAGLUETHICK",index)) {
2049 double value = db()->getDouble(m_PixelIBLGlueGrease,"OMEGAGLUETHICK",index) * Gaudi::Units::mm;
2050 return value ;
2051 }
2052 return 0.;
2053 }
2054 catch(...){}
2055 return 0.;
2056}
2057
2058
2060{
2061 // int index = PixelStaveIndex(m_currentLD);
2062 int index=0;
2063 if (db()->testField(m_PixelIBLSupport,"STAVERINGWIDTH",index)) {
2064 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGWIDTH",index) * Gaudi::Units::mm;
2065 if (value > 0) return value ;
2066 }
2067 return 0.0;
2068}
2069
2071{
2072 // int index = PixelStaveIndex(m_currentLD);
2073 int index=0;
2074 if (db()->testField(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index)) {
2075 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index) * Gaudi::Units::mm;
2076 if (value > 0) return value ;
2077 }
2078 return 0.0;
2079}
2080
2082{
2083 // int index = PixelStaveIndex(m_currentLD);
2084 int index=0;
2085 if (db()->testField(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index)) {
2086 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index) * Gaudi::Units::mm;
2087 if (value > 0) return value ;
2088 }
2089 return 0.0;
2090}
2091
2092
2094{
2095 // int index = PixelStaveIndex(m_currentLD);
2096 int index=0;
2097 if (db()->testField(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index)) {
2098 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index) * Gaudi::Units::mm;
2099 if (value > 0) return value ;
2100 }
2101 return 0.0;
2102}
2103
2105{
2106 // int index = PixelStaveIndex(m_currentLD);
2107 int index=0;
2108 if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index)) {
2109 double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index) * Gaudi::Units::mm;
2110 if (value > 0) return value ;
2111 }
2112 return 0.0;
2113}
2114
2116{
2117 // int index = PixelStaveIndex(m_currentLD);
2118 int index=0;
2119 if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index)) {
2120 double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index) * Gaudi::Units::mm;
2121 if (value > 0) return value;
2122 }
2123 return 0.0;
2124}
2125
2127{
2128 // int index = PixelStaveIndex(m_currentLD);
2129 int index=0;
2130 if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index)) {
2131 double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index) * Gaudi::Units::mm;
2132 if (value > 0) return value ;
2133 }
2134 return 0.0;
2135}
2136
2138{
2139 // int index = PixelStaveIndex(m_currentLD);
2140 int index=0;
2141 if (db()->testField(m_PixelIBLFlex,"FLEXMIDGAP",index)) {
2142 double value = db()->getDouble(m_PixelIBLFlex,"FLEXMIDGAP",index) * Gaudi::Units::mm;
2143 return value ;
2144 }
2145 return 0.0;
2146}
2147
2149{
2150 // int index = PixelStaveIndex(m_currentLD);
2151 int index=0;
2152 return db()->testField(m_PixelIBLFlex,"FLEXMIDGAP",index);
2153}
2154
2155
2157{
2158 // int index = PixelStaveIndex(m_currentLD);
2159 int index=0;
2160 if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index)) {
2161 double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index) * Gaudi::Units::mm;
2162 return value ;
2163 }
2164 return 0.0;
2165}
2166
2167
2169{
2170 // int index = PixelStaveIndex(m_currentLD);
2171 int index=0;
2172 if (db()->testField(m_PixelIBLFlex,"FLEXWINGWIDTH",index)) {
2173 double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGWIDTH",index) * Gaudi::Units::mm;
2174 return value ;
2175 }
2176 return 0.0;
2177}
2178
2180{
2181 // int index = PixelStaveIndex(m_currentLD);
2182 int index=0;
2183 if (db()->testField(m_PixelIBLFlex,"FLEXWINGTHICK",index)) {
2184 double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGTHICK",index) * Gaudi::Units::mm;
2185 return value ;
2186 }
2187 return 0.0;
2188}
2189
2191{
2192 // int index = PixelStaveIndex(m_currentLD);
2193 int index=0;
2194 if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index)) {
2195 double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index) * Gaudi::Units::mm;
2196 return value ;
2197 }
2198 return 0.0;
2199}
2200
2202{
2203 std::ostringstream lname;
2204 lname << "FLEXDOGLEGHEIGHT"<<iHeight;
2205
2206 // int index = PixelStaveIndex(m_currentLD);
2207 int index=0;
2208 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2209 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2210 return value ;
2211 }
2212 return 0.0;
2213}
2214
2216{
2217 // int index = PixelStaveIndex(m_currentLD);
2218 int index=0;
2219 if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGDY",index)) {
2220 double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGDY",index) * Gaudi::Units::mm;
2221 return value ;
2222 }
2223 return 0.0;
2224}
2225
2227{
2228 std::ostringstream lname;
2229 lname << "FLEXPP0_Z"<<iPos;
2230
2231 // int index = PixelStaveIndex(m_currentLD);
2232 int index=0;
2233 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2234 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2235 return value ;
2236 }
2237 return 0.0;
2238}
2239
2240
2242{
2243 std::ostringstream lname;
2244 lname << "FLEXPP0_S"<<iPos<<"RMIN";
2245
2246 // int index = PixelStaveIndex(m_currentLD);
2247 int index=0;
2248 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2249 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2250 return value ;
2251 }
2252 return 0.0;
2253}
2254
2256{
2257 std::ostringstream lname;
2258 lname << "FLEXPP0_S"<<iPos<<"RMAX";
2259
2260 // int index = PixelStaveIndex(m_currentLD);
2261 int index=0;
2262 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2263 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2264 return value ;
2265 }
2266 return 0.0;
2267}
2268
2269
2270std::string DBPixelGeoManager::IBLFlexMaterial(int iPos, const std::string& flexType)
2271{
2272
2273 int nbMaterial=db()->getTableSize(m_PixelIBLFlexMaterial);
2274 int cmptType=0;
2275
2276 for(int index=0; index<nbMaterial; index++)
2277 {
2278 std::string flexTypeIdx = db()->getString(m_PixelIBLFlexMaterial,"TYPE",index);
2279 if(flexTypeIdx.compare(flexType)==0)
2280 {
2281 cmptType++;
2282 if(iPos==cmptType){
2283 std::string matTypeIdx = db()->getString(m_PixelIBLFlexMaterial,"MATERIALNAME",index);
2284 return matTypeIdx;
2285 }
2286 }
2287 }
2288 return std::string("noMat");
2289
2290}
2291
2292
2293double DBPixelGeoManager:: IBLServiceGetMinRadialPosition(const std::string& srvName, const std::string& srvType,
2294 double srvZmin, double srvZmax)
2295{
2296
2297 double rmin=99999.;
2298
2299 int numServices = PixelServiceElements(srvType);
2300 int nbSrv=0;
2301 for(int ii = 0; ii < numServices; ii++) {
2302 // Retrieve/calculate the parameters for the volume.
2303 //
2304 std::string name;
2305 if(srvType=="simple")
2306 name=db()->getString(m_PixelSimpleService,"NAME",ii);
2307 else
2308 name=PixelServiceName(srvType,ii);
2309
2310 if(name.find(srvName)!=std::string::npos){
2311 double zmin, zmax, r;
2312 int symm;
2313 if(srvType=="simple"){
2314 zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*Gaudi::Units::mm;
2315 zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*Gaudi::Units::mm;
2316 symm=db()->getInt(m_PixelSimpleService,"ZSYMM",ii);
2317 r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*Gaudi::Units::mm;
2318 }
2319 else {
2320 zmin=PixelServiceZMin(srvType, ii);
2321 zmax=PixelServiceZMax(srvType, ii);
2322 symm=PixelServiceZsymm(srvType, ii);
2323 r=PixelServiceRMin(srvType, ii);
2324 }
2325
2326 bool bZintervalle = false;
2327 if( (srvZmin-zmin)*(srvZmin-zmax)<0 || (srvZmax-zmin)*(srvZmax-zmax)<0 ) bZintervalle=true;
2328 if( symm==1 && ((-srvZmin-zmin)*(-srvZmin-zmax)<0 || (-srvZmax-zmin)*(-srvZmax-zmax)<0) ) bZintervalle=true;
2329
2330 if(bZintervalle){
2331 if(r<rmin) rmin=r;
2332 nbSrv++;
2333 }
2334 }
2335 }
2336
2337 if(nbSrv<1)return -1;
2338 return rmin;
2339
2340}
2341
2342double DBPixelGeoManager:: IBLServiceGetMaxRadialPosition(const std::string& srvName, const std::string& srvType,
2343 double srvZmin, double srvZmax)
2344{
2345
2346 double rmax=-1.;
2347 int numServices = PixelServiceElements(srvType);
2348
2349 int nbSrv=0;
2350 for(int ii = 0; ii < numServices; ii++) {
2351 // Retrieve/calculate the parameters for the volume.
2352 //
2353 std::string name;
2354 if(srvType=="simple")
2355 name=db()->getString(m_PixelSimpleService,"NAME",ii);
2356 else
2357 name=PixelServiceName(srvType,ii);
2358
2359 if(name.find(srvName)!=std::string::npos){
2360
2361 double zmin, zmax, r;
2362 int symm;
2363 if(srvType=="simple"){
2364 zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*Gaudi::Units::mm;
2365 zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*Gaudi::Units::mm;
2366 symm=db()->getInt(m_PixelSimpleService,"ZSYMM",ii);
2367 r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*Gaudi::Units::mm;
2368 }
2369 else {
2370 zmin=PixelServiceZMin(srvType, ii);
2371 zmax=PixelServiceZMax(srvType, ii);
2372 symm=PixelServiceZsymm(srvType, ii);
2373 r=PixelServiceRMax(srvType, ii);
2374 }
2375
2376 bool bZintervalle = false;
2377 if( (srvZmin-zmin)*(srvZmin-zmax)<0 || (srvZmax-zmin)*(srvZmax-zmax)<0 ) bZintervalle=true;
2378 if( symm==1 && ((-srvZmin-zmin)*(-srvZmin-zmax)<0 || (-srvZmax-zmin)*(-srvZmax-zmax)<0) ) bZintervalle=true;
2379
2380 if(bZintervalle && r>rmax){
2381 rmax=r;
2382 nbSrv++;
2383 }
2384 }
2385 }
2386
2387 if(nbSrv<1)return -1;
2388 return rmax;
2389
2390}
2391
2393{
2394 if (m_staveTypeTable->size() == 0) return phi % 2;
2395 return m_pixelStaveTypes->getBiStaveType(layer, phi) % 2;
2396}
2397
2399{
2400 return db()->getInt(m_PixelLayer,"NSECTORS",m_currentLD);
2401}
2402
2404{
2405 // For backward compatibilty first module is at 1/2 a module division
2406 if (!db()->testField(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD)){
2407 if(NPixelSectors()>0) return 180.0*Gaudi::Units::degree/NPixelSectors();
2408 return 0.;
2409 } else {
2410 return db()->getDouble(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD) * Gaudi::Units::degree;
2411 }
2412}
2413
2414
2416{
2417 int staveIndex = PixelStaveIndex(m_currentLD);
2418 if(ibl() && PixelStaveLayout()>3 && PixelStaveLayout()<7 && m_currentLD==0)
2419 return IBLStaveModuleNumber();
2420 else
2421 return db()->getInt(m_PixelStave,"NMODULE",staveIndex);
2422
2423}
2424
2426{
2427 int staveIndex = PixelStaveIndex(m_currentLD);
2428 return db()->getDouble(m_PixelStave,"MODULETILT",staveIndex)*Gaudi::Units::deg;
2429}
2430
2432{
2433 int staveIndex = PixelStaveIndex(m_currentLD);
2434 return db()->getDouble(m_PixelStave,"CENTRMODULESHIFT",staveIndex)*mmcm();
2435}
2436
2438{
2439 // ZPOSTYPE 0. Means equi-distant modules.
2440 // ZPOSTYPE != 0. Means tabulated z positions.
2441 int staveIndex = PixelStaveIndex(m_currentLD);
2442 int zPosType = 0;
2443 if (ibl() && db()->testField(m_PixelStave,"ZPOSTYPE",staveIndex)) {
2444 zPosType = db()->getInt(m_PixelStave,"ZPOSTYPE",staveIndex);
2445 }
2446 if (zPosType) {
2447 // Z positions from table
2448 return PixelModuleZPositionTabulated(etaModule, zPosType);
2449 } else {
2450 // Equi-distant modules
2451 int moduleIndex = PixelModuleIndexFromEta(etaModule);
2452 return db()->getDouble(m_PixelStave,"MODULEDZ",staveIndex)*mmcm() * (moduleIndex - 0.5*(PixelNModule()-1));
2453 }
2454}
2455
2457{
2458 if (!m_zPositionMap) {
2460 for (unsigned int indexTmp = 0; indexTmp < db()->getTableSize(m_PixelStaveZ); ++indexTmp) {
2461 int eta_module = db()->getInt(m_PixelStaveZ,"ETAMODULE",indexTmp);
2462 int type_tmp = db()->getInt(m_PixelStaveZ,"TYPE",indexTmp);
2463 m_zPositionMap->add(type_tmp,eta_module,indexTmp);
2464 }
2465 }
2466 int index = m_zPositionMap->find(type, etaModule);
2467 if (index < 0) {
2468 msg(MSG::ERROR) << "Z position not found for etaModule,type = " << etaModule << ", " << type << endmsg;
2469 return 0;
2470 }
2471 return db()->getDouble(m_PixelStaveZ,"ZPOS",index) * Gaudi::Units::mm;
2472}
2473
2475{
2476 if (centerModule(etaModule)) return 1;
2477 return 0.;
2478}
2479
2481{
2482 int staveIndex = PixelStaveIndex(m_currentLD);
2483 if (!ibl() || !db()->testField(m_PixelStave,"STAGGERDIST",staveIndex)) return 0;
2484 return db()->getDouble(m_PixelStave,"STAGGERDIST",staveIndex) * Gaudi::Units::mm;
2485}
2486
2488{
2489 int staveIndex = PixelStaveIndex(m_currentLD);
2490 if (!ibl() || !db()->testField(m_PixelStave,"FIRSTSTAGGER",staveIndex)) return 0;
2491 // FIRSTSTAGGER refers to whether the first module (lowest etavalue) is staggered up (+1) or down(-1)
2492 int firstStagger = db()->getInt(m_PixelStave,"FIRSTSTAGGER",staveIndex);
2493 int moduleIndex = PixelModuleIndexFromEta(etaModule);
2494 return firstStagger * (moduleIndex%2 ? -1 : 1);
2495}
2496
2498{
2499 bool allowSkip = true;
2500 if (ibl()){
2501 int staveIndex = PixelStaveIndex(m_currentLD);
2502 if (db()->testField(m_PixelStave,"NOSKIPZERO",staveIndex)) {
2503 if (db()->getInt(m_PixelStave,"NOSKIPZERO",staveIndex)) allowSkip = false;
2504 }
2505 }
2506 return allowSkip;
2507}
2508
2510{
2511 // There is only a center module if there are an odd number
2512 // of modules. In that case it will be etaModule = 0.
2513 return (etaModule == 0 && PixelNModule()%2);
2514}
2515
2517{
2518 int nModules = PixelNModule();
2519 int etaModule = index-nModules/2;
2520 // If even number of modules skip eta = 0.
2521 // For IBL this behaviour can be disabled.
2522 if (allowSkipEtaZero() && (etaModule >= 0) && !(nModules%2)) etaModule++;
2523 return etaModule;
2524}
2525
2527{
2528 int nModules = PixelNModule();
2529 int index = etaModule + nModules/2;
2530 // If even number of modules skip eta = 0.
2531 // For IBL this behaviour can be disabled.
2532 if (allowSkipEtaZero() && (etaModule >= 0) && (nModules%2 == 0)) index--;
2533 return index;
2534}
2535
2536
2538{
2539 if (centerModule(etaModule)) return 0;
2540 if(etaModule < 0) return 1.;
2541 return -1.;
2542}
2543
2545{
2546 return db()->getInt(m_PixelEndcapGeneral,"NDISK");
2547}
2548
2549// Endcap container
2551{
2552 return db()->getDouble(m_PixelEndcapGeneral,"RMIN")*mmcm();
2553}
2554
2556{
2557 return db()->getDouble(m_PixelEndcapGeneral,"RMAX")*mmcm();
2558}
2559
2561{
2562 return db()->getDouble(m_PixelEndcapGeneral,"ZMIN")*mmcm();
2563}
2564
2566{
2567 return db()->getDouble(m_PixelEndcapGeneral,"ZMAX")*mmcm();
2568}
2569
2571{
2572 // Obsolete - retus 0 in recent versions
2573 return (int) db()->getDouble(m_PixelEndcapGeneral,"NFRAME");
2574}
2575
2576// Endcap Inner
2578{
2579 return db()->getDouble(m_PixelDisk,"ZDISK",m_currentLD)*mmcm();
2580}
2581
2583{
2584 return db()->getDouble(m_PixelDisk,"DZCOUNTER",m_currentLD)*mmcm();
2585}
2586
2588{
2589 return PixelECSiDz1();
2590}
2591
2593{
2594 return db()->getInt(m_PixelDisk,"NMODULE",m_currentLD);
2595}
2596
2601
2602// Endcap Cables
2604{
2605 return db()->getDouble(m_PixelDisk,"RMINCABLE",m_currentLD)*mmcm();
2606}
2607
2609{
2610 return db()->getDouble(m_PixelDisk,"RMAXCABLE",m_currentLD)*mmcm();
2611}
2612
2613
2615{
2616 return db()->getDouble(m_PixelDisk,"ZCABLE",m_currentLD)*mmcm();
2617}
2618
2619//
2621//
2623{
2624 if (useLegacy()) return m_legacyManager->PixelTMTNumParts();
2625 return db()->getTableSize(m_PixelTMT);
2626}
2627
2629{
2630 if (useLegacy()) return m_legacyManager->PixelTMTWidthX1(iPart);
2631 return db()->getDouble(m_PixelTMT,"WIDTHX1",iPart) * Gaudi::Units::mm;
2632}
2633
2635{
2636 if (useLegacy()) return m_legacyManager->PixelTMTWidthX2(iPart);
2637 return db()->getDouble(m_PixelTMT,"WIDTHX2",iPart) * Gaudi::Units::mm;
2638}
2639
2641{
2642 if (useLegacy()) return m_legacyManager->PixelTMTWidthY(iPart);
2643 return db()->getDouble(m_PixelTMT,"WIDTHY",iPart) * Gaudi::Units::mm;
2644}
2645
2647{
2648 if (useLegacy()) return m_legacyManager->PixelTMTBaseX1(iPart);
2649 return db()->getDouble(m_PixelTMT,"BASEX1",iPart) * Gaudi::Units::mm;
2650}
2651
2653{
2654 if (useLegacy()) return m_legacyManager->PixelTMTBaseX2(iPart);
2655 return db()->getDouble(m_PixelTMT,"BASEX2",iPart) * Gaudi::Units::mm;
2656}
2657
2659{
2660 if (useLegacy()) return m_legacyManager->PixelTMTPosY(iPart);
2661 return db()->getDouble(m_PixelTMT,"Y",iPart) * Gaudi::Units::mm;
2662}
2663
2665{
2666 if (useLegacy()) return m_legacyManager->PixelTMTPosZ1(iPart);
2667 return db()->getDouble(m_PixelTMT,"Z1",iPart) * Gaudi::Units::mm;
2668}
2669
2671{
2672 if (useLegacy()) return m_legacyManager->PixelTMTPosZ2(iPart);
2673 return db()->getDouble(m_PixelTMT,"Z2",iPart) * Gaudi::Units::mm;
2674}
2675
2677{
2678 if (useLegacy()) return m_legacyManager->PixelTMTPerModule(iPart);
2679 return db()->getInt(m_PixelTMT,"PERMODULE",iPart);
2680}
2681
2682//
2683// Omega parameters
2684//
2686{
2687 if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendX();
2688 return db()->getDouble(m_PixelOmega,"UPPERBENDX") * Gaudi::Units::mm;
2689}
2690
2692{
2693 if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendY();
2694 return db()->getDouble(m_PixelOmega,"UPPERBENDY") * Gaudi::Units::mm;
2695}
2696
2698{
2699 if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendRadius();
2700 return db()->getDouble(m_PixelOmega,"UPPERBENDR") * Gaudi::Units::mm;
2701}
2702
2704{
2705 if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendX();
2706 return db()->getDouble(m_PixelOmega,"LOWERBENDX") * Gaudi::Units::mm;
2707}
2708
2710{
2711 if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendY();
2712 return db()->getDouble(m_PixelOmega,"LOWERBENDY") * Gaudi::Units::mm;
2713}
2714
2716{
2717 if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendRadius();
2718 return db()->getDouble(m_PixelOmega,"LOWERBENDR") * Gaudi::Units::mm;
2719}
2720
2722{
2723 if (useLegacy()) return m_legacyManager->PixelOmegaWallThickness();
2724 return db()->getDouble(m_PixelOmega,"THICK") * Gaudi::Units::mm;
2725}
2726
2728{
2729 if (useLegacy()) return m_legacyManager->PixelOmegaLength();
2730 return db()->getDouble(m_PixelOmega,"LENGTH") * Gaudi::Units::mm;
2731}
2732
2734{
2735 if (useLegacy()) return m_legacyManager->PixelOmegaStartY();
2736 return db()->getDouble(m_PixelOmega,"STARTY") * Gaudi::Units::mm;
2737}
2738
2740{
2741 if (useLegacy()) return m_legacyManager->PixelOmegaEndY();
2742 return db()->getDouble(m_PixelOmega,"ENDY") * Gaudi::Units::mm;
2743}
2744
2745//
2746// Al Tube
2747//
2748
2750{
2751 if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendX();
2752 return db()->getDouble(m_PixelAlTube,"UPPERBENDX") * Gaudi::Units::mm;
2753}
2754
2756{
2757 if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendY();
2758 return db()->getDouble(m_PixelAlTube,"UPPERBENDY") * Gaudi::Units::mm;
2759}
2760
2762{
2763 if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendRadius();
2764 return db()->getDouble(m_PixelAlTube,"UPPERBENDR") * Gaudi::Units::mm;
2765}
2766
2768{
2769 if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendX();
2770 return db()->getDouble(m_PixelAlTube,"LOWERBENDX") * Gaudi::Units::mm;
2771}
2772
2774{
2775 if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendY();
2776 return db()->getDouble(m_PixelAlTube,"LOWERBENDY") * Gaudi::Units::mm;
2777}
2778
2780{
2781 if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendRadius();
2782 return db()->getDouble(m_PixelAlTube,"LOWERBENDR") * Gaudi::Units::mm;
2783}
2784
2786{
2787 if (useLegacy()) return m_legacyManager->PixelAlTubeWallThickness();
2788 return db()->getDouble(m_PixelAlTube,"THICK") * Gaudi::Units::mm;
2789}
2790
2792{
2793 if (useLegacy()) return m_legacyManager->PixelAlTubeLength();
2794 return db()->getDouble(m_PixelAlTube,"LENGTH") * Gaudi::Units::mm;
2795}
2796
2797//
2798// Glue
2799//
2800
2802{
2803 if (useLegacy()) return m_legacyManager->PixelNumOmegaGlueElements();
2804 return db()->getTableSize(m_PixelOmegaGlue);
2805}
2806
2808{
2809 if (useLegacy()) return m_legacyManager->PixelOmegaGlueStartX(index);
2810 return db()->getDouble(m_PixelOmegaGlue,"STARTX",index) * Gaudi::Units::mm;
2811}
2812
2814{
2815 if (useLegacy()) return m_legacyManager->PixelOmegaGlueThickness(index);
2816 return db()->getDouble(m_PixelOmegaGlue,"THICK",index) * Gaudi::Units::mm;
2817}
2818
2820{
2821 if (useLegacy()) return m_legacyManager->PixelOmegaGlueStartY(index);
2822 return db()->getDouble(m_PixelOmegaGlue,"STARTY",index) * Gaudi::Units::mm;
2823}
2824
2826{
2827 if (useLegacy()) return m_legacyManager->PixelOmegaGlueEndY(index);
2828 return db()->getDouble(m_PixelOmegaGlue,"ENDY",index) * Gaudi::Units::mm;
2829}
2830
2832{
2833 if (useLegacy()) return m_legacyManager->PixelOmegaGlueLength(index);
2834 return db()->getDouble(m_PixelOmegaGlue,"LENGTH",index) * Gaudi::Units::mm;
2835}
2836
2838{
2839 if (useLegacy()) return m_legacyManager->PixelOmegaGluePosZ(index);
2840 return db()->getDouble(m_PixelOmegaGlue,"Z",index) * Gaudi::Units::mm;
2841}
2842
2844{
2845 if (useLegacy()) return m_legacyManager->PixelOmegaGlueTypeNum(index);
2846 return db()->getInt(m_PixelOmegaGlue,"TYPENUM",index);
2847}
2848
2849
2850//
2851// Fluid
2852//
2854{
2855 if (useLegacy()) return m_legacyManager->PixelFluidZ1(index);
2856 return db()->getDouble(m_PixelFluid,"Z1",index) * Gaudi::Units::mm;
2857}
2858
2860{
2861 if (useLegacy()) return m_legacyManager->PixelFluidZ2(index);
2862 return db()->getDouble(m_PixelFluid,"Z2",index) * Gaudi::Units::mm;
2863}
2864
2866{
2867 if (useLegacy()) return m_legacyManager->PixelFluidThick1(index);
2868 return db()->getDouble(m_PixelFluid,"THICK1",index) * Gaudi::Units::mm;
2869}
2870
2871
2873{
2874 if (useLegacy()) return m_legacyManager->PixelFluidThick2(index);
2875 return db()->getDouble(m_PixelFluid,"THICK2",index) * Gaudi::Units::mm;
2876}
2877
2879{
2880 if (useLegacy()) return m_legacyManager->PixelFluidWidth(index);
2881 return db()->getDouble(m_PixelFluid,"WIDTH",index) * Gaudi::Units::mm;
2882}
2883
2884
2886{
2887 if (useLegacy()) return m_legacyManager->PixelFluidX(index);
2888 return db()->getDouble(m_PixelFluid,"X",index) * Gaudi::Units::mm;
2889}
2890
2892{
2893 if (useLegacy()) return m_legacyManager->PixelFluidY(index);
2894 return db()->getDouble(m_PixelFluid,"Y",index) * Gaudi::Units::mm;
2895}
2896
2898{
2899 if (useLegacy()) return m_legacyManager->PixelFluidType(index);
2900 return db()->getInt(m_PixelFluid,"TYPE",index);
2901}
2902
2904{
2905 if (useLegacy()) return m_legacyManager->PixelFluidNumTypes();
2906 return db()->getTableSize(m_PixelFluid);
2907}
2908
2910{
2911 for (int i = 0; i < PixelFluidNumTypes(); i++) {
2912 if (type == PixelFluidType(i)) return i;
2913 }
2914 msg(MSG::ERROR) << "Unrecognized fluid volume type: " << type << endmsg;
2915 return -1;
2916}
2917
2919 int matType = 0;
2920 if (useLegacy()) {
2921 matType = m_legacyManager->PixelFluidMatType(index);
2922 } else {
2923 matType = db()->getInt(m_PixelFluid,"MATTYPE",index);
2924 }
2925 return getMaterialName("Fluid", 0, matType);
2926}
2927
2929{
2930 if (useLegacy()) return m_legacyManager->PixelFluidOrient(layer, phi);
2931 return m_pixelStaveTypes->getFluidType(layer,phi);
2932}
2933
2934//
2935// Pigtail
2936//
2938{
2939 if (useLegacy()) return m_legacyManager->PixelPigtailThickness();
2940 return db()->getDouble(m_PixelPigtail,"THICK") * Gaudi::Units::mm;
2941}
2942
2944{
2945 if (useLegacy()) return m_legacyManager->PixelPigtailStartY();
2946 return db()->getDouble(m_PixelPigtail,"STARTY") * Gaudi::Units::mm;
2947}
2948
2950{
2951 if (useLegacy()) return m_legacyManager->PixelPigtailEndY();
2952 return db()->getDouble(m_PixelPigtail,"ENDY") * Gaudi::Units::mm;
2953}
2954
2956{
2957 if (useLegacy()) return m_legacyManager->PixelPigtailWidthZ();
2958 return db()->getDouble(m_PixelPigtail,"WIDTHZ") * Gaudi::Units::mm;
2959}
2960
2961// Different width from the curved section in old geometry
2963{
2964 if (useLegacy()) return m_legacyManager->PixelPigtailFlatWidthZ();
2965 return PixelPigtailWidthZ();
2966}
2967
2969{
2970 if (useLegacy()) return m_legacyManager->PixelPigtailPosX();
2971 return db()->getDouble(m_PixelPigtail,"X") * Gaudi::Units::mm;
2972}
2973
2975{
2976 if (useLegacy()) return m_legacyManager->PixelPigtailPosZ();
2977 return db()->getDouble(m_PixelPigtail,"Z") * Gaudi::Units::mm;
2978}
2979
2981{
2982 if (useLegacy()) return m_legacyManager->PixelPigtailBendX();
2983 return db()->getDouble(m_PixelPigtail,"BENDX") * Gaudi::Units::mm;
2984}
2985
2987{
2988 if (useLegacy()) return m_legacyManager->PixelPigtailBendY();
2989 return db()->getDouble(m_PixelPigtail,"BENDY") * Gaudi::Units::mm;
2990}
2991
2993{
2994 if (useLegacy()) return m_legacyManager->PixelPigtailBendRMin();
2995 return db()->getDouble(m_PixelPigtail,"BENDRMIN") * Gaudi::Units::mm;
2996}
2997
2999{
3000 if (useLegacy()) return m_legacyManager->PixelPigtailBendRMax();
3002}
3003
3005{
3006 if (useLegacy()) return m_legacyManager->PixelPigtailBendPhiMin();
3007 return db()->getDouble(m_PixelPigtail,"BENDPHIMIN") * Gaudi::Units::deg;
3008}
3009
3011{
3012 if (useLegacy()) return m_legacyManager->PixelPigtailBendPhiMax();
3013 return db()->getDouble(m_PixelPigtail,"BENDPHIMAX") * Gaudi::Units::deg;
3014}
3015
3017{
3018 if (useLegacy()) return m_legacyManager->PixelPigtailEnvelopeLength();
3019 return db()->getDouble(m_PixelPigtail,"ENVLENGTH") * Gaudi::Units::mm;
3020}
3021
3022//
3023// Connector
3024//
3026{
3027 if (useLegacy()) return m_legacyManager->PixelNumConnectorElements();
3028 return db()->getTableSize(m_PixelConnector);
3029}
3030
3032{
3033 if (useLegacy()) return m_legacyManager->PixelConnectorWidthX(index);
3034 return db()->getDouble(m_PixelConnector,"WIDTHX",index) * Gaudi::Units::mm;
3035}
3036
3038{
3039 if (useLegacy()) return m_legacyManager->PixelConnectorWidthY(index);
3040 return db()->getDouble(m_PixelConnector,"WIDTHY",index) * Gaudi::Units::mm;
3041}
3042
3044{
3045 if (useLegacy()) return m_legacyManager->PixelConnectorWidthZ(index);
3046 return db()->getDouble(m_PixelConnector,"WIDTHZ",index) * Gaudi::Units::mm;
3047}
3048
3050{
3051 if (useLegacy()) return m_legacyManager->PixelConnectorPosX(index);
3052 return db()->getDouble(m_PixelConnector,"X",index) * Gaudi::Units::mm;
3053}
3054
3056{
3057 if (useLegacy()) return m_legacyManager->PixelConnectorPosY(index);
3058 return db()->getDouble(m_PixelConnector,"Y",index) * Gaudi::Units::mm;
3059}
3060
3062{
3063 if (useLegacy()) return m_legacyManager->PixelConnectorPosZ(index);
3064 return db()->getDouble(m_PixelConnector,"Z",index) * Gaudi::Units::mm;
3065}
3066
3067//
3068// Design
3069//
3070
3071
3073{
3074
3075 if(isModule3D) return designType3D();
3076
3077 if (dbVersion() < 2) {
3078 return 0; // Not used
3079 } else {
3080 if (m_PixelReadout->size() == 0) {
3081 msg(MSG::ERROR) << "ERROR in PixelReadout size. Should not occur!" << endmsg;
3082 return 0;
3083 } else if (m_PixelReadout->size() == 1 && !ibl()) {
3084 return 0;
3085 } else { // Only in IBL
3086 return db()->getInt(m_PixelModule,"DESIGNTYPE",moduleType());
3087 }
3088 }
3089}
3090
3091
3093{
3094
3095 if (dbVersion() < 2) {
3096 return 0; // Not used
3097 }
3098 else {
3099 if (m_PixelReadout->size() == 0) {
3100 msg(MSG::ERROR) << "ERROR in PixelReadout size. Should not occur!" << endmsg;
3101 return 0;
3102 } else if (m_PixelReadout->size() == 1 && !ibl()) {
3103 return 0;
3104 } else { // Only in IBL
3105 int type = db()->getInt(m_PixelModule,"DESIGNTYPE",moduleType3D());
3106 return type;
3107 }
3108 }
3109}
3110
3112{
3113 if (dbVersion() < 2) {
3114 return -1;
3115 } else {
3116 int type = designType((ibl()&&isModule3D));
3117
3118 return db()->getInt(m_PixelReadout,"READOUTSIDE",type);
3119 }
3120}
3121
3123{
3124 if (dbVersion() < 2) {
3125 return m_legacyManager->DesignNumChipsPhi();
3126 } else {
3127 int type = designType((ibl()&&isModule3D));
3128
3129 return db()->getInt(m_PixelReadout,"NCHIPSPHI",type);
3130 }
3131}
3132
3133
3135 {
3136 if (dbVersion() < 2) {
3137 return m_legacyManager->DesignNumChipsEta();
3138 } else {
3139 int type = designType((ibl()&&isModule3D));
3140
3141 return db()->getInt(m_PixelReadout,"NCHIPSETA",type);
3142 }
3143}
3144
3146{
3147 if (dbVersion() < 2) {
3148 return m_legacyManager->DesignNumRowsPerChip(isInnermostPixelLayer());
3149 } else {
3150 int type = designType((ibl()&&isModule3D));
3151
3152 return db()->getInt(m_PixelReadout,"ROWSPERCHIP",type);
3153 }
3154}
3155
3157{
3158 if (dbVersion() < 2) {
3159 return m_legacyManager->DesignNumColsPerChip(isInnermostPixelLayer());
3160 } else {
3161 int type = designType((ibl()&&isModule3D));
3162
3163 return db()->getInt(m_PixelReadout,"COLSPERCHIP",type);
3164 }
3165}
3166
3167
3169{
3170 if (dbVersion() < 2) {
3171 return m_legacyManager->DesignDiodesPhiTotal(isInnermostPixelLayer());
3172 } else {
3173 return DesignNumChipsPhi(isModule3D) * (DesignNumRowsPerChip(isModule3D)+DesignNumEmptyRowsInGap(isModule3D)) - DesignNumEmptyRowsInGap(isModule3D);
3174 }
3175}
3176
3178{
3179 if (dbVersion() < 2) {
3180 return m_legacyManager->DesignDiodesEtaTotal(isInnermostPixelLayer());
3181 } else {
3182 return DesignNumChipsEta(isModule3D) * DesignNumColsPerChip(isModule3D);
3183 }
3184}
3185
3186
3188{
3189 return DesignNumChipsPhi(isModule3D) * DesignNumRowsPerChip(isModule3D);
3190}
3191
3193{
3194 return DesignNumColsPerChip(isModule3D);
3195}
3196
3198{
3199 return DesignDiodesPhiTotal(isModule3D);
3200}
3201
3203{
3204 return DesignNumColsPerChip(isModule3D);
3205}
3206
3208{
3209 // Could determine it from m_gangedIndexMap but expect it to be filled correctly in PixelReadoutTable
3210 if (dbVersion() < 2) {
3211 return m_legacyManager->DesignNumEmptyRowsInGap();
3212 } else {
3213 int type=designType((ibl()&&isModule3D));
3214
3215 return db()->getInt(m_PixelReadout,"EMPTYROWS",type);
3216 }
3217}
3218
3219// Ganged Pixels
3221{
3222 // type 0 means no ganged pixels
3223 if (!ibl()) return 1;
3224 if (ibl()) {
3225 return db()->getInt(m_PixelReadout,"GANGEDTYPE",designType());
3226 } else {
3227 int type = 1;
3228 if (db()->testField(m_PixelReadout,"GANGEDTYPE",designType())) {
3229 type = db()->getInt(m_PixelReadout,"GANGEDTYPE",designType());
3230 }
3231 return type;
3232 }
3233}
3234
3235
3237{
3238 // There is only one type for standard ATLAS so we just return the index.
3239 if (!ibl()) return index;
3240
3241 if (!m_gangedIndexMap) {
3242 // First time we create the map
3243 m_gangedIndexMap = new std::map<int,std::vector<int> >;
3244 for (unsigned int i = 0; i < db()->getTableSize(m_PixelGangedPixels); i++){
3245 int testType = 1;
3246 if (db()->testField(m_PixelGangedPixels,"TYPE",i)) {
3247 testType = db()->getInt(m_PixelGangedPixels,"TYPE",i);
3248 }
3249 (*m_gangedIndexMap)[testType].push_back(i);
3250 }
3251 }
3252
3253 int newIndex = -1;
3254 std::map<int,std::vector<int> >::const_iterator iter = m_gangedIndexMap->find(type);
3255 if (iter == m_gangedIndexMap->end()) {
3256 msg(MSG::ERROR) << "Ganged pixel type " << type << " not found." << endmsg;
3257 } else {
3258 const std::vector<int> & vec = iter->second;
3259 if (index < 0 || static_cast<unsigned int>(index) >= vec.size()) {
3260 msg(MSG::ERROR) << "Ganged pixel index " << index << " for type " << type << " out of range." << endmsg;
3261 } else {
3262 newIndex = vec[index];
3263 }
3264 }
3265 return newIndex;
3266}
3267
3269{
3270 return DesignNumEmptyRowsInGap(isModule3D);
3271}
3272
3274{
3275 if (dbVersion() < 2) {
3276 return m_legacyManager->EmptyRows(index);
3277 } else {
3278 int newIndex = GangedTableIndex(index, GangedType());
3279 if (newIndex >= 0) {
3280 return db()->getInt(m_PixelGangedPixels,"EMPTYROW",newIndex);
3281 } else {
3282 return 0;
3283 }
3284 }
3285}
3286
3288{
3289 if (dbVersion() < 2) {
3290 return m_legacyManager->EmptyRowConnections(index);
3291 } else {
3292 int newIndex = GangedTableIndex(index, GangedType());
3293 if (newIndex >= 0) {
3294 return db()->getInt(m_PixelGangedPixels,"CONNECTROW",newIndex);
3295 } else {
3296 return 0;
3297 }
3298 }
3299}
3300
3301
3303{
3304 if (dbVersion() < 2) {
3305 return m_legacyManager->DesignRPActiveArea();
3306 } else {
3307 // All layers assumed to be the same.
3308 return DesignPitchRP(isModule3D) * ((DesignNumRowsPerChip(isModule3D)+DesignNumEmptyRowsInGap(isModule3D)) * DesignNumChipsPhi(isModule3D) - DesignNumEmptyRowsInGap(isModule3D));
3309 }
3310}
3311
3313{
3314 if (dbVersion() < 2) {
3315 return m_legacyManager->DesignZActiveArea();
3316 } else {
3317 // All layers assumed to be the same.
3318 return (DesignPitchZ(isModule3D) * (DesignNumColsPerChip(isModule3D) - 2) + 2 * DesignPitchZLong(isModule3D)) * DesignNumChipsEta(isModule3D) + 2 * (DesignPitchZLongEnd(isModule3D) - DesignPitchZLong(isModule3D));
3319 }
3320}
3321
3323{
3324 if (dbVersion() < 2) {
3325 return m_legacyManager->DesignPitchRP(isInnermostPixelLayer());
3326 } else {
3327 int type = designType((ibl()&&isModule3D));
3328 return db()->getDouble(m_PixelReadout,"PITCHPHI",type) * Gaudi::Units::mm;
3329 }
3330}
3331
3332double DBPixelGeoManager::DesignPitchZ(bool isModule3D)
3333{
3334 if (dbVersion() < 2) {
3335 return m_legacyManager->DesignPitchZ(isInnermostPixelLayer());
3336 } else {
3337 int type = designType((ibl()&&isModule3D));
3338 return db()->getDouble(m_PixelReadout,"PITCHETA",type) * Gaudi::Units::mm;
3339 }
3340}
3341
3343{
3344 // Defaults to DesignPitchZ if not specified or is zero.
3345 if (dbVersion() < 2) {
3346 return m_legacyManager->DesignPitchZLong(isInnermostPixelLayer());
3347 } else {
3348 int type = designType((ibl()&&isModule3D));
3349 double pitch = db()->getDouble(m_PixelReadout,"PITCHETALONG",type) * Gaudi::Units::mm;
3350 if (pitch == 0) pitch = DesignPitchZ(isModule3D);
3351 return pitch;
3352 }
3353}
3354
3356{
3357 // Defaults to DesignPitchZLongEnd if not specified or is zero.
3358 if (!ibl()) { // This check is not really needed once the field is in the database.
3359 return DesignPitchZLong(isModule3D);
3360 } else {
3361 int type = designType((ibl()&&isModule3D));
3362 double pitch = 0;
3363 if (db()->testField(m_PixelReadout,"PITCHETAEND",type)) {
3364 pitch = db()->getDouble(m_PixelReadout,"PITCHETAEND",type) * Gaudi::Units::mm;
3365 }
3366 if (pitch == 0) pitch = DesignPitchZLong(isModule3D);
3367 return pitch;
3368 }
3369}
3370
3371
3372double DBPixelGeoManager::DesignGapRP(bool isModule3D)
3373{
3374 if (dbVersion() < 2) {
3375 return m_legacyManager->DesignGapRP();
3376 } else {
3377 return DesignNumEmptyRowsInGap(isModule3D) * DesignPitchRP(isModule3D);
3378 }
3379}
3380
3381double DBPixelGeoManager::DesignGapZ(bool isModule3D)
3382{
3383 if (dbVersion() < 2) {
3384 return m_legacyManager->DesignGapZ();
3385 } else {
3386 return 2. * (DesignPitchZLong(isModule3D) - DesignPitchZ(isModule3D));
3387 }
3388}
3389
3391{
3392 //
3393 // This should be (*pdch)[0]->getDouble("NRPCHIP"), but in the current
3394 // design we prefer to have one chip in the rphi direction
3395 // and define the connections for the pixels in the gap
3396 return 1;
3397}
3398
3400{
3401 return DesignNumChipsEta(isModule3D);
3402}
3403
3404
3405
3406// Endcap
3408{
3409 return db()->getDouble(m_PixelDisk,"RIDISK",m_currentLD)*mmcm();
3410}
3411
3413
3414//
3415// endcap rings
3416//
3418 // Hardwire for now
3419 return 3;
3420}
3421
3423 std::ostringstream field;
3424 field <<"SUP"<< isup+1 <<"RMIN";
3425 return db()->getDouble(m_PixelDisk,field.str(),m_currentLD)*mmcm();
3426}
3427
3429 std::ostringstream field;
3430 field <<"SUP"<< isup+1 <<"RMAX";
3431 return db()->getDouble(m_PixelDisk,field.str(),m_currentLD)*mmcm();
3432}
3433
3434
3435// SLHC only (TODO: does not look like it)
3437
3438 std::ostringstream prefix;
3439 prefix <<"SUP"<< isup+1 <<"THICK";
3440
3441 bool found = false;
3442 double tck = 0;
3443
3444 // First check text file
3445 // default support thickness
3446 if (db()->testFieldTxt(m_PixelDisk,"SUP_THICK")) {
3447 tck = db()->getDouble(m_PixelDisk,"SUP_THICK");
3448 found = true;
3449 }
3450 // overwrites if found
3451 if (db()->testFieldTxt(m_PixelDisk,prefix.str(),m_currentLD)) {
3452 tck = db()->getDouble(m_PixelDisk,prefix.str(),m_currentLD);
3453 found = true;
3454 }
3455
3456 // Now check database
3457 if (!found) tck = db()->getDouble(m_PixelDisk,prefix.str(),m_currentLD);
3458
3459 if(tck>0.) {
3460 return tck * mmcm();
3461 } else { // radlen
3462 int typeNum = PixelDiskSupportMaterialTypeNum(isup);
3463 std::string matName = getMaterialName("DiskSupport", m_currentLD, typeNum);
3464 return CalculateThickness(tck, matName);
3465 }
3466}
3467
3468// SLHC only (TODO: does not look like it)
3470
3471 if (dbVersion() < 3) return 0;
3472
3473 std::ostringstream prefix;
3474 prefix <<"SUP"<< isup+1 <<"MAT";
3475
3476 int imat = 0;
3477 bool found = false;
3478 // default material type
3479 if (db()->testFieldTxt(m_PixelDisk,"SUP_MAT")) {
3480 imat = db()->getInt(m_PixelDisk,"SUP_MAT");
3481 found = true;
3482 }
3483 // overwrites if found
3484 if (db()->testFieldTxt(m_PixelDisk,prefix.str(),m_currentLD)) {
3485 imat = db()->getInt(m_PixelDisk,prefix.str(),m_currentLD);
3486 found = true;
3487 }
3488
3489 if (!found) {
3490 imat = db()->getInt(m_PixelDisk,prefix.str(),m_currentLD);
3491 }
3492 return imat;
3493}
3494
3495
3496//
3497//*** DBM Parameters with local database ***//
3498//
3499
3500// return angle of the telescope
3502 return db()->getDouble(m_DBMTelescope,"ANGLE")*Gaudi::Units::deg;
3503}
3504
3505// return dimension of the DBM telescope
3507 return db()->getDouble(m_DBMTelescope,"WIDTH")*Gaudi::Units::mm;
3508}
3510 return db()->getDouble(m_DBMTelescope,"HEIGHT")*Gaudi::Units::mm;
3511}
3513 return db()->getDouble(m_DBMTelescope,"LENGTH")*Gaudi::Units::mm;
3514}
3515
3516// return height and length of the module cage having a 3-layers structure
3518 return db()->getDouble(m_DBMTelescope,"CAGE_HEIGHT")*Gaudi::Units::mm;
3519}
3521 return db()->getDouble(m_DBMTelescope,"CAGE_LENGTH")*Gaudi::Units::mm;
3522}
3523
3524// return layer spacing
3526 return db()->getDouble(m_DBMCage,"ZSPACING")*Gaudi::Units::mm;
3527}
3529 if (m_currentLD == 0)
3530 return db()->getDouble(m_DBMCage,"RADIAL_SPACE_0")*Gaudi::Units::mm;
3531 else if (m_currentLD == 1)
3532 return db()->getDouble(m_DBMCage,"RADIAL_SPACE_1")*Gaudi::Units::mm;
3533 else if (m_currentLD == 2)
3534 return db()->getDouble(m_DBMCage,"RADIAL_SPACE_2")*Gaudi::Units::mm;
3535 else {
3536 msg(MSG::WARNING) << "DBMSpacingRadial() is not found" << endmsg;
3537 return 0.;
3538 }
3539}
3540// return dimension of bracket unit
3542 return db()->getDouble(m_DBMBracket,"WIDTH")*Gaudi::Units::mm;
3543}
3545 return db()->getDouble(m_DBMBracket,"HEIGHT")*Gaudi::Units::mm;
3546}
3548 return db()->getDouble(m_DBMBracket,"THICKNESS")*Gaudi::Units::mm;
3549}
3551 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_THETA")*Gaudi::Units::deg;
3552}
3554 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_WIDTH")*Gaudi::Units::mm;
3555}
3557 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_HEIGHT")*Gaudi::Units::mm;
3558}
3560 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_ZSHORT")*Gaudi::Units::mm;
3561}
3563 return db()->getDouble(m_DBMBracket,"WINDOW_WIDTH")*Gaudi::Units::mm;
3564}
3566 return db()->getDouble(m_DBMBracket,"WINDOW_HEIGHT")*Gaudi::Units::mm;
3567}
3569 return db()->getDouble(m_DBMBracket,"WINDOW_OFFSET")*Gaudi::Units::mm;
3570}
3572 return db()->getDouble(m_DBMBracket,"WINDOW_CENTERZ")*Gaudi::Units::mm;
3573}
3575 return db()->getDouble(m_DBMBracket,"TOPBLOCK_THICK")*Gaudi::Units::mm;
3576}
3578 return db()->getDouble(m_DBMBracket,"SIDEBLOCK_WIDTH")*Gaudi::Units::mm;
3579}
3581 return db()->getDouble(m_DBMBracket,"SIDEBLOCK_HEIGHT")*Gaudi::Units::mm;
3582}
3584 return db()->getDouble(m_DBMBracket,"LOCK_THICK")*Gaudi::Units::mm;
3585}
3587 return db()->getDouble(m_DBMBracket,"LOCK_HEIGHT")*Gaudi::Units::mm;
3588}
3590 return db()->getDouble(m_DBMBracket,"COOLINGFIN_ZLONG")*Gaudi::Units::mm;
3591}
3593 return db()->getDouble(m_DBMBracket,"COOLINGFIN_HEIGHT")*Gaudi::Units::mm;
3594}
3596 return db()->getDouble(m_DBMBracket,"COOLINGFIN_THICK")*Gaudi::Units::mm;
3597}
3599 return db()->getDouble(m_DBMBracket,"COOLINGFIN_POS")*Gaudi::Units::mm;
3600}
3601
3602// return spacing between V-slide and first layer
3604 return db()->getDouble(m_DBMCage,"SPACING1")*Gaudi::Units::mm;
3605}
3606
3607// return dimensions of the main plate
3609 return db()->getDouble(m_DBMCage,"MAINPLATE_WIDTH")*Gaudi::Units::mm;
3610}
3612 return db()->getDouble(m_DBMCage,"MAINPLATE_HEIGHT")*Gaudi::Units::mm;
3613}
3615 return db()->getDouble(m_DBMCage,"MAINPLATE_THICK")*Gaudi::Units::mm;
3616}
3618 return db()->getDouble(m_DBMCage,"MPWINDOW_WIDTH")*Gaudi::Units::mm;
3619}
3621 return db()->getDouble(m_DBMCage,"MPWINDOW_HEIGHT")*Gaudi::Units::mm;
3622}
3624 return db()->getDouble(m_DBMCage,"MPWINDOW_POS")*Gaudi::Units::mm;
3625}
3626// return dimensions of aluminium side plates
3628 return db()->getDouble(m_DBMCage,"SIDEPLATE_THICK")*Gaudi::Units::mm;
3629}
3631 return db()->getDouble(m_DBMCage,"SIDEPLATE_HEIGHT")*Gaudi::Units::mm;
3632}
3634 return db()->getDouble(m_DBMCage,"SIDEPLATE_LENGTH")*Gaudi::Units::mm;
3635}
3637 return db()->getDouble(m_DBMCage,"SIDEPLATE_POS")*Gaudi::Units::mm;
3638}
3639
3640// return dimension of sensor, chip and ceramic
3642 return db()->getDouble(m_DBMModule,"DIAMOND_WIDTH")*Gaudi::Units::mm;
3643}
3645 return db()->getDouble(m_DBMModule,"DIAMOND_HEIGHT")*Gaudi::Units::mm;
3646}
3648 return db()->getDouble(m_DBMModule,"DIAMOND_THICK")*Gaudi::Units::mm;
3649}
3651 return db()->getDouble(m_DBMModule,"FEI4_WIDTH")*Gaudi::Units::mm;
3652}
3654 return db()->getDouble(m_DBMModule,"FEI4_HEIGHT")*Gaudi::Units::mm;
3655}
3657 return db()->getDouble(m_DBMModule,"FEI4_THICK")*Gaudi::Units::mm;
3658}
3660 return db()->getDouble(m_DBMModule,"CERAMIC_WIDTH")*Gaudi::Units::mm;
3661}
3663 return db()->getDouble(m_DBMModule,"CERAMIC_HEIGHT")*Gaudi::Units::mm;
3664}
3666 return db()->getDouble(m_DBMModule,"CERAMIC_THICK")*Gaudi::Units::mm;
3667}
3669 return db()->getDouble(m_DBMModule,"AIR_GAP")*Gaudi::Units::mm;
3670}
3672 return db()->getDouble(m_DBMModule,"KAPTONZ")*Gaudi::Units::mm;
3673}
3674
3675// flex support
3677 return db()->getDouble(m_DBMCage,"FLEXSUPP_WIDTH")*Gaudi::Units::mm;
3678}
3680 return db()->getDouble(m_DBMCage,"FLEXSUPP_HEIGHT")*Gaudi::Units::mm;
3681}
3683 return db()->getDouble(m_DBMCage,"FLEXSUPP_THICK")*Gaudi::Units::mm;
3684}
3686 return db()->getDouble(m_DBMCage, "FLEXSUPP_OFFSET")*Gaudi::Units::mm;
3687}
3688
3689// return radius of supporting rod
3691 return db()->getDouble(m_DBMCage,"ROD_RADIUS")*Gaudi::Units::mm;
3692}
3693// return distance between center of rods
3695 return db()->getDouble(m_DBMCage,"ROD2ROD_VERT")*Gaudi::Units::mm;
3696}
3698 return db()->getDouble(m_DBMCage,"ROD2ROD_HOR")*Gaudi::Units::mm;
3699}
3700
3701// radius and thickness of PP0 board
3703 return db()->getDouble(m_DBMTelescope,"PP0_RIN")*Gaudi::Units::mm;
3704}
3706 return db()->getDouble(m_DBMTelescope,"PP0_ROUT")*Gaudi::Units::mm;
3707}
3709 return db()->getDouble(m_DBMTelescope,"PP0_THICK")*Gaudi::Units::mm;
3710}
3711
3712
Scalar phi() const
phi method
#define endmsg
std::vector< size_t > vec
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
static Double_t a
static Double_t sc
int sign(int a)
void section(const std::string &sec)
virtual double PixelConnectorWidthY(int index) override
virtual double IBLStaveLength() override
virtual int PixelServiceParentEnvelopeNum(const std::string &type, int index) override
virtual double IBLFlexPP0Rmin(int iPos) override
virtual double PixelChipLength(bool isModule3D=false) override
virtual double IBLStaveFlexWingWidth() override
virtual bool partPresent(const std::string &partName) const override
virtual int PixelServiceRepeat(const std::string &a, int _n) override
virtual double PixelLayerGlobalShift() override
virtual void SetPartsDBM() override
virtual int PixelCableElements() override
virtual double PixelBoardActiveLength(bool isModule3D=false) override
virtual double IBLStaveMechanicalStaveEndBlockFixPoint() override
virtual double PixelECCarbonRMin(std::string) override
virtual double DBMCeramicY() override
virtual double PixelModuleShiftFlag(int) override
virtual double DBMSpacingRadial() override
virtual double PixelPigtailBendPhiMax() override
virtual int DesignCellColumnsPerCircuit(bool isModule3D=false) override
IRDBRecordset_ptr m_PixelFrame
virtual double DBMMPlateWindowPos() override
virtual double DBMTrapezBackTheta() override
virtual InDetDD::SiCommonItems * commonItems() override
virtual double PixelConnectorWidthZ(int index) override
virtual double DBMPP0ROut() override
virtual int NumberOfEmptyRows(bool isModule3D=false) override
virtual double PixelHybridWidth(bool isModule3D=false) override
int GangedTableIndex(int index, int type)
virtual int PixelOmegaGlueTypeNum(int index) override
virtual double PixelBoardLength(bool isModule3D=false) override
virtual double DBMModuleCageZ() override
virtual double PixelChipOffset(bool isModule3D=false) override
virtual double PixelChipThickness(bool isModule3D=false) override
IRDBRecordset_ptr m_PixelStaveZ
virtual std::string versionDescription() const override
virtual double PixelECSiDz1() override
virtual double DBMBrcktWindowX() override
bool getPixelServiceRecordTestField(const std::string &name, const std::string &type, int index)
virtual double PixelFrameElementZMin2(int sectionIndex, int element) override
virtual double PixelDiskZPosition() override
InDetDD::PixelDetectorManager * m_pDDmgr
virtual double IBLStaveMechanicalStaveEndBlockLength() override
virtual double PixelOmegaUpperBendY() override
virtual double PixelCableWidth(int index) override
virtual int PixelServiceShift(const std::string &type, int index) override
virtual double PixelLadderSupportLength() override
virtual double PixelPigtailPosZ() override
virtual bool PixelFrameMirrorSides(int sectionIndex) override
virtual int PixelBiStaveType(int layer, int phi) override
virtual double PixelConnectorWidthX(int index) override
virtual int NPixelSectors() override
virtual double PixelPigtailPosX() override
virtual int PixelModuleServiceNumber() override
virtual void setCommonItems(InDetDD::SiCommonItems *commonItems) override
IRDBRecordset_ptr m_scalingTable
virtual std::string getMaterialName(const std::string &volumeName, int layerdisk=0, int typenum=0) override
virtual double PixelAlTubeUpperBendY() override
virtual int dbVersion() override
virtual bool PixelSimpleEnvelope() override
virtual int PixelEndcapNSupportFrames() override
int getFrameElementIndex(int sectionIndex, int element)
virtual double IBLStaveOmegaMidRadius() override
virtual double PixelPigtailBendX() override
virtual double PixelBoardWidth(bool isModule3D=false) override
virtual int PixelCableLayerNum(int index) override
virtual int PixelFrameSections() override
virtual double PixelOmegaUpperBendX() override
virtual int PixelBarrelMinorVersion() override
virtual double PixelServiceRMin(const std::string &, int) override
virtual double PixelCableWeight(int index) override
virtual double PixelFrameRMaxSide(int sectionIndex) override
virtual int EmptyRows(int index) override
virtual bool DC1Geometry() const override
IRDBRecordset_ptr m_PixelIBLFlexMaterial
double DBMAngle() override
virtual double DBMFEI4Z() override
virtual double PixelTMTBaseX1(int iPart) override
virtual double DesignPitchZLongEnd(bool isModule3D=false) override
virtual double DBMMPlateRod2RodY() override
virtual std::string versionName() const override
virtual int PixelNModule() override
virtual int PixelServiceEnvelopeNum(const std::string &type, int index) override
virtual double PixelLadderCableOffsetX() override
virtual double PixelFluidX(int index) override
virtual double PixelDiskSupportRMin(int isup) override
int getPixelServiceRecordInt(const std::string &name, const std::string &type, int index)
virtual double PixelServiceRMin2(const std::string &, int) override
virtual double PixelConnectorPosX(int index) override
virtual double PixelEndcapRMin() override
virtual double PixelDiskRMin() override
IRDBRecordset_ptr m_PixelBarrelService
virtual double DBMTrapezBackY() override
virtual int PixelFluidType(int index) override
virtual double DBMDiamondY() override
virtual double PixelOmegaUpperBendRadius() override
IRDBRecordset_ptr m_PixelFluid
virtual double IBLServiceGetMinRadialPosition(const std::string &srvName, const std::string &srvType, double srvZmin, double srvZmax) override
virtual double DBMBracketX() override
virtual double PixelLayerRadius() override
virtual int IBLStaveModuleType() override
virtual double PixelEnvelopeRMin(int i) override
virtual double DesignGapZ(bool isModule3D=false) override
virtual double DBMMPlateRod2RodX() override
virtual double DesignRPActiveArea(bool isModule3D=false) override
virtual double PixelModuleServiceOffsetX(int svc) override
virtual double DBMBracketY() override
virtual double IBLStaveFacePlateGreaseThickness() override
virtual double PixelOmegaGlueEndY(int index) override
IRDBRecordset_ptr m_PixelOmegaGlue
virtual InDetMaterialManager * getMaterialManager() override
virtual int PixelFrameNumSideElements(int sectionIndex) override
virtual double PixelHalfLength() override
virtual double PixelModuleDrDistance() override
InDetDD::PairIndexMap * m_zPositionMap
virtual double IBLStaveOmegaEndRadius() override
virtual int PixelModuleServiceModuleType(int svc) override
virtual double PixelServicePhiLoc(const std::string &a, int _n) override
virtual double PixelTMTWidthX2(int iPart) override
virtual double DBMBrcktWindowOffset() override
virtual int DesignNumChipsEta(bool isModule3D=false) override
virtual std::string PixelCableLabel(int index) override
virtual double DBMCeramicX() override
IRDBRecordset_ptr m_PixelBarrelGeneral
double CalculateThickness(double, const std::string &)
std::map< int, std::vector< int > > * m_frameElementMap
virtual double DBMBrcktLockY() override
virtual std::string PixelServiceMaterial(const std::string &, int) override
virtual double PixelEnvelopeZ(int i) override
virtual double PixelLadderWidthClearance() override
virtual int moduleType3D() override
virtual double DBMKaptonZ() override
virtual int PixelFluidIndex(int type) override
virtual int PixelEndcapNDisk() override
IRDBRecordset_ptr m_PixelPigtail
virtual double DBMTelescopeZ() override
IRDBRecordset_ptr m_PixelGangedPixels
IRDBRecordset_ptr m_PixelRing
virtual double IBLStaveModuleGap() override
virtual double DBMCoolingSidePlatePos() override
virtual double PixelFrameElementZMax1(int sectionIndex, int element) override
virtual double DesignPitchRP(bool isModule3D=false) override
virtual double IBLSupportMidRingInnerRadius() override
virtual double IBLSupportMidRingWidth() override
virtual double DBMTelescopeX() override
virtual std::string PixelFrameSideMaterial(int sectionIndex) override
int PixelFrameSectionFromIndex(int sectionIndex)
virtual int GetLD() override
virtual double IBLStaveTubeOuterDiameter() override
virtual std::string PixelServiceShape(const std::string &a, int _n) override
const IGeometryDBSvc * db() const
virtual double IBLStaveMechanicalStaveOffset(bool isModule3D=false) override
virtual double PixelOmegaGluePosZ(int index) override
virtual double DBMCoolingSidePlateZ() override
virtual double PixelAlTubeUpperBendRadius() override
virtual double PixelTMTBaseX2(int iPart) override
virtual int PixelModuleIndexFromEta(int etaModule) override
virtual double DBMMPlateWindowHeight() override
IRDBRecordset_ptr m_DBMBracket
virtual double DBMCoolingSidePlateX() override
IRDBRecordset_ptr m_PixelOmega
virtual double PixelServiceWidth(const std::string &a, int _n) override
virtual unsigned int PixelEnvelopeNumPlanes() override
IRDBRecordset_ptr m_PixelIBLFlex
virtual double DesignPitchZ(bool isModule3D=false) override
IRDBRecordset_ptr m_weightTable
virtual double IBLFlexDoglegLength() override
int designType(bool isModule3D=false)
IRDBRecordset_ptr m_PixelConnector
virtual double PixelBarrelHalfLength() override
IRDBRecordset_ptr m_DBMCage
IRDBRecordset_ptr m_PixelEnvelopeService
virtual double IBLFlexDoglegDY() override
virtual int DesignCellRowsPerCircuit(bool isModule3D=false) override
virtual int IBLStaveModuleNumber_AllPlanar() override
virtual double PixelHybridLength(bool isModule3D=false) override
PixelStaveTypes * m_pixelStaveTypes
virtual double PixelPigtailEnvelopeLength() override
virtual bool centerModule(int etaModule) override
virtual double PixelEndcapZMax() override
IRDBRecordset_ptr m_staveTypeTable
virtual double DBMFlexSupportZ() override
virtual int DesignCircuitsEta(bool isModule3D=false) override
IRDBRecordset_ptr m_PixelIBLStave
virtual int PixelModuleEtaFromIndex(int index) override
virtual int DesignNumChipsPhi(bool isModule3D=false) override
virtual double DesignGapRP(bool isModule3D=false) override
double getPixelServiceRecordDouble(const std::string &name, const std::string &type, int index)
IRDBRecordset_ptr m_PixelTMT
virtual double IBLSupportMechanicalStaveRingFixPoint() override
virtual double PixelLadderTilt() override
virtual double DBMBrcktSideBlockY() override
virtual double PixelAlTubeWallThickness() override
virtual bool allowSkipEtaZero() override
virtual double DBMCeramicZ() override
virtual double PixelEnvelopeRMax(int i) override
IRDBRecordset_ptr m_dbmWeightTable
virtual double PixelModuleAngleSign(int) override
virtual double DBMBrcktFinPos() override
virtual double PixelServiceRMax2(const std::string &, int) override
virtual double IBLStaveOmegaEndCenterX() override
virtual int DesignDiodeRowsPerCircuit(bool isModule3D=false) override
virtual double DBMBrcktLockZ() override
virtual double PixelBarrelRMin() override
virtual double PixelLadderServicesX() override
std::string getPixelServiceRecordString(const std::string &name, const std::string &type, int index)
virtual double PixelTMTPosY(int iPart) override
virtual double PixelHybridThickness(bool isModule3D=false) override
virtual double PixelModuleServiceOffsetY(int svc) override
virtual double PixelFluidThick1(int index) override
virtual int DesignNumColsPerChip(bool isModule3D=false) override
virtual bool detailedFrame() override
virtual double PixelOmegaLowerBendX() override
virtual double IBLStaveRadius() override
PixelLegacyManager * m_legacyManager
virtual double IBLStaveFlexOffset() override
IRDBRecordset_ptr m_PixelConicalStave
virtual int moduleType() override
virtual double PixelECSiDz2() override
virtual double PixelRMin() override
virtual bool ibl() const override
virtual double DBMMPlateWindowWidth() override
virtual int PixelDiskSupportMaterialTypeNum(int isup) override
IRDBRecordset_ptr m_PixelModule
virtual double IBLSupportRingWidth() override
virtual double DBMModuleCageY() override
virtual std::string PixelModuleServiceName(int svc) override
virtual double PixelModuleServiceLength(int svc) override
virtual double PixelCableZStart(int index) override
virtual std::string IBLFlexMaterial(int iPos, const std::string &flexType) override
virtual double PixelCableZEnd(int index) override
virtual double DBMBrcktFinThick() override
virtual int DesignNumEmptyRowsInGap(bool isModule3D=false) override
virtual double PixelECCarbonThickness(std::string) override
virtual int PixelDiskNumSupports() override
virtual int PixelBarrelMajorVersion() override
virtual double PixelEndcapZMin() override
IRDBRecordset_ptr m_PixelStave
virtual double DesignZActiveArea(bool isModule3D=false) override
virtual std::string PixelFluidMat(int index) override
virtual double DBMBracketZ() override
virtual double PixelModuleStaggerDistance() override
virtual double IBLStaveTubeGlueThickness() override
virtual double DBMFEI4X() override
IRDBRecordset_ptr m_PixelEndcapService
virtual double PixelPigtailStartY() override
virtual int PixelTMTNumParts() override
TMT.
virtual double IBLStaveFacePlateGlueThickness() override
virtual int PixelFluidNumTypes() override
virtual double PixelServiceZMin(const std::string &, int) override
IRDBRecordset_ptr m_PixelFrameSect
virtual double PixelFrameZMin(int sectionIndex) override
virtual double PixelLadderSupportThickness() override
virtual double PixelTMTPosZ2(int iPart) override
virtual double PixelPigtailBendY() override
virtual double IBLSupportRingInnerRadius() override
virtual double DBMAirGap() override
virtual double DBMDiamondX() override
InDetDD::SiCommonItems * m_commonItems
virtual double PixelECCarbonRMax(std::string) override
virtual double PixelOmegaLength() override
std::map< int, std::vector< int > > * m_gangedIndexMap
virtual double PixelECCablesDistance() override
virtual double PixelChipWidth(bool isModule3D=false) override
virtual bool isEndcap() override
virtual int PixelEndcapMinorVersion() override
IRDBRecordset_ptr m_PixelReadout
virtual double DBMTrapezBackX() override
virtual double IBLStaveOmegaThickness() override
virtual bool DoServicesOnLadder() override
virtual double DBMBrcktTopBlockZ() override
virtual std::string versionLayout() const override
virtual int PixelCableBiStaveNum(int index) override
virtual double PixelBoardThickness(bool isModule3D=false) override
virtual double PixelAlTubeUpperBendX() override
TopLevelPlacements * m_placements
virtual double IBLStaveOmegaMidAngle() override
virtual double PixelFrameElementZMax2(int sectionIndex, int element) override
virtual std::string getLD_Label() override
virtual double PixelPigtailWidthZ() override
virtual double PixelAlTubeLowerBendX() override
virtual double DBMMainPlateZ() override
virtual PixelLegacyManager * legacyManager() override
virtual double PixelAlTubeLowerBendRadius() override
virtual int PixelNumOmegaGlueElements() override
virtual int PixelServiceElements(const std::string &) override
virtual double PixelModuleZPosition(int) override
virtual double PixelLadderSupportWidth() override
virtual const PixelID * getIdHelper() override
virtual int DesignReadoutSide(bool isModule3D=false) override
IRDBRecordset_ptr m_DBMTelescope
virtual void SetEndcap() override
virtual double DBMFlexSupportY() override
virtual int PixelEndcapMajorVersion() override
virtual int PixelServiceFrameNum(const std::string &, int) override
virtual int PixelECNSectors2() override
virtual double PixelFluidThick2(int index) override
virtual int DesignCircuitsPhi(bool isModule3D=false) override
virtual double PixelLadderLength() override
virtual double PixelPigtailEndY() override
PixelMaterialMap * m_materialMap
virtual double PixelTMTWidthY(int iPart) override
virtual double PixelLadderCableOffsetY() override
virtual double PixelOmegaGlueStartX(int index) override
virtual double PixelLadderModuleDeltaZ() override
virtual double DBMBrcktFinLongZ() override
virtual double DBMBrcktWindowCenterZ() override
virtual double DBMBrcktSideBlockX() override
virtual double PixelAlTubeLength() override
virtual double PixelOmegaStartY() override
virtual int PixelFluidOrient(int layer, int phi) override
virtual double DBMTrapezBackShortZ() override
virtual bool IBLFlexAndWingDefined() override
virtual double DBMCoolingSidePlateY() override
virtual double PixelOmegaEndY() override
virtual double DBMMainPlateX() override
virtual int PixelECNSectors1() override
virtual int DesignDiodesEtaTotal(bool isModule3D=false) override
InDetMaterialManager * m_pMatMgr
virtual double IBLStaveOmegaEndAngle() override
virtual double PixelFluidY(int index) override
virtual double DBMMainPlateY() override
virtual std::string PixelServiceName(const std::string &, int) override
IRDBRecordset_ptr m_PixelModuleSvc
virtual double PixelPigtailBendPhiMin() override
IRDBRecordset_ptr m_DBMModule
virtual double DBMPP0RIn() override
virtual int PixelFrameNumSides(int sectionIndex) override
IRDBRecordset_ptr m_materialTable
virtual double DBMRodRadius() override
virtual double PixelOmegaGlueThickness(int index) override
virtual double PixelLadderServicesY() override
IRDBRecordset_ptr m_PixelDiskRing
virtual int PixelModuleStaggerSign(int etaModule) override
virtual double DBMFEI4Y() override
virtual double PixelECCablesRMin() override
IRDBRecordset_ptr m_PixelBarrelCable
virtual int PixelStaveAxe() override
virtual double PixelServiceZMax(const std::string &, int) override
virtual double IBLStaveTubeMiddlePos() override
IRDBRecordset_ptr m_PixelSwitches
virtual double PhiOfModuleZero() override
virtual bool isLDPresent() override
virtual double DBMBrcktWindowY() override
virtual double PixelFrameSideWidth(int sectionIndex) override
IRDBRecordset_ptr m_PixelTopLevel
virtual double DBMSpacingZ() override
virtual double PixelModuleAngle() override
virtual double PixelServiceRMax(const std::string &, int) override
virtual double PixelPigtailBendRMax() override
virtual double PixelConnectorPosY(int index) override
virtual InDetDD::DistortedMaterialManager * distortedMatManager() override
virtual void SetBarrel() override
IRDBRecordset_ptr m_PixelEnvelope
virtual bool Alignable() const override
IRDBRecordset_ptr m_PixelEndcapGeneral
virtual double PixelDiskSupportThickness(int isup) override
virtual int PixelModuleServiceFullSize(int svc) override
virtual double IBLSupportMidRingOuterRadius() override
virtual int PixelNumConnectorElements() override
virtual double PixelPigtailFlatWidthZ() override
virtual double PixelTMTPosZ1(int iPart) override
virtual double PixelChipGap(bool isModule3D=false) override
DBPixelGeoManager(PixelGeoModelAthenaComps *athenaComps)
virtual bool InitialLayout() const override
virtual int EmptyRowConnections(int index) override
virtual double IBLStaveOmegaEndCenterY() override
virtual double IBLStaveMechanicalStaveModuleOffset() override
virtual double PixelECCablesRMax() override
virtual double DBMFlexSupportX() override
virtual double PixelRMax() override
virtual InDetDD::PixelDetectorManager * GetPixelDDManager() override
virtual double IBLFlexMiddleGap() override
virtual int DesignNumRowsPerChip(bool isModule3D=false) override
virtual bool isDBM() override
virtual double PixelFrameElementZMin1(int sectionIndex, int element) override
virtual int IBLStaveModuleNumber() override
virtual double PixelBarrelRMax() override
virtual IRDBRecordset_ptr getPixelServiceRecordset(const std::string &type) override
virtual double IBLStaveFlexWidth() override
virtual const GeoTrf::Transform3D & partTransform(const std::string &partName) const override
virtual double IBLFlexDoglegHeight(int iHeight) override
virtual double IBLStaveFacePlateThickness() override
virtual double DBMDiamondZ() override
double PixelModuleZPositionTabulated(int etaModule, int type)
virtual double IBLStaveTubeInnerDiameter() override
virtual std::string PixelFrameCornerMaterial(int sectionIndex) override
virtual double PixelFluidWidth(int index) override
virtual double PixelECCablesThickness() override
virtual double DBMPP0Thick() override
virtual double DBMSpace() override
virtual double PixelFluidZ1(int index) override
virtual int PixelServiceLD(const std::string &, int) override
virtual double PixelOmegaLowerBendRadius() override
virtual int DesignDiodeColumnsPerCircuit(bool isModule3D=false) override
IRDBRecordset_ptr m_PixelAlTube
virtual double IBLStaveFlexBaseThickness() override
virtual double IBLFlexPP0Rmax(int iPos) override
virtual double IBLFlexDoglegRatio() override
virtual double PixelOmegaLowerBendY() override
virtual double PixelAlTubeLowerBendY() override
IRDBRecordset_ptr m_PixelSimpleService
virtual int PixelStaveLayout() override
virtual double IBLServiceGetMaxRadialPosition(const std::string &srvName, const std::string &srvType, double srvZmin, double srvZmax) override
virtual double IBLStaveMechanicalStaveEndBlockOmegaOverlap() override
virtual double PixelPigtailBendRMin() override
virtual GeoTrf::Vector3D IBLStaveRotationAxis() override
virtual double IBLStaveMechanicalStaveWidth() override
virtual double PixelFrameRMinSide(int sectionIndex) override
IRDBRecordset_ptr m_PixelDisk
InDetDD::PairIndexMap * m_diskRingIndexMap
virtual double PixelPigtailThickness() override
virtual bool DoServices() override
virtual double PixelCableThickness(int index) override
virtual int DesignDiodesPhiTotal(bool isModule3D=false) override
virtual bool oldFrame() override
virtual double PixelLadderBentStaveAngle() override
virtual double IBLStaveOmegaGlueThickness() override
InDetDD::DistortedMaterialManager * m_distortedMatManager
virtual double PixelConnectorPosZ(int index) override
virtual double PixelFluidZ2(int index) override
virtual bool PixelServiceZsymm(const std::string &, int) override
virtual double PixelDiskSupportRMax(int isup) override
IRDBRecordset_ptr m_PixelCommon
virtual bool PixelTMTPerModule(int iPart) override
virtual double IBLStaveFlexWingThick() override
virtual double PixelModuleServiceThick(int svc) override
IRDBRecordset_ptr m_PixelLayer
virtual double PixelOmegaGlueStartY(int index) override
virtual double DesignPitchZLong(bool isModule3D=false) override
IRDBRecordset_ptr m_PixelIBLGlueGrease
virtual double PixelCableStackOffset(int index) override
virtual double DBMBrcktFinHeight() override
virtual void SetDC1Geometry(bool flag) override
virtual int PixelBarrelNLayer() override
virtual double PixelOmegaGlueLength(int index) override
virtual double PixelOmegaWallThickness() override
virtual double PixelModuleServiceOffsetZ(int svc) override
virtual std::string PixelModuleServiceMaterial(int svc) override
virtual int PixelStaveIndex(int layer) override
virtual bool isBarrel() override
virtual double IBLFlexPP0Z(int iPos) override
virtual double DBMTelescopeY() override
virtual double PixelModuleServiceWidth(int svc) override
virtual int PixelBentStaveNModule() override
virtual double PixelLadderThicknessClearance() override
IRDBRecordset_ptr m_PixelIBLSupport
virtual double DBMFlexSupportOffset() override
virtual double IBLStaveFlexLayerThickness() override
virtual double PixelLadderThickness() override
virtual double PixelTMTWidthX1(int iPart) override
virtual double IBLSupportRingOuterRadius() override
virtual double PixelFramePhiStart(int sectionIndex) override
virtual double PixelEndcapRMax() override
virtual int PixelECCarbonMaterialTypeNum(std::string) override
virtual double IBLStaveOmegaMidCenterX() override
virtual double PixelFrameZMax(int sectionIndex) override
virtual void SetCurrentLD(int i) override
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const std::string & tag() const
Return version tag.
const std::string & node() const
Return the version node.
virtual const std::string & getParamSvcName() const =0
virtual bool testField(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
virtual std::string getString(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
virtual int getInt(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
virtual double getDouble(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
The following methods will first look in the text file if provided and then look in the database.
virtual unsigned int getTableSize(IRDBRecordset_ptr recordSet) const =0
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
const StoreGateSvc * detStore() const
IRDBAccessSvc * rdbAccessSvc()
const IGeoDbTagSvc * geoDbTagSvc() const
Class to store map between pair of two ints and an int.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool ...
InDetMaterialManager.
Class to hold various Athena components.
const PixelID * getIdHelper() const
PixelGeoModelAthenaComps * athenaComps()
PixelGeometryManager(PixelGeoModelAthenaComps *athenaComps)
bool msgLvl(MSG::Level lvl) const
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
int r
Definition globals.cxx:22
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91
=============================================================================
Definition index.py:1
STL namespace.
hold the test vectors and ease the comparison
MsgStream & msg
Definition testRead.cxx:32