1 #include "DD4hep/DetFactoryHelper.h" 2 #include "DD4hep/Printout.h" 9 #include "Math/AxisAngle.h" 10 #include "CLHEP/Geometry/Point3D.h" 11 #include "CLHEP/Geometry/Vector3D.h" 12 #include "CLHEP/Geometry/Transform3D.h" 25 using Pt3D = HepGeom::Point3D<double>;
26 using Vec3 = CLHEP::Hep3Vector;
27 using Rota = CLHEP::HepRotation;
28 using Ro3D = HepGeom::Rotate3D;
29 using Tl3D = HepGeom::Translate3D;
30 using Tf3D = HepGeom::Transform3D;
31 using RoX3D = HepGeom::RotateX3D;
32 using RoZ3D = HepGeom::RotateZ3D;
63 unsigned int nPerHalf;
128 unsigned int nCryTypes;
129 unsigned int nCryPerAlvEta;
193 struct InnerLayerVolume {
215 double pTMLengthHalf;
216 double pTMHeightHalf;
223 double fanOutWidthHalf;
224 double fanOutLengthHalf;
225 double fanOutHeightHalf;
231 double diffLengthHalf;
235 double bndlLengthHalf;
239 double fEMLengthHalf;
240 double fEMHeightHalf;
245 struct AlveolarWedge {
255 unsigned int nFawPerSupm;
306 double edgeSlotHeight;
307 double edgeSlotWidth;
371 struct BackCoolTank {
380 string backBracketName;
381 double backBracketHeight;
382 string backBracketMat;
388 unsigned int mbCoolTubeNum;
426 double envHeightHalf;
427 double envLengthHalf;
432 double blkLengthHalf;
447 const Rotation3D& myrot(
cms::DDNamespace& ns,
const string& nam,
const CLHEP::HepRotation& r) {
448 ns.
addRotation(nam, Rotation3D(r.xx(), r.xy(), r.xz(), r.yx(), r.yy(), r.yz(), r.zx(), r.zy(), r.zz()));
461 nam,
t.dz(),
t.theta(),
t.phi(),
t.h1(),
t.bl1(),
t.tl1(),
t.alp1(),
t.h2(),
t.bl2(),
t.tl2(),
t.alp2());
464 string_view mynamespace(string_view
input) {
466 auto trim_pos =
v.find(
':');
467 if (trim_pos !=
v.npos)
468 v.remove_suffix(
v.size() - (trim_pos + 1));
479 string myns{mynamespace(
args.parentName()).
data(), mynamespace(
args.parentName()).
size()};
484 bar.name = myns +
args.str(
"BarName");
485 bar.mat =
args.str(
"BarMat");
486 bar.vecZPts =
args.vecDble(
"BarZPts");
487 bar.vecRMin =
args.vecDble(
"BarRMin");
488 bar.vecRMax =
args.vecDble(
"BarRMax");
489 bar.vecTran =
args.vecDble(
"BarTran");
490 bar.vecRota =
args.vecDble(
"BarRota");
491 bar.vecRota2 =
args.vecDble(
"BarRota2");
492 bar.vecRota3 =
args.vecDble(
"BarRota3");
493 bar.phiLo =
args.dble(
"BarPhiLo");
494 bar.phiHi =
args.dble(
"BarPhiHi");
495 bar.here =
args.dble(
"BarHere");
500 spm.mat =
args.str(
"SpmMat");
501 spm.vecZPts =
args.vecDble(
"SpmZPts");
502 spm.vecRMin =
args.vecDble(
"SpmRMin");
503 spm.vecRMax =
args.vecDble(
"SpmRMax");
504 spm.vecTran =
args.vecDble(
"SpmTran");
505 spm.vecRota =
args.vecDble(
"SpmRota");
506 spm.vecBTran =
args.vecDble(
"SpmBTran");
507 spm.vecBRota =
args.vecDble(
"SpmBRota");
508 spm.nPerHalf =
args.integer(
"SpmNPerHalf");
509 spm.lowPhi =
args.dble(
"SpmLowPhi");
510 spm.delPhi =
args.dble(
"SpmDelPhi");
511 spm.phiOff =
args.dble(
"SpmPhiOff");
512 spm.vecHere =
args.vecDble(
"SpmHere");
514 spm.cutThick =
args.dble(
"SpmCutThick");
515 spm.cutShow =
args.value<
int>(
"SpmCutShow");
516 spm.vecCutTM =
args.vecDble(
"SpmCutTM");
517 spm.vecCutTP =
args.vecDble(
"SpmCutTP");
518 spm.cutRM =
args.dble(
"SpmCutRM");
519 spm.cutRP =
args.dble(
"SpmCutRP");
520 spm.expThick =
args.dble(
"SpmExpThick");
521 spm.expWide =
args.dble(
"SpmExpWide");
522 spm.expYOff =
args.dble(
"SpmExpYOff");
523 spm.sideName = myns +
args.str(
"SpmSideName");
524 spm.sideMat =
args.str(
"SpmSideMat");
525 spm.sideHigh =
args.dble(
"SpmSideHigh");
526 spm.sideThick =
args.dble(
"SpmSideThick");
527 spm.sideYOffM =
args.dble(
"SpmSideYOffM");
528 spm.sideYOffP =
args.dble(
"SpmSideYOffP");
531 cry.nomCryDimAF =
args.dble(
"NomCryDimAF");
532 cry.nomCryDimLZ =
args.dble(
"NomCryDimLZ");
533 cry.vecNomCryDimBF =
args.vecDble(
"NomCryDimBF");
534 cry.vecNomCryDimCF =
args.vecDble(
"NomCryDimCF");
535 cry.vecNomCryDimAR =
args.vecDble(
"NomCryDimAR");
536 cry.vecNomCryDimBR =
args.vecDble(
"NomCryDimBR");
537 cry.vecNomCryDimCR =
args.vecDble(
"NomCryDimCR");
539 cry.underAF =
args.dble(
"UnderAF");
540 cry.underLZ =
args.dble(
"UnderLZ");
541 cry.underBF =
args.dble(
"UnderBF");
542 cry.underCF =
args.dble(
"UnderCF");
543 cry.underAR =
args.dble(
"UnderAR");
544 cry.underBR =
args.dble(
"UnderBR");
545 cry.underCR =
args.dble(
"UnderCR");
548 alv.wallThAlv =
args.dble(
"WallThAlv");
549 alv.wrapThAlv =
args.dble(
"WrapThAlv");
550 alv.clrThAlv =
args.dble(
"ClrThAlv");
551 alv.vecGapAlvEta =
args.vecDble(
"GapAlvEta");
553 alv.wallFrAlv =
args.dble(
"WallFrAlv");
554 alv.wrapFrAlv =
args.dble(
"WrapFrAlv");
555 alv.clrFrAlv =
args.dble(
"ClrFrAlv");
557 alv.wallReAlv =
args.dble(
"WallReAlv");
558 alv.wrapReAlv =
args.dble(
"WrapReAlv");
559 alv.clrReAlv =
args.dble(
"ClrReAlv");
561 alv.nCryTypes =
args.integer(
"NCryTypes");
562 alv.nCryPerAlvEta =
args.integer(
"NCryPerAlvEta");
569 cry.mat =
args.str(
"CryMat");
570 cry.clrMat =
args.str(
"ClrMat");
571 cry.wrapMat =
args.str(
"WrapMat");
572 cry.wallMat =
args.str(
"WallMat");
576 cap.here =
args.dble(
"CapHere");
578 cap.xSizeHalf = 0.5 *
args.dble(
"CapXSize");
579 cap.ySizeHalf = 0.5 *
args.dble(
"CapYSize");
580 cap.thickHalf = 0.5 *
args.dble(
"CapThick");
584 cer.mat =
args.str(
"CerMat");
585 cer.xSizeHalf = 0.5 *
args.dble(
"CerXSize");
586 cer.ySizeHalf = 0.5 *
args.dble(
"CerYSize");
587 cer.thickHalf = 0.5 *
args.dble(
"CerThick");
591 bSi.mat =
args.str(
"BSiMat");
592 bSi.xSizeHalf = 0.5 *
args.dble(
"BSiXSize");
593 bSi.ySizeHalf = 0.5 *
args.dble(
"BSiYSize");
594 bSi.thickHalf = 0.5 *
args.dble(
"BSiThick");
598 apd.mat =
args.str(
"APDMat");
599 apd.side =
args.dble(
"APDSide");
600 apd.thick =
args.dble(
"APDThick");
601 apd.z =
args.dble(
"APDZ");
602 apd.x1 =
args.dble(
"APDX1");
603 apd.x2 =
args.dble(
"APDX2");
606 apd.atjMat =
args.str(
"ATJMat");
607 apd.atjThickHalf = 0.5 *
args.dble(
"ATJThick");
610 apd.sglMat =
args.str(
"SGLMat");
611 apd.sglThick =
args.dble(
"SGLThick");
614 apd.aglMat =
args.str(
"AGLMat");
615 apd.aglThick =
args.dble(
"AGLThick");
618 apd.andMat =
args.str(
"ANDMat");
619 apd.andThick =
args.dble(
"ANDThick");
622 web.here =
args.dble(
"WebHere");
625 web.plMat =
args.str(
"WebPlMat");
626 web.clrMat =
args.str(
"WebClrMat");
627 web.vecWebPlTh =
args.vecDble(
"WebPlTh");
628 web.vecWebClrTh =
args.vecDble(
"WebClrTh");
629 web.vecWebLength =
args.vecDble(
"WebLength");
631 InnerLayerVolume ily;
632 ily.here =
args.dble(
"IlyHere");
633 ily.name = myns +
args.str(
"IlyName");
634 ily.phiLow =
args.dble(
"IlyPhiLow");
635 ily.delPhi =
args.dble(
"IlyDelPhi");
636 ily.vecIlyMat =
args.vecStr(
"IlyMat");
637 ily.vecIlyThick =
args.vecDble(
"IlyThick");
639 ily.pipeName = myns +
args.str(
"IlyPipeName");
640 ily.pipeHere =
args.dble(
"IlyPipeHere");
641 ily.pipeMat =
args.str(
"IlyPipeMat");
642 ily.pipeODHalf = 0.5 *
args.dble(
"IlyPipeOD");
643 ily.pipeID =
args.dble(
"IlyPipeID");
644 ily.vecIlyPipeLengthHalf =
args.vecDble(
"IlyPipeLength");
646 ily.vecIlyPipeLengthHalf.end(),
647 ily.vecIlyPipeLengthHalf.begin(),
648 [](
double length) ->
double {
return 0.5 * length; });
650 ily.vecIlyPipeType =
args.vecDble(
"IlyPipeType");
651 ily.vecIlyPipePhi =
args.vecDble(
"IlyPipePhi");
652 ily.vecIlyPipeZ =
args.vecDble(
"IlyPipeZ");
654 ily.pTMName = myns +
args.str(
"IlyPTMName");
655 ily.pTMHere =
args.dble(
"IlyPTMHere");
656 ily.pTMMat =
args.str(
"IlyPTMMat");
657 ily.pTMWidthHalf = 0.5 *
args.dble(
"IlyPTMWidth");
658 ily.pTMLengthHalf = 0.5 *
args.dble(
"IlyPTMLength");
659 ily.pTMHeightHalf = 0.5 *
args.dble(
"IlyPTMHeight");
660 ily.vecIlyPTMZ =
args.vecDble(
"IlyPTMZ");
661 ily.vecIlyPTMPhi =
args.vecDble(
"IlyPTMPhi");
663 ily.fanOutName = myns +
args.str(
"IlyFanOutName");
664 ily.fanOutHere =
args.dble(
"IlyFanOutHere");
665 ily.fanOutMat =
args.str(
"IlyFanOutMat");
666 ily.fanOutWidthHalf = 0.5 *
args.dble(
"IlyFanOutWidth");
667 ily.fanOutLengthHalf = 0.5 *
args.dble(
"IlyFanOutLength");
668 ily.fanOutHeightHalf = 0.5 *
args.dble(
"IlyFanOutHeight");
669 ily.vecIlyFanOutZ =
args.vecDble(
"IlyFanOutZ");
670 ily.vecIlyFanOutPhi =
args.vecDble(
"IlyFanOutPhi");
671 ily.diffName = myns +
args.str(
"IlyDiffName");
672 ily.diffMat =
args.str(
"IlyDiffMat");
673 ily.diffOff =
args.dble(
"IlyDiffOff");
674 ily.diffLengthHalf = 0.5 *
args.dble(
"IlyDiffLength");
675 ily.bndlName = myns +
args.str(
"IlyBndlName");
676 ily.bndlMat =
args.str(
"IlyBndlMat");
677 ily.bndlOff =
args.dble(
"IlyBndlOff");
678 ily.bndlLengthHalf = 0.5 *
args.dble(
"IlyBndlLength");
679 ily.fEMName = myns +
args.str(
"IlyFEMName");
680 ily.fEMMat =
args.str(
"IlyFEMMat");
681 ily.fEMWidthHalf = 0.5 *
args.dble(
"IlyFEMWidth");
682 ily.fEMLengthHalf = 0.5 *
args.dble(
"IlyFEMLength");
683 ily.fEMHeightHalf = 0.5 *
args.dble(
"IlyFEMHeight");
684 ily.vecIlyFEMZ =
args.vecDble(
"IlyFEMZ");
685 ily.vecIlyFEMPhi =
args.vecDble(
"IlyFEMPhi");
687 AlveolarWedge alvWedge;
688 alvWedge.hawRName = myns +
args.str(
"HawRName");
689 alvWedge.fawName = myns +
args.str(
"FawName");
690 alvWedge.fawHere =
args.dble(
"FawHere");
691 alvWedge.hawRHBIG =
args.dble(
"HawRHBIG");
692 alvWedge.hawRhsml =
args.dble(
"HawRhsml");
693 alvWedge.hawRCutY =
args.dble(
"HawRCutY");
694 alvWedge.hawRCutZ =
args.dble(
"HawRCutZ");
695 alvWedge.hawRCutDelY =
args.dble(
"HawRCutDelY");
696 alvWedge.hawYOffCry =
args.dble(
"HawYOffCry");
698 alvWedge.nFawPerSupm =
args.integer(
"NFawPerSupm");
699 alvWedge.fawPhiOff =
args.dble(
"FawPhiOff");
700 alvWedge.fawDelPhi =
args.dble(
"FawDelPhi");
701 alvWedge.fawPhiRot =
args.dble(
"FawPhiRot");
702 alvWedge.fawRadOff =
args.dble(
"FawRadOff");
706 grid.name = myns +
args.str(
"GridName");
708 grid.thick =
args.dble(
"GridThick");
711 back.here =
args.dble(
"BackHere");
712 back.xOff =
args.dble(
"BackXOff");
713 back.yOff =
args.dble(
"BackYOff");
714 back.sideName = myns +
args.str(
"BackSideName");
715 back.sideHere =
args.dble(
"BackSideHere");
716 back.sideLength =
args.dble(
"BackSideLength");
717 back.sideHeight =
args.dble(
"BackSideHeight");
718 back.sideWidth =
args.dble(
"BackSideWidth");
719 back.sideYOff1 =
args.dble(
"BackSideYOff1");
720 back.sideYOff2 =
args.dble(
"BackSideYOff2");
721 back.sideAngle =
args.dble(
"BackSideAngle");
722 back.sideMat =
args.str(
"BackSideMat");
723 back.plateName = myns +
args.str(
"BackPlateName");
724 back.plateHere =
args.dble(
"BackPlateHere");
725 back.plateLength =
args.dble(
"BackPlateLength");
726 back.plateThick =
args.dble(
"BackPlateThick");
727 back.plateWidth =
args.dble(
"BackPlateWidth");
728 back.plateMat =
args.str(
"BackPlateMat");
729 back.plate2Name = myns +
args.str(
"BackPlate2Name");
730 back.plate2Thick =
args.dble(
"BackPlate2Thick");
731 back.plate2Mat =
args.str(
"BackPlate2Mat");
734 grille.name = myns +
args.str(
"GrilleName");
735 grille.here =
args.dble(
"GrilleHere");
736 grille.thick =
args.dble(
"GrilleThick");
737 grille.width =
args.dble(
"GrilleWidth");
738 grille.zSpace =
args.dble(
"GrilleZSpace");
739 grille.mat =
args.str(
"GrilleMat");
740 grille.vecHeight =
args.vecDble(
"GrilleHeight");
741 grille.vecZOff =
args.vecDble(
"GrilleZOff");
743 grille.edgeSlotName = myns +
args.str(
"GrEdgeSlotName");
744 grille.edgeSlotMat =
args.str(
"GrEdgeSlotMat");
745 grille.edgeSlotHere =
args.dble(
"GrEdgeSlotHere");
746 grille.edgeSlotHeight =
args.dble(
"GrEdgeSlotHeight");
747 grille.edgeSlotWidth =
args.dble(
"GrEdgeSlotWidth");
748 grille.midSlotName = myns +
args.str(
"GrMidSlotName");
749 grille.midSlotMat =
args.str(
"GrMidSlotMat");
750 grille.midSlotHere =
args.dble(
"GrMidSlotHere");
751 grille.midSlotWidth =
args.dble(
"GrMidSlotWidth");
752 grille.midSlotXOff =
args.dble(
"GrMidSlotXOff");
753 grille.vecMidSlotHeight =
args.vecDble(
"GrMidSlotHeight");
756 backPipe.here =
args.dble(
"BackPipeHere");
757 backPipe.name = myns +
args.str(
"BackPipeName");
758 backPipe.vecDiam =
args.vecDble(
"BackPipeDiam");
759 backPipe.vecThick =
args.vecDble(
"BackPipeThick");
760 backPipe.mat =
args.str(
"BackPipeMat");
761 backPipe.waterMat =
args.str(
"BackPipeWaterMat");
763 BackCooling backCool;
764 backCool.here =
args.dble(
"BackCoolHere");
765 backCool.vecName =
args.vecStr(
"BackCoolName");
767 backCool.vecName.end(),
768 backCool.vecName.begin(),
770 backCool.barHere =
args.dble(
"BackCoolBarHere");
771 backCool.barWidth =
args.dble(
"BackCoolBarWidth");
772 backCool.barHeight =
args.dble(
"BackCoolBarHeight");
773 backCool.mat =
args.str(
"BackCoolMat");
774 backCool.barName = myns +
args.str(
"BackCoolBarName");
775 backCool.barThick =
args.dble(
"BackCoolBarThick");
776 backCool.barMat =
args.str(
"BackCoolBarMat");
777 backCool.barSSName = myns +
args.str(
"BackCoolBarSSName");
778 backCool.barSSThick =
args.dble(
"BackCoolBarSSThick");
779 backCool.barSSMat =
args.str(
"BackCoolBarSSMat");
780 backCool.barWaName = myns +
args.str(
"BackCoolBarWaName");
781 backCool.barWaThick =
args.dble(
"BackCoolBarWaThick");
782 backCool.barWaMat =
args.str(
"BackCoolBarWaMat");
783 backCool.vFEHere =
args.dble(
"BackCoolVFEHere");
784 backCool.vFEName = myns +
args.str(
"BackCoolVFEName");
785 backCool.vFEMat =
args.str(
"BackCoolVFEMat");
786 backCool.backVFEName =
args.str(
"BackVFEName");
787 backCool.backVFEMat =
args.str(
"BackVFEMat");
788 backCool.vecBackVFELyrThick =
args.vecDble(
"BackVFELyrThick");
789 backCool.vecBackVFELyrName =
args.vecStr(
"BackVFELyrName");
791 backCool.vecBackVFELyrName.end(),
792 backCool.vecBackVFELyrName.begin(),
794 backCool.vecBackVFELyrMat =
args.vecStr(
"BackVFELyrMat");
795 backCool.vecBackCoolNSec =
args.vecDble(
"BackCoolNSec");
796 backCool.vecBackCoolSecSep =
args.vecDble(
"BackCoolSecSep");
797 backCool.vecBackCoolNPerSec =
args.vecDble(
"BackCoolNPerSec");
800 backMisc.here =
args.dble(
"BackMiscHere");
801 backMisc.vecThick =
args.vecDble(
"BackMiscThick");
802 backMisc.vecName =
args.vecStr(
"BackMiscName");
804 backMisc.vecName.end(),
805 backMisc.vecName.begin(),
807 backMisc.vecMat =
args.vecStr(
"BackMiscMat");
808 backMisc.backCBStdSep =
args.dble(
"BackCBStdSep");
810 PatchPanel patchPanel;
811 patchPanel.here =
args.dble(
"PatchPanelHere");
812 patchPanel.vecThick =
args.vecDble(
"PatchPanelThick");
813 patchPanel.vecNames =
args.vecStr(
"PatchPanelNames");
815 patchPanel.vecNames.end(),
816 patchPanel.vecNames.begin(),
819 patchPanel.vecMat =
args.vecStr(
"PatchPanelMat");
820 patchPanel.name = myns +
args.str(
"PatchPanelName");
822 BackCoolTank backCoolTank;
823 backCoolTank.here =
args.dble(
"BackCoolTankHere");
824 backCoolTank.name = myns +
args.str(
"BackCoolTankName");
825 backCoolTank.width =
args.dble(
"BackCoolTankWidth");
826 backCoolTank.thick =
args.dble(
"BackCoolTankThick");
827 backCoolTank.mat =
args.str(
"BackCoolTankMat");
828 backCoolTank.waName = myns +
args.str(
"BackCoolTankWaName");
829 backCoolTank.waWidth =
args.dble(
"BackCoolTankWaWidth");
830 backCoolTank.waMat =
args.str(
"BackCoolTankWaMat");
831 backCoolTank.backBracketName = myns +
args.str(
"BackBracketName");
832 backCoolTank.backBracketHeight =
args.dble(
"BackBracketHeight");
833 backCoolTank.backBracketMat =
args.str(
"BackBracketMat");
835 DryAirTube dryAirTube;
836 dryAirTube.here =
args.dble(
"DryAirTubeHere");
837 dryAirTube.name =
args.str(
"DryAirTubeName");
838 dryAirTube.mbCoolTubeNum =
args.integer(
"MBCoolTubeNum");
839 dryAirTube.innDiam =
args.dble(
"DryAirTubeInnDiam");
840 dryAirTube.outDiam =
args.dble(
"DryAirTubeOutDiam");
841 dryAirTube.mat =
args.str(
"DryAirTubeMat");
843 MBCoolTube mbCoolTube;
844 mbCoolTube.here =
args.dble(
"MBCoolTubeHere");
845 mbCoolTube.name = myns +
args.str(
"MBCoolTubeName");
846 mbCoolTube.innDiam =
args.dble(
"MBCoolTubeInnDiam");
847 mbCoolTube.outDiam =
args.dble(
"MBCoolTubeOutDiam");
848 mbCoolTube.mat =
args.str(
"MBCoolTubeMat");
851 mbManif.here =
args.dble(
"MBManifHere");
852 mbManif.name = myns +
args.str(
"MBManifName");
853 mbManif.innDiam =
args.dble(
"MBManifInnDiam");
854 mbManif.outDiam =
args.dble(
"MBManifOutDiam");
855 mbManif.mat =
args.str(
"MBManifMat");
858 mbLyr.here =
args.dble(
"MBLyrHere");
859 mbLyr.vecMBLyrThick =
args.vecDble(
"MBLyrThick");
860 mbLyr.vecMBLyrName =
args.vecStr(
"MBLyrName");
862 mbLyr.vecMBLyrName.end(),
863 mbLyr.vecMBLyrName.begin(),
865 mbLyr.vecMBLyrMat =
args.vecStr(
"MBLyrMat");
868 pincer.rodHere =
args.dble(
"PincerRodHere");
869 pincer.rodName = myns +
args.str(
"PincerRodName");
870 pincer.rodMat =
args.str(
"PincerRodMat");
871 pincer.vecRodAzimuth =
args.vecDble(
"PincerRodAzimuth");
872 pincer.envName = myns +
args.str(
"PincerEnvName");
873 pincer.envMat =
args.str(
"PincerEnvMat");
874 pincer.envWidthHalf = 0.5 *
args.dble(
"PincerEnvWidth");
875 pincer.envHeightHalf = 0.5 *
args.dble(
"PincerEnvHeight");
876 pincer.envLengthHalf = 0.5 *
args.dble(
"PincerEnvLength");
877 pincer.vecEnvZOff =
args.vecDble(
"PincerEnvZOff");
878 pincer.blkName = myns +
args.str(
"PincerBlkName");
879 pincer.blkMat =
args.str(
"PincerBlkMat");
880 pincer.blkLengthHalf = 0.5 *
args.dble(
"PincerBlkLength");
881 pincer.shim1Name = myns +
args.str(
"PincerShim1Name");
882 pincer.shimHeight =
args.dble(
"PincerShimHeight");
883 pincer.shim2Name = myns +
args.str(
"PincerShim2Name");
884 pincer.shimMat =
args.str(
"PincerShimMat");
885 pincer.shim1Width =
args.dble(
"PincerShim1Width");
886 pincer.shim2Width =
args.dble(
"PincerShim2Width");
887 pincer.cutName = myns +
args.str(
"PincerCutName");
888 pincer.cutMat =
args.str(
"PincerCutMat");
889 pincer.cutWidth =
args.dble(
"PincerCutWidth");
890 pincer.cutHeight =
args.dble(
"PincerCutHeight");
894 const unsigned int copyOne(1);
895 const unsigned int copyTwo(2);
897 Solid barSolid = Polycone(bar.name, bar.phiLo, (bar.phiHi - bar.phiLo), bar.vecRMin, bar.vecRMax, bar.vecZPts);
900 <<
convertRadToDeg(bar.phiHi) <<
" with " << bar.vecZPts.size() <<
" points";
901 for (
unsigned int k = 0;
k < bar.vecZPts.size(); ++
k)
905 Position tran(bar.vecTran[0], bar.vecTran[1], bar.vecTran[2]);
908 Rota(
Vec3(bar.vecRota3[0], bar.vecRota3[1], bar.vecRota3[2]), bar.vecRota3[3]) *
909 Rota(
Vec3(bar.vecRota2[0], bar.vecRota2[1], bar.vecRota2[2]), bar.vecRota2[3]) *
910 Rota(
Vec3(bar.vecRota[0], bar.vecRota[1], bar.vecRota[2]), bar.vecRota[3]));
912 parentVolume.placeVolume(barVolume, copyOne, Transform3D(
rotation, tran));
914 edm::LogVerbatim(
"EBGeomX") << barVolume.name() <<
":" << copyOne <<
" positioned in " << parentVolume.name()
922 const string spmcut1ddname((0 != spm.cutShow) ? spm.name : (spm.name +
"CUT1"));
923 Solid ddspm = Polycone(spmcut1ddname, spm.lowPhi, spm.delPhi, spm.vecRMin, spm.vecRMax, spm.vecZPts);
926 <<
convertRadToDeg(spm.lowPhi + spm.delPhi) <<
" with " << spm.vecZPts.size()
928 for (
unsigned int k = 0;
k < spm.vecZPts.size(); ++
k)
933 const unsigned int indx(0.5 * spm.vecRMax.size());
936 array<double, 3> cutBoxParms{{1.05 * (spm.vecRMax[indx] - spm.vecRMin[indx]) * 0.5,
938 fabs(spm.vecZPts.back() - spm.vecZPts.front()) * 0.5 + 1.0 * dd4hep::mm}};
939 Solid spmCutBox = Box(spm.cutName, cutBoxParms[0], cutBoxParms[1], cutBoxParms[2]);
948 array<double, 3> sideParms{{0.5 * spm.sideHigh, 0.5 * spm.sideThick, 0.5 * fabs(spm.vecZPts[1] - spm.vecZPts[0])}};
949 Solid sideSolid = Box(spm.sideName, sideParms[0], sideParms[1], sideParms[2]);
960 Transform3D alltrot1;
961 Transform3D alltrot2;
962 for (
unsigned int icopy(1); icopy <= 2; ++icopy) {
963 const std::vector<double>& tvec(1 == icopy ? spm.vecCutTM : spm.vecCutTP);
964 double rang(1 == icopy ? spm.cutRM : spm.cutRP);
966 const Position tr(tvec[0], tvec[1], tvec[2]);
968 const double ang(1 == icopy ? spm.lowPhi : spm.lowPhi + spm.delPhi);
971 0.5 * (spm.vecRMax[indx] + spm.vecRMin[indx]), 0, 0.5 * (spm.vecZPts.front() + spm.vecZPts.back()));
972 Transform3D alltrot(Transform3D(Transform3D(ro1 * tr1) * tr) * ro);
975 temp1 = SubtractionSolid(spm.name +
"_T1", ddspm, spmCutBox, alltrot);
977 edm::LogVerbatim(
"EBGeom") << (spm.name +
"_T1") <<
" Subtraction " << ddspm.name() <<
":" << spmCutBox.name()
984 temp2 = SubtractionSolid(spm.name, temp1, spmCutBox, alltrot);
986 edm::LogVerbatim(
"EBGeom") << spm.name <<
" Subtraction " << temp1.name() <<
":" << spmCutBox.name() <<
" at (" 992 const Tl3D trSide(tvec[0],
993 tvec[1] + (1 == icopy ? 1. : -1.) * (cutBoxParms[1] + sideParms[1]) +
994 (1 == icopy ? spm.sideYOffM : spm.sideYOffP),
996 const RoZ3D roSide(rang);
997 const Tf3D sideRot(
RoZ3D(1 == icopy ? spm.lowPhi : spm.lowPhi + spm.delPhi) *
998 Tl3D(spm.vecRMin.front() + sideParms[0], 0, spm.vecZPts.front() + sideParms[2]) * trSide *
1001 Rotation3D sideddrot(myrot(ns, spm.sideName +
std::to_string(icopy), sideRot.getRotation()));
1002 const Position sideddtra(sideRot.getTranslation());
1003 1 == icopy ? sideddtra1 = sideddtra : sideddtra2 = sideddtra;
1006 if (0 != spm.cutShow) {
1007 spmLog.placeVolume(spmCutLog, 1, alltrot1);
1009 edm::LogVerbatim(
"EBGeomX") << spmCutLog.name() <<
":1 positioned in " << spmLog.name() <<
" at (" 1012 <<
cms::convert2mm(alltrot1.Translation().Vect().z()) <<
") with rotation";
1014 spmLog.placeVolume(spmCutLog, 1, alltrot2);
1016 edm::LogVerbatim(
"EBGeomX") << spmCutLog.name() <<
":1 positioned in " << spmLog.name() <<
" at (" 1019 <<
cms::convert2mm(alltrot2.Translation().Vect().z()) <<
") with rotation";
1024 edm::LogVerbatim(
"EBGeomX") << sideLog.name() <<
":1 positioned in " << spmLog.name() <<
" at (" 1030 edm::LogVerbatim(
"EBGeomX") << sideLog.name() <<
":2 positioned in " << spmLog.name() <<
" at (" 1035 const double dphi(360._deg / (1. * spm.nPerHalf));
1036 for (
unsigned int iphi(0);
iphi < 2 * spm.nPerHalf; ++
iphi) {
1037 const double phi(
iphi * dphi + spm.phiOff);
1043 Ro3D(spm.vecBRota[3],
Vec3(spm.vecBRota[0], spm.vecBRota[1], spm.vecBRota[2])) *
1044 Tl3D(
Vec3(spm.vecBTran[0], spm.vecBTran[1], spm.vecBTran[2])));
1049 const unsigned int offr(4 *
iphi);
1050 const unsigned int offt(3 *
iphi);
1052 const Ro3D r1(spm.vecRota[offr + 3],
Vec3(spm.vecRota[offr + 0], spm.vecRota[offr + 1], spm.vecRota[offr + 2]));
1054 const Tf3D rotaExtra(r1 *
Tl3D(
Vec3(spm.vecTran[offt + 0], spm.vecTran[offt + 1], spm.vecTran[offt + 2])));
1056 const Tf3D both(rotaExtra * rotaBase);
1060 if (spm.vecHere[
iphi] != 0) {
1062 Position myTran(
both.getTranslation().x(),
both.getTranslation().y(),
both.getTranslation().z());
1063 barVolume.placeVolume(spmLog,
iphi + 1, Transform3D(rota, myTran));
1065 edm::LogVerbatim(
"EBGeomX") << spmLog.name() <<
":" << (
iphi + 1) <<
" positioned in " << barVolume.name()
1074 const double ilyLengthHalf(0.5 * (spm.vecZPts[1] - spm.vecZPts[0]));
1075 double ilyRMin(spm.vecRMin[0]);
1077 for (
unsigned int ilyx(0); ilyx != ily.vecIlyThick.size(); ++ilyx) {
1078 ilyThick += ily.vecIlyThick[ilyx];
1080 Solid ilySolid = Tube(ily.name,
1085 ily.phiLow + ily.delPhi);
1092 spmLog.placeVolume(ilyLog, copyOne,
Position(0, 0, ilyLengthHalf));
1094 edm::LogVerbatim(
"EBGeomX") << ilyLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name() <<
" at (0,0," 1098 if (0 != ily.pipeHere) {
1099 for (
unsigned int iPipeType(0); iPipeType != ily.vecIlyPipeLengthHalf.size(); ++iPipeType) {
1100 string pName(ily.pipeName +
"_" +
std::to_string(iPipeType + 1));
1102 Solid ilyPipeSolid = Tube(pName,
1105 ily.vecIlyPipeLengthHalf[iPipeType],
1112 ilyPipeLog[iPipeType] =
Volume(pName, ilyPipeSolid, ns.
material(ily.pipeMat));
1114 string pWaName(ily.pipeName +
"Wa_" +
std::to_string(iPipeType + 1));
1115 Solid ilyPipeWaSolid = Tube(pWaName,
1118 ily.vecIlyPipeLengthHalf[iPipeType],
1126 ilyPipeLog[iPipeType].placeVolume(ilyPipeWaLog, copyOne);
1128 edm::LogVerbatim(
"EBGeomX") << ilyPipeWaLog.name() <<
":" << copyOne <<
" positioned in " 1129 << ilyPipeLog[iPipeType].name() <<
" at (0,0,0) with no rotation";
1134 Solid ilyPTMSolid = Box(ily.pTMName, ily.pTMHeightHalf, ily.pTMWidthHalf, ily.pTMLengthHalf);
1141 Solid ilyFanOutSolid = Box(ily.fanOutName, ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.fanOutLengthHalf);
1148 Solid ilyFEMSolid = Box(ily.fEMName, ily.fEMHeightHalf, ily.fEMWidthHalf, ily.fEMLengthHalf);
1155 Solid ilyDiffSolid = Box(ily.diffName, ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.diffLengthHalf);
1162 Solid ilyBndlSolid = Box(ily.bndlName, ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.bndlLengthHalf);
1169 ilyFanOutLog.placeVolume(
1170 ilyDiffLog, copyOne,
Position(0, 0, -ily.fanOutLengthHalf + ily.diffLengthHalf + ily.diffOff));
1172 edm::LogVerbatim(
"EBGeomX") << ilyDiffLog.name() <<
":" << copyOne <<
" positioned in " << ilyFanOutLog.name()
1174 <<
cms::convert2mm(-ily.fanOutLengthHalf + ily.diffLengthHalf + ily.diffOff)
1175 <<
") with no rotation";
1177 ilyFanOutLog.placeVolume(
1178 ilyBndlLog, copyOne,
Position(0, 0, -ily.fanOutLengthHalf + ily.bndlLengthHalf + ily.bndlOff));
1180 edm::LogVerbatim(
"EBGeomX") << ilyBndlLog.name() <<
":" << copyOne <<
" positioned in " << ilyFanOutLog.name()
1182 <<
cms::convert2mm(-ily.fanOutLengthHalf + ily.bndlLengthHalf + ily.bndlOff)
1183 <<
") with no rotation";
1187 for (
unsigned int iily(0); iily != ily.vecIlyThick.size(); ++iily) {
1188 const double ilyRMax(ilyRMin + ily.vecIlyThick[iily]);
1190 Solid xilySolid = Tube(xilyName, ilyRMin, ilyRMax, ilyLengthHalf, ily.phiLow, ily.phiLow + ily.delPhi);
1197 if (0 != ily.here) {
1198 ilyLog.placeVolume(xilyLog, copyOne);
1200 edm::LogVerbatim(
"EBGeomX") << xilyLog.name() <<
":" << copyOne <<
" positioned in " << ilyLog.name()
1201 <<
" at (0,0,0) with no rotation";
1203 unsigned int copyNum[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1205 if (10 * dd4hep::mm < ily.vecIlyThick[iily] && ily.vecIlyThick.size() != (iily + 1) && 0 != ily.pipeHere) {
1206 if (0 != ily.pTMHere) {
1207 unsigned int ptmCopy(0);
1208 for (
unsigned int ilyPTM(0); ilyPTM != ily.vecIlyPTMZ.size(); ++ilyPTM) {
1209 const double radius(ilyRMax - 1 * dd4hep::mm - ily.pTMHeightHalf);
1210 const double phi(ily.vecIlyPTMPhi[ilyPTM]);
1214 xilyLog.placeVolume(
1217 Transform3D(RotationZ(phi),
Position(
xx,
yy, ily.vecIlyPTMZ[ilyPTM] - ilyLengthHalf)));
1220 << ilyPTMLog.name() <<
":" << ptmCopy <<
" positioned in " << xilyLog.name() <<
" at (" 1222 <<
cms::convert2mm(ily.vecIlyPTMZ[ilyPTM] - ilyLengthHalf) <<
") with rotation";
1226 if (0 != ily.fanOutHere) {
1227 unsigned int fanOutCopy(0);
1228 for (
unsigned int ilyFO(0); ilyFO != ily.vecIlyFanOutZ.size(); ++ilyFO) {
1229 const double radius(ilyRMax - 1 * dd4hep::mm - ily.fanOutHeightHalf);
1230 const double phi(ily.vecIlyFanOutPhi[ilyFO]);
1234 xilyLog.placeVolume(ilyFanOutLog,
1236 Transform3D(RotationZ(phi) * RotationY(180_deg),
1237 Position(
xx,
yy, ily.vecIlyFanOutZ[ilyFO] - ilyLengthHalf)));
1240 << ilyFanOutLog.name() <<
":" << fanOutCopy <<
" positioned in " << xilyLog.name() <<
" at (" 1242 <<
cms::convert2mm(ily.vecIlyFanOutZ[ilyFO] - ilyLengthHalf) <<
") with rotation";
1245 unsigned int femCopy(0);
1246 for (
unsigned int ilyFEM(0); ilyFEM != ily.vecIlyFEMZ.size(); ++ilyFEM) {
1247 const double radius(ilyRMax - 1 * dd4hep::mm - ily.fEMHeightHalf);
1248 const double phi(ily.vecIlyFEMPhi[ilyFEM]);
1252 xilyLog.placeVolume(
1255 Transform3D(RotationZ(phi),
Position(
xx,
yy, ily.vecIlyFEMZ[ilyFEM] - ilyLengthHalf)));
1258 << ilyFEMLog.name() <<
":" << femCopy <<
" positioned in " << xilyLog.name() <<
" at (" 1260 <<
cms::convert2mm(ily.vecIlyFEMZ[ilyFEM] - ilyLengthHalf) <<
") with rotation";
1264 for (
unsigned int iPipe(0); iPipe != ily.vecIlyPipePhi.size(); ++iPipe) {
1265 const unsigned int type(static_cast<unsigned int>(round(ily.vecIlyPipeType[iPipe])));
1266 const double zz(-ilyLengthHalf + ily.vecIlyPipeZ[iPipe] + (9 >
type ? ily.vecIlyPipeLengthHalf[
type] : 0));
1268 for (
unsigned int ly(0); ly != 2; ++ly) {
1269 const double radius(0 == ly ? ilyRMin + ily.pipeODHalf + 1 * dd4hep::mm
1270 : ilyRMax - ily.pipeODHalf - 1 * dd4hep::mm);
1271 const double phi(ily.vecIlyPipePhi[iPipe]);
1279 << ilyPipeLog[
type].name() <<
":" << copyNum[
type] <<
" positioned in " << xilyLog.name() <<
" at (" 1281 <<
") with no rotation";
1284 xilyLog.placeVolume(
1303 string clyrName(ns.
prepend(
"ECLYR"));
1304 std::vector<double> cri;
1305 std::vector<double> cro;
1306 std::vector<double> czz;
1307 czz.emplace_back(spm.vecZPts[1]);
1308 cri.emplace_back(spm.vecRMin[0]);
1309 cro.emplace_back(spm.vecRMin[0] + 25 * dd4hep::mm);
1310 czz.emplace_back(spm.vecZPts[2]);
1311 cri.emplace_back(spm.vecRMin[2]);
1312 cro.emplace_back(spm.vecRMin[2] + 10 * dd4hep::mm);
1313 Solid clyrSolid = Polycone(clyrName, -9.5_deg, 19_deg, cri, cro, czz);
1315 edm::LogVerbatim(
"EBGeom") << clyrName <<
" PolyCone from -9.5 to 9.5 with " << czz.size() <<
" points";
1316 for (
unsigned int k = 0;
k < czz.size(); ++
k)
1321 spmLog.placeVolume(clyrLog, copyOne);
1323 edm::LogVerbatim(
"EBGeomX") << clyrLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name()
1324 <<
" at (0,0,0) with no rotation";
1332 const double BNom1(cry.vecNomCryDimCR[0]);
1333 const double bNom1(cry.vecNomCryDimCF[0]);
1334 const double sWall1(alv.wallThAlv);
1335 const double fWall1(alv.wallFrAlv);
1336 const double sWrap1(alv.wrapThAlv);
1337 const double fWrap1(alv.wrapFrAlv);
1338 const double sClr1(alv.clrThAlv);
1339 const double fClr1(alv.clrFrAlv);
1340 const double LNom1(cry.nomCryDimLZ);
1341 const double beta1(atan((BNom1 - bNom1) / LNom1));
1342 const double sinbeta1(
sin(beta1));
1344 const double tana_hawR((BNom1 - bNom1) / LNom1);
1346 const double H_hawR(alvWedge.hawRHBIG);
1347 const double h_hawR(alvWedge.hawRhsml);
1348 const double a_hawR(bNom1 + sClr1 + 2 * sWrap1 + 2 * sWall1 - sinbeta1 * (fClr1 + fWrap1 + fWall1));
1349 const double B_hawR(a_hawR + H_hawR * tana_hawR);
1350 const double b_hawR(a_hawR + h_hawR * tana_hawR);
1351 const double L_hawR(spm.vecZPts[2]);
1353 const EcalTrap trapHAWR(0.5 * a_hawR,
1364 string hawRName1(alvWedge.hawRName +
"1");
1365 Solid hawRSolid1 = mytrap(hawRName1, trapHAWR);
1367 const double al1_fawR(atan((B_hawR - a_hawR) / H_hawR) +
M_PI_2);
1381 const string fawName1(alvWedge.fawName +
"1");
1382 Solid fawSolid1 = mytrap(fawName1, trapFAW);
1387 const double hawBoxClr(1 * dd4hep::mm);
1390 const string hawCutName(alvWedge.hawRName +
"CUTBOX");
1391 array<double, 3> hawBoxParms{{0.5 * b_hawR + hawBoxClr, 0.5 * alvWedge.hawRCutY, 0.5 * alvWedge.hawRCutZ}};
1392 Solid hawCutBox = Box(hawCutName, hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1398 const Pt3D b1(hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1399 const Pt3D b2(-hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1400 const Pt3D b3(-hawBoxParms[0], hawBoxParms[1], -hawBoxParms[2]);
1403 sqrt(4 * hawBoxParms[2] * hawBoxParms[2] - (h_hawR - alvWedge.hawRCutDelY) * (h_hawR - alvWedge.hawRCutDelY)));
1405 const Tf3D hawCutForm(
b1,
1408 vHAW[2] +
Pt3D(hawBoxClr, -alvWedge.hawRCutDelY, 0),
1409 vHAW[1] +
Pt3D(-hawBoxClr, -alvWedge.hawRCutDelY, 0),
1410 Pt3D(vHAW[0].
x() - hawBoxClr, vHAW[0].y(), vHAW[0].z() - zDel));
1412 Solid hawRSolid = SubtractionSolid(hawRSolid1,
1414 Transform3D(myrot(ns, hawCutName +
"R", hawCutForm.getRotation()),
1415 Position(hawCutForm.getTranslation().x(),
1416 hawCutForm.getTranslation().y(),
1417 hawCutForm.getTranslation().z())));
1419 edm::LogVerbatim(
"EBGeom") << alvWedge.hawRName <<
" Subtraction " << hawRSolid1.name() <<
":" << hawCutBox.name()
1427 const string fawCutName(alvWedge.fawName +
"CUTBOX");
1428 const array<double, 3> fawBoxParms{{2 * hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]}};
1429 Solid fawCutBox = Box(fawCutName, fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1435 const Pt3D bb1(fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1436 const Pt3D bb2(-fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1437 const Pt3D bb3(-fawBoxParms[0], fawBoxParms[1], -fawBoxParms[2]);
1439 const Tf3D fawCutForm(bb1,
1442 vFAW[2] +
Pt3D(2 * hawBoxClr, -5 * dd4hep::mm, 0),
1443 vFAW[1] +
Pt3D(-2 * hawBoxClr, -5 * dd4hep::mm, 0),
1444 Pt3D(vFAW[1].
x() - 2 * hawBoxClr, vFAW[1].y() - trapFAW.
h(), vFAW[1].z() - zDel));
1446 Solid fawSolid = SubtractionSolid(fawSolid1,
1448 Transform3D(myrot(ns, fawCutName +
"R", fawCutForm.getRotation()),
1449 Position(fawCutForm.getTranslation().x(),
1450 fawCutForm.getTranslation().y(),
1451 fawCutForm.getTranslation().z())));
1453 edm::LogVerbatim(
"EBGeom") << alvWedge.fawName <<
" Subtraction " << fawSolid1.name() <<
":" << fawCutBox.name()
1460 const Tf3D hawRform(vHAW[3],
1464 0.5 * (vFAW[0] + vFAW[3]),
1465 0.5 * (vFAW[1] + vFAW[2]));
1471 myrot(ns, alvWedge.hawRName +
"R", hawRform.getRotation()),
1472 Position(hawRform.getTranslation().x(), hawRform.getTranslation().y(), hawRform.getTranslation().z())));
1474 edm::LogVerbatim(
"EBGeomX") << hawRLog.name() <<
":" << copyOne <<
" positioned in " << fawLog.name() <<
" at (" 1477 <<
cms::convert2mm(hawRform.getTranslation().z()) <<
") with rotation";
1484 Rotation3D(1., 0., 0., 0., 1., 0., 0., 0., -1.) * RotationY(
M_PI),
1485 Position(-hawRform.getTranslation().x(), -hawRform.getTranslation().y(), -hawRform.getTranslation().z())));
1487 edm::LogVerbatim(
"EBGeomX") << hawRLog.name() <<
":" << copyTwo <<
" positioned in " << fawLog.name() <<
" at (" 1490 <<
cms::convert2mm(-hawRform.getTranslation().z()) <<
") with rotation";
1492 for (
unsigned int iPhi(1); iPhi <= alvWedge.nFawPerSupm; ++iPhi) {
1493 const double rPhi(alvWedge.fawPhiOff + (iPhi - 0.5) * alvWedge.fawDelPhi);
1496 Tl3D(alvWedge.fawRadOff + (trapFAW.
H() + trapFAW.
h()) / 4, 0, 0.5 * trapFAW.
L()) *
1497 RoZ3D(-90_deg + alvWedge.fawPhiRot));
1498 if (alvWedge.fawHere) {
1503 myrot(ns, alvWedge.fawName +
"_Rot" +
std::to_string(iPhi), fawform.getRotation()),
1504 Position(fawform.getTranslation().x(), fawform.getTranslation().y(), fawform.getTranslation().z())));
1506 edm::LogVerbatim(
"EBGeomX") << fawLog.name() <<
":" << iPhi <<
" positioned in " << spmLog.name() <<
" at (" 1509 <<
cms::convert2mm(fawform.getTranslation().z()) <<
") with rotation";
1518 const double h_Grid(
grid.thick);
1520 const EcalTrap trapGrid(0.5 * (B_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR),
1521 0.5 * (b_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR),
1525 0.5 * (L_hawR - 8 * dd4hep::cm),
1531 Solid gridSolid = mytrap(
grid.name, trapGrid);
1536 const Tf3D gridForm(vGrid[4],
1539 vHAW[5] -
Pt3D(0, h_Grid, 0),
1543 if (0 !=
grid.here) {
1544 hawRLog.placeVolume(
1548 myrot(ns,
grid.name +
"R", gridForm.getRotation()),
1549 Position(gridForm.getTranslation().x(), gridForm.getTranslation().y(), gridForm.getTranslation().z())));
1551 edm::LogVerbatim(
"EBGeomX") << gridLog.name() <<
":" << copyOne <<
" positioned in " << hawRLog.name() <<
" at (" 1554 <<
cms::convert2mm(gridForm.getTranslation().z()) <<
") with rotation";
1561 const double aNom(cry.nomCryDimAF);
1562 const double LNom(cry.nomCryDimLZ);
1564 const double AUnd(cry.underAR);
1565 const double aUnd(cry.underAF);
1566 const double bUnd(cry.underCF);
1567 const double HUnd(cry.underBR);
1568 const double hUnd(cry.underBF);
1569 const double LUnd(cry.underLZ);
1571 const double sWall(alv.wallThAlv);
1572 const double sWrap(alv.wrapThAlv);
1573 const double sClr(alv.clrThAlv);
1575 const double fWall(alv.wallFrAlv);
1576 const double fWrap(alv.wrapFrAlv);
1577 const double fClr(alv.clrFrAlv);
1579 const double rWall(alv.wallReAlv);
1580 const double rWrap(alv.wrapReAlv);
1581 const double rClr(alv.clrReAlv);
1584 double theta(90_deg);
1589 for (
unsigned int cryType(1); cryType <= alv.nCryTypes; ++cryType) {
1595 const double ANom(cry.vecNomCryDimAR[cryType - 1]);
1596 const double BNom(cry.vecNomCryDimCR[cryType - 1]);
1597 const double bNom(cry.vecNomCryDimCF[cryType - 1]);
1598 const double HNom(cry.vecNomCryDimBR[cryType - 1]);
1599 const double hNom(cry.vecNomCryDimBF[cryType - 1]);
1601 const double alfCry(90_deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd)));
1603 const EcalTrap trapCry(0.5 * (ANom - AUnd),
1604 0.5 * (aNom - aUnd),
1605 0.5 * (bNom - bUnd),
1606 0.5 * (HNom - HUnd),
1607 0.5 * (hNom - hUnd),
1608 0.5 * (LNom - LUnd),
1610 aNom - aUnd - ANom + AUnd,
1611 hNom - hUnd - HNom + HUnd
1614 const string cryDDName(cry.name + sType);
1615 Solid crySolid = mytrap(cry.name, trapCry);
1619 const unsigned int copyCap(1);
1620 const string capDDName(
cap.name + sType);
1621 Solid capSolid = Box(capDDName,
cap.xSizeHalf,
cap.ySizeHalf,
cap.thickHalf);
1628 const string sglDDName(apd.sglName + sType);
1629 Solid sglSolid = Box(sglDDName,
cap.xSizeHalf,
cap.ySizeHalf, apd.sglThick / 2.);
1635 const unsigned int copySGL(1);
1637 const string cerDDName(cer.name + sType);
1638 Solid cerSolid = Box(cerDDName, cer.xSizeHalf, cer.ySizeHalf, cer.thickHalf);
1644 unsigned int copyCER(0);
1646 const string bsiDDName(bSi.name + sType);
1647 Solid bsiSolid = Box(bsiDDName, bSi.xSizeHalf, bSi.ySizeHalf, bSi.thickHalf);
1653 const unsigned int copyBSi(1);
1655 const string atjDDName(apd.atjName + sType);
1656 Solid atjSolid = Box(atjDDName, 0.5 * apd.side, 0.5 * apd.side, apd.atjThickHalf);
1662 const unsigned int copyATJ(1);
1664 const string aglDDName(apd.aglName + sType);
1665 Solid aglSolid = Box(aglDDName, bSi.xSizeHalf, bSi.ySizeHalf, 0.5 * apd.aglThick);
1671 const unsigned int copyAGL(1);
1673 const string andDDName(apd.andName + sType);
1674 Solid andSolid = Box(andDDName, 0.5 * apd.side, 0.5 * apd.side, 0.5 * apd.andThick);
1680 const unsigned int copyAND(1);
1682 const string apdDDName(apd.name + sType);
1683 Solid apdSolid = Box(apdDDName, 0.5 * apd.side, 0.5 * apd.side, 0.5 * apd.thick);
1689 const unsigned int copyAPD(1);
1693 const double delta(atan((HNom - hNom) / LNom));
1696 const double gamma(atan((ANom - aNom) / LNom));
1699 const double beta(atan((BNom - bNom) / LNom));
1700 const double sinbeta(
sin(
beta));
1703 const double alfClr(90_deg + atan((bNom - aNom) / (hNom + sClr)));
1705 const EcalTrap trapClr(0.5 * (ANom + sClr + rClr * singamma),
1706 0.5 * (aNom + sClr - fClr * singamma),
1707 0.5 * (bNom + sClr - fClr * sinbeta),
1708 0.5 * (HNom + sClr + rClr * sindelta),
1709 0.5 * (hNom + sClr - fClr * sindelta),
1710 0.5 * (LNom + fClr + rClr),
1716 const string clrDDName(cry.clrName + sType);
1717 Solid clrSolid = mytrap(clrDDName, trapClr);
1721 const double alfWrap(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap)));
1723 const EcalTrap trapWrap(0.5 * (trapClr.
A() + 2. * sWrap + rWrap * singamma),
1724 0.5 * (trapClr.
a() + 2. * sWrap - fWrap * singamma),
1725 0.5 * (trapClr.
b() + 2. * sWrap - fWrap * sinbeta),
1726 0.5 * (trapClr.
H() + 2. * sWrap + rWrap * sindelta),
1727 0.5 * (trapClr.
h() + 2. * sWrap - fWrap * sindelta),
1728 0.5 * (trapClr.
L() + fWrap + rWrap),
1730 aNom - ANom - (cryType > 9 ? 0 : 0.020 * dd4hep::mm),
1734 const string wrapDDName(cry.wrapName + sType);
1735 Solid wrapSolid = mytrap(wrapDDName, trapWrap);
1740 const double alfWall(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap + 2. * sWall)));
1742 const EcalTrap trapWall(0.5 * (trapWrap.A() + 2 * sWall + rWall * singamma),
1743 0.5 * (trapWrap.a() + 2 * sWall - fWall * singamma),
1744 0.5 * (trapWrap.b() + 2 * sWall - fWall * sinbeta),
1745 0.5 * (trapWrap.H() + 2 * sWall + rWall * sindelta),
1746 0.5 * (trapWrap.h() + 2 * sWall - fWall * sindelta),
1747 0.5 * (trapWrap.L() + fWall + rWall),
1749 aNom - ANom - (cryType < 10 ? 0.150 * dd4hep::mm : 0.100 * dd4hep::mm),
1753 const string wallDDName(cry.wallName + sType);
1754 Solid wallSolid = mytrap(wallDDName, trapWall);
1758 const Vec3 cryToClr(0., 0., 0.5 * (rClr - fClr));
1759 clrLog.placeVolume(cryLog, copyOne,
Position(0, 0, 0.5 * (rClr - fClr)));
1761 edm::LogVerbatim(
"EBGeomX") << cryLog.name() <<
":" << copyOne <<
" positioned in " << clrLog.name()
1762 <<
" at (0,0," <<
cms::convert2mm(0.5 * (rClr - fClr)) <<
") with no rotation";
1764 if (0 !=
cap.here) {
1765 bsiLog.placeVolume(aglLog, copyAGL,
Position(0, 0, -0.5 * apd.aglThick + bSi.thickHalf));
1767 edm::LogVerbatim(
"EBGeomX") << aglLog.name() <<
":" << copyAGL <<
" positioned in " << bsiLog.name()
1768 <<
" at (0,0," <<
cms::convert2mm(-0.5 * apd.aglThick + bSi.thickHalf)
1769 <<
") with no rotation";
1771 bsiLog.placeVolume(andLog, copyAND,
Position(0, 0, -0.5 * apd.andThick - apd.aglThick + bSi.thickHalf));
1773 edm::LogVerbatim(
"EBGeomX") << andLog.name() <<
":" << copyAND <<
" positioned in " << bsiLog.name()
1775 <<
cms::convert2mm(-0.5 * apd.andThick - apd.aglThick + bSi.thickHalf)
1776 <<
") with no rotation";
1779 apdLog, copyAPD,
Position(0, 0, -0.5 * apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf));
1781 edm::LogVerbatim(
"EBGeomX") << apdLog.name() <<
":" << copyAPD <<
" positioned in " << bsiLog.name()
1783 <<
cms::convert2mm(-0.5 * apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf)
1784 <<
") with no rotation";
1786 bsiLog.placeVolume(atjLog,
1788 Position(0, 0, -apd.atjThickHalf - apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf));
1790 edm::LogVerbatim(
"EBGeomX") << atjLog.name() <<
":" << copyATJ <<
" positioned in " << bsiLog.name()
1792 <<
cms::convert2mm(-apd.atjThickHalf - apd.thick - apd.andThick - apd.aglThick +
1794 <<
") with no rotation";
1796 cerLog.placeVolume(bsiLog, copyBSi,
Position(0, 0, -bSi.thickHalf + cer.thickHalf));
1798 edm::LogVerbatim(
"EBGeomX") << bsiLog.name() <<
":" << copyBSi <<
" positioned in " << cerLog.name()
1800 <<
") with no rotation";
1802 capLog.placeVolume(sglLog, copySGL,
Position(0, 0, -0.5 * apd.sglThick +
cap.thickHalf));
1804 edm::LogVerbatim(
"EBGeomX") << sglLog.name() <<
":" << copySGL <<
" positioned in " << capLog.name()
1806 <<
") with no rotation";
1809 for (
unsigned int ijkl(0); ijkl != 2; ++ijkl) {
1810 capLog.placeVolume(cerLog,
1812 Position(trapCry.
bl1() - (0 == ijkl ? apd.x1 : apd.x2),
1813 trapCry.
h1() - apd.z,
1814 -apd.sglThick - cer.thickHalf +
cap.thickHalf));
1816 edm::LogVerbatim(
"EBGeomX") << cerLog.name() <<
":" << copyCER <<
" positioned in " << capLog.name()
1820 <<
") with no rotation";
1823 clrLog.placeVolume(capLog, copyCap,
Position(0, 0, -trapCry.
dz() -
cap.thickHalf + 0.5 * (rClr - fClr)));
1825 edm::LogVerbatim(
"EBGeomX") << capLog.name() <<
":" << copyCap <<
" positioned in " << clrLog.name()
1828 <<
") with no rotation";
1832 const Vec3 clrToWrap(0, 0, 0.5 * (rWrap - fWrap));
1833 wrapLog.placeVolume(clrLog, copyOne,
Position(0, 0, 0.5 * (rWrap - fWrap)));
1835 edm::LogVerbatim(
"EBGeomX") << clrLog.name() <<
":" << copyOne <<
" positioned in " << wrapLog.name()
1836 <<
" at (0,0," <<
cms::convert2mm(0.5 * (rWrap - fWrap)) <<
") with no rotation";
1840 const Vec3 wrapToWall1(0, 0, 0.5 * (rWall - fWall));
1841 const Vec3 wrapToWall(
Vec3((cryType > 9 ? 0 : 0.005 * dd4hep::mm), 0, 0) + wrapToWall1);
1842 wallLog.placeVolume(
1845 Position(
Vec3((cryType > 9 ? 0 : 0.005 * dd4hep::mm), 0, 0) + wrapToWall1));
1847 edm::LogVerbatim(
"EBGeomX") << wrapLog.name() <<
":" << copyOne <<
" positioned in " << wallLog.name() <<
" at (" 1855 const double sidePrime(0.5 * (trapWall.a() - trapCry.
a()));
1856 const double frontPrime(fWall + fWrap + fClr + 0.5 * LUnd);
1862 const unsigned int iWeb(0);
1864 const unsigned int copyOne(1);
1865 const double LWebx(
web.vecWebLength[iWeb]);
1866 const double BWebx(trapWall.b() + (trapWall.B() - trapWall.b()) * LWebx / trapWall.L());
1868 const double thick(
web.vecWebPlTh[iWeb] +
web.vecWebClrTh[iWeb]);
1869 const EcalTrap trapWebClr(0.5 * BWebx,
1876 trapWall.b() - BWebx,
1880 Solid webClrSolid = mytrap(webClrName, trapWebClr);
1883 const EcalTrap trapWebPl(0.5 * trapWebClr.A(),
1884 0.5 * trapWebClr.a(),
1885 0.5 * trapWebClr.b(),
1886 0.5 *
web.vecWebPlTh[iWeb],
1887 0.5 *
web.vecWebPlTh[iWeb],
1888 0.5 * trapWebClr.L(),
1890 trapWebClr.b() - trapWebClr.B(),
1894 Solid webPlSolid = mytrap(webPlName, trapWebPl);
1897 webClrLog.placeVolume(webPlLog, copyOne);
1899 edm::LogVerbatim(
"EBGeomX") << webPlLog.name() <<
":" << copyOne <<
" positioned in " << webClrName
1900 <<
" at (0,0,0) with no rotation";
1904 zee += trapWebClr.h() /
sin(
theta);
1908 const double zWeb(zee - frontPrime *
cos(
beta) + sidePrime *
sin(
beta));
1909 const double yWeb(frontPrime *
sin(
beta) + sidePrime *
cos(
beta));
1913 const Pt3D wedge1(wedge3 +
Pt3D(trapWebClr.a(), 0, 0));
1915 edm::LogVerbatim(
"EcalGeom") <<
"trap1=" << vWeb[0] <<
", trap2=" << vWeb[2] <<
", trap3=" << vWeb[3];
1916 edm::LogVerbatim(
"EcalGeom") <<
"wedge1=" << wedge1 <<
", wedge2=" << wedge2 <<
", wedge3=" << wedge3;
1918 const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
1920 if (0 !=
web.here) {
1921 hawRLog.placeVolume(
1925 myrot(ns, webClrName +
std::to_string(iWeb), tForm.getRotation()),
1926 Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1928 edm::LogVerbatim(
"EBGeomX") << webClrLog.name() <<
":" << copyOne <<
" positioned in " << hawRLog.name()
1934 zee += alv.vecGapAlvEta[0];
1937 for (
unsigned int etaAlv(1); etaAlv <= alv.nCryPerAlvEta; ++etaAlv) {
1940 <<
", frontPrime=" << frontPrime <<
", zeta=" << zeta <<
", delta=" <<
delta 1944 zee += 0.075 * dd4hep::mm + (side *
cos(zeta) + trapWall.h() - sidePrime) /
sin(
theta);
1948 const Pt3D trap2(vCry[2] + cryToClr + clrToWrap + wrapToWall);
1950 const Pt3D trap3(trap2 +
Pt3D(0, -trapCry.
h(), 0));
1951 const Pt3D trap1(trap3 +
Pt3D(-trapCry.
a(), 0, 0));
1953 const Pt3D wedge3(vHAW[4] +
Pt3D(sidePrime, alvWedge.hawYOffCry, zee));
1955 const Pt3D wedge1(wedge3 +
Pt3D(trapCry.
a(), 0, 0));
1957 const Tf3D tForm1(trap1, trap2, trap3, wedge1, wedge2, wedge3);
1959 const double xx(0.050 * dd4hep::mm);
1961 const Tf3D tForm(HepGeom::Translate3D(
xx, 0, 0) * tForm1);
1962 hawRLog.placeVolume(
1965 Transform3D(myrot(ns, wallDDName +
"_" +
std::to_string(etaAlv), tForm.getRotation()),
1966 Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1968 edm::LogVerbatim(
"EBGeomX") << wallLog.name() <<
":" << etaAlv <<
" positioned in " << hawRLog.name() <<
" at (" 1977 if (5 == cryType || 9 == cryType || 13 == cryType || 17 == cryType) {
1978 zee += 0.5 * alv.vecGapAlvEta[cryType] /
sin(
theta);
1980 const unsigned int iWeb(cryType / 4);
1982 const unsigned int copyOne(1);
1983 const double LWebx(
web.vecWebLength[iWeb]);
1984 const double BWebx(trapWall.a() + (trapWall.A() - trapWall.a()) * LWebx / trapWall.L());
1986 const double thick(
web.vecWebPlTh[iWeb] +
web.vecWebClrTh[iWeb]);
1987 const EcalTrap trapWebClr(0.5 * BWebx,
1994 trapWall.a() - BWebx,
1998 Solid webClrSolid = mytrap(webClrName, trapWebClr);
2001 const EcalTrap trapWebPl(0.5 * trapWebClr.A(),
2002 0.5 * trapWebClr.a(),
2003 0.5 * trapWebClr.b(),
2004 0.5 *
web.vecWebPlTh[iWeb],
2005 0.5 *
web.vecWebPlTh[iWeb],
2006 0.5 * trapWebClr.L(),
2008 trapWebClr.b() - trapWebClr.B(),
2012 Solid webPlSolid = mytrap(webPlName, trapWebPl);
2015 webClrLog.placeVolume(webPlLog, copyOne);
2017 edm::LogVerbatim(
"EBGeomX") << webPlLog.name() <<
":" << copyOne <<
" positioned in " << webClrName
2018 <<
" at (0,0,0) with no rotation";
2022 zee += trapWebClr.h() /
sin(
theta);
2026 const double zWeb(zee - frontPrime *
cos(
beta) + sidePrime *
sin(
beta));
2027 const double yWeb(frontPrime *
sin(
beta) + sidePrime *
cos(
beta));
2031 const Pt3D wedge1(wedge3 +
Pt3D(trapWebClr.a(), 0, 0));
2033 edm::LogVerbatim(
"EcalGeom") <<
"trap1=" << vWeb[0] <<
", trap2=" << vWeb[2] <<
", trap3=" << vWeb[3];
2034 edm::LogVerbatim(
"EcalGeom") <<
"wedge1=" << wedge1 <<
", wedge2=" << wedge2 <<
", wedge3=" << wedge3;
2036 const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
2038 if (0 !=
web.here) {
2039 hawRLog.placeVolume(
2043 myrot(ns, webClrName +
std::to_string(iWeb), tForm.getRotation()),
2044 Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
2046 edm::LogVerbatim(
"EBGeomX") << webClrLog.name() <<
":" << copyOne <<
" positioned in " << hawRLog.name()
2053 zee += 0.5 * alv.vecGapAlvEta[cryType] /
sin(
theta);
2056 zee += alv.vecGapAlvEta[cryType] /
sin(
theta);
2071 if (0 != back.here) {
2078 const Position outtra(back.xOff + 0.5 * back.sideHeight, back.yOff, 0.5 * back.sideLength);
2080 const double realBPthick(back.plateThick + back.plate2Thick);
2081 array<double, 3> backPlateParms{{0.5 * back.plateWidth, 0.5 * realBPthick, 0.5 * back.plateLength}};
2082 Solid backPlateSolid = Box(back.plateName, backPlateParms[0], backPlateParms[1], backPlateParms[2]);
2090 0.5 * back.sideHeight + backPlateParms[1], 0, backPlateParms[2] - 0.5 * back.sideLength);
2092 Solid backPlate2Solid =
2093 Box(back.plate2Name, 0.5 * back.plateWidth, 0.5 * back.plate2Thick, 0.5 * back.plateLength);
2101 const Position backPlate2Tra(0, -backPlateParms[1] + back.plate2Thick / 2., 0);
2102 if (0 != back.plateHere) {
2103 backPlateLog.placeVolume(backPlate2Log, copyOne, Transform3D(backPlate2Tra));
2105 edm::LogVerbatim(
"EBGeomX") << backPlate2Log.name() <<
":" << copyOne <<
" positioned in " 2106 << backPlateLog.name() <<
" at (" <<
cms::convert2mm(backPlate2Tra.x()) <<
"," 2108 <<
") with no rotation";
2113 Transform3D(myrot(ns, back.plateName +
"Rot5", CLHEP::HepRotationZ(270_deg)), outtra + backPlateTra));
2115 edm::LogVerbatim(
"EBGeomX") << backPlateLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name()
2133 const EcalTrap trapBS(back.sideWidth / 2.,
2134 back.sideWidth / 2.,
2135 back.sideWidth / 4.,
2136 back.sideHeight / 2.,
2137 back.sideHeight / 2.,
2138 back.sideLength / 2.,
2144 Solid backSideSolid = mytrap(back.sideName, trapBS);
2147 const Position backSideTra1(0, back.plateWidth / 2 + back.sideYOff1, 1 * dd4hep::mm);
2148 if (0 != back.sideHere) {
2152 Transform3D(myrot(ns, back.sideName +
"Rot8", CLHEP::HepRotationX(180_deg) * CLHEP::HepRotationZ(90_deg)),
2153 outtra + backSideTra1));
2155 edm::LogVerbatim(
"EBGeomX") << backSideLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name()
2160 const Position backSideTra2(0, -back.plateWidth / 2 + back.sideYOff2, 1 * dd4hep::mm);
2164 Transform3D(myrot(ns, back.sideName +
"Rot9", CLHEP::HepRotationZ(90_deg)), outtra + backSideTra2));
2166 edm::LogVerbatim(
"EBGeomX") << backSideLog.name() <<
":" << copyTwo <<
" positioned in " << spmLog.name()
2179 const double backCoolWidth(backCool.barWidth + 2. * backCoolTank.width);
2187 const double manifCut(2 * dd4hep::mm);
2189 Solid mBManifSolid = Tube(0, mbManif.outDiam / 2, backCoolWidth / 2. - manifCut, 0_deg, 360_deg);
2196 const string mBManifWaName(mbManif.name +
"Wa");
2197 Solid mBManifWaSolid = Tube(0, mbManif.innDiam / 2, backCoolWidth / 2. - manifCut, 0_deg, 360_deg);
2202 Volume mBManifWaLog(mBManifWaName, mBManifWaSolid, ns.
material(backPipe.waterMat));
2203 mBManifLog.placeVolume(mBManifWaLog, copyOne);
2205 edm::LogVerbatim(
"EBGeomX") << mBManifWaLog.name() <<
":" << copyOne <<
" positioned in " << mBManifLog.name()
2206 <<
" at (0,0,0) with no rotation";
2221 const double deltaY(-5 * dd4hep::mm);
2223 Solid grEdgeSlotSolid =
2224 Box(grille.edgeSlotName, grille.edgeSlotHeight / 2., grille.edgeSlotWidth / 2., grille.thick / 2.);
2230 Volume grEdgeSlotLog =
Volume(grille.edgeSlotName, grEdgeSlotSolid, ns.
material(grille.edgeSlotMat));
2232 unsigned int edgeSlotCopy(0);
2233 unsigned int midSlotCopy(0);
2237 for (
unsigned int iGr(0); iGr != grille.vecHeight.size(); ++iGr) {
2239 Solid grilleSolid = Box(gName, grille.vecHeight[iGr] / 2., backCoolWidth / 2., grille.thick / 2.);
2246 const Position grilleTra(-realBPthick / 2 - grille.vecHeight[iGr] / 2,
2248 grille.vecZOff[iGr] + grille.thick / 2 - back.sideLength / 2);
2249 const Position gTra(outtra + backPlateTra + grilleTra);
2251 if (0 != grille.midSlotHere && 0 != iGr) {
2252 if (0 == (iGr - 1) % 2) {
2254 Solid grMidSlotSolid =
2255 Box(mName, grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., grille.midSlotWidth / 2., grille.thick / 2.);
2258 <<
cms::convert2mm(grille.vecMidSlotHeight[(iGr - 1) / 2] / 2.) <<
":" 2262 grMidSlotLog[(iGr - 1) / 2] =
Volume(mName, grMidSlotSolid, ns.
material(grille.midSlotMat));
2264 grilleLog.placeVolume(
2265 grMidSlotLog[(iGr - 1) / 2],
2268 grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., +grille.midSlotXOff, 0)));
2270 edm::LogVerbatim(
"EBGeomX") << grMidSlotLog[(iGr - 1) / 2].
name() <<
":" << midSlotCopy <<
" positioned in " 2271 << grilleLog.name() <<
" at (" 2273 grille.vecMidSlotHeight[(iGr - 1) / 2] / 2.)
2274 <<
"," <<
cms::convert2mm(grille.midSlotXOff) <<
",0) with no rotation";
2276 grilleLog.placeVolume(
2277 grMidSlotLog[(iGr - 1) / 2],
2280 grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., -grille.midSlotXOff, 0)));
2282 edm::LogVerbatim(
"EBGeomX") << grMidSlotLog[(iGr - 1) / 2].
name() <<
":" << midSlotCopy <<
" positioned in " 2283 << grilleLog.name() <<
" at (" 2285 grille.vecMidSlotHeight[(iGr - 1) / 2] / 2.)
2286 <<
"," <<
cms::convert2mm(-grille.midSlotXOff) <<
",0) with no rotation";
2290 if (0 != grille.edgeSlotHere && 0 != iGr) {
2291 grilleLog.placeVolume(grEdgeSlotLog,
2293 Transform3D(
Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.,
2294 backCoolWidth / 2 - grille.edgeSlotWidth / 2.,
2297 edm::LogVerbatim(
"EBGeomX") << grEdgeSlotLog.name() <<
":" << edgeSlotCopy <<
" positioned in " 2298 << grilleLog.name() <<
" at (" 2299 <<
cms::convert2mm(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.) <<
"," 2301 <<
",0) with no rotation";
2303 grilleLog.placeVolume(grEdgeSlotLog,
2305 Transform3D(
Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.,
2306 -backCoolWidth / 2 + grille.edgeSlotWidth / 2.,
2309 edm::LogVerbatim(
"EBGeomX") << grEdgeSlotLog.name() <<
":" << edgeSlotCopy <<
" positioned in " 2310 << grilleLog.name() <<
" at (" 2311 <<
cms::convert2mm(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.) <<
"," 2313 <<
",0) with no rotation";
2316 if (0 != grille.here) {
2317 spmLog.placeVolume(grilleLog, iGr, Transform3D(gTra));
2319 edm::LogVerbatim(
"EBGeomX") << grilleLog.name() <<
":" << iGr <<
" positioned in " << spmLog.name() <<
" at (" 2325 if ((0 != iGr % 2) && (0 != mbManif.here)) {
2326 spmLog.placeVolume(mBManifLog,
2328 Transform3D(myrot(ns, mbManif.name +
"R1", CLHEP::HepRotationX(90_deg)),
2329 gTra -
Position(-mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2.,
2331 grille.thick / 2. + 3 * mbManif.outDiam / 2.)));
2333 edm::LogVerbatim(
"EBGeomX") << mBManifLog.name() <<
":" << iGr <<
" positioned in " << spmLog.name()
2335 <<
cms::convert2mm(gTra.x() + mbManif.outDiam / 2. - grille.vecHeight[iGr] / 2.)
2337 <<
cms::convert2mm(gTra.z() - grille.thick / 2. - 3 * mbManif.outDiam / 2.)
2338 <<
") with rotation";
2340 spmLog.placeVolume(mBManifLog,
2342 Transform3D(myrot(ns, mbManif.name +
"R2", CLHEP::HepRotationX(90_deg)),
2343 gTra -
Position(-3 * mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2.,
2345 grille.thick / 2 + 3 * mbManif.outDiam / 2.)));
2347 edm::LogVerbatim(
"EBGeomX") << mBManifLog.name() <<
":" << (iGr - 1) <<
" positioned in " << spmLog.name()
2350 grille.vecHeight[iGr] / 2.)
2352 <<
cms::convert2mm(gTra.z() - grille.thick / 2 - 3 * mbManif.outDiam / 2.)
2353 <<
") with rotation";
2370 Solid backCoolBarSolid =
2371 Box(backCool.barName, backCool.barHeight / 2., backCool.barWidth / 2., backCool.barThick / 2.);
2377 Volume backCoolBarLog =
Volume(backCool.barName, backCoolBarSolid, ns.
material(backCool.barMat));
2379 Solid backCoolBarSSSolid =
2380 Box(backCool.barSSName, backCool.barHeight / 2., backCool.barWidth / 2., backCool.barSSThick / 2.);
2386 Volume backCoolBarSSLog =
Volume(backCool.barSSName, backCoolBarSSSolid, ns.
material(backCool.barSSMat));
2387 const Position backCoolBarSSTra(0, 0, 0);
2388 backCoolBarLog.placeVolume(backCoolBarSSLog, copyOne, Transform3D(backCoolBarSSTra));
2390 edm::LogVerbatim(
"EBGeomX") << backCoolBarSSLog.name() <<
":" << copyOne <<
" positioned in " 2391 << backCoolBarLog.name() <<
" at (" <<
cms::convert2mm(backCoolBarSSTra.x()) <<
"," 2396 Solid backCoolBarWaSolid =
2397 Box(backCool.barWaName, backCool.barHeight / 2., backCool.barWidth / 2., backCool.barWaThick / 2.);
2403 Volume backCoolBarWaLog =
Volume(backCool.barWaName, backCoolBarWaSolid, ns.
material(backCool.barWaMat));
2404 const Position backCoolBarWaTra(0, 0, 0);
2405 backCoolBarSSLog.placeVolume(backCoolBarWaLog, copyOne, Transform3D(backCoolBarWaTra));
2407 edm::LogVerbatim(
"EBGeomX") << backCoolBarWaLog.name() <<
":" << copyOne <<
" positioned in " 2408 << backCoolBarSSLog.name() <<
" at (" <<
cms::convert2mm(backCoolBarWaTra.x()) <<
"," 2426 for (
unsigned int iLyr(0); iLyr != backCool.vecBackVFELyrThick.size(); ++iLyr) {
2427 thickVFE += backCool.vecBackVFELyrThick[iLyr];
2429 Solid backVFESolid =
2430 Box((myns + backCool.backVFEName), backCool.barHeight / 2., backCool.barWidth / 2., thickVFE / 2.);
2438 Position offTra(0, 0, -thickVFE / 2);
2439 for (
unsigned int iLyr(0); iLyr != backCool.vecBackVFELyrThick.size(); ++iLyr) {
2440 Solid backVFELyrSolid = Box(backCool.vecBackVFELyrName[iLyr],
2441 backCool.barHeight / 2.,
2442 backCool.barWidth / 2.,
2443 backCool.vecBackVFELyrThick[iLyr] / 2.);
2451 Volume(backCool.vecBackVFELyrName[iLyr], backVFELyrSolid, ns.
material(backCool.vecBackVFELyrMat[iLyr]));
2452 const Position backVFELyrTra(0, 0, backCool.vecBackVFELyrThick[iLyr] / 2);
2453 backVFELog.placeVolume(backVFELyrLog, copyOne, Transform3D(backVFELyrTra + offTra));
2455 edm::LogVerbatim(
"EBGeomX") << backVFELyrLog.name() <<
":" << copyOne <<
" positioned in " << backVFELog.name()
2458 <<
cms::convert2mm((backVFELyrTra + offTra).z()) <<
") with no rotation";
2460 offTra += 2 * backVFELyrTra;
2475 const double halfZCoolVFE(thickVFE + backCool.barThick / 2.);
2476 Solid backCoolVFESolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., halfZCoolVFE);
2482 if (0 != backCool.barHere) {
2483 backCoolVFELog.placeVolume(backCoolBarLog, copyOne, Transform3D());
2485 edm::LogVerbatim(
"EBGeomX") << backCoolBarLog.name() <<
":" << copyOne <<
" positioned in " 2486 << backCoolVFELog.name() <<
" at (0,0,0) with no rotation";
2489 if (0 != backCool.vFEHere) {
2490 backCoolVFELog.placeVolume(
2491 backVFELog, copyOne, Transform3D(
Position(0, 0, backCool.barThick / 2. + thickVFE / 2.)));
2493 edm::LogVerbatim(
"EBGeomX") << backVFELog.name() <<
":" << copyOne <<
" positioned in " << backCoolVFELog.name()
2494 <<
" at (0,0," <<
cms::convert2mm(backCool.barThick / 2. + thickVFE / 2.)
2495 <<
") with no rotation";
2498 backCoolVFELog.placeVolume(backVFELog,
2500 Transform3D(myrot(ns, backCool.vFEName +
"Flip", CLHEP::HepRotationX(180_deg)),
2501 Position(0, 0, -backCool.barThick / 2. - thickVFE / 2.)));
2503 edm::LogVerbatim(
"EBGeomX") << backVFELog.name() <<
":" << copyTwo <<
" positioned in " << backCoolVFELog.name()
2504 <<
" at (0,0," <<
cms::convert2mm(-backCool.barThick / 2. - thickVFE / 2.)
2505 <<
") with rotation";
2519 unsigned int iCVFECopy(1);
2520 unsigned int iSep(0);
2521 unsigned int iNSec(0);
2522 const unsigned int nMisc(backMisc.vecThick.size() / 4);
2523 for (
unsigned int iMod(0); iMod != 4; ++iMod) {
2524 const double pipeLength(grille.vecZOff[2 * iMod + 1] - grille.vecZOff[2 * iMod] - grille.thick -
2526 const double pipeZPos(grille.vecZOff[2 * iMod + 1] - pipeLength / 2 - 1.5 * dd4hep::mm);
2529 double backCoolHeight(backCool.barHeight + mbCoolTube.outDiam);
2530 for (
unsigned int iMisc(0); iMisc != nMisc; ++iMisc) {
2531 backCoolHeight += backMisc.vecThick[iMod * nMisc + iMisc];
2533 double bottomThick(mbCoolTube.outDiam);
2534 for (
unsigned int iMB(0); iMB != mbLyr.vecMBLyrThick.size(); ++iMB) {
2535 backCoolHeight += mbLyr.vecMBLyrThick[iMB];
2536 bottomThick += mbLyr.vecMBLyrThick[iMB];
2539 const double halfZBCool((pipeLength - 2 * mbManif.outDiam - grille.zSpace) / 2);
2540 Solid backCoolSolid = Box(backCool.vecName[iMod], backCoolHeight / 2., backCoolWidth / 2., halfZBCool);
2548 -realBPthick / 2 + backCoolHeight / 2 - grille.vecHeight[2 * iMod],
2550 grille.vecZOff[2 * iMod] + grille.thick + grille.zSpace + halfZBCool - back.sideLength / 2);
2551 if (0 != backCool.here) {
2552 spmLog.placeVolume(backCoolLog, iMod + 1, outtra + backPlateTra + bCoolTra);
2554 edm::LogVerbatim(
"EBGeomX") << backCoolLog.name() <<
":" << (iMod + 1) <<
" positioned in " << spmLog.name()
2555 <<
" at (" <<
cms::convert2mm((outtra + backPlateTra + bCoolTra).
x()) <<
"," 2558 <<
") with no rotation";
2563 const double backCoolTankHeight(backCool.barHeight);
2564 const double halfZTank(halfZBCool - 5 * dd4hep::cm);
2567 Solid backCoolTankSolid = Box(bTankName, backCoolTankHeight / 2., backCoolTank.width / 2., halfZTank);
2573 if (0 != backCoolTank.here) {
2574 backCoolLog.placeVolume(backCoolTankLog,
2576 Transform3D(Rotation3D(),
2577 Position(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick,
2578 backCool.barWidth / 2. + backCoolTank.width / 2.,
2581 edm::LogVerbatim(
"EBGeomX") << backCoolTankLog.name() <<
":" << copyOne <<
" positioned in " 2582 << backCoolLog.name() <<
" at (" 2583 <<
cms::convert2mm(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick)
2584 <<
"," <<
cms::convert2mm(backCool.barWidth / 2. + backCoolTank.width / 2.)
2585 <<
",0) with no rotation";
2589 string bTankWaName(backCoolTank.waName +
std::to_string(iMod + 1));
2590 Solid backCoolTankWaSolid = Box(bTankWaName,
2591 backCoolTankHeight / 2. - backCoolTank.thick / 2.,
2592 backCoolTank.waWidth / 2.,
2593 halfZTank - backCoolTank.thick / 2.);
2596 <<
cms::convert2mm(backCoolTankHeight / 2. - backCoolTank.thick / 2.) <<
":" 2600 Volume backCoolTankWaLog =
Volume(bTankWaName, backCoolTankWaSolid, ns.
material(backCoolTank.waMat));
2601 backCoolTankLog.placeVolume(backCoolTankWaLog, copyOne, Transform3D(Rotation3D(),
Position(0, 0, 0)));
2603 edm::LogVerbatim(
"EBGeomX") << backCoolTankWaLog.name() <<
":" << copyOne <<
" positioned in " 2604 << backCoolTankLog.name() <<
" at (0,0,0) with no rotation";
2607 string bBracketName(backCoolTank.backBracketName +
std::to_string(iMod + 1));
2608 Solid backBracketSolid =
2609 Box(bBracketName, backCoolTank.backBracketHeight / 2., backCoolTank.width / 2., halfZTank);
2615 Volume backBracketLog =
Volume(bBracketName, backBracketSolid, ns.
material(backCoolTank.backBracketMat));
2616 if (0 != backCoolTank.here) {
2617 backCoolLog.placeVolume(backBracketLog,
2619 Transform3D(Rotation3D(),
2620 Position(backCool.barHeight - backCoolHeight / 2. -
2621 backCoolTank.backBracketHeight / 2. + bottomThick,
2622 -backCool.barWidth / 2. - backCoolTank.width / 2.,
2625 edm::LogVerbatim(
"EBGeomX") << backBracketLog.name() <<
":" << copyOne <<
" positioned in " 2626 << backCoolLog.name() <<
" at (" 2628 backCoolTank.backBracketHeight / 2. + bottomThick)
2629 <<
"," <<
cms::convert2mm(-backCool.barWidth / 2. - backCoolTank.width / 2.)
2630 <<
",0) with no rotation";
2635 Position bSumTra(backCool.barHeight - backCoolHeight / 2. + bottomThick, 0, 0);
2636 for (
unsigned int j(0);
j != nMisc; ++
j) {
2637 Solid bSolid = Box(backMisc.vecName[iMod * nMisc +
j],
2638 backMisc.vecThick[iMod * nMisc +
j] / 2,
2639 backCool.barWidth / 2. + backCoolTank.width,
2644 <<
cms::convert2mm(backCool.barWidth / 2. + backCoolTank.width) <<
":" 2649 Volume(backMisc.vecName[iMod * nMisc +
j], bSolid, ns.
material(backMisc.vecMat[iMod * nMisc +
j]));
2651 const Position bTra(backMisc.vecThick[iMod * nMisc +
j] / 2, 0, 0);
2653 if (0 != backMisc.here) {
2654 backCoolLog.placeVolume(bLog, copyOne, Transform3D(Rotation3D(), bSumTra + bTra));
2656 edm::LogVerbatim(
"EBGeomX") << bLog.name() <<
":" << copyOne <<
" positioned in " << backCoolLog.name()
2663 bSumTra += 2 * bTra;
2666 const double bHalfWidth(backCool.barWidth / 2. + backCoolTank.width);
2668 if (0 != mbLyr.here) {
2669 Position mTra(-backCoolHeight / 2. + mbCoolTube.outDiam, 0, 0);
2670 for (
unsigned int j(0);
j != mbLyr.vecMBLyrThick.size(); ++
j)
2672 Solid mSolid = Box(mbLyr.vecMBLyrThick[
j] / 2, bHalfWidth, halfZBCool);
2681 mTra +=
Position(mbLyr.vecMBLyrThick[
j] / 2.0, 0, 0);
2682 backCoolLog.placeVolume(mLog, copyOne, Transform3D(Rotation3D(), mTra));
2684 edm::LogVerbatim(
"EBGeomX") << mLog.name() <<
":" << copyOne <<
" positioned in " << backCoolLog.name()
2688 mTra +=
Position(mbLyr.vecMBLyrThick[
j] / 2.0, 0, 0);
2692 if (0 != mbCoolTube.here) {
2693 const string mBName(mbCoolTube.name +
"_" +
std::to_string(iMod + 1));
2695 Solid mBCoolTubeSolid = Tube(0, mbCoolTube.outDiam / 2, halfZBCool, 0_deg, 360_deg);
2702 const string mBWaName(mbCoolTube.name +
"Wa_" +
std::to_string(iMod + 1));
2703 Solid mBCoolTubeWaSolid = Tube(mBWaName, 0, mbCoolTube.innDiam / 2, halfZBCool, 0_deg, 360_deg);
2709 mBLog.placeVolume(mBWaLog, copyOne);
2711 edm::LogVerbatim(
"EBGeomX") << mBWaLog.name() <<
":" << copyOne <<
" positioned in " << mBLog.name()
2712 <<
" at (0,0,0) with no rotation";
2715 for (
unsigned int j(0);
j != dryAirTube.mbCoolTubeNum; ++
j)
2717 backCoolLog.placeVolume(mBLog,
2719 Transform3D(Rotation3D(),
2720 Position(-backCoolHeight / 2.0 + mbCoolTube.outDiam / 2.,
2721 -bHalfWidth + (
j + 1) * bHalfWidth / 5,
2724 edm::LogVerbatim(
"EBGeomX") << mBLog.name() <<
":" << (2 *
j + 1) <<
" positioned in " << backCoolLog.name()
2725 <<
" at (" <<
cms::convert2mm(-backCoolHeight / 2.0 + mbCoolTube.outDiam / 2.)
2727 <<
",0) with no rotation";
2737 if (0 != backPipe.here && 0 != iMod) {
2738 string bPipeName(backPipe.name +
"_" +
std::to_string(iMod + 1));
2739 string bInnerName(backPipe.name +
"_H2O_" +
std::to_string(iMod + 1));
2741 Solid backPipeSolid = Tube(bPipeName, 0, backPipe.vecDiam[iMod] / 2, pipeLength / 2, 0_deg, 360_deg);
2742 Solid backInnerSolid =
2743 Tube(bInnerName, 0, backPipe.vecDiam[iMod] / 2 - backPipe.vecThick[iMod], pipeLength / 2, 0_deg, 360_deg);
2748 <<
":0:" <<
cms::convert2mm(backPipe.vecDiam[iMod] / 2 - backPipe.vecThick[iMod])
2755 const Position bPipeTra1(back.xOff + back.sideHeight - 0.7 * backPipe.vecDiam[iMod],
2756 back.yOff + back.plateWidth / 2 - back.sideWidth - 0.7 * backPipe.vecDiam[iMod],
2759 spmLog.placeVolume(backPipeLog, copyOne, Transform3D(Rotation3D(), bPipeTra1));
2761 edm::LogVerbatim(
"EBGeomX") << backPipeLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name()
2764 <<
") with no rotation";
2767 bPipeTra1.x(), back.yOff - back.plateWidth / 2 + back.sideWidth + backPipe.vecDiam[iMod], bPipeTra1.z());
2769 spmLog.placeVolume(backPipeLog, copyTwo, Transform3D(Rotation3D(), bPipeTra2));
2771 edm::LogVerbatim(
"EBGeomX") << backPipeLog.name() <<
":" << copyTwo <<
" positioned in " << spmLog.name()
2774 <<
") with no rotation";
2777 backPipeLog.placeVolume(backInnerLog, copyOne, Transform3D(Rotation3D(),
Position()));
2779 edm::LogVerbatim(
"EBGeomX") << backInnerLog.name() <<
":" << copyOne <<
" positioned in " 2780 << backPipeLog.name() <<
" at (0,0,0) with no rotation";
2791 if (0 != dryAirTube.here) {
2792 string dryAirTubName(dryAirTube.name +
std::to_string(iMod + 1));
2794 Solid dryAirTubeSolid =
2795 Tube(dryAirTubName, dryAirTube.innDiam / 2, dryAirTube.outDiam / 2, pipeLength / 2, 0_deg, 360_deg);
2801 Volume dryAirTubeLog =
Volume((myns + dryAirTubName), dryAirTubeSolid, ns.
material(dryAirTube.mat));
2803 const Position dryAirTubeTra1(back.xOff + back.sideHeight - 0.7 * dryAirTube.outDiam - backPipe.vecDiam[iMod],
2804 back.yOff + back.plateWidth / 2 - back.sideWidth - 1.2 * dryAirTube.outDiam,
2807 spmLog.placeVolume(dryAirTubeLog, copyOne, Transform3D(Rotation3D(), dryAirTubeTra1));
2809 edm::LogVerbatim(
"EBGeomX") << dryAirTubeLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name()
2815 const Position dryAirTubeTra2(dryAirTubeTra1.x(),
2816 back.yOff - back.plateWidth / 2 + back.sideWidth + 0.7 * dryAirTube.outDiam,
2817 dryAirTubeTra1.z());
2819 spmLog.placeVolume(dryAirTubeLog, copyTwo, Transform3D(Rotation3D(), dryAirTubeTra2));
2821 edm::LogVerbatim(
"EBGeomX") << dryAirTubeLog.name() <<
":" << copyTwo <<
" positioned in " << spmLog.name()
2835 Position cTra(backCool.barHeight / 2. - backCoolHeight / 2. + bottomThick, 0, -halfZTank + halfZCoolVFE);
2836 const unsigned int numSec(static_cast<unsigned int>(backCool.vecBackCoolNSec[iMod]));
2837 for (
unsigned int jSec(0); jSec != numSec; ++jSec) {
2838 const unsigned int nMax(static_cast<unsigned int>(backCool.vecBackCoolNPerSec[iNSec++]));
2839 for (
unsigned int iBar(0); iBar !=
nMax; ++iBar) {
2840 backCoolLog.placeVolume(backCoolVFELog, iCVFECopy++, cTra);
2842 edm::LogVerbatim(
"EBGeomX") << backCoolVFELog.name() <<
":" << iCVFECopy <<
" positioned in " 2845 <<
") with no rotation";
2847 cTra +=
Position(0, 0, backMisc.backCBStdSep);
2849 cTra -=
Position(0, 0, backMisc.backCBStdSep);
2850 if (jSec != numSec - 1)
2851 cTra +=
Position(0, 0, backCool.vecBackCoolSecSep[iSep++]);
2872 double patchHeight(0);
2873 for (
unsigned int iPatch(0); iPatch != patchPanel.vecThick.size(); ++iPatch) {
2874 patchHeight += patchPanel.vecThick[iPatch];
2877 array<double, 3> patchParms{
2878 {patchHeight / 2., backCool.barWidth / 2., (spm.vecZPts.back() - grille.vecZOff.back() - grille.thick) / 2}};
2879 Solid patchSolid = Box(patchParms[0], patchParms[1], patchParms[2]);
2886 const Position patchTra(back.xOff + 4 * dd4hep::mm, 0, grille.vecZOff.back() + grille.thick + patchParms[2]);
2887 if (0 != patchPanel.here) {
2888 spmLog.placeVolume(patchLog, copyOne, patchTra);
2890 edm::LogVerbatim(
"EBGeomX") << patchLog.name() <<
":" << copyOne <<
" positioned in " << spmLog.name()
2896 Position pTra(-patchParms[0], 0, 0);
2898 for (
unsigned int j(0);
j != patchPanel.vecNames.size(); ++
j) {
2899 Solid pSolid = Box(patchPanel.vecThick[
j] / 2., patchParms[1], patchParms[2]);
2906 pTra +=
Position(patchPanel.vecThick[
j] / 2, 0, 0);
2907 patchLog.placeVolume(pLog, copyOne, pTra);
2909 edm::LogVerbatim(
"EBGeomX") << pLog.name() <<
":" << copyOne <<
" positioned in " << patchLog.name() <<
" at (" 2914 pTra +=
Position(patchPanel.vecThick[
j] / 2, 0, 0);
2928 if (0 != pincer.rodHere) {
2931 Solid rodSolid = Box(pincer.rodName, pincer.envWidthHalf, pincer.envHeightHalf, ilyLengthHalf);
2938 array<double, 3> envParms{{pincer.envWidthHalf, pincer.envHeightHalf, pincer.envLengthHalf}};
2939 Solid envSolid = Box(pincer.envName, envParms[0], envParms[1], envParms[2]);
2946 array<double, 3> blkParms{{pincer.envWidthHalf, pincer.envHeightHalf, pincer.blkLengthHalf}};
2947 Solid blkSolid = Box(pincer.blkName, blkParms[0], blkParms[1], blkParms[2]);
2954 envLog.placeVolume(blkLog, copyOne,
Position(0, 0, pincer.envLengthHalf - pincer.blkLengthHalf));
2956 edm::LogVerbatim(
"EBGeomX") << blkLog.name() <<
":" << copyOne <<
" positioned in " << envLog.name()
2957 <<
" at (0,0," <<
cms::convert2mm(pincer.envLengthHalf - pincer.blkLengthHalf)
2958 <<
") with no rotation";
2961 array<double, 3> cutParms{{pincer.cutWidth / 2., pincer.cutHeight / 2., pincer.blkLengthHalf}};
2962 Solid cutSolid = Box(pincer.cutName, cutParms[0], cutParms[1], cutParms[2]);
2972 +blkParms[0] - cutParms[0] - pincer.shim1Width + pincer.shim2Width, -blkParms[1] + cutParms[1], 0));
2974 edm::LogVerbatim(
"EBGeomX") << cutLog.name() <<
":" << copyOne <<
" positioned in " << blkLog.name() <<
" at (" 2977 <<
"," <<
cms::convert2mm(-blkParms[1] + cutParms[1]) <<
",0) with no rotation";
2979 array<double, 3> shim2Parms{{pincer.shim2Width / 2., pincer.shimHeight / 2., pincer.blkLengthHalf}};
2980 Solid shim2Solid = Box(pincer.shim2Name, shim2Parms[0], shim2Parms[1], shim2Parms[2]);
2986 cutLog.placeVolume(shim2Log, copyOne,
Position(+cutParms[0] - shim2Parms[0], -cutParms[1] + shim2Parms[1], 0));
2988 edm::LogVerbatim(
"EBGeomX") << shim2Log.name() <<
":" << copyOne <<
" positioned in " << cutLog.name()
2990 <<
cms::convert2mm(-cutParms[1] + shim2Parms[1]) <<
",0) with no rotation";
2993 array<double, 3> shim1Parms{
2994 {pincer.shim1Width / 2., pincer.shimHeight / 2., pincer.envLengthHalf - pincer.blkLengthHalf}};
2995 Solid shim1Solid = Box(pincer.shim1Name, shim1Parms[0], shim1Parms[1], shim1Parms[2]);
3004 Position(+envParms[0] - shim1Parms[0], -envParms[1] + shim1Parms[1], -envParms[2] + shim1Parms[2]));
3006 edm::LogVerbatim(
"EBGeomX") << shim1Log.name() <<
":" << copyOne <<
" positioned in " << envLog.name()
3009 <<
cms::convert2mm(-envParms[2] + shim1Parms[2]) <<
") with no rotation";
3012 for (
unsigned int iEnv(0); iEnv != pincer.vecEnvZOff.size(); ++iEnv) {
3014 envLog, 1 + iEnv,
Position(0, 0, -ilyLengthHalf + pincer.vecEnvZOff[iEnv] - pincer.envLengthHalf));
3016 edm::LogVerbatim(
"EBGeomX") << envLog.name() <<
":" << (1 + iEnv) <<
" positioned in " << rodLog.name()
3019 pincer.envLengthHalf)
3020 <<
") with no rotation";
3025 const double radius(ilyRMin - pincer.envHeightHalf - 1 * dd4hep::mm);
3026 const string xilyName(ily.name +
std::to_string(ily.vecIlyMat.size() - 1));
3028 for (
unsigned int iRod(0); iRod != pincer.vecRodAzimuth.size(); ++iRod) {
3030 xilyLog.placeVolume(rodLog,
3032 Transform3D(myrot(ns,
3034 CLHEP::HepRotationZ(90_deg + pincer.vecRodAzimuth[iRod])),
3037 edm::LogVerbatim(
"EBGeomX") << rodLog.name() <<
":" << (1 + iRod) <<
" positioned in " << xilyLog.name()
VertexList vertexList() const
Log< level::Info, true > LogVerbatim
const dd4hep::Rotation3D & rotation(const std::string &name) const
HepGeom::Translate3D Tl3D
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
Sin< T >::type sin(const T &t)
HepGeom::Point3D< double > Pt3D
HepGeom::Transform3D Tf3D
std::string to_string(const V &value)
dd4hep::Material material(const std::string &name) const
static std::string const input
#define DECLARE_DDCMS_DETELEMENT(name, func)
static double delPhi(const double phi1, const double phi2)
void addRotation(const std::string &name, const dd4hep::Rotation3D &rot) const
Cos< T >::type cos(const T &t)
dd4hep::Volume addVolume(dd4hep::Volume vol) const
HepGeom::Translate3D Tl3D
Namespace of DDCMS conversion namespace.
CaloCellGeometry::Pt3D Pt3D
Crystal()=default
Empty constructor.
char data[epos_bytes_allocation]
static std::atomic< unsigned int > counter
math::XYZVector XYZVector
Geom::Theta< T > theta() const
CaloCellGeometry::Pt3DVec VertexList
vector< double > VecDouble
dd4hep::Volume volume(const std::string &name, bool exc=true) const
std::string prepend(const std::string &) const