19#include "GeoModelKernel/GeoAlignableTransform.h"
20#include "GeoModelKernel/GeoBox.h"
21#include "GeoModelKernel/GeoFullPhysVol.h"
22#include "GeoModelKernel/GeoIdentifierTag.h"
23#include "GeoModelKernel/GeoLogVol.h"
24#include "GeoModelKernel/GeoMaterial.h"
25#include "GeoModelKernel/GeoNameTag.h"
26#include "GeoModelKernel/GeoPhysVol.h"
27#include "GeoModelKernel/GeoTransform.h"
28#include "GeoModelKernel/GeoTube.h"
29#include "GeoModelKernel/GeoTubs.h"
30#include "GaudiKernel/PhysicalConstants.h"
33#include "Identifier/Identifier.h"
35#include "GaudiKernel/Bootstrap.h"
36#include "GaudiKernel/ISvcLocator.h"
61 double rmin =
m_gmt_mgr->PixelBarrelRMin();
62 double rmax =
m_gmt_mgr->PixelBarrelRMax();
63 double halflength =
m_gmt_mgr->PixelBarrelHalfLength();
64 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
65 const GeoTube* barrelTube =
new GeoTube(rmin,rmax,halflength);
66 const GeoLogVol* barrelLog =
new GeoLogVol(
"barrelLog",barrelTube,air);
67 GeoPhysVol* barrelPhys =
new GeoPhysVol(barrelLog);
77 lname[0] =
"InnerLayer";
78 lname[1] =
"CenterLayer";
79 lname[2] =
"OuterLayer";
80 for(
int ii = 0; ii <
m_gmt_mgr->PixelBarrelNLayer(); ii++) {
84 GeoAlignableTransform * xform =
new GeoAlignableTransform(GeoTrf::Transform3D::Identity());
85 GeoVPhysVol* layerphys = layer.Build();
86 GeoNameTag *tag =
new GeoNameTag(lname[ii]);
88 barrelPhys->add(
new GeoIdentifierTag(ii));
89 barrelPhys->add(xform);
90 barrelPhys->add(layerphys);
94 m_DDmgr->addAlignableTransform(1,
id, xform, layerphys);
104 for(
int ii =0; ii< brlsvc.
NCylinders(); ii++) {
106 GeoNameTag* tag =
new GeoNameTag(
"Outside Barrel Service");
107 GeoTrf::Translate3D pos(0.,0.,brlsvc.
ZPos() );
108 GeoTransform* xform =
new GeoTransform(pos);
109 barrelPhys->add(tag);
110 barrelPhys->add(xform);
111 barrelPhys->add(brlsvc.
Build() );
129 double length = this->Length();
130 double thickness = this->Thickness();
133 const GeoBox* cableBox =
new GeoBox(thickness/2.,
width/2.,
length/2.);
134 std::string logName = std::string(
"cableLog")+std::to_string(m_moduleNumber);;
135 GeoLogVol* theCable =
new GeoLogVol(logName,cableBox,cable);
136 GeoPhysVol* cablePhys =
new GeoPhysVol(theCable);
150 double zmax =
m_gmt_mgr->PixelCableZMax();
200 std::string LogName =
"chipBrlLog";
206 LogName =
"chipECLog";
210 const GeoBox* chipBox =
new GeoBox(thickness/2.,
width/2.,
length/2.);
211 GeoLogVol* theChip =
new GeoLogVol(LogName,chipBox,chipMat);
212 GeoPhysVol* chipPhys =
new GeoPhysVol(theChip);
235 double rmin =
RMin();
236 double rmax =
RMax();
238 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
239 const GeoTube* diskTube =
new GeoTube(rmin,rmax,halflength);
240 m_theDisk =
new GeoLogVol(
"diskLog",diskTube,air);
247 GeoFullPhysVol* diskPhys =
new GeoFullPhysVol(
m_theDisk);
254 GeoTrf::Translation3D pos(0.,0.,zpos);
265 GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(ii*
angle+
angle/2.)*GeoTrf::RotateX3D(180.*Gaudi::Units::deg);
266 GeoAlignableTransform* xform =
new GeoAlignableTransform(GeoTrf::Transform3D(pos*rm));
267 GeoVPhysVol * modulePhys = psd.Build();
268 GeoNameTag* tag =
new GeoNameTag(
"DiskSector");
270 diskPhys->add(
new GeoIdentifierTag(
getPhiId() ) );
271 diskPhys->add(xform);
272 diskPhys->add(modulePhys);
282 pos = GeoTrf::Translation3D(0.,0.,zpos);
285 GeoTrf::RotateZ3D rm((ii+1)*
angle);
286 GeoAlignableTransform* xform =
new GeoAlignableTransform(GeoTrf::Transform3D(pos*rm));
287 GeoVPhysVol * modulePhys = psd.Build();
288 GeoNameTag* tag =
new GeoNameTag(
"DiskSector");
290 diskPhys->add(
new GeoIdentifierTag(
getPhiId() ) );
291 diskPhys->add(xform);
292 diskPhys->add(modulePhys);
302 for(
int ii =0; ii< pds.NCylinders(); ii++) {
304 GeoTrf::Translate3D
pos(0.,0.,pds.ZPos() );
305 GeoNameTag*
tag =
new GeoNameTag(
"DiskSupport");
306 GeoTransform* xform =
new GeoTransform(pos);
308 diskPhys->add(xform);
309 diskPhys->add(pds.Build() );
316 return m_gmt_mgr->PixelECCarbonRMin(
"Inner");
320 return m_gmt_mgr->PixelECCarbonRMax(
"Outer");
333 double tck = 2*(
m_gmt_mgr->PixelBoardThickness()
357 if (phimod == -1) phimod = 47;
380 std::string ele[3] = {
"Inner",
"Central",
"Outer"};
381 for (
int ii =0; ii<3; ii++) {
382 double rmin =
m_gmt_mgr->PixelECCarbonRMin(ele[ii]);
383 double rmax =
m_gmt_mgr->PixelECCarbonRMax(ele[ii]);
384 double halflength =
m_gmt_mgr->PixelECCarbonThickness(ele[ii])/2.;
386 std::string mat =
m_gmt_mgr->PixelECCarbonMaterial(ele[ii]);
405 const GeoTube* supportTube =
new GeoTube(rmin,rmax,halflength);
406 std::string logName = std::string(
"diskSupLog")+std::to_string(
m_nframe);
407 GeoLogVol* theSupport =
new GeoLogVol(logName,supportTube,supportMat);
408 GeoPhysVol* supportPhys =
new GeoPhysVol(theSupport);
430 double rmin =
m_gmt_mgr->PixelECCablesRMin();
431 double rmax =
m_gmt_mgr->PixelECCablesRMax();
432 double thickness =
m_gmt_mgr->PixelECCablesThickness();
433 const GeoMaterial* cableMat =
m_mat_mgr->getMaterial(
"pix::ECCables");
434 const GeoTube* cableTube =
new GeoTube(rmin,rmax,thickness*0.5);
435 m_theECCable =
new GeoLogVol(
"ECCableLog",cableTube,cableMat);
460 const GeoTube* ecTube =
new GeoTube(rmin,rmax,halflength);
461 const GeoLogVol* ecLog =
new GeoLogVol(
"EndCapLog",ecTube,air);
462 GeoPhysVol* ecPhys =
new GeoPhysVol(ecLog);
483 GeoTrf::Translate3D pos(0.,0.,zdisk);
484 GeoNameTag* tag =
new GeoNameTag(
"Disk");
485 GeoAlignableTransform* xform =
new GeoAlignableTransform(pos);
486 GeoVPhysVol * diskPhys = pd.Build();
488 ecPhys->add(
new GeoIdentifierTag(ii));
490 ecPhys->add(diskPhys);
501 pos = GeoTrf::Translate3D(0.,0.,zdisk+dz);
502 tag =
new GeoNameTag(
"ECCables");
503 GeoTransform * xformCablesPlus =
new GeoTransform(pos);
505 ecPhys->add(xformCablesPlus);
506 ecPhys->add(pecc.Build() );
507 pos = GeoTrf::Translate3D(0.,0.,zdisk-dz);
508 tag =
new GeoNameTag(
"ECCables");
509 GeoTransform * xformCablesMinus =
new GeoTransform(pos);
511 ecPhys->add(xformCablesMinus);
512 ecPhys->add(pecc.Build() );
522 GeoPixelServices ecsvc = GeoPixelServices(
m_DDmgr,
m_gmt_mgr,
"/Pixel/PixelEndcap");
523 for(
int ii =0; ii< ecsvc.NCylinders(); ii++) {
524 ecsvc.SetCylinder(ii);
525 GeoNameTag*
tag =
new GeoNameTag(
"Outside Endcap Service");
526 GeoTrf::Translate3D
pos(0.,0.,ecsvc.ZPos() );
527 GeoTransform* xform =
new GeoTransform(pos);
530 ecPhys->add(ecsvc.
Build() );
549 double halflength =
m_gmt_mgr->PixelHalfLength();
551 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
552 const GeoTube* envelopeTube =
new GeoTube(rmin,rmax,halflength);
553 const GeoLogVol* envelopeLog =
new GeoLogVol(
"Pixel",envelopeTube,air);
554 GeoFullPhysVol* envelopePhys =
new GeoFullPhysVol(envelopeLog);
558 m_DDmgr->numerology().addBarrel(0);
561 GeoNameTag*
tag =
new GeoNameTag(
"Barrel");
562 GeoVPhysVol* barrelPhys = brl.Build() ;
563 envelopePhys->add(tag);
564 envelopePhys->add(
new GeoIdentifierTag(0));
565 envelopePhys->add(barrelPhys );
571 for(
int ii =0; ii< brlsvc.NCylinders(); ii++) {
572 brlsvc.SetCylinder(ii);
573 GeoNameTag*
tag =
new GeoNameTag(
"Outside Barrel Service");
574 GeoTrf::Translate3D
pos(0.,0.,brlsvc.ZPos() );
575 GeoTransform* xform =
new GeoTransform(pos);
576 envelopePhys->add(tag);
577 envelopePhys->add(
new GeoIdentifierTag(ii) );
578 envelopePhys->add(xform);
579 envelopePhys->add(brlsvc.
Build() );
585 m_DDmgr->numerology().addEndcap(2);
586 m_DDmgr->numerology().addEndcap(-2);
591 GeoTrf::Translate3D
pos(0.,0.,zpos);
592 GeoTransform* xform =
new GeoTransform(pos);
593 tag =
new GeoNameTag(
"EndCap 1");
594 envelopePhys->add(tag);
595 envelopePhys->add(
new GeoIdentifierTag(2));
596 envelopePhys->add(xform);
597 envelopePhys->add(pec.Build() );
599 GeoTrf::RotateX3D rm(180.*Gaudi::Units::deg);
600 xform =
new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translation3D(0.,0.,-zpos)*rm));
601 tag =
new GeoNameTag(
"EndCap 2");
602 envelopePhys->add(tag);
603 envelopePhys->add(
new GeoIdentifierTag(-2));
604 envelopePhys->add(xform);
605 envelopePhys->add(pec.Build() );
611 for(
int ii =0; ii< ecsvc.NCylinders(); ii++) {
612 ecsvc.SetCylinder(ii);
613 GeoNameTag*
tag =
new GeoNameTag(
"Outside Endcap Service");
614 GeoTrf::Translate3D
pos(0.,0.,ecsvc.ZPos() );
615 GeoTransform* xform =
new GeoTransform(pos);
616 envelopePhys->add(tag);
617 envelopePhys->add(xform);
618 envelopePhys->add(
new GeoIdentifierTag(ii) );
619 envelopePhys->add(ecsvc.
Build() );
656 double thickness =
m_gmt_mgr->PixelHybridThickness();
658 const GeoMaterial* hybridMat =
m_mat_mgr->getMaterial(
"pix::Hybrid");
660 const GeoBox* hybridBox =
new GeoBox(thickness/2.,
width/2.,
length/2.);
661 std::string logName =
"hybridECLog";
662 if(
m_gmt_mgr->isBarrel() ) logName =
"hybridBrlLog";
663 GeoLogVol* theHybrid =
new GeoLogVol(logName,hybridBox,hybridMat);
664 GeoPhysVol* hybridPhys =
new GeoPhysVol(theHybrid);
690 double halflength =
m_gmt_mgr->PixelLadderHalfLength();
702 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
703 const GeoBox* ladderBox =
new GeoBox(thickness*0.5,
width*0.5,halflength);
704 m_theLadder =
new GeoLogVol(
"ladderLog",ladderBox,air);
708 GeoPhysVol* ladderPhys =
new GeoPhysVol(
m_theLadder);
719 int jj = ii-HalfNModule;
733 GeoTrf::Translation3D modulepos(xpos,0.,zpos);
744 GeoVPhysVol* modulephys = pm.Build() ;
745 GeoNameTag *tag =
new GeoNameTag(
"Module");
746 GeoAlignableTransform* xform;
753 xform =
new GeoAlignableTransform(GeoTrf::Transform3D(modulepos*rm));
754 ladderPhys->add(tag);
755 ladderPhys->add(
new GeoIdentifierTag(
m_gmt_mgr->
Eta() ) );
756 ladderPhys->add(xform);
757 ladderPhys->add(modulephys );
778 double thick =
m_gmt_mgr->PixelBoardThickness()+
781 fabs(
m_gmt_mgr->PixelModuleDrDistance())+
801 double halflength =
m_gmt_mgr->PixelLadderHalfLength();
802 double thickness =
m_gmt_mgr->PixelLadderThickness();
807 const GeoMaterial* ladderMat =
m_mat_mgr->getMaterial(
"pix::Ladder");
808 const GeoBox* ladderStructBox =
new GeoBox(thickness/2.,
width/2.,halflength);
809 const GeoLogVol* ladderStructLog =
new GeoLogVol(
"ladderStructLog",ladderStructBox,ladderMat);
810 GeoPhysVol* ladderStructPhys =
new GeoPhysVol(ladderStructLog);
811 return ladderStructPhys;
827 bool isBLayer =
false;
833 double LayerThickness = 8.499*Gaudi::Units::mm;
841 std::string lname[3];
842 lname[0] =
"InnerLayerLog";
843 lname[1] =
"CenterLayerLog";
844 lname[2] =
"OuterLayerLog";
845 const GeoTube* layerTube =
new GeoTube(rmin,rmax,halflength);
846 const GeoLogVol* layerLog =
new GeoLogVol(lname[
m_gmt_mgr->
GetLD()],layerTube,air);
847 GeoFullPhysVol* layerPhys =
new GeoFullPhysVol(layerLog);
854 double angle=360./nsectors*Gaudi::Units::deg;
857 GeoTrf::Vector3D posladder(layerradius, 0.,0.);
858 posladder = GeoTrf::RotateZ3D(
angle/2.)*posladder;
859 GeoTrf::Vector3D postubecables(xcblpos, 0.,0.);
860 postubecables = GeoTrf::RotateZ3D(
angle/2.)*postubecables;
869 for(
int ii = 0; ii < nsectors; ii++) {
878 GeoNameTag *tag =
new GeoNameTag(
"Ladder");
879 GeoTransform* xform =
new GeoTransform(GeoTrf::Translate3D(posladder.x(),posladder.y(),posladder.z())*rm);
881 layerPhys->add(
new GeoIdentifierTag(ii) );
882 layerPhys->add(xform);
883 GeoVPhysVol* ladderphys = pl.Build() ;
884 layerPhys->add(ladderphys );
885 posladder = GeoTrf::RotateZ3D(
angle)*posladder;
890 tag =
new GeoNameTag(
"TubesAndCables");
891 xform =
new GeoTransform(GeoTrf::Translate3D(postubecables.x(),postubecables.y(),postubecables.z())*rm);
893 layerPhys->add(xform);
894 GeoVPhysVol* TCphys = ptc.Build() ;
895 layerPhys->add(TCphys );
896 postubecables = GeoTrf::RotateZ3D(
angle)*postubecables;
924 double width = this->
Width();
925 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
926 const GeoBox* moduleBox =
new GeoBox(thickness*0.5,
width*0.5,
length*0.5);
927 m_theModule =
new GeoLogVol(
"moduleLog",moduleBox,air);
932 GeoFullPhysVol* modulePhys =
new GeoFullPhysVol(
m_theModule);
938 GeoNameTag *tag =
new GeoNameTag(
"Si Crystal");
939 GeoTransform *xformsi =
new GeoTransform(GeoTrf::Transform3D::Identity());
940 modulePhys->add(tag);
941 modulePhys->add(
new GeoIdentifierTag(100) );
942 modulePhys->add(xformsi);
943 modulePhys->add(theSi );
949 GeoTrf::Translate3D hybpos(xpos,0.,0.);
950 GeoTransform* xform =
new GeoTransform(hybpos);
951 tag =
new GeoNameTag(
"Hybrid");
952 modulePhys->add(tag);
953 modulePhys->add(xform);
954 modulePhys->add(ph.Build() );
960 GeoTrf::Translate3D chippos(xpos,0.,0.);
961 xform =
new GeoTransform(chippos);
962 tag =
new GeoNameTag(
"Chip");
963 modulePhys->add(tag);
964 modulePhys->add(xform);
965 modulePhys->add(pc.Build() );
1044 const std::string& root)
1051 if(root ==
"/Pixel") {
1054 }
else if (root ==
"/Pixel/PixelBarrel" || root ==
"/Pixel/PixelEndcap" ) {
1058 std::cerr <<
"Services can not be placed in this volume!!!! " <<
root << std::endl;
1072 int NServices =
m_gmt_mgr->PixelServiceNFrame(
a);
1073 for(
int ii = 0; ii<NServices ; ii++) {
1082 if(LD != -1)
m_gmt_mgr->SetCurrentLD(LD);
1083 if(LD ==-1 ||
m_gmt_mgr->isLDPresent()) {
1084 double zpos,halflength;
1098 if(fabs(
z[0]) < 0.000001) {
1111 twovolumes = zpos > 0.00001 &&
r[0] >0.;
1113 if(
m_gmt_mgr->isEndcap() &&
a ==
"Inside") twovolumes =
false;
1143 const GeoTube* serviceTube =
new GeoTube(rmin,rmax,halflength);
1144 std::string logName;
1146 else logName =
m_zone+
"EC";
1147 logName = logName+std::to_string(
m_nframe);
1148 GeoLogVol* theService =
new GeoLogVol(logName,serviceTube,serviceMat);
1149 GeoPhysVol* servicePhys =
new GeoPhysVol(theService);
1169using namespace InDetDD;
1182 double thickness =
m_gmt_mgr->PixelBoardThickness();
1183 int circuitsPerEta =
m_gmt_mgr->DesignCircuitsPerColumn();
1184 int circuitsPerPhi =
m_gmt_mgr->DesignCircuitsPerRow();
1185 int CellRowPerCirc =
m_gmt_mgr->DesignCellRowsPerCircuit(isBLayer);
1186 int CellColPerCirc =
m_gmt_mgr->DesignCellColumnsPerCircuit(isBLayer);
1187 int rowsPerCircuit =
m_gmt_mgr->DesignDiodeRowsPerCircuit(isBLayer);
1188 int columnsPerCircuit =
m_gmt_mgr->DesignDiodeColumnsPerCircuit(isBLayer);
1196 double pitchPhi =
m_gmt_mgr->DesignPitchRP(isBLayer);
1197 double pitchEta =
m_gmt_mgr->DesignPitchZ(isBLayer);
1218 std::array<int,kNDirections>{circuitsPerPhi,circuitsPerEta},
1219 std::array<int,kNDirections>{rowsPerCircuit,columnsPerCircuit},
1220 std::array<std::array<double,kNDirections>,kNPixelLocations>{
1221 std::array<double,kNDirections>{pitchPhi,pitchEta},
1222 std::array<double,kNDirections>{0.,pitchEtaBig},
1223 std::array<double,kNDirections>{0.,pitchEtaBig}},
1226 std::unique_ptr<PixelModuleDesign> p_barrelDesign2 = std::make_unique<PixelModuleDesign>(thickness,
1233 std::move(diode_tree),
1241 if (m_gmt_mgr->NumberOfEmptyRows() > 0) {
1242 int minRow = m_gmt_mgr->EmptyRows(0);
1243 int maxRow = minRow;
1246 for (
int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
1247 minRow = std::min(minRow, m_gmt_mgr->EmptyRows(iConnect));
1248 minRow = std::min(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
1249 maxRow = std::max(maxRow, m_gmt_mgr->EmptyRows(iConnect));
1250 maxRow = std::max(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
1253 std::vector <int> connections(maxRow-minRow+1);
1256 for (
unsigned int iRow = 0; iRow < connections.size(); iRow++){
1257 connections[iRow] = iRow + minRow;
1261 for (
int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
1262 connections[m_gmt_mgr->EmptyRows(iConnect)-minRow] = m_gmt_mgr->EmptyRowConnections(iConnect);
1271 p_barrelDesign2->addMultipleRowConnection(minRow, connections);
1275 std::cout <<
"GeoPixelSiCrystal: Warning - No ganged pixels" << std::endl;
1279 m_design = m_DDmgr->addDesign(std::move(p_barrelDesign2));
1287 double thickness =
m_gmt_mgr->PixelBoardThickness();
1289 const GeoMaterial* siMat =
m_mat_mgr->getMaterial(
"std::Silicon");
1290 const GeoBox* siBox =
new GeoBox(thickness/2.,
width/2.,
length/2.);
1294 GeoLogVol* theSi =
new GeoLogVol(logname,siBox,siMat);
1295 GeoFullPhysVol* siPhys =
new GeoFullPhysVol(theSi);
1305 const PixelID *ppp =
m_gmt_mgr->getIdHelper();
1325 if (phimod == -1)
phimod = 47;
1332 SiDetectorElement * element =
new SiDetectorElement(idwafer,
m_design, siPhys,
m_gmt_mgr->commonItems());
1340 m_DDmgr->addDetectorElement(element);
1364 double rmin =
RMin();
1365 double rmax =
RMax();
1367 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
1368 const GeoTubs* SDTubs =
new GeoTubs(rmin,rmax,halflength,-180.*Gaudi::Units::deg/
m_gmt_mgr->PixelECNSectors1()+0.000005,360.*Gaudi::Units::deg/
m_gmt_mgr->PixelECNSectors1()-0.00001);
1375 GeoFullPhysVol* SDPhys =
new GeoFullPhysVol(
m_theSubDisk);
1380 GeoNameTag* tag =
new GeoNameTag(
"SiCrystal");
1381 GeoTrf::Transform3D rm = GeoTrf::RotateX3D(180.*Gaudi::Units::deg)*GeoTrf::RotateY3D(90.*Gaudi::Units::deg);
1382 GeoTrf::Translation3D pos(xpos,0.,0.);
1383 GeoAlignableTransform* xformsi =
new GeoAlignableTransform(GeoTrf::Transform3D(pos*rm));
1385 SDPhys->add(
new GeoIdentifierTag(200) );
1386 SDPhys->add(xformsi);
1392 tag =
new GeoNameTag(
"Hybrid");
1394 pos = GeoTrf::Translation3D(xpos,0.,zpos);
1395 GeoTransform* xform =
new GeoTransform(GeoTrf::Transform3D(pos*rm) );
1398 SDPhys->add(ph.
Build() );
1403 tag =
new GeoNameTag(
"Chip");
1405 pos = GeoTrf::Translation3D(xpos,0.,zpos);
1406 xform =
new GeoTransform(GeoTrf::Transform3D(pos*rm) );
1409 SDPhys->add(pc.Build() );
1450 double halflength =
m_gmt_mgr->PixelLadderHalfLength();
1460 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
1461 const GeoBox* solBox =
new GeoBox(thickness*0.5,
width*0.5,halflength+
m_epsilon);
1462 m_theBox =
new GeoLogVol(
"TubeCablesLog",solBox,air);
1468 GeoPhysVol* TCPhys =
new GeoPhysVol(
m_theBox);
1474 GeoNameTag* tag =
new GeoNameTag(
"LadderStructure");
1475 GeoVPhysVol* ladderstructPhys = pls.
Build() ;
1477 GeoTrf::Translate3D pos(xpos,0.,0.);
1478 GeoTransform* xform =
new GeoTransform(pos);
1481 TCPhys->add(ladderstructPhys);
1490 double xcabshift = 0.;
1491 for(
int ii = 0; ii <=
m_gmt_mgr->PixelNModule()/2; ii++) {
1492 pc.SetModuleNumber(ii);
1494 xcabshift += pc.Thickness()/2.;
1495 double xcabpos = - this->
Thickness()/2. +
m_gmt_mgr->PixelLadderThickness()+xcabshift;
1504 xcabshift += pc.Thickness()/2.;
1505 GeoTrf::Translate3D cablepos(xcabpos,0.,zcabpos);
1506 GeoTransform* xform =
new GeoTransform(cablepos);
1507 GeoNameTag *tag =
new GeoNameTag(
"Cable");
1511 GeoVPhysVol *cablePhys1 = pc.Build();
1515 TCPhys->add(cablePhys1);
1519 GeoVPhysVol *cablePhys2 = pc.Build();
1520 cablepos = GeoTrf::Translate3D(xcabpos,0.,-zcabpos);
1521 xform =
new GeoTransform(cablepos);
1525 TCPhys->add(cablePhys2);
1537 double thick =
m_gmt_mgr->PixelLadderThickness()+
1596 ISvcLocator* svcLocator = Gaudi::svcLocator();
1601 SmartIF<StoreGateSvc> detStore{svcLocator->service(
"DetectorStore")};
1602 if (!detStore.isValid())
ATH_MSG_FATAL(
"Could not locate DetectorStore");
1605 SmartIF<IRDBAccessSvc> rdbSvc{svcLocator->service(
"RDBAccessSvc")};
1606 if (!rdbSvc.isValid())
ATH_MSG_FATAL(
"Could not locate RDBAccessSvc");
1611 const std::string& detectorKey = versionKey.
tag();
1612 const std::string& detectorNode = versionKey.
node();
1623 ATH_MSG_INFO(
"Retrieving Record Sets from database ...");
1626 m_atls = rdbSvc->getRecordsetPtr(
"AtlasMother",versionKeyAtlas.
tag(), versionKeyAtlas.
node());
1627 m_PixelBarrelGeneral = rdbSvc->getRecordsetPtr(
"PixelBarrelGeneral", detectorKey, detectorNode);
1628 m_PixelBarrelService = rdbSvc->getRecordsetPtr(
"PixelBarrelService", detectorKey, detectorNode);
1629 m_PixelCommon = rdbSvc->getRecordsetPtr(
"PixelCommon", detectorKey, detectorNode);
1630 m_PixelDisk = rdbSvc->getRecordsetPtr(
"PixelDisk", detectorKey, detectorNode);
1631 m_PixelEndcapGeneral = rdbSvc->getRecordsetPtr(
"PixelEndcapGeneral", detectorKey, detectorNode);
1632 m_PixelEndcapService = rdbSvc->getRecordsetPtr(
"PixelEndcapService", detectorKey, detectorNode);
1633 m_PixelLayer = rdbSvc->getRecordsetPtr(
"PixelLayer", detectorKey, detectorNode);
1634 m_PixelModule = rdbSvc->getRecordsetPtr(
"PixelModule", detectorKey, detectorNode);
1635 m_PixelStave = rdbSvc->getRecordsetPtr(
"PixelStave", detectorKey, detectorNode);
1639 m_pxbi = rdbSvc->getRecordsetPtr(
"PXBI", detectorKey, detectorNode);
1640 m_pxei = rdbSvc->getRecordsetPtr(
"PXEI", detectorKey, detectorNode);
1641 m_pdch = rdbSvc->getRecordsetPtr(
"PDCH", detectorKey, detectorNode);
1642 m_pxbd = rdbSvc->getRecordsetPtr(
"PXBD", detectorKey, detectorNode);
1643 m_plor = rdbSvc->getRecordsetPtr(
"PLOR", detectorKey, detectorNode);
1644 m_plrn = rdbSvc->getRecordsetPtr(
"PLRN", detectorKey, detectorNode);
1656 if (StatusCode::SUCCESS ==
m_pDetStore->retrieve(materialManager, std::string(
"MATERIALS"))) {
1684 cout <<
"Layer set out of bounds, defaulting it to 0" << endl;
1686 std::cout<<
" Current layer set to "<<i<<std::endl;
1693 cout <<
"Disk set out of bounds, defaulting it to 0" << endl;
1695 std::cout<<
" Current disk set to "<<i<<std::endl;
1719 const std::string uscore(
"_");
1748 GeoIntrusivePtr<const GeoMaterial> material{
m_pMatMgr->getMaterial(mat)};
1749 double rl = material->getRadLength();
1750 return -1.*rl*tck/100.;
1772 return 200*Gaudi::Units::micrometer;
1807 thick =(*m_PixelModule)[
m_currentLD]->getDouble(
"HYBRIDTHICK");
1808 mat =
"pix::Hybrid";
1811 thick =(*m_PixelModule)[
m_currentLD+3]->getDouble(
"HYBRIDTHICK");
1812 mat =
"std::Silicon";
1816 return thick*Gaudi::Units::cm;
1849 thick =(*m_PixelModule)[
m_currentLD]->getDouble(
"CHIPTHICK");
1853 thick =(*m_PixelModule)[
m_currentLD+3]->getDouble(
"CHIPTHICK");
1854 mat =
"std::Silicon";
1858 return thick*Gaudi::Units::cm;
1872 }
else if (
a ==
"Central") {
1881 }
else if (
a ==
"Central") {
1891 string mat[4] = {
"std::Berillia",
"std::Carbon",
"pix::ECSevices",
"pix::Disk"} ;
1893 tck = (*m_PixelDisk)[
m_currentLD]->getDouble(
"SUP1THICK");
1894 imat =(*m_PixelDisk)[
m_currentLD]->getInt(
"SUP1MAT")-1;
1895 }
else if (
a ==
"Central") {
1896 tck = (*m_PixelDisk)[
m_currentLD]->getDouble(
"SUP2THICK");
1897 imat =(*m_PixelDisk)[
m_currentLD]->getInt(
"SUP2MAT")-1;
1899 tck = (*m_PixelDisk)[
m_currentLD]->getDouble(
"SUP3THICK");
1900 imat =(*m_PixelDisk)[
m_currentLD]->getInt(
"SUP3MAT")-1;
1903 return tck*Gaudi::Units::cm;
1908 string mat[4] = {
"std::Berillia",
"std::Carbon",
"pix::ECSevices",
"pix::Disk"} ;
1911 imat = (*m_PixelDisk)[
m_currentLD]->getInt(
"SUP1MAT")-1;
1912 }
else if (
a ==
"Central") {
1913 imat = (*m_PixelDisk)[
m_currentLD]->getInt(
"SUP2MAT")-1;
1915 imat = (*m_PixelDisk)[
m_currentLD]->getInt(
"SUP3MAT")-1;
1953 double *
r =
new double[2]{};
1956 rmin = (*m_PixelBarrelService)[n]->getDouble(
"RIN");
1957 rmax = (*m_PixelBarrelService)[n]->getDouble(
"ROUT");
1966 rmin = (*m_PixelEndcapService)[n]->getDouble(
"RIN");
1967 rmax = (*m_PixelEndcapService)[n]->getDouble(
"ROUT");
1975 r[0] = rmin*Gaudi::Units::cm;
1977 r[1] = rmax*Gaudi::Units::cm;
1987 double*
z =
new double[2]{};
1990 z[0] = (*m_PixelBarrelService)[n]->getDouble(
"ZIN");
1991 z[1] = (*m_PixelBarrelService)[n]->getDouble(
"ZOUT");
2000 z[0] = (*m_PixelEndcapService)[n]->getDouble(
"ZIN");
2001 z[1] = (*m_PixelEndcapService)[n]->getDouble(
"ZOUT");
2008 z[0] =
z[0] *Gaudi::Units::cm;
2009 if(
z[0]*(
z[1]) > -0.000000001) {
2010 z[1] =
z[1] *Gaudi::Units::cm;
2016 double center = ((*m_PixelEndcapGeneral)[0]->getDouble(
"ZMAX")+(*
m_PixelEndcapGeneral)[0]->getDouble(
"ZMIN"))/2.*Gaudi::Units::cm;
2051 if(
a ==
"Inside") {imat = (*m_PixelBarrelService)[n]->getInt(
"MATERIAL")-1;}
2052 else {imat = (*m_PixelBarrelService)[n+
m_barrelInFrames]->getInt(
"MATERIAL")-1;}
2056 string mat[4] = {
"std::Berillia",
"std::Carbon",
"pix::ECServices",
"pix::Disk"};
2057 if(
a ==
"Inside") {imat = (*m_PixelEndcapService)[n]->getInt(
"MATERIAL")-1;}
2058 else {imat =(*m_PixelEndcapService)[n+
m_endcapInFrames]->getInt(
"MATERIAL")-1;}
2090 if (
sc.isFailure()) {
2091 std::cout <<
"Cannot retrieve PixelDetectorManager" << std::endl;
2141 double tck = (*m_PixelStave)[0]->getDouble(
"SUPPORTTHICK");
2143 return tck*Gaudi::Units::cm;
2151 double tck = (*m_PixelDisk)[
m_currentLD]->getDouble(
"CABLETHICK");
2153 return tck*Gaudi::Units::cm;
2164 return static_cast<int>((ActiveArea - GapRP)/pitchRP + 0.5);
2173 return static_cast<int>((ActiveArea - GapZ*CPR)/(CPR*pitchZ) + 0.5);
2180 return static_cast<int>((ActiveArea)/pitchRP + 0.5);
2189 return static_cast<int>((ActiveArea - GapZ*CPR)/(CPR*pitchZ) + 0.5);
2195 return static_cast<int>((*m_pdch)[0]->getInt(
"NYCONNEC"));
2200 const std::string
a=std::string(
"_")+std::to_string(
index);
2201 return static_cast<int>((*m_pdch)[0]->getInt(
"JYEMPTY"+
a)) - 1;
2206 const std::string
a=std::string(
"_")+std::to_string(
index);
2207 return static_cast<int>((*m_pdch)[0]->getInt(
"JYCONNEC"+
a)) - 1;
2214 if (isBLayer &&
m_dc1Geometry)
return 77.7*Gaudi::Units::volt;
2215 if(isBLayer) {
return (*
m_plor)[0]->getDouble(
"VOLTAGE")*Gaudi::Units::volt;}
2216 return (*
m_plor)[1]->getDouble(
"VOLTAGE")*Gaudi::Units::volt;
2220 if(isBLayer) {
return (*
m_plor)[0]->getDouble(
"TEMPC")*Gaudi::Units::kelvin+Gaudi::Units::STP_Temperature;}
2221 return (*
m_plor)[1]->getDouble(
"TEMPC")*Gaudi::Units::kelvin+Gaudi::Units::STP_Temperature;
This is an Identifier helper class for the Pixel subdetector.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
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 GeoVPhysVol * Build() override
virtual GeoVPhysVol * Build() override
virtual GeoVPhysVol * Build() override
GeoPixelDisk(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > mapAX)
virtual GeoVPhysVol * Build() override
PixelGeometryManager * m_gmt_mgr
InDetMaterialManager * m_mat_mgr
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is con...
Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool ...
const SiNumerology & numerology() const
Access Numerology.
void setNumRingsForDisk(int disk, int nRings)
void setNumDisks(int nDisks)
void setNumPhiModulesForDiskRing(int disk, int ring, int nPhiModules)
void setNumPhiModulesForLayer(int layer, int nPhiModules)
void setNumEtaModulesForLayer(int layer, int nEtaModules)
const GeoMaterial * getMaterial(std::string_view materialName)
Get material. First looks for locally defined material and if not found looks in GeoModel material ma...
std::vector< double > m_zpos
std::vector< double > m_halflength
std::vector< double > m_rmin
virtual GeoVPhysVol * Build() override
GeoPixelDiskSupports(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr)
std::vector< double > m_rmax
std::vector< std::string > m_material
virtual GeoVPhysVol * Build() override
GeoIntrusivePtr< GeoLogVol > m_theDisk
GeoPixelECCable(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr)
virtual GeoVPhysVol * Build() override
GeoIntrusivePtr< GeoLogVol > m_theECCable
virtual GeoVPhysVol * Build() override
virtual GeoVPhysVol * Build() override
virtual GeoVPhysVol * Build() override
virtual GeoVPhysVol * Build() override
GeoIntrusivePtr< GeoLogVol > m_theLadder
GeoPixelSiCrystal & m_theSensor
GeoPixelLadder(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoPixelSiCrystal &theSensor)
virtual GeoVPhysVol * Build() override
virtual GeoVPhysVol * Build() override
GeoIntrusivePtr< GeoLogVol > m_theModule
virtual GeoVPhysVol * Build() override
GeoPixelSiCrystal & m_theSensor
GeoPixelModule(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoPixelSiCrystal &theSensor)
std::vector< double > m_halflength
std::vector< double > m_rmin
std::vector< std::string > m_material
std::vector< double > m_zpos
void initialize(const std::string &)
GeoPixelServices(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, const std::string &)
virtual GeoVPhysVol * Build() override
std::vector< double > m_rmax
virtual GeoVPhysVol * Build() override
GeoPixelSiCrystal(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, bool isBLayer)
const InDetDD::SiDetectorDesign * m_design
virtual GeoVPhysVol * Build() override
GeoIntrusivePtr< GeoLogVol > m_theSubDisk
GeoPixelSubDisk(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoPixelSiCrystal &theSensor)
GeoPixelSiCrystal & m_theSensor
GeoIntrusivePtr< GeoLogVol > m_theBox
virtual GeoVPhysVol * Build() override
GeoPixelTubeCables(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr)
virtual ~GeoVPixelFactory()
StoredMaterialManager * m_mat_mgr
PixelGeometryManager * m_gmt_mgr
GeoVPixelFactory(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr)
InDetDD::PixelDetectorManager * m_DDmgr
virtual double DesignPitchZ(bool isBLayer) override
IRDBRecordset_ptr m_PixelCommon
virtual void SetBarrel() override
virtual double Voltage(bool isBLayer) override
virtual double PixelLadderThickness() override
virtual double DesignRPActiveArea() override
IRDBRecordset_ptr m_PixelBarrelService
virtual int DesignDiodeColumnsPerCircuit(bool isBLayer) override
std::string m_blayerDesignName
std::string m_endcapDesignName
const PixelID * getIdHelper() override
IRDBRecordset_ptr m_PixelStave
std::string m_designsObjectName
virtual void SetCurrentLD(int i) override
virtual double PixelChipWidth() override
virtual void SetDetElementName(std::string_view) override
virtual void SetDesignName(std::string_view) override
std::string m_barrelDesignName
virtual double PixelChipLength() override
virtual std::string GetDetElementName() override
virtual void SetEndcapModuleName(std::string_view) override
virtual bool DoServices() override
virtual double PixelHybridThickness() override
virtual double DesignPitchRP(bool isBLayer) override
virtual int DesignCellColumnsPerCircuit(bool isBLayer) override
virtual void SetBarrelModuleName(std::string_view) override
virtual double PixelBoardThickness() override
virtual double PixelChipThickness() override
virtual double DesignGapRP() override
std::string m_elementsObjectName
virtual double PixelBoardWidth() override
virtual void setCommonItems(InDetDD::SiCommonItems *commonItems) override
virtual int DesignCircuitsPerRow() override
IRDBRecordset_ptr m_PixelEndcapGeneral
virtual std::string GetLayer0ModuleName() override
virtual StoredMaterialManager * getMaterialManager() override
StoreGateSvc * m_pDetStore
virtual double PixelBoardLength() override
virtual int EmptyRowConnections(int index) override
virtual bool isLDPresent() override
virtual std::string PixelServiceMaterial(std::string_view, int) override
virtual bool DC1Geometry() const override
bool m_g3CompatibleDigits
virtual double PixelECCarbonRMax(std::string) override
virtual std::string GetEndcapModuleName() override
virtual int PixelBarrelNLayer() override
virtual int PixelServiceLD(std::string_view, int) override
virtual double PixelECCarbonRMin(std::string) override
IRDBRecordset_ptr m_PixelModule
virtual std::string GetBarrelModuleName() override
virtual int DesignCellRowsPerCircuit(bool isBLayer) override
double CalculateThickness(double, const std::string &)
virtual void SetLayer0ModuleName(std::string_view) override
virtual double * PixelServiceZ(std::string_view, int) override
virtual bool InitialLayout() const override
virtual bool isBarrel() override
virtual bool isEndcap() override
virtual double * PixelServiceR(std::string_view, int) override
virtual double PixelHybridLength() override
InDetDD::PixelDetectorManager * m_pDDmgr
IRDBRecordset_ptr m_PixelEndcapService
virtual bool G3CompatibleDigits() const override
IRDBRecordset_ptr m_PixelBarrelGeneral
virtual int NumberOfEmptyRows() override
virtual double DesignGapZ() override
InDetDD::SiCommonItems * m_commonItems
virtual void SetEndcap() override
IRDBRecordset_ptr m_PixelLayer
int PixelEndcapNDisk() override
virtual double PixelECCarbonThickness(std::string) override
IRDBRecordset_ptr m_PixelDisk
virtual double PixelECCablesThickness() override
virtual double PixelBoardActiveLen() override
virtual InDetDD::SiCommonItems * commonItems() override
virtual int EmptyRows(int index) override
virtual double Temperature(bool isBLayer) override
virtual double PixelHybridWidth() override
virtual double PixelChipGap() override
virtual std::string PixelECCarbonMaterial(std::string) override
virtual std::string GetDesignName() override
virtual InDetDD::PixelDetectorManager * GetPixelDDManager() override
virtual int DesignDiodeRowsPerCircuit(bool isBLayer) override
StoredMaterialManager * m_pMatMgr
virtual double DesignZActiveArea() override
virtual int PixelServiceNFrame(std::string_view) override
virtual bool Alignable() const override
virtual double PixelChipLength()=0
virtual void SetPhi(int phi)=0
virtual double PixelChipGap()=0
virtual double PixelHybridThickness()=0
virtual bool DoServices()=0
virtual double PixelECSiDz2()=0
virtual double PixelModuleAngle()=0
virtual double PixelEndcapZMax()=0
virtual double PixelECSiDz1()=0
virtual double PixelChipWidth()=0
virtual int PixelEndcapNDisk()=0
virtual double PixelChipThickness()=0
virtual double PixelModuleDrDistance()=0
virtual double PixelCableWidth()=0
virtual double PixelModuleAngleSign(int)=0
virtual bool isLDPresent()=0
virtual bool isEndcap()=0
virtual double PixelDiskPosition()=0
virtual int PixelNModule()=0
virtual double PixelECCablesDistance()=0
virtual double PixelLadderHalfLength()=0
virtual double PixelEndcapZMin()=0
virtual double PixelModulePosition(int)=0
virtual double PixelEndcapRMax()=0
virtual const PixelID * getIdHelper()=0
virtual int NPixelSectors()=0
virtual double PixelBoardThickness()=0
virtual int PixelECNSectors1()=0
virtual double PixelEndcapRMin()=0
virtual ~PixelGeometryManager()
virtual void SetEta(int eta)=0
virtual double PixelLadderTilt()=0
virtual double PixelModuleShiftFlag(int)=0
virtual void SetCurrentLD(int i)=0
virtual double PixelLayerRadius()=0
This is an Identifier helper class for the Pixel subdetector.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
This class holds one or more material managers and makes them storeable, under StoreGate.
virtual const GeoMaterial * getMaterial(std::string_view name)=0
phimod(flags, cells_name, *args, **kw)
PixelDiodeTree makePixelDiodeTree(T_MsgParent *gmt_mgr, InDetDD::PixelReadoutTechnology readoutTechnology, const std::array< int, kNDirections > &circuits, const std::array< int, kNDirections > &dimPerCircuit, const std::array< std::array< double, kNDirections >, kNPixelLocations > &pitch, FENumbering fe_numbering)