ATLAS Offline Software
Loading...
Searching...
No Matches
DBPixelGeoManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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_dbVersion(0),
63{
64 m_commonItems = nullptr;
65 m_pDDmgr = nullptr;
66
67 init();
68}
69
70void
72{
73 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Using ORACLE PIXEL GEOMETRY MANAGER" << endmsg;
74
76 const IGeoDbTagSvc *geoDbTag = athenaComps()->geoDbTagSvc();
77
78 // Get version tag and node for Pixel.
79 DecodeVersionKey versionKey(geoDbTag,"Pixel");
80 const std::string& detectorKey = versionKey.tag();
81 const std::string& detectorNode = versionKey.node();
82
83 // Get version tag and node for InnerDetector.
84 DecodeVersionKey indetVersionKey(geoDbTag,"InnerDetector");
85
86 if(geoDbTag->getParamSvcName().starts_with("RDB"))
87 m_versionTag = rdbSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node());
88
90//
91// Gets the structures from the det store
92//
94
95 if(msgLvl(MSG::INFO)) {
96 msg(MSG::INFO) << "Retrieving Record Sets from database ..." << endmsg;
97 msg(MSG::INFO) << "Key = " << detectorKey << " Node = " << detectorNode << endmsg;
98 }
99
100 //atls = rdbSvc->getRecordset("AtlasMother",geoModel->atlasVersion(), "ATLAS");
101 m_PixelSwitches = rdbSvc->getRecordsetPtr("PixelSwitches", detectorKey, detectorNode);
102 m_PixelBarrelGeneral = rdbSvc->getRecordsetPtr("PixelBarrelGeneral", detectorKey, detectorNode);
103 m_PixelBarrelService = rdbSvc->getRecordsetPtr("PixelBarrelService", detectorKey, detectorNode);
104 m_PixelCommon = rdbSvc->getRecordsetPtr("PixelCommon", detectorKey, detectorNode);
105 m_PixelEnvelope = rdbSvc->getRecordsetPtr("PixelEnvelope", detectorKey, detectorNode);
106 m_PixelDisk = rdbSvc->getRecordsetPtr("PixelDisk", detectorKey, detectorNode);
107 m_PixelDiskRing = rdbSvc->getRecordsetPtr("PixelDiskRing", detectorKey, detectorNode);
108 m_PixelRing = rdbSvc->getRecordsetPtr("PixelRing", detectorKey, detectorNode);
109 m_PixelEndcapGeneral = rdbSvc->getRecordsetPtr("PixelEndcapGeneral", detectorKey, detectorNode);
110 m_PixelEndcapService = rdbSvc->getRecordsetPtr("PixelEndcapService", detectorKey, detectorNode);
111 m_PixelEnvelopeService = rdbSvc->getRecordsetPtr("PixelEnvelopeService", detectorKey, detectorNode);
112 m_PixelLayer = rdbSvc->getRecordsetPtr("PixelLayer", detectorKey, detectorNode);
113 m_PixelModule = rdbSvc->getRecordsetPtr("PixelModule", detectorKey, detectorNode);
114 m_PixelModuleSvc = rdbSvc->getRecordsetPtr("PixelModuleSvc", detectorKey, detectorNode);
115 m_PixelStave = rdbSvc->getRecordsetPtr("PixelStave", detectorKey, detectorNode);
116 m_PixelStaveZ = rdbSvc->getRecordsetPtr("PixelStaveZ", detectorKey, detectorNode);
117 m_PixelTopLevel = rdbSvc->getRecordsetPtr("PixelTopLevel", detectorKey, detectorNode);
118 m_PixelReadout = rdbSvc->getRecordsetPtr("PixelReadout", detectorKey, detectorNode);
119 m_PixelGangedPixels = rdbSvc->getRecordsetPtr("GangedPixels", detectorKey, detectorNode);
120 m_PixelBarrelCable = rdbSvc->getRecordsetPtr("PixelBarrelCable", detectorKey, detectorNode);
121 m_PixelTMT = rdbSvc->getRecordsetPtr("PixelTMT", detectorKey, detectorNode);
122 m_PixelOmega = rdbSvc->getRecordsetPtr("PixelOmega", detectorKey, detectorNode);
123 m_PixelOmegaGlue = rdbSvc->getRecordsetPtr("PixelOmegaGlue", detectorKey, detectorNode);
124 m_PixelAlTube = rdbSvc->getRecordsetPtr("PixelAlTube", detectorKey, detectorNode);
125 m_PixelFluid = rdbSvc->getRecordsetPtr("PixelFluid", detectorKey, detectorNode);
126 m_PixelConnector = rdbSvc->getRecordsetPtr("PixelConnector", detectorKey, detectorNode);
127 m_PixelPigtail = rdbSvc->getRecordsetPtr("PixelPigtail", detectorKey, detectorNode);
128 m_PixelSimpleService = rdbSvc->getRecordsetPtr("PixelSimpleService", detectorKey, detectorNode);
129 m_PixelFrame = rdbSvc->getRecordsetPtr("PixelFrame", detectorKey, detectorNode);
130 m_PixelFrameSect = rdbSvc->getRecordsetPtr("PixelFrameSect", detectorKey, detectorNode);
131 m_PixelIBLStave = rdbSvc->getRecordsetPtr("PixelIBLStave" , detectorKey, detectorNode);
132 m_PixelIBLSupport = rdbSvc->getRecordsetPtr("PixelIBLSupport", detectorKey, detectorNode);
133 m_PixelIBLFlex = rdbSvc->getRecordsetPtr("PixelIBLFlex", detectorKey, detectorNode);
134 m_PixelIBLFlexMaterial = rdbSvc->getRecordsetPtr("PixelIBLFlexMaterial", detectorKey, detectorNode);
135 m_PixelIBLGlueGrease = rdbSvc->getRecordsetPtr("PixelIBLGlueGrease", detectorKey, detectorNode);
136 m_PixelConicalStave = rdbSvc->getRecordsetPtr("PixelConicalStave", detectorKey, detectorNode);
137
138 // Weights table
139 m_weightTable = rdbSvc->getRecordsetPtr("PixelWeights", detectorKey, detectorNode);
140
141 // Extra Scaling table. This is used for extra material studies. For nominal material the table should be empty.
142 // NB this is at InnerDetector level node.
143 m_scalingTable = rdbSvc->getRecordsetPtr("PixelMatScaling", indetVersionKey.tag(), indetVersionKey.node());
144
145 // MaterialMap
146 m_materialTable = rdbSvc->getRecordsetPtr("PixelMaterialMap", detectorKey, detectorNode);
147
148 // Pixel stave types
149 m_staveTypeTable = rdbSvc->getRecordsetPtr("PixelStaveType", detectorKey, detectorNode);
150
151 // DBM
152 m_DBMTelescope = rdbSvc->getRecordsetPtr("DBMTelescope", detectorKey, detectorNode);
153 m_DBMBracket = rdbSvc->getRecordsetPtr("DBMBracket", detectorKey, detectorNode);
154 m_DBMCage = rdbSvc->getRecordsetPtr("DBMCage", detectorKey, detectorNode);
155 m_DBMModule = rdbSvc->getRecordsetPtr("DBMModule", detectorKey, detectorNode);
156 m_dbmWeightTable = rdbSvc->getRecordsetPtr("DBMMaterials", detectorKey, detectorNode);
157
159
160 if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Database version number: " << m_dbVersion << endmsg;
161
162 if (m_dbVersion < 4) {
163 m_legacyManager = std::make_unique<PixelLegacyManager>(rdbSvc, detectorKey, detectorNode);
164 }
165
166 if(msgLvl(MSG::INFO)) msg(MSG::INFO) << "... Record Sets retrieved." << endmsg;
167
168 m_distortedMatManager = std::make_unique<InDetDD::DistortedMaterialManager>();
169
170 // Set default lenth unit to Gaudi::Units::mm for newer version and Gaudi::Units::cm for older versions
171 m_defaultLengthUnit = (m_dbVersion < 3) ? Gaudi::Units::cm : Gaudi::Units::mm;
172
173 // Get the top level placements
174 m_placements = std::make_unique<TopLevelPlacements>(m_PixelTopLevel);
175
176 // If all individual pieces are not present, then actually all are present.
177 m_allPartsPresent = (!m_placements->present("Barrel") && !m_placements->present("EndcapA") && !m_placements->present("EndcapC"));
178
179 // cache the number of inner frames
180 if (m_dbVersion < 3) {
181 m_barrelInFrames = (*m_PixelBarrelGeneral)[0]->getInt("NFRAMEIN");
182 m_endcapInFrames = (*m_PixelEndcapGeneral)[0]->getInt("NFRAMEIN");
183 } else {
186 }
187
188 //
189 // Get the InDet material manager. This is a wrapper around the geomodel one with some extra functionality to deal
190 // with weights table if it exists
191
192 m_pMatMgr = std::make_unique<InDetMaterialManager>("PixelMaterialManager", athenaComps());
193 m_pMatMgr->addWeightTable(m_weightTable, "pix");
194 m_pMatMgr->addScalingTable(m_scalingTable);
195
196 // add the DBM weight table
197 m_pMatMgr->addWeightTable(m_dbmWeightTable, "pix");
198
199 // Create material map
200 m_materialMap = std::make_unique<PixelMaterialMap>(db(), m_materialTable);
201 if (m_materialTable->size() == 0) addDefaultMaterials();
202
203 // Create stave type map
204 m_pixelStaveTypes = std::make_unique<PixelStaveTypes>(db(), m_staveTypeTable);
205
206
207 //
208 // Print the version number for the barrel and endcap geometry
209 //
210 //cout << "Instantiating Pixel Detector" << endl;
211 //cout << "Barrel Version " << this->PixelBarrelMajorVersion() << "." << this->PixelBarrelMinorVersion() << endl;
212 //cout << "Endcap Version " << this->PixelEndcapMajorVersion() << "." << this->PixelEndcapMinorVersion() << endl;
213}
214
219
224
225
229
230
236
237
240{
241 return m_commonItems;
242}
243
244
245void
250
251
252const PixelID *
257
258
259const GeoTrf::Transform3D &
260DBPixelGeoManager::partTransform(const std::string & partName) const
261{
262 return m_placements->transform(partName);
263}
264
265
266bool
267DBPixelGeoManager::partPresent(const std::string & partName) const
268{
269 // First check if overridden from text file.
270 if (partName == "Barrel") {
271 if (db()->testField("PixelCommon","DOBARREL")) {
272 return db()->getInt("PixelCommon","DOBARREL");
273 }
274 } else if (partName == "EndcapA" || partName == "EndcapC") {
275 if (db()->testField("PixelCommon","DOENDCAPS")) {
276 return db()->getInt("PixelCommon","DOENDCAPS");
277 }
278 }
279 // otherwise check database.
280 return (m_allPartsPresent || m_placements->present(partName));
281}
282
284//
285// Setting of Layer/Disk and Barrel/EndCap
286//
289{
290 if(isBarrel() ) {
291 if(i <= PixelBarrelNLayer()) {
292 m_currentLD=i;
293 } else {
294 msg(MSG::ERROR) << "Layer set out of bounds: " << i << ", Setting it to 0" << endmsg;
295 m_currentLD = 0;
296 }
297 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<" Current layer set to " << m_currentLD << endmsg;
298 }
299 if(isEndcap() ) {
300 if (i<= PixelEndcapNDisk() ) {
301 m_currentLD=i;
302 } else {
303 msg(MSG::ERROR) << "Disk set out of bounds: " << i << ", Setting it to 0" << endmsg;
304 m_currentLD = 0;
305 }
306 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<" Current disk set to " << m_currentLD << endmsg;
307 }
308 if(isDBM() ) {
309 if (i<= 2 ) {
310 m_currentLD=i;
311 } else {
312 msg(MSG::ERROR) << "DBM: Disk set out of bounds: " << i << ", Setting it to 0" << endmsg;
313 m_currentLD = 0;
314 }
315 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<" Current disk set to " << m_currentLD << endmsg;
316 }
317}
318
320 //msg(MSG::DEBUG) << "Setting Barrel" << endmsg;
321 m_BarrelEndcap = 0;
322}
324 m_BarrelEndcap = 1;
325 //msg(MSG::DEBUG) << "Setting Endcap" << endmsg;
326}
328 m_BarrelEndcap = 2;
329 //msg(MSG::DEBUG) << "Setting DBM" << endmsg;
330}
331
332//
333// Check if the current layer/disk has to be retrieved
334// By default in MySQL all the three layers have to be retrieved
335// If m_initialLayout is true we ignore NOVA for layer/disk 1.
336// For initial layout layer=1 and disk=1 (2nd layer and disk) is missing.
337//
340 if(isBarrel()) {
341 if (m_initialLayout && m_currentLD == 1) return false;
342 std::ostringstream A;
343 A << "_" << m_currentLD;
344 // More than 3 layers not yet supported in database so
345 // if not present in text file assume using this layer
346 return db()->getInt(m_PixelBarrelGeneral,"USELAYER"+A.str());
347 }
348 if(isEndcap() ) {
349 if (m_initialLayout && m_currentLD == 1) return false;
350 std::ostringstream A;
351 A << "_" << m_currentLD;
352 // More than 3 disks not yet supported in database so
353 // if not present in text file assume using this disks
354 return db()->getInt(m_PixelEndcapGeneral,"USEDISK"+A.str());
355 }
356 return false;
357}
358
359
361 return m_BarrelEndcap == 0;
362}
364 return m_BarrelEndcap == 1;
365 return false;
366}
368 return m_BarrelEndcap == 2;
369}
370
377
379 return m_initialLayout;
380}
381
383 m_dc1Geometry = flag;
384 if (m_legacyManager) m_legacyManager->SetDC1Geometry(flag);
385}
386
388 return m_dc1Geometry;
389}
390
392 return m_alignable;
393}
394
395
397 if(m_pDDmgr == nullptr) {
398 //
399 // retrieve the pointer to the DD manager
400 //
401 StatusCode sc = athenaComps()->detStore()->retrieve(m_pDDmgr);
402 if (sc.isFailure()) {
403 msg(MSG::ERROR) << "Cannot retrieve PixelDetectorManager" << endmsg;
404 }
405 }
406 return m_pDDmgr;
407}
408
409
414
415
417//
418// Calculate Thickness. This is used for the materials
419// which thickness is given in % of r.l.
420//
422double DBPixelGeoManager::CalculateThickness(double tck,const string& mat) {
423 GeoIntrusivePtr<const GeoMaterial> material{m_pMatMgr->getMaterial(mat)};
424 double rl = material->getRadLength();
425 return -1.*rl*tck/100.;
426}
427
429{
430 int type = 0;
431 if (ibl()) {
432 if (isBarrel()) {
433 type = db()->getInt(m_PixelLayer,"MODULETYPE",m_currentLD);
434 }
435 } else {
436 if(isBarrel()) type = m_currentLD;
438 }
439 return type;
440}
441
443{
444 int type = -1;
445 if (!isBarrel()||m_currentLD>0) return type;
446
447 if (ibl()) {
448 try {
449 type = db()->getInt(m_PixelLayer,"MODULETYPE3D",m_currentLD);
450 return type;
451 }
452 catch(...)
453 {
454 return moduleType()+1;
455 }
456 }
457
458 return type;
459}
460
461
462
464//
465// Si Boards Parameters:
466//
469{
470 if(ibl()&&isModule3D){
471 return db()->getDouble(m_PixelModule,"BOARDWIDTH",moduleType3D())*mmcm();
472 }
473
474 return db()->getDouble(m_PixelModule,"BOARDWIDTH",moduleType())*mmcm();
475}
476
478{
479 if(ibl()&&isModule3D)
480 return db()->getDouble(m_PixelModule,"BOARDLENGTH",moduleType3D())*mmcm();
481
482 return db()->getDouble(m_PixelModule,"BOARDLENGTH",moduleType())*mmcm();
483}
484
486{
487 if (m_dc1Geometry && isBarrel() && (m_currentLD == 0)) {
488 return 200*Gaudi::Units::micrometer;
489 }
490
491 if(ibl()&&isModule3D)
492 return db()->getDouble(m_PixelModule,"BOARDTHICK",moduleType3D())*mmcm();
493 return db()->getDouble(m_PixelModule,"BOARDTHICK",moduleType())*mmcm();
494}
495
497{
498 return DesignZActiveArea(isModule3D);
499}
500
501
503//
504// Hybrid Parameters:
505//
508{
509 if(ibl()&&isModule3D)
510 return db()->getDouble(m_PixelModule,"HYBRIDWIDTH",moduleType3D())*mmcm();
511
512 return db()->getDouble(m_PixelModule,"HYBRIDWIDTH",moduleType())*mmcm();
513}
514
516{
517 if(ibl()&&isModule3D)
518 return db()->getDouble(m_PixelModule,"HYBRIDLENGTH",moduleType3D())*mmcm();
519
520 return db()->getDouble(m_PixelModule,"HYBRIDLENGTH",moduleType())*mmcm();
521}
522
524{
525 if(ibl()&&isModule3D)
526 return db()->getDouble(m_PixelModule,"HYBRIDTHICK",moduleType3D())*mmcm();
527
528 return db()->getDouble(m_PixelModule,"HYBRIDTHICK",moduleType())*mmcm();
529}
530
532//
533// Chip Parameters:
534//
536
537double DBPixelGeoManager::PixelChipWidth(bool isModule3D)
538{
539 if(ibl()&&isModule3D)
540 return db()->getDouble(m_PixelModule,"CHIPWIDTH",moduleType3D())*mmcm();
541
542 return db()->getDouble(m_PixelModule,"CHIPWIDTH",moduleType())*mmcm();
543}
544
546{
547 if(ibl()&&isModule3D)
548 return db()->getDouble(m_PixelModule,"CHIPLENGTH",moduleType3D())*mmcm();
549
550 return db()->getDouble(m_PixelModule,"CHIPLENGTH",moduleType())*mmcm();
551}
552
553double DBPixelGeoManager::PixelChipGap(bool isModule3D)
554{
555 if(ibl()&&isModule3D)
556 return db()->getDouble(m_PixelModule,"CHIPGAP",moduleType3D())*mmcm();
557
558 return db()->getDouble(m_PixelModule,"CHIPGAP",moduleType())*mmcm();
559}
560
562{
563 if(!ibl()||GetLD()!=0||!isBarrel()||!(db()->testField(m_PixelModule,"CHIPOFFSET"))){
564 return 0.;
565 }
566
567 if(isModule3D)
568 return db()->getDouble(m_PixelModule,"CHIPOFFSET",moduleType3D())*mmcm();
569
570 return db()->getDouble(m_PixelModule,"CHIPOFFSET",moduleType())*mmcm();
571}
572
574 if(ibl()&&isModule3D)
575 return db()->getDouble(m_PixelModule,"CHIPTHICK",moduleType3D())*mmcm();
576
577 return db()->getDouble(m_PixelModule,"CHIPTHICK",moduleType())*mmcm();
578}
579
580
581
583//
584// Module services
585//
587
589{
590 if(!ibl()||GetLD()>0||!isBarrel()) return 0;
591
592 if (db()->getTableSize(m_PixelModuleSvc))
594 return 0;
595}
596
598{
599 return db()->getDouble(m_PixelModuleSvc,"LENGTH",svc)*mmcm();
600}
601
603{
604 return db()->getDouble(m_PixelModuleSvc,"WIDTH",svc)*mmcm();
605}
606
608{
609 return db()->getDouble(m_PixelModuleSvc,"THICK",svc)*mmcm();
610}
611
613{
614 return db()->getDouble(m_PixelModuleSvc,"XOFFSET",svc)*mmcm();
615}
616
618{
619 return db()->getDouble(m_PixelModuleSvc,"YOFFSET",svc)*mmcm();
620}
621
623{
624 return db()->getDouble(m_PixelModuleSvc,"ZOFFSET",svc)*mmcm();
625}
626
628{
629 return db()->getInt(m_PixelModuleSvc,"FULLSIZE",svc);
630}
631
633{
634 return db()->getInt(m_PixelModuleSvc,"MODULE3D",svc)*mmcm();
635}
636
638{
639 return db()->getString(m_PixelModuleSvc,"NAME",svc);
640}
641
643{
644 return db()->getString(m_PixelModuleSvc,"MATERIAL",svc);
645}
646
647
648
650//
651// Pixel Disks carbon structure
652//
655
656 int isup=0;
657 if (a == "Inner") {
658 isup = 0;
659 } else if(a == "Central") {
660 isup = 1;
661 } else {
662 isup = 2;
663 }
664
665 return PixelDiskSupportRMin(isup);
666}
667
669 int isup=0;
670 if (a == "Inner") {
671 isup = 0;
672 } else if(a == "Central") {
673 isup = 1;
674 } else {
675 isup = 2;
676 }
677 return PixelDiskSupportRMax(isup);
678}
679
681
682 int isup=0;
683 if (a == "Inner") {
684 isup = 0;
685 } else if(a == "Central") {
686 isup = 1;
687 } else {
688 isup = 2;
689 }
690 return PixelDiskSupportThickness(isup);
691}
692
693
695
696 if (dbVersion() < 3) return 0;
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 }
706}
707
708
710//
711// Central Services
712//
714//
715// This is complicated in the DB...
716// If Rmin < 0 this means that the cylinder has to be placed only once
717// So I return RMin with its sign, for further processing by the service
718// methods.
719// If RMax is <0 the thickness is given in % of r.l. which have to be
720// calculated by the method calculatethickness
721//
722// If Zmin and Zmax have DIFFERENT sign, then the thickness is given in
723// % of r.l....
724//
725
727 // FIXME
728 /*
729 if (dbVersion() < 3) {
730 if(isBarrel() ) {
731 if(a == "Inside") return (*m_PixelBarrelGeneral)[0]->getInt("NFRAMEIN");
732 if(a == "Outside") return (*m_PixelBarrelGeneral)[0]->getInt("NFRAMEOUT");
733 }
734 if(isEndcap() ) {
735 if(a == "Inside") return (*m_PixelEndcapGeneral)[0]->getInt("NFRAMEIN");
736 if(a == "Outside") return (*m_PixelEndcapGeneral)[0]->getInt("NFRAMEOUT");
737 }
738 return 0;
739 } else {
740 */
741 // a is ignored. Use frame num to distinguish between inside (<1000) and ouside (>=1000).
742 if(type == "simple") return db()->getTableSize(m_PixelSimpleService);
743 if(type == "barrel") return db()->getTableSize(m_PixelBarrelService);
744 if(type == "endcap") return db()->getTableSize(m_PixelEndcapService);
745 if(type == "envelope") return db()->getTableSize(m_PixelEnvelopeService);
746 return 0;
747 //}
748}
749
750// Name used when naming G4/Geo volumes
751std::string DBPixelGeoManager::PixelServiceName(const std::string & type, int index) {
752
753 if (useLegacy() || !getPixelServiceRecordTestField("VOLNAME",type,index)) {
754 return "";
755 } else {
756 return getPixelServiceRecordString("VOLNAME",type,index);
757 }
758}
759
760
761// Flag to say whether volume should be described in both positive and
762// negative halves.
763bool DBPixelGeoManager::PixelServiceZsymm(const std::string & type, int index) {
764 if (dbVersion() < 3 || !getPixelServiceRecordTestField("ZSYMM",type,index)) {
765 // If ZSYMM not defined use old logic to determine if volume is
766 // duplicated in both positive and negative halves.
767 double rmin = getPixelServiceRecordDouble("RIN",type,index);
768 double zmin = getPixelServiceRecordDouble("ZIN",type,index);
769 return (rmin>0 && zmin > 0.000001);
770 } else {
771 return getPixelServiceRecordInt("ZSYMM",type,index);
772 }
773}
774
775
776double DBPixelGeoManager::PixelServiceRMin(const std::string & type, int index) {
777 return std::abs(getPixelServiceRecordDouble("RIN",type,index)) * mmcm();
778}
779
780double DBPixelGeoManager::PixelServiceRMax(const std::string & type, int index) {
781 double rtmp = getPixelServiceRecordDouble("ROUT",type,index);
782 // If this is negative this is the thickness of the cyl in % of r.l.
783 double rmin = PixelServiceRMin(type,index);
784 double rmax = 0;
785 if(rtmp > 0) {
786 rmax = rtmp * mmcm();
787 } else {
788 string material = PixelServiceMaterial(type,index);
789 rmax = rmin + CalculateThickness(rtmp, material);
790 }
791 return rmax;
792}
793
794double DBPixelGeoManager::PixelServiceRMin2(const std::string & type, int index) {
796 return 0;
797 } else {
798 return getPixelServiceRecordDouble("RIN2",type,index) * Gaudi::Units::mm;
799 }
800}
801
802double DBPixelGeoManager::PixelServiceRMax2(const std::string & type, int index) {
804 return 0;
805 } else {
806 return getPixelServiceRecordDouble("ROUT2",type,index) * Gaudi::Units::mm;
807 }
808}
809
810double DBPixelGeoManager::PixelServiceZMin(const std::string & type, int index) {
811 return getPixelServiceRecordDouble("ZIN",type,index) * mmcm();
812}
813
814double DBPixelGeoManager::PixelServiceZMax(const std::string & type, int index) {
815 double zout = getPixelServiceRecordDouble("ZOUT",type,index);
816 double zmin = PixelServiceZMin(type,index);
817 double zmax = 0;
818 // If zin and zout are opposite sign then zout is the thickness of the cyl in % of r.l.
819 if(zmin * zout > -0.000000001) {
820 zmax = zout * mmcm();
821 } else {
822 string material = PixelServiceMaterial(type,index);
823 double sign = (zmin > 0) ? 1: -1;
824 zmax = zmin + sign*CalculateThickness(zout, material);
825 }
826 return zmax;
827}
828
829double DBPixelGeoManager::PixelServicePhiLoc(const std::string & type, int index) {
831 return 0;
832 } else {
833 return getPixelServiceRecordDouble("PHI",type,index) * Gaudi::Units::degree;
834 }
835}
836
837double DBPixelGeoManager::PixelServiceWidth(const std::string & type, int index) {
839 return 0;
840 } else {
841 // Can be in degree or Gaudi::Units::mm. Leave it to GeoPixelServices to interpret.
842 return getPixelServiceRecordDouble("WIDTH",type,index);
843 }
844}
845
846int DBPixelGeoManager::PixelServiceRepeat(const std::string & type, int index) {
848 return 0;
849 } else {
850 return getPixelServiceRecordInt("REPEAT",type,index);
851 }
852}
853
854std::string DBPixelGeoManager::PixelServiceShape(const std::string & type, int index) {
855 if (type == "simple") return "TUBE";
857 return "TUBE";
858 } else {
859 return getPixelServiceRecordString("SHAPE",type,index);
860 }
861}
862
863
864int DBPixelGeoManager::PixelServiceShift(const std::string & type, int index) {
866 return 0;
867 } else {
868 return getPixelServiceRecordInt("SHIFT",type,index);
869 }
870}
871
872
873int DBPixelGeoManager::PixelServiceLD(const std::string & type, int index) {
874 return getPixelServiceRecordInt("LAYERNUM",type,index)-1;
875}
876
877string DBPixelGeoManager::PixelServiceMaterial(const std::string & type, int index) {
878
879 int imat = 0;
880 if (type != "simple") {
881 imat = getPixelServiceRecordInt("MATERIAL",type,index);
882 }
883 std::string materialName;
884 if (!imat) {
885 materialName = getPixelServiceRecordString("MATERIALNAME",type,index);
886 } else {
887 // Old
888 if(type == "barrel") {
889 string mat[11] = {
890 "std::Berillia",
891 "std::Carbon",
892 "pix::Services",
893 "pix::Titanium",
894 "pix::MatPP11",
895 "pix::MatPP12",
896 "pix::MatPP13",
897 "pix::MatPP14",
898 "pix::MatPP15",
899 "pix::MatPP16",
900 "pix::MatPP17"};
901 materialName = mat[imat-1];
902 }
903 if(type == "endcap") {
904 string mat[4] = {
905 "std::Berillia",
906 "std::Carbon",
907 "pix::ECServices",
908 "pix::Disk"};
909 materialName = mat[imat-1];
910 }
911 }
912 return materialName;
913}
914
915
917 // In older version frame num indicated "inside" or "outside"
918 // 0-999: Inside
919 // >=1000: Outside
920 // No frame number in simple table.
921 if (type == "simple") return index+1;
922 int framenum = getPixelServiceRecordInt("FRAMENUM",type,index);
923 if (framenum <= 0) return index+1;
924 if (dbVersion() < 3) {
925 if(type == "barrel") {
926 if (index >= m_barrelInFrames) framenum += 1000;
927 }
928 if(type == "endcap") {
929 if (index >= m_endcapInFrames) framenum += 1000;
930 }
931 }
932 return framenum;
933 // FIXME
934 /*
935 if (dbVersion() < 3) return framenum;
936 if (type == "Inside" && framenum < 1000) return framenum;
937 if (type == "Outside" && framenum >= 1000) return framenum%1000;
938 return -1;
939 */
940}
941
942// Access child/envelope service parameters
944
945 if (type != "envelope") return 0;
946
947 try{
948 int envnum = getPixelServiceRecordInt("ENVNUM",type,index);
949 return envnum;
950 }
951 catch(...)
952 {}
953
954 return 0;
955}
956
958
959 // if (type == "envelope") return 0;
960
961 if (type == "envelope"){
962 try{
963 int envnum = getPixelServiceRecordInt("ENVPARENT",type,index);
964 return envnum;
965 }
966 catch(...)
967 {}
968 }
969 else {
970
971 try{
972 int envnum = getPixelServiceRecordInt("ENVELOPE",type,index);
973 return envnum;
974 }
975 catch(...)
976 {
977 }
978 }
979
980
981 return 0;
982}
983
984std::string DBPixelGeoManager::getPixelServiceRecordString(const std::string & name, const std::string & type, int index) {
986 return db()->getString(recordSet, name, index);
987}
988
989int DBPixelGeoManager::getPixelServiceRecordInt(const std::string & name, const std::string & type, int index) {
991 return db()->getInt(recordSet, name, index);
992}
993
994
995double DBPixelGeoManager::getPixelServiceRecordDouble(const std::string & name, const std::string & type, int index) {
997 return db()->getDouble(recordSet, name, index);
998}
999
1000bool DBPixelGeoManager::getPixelServiceRecordTestField(const std::string & name, const std::string & type, int index) {
1001 try {
1003 return db()->testField(recordSet, name, index);
1004 }
1005 catch(...){}
1006 return false;
1007}
1008
1009
1010// Returns IRDBRecordset
1012 // m_barrelInFrames and m_endcapInFrames should be zero in dbVersion >= 3
1013 IRDBRecordset_ptr recordSet;
1014 if (type == "simple") {
1015 recordSet = m_PixelSimpleService;
1016 } else if(type == "barrel") {
1017 recordSet = m_PixelBarrelService;
1018 //if(type != "Inside") index += m_barrelInFrames;
1019 } else if(type == "endcap") {
1020 recordSet = m_PixelEndcapService;
1021 //if(type != "Inside") index += m_endcapInFrames;
1022 } else if(type == "envelope") {
1023 recordSet = m_PixelEnvelopeService;
1024 //if(type != "Inside") index += m_endcapInFrames;
1025 } else {
1026 msg(MSG::ERROR) << "ERROR: getPixelServiceRecord(), neither Barrel of Endcap selected!" << endmsg;
1027 }
1028 return recordSet;
1029}
1030
1032{
1033 double tck = db()->getDouble(m_PixelDisk,"CABLETHICK",m_currentLD);
1034 if( tck > 0.) {
1035 return tck*mmcm();
1036 } else {
1037 std::string matName = getMaterialName("DiskCable", m_currentLD);
1038 return CalculateThickness(tck,matName);
1039 }
1040}
1041
1042int
1044{
1045 if (dbVersion() < 3) return m_legacyManager->PixelCableElements();
1047}
1048
1049int
1051{
1052 if (dbVersion() < 3) return 0;
1053 return db()->getInt(m_PixelBarrelCable,"LAYER",index);
1054}
1055
1056int
1058{
1059 if (dbVersion() < 3) return 0;
1060 return db()->getInt(m_PixelBarrelCable,"BISTAVE",index);
1061}
1062
1063
1064double
1066{
1067 if (dbVersion() < 3) return m_legacyManager->PixelCableZStart(index);
1068 return db()->getDouble(m_PixelBarrelCable,"ZSTART",index) * Gaudi::Units::mm;
1069}
1070
1071double
1073{
1074 if (dbVersion() < 3) return m_legacyManager->PixelCableZEnd(index);
1075 return db()->getDouble(m_PixelBarrelCable,"ZEND",index) * Gaudi::Units::mm;
1076}
1077
1078double
1080{
1081 if (dbVersion() < 3) return m_legacyManager->PixelCableWidth(index);
1082 return db()->getDouble(m_PixelBarrelCable,"WIDTH",index) * Gaudi::Units::mm;
1083}
1084
1085double
1087{
1088 if (dbVersion() < 3) return m_legacyManager->PixelCableThickness(index);
1089 return db()->getDouble(m_PixelBarrelCable,"THICK",index) * Gaudi::Units::mm;
1090}
1091
1092double
1094{
1095 if (dbVersion() < 3) return m_legacyManager->PixelCableStackOffset(index);
1096 return db()->getDouble(m_PixelBarrelCable,"STACKPOS",index) * Gaudi::Units::mm;
1097}
1098
1099double
1101{
1102 if (dbVersion() < 3) return 0;
1103 return db()->getDouble(m_PixelBarrelCable,"WEIGHT",index) * GeoModelKernelUnits::g;
1104}
1105
1106std::string
1108{
1109 if (dbVersion() < 3) return m_legacyManager->PixelCableLabel(index);
1110 return db()->getString(m_PixelBarrelCable,"LABEL",index);
1111}
1112
1113
1114//
1115// Version of the Geometry
1116//
1117
1119 // This determines a version depending on various changes in the database;
1120 int version = 0;
1121
1122 if (!(*m_PixelLayer)[0]->isFieldNull("PHIOFMODULEZERO")) version = 1;
1123 if (m_PixelReadout->size() != 0) version = 2;
1124 if (m_weightTable->size() != 0) version = 3;
1125 if (m_PixelTMT->size() != 0) version = 4; // Removed all legacy tables
1126
1127 return version;
1128}
1129
1130
1131
1132std::string DBPixelGeoManager::getMaterialName(const std::string & volumeName, int layerdisk, int typenum) {
1133 return m_materialMap->getMaterial(layerdisk, typenum, volumeName);
1134}
1135
1136
1138 // This is for backward compatibilty. Newer geometies get the
1139 // gets them from the database.
1140 m_materialMap->addMaterial(0,0,"Sensor","std::Silicon");
1141 m_materialMap->addMaterial(0,0,"Chip","pix::Chip");
1142 m_materialMap->addMaterial(0,0,"Hybrid","pix::Hybrid");
1143 m_materialMap->addMaterial(0,0,"Omega","pix::MatOmega");
1144 m_materialMap->addMaterial(0,0,"AlTube","pix::MatAlTube");
1145 m_materialMap->addMaterial(1,0,"AlTube","pix::MatAlTube");
1146 m_materialMap->addMaterial(2,0,"AlTube","pix::MatAlTubeFix");
1147 m_materialMap->addMaterial(0,1,"Fluid","pix::MatCap1");
1148 m_materialMap->addMaterial(0,2,"Fluid","pix::MatCap2");
1149 m_materialMap->addMaterial(0,0,"TMT","pix::MatTMT");
1150 m_materialMap->addMaterial(0,0,"GlueOmegaStave","pix::MatGlue");
1151 m_materialMap->addMaterial(0,0,"Connector","pix::MatConn");
1152 m_materialMap->addMaterial(0,0,"PigtailCyl","pix::MatPigtail");
1153 m_materialMap->addMaterial(0,0,"PigtailFlat","pix::MatPigtail");
1154 m_materialMap->addMaterial(0,0,"Cable","pix::MatT0");
1155 m_materialMap->addMaterial(0,0,"DiskCable","pix::ECCables");
1156 m_materialMap->addMaterial(0,0,"DiskSupport","pix::Disk");
1157 m_materialMap->addMaterial(0,0,"Frame","std::Carbon");
1158 m_materialMap->addMaterial(0,0,"EndCone","std::Carbon");
1159}
1160
1162{
1163 std::ostringstream o;
1164 if(isBarrel()) {
1165 if (m_currentLD == 0) {
1166 o << "BL";
1167 } else {
1168 o << "L" << m_currentLD;
1169 }
1170 } else {
1171 o << "D" << m_currentLD;
1172 }
1173 return o.str();
1174}
1175
1177{
1178 return static_cast<int>((*m_PixelBarrelGeneral)[0]->getDouble("VERSION"));
1179}
1180
1182{
1183 return static_cast<int>(((*m_PixelBarrelGeneral)[0]->getDouble("VERSION") - PixelBarrelMajorVersion())*10 + 0.5);
1184}
1185
1187{
1188 return static_cast<int>((*m_PixelEndcapGeneral)[0]->getDouble("VERSION"));
1189}
1190
1192{
1193 return static_cast<int>(((*m_PixelEndcapGeneral)[0]->getDouble("VERSION") - PixelEndcapMajorVersion())*10 + 0.5);
1194}
1195
1196
1198{
1199 std::string description;
1200 if (db()->testField(m_PixelSwitches,"DESCRIPTION")) {
1201 description = db()->getString(m_PixelSwitches,"DESCRIPTION");
1202 }
1203 return description;
1204}
1205
1207{
1208 std::string name;
1209 if (db()->testField(m_PixelSwitches,"VERSIONNAME")) {
1210 name = db()->getString(m_PixelSwitches,"VERSIONNAME");
1211 }
1212 return name;
1213}
1214
1216{
1217 std::string layout;
1218 if (db()->testField(m_PixelSwitches,"LAYOUT")) {
1219 layout = db()->getString(m_PixelSwitches,"LAYOUT");
1220 }
1221 return layout;
1222}
1223
1224
1226{
1227 if (db()->getTableSize(m_PixelEnvelope)) {
1228 double rmin = PixelEnvelopeRMin(0);
1229 for (unsigned int i = 1; i < db()->getTableSize(m_PixelEnvelope); i++) {
1230 rmin = std::min(rmin, PixelEnvelopeRMin(i));
1231 }
1232 return rmin;
1233 } else {
1234 return db()->getDouble(m_PixelCommon,"RMIN")*mmcm();
1235 }
1236}
1237
1239{
1240 if (db()->getTableSize(m_PixelEnvelope)) {
1241 double rmax = PixelEnvelopeRMax(0);
1242 for (unsigned int i = 1; i < db()->getTableSize(m_PixelEnvelope); i++) {
1243 rmax = std::max(rmax, PixelEnvelopeRMax(i));
1244 }
1245 return rmax;
1246 } else {
1247 return db()->getDouble(m_PixelCommon,"RMAX")*mmcm();
1248 }
1249}
1250
1252{
1253
1254 if (db()->getTableSize(m_PixelEnvelope)) {
1255 // The table should contain only +ve z values.
1256 return PixelEnvelopeZ(db()->getTableSize(m_PixelEnvelope) - 1);
1257 } else {
1258 return db()->getDouble(m_PixelCommon,"HALFLENGTH")*mmcm();
1259 }
1260}
1261
1263{
1264 // Return true if the envelope can be built as a simple tube.
1265 // otherwise it will be built as a PCON.
1266 // True if size is 0 or 1.
1267 return (!(db()->getTableSize(m_PixelEnvelope) > 1));
1268}
1269
1274
1276{
1277 double zmin = db()->getDouble(m_PixelEnvelope,"Z",i) * Gaudi::Units::mm;
1278 if (zmin < 0) msg(MSG::ERROR) << "PixelEnvelope table should only contain +ve z values" << endmsg;
1279 return std::abs(zmin);
1280}
1281
1283{
1284 return db()->getDouble(m_PixelEnvelope,"RMIN",i) * Gaudi::Units::mm;
1285}
1286
1288{
1289 return db()->getDouble(m_PixelEnvelope,"RMAX",i) * Gaudi::Units::mm;
1290}
1291
1292
1294{
1295 return db()->getInt(m_PixelBarrelGeneral,"NLAYER");
1296}
1297
1298// m_PixelBarrelGeneral
1300{
1301 return db()->getDouble(m_PixelBarrelGeneral,"RMIN")*mmcm();
1302}
1303
1305{
1306 return db()->getDouble(m_PixelBarrelGeneral,"RMAX")*mmcm();
1307}
1308
1310{
1311 return db()->getDouble(m_PixelBarrelGeneral,"HALFLENGTH")*mmcm();
1312}
1313
1314// Described in general services for later geometries.
1316{
1317 if (useLegacy()) return m_legacyManager->oldFrame();
1318 return false;
1319}
1320
1321// For new geometry a detailed frame is built.
1326
1331
1333{
1334 return db()->getDouble(m_PixelFrame, "RMINSIDE", sectionIndex) * Gaudi::Units::mm;
1335}
1336
1338{
1339 return db()->getDouble(m_PixelFrame, "RMAXSIDE", sectionIndex) * Gaudi::Units::mm;
1340}
1341
1343{
1344 return db()->getDouble(m_PixelFrame, "SIDEWIDTH", sectionIndex) * Gaudi::Units::mm;
1345}
1346
1348{
1349 return db()->getDouble(m_PixelFrame, "ZMIN", sectionIndex) * Gaudi::Units::mm;
1350}
1351
1353{
1354 return db()->getDouble(m_PixelFrame, "ZMAX", sectionIndex) * Gaudi::Units::mm;
1355}
1356
1358{
1359 return db()->getDouble(m_PixelFrame, "PHISTART", sectionIndex) * Gaudi::Units::deg;
1360}
1361
1363{
1364 return db()->getInt(m_PixelFrame, "NUMSIDES", sectionIndex);
1365}
1366
1368{
1369 return db()->getInt(m_PixelFrame, "MIRRORSIDES", sectionIndex);
1370}
1371
1373{
1374 return db()->getString(m_PixelFrame, "SIDEMATERIAL", sectionIndex);
1375}
1376
1378{
1379 return db()->getString(m_PixelFrame, "CORNERMATERIAL", sectionIndex);
1380}
1381
1383{
1384 return db()->getInt(m_PixelFrame,"SECTION",sectionIndex);
1385}
1386
1387void
1389{
1390 if (!m_frameElementMap) {
1391 m_frameElementMap = std::make_unique<std::map<int,std::vector<int> > >();
1392 for (unsigned int i = 0; i < db()->getTableSize(m_PixelFrameSect); ++i) {
1393 int section = db()->getInt(m_PixelFrameSect,"SECTION",i);
1394 (*m_frameElementMap)[section].push_back(i);
1395 }
1396 }
1397}
1398
1399int DBPixelGeoManager::getFrameElementIndex(int sectionIndex, int element)
1400{
1401 // make map if it is not already made.
1403
1404 int section = PixelFrameSectionFromIndex(sectionIndex);
1405
1406 int newIndex = -1;
1407 std::map<int,std::vector<int> >::const_iterator iter = m_frameElementMap->find(section);
1408 if (iter == m_frameElementMap->end()) {
1409 // Should never be the case as PixelFrameNumSideElements should generally be called first
1410 msg(MSG::ERROR) << "Frame section " << section << " has no elements." << endmsg;
1411 } else {
1412 const std::vector<int> & vec = iter->second;
1413 if (static_cast<unsigned int>(element) >= vec.size()) {
1414 msg(MSG::ERROR) << "Element index " << element << " for section " << section << " out of range." << endmsg;
1415 } else {
1416 newIndex = vec[element];
1417 }
1418 }
1419 return newIndex;
1420}
1421
1422
1424{
1425 // make map if it is not already made.
1427
1428 int section = PixelFrameSectionFromIndex(sectionIndex);
1429 int numElements = 0;
1430
1431 std::map<int,std::vector<int> >::const_iterator iter = m_frameElementMap->find(section);
1432 if (iter == m_frameElementMap->end()) {
1433 msg(MSG::DEBUG) << "Frame section " << section << " has no elements." << endmsg;
1434 } else {
1435 numElements = iter->second.size();
1436 }
1437 return numElements;
1438}
1439
1440double DBPixelGeoManager::PixelFrameElementZMin1(int sectionIndex, int element)
1441{
1442 int index = getFrameElementIndex(sectionIndex, element);
1443 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1444 return db()->getDouble(m_PixelFrameSect, "ZMIN1", index) * Gaudi::Units::mm;
1445}
1446
1447double DBPixelGeoManager::PixelFrameElementZMin2(int sectionIndex, int element)
1448{
1449 int index = getFrameElementIndex(sectionIndex, element);
1450 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1451 return db()->getDouble(m_PixelFrameSect, "ZMIN2", index) * Gaudi::Units::mm;
1452}
1453
1454double DBPixelGeoManager::PixelFrameElementZMax1(int sectionIndex, int element)
1455{
1456 int index = getFrameElementIndex(sectionIndex, element);
1457 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1458 return db()->getDouble(m_PixelFrameSect, "ZMAX1", index) * Gaudi::Units::mm;
1459}
1460
1461double DBPixelGeoManager::PixelFrameElementZMax2(int sectionIndex, int element)
1462{
1463 int index = getFrameElementIndex(sectionIndex, element);
1464 if (index < 0) return 0; // Error message already printed in getFrameElementIndex.
1465 return db()->getDouble(m_PixelFrameSect, "ZMAX2", index) * Gaudi::Units::mm;
1466}
1467
1469{
1470 if (!ibl()) return 0;
1471 if (!db()->testField(m_PixelLayer,"STAVEINDEX",layer)) return 0;
1472 return db()->getInt(m_PixelLayer,"STAVEINDEX",layer);
1473}
1474
1476{
1477 if (!ibl()) return 0;
1478 int defaultLayout = 0;
1480
1481 if (!db()->testField(m_PixelStave,"LAYOUT",index)) return defaultLayout;
1482 return db()->getInt(m_PixelStave,"LAYOUT",index);
1483}
1484
1486{
1487 if (!ibl()) return 0;
1489
1490 if (db()->testField(m_PixelStave,"STAVEAXE",index))
1491 return db()->getInt(m_PixelStave,"STAVEAXE",index);
1492 return 0;
1493}
1494
1496{
1497 double radius = db()->getDouble(m_PixelLayer,"RLAYER",m_currentLD)*mmcm();
1498 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "PixelLayerRadius for layer " << m_currentLD
1499 << " is " << radius
1500 << endmsg;
1501 return radius;
1502}
1503
1505{
1506 if (db()->testField(m_PixelLayer,"GBLSHIFT",m_currentLD))
1507 return db()->getDouble(m_PixelLayer,"GBLSHIFT",m_currentLD);
1508 return 0.;
1509}
1510
1512{
1513 if (useLegacy()) return m_legacyManager->PixelLadderLength();
1515 return db()->getDouble(m_PixelStave,"ENVLENGTH",index)*Gaudi::Units::mm;
1516}
1517
1519{
1520 if (useLegacy()) return 0.9*Gaudi::Units::mm;
1522 return db()->getDouble(m_PixelStave,"CLEARANCEY",index)*Gaudi::Units::mm;
1523}
1524
1525// Only used if ladder thickness is automatically calculated it, ie ENVTHICK = 0
1526// IBL only
1528{
1530 if (db()->testField(m_PixelStave,"CLEARANCEX",index)) {
1531 return db()->getDouble(m_PixelStave,"CLEARANCEX",index)*Gaudi::Units::mm;
1532 }
1533 return 0.1*Gaudi::Units::mm;
1534}
1535
1537{
1538 if (useLegacy()) return m_legacyManager->PixelLadderThickness(); // 2*1.48972 mm
1540 return db()->getDouble(m_PixelStave,"ENVTHICK",index)*Gaudi::Units::mm;
1541}
1542
1544{
1545 return db()->getDouble(m_PixelLayer,"STAVETILT",m_currentLD)*Gaudi::Units::deg;
1546}
1547
1549{
1550 if (useLegacy()) return m_legacyManager->PixelLadderServicesX(); // 1.48972 mm
1552 return db()->getDouble(m_PixelStave,"SERVICEOFFSETX",index) * Gaudi::Units::mm;
1553}
1554
1556{
1557 if (useLegacy()) return m_legacyManager->PixelLadderServicesY(); // 3mm
1559 return db()->getDouble(m_PixelStave,"SERVICEOFFSETY",index) * Gaudi::Units::mm;
1560}
1561
1563{
1564 if (useLegacy()) return m_legacyManager->PixelLadderCableOffsetX(); // 0
1566 return db()->getDouble(m_PixelStave,"CABLEOFFSETX",index) * Gaudi::Units::mm;
1567}
1568
1570{
1571 if (useLegacy()) return m_legacyManager->PixelLadderCableOffsetY(); // 4mm
1573 return db()->getDouble(m_PixelStave,"CABLEOFFSETY",index) * Gaudi::Units::mm;
1574}
1575
1576// IBL only
1578{
1580 return db()->getDouble(m_PixelStave,"SUPPORTTHICK",index) * Gaudi::Units::mm;
1581}
1582
1583// IBL only
1585{
1587 return db()->getDouble(m_PixelStave,"SUPPORTWIDTH",index) * Gaudi::Units::mm;
1588}
1589
1590
1591
1592
1593
1594// IBL only
1596{
1597 if (!db()->testFieldTxt(m_PixelConicalStave,"BENTSTAVEANGLE")) return 0;
1599 return db()->getDouble(m_PixelConicalStave,"BENTSTAVEANGLE",index);
1600}
1601
1602// IBL only
1604{
1605 if (!db()->testFieldTxt(m_PixelConicalStave,"BENTSTAVENMODULE")) return 0;
1607 return db()->getInt(m_PixelConicalStave,"BENTSTAVENMODULE",index);
1608}
1609
1615
1616// IBL only
1618{
1620 if (db()->testField(m_PixelStave,"SUPPORTHLENGTH",index)) {
1621 double halflength = db()->getDouble(m_PixelStave,"SUPPORTHLENGTH",index) * Gaudi::Units::mm;
1622 if (halflength > 0) return 2 * halflength;
1623 }
1624 double safety = 0.01*Gaudi::Units::mm;
1625 return PixelLadderLength() - safety;
1626}
1627
1628// IBL detailed stave support only
1629
1631{
1632 // set layer to 0 (in order to read read IBL data)
1633 int currentLD_tmp = m_currentLD;
1634 m_currentLD = 0;
1635
1636 double boardThick = PixelBoardThickness();
1637 double chipThick = PixelChipThickness();
1638 double chipGap = PixelChipGap();
1639
1640 double xCenterCoolingPipe = boardThick*.5+chipThick+chipGap+ // from sensor sensor to plate
1641 IBLStaveFacePlateThickness() + IBLStaveFacePlateGreaseThickness() + // plate thickness (grease + plate)
1642 IBLStaveTubeMiddlePos(); // from plate to colling pipe center
1643 double yCenterCoolingPipe = IBLStaveMechanicalStaveOffset();
1644 GeoTrf::Vector3D centerCoolingPipe(xCenterCoolingPipe, yCenterCoolingPipe, 0.);
1645
1646 m_currentLD = currentLD_tmp;
1647 return centerCoolingPipe;
1648}
1649
1650
1652{
1653 // set layer to 0 (in order to read read IBL data)
1654 int currentLD_tmp = m_currentLD;
1655 m_currentLD = 0;
1656
1657 // Point that defines the center of the cooling pipe
1658 GeoTrf::Vector3D centerCoolingPipe_inv = -IBLStaveRotationAxis();
1659 GeoTrf::Vector3D origin(0.,0.,0.);
1660 double layerRadius = PixelLayerRadius();
1661 double ladderTilt = PixelLadderTilt();
1662
1663 // Transforms
1664 GeoTrf::Transform3D staveTrf = GeoTrf::RotateZ3D(ladderTilt)*GeoTrf::Translate3D(centerCoolingPipe_inv.x(),centerCoolingPipe_inv.y(),centerCoolingPipe_inv.z());
1665 GeoTrf::Vector3D sensorPos = staveTrf*origin;
1666
1667 double yPos = sensorPos.y();
1668 GeoTrf::Vector3D sensorPos_layer(sqrt(layerRadius*layerRadius-yPos*yPos),yPos,0.);
1669
1670 double staveRadius = sensorPos_layer.x()-sensorPos.x();
1671
1672 m_currentLD = currentLD_tmp;
1673 return staveRadius;
1674}
1675
1676
1678{
1679 // int index = PixelStaveIndex(m_currentLD);
1680 int index=0;
1681 if (db()->testField(m_PixelIBLStave,"FACEPLATETHICK",index)) {
1682 double thickness = db()->getDouble(m_PixelIBLStave,"FACEPLATETHICK",index) * Gaudi::Units::mm;
1683 if (thickness > 0) return thickness ;
1684 }
1685 return 0.0;
1686}
1687
1689{
1690 // int index = PixelStaveIndex(m_currentLD);
1691 int index=0;
1692 if (db()->testField(m_PixelIBLStave,"STAVEWIDTH",index)) {
1693 double value = db()->getDouble(m_PixelIBLStave,"STAVEWIDTH",index) * Gaudi::Units::mm;
1694 if (value > 0) return value ;
1695 }
1696 return 0.0;
1697}
1698
1700{
1701 // int index = PixelStaveIndex(m_currentLD);
1702 int index=0;
1703 if (db()->testField(m_PixelIBLStave,"ENDBLOCKLENGTH",index)) {
1704 double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKLENGTH",index) * Gaudi::Units::mm;
1705 if (value > 0) return value ;
1706 }
1707 return 0.0;
1708}
1709
1711{
1712 // int index = PixelStaveIndex(m_currentLD);
1713 int index=0;
1714 if (db()->testField(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index)) {
1715 double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index) * Gaudi::Units::mm;
1716 return value ;
1717 }
1718 return 0.0;
1719}
1720
1722{
1723 // try and catch (param availbale only if db tag > IBL-03-00-00)
1724 try{
1725 int index=0;
1726 if (db()->testField(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index)) {
1727 double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index) * Gaudi::Units::mm;
1728 return value ;
1729 }
1730 return 0.0;
1731 }
1732 catch(...){}
1733 return 0.;
1734}
1735
1737{
1738 // try and catch (param availbale only if db tag > IBL-03-00-00)
1739 try
1740 {
1741 int index=0;
1742 if (db()->testField(m_PixelIBLStave,"STAVELENGTH",index)) {
1743 double value = db()->getDouble(m_PixelIBLStave,"STAVELENGTH",index) * Gaudi::Units::mm;
1744 return value ;
1745 }
1746 }
1747 catch(...)
1748 {
1749 // FIXME : patch for initial IBL geometry (SES)
1750 // IBL stave length not eqal to other stave length
1751 }
1752
1753 return 748.0 * Gaudi::Units::mm;
1754}
1755
1757{
1758 // int index = PixelStaveIndex(m_currentLD);
1759 int index=0;
1760 if (!isModule3D&&db()->testField(m_PixelIBLStave,"MODULELATERALOFFSET",index)) {
1761 double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET",index) * Gaudi::Units::mm;
1762 return value ;
1763 }
1764 if (isModule3D&&db()->testField(m_PixelIBLStave,"MODULELATERALOFFSET3D",index)) {
1765 double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET3D",index) * Gaudi::Units::mm;
1766 return value ;
1767 }
1768 return 0.0;
1769}
1770
1772{
1773 // int index = PixelStaveIndex(m_currentLD);
1774 int index=0;
1775 if (db()->testField(m_PixelIBLStave,"STAVETOMODULEGAP",index)) {
1776 double value = db()->getDouble(m_PixelIBLStave,"STAVETOMODULEGAP",index) * Gaudi::Units::mm;
1777 return value ;
1778 }
1779 return 0.0;
1780}
1781
1783{
1784 // int index = PixelStaveIndex(m_currentLD);
1785 int index=0;
1786 if (db()->testField(m_PixelIBLStave,"TUBEOUTERDIAM",index)) {
1787 double value = db()->getDouble(m_PixelIBLStave,"TUBEOUTERDIAM",index) * Gaudi::Units::mm;
1788 if (value > 0) return value ;
1789 }
1790 return 0.0;
1791}
1792
1794{
1795 // int index = PixelStaveIndex(m_currentLD);
1796 int index=0;
1797 if (db()->testField(m_PixelIBLStave,"TUBEINNERDIAM",index)) {
1798 double value = db()->getDouble(m_PixelIBLStave,"TUBEINNERDIAM",index) * Gaudi::Units::mm;
1799 if (value > 0) return value ;
1800 }
1801 return 0.0;
1802}
1803
1805{
1806 // int index = PixelStaveIndex(m_currentLD);
1807 int index=0;
1808 if (db()->testField(m_PixelIBLStave,"TUBEMIDDLEPOS",index)) {
1809 double value = db()->getDouble(m_PixelIBLStave,"TUBEMIDDLEPOS",index) * Gaudi::Units::mm;
1810 return value ;
1811 }
1812 return 0.0;
1813}
1814
1816{
1817 // int index = PixelStaveIndex(m_currentLD);
1818 int index=0;
1819 if (db()->testField(m_PixelIBLStave,"FLEXLAYERTHICK",index)) {
1820 double value = db()->getDouble(m_PixelIBLStave,"FLEXLAYERTHICK",index) * Gaudi::Units::mm;
1821 if (value > 0) return value ;
1822 }
1823 return 0.0;
1824}
1825
1827{
1828 // int index = PixelStaveIndex(m_currentLD);
1829 int index=0;
1830 if (db()->testField(m_PixelIBLStave,"FLEXBASETHICK",index)) {
1831 double value = db()->getDouble(m_PixelIBLStave,"FLEXBASETHICK",index) * Gaudi::Units::mm;
1832 if (value > 0) return value ;
1833 }
1834 return 0.0;
1835}
1836
1838{
1839 // int index = PixelStaveIndex(m_currentLD);
1840 int index=0;
1841 if (db()->testField(m_PixelIBLStave,"FLEXWIDTH",index)) {
1842 double value = db()->getDouble(m_PixelIBLStave,"FLEXWIDTH",index) * Gaudi::Units::mm;
1843 if (value > 0) return value ;
1844 }
1845 return 0.0;
1846}
1847
1849{
1850 // int index = PixelStaveIndex(m_currentLD);
1851 int index=0;
1852 if (db()->testField(m_PixelIBLStave,"FLEXOFFSET",index)) {
1853 double value = db()->getDouble(m_PixelIBLStave,"FLEXOFFSET",index) * Gaudi::Units::mm;
1854 return value ;
1855 }
1856 return 0.0;
1857}
1858
1859
1861{
1862 // int index = PixelStaveIndex(m_currentLD);
1863 int index=0;
1864 if (db()->testField(m_PixelIBLStave,"OMEGATHICK",index)) {
1865 double value = db()->getDouble(m_PixelIBLStave,"OMEGATHICK",index) * Gaudi::Units::mm;
1866 return value ;
1867 }
1868 return 0.0;
1869}
1870
1872{
1873 // int index = PixelStaveIndex(m_currentLD);
1874 int index=0;
1875 if (db()->testField(m_PixelIBLStave,"OMEGAENDCENTERX",index)) {
1876 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERX",index) * Gaudi::Units::mm;
1877 return value ;
1878 }
1879 return 0.0;
1880}
1882{
1883 // int index = PixelStaveIndex(m_currentLD);
1884 int index=0;
1885 if (db()->testField(m_PixelIBLStave,"OMEGAENDCENTERY",index)) {
1886 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERY",index) * Gaudi::Units::mm;
1887 return value ;
1888 }
1889 return 0.0;
1890}
1892{
1893 // int index = PixelStaveIndex(m_currentLD);
1894 int index=0;
1895 if (db()->testField(m_PixelIBLStave,"OMEGAENDRADIUS",index)) {
1896 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDRADIUS",index) * Gaudi::Units::mm;
1897 return value ;
1898 }
1899 return 0.0;
1900}
1902{
1903 // int index = PixelStaveIndex(m_currentLD);
1904 int index=0;
1905 if (db()->testField(m_PixelIBLStave,"OMEGAENDANGLE",index)) {
1906 double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDANGLE",index) * Gaudi::Units::deg;
1907 return value ;
1908 }
1909 return 0.0;
1910}
1911
1913{
1914 // int index = PixelStaveIndex(m_currentLD);
1915 int index=0;
1916 if (db()->testField(m_PixelIBLStave,"OMEGAMIDCENTERX",index)) {
1917 double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDCENTERX",index) * Gaudi::Units::mm;
1918 return value ;
1919 }
1920 return 0.0;
1921}
1922
1924{
1925 // int index = PixelStaveIndex(m_currentLD);
1926 int index=0;
1927 if (db()->testField(m_PixelIBLStave,"OMEGAMIDRADIUS",index)) {
1928 double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDRADIUS",index) * Gaudi::Units::mm;
1929 return value ;
1930 }
1931 return 0.0;
1932}
1934{
1935 // int index = PixelStaveIndex(m_currentLD);
1936 int index=0;
1937 if (db()->testField(m_PixelIBLStave,"OMEGAOPENINGANGLE",index)) {
1938 double value = db()->getDouble(m_PixelIBLStave,"OMEGAOPENINGANGLE",index) * Gaudi::Units::deg;
1939 return value ;
1940 }
1941 return 0.0;
1942}
1943
1945{
1946 // int index = PixelStaveIndex(m_currentLD);
1947 int index=0;
1948 if (db()->testField(m_PixelIBLStave,"NMODULE",index)) {
1949 int value = db()->getInt(m_PixelIBLStave,"NMODULE",index);
1950 if (value > 0) return value ;
1951 }
1952 return 0;
1953}
1954
1960
1962{
1963 // int index = PixelStaveIndex(m_currentLD);
1964 int index=0;
1965 if (db()->testField(m_PixelIBLStave,"MODULEGAP",index)) {
1966 double value = db()->getDouble(m_PixelIBLStave,"MODULEGAP",index) * Gaudi::Units::mm;
1967 if (value > 0) return value ;
1968 }
1969 return 0.0;
1970}
1971
1973{
1974 // int index = PixelStaveIndex(m_currentLD);
1975 int index=0;
1976 if (db()->testField(m_PixelIBLStave,"MODULETYPE",index)) {
1977 int value = db()->getInt(m_PixelIBLStave,"MODULETYPE",index) * Gaudi::Units::mm;
1978 if (value > 0) return value ;
1979 }
1980 return 0;
1981}
1982
1984{
1985 // try and catch (param availbale only if db tag > IBL-03-00-00)
1986 try{
1987 int index=0;
1988 if (db()->testField(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index)) {
1989 double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index) * Gaudi::Units::mm;
1990 return value ;
1991 }
1992 return 0.;
1993 }
1994 catch(...){}
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,"FACEPLATEGLUETHICK",index)) {
2004 double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGLUETHICK",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,"TUBEGLUETHICK",index)) {
2019 double value = db()->getDouble(m_PixelIBLGlueGrease,"TUBEGLUETHICK",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,"OMEGAGLUETHICK",index)) {
2034 double value = db()->getDouble(m_PixelIBLGlueGrease,"OMEGAGLUETHICK",index) * Gaudi::Units::mm;
2035 return value ;
2036 }
2037 return 0.;
2038 }
2039 catch(...){}
2040 return 0.;
2041}
2042
2043
2045{
2046 // int index = PixelStaveIndex(m_currentLD);
2047 int index=0;
2048 if (db()->testField(m_PixelIBLSupport,"STAVERINGWIDTH",index)) {
2049 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGWIDTH",index) * Gaudi::Units::mm;
2050 if (value > 0) return value ;
2051 }
2052 return 0.0;
2053}
2054
2056{
2057 // int index = PixelStaveIndex(m_currentLD);
2058 int index=0;
2059 if (db()->testField(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index)) {
2060 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index) * Gaudi::Units::mm;
2061 if (value > 0) return value ;
2062 }
2063 return 0.0;
2064}
2065
2067{
2068 // int index = PixelStaveIndex(m_currentLD);
2069 int index=0;
2070 if (db()->testField(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index)) {
2071 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index) * Gaudi::Units::mm;
2072 if (value > 0) return value ;
2073 }
2074 return 0.0;
2075}
2076
2077
2079{
2080 // int index = PixelStaveIndex(m_currentLD);
2081 int index=0;
2082 if (db()->testField(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index)) {
2083 double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index) * Gaudi::Units::mm;
2084 if (value > 0) return value ;
2085 }
2086 return 0.0;
2087}
2088
2090{
2091 // int index = PixelStaveIndex(m_currentLD);
2092 int index=0;
2093 if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index)) {
2094 double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index) * Gaudi::Units::mm;
2095 if (value > 0) return value ;
2096 }
2097 return 0.0;
2098}
2099
2101{
2102 // int index = PixelStaveIndex(m_currentLD);
2103 int index=0;
2104 if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index)) {
2105 double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index) * Gaudi::Units::mm;
2106 if (value > 0) return value;
2107 }
2108 return 0.0;
2109}
2110
2112{
2113 // int index = PixelStaveIndex(m_currentLD);
2114 int index=0;
2115 if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index)) {
2116 double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index) * Gaudi::Units::mm;
2117 if (value > 0) return value ;
2118 }
2119 return 0.0;
2120}
2121
2123{
2124 // int index = PixelStaveIndex(m_currentLD);
2125 int index=0;
2126 if (db()->testField(m_PixelIBLFlex,"FLEXMIDGAP",index)) {
2127 double value = db()->getDouble(m_PixelIBLFlex,"FLEXMIDGAP",index) * Gaudi::Units::mm;
2128 return value ;
2129 }
2130 return 0.0;
2131}
2132
2134{
2135 // int index = PixelStaveIndex(m_currentLD);
2136 int index=0;
2137 return db()->testField(m_PixelIBLFlex,"FLEXMIDGAP",index);
2138}
2139
2140
2142{
2143 // int index = PixelStaveIndex(m_currentLD);
2144 int index=0;
2145 if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index)) {
2146 double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index) * Gaudi::Units::mm;
2147 return value ;
2148 }
2149 return 0.0;
2150}
2151
2152
2154{
2155 // int index = PixelStaveIndex(m_currentLD);
2156 int index=0;
2157 if (db()->testField(m_PixelIBLFlex,"FLEXWINGWIDTH",index)) {
2158 double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGWIDTH",index) * Gaudi::Units::mm;
2159 return value ;
2160 }
2161 return 0.0;
2162}
2163
2165{
2166 // int index = PixelStaveIndex(m_currentLD);
2167 int index=0;
2168 if (db()->testField(m_PixelIBLFlex,"FLEXWINGTHICK",index)) {
2169 double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGTHICK",index) * Gaudi::Units::mm;
2170 return value ;
2171 }
2172 return 0.0;
2173}
2174
2176{
2177 // int index = PixelStaveIndex(m_currentLD);
2178 int index=0;
2179 if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index)) {
2180 double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index) * Gaudi::Units::mm;
2181 return value ;
2182 }
2183 return 0.0;
2184}
2185
2187{
2188 std::ostringstream lname;
2189 lname << "FLEXDOGLEGHEIGHT"<<iHeight;
2190
2191 // int index = PixelStaveIndex(m_currentLD);
2192 int index=0;
2193 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2194 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2195 return value ;
2196 }
2197 return 0.0;
2198}
2199
2201{
2202 // int index = PixelStaveIndex(m_currentLD);
2203 int index=0;
2204 if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGDY",index)) {
2205 double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGDY",index) * Gaudi::Units::mm;
2206 return value ;
2207 }
2208 return 0.0;
2209}
2210
2212{
2213 std::ostringstream lname;
2214 lname << "FLEXPP0_Z"<<iPos;
2215
2216 // int index = PixelStaveIndex(m_currentLD);
2217 int index=0;
2218 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2219 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2220 return value ;
2221 }
2222 return 0.0;
2223}
2224
2225
2227{
2228 std::ostringstream lname;
2229 lname << "FLEXPP0_S"<<iPos<<"RMIN";
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
2241{
2242 std::ostringstream lname;
2243 lname << "FLEXPP0_S"<<iPos<<"RMAX";
2244
2245 // int index = PixelStaveIndex(m_currentLD);
2246 int index=0;
2247 if (db()->testField(m_PixelIBLFlex,lname.str(),index)) {
2248 double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * Gaudi::Units::mm;
2249 return value ;
2250 }
2251 return 0.0;
2252}
2253
2254
2255std::string DBPixelGeoManager::IBLFlexMaterial(int iPos, const std::string& flexType)
2256{
2257
2258 int nbMaterial=db()->getTableSize(m_PixelIBLFlexMaterial);
2259 int cmptType=0;
2260
2261 for(int index=0; index<nbMaterial; index++)
2262 {
2263 std::string flexTypeIdx = db()->getString(m_PixelIBLFlexMaterial,"TYPE",index);
2264 if(flexTypeIdx.compare(flexType)==0)
2265 {
2266 cmptType++;
2267 if(iPos==cmptType){
2268 std::string matTypeIdx = db()->getString(m_PixelIBLFlexMaterial,"MATERIALNAME",index);
2269 return matTypeIdx;
2270 }
2271 }
2272 }
2273 return std::string("noMat");
2274
2275}
2276
2277
2278double DBPixelGeoManager:: IBLServiceGetMinRadialPosition(const std::string& srvName, const std::string& srvType,
2279 double srvZmin, double srvZmax)
2280{
2281
2282 double rmin=99999.;
2283
2284 int numServices = PixelServiceElements(srvType);
2285 int nbSrv=0;
2286 for(int ii = 0; ii < numServices; ii++) {
2287 // Retrieve/calculate the parameters for the volume.
2288 //
2289 std::string name;
2290 if(srvType=="simple")
2291 name=db()->getString(m_PixelSimpleService,"NAME",ii);
2292 else
2293 name=PixelServiceName(srvType,ii);
2294
2295 if(name.find(srvName)!=std::string::npos){
2296 double zmin, zmax, r;
2297 int symm;
2298 if(srvType=="simple"){
2299 zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*Gaudi::Units::mm;
2300 zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*Gaudi::Units::mm;
2301 symm=db()->getInt(m_PixelSimpleService,"ZSYMM",ii);
2302 r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*Gaudi::Units::mm;
2303 }
2304 else {
2305 zmin=PixelServiceZMin(srvType, ii);
2306 zmax=PixelServiceZMax(srvType, ii);
2307 symm=PixelServiceZsymm(srvType, ii);
2308 r=PixelServiceRMin(srvType, ii);
2309 }
2310
2311 bool bZintervalle = false;
2312 if( (srvZmin-zmin)*(srvZmin-zmax)<0 || (srvZmax-zmin)*(srvZmax-zmax)<0 ) bZintervalle=true;
2313 if( symm==1 && ((-srvZmin-zmin)*(-srvZmin-zmax)<0 || (-srvZmax-zmin)*(-srvZmax-zmax)<0) ) bZintervalle=true;
2314
2315 if(bZintervalle){
2316 if(r<rmin) rmin=r;
2317 nbSrv++;
2318 }
2319 }
2320 }
2321
2322 if(nbSrv<1)return -1;
2323 return rmin;
2324
2325}
2326
2327double DBPixelGeoManager:: IBLServiceGetMaxRadialPosition(const std::string& srvName, const std::string& srvType,
2328 double srvZmin, double srvZmax)
2329{
2330
2331 double rmax=-1.;
2332 int numServices = PixelServiceElements(srvType);
2333
2334 int nbSrv=0;
2335 for(int ii = 0; ii < numServices; ii++) {
2336 // Retrieve/calculate the parameters for the volume.
2337 //
2338 std::string name;
2339 if(srvType=="simple")
2340 name=db()->getString(m_PixelSimpleService,"NAME",ii);
2341 else
2342 name=PixelServiceName(srvType,ii);
2343
2344 if(name.find(srvName)!=std::string::npos){
2345
2346 double zmin, zmax, r;
2347 int symm;
2348 if(srvType=="simple"){
2349 zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*Gaudi::Units::mm;
2350 zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*Gaudi::Units::mm;
2351 symm=db()->getInt(m_PixelSimpleService,"ZSYMM",ii);
2352 r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*Gaudi::Units::mm;
2353 }
2354 else {
2355 zmin=PixelServiceZMin(srvType, ii);
2356 zmax=PixelServiceZMax(srvType, ii);
2357 symm=PixelServiceZsymm(srvType, ii);
2358 r=PixelServiceRMax(srvType, ii);
2359 }
2360
2361 bool bZintervalle = false;
2362 if( (srvZmin-zmin)*(srvZmin-zmax)<0 || (srvZmax-zmin)*(srvZmax-zmax)<0 ) bZintervalle=true;
2363 if( symm==1 && ((-srvZmin-zmin)*(-srvZmin-zmax)<0 || (-srvZmax-zmin)*(-srvZmax-zmax)<0) ) bZintervalle=true;
2364
2365 if(bZintervalle && r>rmax){
2366 rmax=r;
2367 nbSrv++;
2368 }
2369 }
2370 }
2371
2372 if(nbSrv<1)return -1;
2373 return rmax;
2374
2375}
2376
2378{
2379 if (m_staveTypeTable->size() == 0) return phi % 2;
2380 return m_pixelStaveTypes->getBiStaveType(layer, phi) % 2;
2381}
2382
2384{
2385 return db()->getInt(m_PixelLayer,"NSECTORS",m_currentLD);
2386}
2387
2389{
2390 // For backward compatibilty first module is at 1/2 a module division
2391 if (!db()->testField(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD)){
2392 if(NPixelSectors()>0) return 180.0*Gaudi::Units::degree/NPixelSectors();
2393 return 0.;
2394 } else {
2395 return db()->getDouble(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD) * Gaudi::Units::degree;
2396 }
2397}
2398
2399
2401{
2402 int staveIndex = PixelStaveIndex(m_currentLD);
2403 if(ibl() && PixelStaveLayout()>3 && PixelStaveLayout()<7 && m_currentLD==0)
2404 return IBLStaveModuleNumber();
2405 else
2406 return db()->getInt(m_PixelStave,"NMODULE",staveIndex);
2407
2408}
2409
2411{
2412 int staveIndex = PixelStaveIndex(m_currentLD);
2413 return db()->getDouble(m_PixelStave,"MODULETILT",staveIndex)*Gaudi::Units::deg;
2414}
2415
2417{
2418 int staveIndex = PixelStaveIndex(m_currentLD);
2419 return db()->getDouble(m_PixelStave,"CENTRMODULESHIFT",staveIndex)*mmcm();
2420}
2421
2423{
2424 // ZPOSTYPE 0. Means equi-distant modules.
2425 // ZPOSTYPE != 0. Means tabulated z positions.
2426 int staveIndex = PixelStaveIndex(m_currentLD);
2427 int zPosType = 0;
2428 if (ibl() && db()->testField(m_PixelStave,"ZPOSTYPE",staveIndex)) {
2429 zPosType = db()->getInt(m_PixelStave,"ZPOSTYPE",staveIndex);
2430 }
2431 if (zPosType) {
2432 // Z positions from table
2433 return PixelModuleZPositionTabulated(etaModule, zPosType);
2434 } else {
2435 // Equi-distant modules
2436 int moduleIndex = PixelModuleIndexFromEta(etaModule);
2437 return db()->getDouble(m_PixelStave,"MODULEDZ",staveIndex)*mmcm() * (moduleIndex - 0.5*(PixelNModule()-1));
2438 }
2439}
2440
2442{
2443 if (!m_zPositionMap) {
2444 m_zPositionMap = std::make_unique<InDetDD::PairIndexMap>();
2445 for (unsigned int indexTmp = 0; indexTmp < db()->getTableSize(m_PixelStaveZ); ++indexTmp) {
2446 int eta_module = db()->getInt(m_PixelStaveZ,"ETAMODULE",indexTmp);
2447 int type_tmp = db()->getInt(m_PixelStaveZ,"TYPE",indexTmp);
2448 m_zPositionMap->add(type_tmp,eta_module,indexTmp);
2449 }
2450 }
2451 int index = m_zPositionMap->find(type, etaModule);
2452 if (index < 0) {
2453 msg(MSG::ERROR) << "Z position not found for etaModule,type = " << etaModule << ", " << type << endmsg;
2454 return 0;
2455 }
2456 return db()->getDouble(m_PixelStaveZ,"ZPOS",index) * Gaudi::Units::mm;
2457}
2458
2460{
2461 if (centerModule(etaModule)) return 1;
2462 return 0.;
2463}
2464
2466{
2467 int staveIndex = PixelStaveIndex(m_currentLD);
2468 if (!ibl() || !db()->testField(m_PixelStave,"STAGGERDIST",staveIndex)) return 0;
2469 return db()->getDouble(m_PixelStave,"STAGGERDIST",staveIndex) * Gaudi::Units::mm;
2470}
2471
2473{
2474 int staveIndex = PixelStaveIndex(m_currentLD);
2475 if (!ibl() || !db()->testField(m_PixelStave,"FIRSTSTAGGER",staveIndex)) return 0;
2476 // FIRSTSTAGGER refers to whether the first module (lowest etavalue) is staggered up (+1) or down(-1)
2477 int firstStagger = db()->getInt(m_PixelStave,"FIRSTSTAGGER",staveIndex);
2478 int moduleIndex = PixelModuleIndexFromEta(etaModule);
2479 return firstStagger * (moduleIndex%2 ? -1 : 1);
2480}
2481
2483{
2484 bool allowSkip = true;
2485 if (ibl()){
2486 int staveIndex = PixelStaveIndex(m_currentLD);
2487 if (db()->testField(m_PixelStave,"NOSKIPZERO",staveIndex)) {
2488 if (db()->getInt(m_PixelStave,"NOSKIPZERO",staveIndex)) allowSkip = false;
2489 }
2490 }
2491 return allowSkip;
2492}
2493
2495{
2496 // There is only a center module if there are an odd number
2497 // of modules. In that case it will be etaModule = 0.
2498 return (etaModule == 0 && PixelNModule()%2);
2499}
2500
2502{
2503 int nModules = PixelNModule();
2504 int etaModule = index-nModules/2;
2505 // If even number of modules skip eta = 0.
2506 // For IBL this behaviour can be disabled.
2507 if (allowSkipEtaZero() && (etaModule >= 0) && !(nModules%2)) etaModule++;
2508 return etaModule;
2509}
2510
2512{
2513 int nModules = PixelNModule();
2514 int index = etaModule + nModules/2;
2515 // If even number of modules skip eta = 0.
2516 // For IBL this behaviour can be disabled.
2517 if (allowSkipEtaZero() && (etaModule >= 0) && (nModules%2 == 0)) index--;
2518 return index;
2519}
2520
2521
2523{
2524 if (centerModule(etaModule)) return 0;
2525 if(etaModule < 0) return 1.;
2526 return -1.;
2527}
2528
2530{
2531 return db()->getInt(m_PixelEndcapGeneral,"NDISK");
2532}
2533
2534// Endcap container
2536{
2537 return db()->getDouble(m_PixelEndcapGeneral,"RMIN")*mmcm();
2538}
2539
2541{
2542 return db()->getDouble(m_PixelEndcapGeneral,"RMAX")*mmcm();
2543}
2544
2546{
2547 return db()->getDouble(m_PixelEndcapGeneral,"ZMIN")*mmcm();
2548}
2549
2551{
2552 return db()->getDouble(m_PixelEndcapGeneral,"ZMAX")*mmcm();
2553}
2554
2556{
2557 // Obsolete - retus 0 in recent versions
2558 return (int) db()->getDouble(m_PixelEndcapGeneral,"NFRAME");
2559}
2560
2561// Endcap Inner
2563{
2564 return db()->getDouble(m_PixelDisk,"ZDISK",m_currentLD)*mmcm();
2565}
2566
2568{
2569 return db()->getDouble(m_PixelDisk,"DZCOUNTER",m_currentLD)*mmcm();
2570}
2571
2573{
2574 return PixelECSiDz1();
2575}
2576
2578{
2579 return db()->getInt(m_PixelDisk,"NMODULE",m_currentLD);
2580}
2581
2586
2587// Endcap Cables
2589{
2590 return db()->getDouble(m_PixelDisk,"RMINCABLE",m_currentLD)*mmcm();
2591}
2592
2594{
2595 return db()->getDouble(m_PixelDisk,"RMAXCABLE",m_currentLD)*mmcm();
2596}
2597
2598
2600{
2601 return db()->getDouble(m_PixelDisk,"ZCABLE",m_currentLD)*mmcm();
2602}
2603
2604//
2606//
2608{
2609 if (useLegacy()) return m_legacyManager->PixelTMTNumParts();
2610 return db()->getTableSize(m_PixelTMT);
2611}
2612
2614{
2615 if (useLegacy()) return m_legacyManager->PixelTMTWidthX1(iPart);
2616 return db()->getDouble(m_PixelTMT,"WIDTHX1",iPart) * Gaudi::Units::mm;
2617}
2618
2620{
2621 if (useLegacy()) return m_legacyManager->PixelTMTWidthX2(iPart);
2622 return db()->getDouble(m_PixelTMT,"WIDTHX2",iPart) * Gaudi::Units::mm;
2623}
2624
2626{
2627 if (useLegacy()) return m_legacyManager->PixelTMTWidthY(iPart);
2628 return db()->getDouble(m_PixelTMT,"WIDTHY",iPart) * Gaudi::Units::mm;
2629}
2630
2632{
2633 if (useLegacy()) return m_legacyManager->PixelTMTBaseX1(iPart);
2634 return db()->getDouble(m_PixelTMT,"BASEX1",iPart) * Gaudi::Units::mm;
2635}
2636
2638{
2639 if (useLegacy()) return m_legacyManager->PixelTMTBaseX2(iPart);
2640 return db()->getDouble(m_PixelTMT,"BASEX2",iPart) * Gaudi::Units::mm;
2641}
2642
2644{
2645 if (useLegacy()) return m_legacyManager->PixelTMTPosY(iPart);
2646 return db()->getDouble(m_PixelTMT,"Y",iPart) * Gaudi::Units::mm;
2647}
2648
2650{
2651 if (useLegacy()) return m_legacyManager->PixelTMTPosZ1(iPart);
2652 return db()->getDouble(m_PixelTMT,"Z1",iPart) * Gaudi::Units::mm;
2653}
2654
2656{
2657 if (useLegacy()) return m_legacyManager->PixelTMTPosZ2(iPart);
2658 return db()->getDouble(m_PixelTMT,"Z2",iPart) * Gaudi::Units::mm;
2659}
2660
2662{
2663 if (useLegacy()) return m_legacyManager->PixelTMTPerModule(iPart);
2664 return db()->getInt(m_PixelTMT,"PERMODULE",iPart);
2665}
2666
2667//
2668// Omega parameters
2669//
2671{
2672 if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendX();
2673 return db()->getDouble(m_PixelOmega,"UPPERBENDX") * Gaudi::Units::mm;
2674}
2675
2677{
2678 if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendY();
2679 return db()->getDouble(m_PixelOmega,"UPPERBENDY") * Gaudi::Units::mm;
2680}
2681
2683{
2684 if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendRadius();
2685 return db()->getDouble(m_PixelOmega,"UPPERBENDR") * Gaudi::Units::mm;
2686}
2687
2689{
2690 if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendX();
2691 return db()->getDouble(m_PixelOmega,"LOWERBENDX") * Gaudi::Units::mm;
2692}
2693
2695{
2696 if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendY();
2697 return db()->getDouble(m_PixelOmega,"LOWERBENDY") * Gaudi::Units::mm;
2698}
2699
2701{
2702 if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendRadius();
2703 return db()->getDouble(m_PixelOmega,"LOWERBENDR") * Gaudi::Units::mm;
2704}
2705
2707{
2708 if (useLegacy()) return m_legacyManager->PixelOmegaWallThickness();
2709 return db()->getDouble(m_PixelOmega,"THICK") * Gaudi::Units::mm;
2710}
2711
2713{
2714 if (useLegacy()) return m_legacyManager->PixelOmegaLength();
2715 return db()->getDouble(m_PixelOmega,"LENGTH") * Gaudi::Units::mm;
2716}
2717
2719{
2720 if (useLegacy()) return m_legacyManager->PixelOmegaStartY();
2721 return db()->getDouble(m_PixelOmega,"STARTY") * Gaudi::Units::mm;
2722}
2723
2725{
2726 if (useLegacy()) return m_legacyManager->PixelOmegaEndY();
2727 return db()->getDouble(m_PixelOmega,"ENDY") * Gaudi::Units::mm;
2728}
2729
2730//
2731// Al Tube
2732//
2733
2735{
2736 if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendX();
2737 return db()->getDouble(m_PixelAlTube,"UPPERBENDX") * Gaudi::Units::mm;
2738}
2739
2741{
2742 if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendY();
2743 return db()->getDouble(m_PixelAlTube,"UPPERBENDY") * Gaudi::Units::mm;
2744}
2745
2747{
2748 if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendRadius();
2749 return db()->getDouble(m_PixelAlTube,"UPPERBENDR") * Gaudi::Units::mm;
2750}
2751
2753{
2754 if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendX();
2755 return db()->getDouble(m_PixelAlTube,"LOWERBENDX") * Gaudi::Units::mm;
2756}
2757
2759{
2760 if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendY();
2761 return db()->getDouble(m_PixelAlTube,"LOWERBENDY") * Gaudi::Units::mm;
2762}
2763
2765{
2766 if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendRadius();
2767 return db()->getDouble(m_PixelAlTube,"LOWERBENDR") * Gaudi::Units::mm;
2768}
2769
2771{
2772 if (useLegacy()) return m_legacyManager->PixelAlTubeWallThickness();
2773 return db()->getDouble(m_PixelAlTube,"THICK") * Gaudi::Units::mm;
2774}
2775
2777{
2778 if (useLegacy()) return m_legacyManager->PixelAlTubeLength();
2779 return db()->getDouble(m_PixelAlTube,"LENGTH") * Gaudi::Units::mm;
2780}
2781
2782//
2783// Glue
2784//
2785
2787{
2788 if (useLegacy()) return m_legacyManager->PixelNumOmegaGlueElements();
2789 return db()->getTableSize(m_PixelOmegaGlue);
2790}
2791
2793{
2794 if (useLegacy()) return m_legacyManager->PixelOmegaGlueStartX(index);
2795 return db()->getDouble(m_PixelOmegaGlue,"STARTX",index) * Gaudi::Units::mm;
2796}
2797
2799{
2800 if (useLegacy()) return m_legacyManager->PixelOmegaGlueThickness(index);
2801 return db()->getDouble(m_PixelOmegaGlue,"THICK",index) * Gaudi::Units::mm;
2802}
2803
2805{
2806 if (useLegacy()) return m_legacyManager->PixelOmegaGlueStartY(index);
2807 return db()->getDouble(m_PixelOmegaGlue,"STARTY",index) * Gaudi::Units::mm;
2808}
2809
2811{
2812 if (useLegacy()) return m_legacyManager->PixelOmegaGlueEndY(index);
2813 return db()->getDouble(m_PixelOmegaGlue,"ENDY",index) * Gaudi::Units::mm;
2814}
2815
2817{
2818 if (useLegacy()) return m_legacyManager->PixelOmegaGlueLength(index);
2819 return db()->getDouble(m_PixelOmegaGlue,"LENGTH",index) * Gaudi::Units::mm;
2820}
2821
2823{
2824 if (useLegacy()) return m_legacyManager->PixelOmegaGluePosZ(index);
2825 return db()->getDouble(m_PixelOmegaGlue,"Z",index) * Gaudi::Units::mm;
2826}
2827
2829{
2830 if (useLegacy()) return m_legacyManager->PixelOmegaGlueTypeNum(index);
2831 return db()->getInt(m_PixelOmegaGlue,"TYPENUM",index);
2832}
2833
2834
2835//
2836// Fluid
2837//
2839{
2840 if (useLegacy()) return m_legacyManager->PixelFluidZ1(index);
2841 return db()->getDouble(m_PixelFluid,"Z1",index) * Gaudi::Units::mm;
2842}
2843
2845{
2846 if (useLegacy()) return m_legacyManager->PixelFluidZ2(index);
2847 return db()->getDouble(m_PixelFluid,"Z2",index) * Gaudi::Units::mm;
2848}
2849
2851{
2852 if (useLegacy()) return m_legacyManager->PixelFluidThick1(index);
2853 return db()->getDouble(m_PixelFluid,"THICK1",index) * Gaudi::Units::mm;
2854}
2855
2856
2858{
2859 if (useLegacy()) return m_legacyManager->PixelFluidThick2(index);
2860 return db()->getDouble(m_PixelFluid,"THICK2",index) * Gaudi::Units::mm;
2861}
2862
2864{
2865 if (useLegacy()) return m_legacyManager->PixelFluidWidth(index);
2866 return db()->getDouble(m_PixelFluid,"WIDTH",index) * Gaudi::Units::mm;
2867}
2868
2869
2871{
2872 if (useLegacy()) return m_legacyManager->PixelFluidX(index);
2873 return db()->getDouble(m_PixelFluid,"X",index) * Gaudi::Units::mm;
2874}
2875
2877{
2878 if (useLegacy()) return m_legacyManager->PixelFluidY(index);
2879 return db()->getDouble(m_PixelFluid,"Y",index) * Gaudi::Units::mm;
2880}
2881
2883{
2884 if (useLegacy()) return m_legacyManager->PixelFluidType(index);
2885 return db()->getInt(m_PixelFluid,"TYPE",index);
2886}
2887
2889{
2890 if (useLegacy()) return m_legacyManager->PixelFluidNumTypes();
2891 return db()->getTableSize(m_PixelFluid);
2892}
2893
2895{
2896 for (int i = 0; i < PixelFluidNumTypes(); i++) {
2897 if (type == PixelFluidType(i)) return i;
2898 }
2899 msg(MSG::ERROR) << "Unrecognized fluid volume type: " << type << endmsg;
2900 return -1;
2901}
2902
2904 int matType = 0;
2905 if (useLegacy()) {
2906 matType = m_legacyManager->PixelFluidMatType(index);
2907 } else {
2908 matType = db()->getInt(m_PixelFluid,"MATTYPE",index);
2909 }
2910 return getMaterialName("Fluid", 0, matType);
2911}
2912
2914{
2915 if (useLegacy()) return m_legacyManager->PixelFluidOrient(layer, phi);
2916 return m_pixelStaveTypes->getFluidType(layer,phi);
2917}
2918
2919//
2920// Pigtail
2921//
2923{
2924 if (useLegacy()) return m_legacyManager->PixelPigtailThickness();
2925 return db()->getDouble(m_PixelPigtail,"THICK") * Gaudi::Units::mm;
2926}
2927
2929{
2930 if (useLegacy()) return m_legacyManager->PixelPigtailStartY();
2931 return db()->getDouble(m_PixelPigtail,"STARTY") * Gaudi::Units::mm;
2932}
2933
2935{
2936 if (useLegacy()) return m_legacyManager->PixelPigtailEndY();
2937 return db()->getDouble(m_PixelPigtail,"ENDY") * Gaudi::Units::mm;
2938}
2939
2941{
2942 if (useLegacy()) return m_legacyManager->PixelPigtailWidthZ();
2943 return db()->getDouble(m_PixelPigtail,"WIDTHZ") * Gaudi::Units::mm;
2944}
2945
2946// Different width from the curved section in old geometry
2948{
2949 if (useLegacy()) return m_legacyManager->PixelPigtailFlatWidthZ();
2950 return PixelPigtailWidthZ();
2951}
2952
2954{
2955 if (useLegacy()) return m_legacyManager->PixelPigtailPosX();
2956 return db()->getDouble(m_PixelPigtail,"X") * Gaudi::Units::mm;
2957}
2958
2960{
2961 if (useLegacy()) return m_legacyManager->PixelPigtailPosZ();
2962 return db()->getDouble(m_PixelPigtail,"Z") * Gaudi::Units::mm;
2963}
2964
2966{
2967 if (useLegacy()) return m_legacyManager->PixelPigtailBendX();
2968 return db()->getDouble(m_PixelPigtail,"BENDX") * Gaudi::Units::mm;
2969}
2970
2972{
2973 if (useLegacy()) return m_legacyManager->PixelPigtailBendY();
2974 return db()->getDouble(m_PixelPigtail,"BENDY") * Gaudi::Units::mm;
2975}
2976
2978{
2979 if (useLegacy()) return m_legacyManager->PixelPigtailBendRMin();
2980 return db()->getDouble(m_PixelPigtail,"BENDRMIN") * Gaudi::Units::mm;
2981}
2982
2984{
2985 if (useLegacy()) return m_legacyManager->PixelPigtailBendRMax();
2987}
2988
2990{
2991 if (useLegacy()) return m_legacyManager->PixelPigtailBendPhiMin();
2992 return db()->getDouble(m_PixelPigtail,"BENDPHIMIN") * Gaudi::Units::deg;
2993}
2994
2996{
2997 if (useLegacy()) return m_legacyManager->PixelPigtailBendPhiMax();
2998 return db()->getDouble(m_PixelPigtail,"BENDPHIMAX") * Gaudi::Units::deg;
2999}
3000
3002{
3003 if (useLegacy()) return m_legacyManager->PixelPigtailEnvelopeLength();
3004 return db()->getDouble(m_PixelPigtail,"ENVLENGTH") * Gaudi::Units::mm;
3005}
3006
3007//
3008// Connector
3009//
3011{
3012 if (useLegacy()) return m_legacyManager->PixelNumConnectorElements();
3013 return db()->getTableSize(m_PixelConnector);
3014}
3015
3017{
3018 if (useLegacy()) return m_legacyManager->PixelConnectorWidthX(index);
3019 return db()->getDouble(m_PixelConnector,"WIDTHX",index) * Gaudi::Units::mm;
3020}
3021
3023{
3024 if (useLegacy()) return m_legacyManager->PixelConnectorWidthY(index);
3025 return db()->getDouble(m_PixelConnector,"WIDTHY",index) * Gaudi::Units::mm;
3026}
3027
3029{
3030 if (useLegacy()) return m_legacyManager->PixelConnectorWidthZ(index);
3031 return db()->getDouble(m_PixelConnector,"WIDTHZ",index) * Gaudi::Units::mm;
3032}
3033
3035{
3036 if (useLegacy()) return m_legacyManager->PixelConnectorPosX(index);
3037 return db()->getDouble(m_PixelConnector,"X",index) * Gaudi::Units::mm;
3038}
3039
3041{
3042 if (useLegacy()) return m_legacyManager->PixelConnectorPosY(index);
3043 return db()->getDouble(m_PixelConnector,"Y",index) * Gaudi::Units::mm;
3044}
3045
3047{
3048 if (useLegacy()) return m_legacyManager->PixelConnectorPosZ(index);
3049 return db()->getDouble(m_PixelConnector,"Z",index) * Gaudi::Units::mm;
3050}
3051
3052//
3053// Design
3054//
3055
3056
3058{
3059
3060 if(isModule3D) return designType3D();
3061
3062 if (dbVersion() < 2) {
3063 return 0; // Not used
3064 } else {
3065 if (m_PixelReadout->size() == 0) {
3066 msg(MSG::ERROR) << "ERROR in PixelReadout size. Should not occur!" << endmsg;
3067 return 0;
3068 } else if (m_PixelReadout->size() == 1 && !ibl()) {
3069 return 0;
3070 } else { // Only in IBL
3071 return db()->getInt(m_PixelModule,"DESIGNTYPE",moduleType());
3072 }
3073 }
3074}
3075
3076
3078{
3079
3080 if (dbVersion() < 2) {
3081 return 0; // Not used
3082 }
3083 else {
3084 if (m_PixelReadout->size() == 0) {
3085 msg(MSG::ERROR) << "ERROR in PixelReadout size. Should not occur!" << endmsg;
3086 return 0;
3087 } else if (m_PixelReadout->size() == 1 && !ibl()) {
3088 return 0;
3089 } else { // Only in IBL
3090 int type = db()->getInt(m_PixelModule,"DESIGNTYPE",moduleType3D());
3091 return type;
3092 }
3093 }
3094}
3095
3097{
3098 if (dbVersion() < 2) {
3099 return -1;
3100 } else {
3101 int type = designType((ibl()&&isModule3D));
3102
3103 return db()->getInt(m_PixelReadout,"READOUTSIDE",type);
3104 }
3105}
3106
3108{
3109 if (dbVersion() < 2) {
3110 return m_legacyManager->DesignNumChipsPhi();
3111 } else {
3112 int type = designType((ibl()&&isModule3D));
3113
3114 return db()->getInt(m_PixelReadout,"NCHIPSPHI",type);
3115 }
3116}
3117
3118
3120 {
3121 if (dbVersion() < 2) {
3122 return m_legacyManager->DesignNumChipsEta();
3123 } else {
3124 int type = designType((ibl()&&isModule3D));
3125
3126 return db()->getInt(m_PixelReadout,"NCHIPSETA",type);
3127 }
3128}
3129
3131{
3132 if (dbVersion() < 2) {
3133 return m_legacyManager->DesignNumRowsPerChip(isInnermostPixelLayer());
3134 } else {
3135 int type = designType((ibl()&&isModule3D));
3136
3137 return db()->getInt(m_PixelReadout,"ROWSPERCHIP",type);
3138 }
3139}
3140
3142{
3143 if (dbVersion() < 2) {
3144 return m_legacyManager->DesignNumColsPerChip(isInnermostPixelLayer());
3145 } else {
3146 int type = designType((ibl()&&isModule3D));
3147
3148 return db()->getInt(m_PixelReadout,"COLSPERCHIP",type);
3149 }
3150}
3151
3152
3154{
3155 if (dbVersion() < 2) {
3156 return m_legacyManager->DesignDiodesPhiTotal(isInnermostPixelLayer());
3157 } else {
3158 return DesignNumChipsPhi(isModule3D) * (DesignNumRowsPerChip(isModule3D)+DesignNumEmptyRowsInGap(isModule3D)) - DesignNumEmptyRowsInGap(isModule3D);
3159 }
3160}
3161
3163{
3164 if (dbVersion() < 2) {
3165 return m_legacyManager->DesignDiodesEtaTotal(isInnermostPixelLayer());
3166 } else {
3167 return DesignNumChipsEta(isModule3D) * DesignNumColsPerChip(isModule3D);
3168 }
3169}
3170
3171
3173{
3174 return DesignNumChipsPhi(isModule3D) * DesignNumRowsPerChip(isModule3D);
3175}
3176
3178{
3179 return DesignNumColsPerChip(isModule3D);
3180}
3181
3183{
3184 return DesignDiodesPhiTotal(isModule3D);
3185}
3186
3188{
3189 return DesignNumColsPerChip(isModule3D);
3190}
3191
3193{
3194 // Could determine it from m_gangedIndexMap but expect it to be filled correctly in PixelReadoutTable
3195 if (dbVersion() < 2) {
3196 return m_legacyManager->DesignNumEmptyRowsInGap();
3197 } else {
3198 int type=designType((ibl()&&isModule3D));
3199
3200 return db()->getInt(m_PixelReadout,"EMPTYROWS",type);
3201 }
3202}
3203
3204// Ganged Pixels
3206{
3207 // type 0 means no ganged pixels
3208 if (!ibl()) return 1;
3209 if (ibl()) {
3210 return db()->getInt(m_PixelReadout,"GANGEDTYPE",designType());
3211 } else {
3212 int type = 1;
3213 if (db()->testField(m_PixelReadout,"GANGEDTYPE",designType())) {
3214 type = db()->getInt(m_PixelReadout,"GANGEDTYPE",designType());
3215 }
3216 return type;
3217 }
3218}
3219
3220
3222{
3223 // There is only one type for standard ATLAS so we just return the index.
3224 if (!ibl()) return index;
3225
3226 if (!m_gangedIndexMap) {
3227 // First time we create the map
3228 m_gangedIndexMap = std::make_unique<std::map<int,std::vector<int> > >();
3229 for (unsigned int i = 0; i < db()->getTableSize(m_PixelGangedPixels); i++){
3230 int testType = 1;
3231 if (db()->testField(m_PixelGangedPixels,"TYPE",i)) {
3232 testType = db()->getInt(m_PixelGangedPixels,"TYPE",i);
3233 }
3234 (*m_gangedIndexMap)[testType].push_back(i);
3235 }
3236 }
3237
3238 int newIndex = -1;
3239 std::map<int,std::vector<int> >::const_iterator iter = m_gangedIndexMap->find(type);
3240 if (iter == m_gangedIndexMap->end()) {
3241 msg(MSG::ERROR) << "Ganged pixel type " << type << " not found." << endmsg;
3242 } else {
3243 const std::vector<int> & vec = iter->second;
3244 if (index < 0 || static_cast<unsigned int>(index) >= vec.size()) {
3245 msg(MSG::ERROR) << "Ganged pixel index " << index << " for type " << type << " out of range." << endmsg;
3246 } else {
3247 newIndex = vec[index];
3248 }
3249 }
3250 return newIndex;
3251}
3252
3254{
3255 return DesignNumEmptyRowsInGap(isModule3D);
3256}
3257
3259{
3260 if (dbVersion() < 2) {
3261 return m_legacyManager->EmptyRows(index);
3262 } else {
3263 int newIndex = GangedTableIndex(index, GangedType());
3264 if (newIndex >= 0) {
3265 return db()->getInt(m_PixelGangedPixels,"EMPTYROW",newIndex);
3266 } else {
3267 return 0;
3268 }
3269 }
3270}
3271
3273{
3274 if (dbVersion() < 2) {
3275 return m_legacyManager->EmptyRowConnections(index);
3276 } else {
3277 int newIndex = GangedTableIndex(index, GangedType());
3278 if (newIndex >= 0) {
3279 return db()->getInt(m_PixelGangedPixels,"CONNECTROW",newIndex);
3280 } else {
3281 return 0;
3282 }
3283 }
3284}
3285
3286
3288{
3289 if (dbVersion() < 2) {
3290 return m_legacyManager->DesignRPActiveArea();
3291 } else {
3292 // All layers assumed to be the same.
3293 return DesignPitchRP(isModule3D) * ((DesignNumRowsPerChip(isModule3D)+DesignNumEmptyRowsInGap(isModule3D)) * DesignNumChipsPhi(isModule3D) - DesignNumEmptyRowsInGap(isModule3D));
3294 }
3295}
3296
3298{
3299 if (dbVersion() < 2) {
3300 return m_legacyManager->DesignZActiveArea();
3301 } else {
3302 // All layers assumed to be the same.
3303 return (DesignPitchZ(isModule3D) * (DesignNumColsPerChip(isModule3D) - 2) + 2 * DesignPitchZLong(isModule3D)) * DesignNumChipsEta(isModule3D) + 2 * (DesignPitchZLongEnd(isModule3D) - DesignPitchZLong(isModule3D));
3304 }
3305}
3306
3308{
3309 if (dbVersion() < 2) {
3310 return m_legacyManager->DesignPitchRP(isInnermostPixelLayer());
3311 } else {
3312 int type = designType((ibl()&&isModule3D));
3313 return db()->getDouble(m_PixelReadout,"PITCHPHI",type) * Gaudi::Units::mm;
3314 }
3315}
3316
3317double DBPixelGeoManager::DesignPitchZ(bool isModule3D)
3318{
3319 if (dbVersion() < 2) {
3320 return m_legacyManager->DesignPitchZ(isInnermostPixelLayer());
3321 } else {
3322 int type = designType((ibl()&&isModule3D));
3323 return db()->getDouble(m_PixelReadout,"PITCHETA",type) * Gaudi::Units::mm;
3324 }
3325}
3326
3328{
3329 // Defaults to DesignPitchZ if not specified or is zero.
3330 if (dbVersion() < 2) {
3331 return m_legacyManager->DesignPitchZLong(isInnermostPixelLayer());
3332 } else {
3333 int type = designType((ibl()&&isModule3D));
3334 double pitch = db()->getDouble(m_PixelReadout,"PITCHETALONG",type) * Gaudi::Units::mm;
3335 if (pitch == 0) pitch = DesignPitchZ(isModule3D);
3336 return pitch;
3337 }
3338}
3339
3341{
3342 // Defaults to DesignPitchZLongEnd if not specified or is zero.
3343 if (!ibl()) { // This check is not really needed once the field is in the database.
3344 return DesignPitchZLong(isModule3D);
3345 } else {
3346 int type = designType((ibl()&&isModule3D));
3347 double pitch = 0;
3348 if (db()->testField(m_PixelReadout,"PITCHETAEND",type)) {
3349 pitch = db()->getDouble(m_PixelReadout,"PITCHETAEND",type) * Gaudi::Units::mm;
3350 }
3351 if (pitch == 0) pitch = DesignPitchZLong(isModule3D);
3352 return pitch;
3353 }
3354}
3355
3356
3357double DBPixelGeoManager::DesignGapRP(bool isModule3D)
3358{
3359 if (dbVersion() < 2) {
3360 return m_legacyManager->DesignGapRP();
3361 } else {
3362 return DesignNumEmptyRowsInGap(isModule3D) * DesignPitchRP(isModule3D);
3363 }
3364}
3365
3366double DBPixelGeoManager::DesignGapZ(bool isModule3D)
3367{
3368 if (dbVersion() < 2) {
3369 return m_legacyManager->DesignGapZ();
3370 } else {
3371 return 2. * (DesignPitchZLong(isModule3D) - DesignPitchZ(isModule3D));
3372 }
3373}
3374
3376{
3377 //
3378 // This should be (*pdch)[0]->getDouble("NRPCHIP"), but in the current
3379 // design we prefer to have one chip in the rphi direction
3380 // and define the connections for the pixels in the gap
3381 return 1;
3382}
3383
3385{
3386 return DesignNumChipsEta(isModule3D);
3387}
3388
3389
3390
3391// Endcap
3393{
3394 return db()->getDouble(m_PixelDisk,"RIDISK",m_currentLD)*mmcm();
3395}
3396
3398
3399//
3400// endcap rings
3401//
3403 // Hardwire for now
3404 return 3;
3405}
3406
3408 std::ostringstream field;
3409 field <<"SUP"<< isup+1 <<"RMIN";
3410 return db()->getDouble(m_PixelDisk,field.str(),m_currentLD)*mmcm();
3411}
3412
3414 std::ostringstream field;
3415 field <<"SUP"<< isup+1 <<"RMAX";
3416 return db()->getDouble(m_PixelDisk,field.str(),m_currentLD)*mmcm();
3417}
3418
3419
3420// SLHC only (TODO: does not look like it)
3422
3423 std::ostringstream prefix;
3424 prefix <<"SUP"<< isup+1 <<"THICK";
3425
3426 bool found = false;
3427 double tck = 0;
3428
3429 // First check text file
3430 // default support thickness
3431 if (db()->testFieldTxt(m_PixelDisk,"SUP_THICK")) {
3432 tck = db()->getDouble(m_PixelDisk,"SUP_THICK");
3433 found = true;
3434 }
3435 // overwrites if found
3436 if (db()->testFieldTxt(m_PixelDisk,prefix.str(),m_currentLD)) {
3437 tck = db()->getDouble(m_PixelDisk,prefix.str(),m_currentLD);
3438 found = true;
3439 }
3440
3441 // Now check database
3442 if (!found) tck = db()->getDouble(m_PixelDisk,prefix.str(),m_currentLD);
3443
3444 if(tck>0.) {
3445 return tck * mmcm();
3446 } else { // radlen
3447 int typeNum = PixelDiskSupportMaterialTypeNum(isup);
3448 std::string matName = getMaterialName("DiskSupport", m_currentLD, typeNum);
3449 return CalculateThickness(tck, matName);
3450 }
3451}
3452
3453// SLHC only (TODO: does not look like it)
3455
3456 if (dbVersion() < 3) return 0;
3457
3458 std::ostringstream prefix;
3459 prefix <<"SUP"<< isup+1 <<"MAT";
3460
3461 int imat = 0;
3462 bool found = false;
3463 // default material type
3464 if (db()->testFieldTxt(m_PixelDisk,"SUP_MAT")) {
3465 imat = db()->getInt(m_PixelDisk,"SUP_MAT");
3466 found = true;
3467 }
3468 // overwrites if found
3469 if (db()->testFieldTxt(m_PixelDisk,prefix.str(),m_currentLD)) {
3470 imat = db()->getInt(m_PixelDisk,prefix.str(),m_currentLD);
3471 found = true;
3472 }
3473
3474 if (!found) {
3475 imat = db()->getInt(m_PixelDisk,prefix.str(),m_currentLD);
3476 }
3477 return imat;
3478}
3479
3480
3481//
3482//*** DBM Parameters with local database ***//
3483//
3484
3485// return angle of the telescope
3487 return db()->getDouble(m_DBMTelescope,"ANGLE")*Gaudi::Units::deg;
3488}
3489
3490// return dimension of the DBM telescope
3492 return db()->getDouble(m_DBMTelescope,"WIDTH")*Gaudi::Units::mm;
3493}
3495 return db()->getDouble(m_DBMTelescope,"HEIGHT")*Gaudi::Units::mm;
3496}
3498 return db()->getDouble(m_DBMTelescope,"LENGTH")*Gaudi::Units::mm;
3499}
3500
3501// return height and length of the module cage having a 3-layers structure
3503 return db()->getDouble(m_DBMTelescope,"CAGE_HEIGHT")*Gaudi::Units::mm;
3504}
3506 return db()->getDouble(m_DBMTelescope,"CAGE_LENGTH")*Gaudi::Units::mm;
3507}
3508
3509// return layer spacing
3511 return db()->getDouble(m_DBMCage,"ZSPACING")*Gaudi::Units::mm;
3512}
3514 if (m_currentLD == 0)
3515 return db()->getDouble(m_DBMCage,"RADIAL_SPACE_0")*Gaudi::Units::mm;
3516 else if (m_currentLD == 1)
3517 return db()->getDouble(m_DBMCage,"RADIAL_SPACE_1")*Gaudi::Units::mm;
3518 else if (m_currentLD == 2)
3519 return db()->getDouble(m_DBMCage,"RADIAL_SPACE_2")*Gaudi::Units::mm;
3520 else {
3521 msg(MSG::WARNING) << "DBMSpacingRadial() is not found" << endmsg;
3522 return 0.;
3523 }
3524}
3525// return dimension of bracket unit
3527 return db()->getDouble(m_DBMBracket,"WIDTH")*Gaudi::Units::mm;
3528}
3530 return db()->getDouble(m_DBMBracket,"HEIGHT")*Gaudi::Units::mm;
3531}
3533 return db()->getDouble(m_DBMBracket,"THICKNESS")*Gaudi::Units::mm;
3534}
3536 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_THETA")*Gaudi::Units::deg;
3537}
3539 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_WIDTH")*Gaudi::Units::mm;
3540}
3542 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_HEIGHT")*Gaudi::Units::mm;
3543}
3545 return db()->getDouble(m_DBMBracket,"TRAPEZBACK_ZSHORT")*Gaudi::Units::mm;
3546}
3548 return db()->getDouble(m_DBMBracket,"WINDOW_WIDTH")*Gaudi::Units::mm;
3549}
3551 return db()->getDouble(m_DBMBracket,"WINDOW_HEIGHT")*Gaudi::Units::mm;
3552}
3554 return db()->getDouble(m_DBMBracket,"WINDOW_OFFSET")*Gaudi::Units::mm;
3555}
3557 return db()->getDouble(m_DBMBracket,"WINDOW_CENTERZ")*Gaudi::Units::mm;
3558}
3560 return db()->getDouble(m_DBMBracket,"TOPBLOCK_THICK")*Gaudi::Units::mm;
3561}
3563 return db()->getDouble(m_DBMBracket,"SIDEBLOCK_WIDTH")*Gaudi::Units::mm;
3564}
3566 return db()->getDouble(m_DBMBracket,"SIDEBLOCK_HEIGHT")*Gaudi::Units::mm;
3567}
3569 return db()->getDouble(m_DBMBracket,"LOCK_THICK")*Gaudi::Units::mm;
3570}
3572 return db()->getDouble(m_DBMBracket,"LOCK_HEIGHT")*Gaudi::Units::mm;
3573}
3575 return db()->getDouble(m_DBMBracket,"COOLINGFIN_ZLONG")*Gaudi::Units::mm;
3576}
3578 return db()->getDouble(m_DBMBracket,"COOLINGFIN_HEIGHT")*Gaudi::Units::mm;
3579}
3581 return db()->getDouble(m_DBMBracket,"COOLINGFIN_THICK")*Gaudi::Units::mm;
3582}
3584 return db()->getDouble(m_DBMBracket,"COOLINGFIN_POS")*Gaudi::Units::mm;
3585}
3586
3587// return spacing between V-slide and first layer
3589 return db()->getDouble(m_DBMCage,"SPACING1")*Gaudi::Units::mm;
3590}
3591
3592// return dimensions of the main plate
3594 return db()->getDouble(m_DBMCage,"MAINPLATE_WIDTH")*Gaudi::Units::mm;
3595}
3597 return db()->getDouble(m_DBMCage,"MAINPLATE_HEIGHT")*Gaudi::Units::mm;
3598}
3600 return db()->getDouble(m_DBMCage,"MAINPLATE_THICK")*Gaudi::Units::mm;
3601}
3603 return db()->getDouble(m_DBMCage,"MPWINDOW_WIDTH")*Gaudi::Units::mm;
3604}
3606 return db()->getDouble(m_DBMCage,"MPWINDOW_HEIGHT")*Gaudi::Units::mm;
3607}
3609 return db()->getDouble(m_DBMCage,"MPWINDOW_POS")*Gaudi::Units::mm;
3610}
3611// return dimensions of aluminium side plates
3613 return db()->getDouble(m_DBMCage,"SIDEPLATE_THICK")*Gaudi::Units::mm;
3614}
3616 return db()->getDouble(m_DBMCage,"SIDEPLATE_HEIGHT")*Gaudi::Units::mm;
3617}
3619 return db()->getDouble(m_DBMCage,"SIDEPLATE_LENGTH")*Gaudi::Units::mm;
3620}
3622 return db()->getDouble(m_DBMCage,"SIDEPLATE_POS")*Gaudi::Units::mm;
3623}
3624
3625// return dimension of sensor, chip and ceramic
3627 return db()->getDouble(m_DBMModule,"DIAMOND_WIDTH")*Gaudi::Units::mm;
3628}
3630 return db()->getDouble(m_DBMModule,"DIAMOND_HEIGHT")*Gaudi::Units::mm;
3631}
3633 return db()->getDouble(m_DBMModule,"DIAMOND_THICK")*Gaudi::Units::mm;
3634}
3636 return db()->getDouble(m_DBMModule,"FEI4_WIDTH")*Gaudi::Units::mm;
3637}
3639 return db()->getDouble(m_DBMModule,"FEI4_HEIGHT")*Gaudi::Units::mm;
3640}
3642 return db()->getDouble(m_DBMModule,"FEI4_THICK")*Gaudi::Units::mm;
3643}
3645 return db()->getDouble(m_DBMModule,"CERAMIC_WIDTH")*Gaudi::Units::mm;
3646}
3648 return db()->getDouble(m_DBMModule,"CERAMIC_HEIGHT")*Gaudi::Units::mm;
3649}
3651 return db()->getDouble(m_DBMModule,"CERAMIC_THICK")*Gaudi::Units::mm;
3652}
3654 return db()->getDouble(m_DBMModule,"AIR_GAP")*Gaudi::Units::mm;
3655}
3657 return db()->getDouble(m_DBMModule,"KAPTONZ")*Gaudi::Units::mm;
3658}
3659
3660// flex support
3662 return db()->getDouble(m_DBMCage,"FLEXSUPP_WIDTH")*Gaudi::Units::mm;
3663}
3665 return db()->getDouble(m_DBMCage,"FLEXSUPP_HEIGHT")*Gaudi::Units::mm;
3666}
3668 return db()->getDouble(m_DBMCage,"FLEXSUPP_THICK")*Gaudi::Units::mm;
3669}
3671 return db()->getDouble(m_DBMCage, "FLEXSUPP_OFFSET")*Gaudi::Units::mm;
3672}
3673
3674// return radius of supporting rod
3676 return db()->getDouble(m_DBMCage,"ROD_RADIUS")*Gaudi::Units::mm;
3677}
3678// return distance between center of rods
3680 return db()->getDouble(m_DBMCage,"ROD2ROD_VERT")*Gaudi::Units::mm;
3681}
3683 return db()->getDouble(m_DBMCage,"ROD2ROD_HOR")*Gaudi::Units::mm;
3684}
3685
3686// radius and thickness of PP0 board
3688 return db()->getDouble(m_DBMTelescope,"PP0_RIN")*Gaudi::Units::mm;
3689}
3691 return db()->getDouble(m_DBMTelescope,"PP0_ROUT")*Gaudi::Units::mm;
3692}
3694 return db()->getDouble(m_DBMTelescope,"PP0_THICK")*Gaudi::Units::mm;
3695}
3696
3697
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
std::unique_ptr< InDetDD::DistortedMaterialManager > m_distortedMatManager
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
std::unique_ptr< PixelStaveTypes > m_pixelStaveTypes
virtual double PixelHalfLength() override
virtual double PixelModuleDrDistance() override
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 &)
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
std::unique_ptr< InDetMaterialManager > m_pMatMgr
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
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
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
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
virtual double IBLStaveOmegaMidAngle() override
virtual double PixelFrameElementZMax2(int sectionIndex, int element) override
virtual std::string getLD_Label() override
virtual double PixelPigtailWidthZ() override
std::unique_ptr< InDetDD::PairIndexMap > m_zPositionMap
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
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
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
std::unique_ptr< std::map< int, std::vector< int > > > m_gangedIndexMap
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
std::unique_ptr< PixelMaterialMap > m_materialMap
virtual double PixelFrameRMinSide(int sectionIndex) override
IRDBRecordset_ptr m_PixelDisk
std::unique_ptr< PixelLegacyManager > m_legacyManager
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
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
std::unique_ptr< std::map< int, std::vector< int > > > m_frameElementMap
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
std::unique_ptr< TopLevelPlacements > m_placements
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
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:69
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