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