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!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
483 string myns{mynamespace(
args.parentName()).
data(), mynamespace(
args.parentName()).
size()};
488 bar.name = ns.prepend(
args.str(
"BarName"));
490 bar.vecZPts =
args.vecDble(
"BarZPts");
491 bar.vecRMin =
args.vecDble(
"BarRMin");
492 bar.vecRMax =
args.vecDble(
"BarRMax");
493 bar.vecTran =
args.vecDble(
"BarTran");
494 bar.vecRota =
args.vecDble(
"BarRota");
495 bar.vecRota2 =
args.vecDble(
"BarRota2");
496 bar.vecRota3 =
args.vecDble(
"BarRota3");
497 bar.phiLo =
args.dble(
"BarPhiLo");
498 bar.phiHi =
args.dble(
"BarPhiHi");
499 bar.here =
args.dble(
"BarHere");
503 spm.name = ns.prepend(
args.str(
"SpmName"));
504 spm.mat =
args.str(
"SpmMat");
505 spm.vecZPts =
args.vecDble(
"SpmZPts");
506 spm.vecRMin =
args.vecDble(
"SpmRMin");
507 spm.vecRMax =
args.vecDble(
"SpmRMax");
508 spm.vecTran =
args.vecDble(
"SpmTran");
509 spm.vecRota =
args.vecDble(
"SpmRota");
510 spm.vecBTran =
args.vecDble(
"SpmBTran");
511 spm.vecBRota =
args.vecDble(
"SpmBRota");
512 spm.nPerHalf =
args.integer(
"SpmNPerHalf");
513 spm.lowPhi =
args.dble(
"SpmLowPhi");
514 spm.delPhi =
args.dble(
"SpmDelPhi");
515 spm.phiOff =
args.dble(
"SpmPhiOff");
516 spm.vecHere =
args.vecDble(
"SpmHere");
517 spm.cutName = ns.prepend(
args.str(
"SpmCutName"));
518 spm.cutThick =
args.dble(
"SpmCutThick");
519 spm.cutShow =
args.value<
int>(
"SpmCutShow");
520 spm.vecCutTM =
args.vecDble(
"SpmCutTM");
521 spm.vecCutTP =
args.vecDble(
"SpmCutTP");
522 spm.cutRM =
args.dble(
"SpmCutRM");
523 spm.cutRP =
args.dble(
"SpmCutRP");
524 spm.expThick =
args.dble(
"SpmExpThick");
525 spm.expWide =
args.dble(
"SpmExpWide");
526 spm.expYOff =
args.dble(
"SpmExpYOff");
527 spm.sideName = ns.prepend(
args.str(
"SpmSideName"));
528 spm.sideMat =
args.str(
"SpmSideMat");
529 spm.sideHigh =
args.dble(
"SpmSideHigh");
530 spm.sideThick =
args.dble(
"SpmSideThick");
531 spm.sideYOffM =
args.dble(
"SpmSideYOffM");
532 spm.sideYOffP =
args.dble(
"SpmSideYOffP");
535 cry.nomCryDimAF =
args.dble(
"NomCryDimAF");
536 cry.nomCryDimLZ =
args.dble(
"NomCryDimLZ");
537 cry.vecNomCryDimBF =
args.vecDble(
"NomCryDimBF");
538 cry.vecNomCryDimCF =
args.vecDble(
"NomCryDimCF");
539 cry.vecNomCryDimAR =
args.vecDble(
"NomCryDimAR");
540 cry.vecNomCryDimBR =
args.vecDble(
"NomCryDimBR");
541 cry.vecNomCryDimCR =
args.vecDble(
"NomCryDimCR");
543 cry.underAF =
args.dble(
"UnderAF");
544 cry.underLZ =
args.dble(
"UnderLZ");
545 cry.underBF =
args.dble(
"UnderBF");
546 cry.underCF =
args.dble(
"UnderCF");
547 cry.underAR =
args.dble(
"UnderAR");
548 cry.underBR =
args.dble(
"UnderBR");
549 cry.underCR =
args.dble(
"UnderCR");
552 alv.wallThAlv =
args.dble(
"WallThAlv");
553 alv.wrapThAlv =
args.dble(
"WrapThAlv");
554 alv.clrThAlv =
args.dble(
"ClrThAlv");
555 alv.vecGapAlvEta =
args.vecDble(
"GapAlvEta");
557 alv.wallFrAlv =
args.dble(
"WallFrAlv");
558 alv.wrapFrAlv =
args.dble(
"WrapFrAlv");
559 alv.clrFrAlv =
args.dble(
"ClrFrAlv");
561 alv.wallReAlv =
args.dble(
"WallReAlv");
562 alv.wrapReAlv =
args.dble(
"WrapReAlv");
563 alv.clrReAlv =
args.dble(
"ClrReAlv");
565 alv.nCryTypes =
args.integer(
"NCryTypes");
566 alv.nCryPerAlvEta =
args.integer(
"NCryPerAlvEta");
568 cry.name = ns.prepend(
args.str(
"CryName"));
569 cry.clrName = ns.prepend(
args.str(
"ClrName"));
570 cry.wrapName = ns.prepend(
args.str(
"WrapName"));
571 cry.wallName = ns.prepend(
args.str(
"WallName"));
573 cry.mat =
args.str(
"CryMat");
574 cry.clrMat =
args.str(
"ClrMat");
575 cry.wrapMat =
args.str(
"WrapMat");
576 cry.wallMat =
args.str(
"WallMat");
579 cap.name = ns.prepend(
args.str(
"CapName"));
580 cap.here =
args.dble(
"CapHere");
582 cap.xSizeHalf = 0.5 *
args.dble(
"CapXSize");
583 cap.ySizeHalf = 0.5 *
args.dble(
"CapYSize");
584 cap.thickHalf = 0.5 *
args.dble(
"CapThick");
587 cer.name = ns.prepend(
args.str(
"CerName"));
588 cer.mat =
args.str(
"CerMat");
589 cer.xSizeHalf = 0.5 *
args.dble(
"CerXSize");
590 cer.ySizeHalf = 0.5 *
args.dble(
"CerYSize");
591 cer.thickHalf = 0.5 *
args.dble(
"CerThick");
594 bSi.name = ns.prepend(
args.str(
"BSiName"));
595 bSi.mat =
args.str(
"BSiMat");
596 bSi.xSizeHalf = 0.5 *
args.dble(
"BSiXSize");
597 bSi.ySizeHalf = 0.5 *
args.dble(
"BSiYSize");
598 bSi.thickHalf = 0.5 *
args.dble(
"BSiThick");
601 apd.name = ns.prepend(
args.str(
"APDName"));
602 apd.mat =
args.str(
"APDMat");
603 apd.side =
args.dble(
"APDSide");
604 apd.thick =
args.dble(
"APDThick");
605 apd.z =
args.dble(
"APDZ");
606 apd.x1 =
args.dble(
"APDX1");
607 apd.x2 =
args.dble(
"APDX2");
609 apd.atjName = ns.prepend(
args.str(
"ATJName"));
610 apd.atjMat =
args.str(
"ATJMat");
611 apd.atjThickHalf = 0.5 *
args.dble(
"ATJThick");
613 apd.sglName = ns.prepend(
args.str(
"SGLName"));
614 apd.sglMat =
args.str(
"SGLMat");
615 apd.sglThick =
args.dble(
"SGLThick");
617 apd.aglName = ns.prepend(
args.str(
"AGLName"));
618 apd.aglMat =
args.str(
"AGLMat");
619 apd.aglThick =
args.dble(
"AGLThick");
621 apd.andName = ns.prepend(
args.str(
"ANDName"));
622 apd.andMat =
args.str(
"ANDMat");
623 apd.andThick =
args.dble(
"ANDThick");
626 web.here =
args.dble(
"WebHere");
627 web.plName = ns.prepend(
args.str(
"WebPlName"));
628 web.clrName = ns.prepend(
args.str(
"WebClrName"));
629 web.plMat =
args.str(
"WebPlMat");
630 web.clrMat =
args.str(
"WebClrMat");
631 web.vecWebPlTh =
args.vecDble(
"WebPlTh");
632 web.vecWebClrTh =
args.vecDble(
"WebClrTh");
633 web.vecWebLength =
args.vecDble(
"WebLength");
635 InnerLayerVolume ily;
636 ily.here =
args.dble(
"IlyHere");
637 ily.name = ns.prepend(
args.str(
"IlyName"));
638 ily.phiLow =
args.dble(
"IlyPhiLow");
639 ily.delPhi =
args.dble(
"IlyDelPhi");
640 ily.vecIlyMat =
args.vecStr(
"IlyMat");
641 ily.vecIlyThick =
args.vecDble(
"IlyThick");
643 ily.pipeName = ns.prepend(
args.str(
"IlyPipeName"));
644 ily.pipeHere =
args.dble(
"IlyPipeHere");
645 ily.pipeMat =
args.str(
"IlyPipeMat");
646 ily.pipeODHalf = 0.5 *
args.dble(
"IlyPipeOD");
647 ily.pipeID =
args.dble(
"IlyPipeID");
648 ily.vecIlyPipeLengthHalf =
args.vecDble(
"IlyPipeLength");
650 ily.vecIlyPipeLengthHalf.end(),
651 ily.vecIlyPipeLengthHalf.begin(),
652 [](
double length) ->
double {
return 0.5 * length; });
654 ily.vecIlyPipeType =
args.vecDble(
"IlyPipeType");
655 ily.vecIlyPipePhi =
args.vecDble(
"IlyPipePhi");
656 ily.vecIlyPipeZ =
args.vecDble(
"IlyPipeZ");
658 ily.pTMName = ns.prepend(
args.str(
"IlyPTMName"));
659 ily.pTMHere =
args.dble(
"IlyPTMHere");
660 ily.pTMMat =
args.str(
"IlyPTMMat");
661 ily.pTMWidthHalf = 0.5 *
args.dble(
"IlyPTMWidth");
662 ily.pTMLengthHalf = 0.5 *
args.dble(
"IlyPTMLength");
663 ily.pTMHeightHalf = 0.5 *
args.dble(
"IlyPTMHeight");
664 ily.vecIlyPTMZ =
args.vecDble(
"IlyPTMZ");
665 ily.vecIlyPTMPhi =
args.vecDble(
"IlyPTMPhi");
667 ily.fanOutName = ns.prepend(
args.str(
"IlyFanOutName"));
668 ily.fanOutHere =
args.dble(
"IlyFanOutHere");
669 ily.fanOutMat =
args.str(
"IlyFanOutMat");
670 ily.fanOutWidthHalf = 0.5 *
args.dble(
"IlyFanOutWidth");
671 ily.fanOutLengthHalf = 0.5 *
args.dble(
"IlyFanOutLength");
672 ily.fanOutHeightHalf = 0.5 *
args.dble(
"IlyFanOutHeight");
673 ily.vecIlyFanOutZ =
args.vecDble(
"IlyFanOutZ");
674 ily.vecIlyFanOutPhi =
args.vecDble(
"IlyFanOutPhi");
675 ily.diffName = ns.prepend(
args.str(
"IlyDiffName"));
676 ily.diffMat =
args.str(
"IlyDiffMat");
677 ily.diffOff =
args.dble(
"IlyDiffOff");
678 ily.diffLengthHalf = 0.5 *
args.dble(
"IlyDiffLength");
679 ily.bndlName = ns.prepend(
args.str(
"IlyBndlName"));
680 ily.bndlMat =
args.str(
"IlyBndlMat");
681 ily.bndlOff =
args.dble(
"IlyBndlOff");
682 ily.bndlLengthHalf =
args.dble(
"IlyBndlLength");
683 ily.fEMName = ns.prepend(
args.str(
"IlyFEMName"));
684 ily.fEMMat =
args.str(
"IlyFEMMat");
685 ily.fEMWidthHalf = 0.5 *
args.dble(
"IlyFEMWidth");
686 ily.fEMLengthHalf = 0.5 *
args.dble(
"IlyFEMLength");
687 ily.fEMHeightHalf = 0.5 *
args.dble(
"IlyFEMHeight");
688 ily.vecIlyFEMZ =
args.vecDble(
"IlyFEMZ");
689 ily.vecIlyFEMPhi =
args.vecDble(
"IlyFEMPhi");
691 AlveolarWedge alvWedge;
692 alvWedge.hawRName = ns.prepend(
args.str(
"HawRName"));
693 alvWedge.fawName = ns.prepend(
args.str(
"FawName"));
694 alvWedge.fawHere =
args.dble(
"FawHere");
695 alvWedge.hawRHBIG =
args.dble(
"HawRHBIG");
696 alvWedge.hawRhsml =
args.dble(
"HawRhsml");
697 alvWedge.hawRCutY =
args.dble(
"HawRCutY");
698 alvWedge.hawRCutZ =
args.dble(
"HawRCutZ");
699 alvWedge.hawRCutDelY =
args.dble(
"HawRCutDelY");
700 alvWedge.hawYOffCry =
args.dble(
"HawYOffCry");
702 alvWedge.nFawPerSupm =
args.integer(
"NFawPerSupm");
703 alvWedge.fawPhiOff =
args.dble(
"FawPhiOff");
704 alvWedge.fawDelPhi =
args.dble(
"FawDelPhi");
705 alvWedge.fawPhiRot =
args.dble(
"FawPhiRot");
706 alvWedge.fawRadOff =
args.dble(
"FawRadOff");
710 grid.name = ns.prepend(
args.str(
"GridName"));
712 grid.thick =
args.dble(
"GridThick");
715 back.here =
args.dble(
"BackHere");
716 back.xOff =
args.dble(
"BackXOff");
717 back.yOff =
args.dble(
"BackYOff");
718 back.sideName = ns.prepend(
args.str(
"BackSideName"));
719 back.sideHere =
args.dble(
"BackSideHere");
720 back.sideLength =
args.dble(
"BackSideLength");
721 back.sideHeight =
args.dble(
"BackSideHeight");
722 back.sideWidth =
args.dble(
"BackSideWidth");
723 back.sideYOff1 =
args.dble(
"BackSideYOff1");
724 back.sideYOff2 =
args.dble(
"BackSideYOff2");
725 back.sideAngle =
args.dble(
"BackSideAngle");
726 back.sideMat =
args.str(
"BackSideMat");
727 back.plateName = ns.prepend(
args.str(
"BackPlateName"));
728 back.plateHere =
args.dble(
"BackPlateHere");
729 back.plateLength =
args.dble(
"BackPlateLength");
730 back.plateThick =
args.dble(
"BackPlateThick");
731 back.plateWidth =
args.dble(
"BackPlateWidth");
732 back.plateMat =
args.str(
"BackPlateMat");
733 back.plate2Name = ns.prepend(
args.str(
"BackPlate2Name"));
734 back.plate2Thick =
args.dble(
"BackPlate2Thick");
735 back.plate2Mat =
args.str(
"BackPlate2Mat");
738 grille.name = ns.prepend(
args.str(
"GrilleName"));
739 grille.here =
args.dble(
"GrilleHere");
740 grille.thick =
args.dble(
"GrilleThick");
741 grille.width =
args.dble(
"GrilleWidth");
742 grille.zSpace =
args.dble(
"GrilleZSpace");
743 grille.mat =
args.str(
"GrilleMat");
744 grille.vecHeight =
args.vecDble(
"GrilleHeight");
745 grille.vecZOff =
args.vecDble(
"GrilleZOff");
747 grille.edgeSlotName = ns.prepend(
args.str(
"GrEdgeSlotName"));
748 grille.edgeSlotMat =
args.str(
"GrEdgeSlotMat");
749 grille.edgeSlotHere =
args.dble(
"GrEdgeSlotHere");
750 grille.edgeSlotHeight =
args.dble(
"GrEdgeSlotHeight");
751 grille.edgeSlotWidth =
args.dble(
"GrEdgeSlotWidth");
752 grille.midSlotName = ns.prepend(
args.str(
"GrMidSlotName"));
753 grille.midSlotMat =
args.str(
"GrMidSlotMat");
754 grille.midSlotHere =
args.dble(
"GrMidSlotHere");
755 grille.midSlotWidth =
args.dble(
"GrMidSlotWidth");
756 grille.midSlotXOff =
args.dble(
"GrMidSlotXOff");
757 grille.vecMidSlotHeight =
args.vecDble(
"GrMidSlotHeight");
760 backPipe.here =
args.dble(
"BackPipeHere");
761 backPipe.name = ns.prepend(
args.str(
"BackPipeName"));
762 backPipe.vecDiam =
args.vecDble(
"BackPipeDiam");
763 backPipe.vecThick =
args.vecDble(
"BackPipeThick");
764 backPipe.mat =
args.str(
"BackPipeMat");
765 backPipe.waterMat =
args.str(
"BackPipeWaterMat");
767 BackCooling backCool;
768 backCool.here =
args.dble(
"BackCoolHere");
769 backCool.vecName =
args.vecStr(
"BackCoolName");
771 backCool.vecName.end(),
772 backCool.vecName.begin(),
774 backCool.barHere =
args.dble(
"BackCoolBarHere");
775 backCool.barWidth =
args.dble(
"BackCoolBarWidth");
776 backCool.barHeight =
args.dble(
"BackCoolBarHeight");
777 backCool.mat =
args.str(
"BackCoolMat");
778 backCool.barName = ns.prepend(
args.str(
"BackCoolBarName"));
779 backCool.barThick =
args.dble(
"BackCoolBarThick");
780 backCool.barMat =
args.str(
"BackCoolBarMat");
781 backCool.barSSName = ns.prepend(
args.str(
"BackCoolBarSSName"));
782 backCool.barSSThick =
args.dble(
"BackCoolBarSSThick");
783 backCool.barSSMat =
args.str(
"BackCoolBarSSMat");
784 backCool.barWaName = ns.prepend(
args.str(
"BackCoolBarWaName"));
785 backCool.barWaThick =
args.dble(
"BackCoolBarWaThick");
786 backCool.barWaMat =
args.str(
"BackCoolBarWaMat");
787 backCool.vFEHere =
args.dble(
"BackCoolVFEHere");
788 backCool.vFEName =
args.str(
"BackCoolVFEName");
789 backCool.vFEMat =
args.str(
"BackCoolVFEMat");
790 backCool.backVFEName = ns.prepend(
args.str(
"BackVFEName"));
791 backCool.backVFEMat =
args.str(
"BackVFEMat");
792 backCool.vecBackVFELyrThick =
args.vecDble(
"BackVFELyrThick");
793 backCool.vecBackVFELyrName =
args.vecStr(
"BackVFELyrName");
795 backCool.vecBackVFELyrName.end(),
796 backCool.vecBackVFELyrName.begin(),
798 backCool.vecBackVFELyrMat =
args.vecStr(
"BackVFELyrMat");
799 backCool.vecBackCoolNSec =
args.vecDble(
"BackCoolNSec");
800 backCool.vecBackCoolSecSep =
args.vecDble(
"BackCoolSecSep");
801 backCool.vecBackCoolNPerSec =
args.vecDble(
"BackCoolNPerSec");
804 backMisc.here =
args.dble(
"BackMiscHere");
805 backMisc.vecThick =
args.vecDble(
"BackMiscThick");
806 backMisc.vecName =
args.vecStr(
"BackMiscName");
808 backMisc.vecName.end(),
809 backMisc.vecName.begin(),
811 backMisc.vecMat =
args.vecStr(
"BackMiscMat");
812 backMisc.backCBStdSep =
args.dble(
"BackCBStdSep");
814 PatchPanel patchPanel;
815 patchPanel.here =
args.dble(
"PatchPanelHere");
816 patchPanel.vecThick =
args.vecDble(
"PatchPanelThick");
817 patchPanel.vecNames =
args.vecStr(
"PatchPanelNames");
819 patchPanel.vecNames.end(),
820 patchPanel.vecNames.begin(),
823 patchPanel.vecMat =
args.vecStr(
"PatchPanelMat");
824 patchPanel.name = ns.prepend(
args.str(
"PatchPanelName"));
826 BackCoolTank backCoolTank;
827 backCoolTank.here =
args.dble(
"BackCoolTankHere");
828 backCoolTank.name = ns.prepend(
args.str(
"BackCoolTankName"));
829 backCoolTank.width =
args.dble(
"BackCoolTankWidth");
830 backCoolTank.thick =
args.dble(
"BackCoolTankThick");
831 backCoolTank.mat =
args.str(
"BackCoolTankMat");
832 backCoolTank.waName = ns.prepend(
args.str(
"BackCoolTankWaName"));
833 backCoolTank.waWidth =
args.dble(
"BackCoolTankWaWidth");
834 backCoolTank.waMat =
args.str(
"BackCoolTankWaMat");
835 backCoolTank.backBracketName = ns.prepend(
args.str(
"BackBracketName"));
836 backCoolTank.backBracketHeight =
args.dble(
"BackBracketHeight");
837 backCoolTank.backBracketMat =
args.str(
"BackBracketMat");
839 DryAirTube dryAirTube;
840 dryAirTube.here =
args.dble(
"DryAirTubeHere");
841 dryAirTube.name =
args.str(
"DryAirTubeName");
842 dryAirTube.mbCoolTubeNum =
args.integer(
"MBCoolTubeNum");
843 dryAirTube.innDiam =
args.dble(
"DryAirTubeInnDiam");
844 dryAirTube.outDiam =
args.dble(
"DryAirTubeOutDiam");
845 dryAirTube.mat =
args.str(
"DryAirTubeMat");
847 MBCoolTube mbCoolTube;
848 mbCoolTube.here =
args.dble(
"MBCoolTubeHere");
849 mbCoolTube.name = ns.prepend(
args.str(
"MBCoolTubeName"));
850 mbCoolTube.innDiam =
args.dble(
"MBCoolTubeInnDiam");
851 mbCoolTube.outDiam =
args.dble(
"MBCoolTubeOutDiam");
852 mbCoolTube.mat =
args.str(
"MBCoolTubeMat");
855 mbManif.here =
args.dble(
"MBManifHere");
856 mbManif.name = ns.prepend(
args.str(
"MBManifName"));
857 mbManif.innDiam =
args.dble(
"MBManifInnDiam");
858 mbManif.outDiam =
args.dble(
"MBManifOutDiam");
859 mbManif.mat =
args.str(
"MBManifMat");
862 mbLyr.here =
args.dble(
"MBLyrHere");
863 mbLyr.vecMBLyrThick =
args.vecDble(
"MBLyrThick");
864 mbLyr.vecMBLyrName =
args.vecStr(
"MBLyrName");
866 mbLyr.vecMBLyrName.end(),
867 mbLyr.vecMBLyrName.begin(),
869 mbLyr.vecMBLyrMat =
args.vecStr(
"MBLyrMat");
872 pincer.rodHere =
args.dble(
"PincerRodHere");
873 pincer.rodName = ns.prepend(
args.str(
"PincerRodName"));
874 pincer.rodMat =
args.str(
"PincerRodMat");
875 pincer.vecRodAzimuth =
args.vecDble(
"PincerRodAzimuth");
876 pincer.envName = ns.prepend(
args.str(
"PincerEnvName"));
877 pincer.envMat =
args.str(
"PincerEnvMat");
878 pincer.envWidthHalf = 0.5 *
args.dble(
"PincerEnvWidth");
879 pincer.envHeightHalf = 0.5 *
args.dble(
"PincerEnvHeight");
880 pincer.envLengthHalf = 0.5 *
args.dble(
"PincerEnvLength");
881 pincer.vecEnvZOff =
args.vecDble(
"PincerEnvZOff");
882 pincer.blkName = ns.prepend(
args.str(
"PincerBlkName"));
883 pincer.blkMat =
args.str(
"PincerBlkMat");
884 pincer.blkLengthHalf = 0.5 *
args.dble(
"PincerBlkLength");
885 pincer.shim1Name = ns.prepend(
args.str(
"PincerShim1Name"));
886 pincer.shimHeight =
args.dble(
"PincerShimHeight");
887 pincer.shim2Name = ns.prepend(
args.str(
"PincerShim2Name"));
888 pincer.shimMat =
args.str(
"PincerShimMat");
889 pincer.shim1Width =
args.dble(
"PincerShim1Width");
890 pincer.shim2Width =
args.dble(
"PincerShim2Width");
891 pincer.cutName = ns.prepend(
args.str(
"PincerCutName"));
892 pincer.cutMat =
args.str(
"PincerCutMat");
893 pincer.cutWidth =
args.dble(
"PincerCutWidth");
894 pincer.cutHeight =
args.dble(
"PincerCutHeight");
896 Volume parentVolume = ns.volume(
args.parentName());
898 const unsigned int copyOne(1);
899 const unsigned int copyTwo(2);
901 Solid barSolid = Polycone(
bar.phiLo, (
bar.phiHi -
bar.phiLo),
bar.vecRMin,
bar.vecRMax,
bar.vecZPts);
909 parentVolume.placeVolume(barVolume, copyOne, Transform3D(
rotation, tran));
911 edm::LogVerbatim(
"EcalGeom") << barVolume.name() <<
":" << copyOne <<
" positioned in " << parentVolume.name();
917 const string spmcut1ddname((0 != spm.cutShow) ? spm.name : (spm.name +
"CUT1"));
918 Solid ddspm = Polycone(spm.lowPhi, spm.delPhi, spm.vecRMin, spm.vecRMax, spm.vecZPts);
920 const unsigned int indx(0.5 * spm.vecRMax.size());
923 array<double, 3> cutBoxParms{{1.05 * (spm.vecRMax[indx] - spm.vecRMin[indx]) * 0.5,
925 fabs(spm.vecZPts.back() - spm.vecZPts.front()) * 0.5 + 1_mm}};
926 Solid spmCutBox = Box(spm.cutName, cutBoxParms[0], cutBoxParms[1], cutBoxParms[2]);
927 Volume spmCutLog =
Volume(spm.cutName, spmCutBox, ns.material(spm.mat));
930 array<double, 3> sideParms{{0.5 * spm.sideHigh, 0.5 * spm.sideThick, 0.5 * fabs(spm.vecZPts[1] - spm.vecZPts[0])}};
931 Solid sideSolid = Box(sideParms[0], sideParms[1], sideParms[2]);
932 Volume sideLog =
Volume(spm.sideName, sideSolid, ns.material(spm.sideMat));
938 Transform3D alltrot1;
939 Transform3D alltrot2;
940 for (
unsigned int icopy(1); icopy <= 2; ++icopy) {
941 const std::vector<double>& tvec(1 == icopy ? spm.vecCutTM : spm.vecCutTP);
942 double rang(1 == icopy ? spm.cutRM : spm.cutRP);
944 const Position tr(tvec[0], tvec[1], tvec[2]);
946 const double ang(1 == icopy ? spm.lowPhi : spm.lowPhi + spm.delPhi);
949 0.5 * (spm.vecRMax[indx] + spm.vecRMin[indx]), 0, 0.5 * (spm.vecZPts.front() + spm.vecZPts.back()));
950 Transform3D alltrot(Transform3D(Transform3D(ro1 * tr1) * tr) * ro);
953 temp1 = SubtractionSolid(spm.name +
"_T1", ddspm, spmCutBox, alltrot);
956 temp2 = SubtractionSolid(spm.name, temp1, spmCutBox, alltrot);
958 const Tl3D trSide(tvec[0],
959 tvec[1] + (1 == icopy ? 1. : -1.) * (cutBoxParms[1] + sideParms[1]) +
960 (1 == icopy ? spm.sideYOffM : spm.sideYOffP),
962 const RoZ3D roSide(rang);
963 const Tf3D sideRot(
RoZ3D(1 == icopy ? spm.lowPhi : spm.lowPhi + spm.delPhi) *
964 Tl3D(spm.vecRMin.front() + sideParms[0], 0, spm.vecZPts.front() + sideParms[2]) * trSide *
967 Rotation3D sideddrot(myrot(ns, spm.sideName + std::to_string(icopy), sideRot.getRotation()));
968 const Position sideddtra(sideRot.getTranslation());
969 1 == icopy ? sideddtra1 = sideddtra : sideddtra2 = sideddtra;
971 Volume spmLog =
Volume(spm.name, ((0 != spm.cutShow) ? ddspm : temp2), ns.material(spm.mat));
972 if (0 != spm.cutShow) {
973 spmLog.placeVolume(spmCutLog, 1, alltrot1);
977 spmLog.placeVolume(spmCutLog, 1, alltrot2);
982 spmLog.placeVolume(sideLog, 1, Transform3D(ns.rotation(spm.sideName + std::to_string(1)), sideddtra1));
986 spmLog.placeVolume(sideLog, 2, Transform3D(ns.rotation(spm.sideName + std::to_string(2)), sideddtra2));
991 const double dphi(360._deg / (1. * spm.nPerHalf));
992 for (
unsigned int iphi(0);
iphi < 2 * spm.nPerHalf; ++
iphi) {
993 const double phi(
iphi * dphi + spm.phiOff);
999 Ro3D(spm.vecBRota[3],
Vec3(spm.vecBRota[0], spm.vecBRota[1], spm.vecBRota[2])) *
1000 Tl3D(
Vec3(spm.vecBTran[0], spm.vecBTran[1], spm.vecBTran[2])));
1005 const unsigned int offr(4 *
iphi);
1006 const unsigned int offt(3 *
iphi);
1008 const Ro3D r1(spm.vecRota[offr + 3],
Vec3(spm.vecRota[offr + 0], spm.vecRota[offr + 1], spm.vecRota[offr + 2]));
1010 const Tf3D rotaExtra(
r1 *
Tl3D(
Vec3(spm.vecTran[offt + 0], spm.vecTran[offt + 1], spm.vecTran[offt + 2])));
1012 const Tf3D both(rotaExtra * rotaBase);
1016 if (spm.vecHere[
iphi] != 0) {
1018 Position myTran(
both.getTranslation().x(),
both.getTranslation().y(),
both.getTranslation().z());
1019 barVolume.placeVolume(spmLog,
iphi + 1, Transform3D(rota, myTran));
1022 << barVolume.name();
1029 const double ilyLengthHalf(0.5 * (spm.vecZPts[1] - spm.vecZPts[0]));
1030 double ilyRMin(spm.vecRMin[0]);
1032 for (
unsigned int ilyx(0); ilyx != ily.vecIlyThick.size(); ++ilyx) {
1033 ilyThick += ily.vecIlyThick[ilyx];
1035 Solid ilySolid = Tube(ily.name,
1040 ily.phiLow + ily.delPhi);
1041 Volume ilyLog =
Volume(ily.name, ilySolid, ns.material(spm.mat));
1042 spmLog.placeVolume(ilyLog, copyOne,
Position(0, 0, ilyLengthHalf));
1044 edm::LogVerbatim(
"EcalGeom") << ilyLog.name() <<
":" << copyOne <<
" positioned in "
1048 if (0 != ily.pipeHere) {
1049 for (
unsigned int iPipeType(0); iPipeType != ily.vecIlyPipeLengthHalf.size(); ++iPipeType) {
1050 string pName(ily.pipeName +
"_" + std::to_string(iPipeType + 1));
1052 Solid ilyPipeSolid = Tube(pName,
1055 ily.vecIlyPipeLengthHalf[iPipeType],
1058 ilyPipeLog[iPipeType] =
Volume(pName, ilyPipeSolid, ns.material(ily.pipeMat));
1060 string pWaName(ily.pipeName +
"Wa_" + std::to_string(iPipeType + 1));
1061 Solid ilyPipeWaSolid = Tube(pWaName,
1064 ily.vecIlyPipeLengthHalf[iPipeType],
1067 Volume ilyPipeWaLog =
Volume(pWaName, ilyPipeWaSolid, ns.material(backPipe.waterMat));
1068 ilyPipeLog[iPipeType].placeVolume(ilyPipeWaLog, copyOne);
1070 edm::LogVerbatim(
"EcalGeom") << ilyPipeWaLog.name() <<
":" << copyOne <<
" positioned in "
1071 << ilyPipeLog[iPipeType].name();
1076 Solid ilyPTMSolid = Box(ily.pTMHeightHalf, ily.pTMWidthHalf, ily.pTMLengthHalf);
1077 Volume ilyPTMLog =
Volume(ily.pTMName, ilyPTMSolid, ns.material(ily.pTMMat));
1079 Solid ilyFanOutSolid = Box(ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.fanOutLengthHalf);
1080 Volume ilyFanOutLog =
Volume(ily.fanOutName, ilyFanOutSolid, ns.material(ily.fanOutMat));
1082 Solid ilyFEMSolid = Box(ily.fEMHeightHalf, ily.fEMWidthHalf, ily.fEMLengthHalf);
1083 Volume ilyFEMLog =
Volume(ily.fEMName, ilyFEMSolid, ns.material(ily.fEMMat));
1085 Solid ilyDiffSolid = Box(ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.diffLengthHalf);
1086 Volume ilyDiffLog =
Volume(ily.diffName, ilyDiffSolid, ns.material(ily.diffMat));
1088 Solid ilyBndlSolid = Box(ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.bndlLengthHalf);
1089 Volume ilyBndlLog =
Volume(ily.bndlName, ilyBndlSolid, ns.material(ily.bndlMat));
1091 ilyFanOutLog.placeVolume(
1092 ilyDiffLog, copyOne,
Position(0_mm, 0_mm, -ily.fanOutLengthHalf + ily.diffLengthHalf + ily.diffOff));
1094 edm::LogVerbatim(
"EcalGeom") << ilyDiffLog.name() <<
":" << copyOne <<
" positioned in " << ilyFanOutLog.name();
1096 ilyFanOutLog.placeVolume(
1097 ilyBndlLog, copyOne,
Position(0_mm, 0_mm, -ily.fanOutLengthHalf + ily.bndlLengthHalf + ily.bndlOff));
1099 edm::LogVerbatim(
"EcalGeom") << ilyBndlLog.name() <<
":" << copyOne <<
" positioned in " << ilyFanOutLog.name();
1103 for (
unsigned int iily(0); iily != ily.vecIlyThick.size(); ++iily) {
1104 const double ilyRMax(ilyRMin + ily.vecIlyThick[iily]);
1105 string xilyName(ily.name + std::to_string(iily));
1106 Solid xilySolid = Tube(xilyName, ilyRMin, ilyRMax, ilyLengthHalf, ily.phiLow, ily.phiLow + ily.delPhi);
1107 xilyLog = ns.addVolume(
Volume(xilyName, xilySolid, ns.material(ily.vecIlyMat[iily])));
1108 if (0 != ily.here) {
1109 ilyLog.placeVolume(xilyLog, copyOne);
1111 edm::LogVerbatim(
"EcalGeom") << xilyLog.name() <<
":" << copyOne <<
" positioned in " << ilyLog.name();
1113 unsigned int copyNum[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1115 if (10_mm < ily.vecIlyThick[iily] && ily.vecIlyThick.size() != (iily + 1) && 0 != ily.pipeHere) {
1116 if (0 != ily.pTMHere) {
1117 unsigned int ptmCopy(0);
1118 for (
unsigned int ilyPTM(0); ilyPTM != ily.vecIlyPTMZ.size(); ++ilyPTM) {
1119 const double radius(ilyRMax - 1_mm - ily.pTMHeightHalf);
1120 const double phi(ily.vecIlyPTMPhi[ilyPTM]);
1124 xilyLog.placeVolume(
1127 Transform3D(RotationZ(
phi),
Position(
xx,
yy, ily.vecIlyPTMZ[ilyPTM] - ilyLengthHalf)));
1129 edm::LogVerbatim(
"EcalGeom") << ilyPTMLog.name() <<
":" << ptmCopy <<
" positioned in " << xilyLog.name();
1133 if (0 != ily.fanOutHere) {
1134 unsigned int fanOutCopy(0);
1135 for (
unsigned int ilyFO(0); ilyFO != ily.vecIlyFanOutZ.size(); ++ilyFO) {
1136 const double radius(ilyRMax - 1_mm - ily.fanOutHeightHalf);
1137 const double phi(ily.vecIlyFanOutPhi[ilyFO]);
1141 xilyLog.placeVolume(ilyFanOutLog,
1143 Transform3D(RotationZ(
phi) * RotationY(180_deg),
1144 Position(
xx,
yy, ily.vecIlyFanOutZ[ilyFO] - ilyLengthHalf)));
1147 << ilyFanOutLog.name() <<
":" << fanOutCopy <<
" positioned in " << xilyLog.name();
1150 unsigned int femCopy(0);
1151 for (
unsigned int ilyFEM(0); ilyFEM != ily.vecIlyFEMZ.size(); ++ilyFEM) {
1152 const double radius(ilyRMax - 1_mm - ily.fEMHeightHalf);
1153 const double phi(ily.vecIlyFEMPhi[ilyFEM]);
1157 xilyLog.placeVolume(
1160 Transform3D(RotationZ(
phi),
Position(
xx,
yy, ily.vecIlyFEMZ[ilyFEM] - ilyLengthHalf)));
1162 edm::LogVerbatim(
"EcalGeom") << ilyFEMLog.name() <<
":" << femCopy <<
" positioned in " << xilyLog.name();
1166 for (
unsigned int iPipe(0); iPipe != ily.vecIlyPipePhi.size(); ++iPipe) {
1167 const unsigned int type(static_cast<unsigned int>(round(ily.vecIlyPipeType[iPipe])));
1168 const double zz(-ilyLengthHalf + ily.vecIlyPipeZ[iPipe] + (9 >
type ? ily.vecIlyPipeLengthHalf[
type] : 0));
1170 for (
unsigned int ly(0); ly != 2; ++ly) {
1171 const double radius(0 == ly ? ilyRMin + ily.pipeODHalf + 1_mm : ilyRMax - ily.pipeODHalf - 1_mm);
1172 const double phi(ily.vecIlyPipePhi[iPipe]);
1180 << ilyPipeLog[
type].name() <<
":" << copyNum[
type] <<
" positioned in " << xilyLog.name();
1183 xilyLog.placeVolume(
1190 << ilyPipeLog[
type].name() <<
":" << copyNum[
type] <<
" positioned in " << xilyLog.name();
1201 string clyrName(ns.prepend(
"ECLYR"));
1202 std::vector<double> cri;
1203 std::vector<double> cro;
1204 std::vector<double> czz;
1205 czz.emplace_back(spm.vecZPts[1]);
1206 cri.emplace_back(spm.vecRMin[0]);
1207 cro.emplace_back(spm.vecRMin[0] + 25_mm);
1208 czz.emplace_back(spm.vecZPts[2]);
1209 cri.emplace_back(spm.vecRMin[2]);
1210 cro.emplace_back(spm.vecRMin[2] + 10_mm);
1211 Solid clyrSolid = Polycone(clyrName, -9.5_deg, 19_deg, cri, cro, czz);
1212 Volume clyrLog =
Volume(clyrName, clyrSolid, ns.material(ily.vecIlyMat[4]));
1213 spmLog.placeVolume(clyrLog, copyOne);
1215 edm::LogVerbatim(
"EcalGeom") << clyrLog.name() <<
":" << copyOne <<
" positioned in "
1224 const double BNom1(cry.vecNomCryDimCR[0]);
1225 const double bNom1(cry.vecNomCryDimCF[0]);
1226 const double sWall1(alv.wallThAlv);
1227 const double fWall1(alv.wallFrAlv);
1228 const double sWrap1(alv.wrapThAlv);
1229 const double fWrap1(alv.wrapFrAlv);
1230 const double sClr1(alv.clrThAlv);
1231 const double fClr1(alv.clrFrAlv);
1232 const double LNom1(cry.nomCryDimLZ);
1233 const double beta1(atan((BNom1 - bNom1) / LNom1));
1234 const double sinbeta1(
sin(beta1));
1236 const double tana_hawR((BNom1 - bNom1) / LNom1);
1238 const double H_hawR(alvWedge.hawRHBIG);
1239 const double h_hawR(alvWedge.hawRhsml);
1240 const double a_hawR(bNom1 + sClr1 + 2 * sWrap1 + 2 * sWall1 - sinbeta1 * (fClr1 + fWrap1 + fWall1));
1241 const double B_hawR(a_hawR + H_hawR * tana_hawR);
1242 const double b_hawR(a_hawR + h_hawR * tana_hawR);
1243 const double L_hawR(spm.vecZPts[2]);
1245 const EcalTrap trapHAWR(0.5 * a_hawR,
1256 string hawRName1(alvWedge.hawRName +
"1");
1257 Solid hawRSolid1 = mytrap(hawRName1, trapHAWR);
1259 const double al1_fawR(atan((B_hawR - a_hawR) / H_hawR) +
M_PI_2);
1273 const string fawName1(alvWedge.fawName +
"1");
1274 Solid fawSolid1 = mytrap(fawName1, trapFAW);
1279 const double hawBoxClr(1_mm);
1282 const string hawCutName(alvWedge.hawRName +
"CUTBOX");
1283 array<double, 3> hawBoxParms{{0.5 * b_hawR + hawBoxClr, 0.5 * alvWedge.hawRCutY, 0.5 * alvWedge.hawRCutZ}};
1284 Solid hawCutBox = Box(hawCutName, hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1286 const Pt3D b1(hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1287 const Pt3D b2(-hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1288 const Pt3D b3(-hawBoxParms[0], hawBoxParms[1], -hawBoxParms[2]);
1291 sqrt(4 * hawBoxParms[2] * hawBoxParms[2] - (h_hawR - alvWedge.hawRCutDelY) * (h_hawR - alvWedge.hawRCutDelY)));
1293 const Tf3D hawCutForm(
b1,
1296 vHAW[2] +
Pt3D(hawBoxClr, -alvWedge.hawRCutDelY, 0),
1297 vHAW[1] +
Pt3D(-hawBoxClr, -alvWedge.hawRCutDelY, 0),
1298 Pt3D(vHAW[0].
x() - hawBoxClr, vHAW[0].
y(), vHAW[0].
z() - zDel));
1300 Solid hawRSolid = SubtractionSolid(hawRSolid1,
1302 Transform3D(myrot(ns, hawCutName +
"R", hawCutForm.getRotation()),
1303 Position(hawCutForm.getTranslation().x(),
1304 hawCutForm.getTranslation().y(),
1305 hawCutForm.getTranslation().z())));
1306 Volume hawRLog =
Volume(alvWedge.hawRName, hawRSolid, ns.material(spm.mat));
1309 const string fawCutName(alvWedge.fawName +
"CUTBOX");
1310 const array<double, 3> fawBoxParms{{2 * hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]}};
1311 Solid fawCutBox = Box(fawCutName, fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1313 const Pt3D bb1(fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1314 const Pt3D bb2(-fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1315 const Pt3D bb3(-fawBoxParms[0], fawBoxParms[1], -fawBoxParms[2]);
1317 const Tf3D fawCutForm(bb1,
1320 vFAW[2] +
Pt3D(2 * hawBoxClr, -5_mm, 0),
1321 vFAW[1] +
Pt3D(-2 * hawBoxClr, -5_mm, 0),
1322 Pt3D(vFAW[1].
x() - 2 * hawBoxClr, vFAW[1].
y() - trapFAW.h(), vFAW[1].z() - zDel));
1324 Solid fawSolid = SubtractionSolid(fawSolid1,
1326 Transform3D(myrot(ns, fawCutName +
"R", fawCutForm.getRotation()),
1327 Position(fawCutForm.getTranslation().x(),
1328 fawCutForm.getTranslation().y(),
1329 fawCutForm.getTranslation().z())));
1330 Volume fawLog =
Volume(alvWedge.fawName, fawSolid, ns.material(spm.mat));
1332 const Tf3D hawRform(vHAW[3],
1336 0.5 * (vFAW[0] + vFAW[3]),
1337 0.5 * (vFAW[1] + vFAW[2]));
1343 myrot(ns, alvWedge.hawRName +
"R", hawRform.getRotation()),
1344 Position(hawRform.getTranslation().x(), hawRform.getTranslation().y(), hawRform.getTranslation().z())));
1346 edm::LogVerbatim(
"EcalGeom") << hawRLog.name() <<
":" << copyOne <<
" positioned in " << fawLog.name();
1355 Rotation3D(1., 0., 0., 0., 1., 0., 0., 0., -1.) * RotationY(-
M_PI),
1356 Position(-hawRform.getTranslation().x(), -hawRform.getTranslation().y(), -hawRform.getTranslation().z())));
1358 edm::LogVerbatim(
"EcalGeom") << hawRLog.name() <<
":" << copyTwo <<
" positioned in " << fawLog.name();
1360 for (
unsigned int iPhi(1); iPhi <= alvWedge.nFawPerSupm; ++iPhi) {
1361 const double rPhi(alvWedge.fawPhiOff + (iPhi - 0.5) * alvWedge.fawDelPhi);
1364 Tl3D(alvWedge.fawRadOff + (trapFAW.H() + trapFAW.h()) / 4, 0, 0.5 * trapFAW.L()) *
1365 RoZ3D(-90_deg + alvWedge.fawPhiRot));
1366 if (alvWedge.fawHere) {
1371 myrot(ns, alvWedge.fawName +
"_Rot" + std::to_string(iPhi), fawform.getRotation()),
1372 Position(fawform.getTranslation().x(), fawform.getTranslation().y(), fawform.getTranslation().z())));
1374 edm::LogVerbatim(
"EcalGeom") << fawLog.name() <<
":" << iPhi <<
" positioned in "
1384 const double h_Grid(
grid.thick);
1386 const EcalTrap trapGrid(0.5 * (B_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR),
1387 0.5 * (b_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR),
1391 0.5 * (L_hawR - 8_cm),
1397 Solid gridSolid = mytrap(
grid.name, trapGrid);
1402 const Tf3D gridForm(vGrid[4],
1405 vHAW[5] -
Pt3D(0, h_Grid, 0),
1409 if (0 !=
grid.here) {
1410 hawRLog.placeVolume(
1414 myrot(ns,
grid.name +
"R", gridForm.getRotation()),
1415 Position(gridForm.getTranslation().x(), gridForm.getTranslation().y(), gridForm.getTranslation().z())));
1417 edm::LogVerbatim(
"EcalGeom") << gridLog.name() <<
":" << copyOne <<
" positioned in " << hawRLog.name();
1424 const double aNom(cry.nomCryDimAF);
1425 const double LNom(cry.nomCryDimLZ);
1427 const double AUnd(cry.underAR);
1428 const double aUnd(cry.underAF);
1429 const double bUnd(cry.underCF);
1430 const double HUnd(cry.underBR);
1431 const double hUnd(cry.underBF);
1432 const double LUnd(cry.underLZ);
1434 const double sWall(alv.wallThAlv);
1435 const double sWrap(alv.wrapThAlv);
1436 const double sClr(alv.clrThAlv);
1438 const double fWall(alv.wallFrAlv);
1439 const double fWrap(alv.wrapFrAlv);
1440 const double fClr(alv.clrFrAlv);
1442 const double rWall(alv.wallReAlv);
1443 const double rWrap(alv.wrapReAlv);
1444 const double rClr(alv.clrReAlv);
1447 double theta(90_deg);
1452 for (
unsigned int cryType(1); cryType <= alv.nCryTypes; ++cryType) {
1453 const string sType(
"_" +
std::string(10 > cryType ?
"0" :
"") + std::to_string(cryType));
1458 const double ANom(cry.vecNomCryDimAR[cryType - 1]);
1459 const double BNom(cry.vecNomCryDimCR[cryType - 1]);
1460 const double bNom(cry.vecNomCryDimCF[cryType - 1]);
1461 const double HNom(cry.vecNomCryDimBR[cryType - 1]);
1462 const double hNom(cry.vecNomCryDimBF[cryType - 1]);
1464 const double alfCry(90_deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd)));
1466 const EcalTrap trapCry(0.5 * (ANom - AUnd),
1467 0.5 * (aNom - aUnd),
1468 0.5 * (bNom - bUnd),
1469 0.5 * (HNom - HUnd),
1470 0.5 * (hNom - hUnd),
1471 0.5 * (LNom - LUnd),
1473 aNom - aUnd - ANom + AUnd,
1474 hNom - hUnd - HNom + HUnd
1477 const string cryDDName(cry.name + sType);
1478 Solid crySolid = mytrap(cry.name, trapCry);
1479 Volume cryLog =
Volume(cryDDName, crySolid, ns.material(cry.mat));
1482 const unsigned int copyCap(1);
1483 const string capDDName(
cap.name + sType);
1484 Solid capSolid = Box(
cap.xSizeHalf,
cap.ySizeHalf,
cap.thickHalf);
1487 const string sglDDName(apd.sglName + sType);
1488 Solid sglSolid = Box(
cap.xSizeHalf,
cap.ySizeHalf, apd.sglThick / 2.);
1489 Volume sglLog =
Volume(sglDDName, sglSolid, ns.material(apd.sglMat));
1490 const unsigned int copySGL(1);
1492 const string cerDDName(cer.name + sType);
1493 Solid cerSolid = Box(cer.xSizeHalf, cer.ySizeHalf, cer.thickHalf);
1494 Volume cerLog =
Volume(cerDDName, cerSolid, ns.material(cer.mat));
1495 unsigned int copyCER(0);
1497 const string bsiDDName(bSi.name + sType);
1498 Solid bsiSolid = Box(bSi.xSizeHalf, bSi.ySizeHalf, bSi.thickHalf);
1499 Volume bsiLog =
Volume(bsiDDName, bsiSolid, ns.material(bSi.mat));
1500 const unsigned int copyBSi(1);
1502 const string atjDDName(apd.atjName + sType);
1503 Solid atjSolid = Box(atjDDName, 0.5 * apd.side, 0.5 * apd.side, apd.atjThickHalf);
1504 Volume atjLog =
Volume(atjDDName, atjSolid, ns.material(apd.atjMat));
1505 const unsigned int copyATJ(1);
1507 const string aglDDName(apd.aglName + sType);
1508 Solid aglSolid = Box(bSi.xSizeHalf, bSi.ySizeHalf, 0.5 * apd.aglThick);
1509 Volume aglLog =
Volume(aglDDName, aglSolid, ns.material(apd.aglMat));
1510 const unsigned int copyAGL(1);
1512 const string andDDName(apd.andName + sType);
1513 Solid andSolid = Box(0.5 * apd.side, 0.5 * apd.side, 0.5 * apd.andThick);
1514 Volume andLog =
Volume(andDDName, andSolid, ns.material(apd.andMat));
1515 const unsigned int copyAND(1);
1517 const string apdDDName(apd.name + sType);
1518 Solid apdSolid = Box(apdDDName, 0.5 * apd.side, 0.5 * apd.side, 0.5 * apd.thick);
1519 Volume apdLog =
Volume(apdDDName, apdSolid, ns.material(apd.mat));
1520 const unsigned int copyAPD(1);
1524 const double delta(atan((HNom - hNom) / LNom));
1527 const double gamma(atan((ANom - aNom) / LNom));
1530 const double beta(atan((BNom - bNom) / LNom));
1531 const double sinbeta(
sin(
beta));
1534 const double alfClr(90_deg + atan((bNom - aNom) / (hNom + sClr)));
1536 const EcalTrap trapClr(0.5 * (ANom + sClr + rClr * singamma),
1537 0.5 * (aNom + sClr - fClr * singamma),
1538 0.5 * (bNom + sClr - fClr * sinbeta),
1539 0.5 * (HNom + sClr + rClr * sindelta),
1540 0.5 * (hNom + sClr - fClr * sindelta),
1541 0.5 * (LNom + fClr + rClr),
1547 const string clrDDName(cry.clrName + sType);
1548 Solid clrSolid = mytrap(clrDDName, trapClr);
1549 Volume clrLog =
Volume(clrDDName, clrSolid, ns.material(cry.clrMat));
1552 const double alfWrap(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap)));
1554 const EcalTrap trapWrap(0.5 * (trapClr.A() + 2. * sWrap + rWrap * singamma),
1555 0.5 * (trapClr.a() + 2. * sWrap - fWrap * singamma),
1556 0.5 * (trapClr.b() + 2. * sWrap - fWrap * sinbeta),
1557 0.5 * (trapClr.H() + 2. * sWrap + rWrap * sindelta),
1558 0.5 * (trapClr.h() + 2. * sWrap - fWrap * sindelta),
1559 0.5 * (trapClr.L() + fWrap + rWrap),
1561 aNom - ANom - (cryType > 9 ? 0 : 0.020_mm),
1565 const string wrapDDName(cry.wrapName + sType);
1566 Solid wrapSolid = mytrap(wrapDDName, trapWrap);
1567 Volume wrapLog =
Volume(wrapDDName, wrapSolid, ns.material(cry.wrapMat));
1571 const double alfWall(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap + 2. * sWall)));
1573 const EcalTrap trapWall(0.5 * (trapWrap.A() + 2 * sWall + rWall * singamma),
1574 0.5 * (trapWrap.a() + 2 * sWall - fWall * singamma),
1575 0.5 * (trapWrap.b() + 2 * sWall - fWall * sinbeta),
1576 0.5 * (trapWrap.H() + 2 * sWall + rWall * sindelta),
1577 0.5 * (trapWrap.h() + 2 * sWall - fWall * sindelta),
1578 0.5 * (trapWrap.L() + fWall + rWall),
1580 aNom - ANom - (cryType < 10 ? 0.150_mm : 0.100_mm),
1584 const string wallDDName(cry.wallName + sType);
1585 Solid wallSolid = mytrap(wallDDName, trapWall);
1586 Volume wallLog =
Volume(wallDDName, wallSolid, ns.material(cry.wallMat));
1589 const Vec3 cryToClr(0., 0., 0.5 * (rClr - fClr));
1590 clrLog.placeVolume(cryLog, copyOne,
Position(0_mm, 0_mm, 0.5 * (rClr - fClr)));
1592 edm::LogVerbatim(
"EcalGeom") << cryLog.name() <<
":" << copyOne <<
" positioned in " << clrLog.name();
1594 if (0 !=
cap.here) {
1595 bsiLog.placeVolume(aglLog, copyAGL,
Position(0_mm, 0_mm, -0.5 * apd.aglThick + bSi.thickHalf));
1597 edm::LogVerbatim(
"EcalGeom") << aglLog.name() <<
":" << copyAGL <<
" positioned in " << bsiLog.name();
1599 bsiLog.placeVolume(andLog, copyAND,
Position(0_mm, 0_mm, -0.5 * apd.andThick - apd.aglThick + bSi.thickHalf));
1601 edm::LogVerbatim(
"EcalGeom") << andLog.name() <<
":" << copyAND <<
" positioned in " << bsiLog.name();
1604 apdLog, copyAPD,
Position(0_mm, 0_mm, -0.5 * apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf));
1606 edm::LogVerbatim(
"EcalGeom") << apdLog.name() <<
":" << copyAPD <<
" positioned in " << bsiLog.name();
1611 Position(0_mm, 0_mm, -apd.atjThickHalf - apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf));
1613 edm::LogVerbatim(
"EcalGeom") << atjLog.name() <<
":" << copyATJ <<
" positioned in " << bsiLog.name();
1615 cerLog.placeVolume(bsiLog, copyBSi,
Position(0_mm, 0_mm, -bSi.thickHalf + cer.thickHalf));
1617 edm::LogVerbatim(
"EcalGeom") << bsiLog.name() <<
":" << copyBSi <<
" positioned in " << cerLog.name();
1619 capLog.placeVolume(sglLog, copySGL,
Position(0_mm, 0_mm, -0.5 * apd.sglThick +
cap.thickHalf));
1621 edm::LogVerbatim(
"EcalGeom") << sglLog.name() <<
":" << copySGL <<
" positioned in " << capLog.name();
1624 for (
unsigned int ijkl(0); ijkl != 2; ++ijkl) {
1625 capLog.placeVolume(cerLog,
1627 Position(trapCry.bl1() - (0 == ijkl ? apd.x1 : apd.x2),
1628 trapCry.h1() - apd.z,
1629 -apd.sglThick - cer.thickHalf +
cap.thickHalf));
1631 edm::LogVerbatim(
"EcalGeom") << cerLog.name() <<
":" << copyCER <<
" positioned in " << capLog.name();
1634 clrLog.placeVolume(capLog, copyCap,
Position(0_mm, 0_mm, -trapCry.dz() -
cap.thickHalf + 0.5 * (rClr - fClr)));
1636 edm::LogVerbatim(
"EcalGeom") << capLog.name() <<
":" << copyCap <<
" positioned in " << clrLog.name();
1640 const Vec3 clrToWrap(0, 0, 0.5 * (rWrap - fWrap));
1641 wrapLog.placeVolume(clrLog, copyOne,
Position(0_mm, 0_mm, 0.5 * (rWrap - fWrap)));
1643 edm::LogVerbatim(
"EcalGeom") << clrLog.name() <<
":" << copyOne <<
" positioned in " << wrapLog.name();
1647 const Vec3 wrapToWall1(0_mm, 0_mm, 0.5 * (rWall - fWall));
1648 const Vec3 wrapToWall(
Vec3((cryType > 9 ? 0_mm : 0.005_mm), 0_mm, 0_mm) + wrapToWall1);
1649 wallLog.placeVolume(
1652 Position(
Vec3((cryType > 9 ? 0_mm : 0.005_mm), 0_mm, 0_mm) + wrapToWall1));
1654 edm::LogVerbatim(
"EcalGeom") << wrapLog.name() <<
":" << copyOne <<
" positioned in " << wallLog.name();
1660 const double sidePrime(0.5 * (trapWall.a() - trapCry.a()));
1661 const double frontPrime(fWall + fWrap + fClr + 0.5 * LUnd);
1667 const unsigned int iWeb(0);
1669 const unsigned int copyOne(1);
1670 const double LWebx(
web.vecWebLength[iWeb]);
1671 const double BWebx(trapWall.b() + (trapWall.B() - trapWall.b()) * LWebx / trapWall.L());
1673 const double thick(
web.vecWebPlTh[iWeb] +
web.vecWebClrTh[iWeb]);
1674 const EcalTrap trapWebClr(0.5 * BWebx,
1681 trapWall.b() - BWebx,
1685 Solid webClrSolid = mytrap(webClrName, trapWebClr);
1686 Volume webClrLog =
Volume(webClrName, webClrSolid, ns.material(
web.clrMat));
1688 const EcalTrap trapWebPl(0.5 * trapWebClr.A(),
1689 0.5 * trapWebClr.a(),
1690 0.5 * trapWebClr.b(),
1691 0.5 *
web.vecWebPlTh[iWeb],
1692 0.5 *
web.vecWebPlTh[iWeb],
1693 0.5 * trapWebClr.L(),
1695 trapWebClr.b() - trapWebClr.B(),
1699 Solid webPlSolid = mytrap(webPlName, trapWebPl);
1700 Volume webPlLog =
Volume(webPlName, webPlSolid, ns.material(
web.plMat));
1702 webClrLog.placeVolume(webPlLog, copyOne);
1704 edm::LogVerbatim(
"EcalGeom") << webPlLog.name() <<
":" << copyOne <<
" positioned in " << webClrName;
1708 zee += trapWebClr.h() /
sin(
theta);
1712 const double zWeb(zee - frontPrime *
cos(
beta) + sidePrime *
sin(
beta));
1713 const double yWeb(frontPrime *
sin(
beta) + sidePrime *
cos(
beta));
1717 const Pt3D wedge1(wedge3 +
Pt3D(trapWebClr.a(), 0, 0));
1719 edm::LogVerbatim(
"EcalGeom") <<
"trap1=" << vWeb[0] <<
", trap2=" << vWeb[2] <<
", trap3=" << vWeb[3];
1720 edm::LogVerbatim(
"EcalGeom") <<
"wedge1=" << wedge1 <<
", wedge2=" << wedge2 <<
", wedge3=" << wedge3;
1722 const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
1724 if (0 !=
web.here) {
1725 hawRLog.placeVolume(
1729 myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()),
1730 Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1732 edm::LogVerbatim(
"EcalGeom") << webClrLog.name() <<
":" << copyOne <<
" positioned in " << hawRLog.name();
1735 zee += alv.vecGapAlvEta[0];
1738 for (
unsigned int etaAlv(1); etaAlv <= alv.nCryPerAlvEta; ++etaAlv) {
1741 <<
", frontPrime=" << frontPrime <<
", zeta=" << zeta <<
", delta=" <<
delta
1745 zee += 0.075_mm + (side *
cos(zeta) + trapWall.h() - sidePrime) /
sin(
theta);
1749 const Pt3D trap2(vCry[2] + cryToClr + clrToWrap + wrapToWall);
1751 const Pt3D trap3(trap2 +
Pt3D(0, -trapCry.h(), 0));
1752 const Pt3D trap1(trap3 +
Pt3D(-trapCry.a(), 0, 0));
1754 const Pt3D wedge3(vHAW[4] +
Pt3D(sidePrime, alvWedge.hawYOffCry, zee));
1756 const Pt3D wedge1(wedge3 +
Pt3D(trapCry.a(), 0, 0));
1758 const Tf3D tForm1(trap1, trap2, trap3, wedge1, wedge2, wedge3);
1760 const double xx(0.050_mm);
1762 const Tf3D tForm(HepGeom::Translate3D(
xx, 0, 0) * tForm1);
1763 hawRLog.placeVolume(
1766 Transform3D(myrot(ns, wallDDName +
"_" + std::to_string(etaAlv), tForm.getRotation()),
1767 Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1769 edm::LogVerbatim(
"EcalGeom") << wallLog.name() <<
":" << etaAlv <<
" positioned in " << hawRLog.name();
1775 if (5 == cryType || 9 == cryType || 13 == cryType || 17 == cryType) {
1776 zee += 0.5 * alv.vecGapAlvEta[cryType] /
sin(
theta);
1778 const unsigned int iWeb(cryType / 4);
1780 const unsigned int copyOne(1);
1781 const double LWebx(
web.vecWebLength[iWeb]);
1782 const double BWebx(trapWall.a() + (trapWall.A() - trapWall.a()) * LWebx / trapWall.L());
1784 const double thick(
web.vecWebPlTh[iWeb] +
web.vecWebClrTh[iWeb]);
1785 const EcalTrap trapWebClr(0.5 * BWebx,
1792 trapWall.a() - BWebx,
1796 Solid webClrSolid = mytrap(webClrName, trapWebClr);
1797 Volume webClrLog =
Volume(webClrName, webClrSolid, ns.material(
web.clrMat));
1799 const EcalTrap trapWebPl(0.5 * trapWebClr.A(),
1800 0.5 * trapWebClr.a(),
1801 0.5 * trapWebClr.b(),
1802 0.5 *
web.vecWebPlTh[iWeb],
1803 0.5 *
web.vecWebPlTh[iWeb],
1804 0.5 * trapWebClr.L(),
1806 trapWebClr.b() - trapWebClr.B(),
1810 Solid webPlSolid = mytrap(webPlName, trapWebPl);
1811 Volume webPlLog =
Volume(webPlName, webPlSolid, ns.material(
web.plMat));
1813 webClrLog.placeVolume(webPlLog, copyOne);
1815 edm::LogVerbatim(
"EcalGeom") << webPlLog.name() <<
":" << copyOne <<
" positioned in " << webClrName;
1819 zee += trapWebClr.h() /
sin(
theta);
1823 const double zWeb(zee - frontPrime *
cos(
beta) + sidePrime *
sin(
beta));
1824 const double yWeb(frontPrime *
sin(
beta) + sidePrime *
cos(
beta));
1828 const Pt3D wedge1(wedge3 +
Pt3D(trapWebClr.a(), 0, 0));
1830 edm::LogVerbatim(
"EcalGeom") <<
"trap1=" << vWeb[0] <<
", trap2=" << vWeb[2] <<
", trap3=" << vWeb[3];
1831 edm::LogVerbatim(
"EcalGeom") <<
"wedge1=" << wedge1 <<
", wedge2=" << wedge2 <<
", wedge3=" << wedge3;
1833 const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
1835 if (0 !=
web.here) {
1836 hawRLog.placeVolume(
1840 myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()),
1841 Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1843 edm::LogVerbatim(
"EcalGeom") << webClrLog.name() <<
":" << copyOne <<
" positioned in " << hawRLog.name();
1847 zee += 0.5 * alv.vecGapAlvEta[cryType] /
sin(
theta);
1850 zee += alv.vecGapAlvEta[cryType] /
sin(
theta);
1865 if (0 != back.here) {
1872 const Position outtra(back.xOff + 0.5 * back.sideHeight, back.yOff, 0.5 * back.sideLength);
1874 const double realBPthick(back.plateThick + back.plate2Thick);
1875 array<double, 3> backPlateParms{{0.5 * back.plateWidth, 0.5 * realBPthick, 0.5 * back.plateLength}};
1876 Solid backPlateSolid = Box(backPlateParms[0], backPlateParms[1], backPlateParms[2]);
1877 Volume backPlateLog =
Volume(back.plateName, backPlateSolid, ns.material(back.plateMat));
1880 0.5 * back.sideHeight + backPlateParms[1], 0_mm, backPlateParms[2] - 0.5 * back.sideLength);
1882 Solid backPlate2Solid = Box(0.5 * back.plateWidth, 0.5 * back.plate2Thick, 0.5 * back.plateLength);
1883 Volume backPlate2Log =
Volume(back.plate2Name, backPlate2Solid, ns.material(back.plate2Mat));
1885 const Position backPlate2Tra(0_mm, -backPlateParms[1] + back.plate2Thick / 2., 0_mm);
1886 if (0 != back.plateHere) {
1887 backPlateLog.placeVolume(backPlate2Log, copyOne, Transform3D(backPlate2Tra));
1889 edm::LogVerbatim(
"EcalGeom") << backPlate2Log.name() <<
":" << copyOne <<
" positioned in "
1890 << backPlateLog.name();
1895 Transform3D(myrot(ns, back.plateName +
"Rot5", CLHEP::HepRotationZ(270_deg)), outtra + backPlateTra));
1897 edm::LogVerbatim(
"EcalGeom") << backPlateLog.name() <<
":" << copyOne <<
" positioned in "
1913 const EcalTrap trapBS(back.sideWidth / 2.,
1914 back.sideWidth / 2.,
1915 back.sideWidth / 4.,
1916 back.sideHeight / 2.,
1917 back.sideHeight / 2.,
1918 back.sideLength / 2.,
1924 Solid backSideSolid = mytrap(back.sideName, trapBS);
1925 Volume backSideLog =
Volume(back.sideName, backSideSolid, ns.material(back.sideMat));
1927 const Position backSideTra1(0_mm, back.plateWidth / 2 + back.sideYOff1, 1_mm);
1928 if (0 != back.sideHere) {
1932 Transform3D(myrot(ns, back.sideName +
"Rot8", CLHEP::HepRotationX(180_deg) * CLHEP::HepRotationZ(90_deg)),
1933 outtra + backSideTra1));
1935 edm::LogVerbatim(
"EcalGeom") << backSideLog.name() <<
":" << copyOne <<
" positioned in "
1938 const Position backSideTra2(0_mm, -back.plateWidth / 2 + back.sideYOff2, 1_mm);
1942 Transform3D(myrot(ns, back.sideName +
"Rot9", CLHEP::HepRotationZ(90_deg)), outtra + backSideTra2));
1944 edm::LogVerbatim(
"EcalGeom") << backSideLog.name() <<
":" << copyTwo <<
" positioned in "
1955 const double backCoolWidth(backCool.barWidth + 2. * backCoolTank.width);
1963 const double manifCut(2_mm);
1965 Solid mBManifSolid = Tube(0, mbManif.outDiam / 2, backCoolWidth / 2. - manifCut, 0_deg, 360_deg);
1966 Volume mBManifLog =
Volume(mbManif.name, mBManifSolid, ns.material(mbManif.mat));
1968 const string mBManifWaName(mbManif.name +
"Wa");
1969 Solid mBManifWaSolid = Tube(0, mbManif.innDiam / 2, backCoolWidth / 2. - manifCut, 0_deg, 360_deg);
1970 Volume mBManifWaLog(mBManifWaName, mBManifWaSolid, ns.material(backPipe.waterMat));
1971 mBManifLog.placeVolume(mBManifWaLog, copyOne);
1973 edm::LogVerbatim(
"EcalGeom") << mBManifWaLog.name() <<
":" << copyOne <<
" positioned in " << mBManifLog.name();
1988 const double deltaY(-5_mm);
1990 Solid grEdgeSlotSolid = Box(grille.edgeSlotHeight / 2., grille.edgeSlotWidth / 2., grille.thick / 2.);
1991 Volume grEdgeSlotLog =
Volume(grille.edgeSlotName, grEdgeSlotSolid, ns.material(grille.edgeSlotMat));
1993 unsigned int edgeSlotCopy(0);
1994 unsigned int midSlotCopy(0);
1998 for (
unsigned int iGr(0); iGr != grille.vecHeight.size(); ++iGr) {
1999 string gName(grille.name + std::to_string(iGr));
2000 Solid grilleSolid = Box(gName, grille.vecHeight[iGr] / 2., backCoolWidth / 2., grille.thick / 2.);
2001 Volume grilleLog =
Volume(gName, grilleSolid, ns.material(grille.mat));
2003 const Position grilleTra(-realBPthick / 2 - grille.vecHeight[iGr] / 2,
2005 grille.vecZOff[iGr] + grille.thick / 2 - back.sideLength / 2);
2006 const Position gTra(outtra + backPlateTra + grilleTra);
2008 if (0 != grille.midSlotHere && 0 != iGr) {
2009 if (0 == (iGr - 1) % 2) {
2010 string mName(grille.midSlotName + std::to_string(iGr / 2));
2011 Solid grMidSlotSolid =
2012 Box(mName, grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., grille.midSlotWidth / 2., grille.thick / 2.);
2013 grMidSlotLog[(iGr - 1) / 2] =
Volume(mName, grMidSlotSolid, ns.material(grille.midSlotMat));
2015 grilleLog.placeVolume(
2016 grMidSlotLog[(iGr - 1) / 2],
2019 grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., +grille.midSlotXOff, 0)));
2021 edm::LogVerbatim(
"EcalGeom") << grMidSlotLog[(iGr - 1) / 2].
name() <<
":" << midSlotCopy <<
" positioned in "
2022 << grilleLog.name();
2024 grilleLog.placeVolume(
2025 grMidSlotLog[(iGr - 1) / 2],
2028 grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., -grille.midSlotXOff, 0)));
2030 edm::LogVerbatim(
"EcalGeom") << grMidSlotLog[(iGr - 1) / 2].
name() <<
":" << midSlotCopy <<
" positioned in "
2031 << grilleLog.name();
2035 if (0 != grille.edgeSlotHere && 0 != iGr) {
2036 grilleLog.placeVolume(grEdgeSlotLog,
2038 Transform3D(
Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.,
2039 backCoolWidth / 2 - grille.edgeSlotWidth / 2.,
2042 edm::LogVerbatim(
"EcalGeom") << grEdgeSlotLog.name() <<
":" << edgeSlotCopy <<
" positioned in "
2043 << grilleLog.name();
2045 grilleLog.placeVolume(grEdgeSlotLog,
2047 Transform3D(
Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.,
2048 -backCoolWidth / 2 + grille.edgeSlotWidth / 2.,
2051 edm::LogVerbatim(
"EcalGeom") << grEdgeSlotLog.name() <<
":" << edgeSlotCopy <<
" positioned in "
2052 << grilleLog.name();
2055 if (0 != grille.here) {
2056 spmLog.placeVolume(grilleLog, iGr, Transform3D(gTra));
2058 edm::LogVerbatim(
"EcalGeom") << grilleLog.name() <<
":" << iGr <<
" positioned in "
2063 if ((0 != iGr % 2) && (0 != mbManif.here)) {
2064 spmLog.placeVolume(mBManifLog,
2066 Transform3D(myrot(ns, mbManif.name +
"R1", CLHEP::HepRotationX(90_deg)),
2067 gTra -
Position(-mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2.,
2069 grille.thick / 2. + 3 * mbManif.outDiam / 2.)));
2071 edm::LogVerbatim(
"EcalGeom") << mBManifLog.name() <<
":" << iGr <<
" positioned in "
2074 spmLog.placeVolume(mBManifLog,
2076 Transform3D(myrot(ns, mbManif.name +
"R2", CLHEP::HepRotationX(90_deg)),
2077 gTra -
Position(-3 * mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2.,
2079 grille.thick / 2 + 3 * mbManif.outDiam / 2.)));
2081 edm::LogVerbatim(
"EcalGeom") << mBManifLog.name() <<
":" << (iGr - 1) <<
" positioned in "
2099 Solid backCoolBarSolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., backCool.barThick / 2.);
2100 Volume backCoolBarLog =
Volume(backCool.barName, backCoolBarSolid, ns.material(backCool.barMat));
2102 Solid backCoolBarSSSolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., backCool.barSSThick / 2.);
2103 Volume backCoolBarSSLog =
Volume(backCool.barSSName, backCoolBarSSSolid, ns.material(backCool.barSSMat));
2104 const Position backCoolBarSSTra(0, 0, 0);
2105 backCoolBarLog.placeVolume(backCoolBarSSLog, copyOne, Transform3D(backCoolBarSSTra));
2107 edm::LogVerbatim(
"EcalGeom") << backCoolBarSSLog.name() <<
":" << copyOne <<
" positioned in "
2108 << backCoolBarLog.name();
2111 Solid backCoolBarWaSolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., backCool.barWaThick / 2.);
2112 Volume backCoolBarWaLog =
Volume(backCool.barWaName, backCoolBarWaSolid, ns.material(backCool.barWaMat));
2113 const Position backCoolBarWaTra(0, 0, 0);
2114 backCoolBarSSLog.placeVolume(backCoolBarWaLog, copyOne, Transform3D(backCoolBarWaTra));
2116 edm::LogVerbatim(
"EcalGeom") << backCoolBarWaLog.name() <<
":" << copyOne <<
" positioned in "
2117 << backCoolBarSSLog.name();
2133 for (
unsigned int iLyr(0); iLyr != backCool.vecBackVFELyrThick.size(); ++iLyr) {
2134 thickVFE += backCool.vecBackVFELyrThick[iLyr];
2136 Solid backVFESolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., thickVFE / 2.);
2137 Volume backVFELog = ns.addVolume(
Volume(myns + backCool.vFEName, backVFESolid, ns.material(backCool.vFEMat)));
2138 Position offTra(0, 0, -thickVFE / 2);
2139 for (
unsigned int iLyr(0); iLyr != backCool.vecBackVFELyrThick.size(); ++iLyr) {
2140 Solid backVFELyrSolid =
2141 Box(backCool.barHeight / 2., backCool.barWidth / 2., backCool.vecBackVFELyrThick[iLyr] / 2.);
2143 Volume(backCool.vecBackVFELyrName[iLyr], backVFELyrSolid, ns.material(backCool.vecBackVFELyrMat[iLyr]));
2144 const Position backVFELyrTra(0, 0, backCool.vecBackVFELyrThick[iLyr] / 2);
2145 backVFELog.placeVolume(backVFELyrLog, copyOne, Transform3D(backVFELyrTra + offTra));
2147 edm::LogVerbatim(
"EcalGeom") << backVFELyrLog.name() <<
":" << copyOne <<
" positioned in "
2150 offTra += 2 * backVFELyrTra;
2165 const double halfZCoolVFE(thickVFE + backCool.barThick / 2.);
2166 Solid backCoolVFESolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., halfZCoolVFE);
2167 Volume backCoolVFELog =
Volume(backCool.backVFEName, backCoolVFESolid, ns.material(backCool.backVFEMat));
2168 if (0 != backCool.barHere) {
2169 backCoolVFELog.placeVolume(backCoolBarLog, copyOne, Transform3D());
2171 edm::LogVerbatim(
"EcalGeom") << backCoolBarLog.name() <<
":" << copyOne <<
" positioned in "
2172 << backCoolVFELog.name();
2175 if (0 != backCool.vFEHere) {
2176 backCoolVFELog.placeVolume(
2177 backVFELog, copyOne, Transform3D(
Position(0, 0, backCool.barThick / 2. + thickVFE / 2.)));
2180 << backCoolVFELog.name();
2183 backCoolVFELog.placeVolume(backVFELog,
2185 Transform3D(myrot(ns, backCool.backVFEName +
"Flip", CLHEP::HepRotationX(180_deg)),
2186 Position(0, 0, -backCool.barThick / 2. - thickVFE / 2.)));
2189 << backCoolVFELog.name();
2203 unsigned int iCVFECopy(1);
2204 unsigned int iSep(0);
2205 unsigned int iNSec(0);
2206 const unsigned int nMisc(backMisc.vecThick.size() / 4);
2207 for (
unsigned int iMod(0); iMod != 4; ++iMod) {
2208 const double pipeLength(grille.vecZOff[2 * iMod + 1] - grille.vecZOff[2 * iMod] - grille.thick - 3_mm);
2209 const double pipeZPos(grille.vecZOff[2 * iMod + 1] - pipeLength / 2 - 1.5_mm);
2212 double backCoolHeight(backCool.barHeight + mbCoolTube.outDiam);
2213 for (
unsigned int iMisc(0); iMisc != nMisc; ++iMisc) {
2214 backCoolHeight += backMisc.vecThick[iMod * nMisc + iMisc];
2216 double bottomThick(mbCoolTube.outDiam);
2217 for (
unsigned int iMB(0); iMB != mbLyr.vecMBLyrThick.size(); ++iMB) {
2218 backCoolHeight += mbLyr.vecMBLyrThick[iMB];
2219 bottomThick += mbLyr.vecMBLyrThick[iMB];
2222 const double halfZBCool((pipeLength - 2 * mbManif.outDiam - grille.zSpace) / 2);
2223 Solid backCoolSolid = Box(backCoolHeight / 2., backCoolWidth / 2., halfZBCool);
2224 Volume backCoolLog =
Volume(backCool.vecName[iMod], backCoolSolid, ns.material(spm.mat));
2227 -realBPthick / 2 + backCoolHeight / 2 - grille.vecHeight[2 * iMod],
2229 grille.vecZOff[2 * iMod] + grille.thick + grille.zSpace + halfZBCool - back.sideLength / 2);
2230 if (0 != backCool.here) {
2231 spmLog.placeVolume(backCoolLog, iMod + 1, outtra + backPlateTra + bCoolTra);
2233 edm::LogVerbatim(
"EcalGeom") << backCoolLog.name() <<
":" << (iMod + 1) <<
" positioned in "
2239 const double backCoolTankHeight(backCool.barHeight);
2240 const double halfZTank(halfZBCool - 5_cm);
2242 string bTankName(backCoolTank.name + std::to_string(iMod + 1));
2243 Solid backCoolTankSolid = Box(backCoolTankHeight / 2., backCoolTank.width / 2., halfZTank);
2244 Volume backCoolTankLog =
Volume(bTankName, backCoolTankSolid, ns.material(backCoolTank.mat));
2245 if (0 != backCoolTank.here) {
2246 backCoolLog.placeVolume(backCoolTankLog,
2248 Transform3D(Rotation3D(),
2249 Position(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick,
2250 backCool.barWidth / 2. + backCoolTank.width / 2.,
2253 edm::LogVerbatim(
"EcalGeom") << backCoolTankLog.name() <<
":" << copyOne <<
" positioned in "
2254 << backCoolLog.name();
2258 string bTankWaName(backCoolTank.waName + std::to_string(iMod + 1));
2259 Solid backCoolTankWaSolid = Box(backCoolTankHeight / 2. - backCoolTank.thick / 2.,
2260 backCoolTank.waWidth / 2.,
2261 halfZTank - backCoolTank.thick / 2.);
2262 Volume backCoolTankWaLog =
Volume(bTankWaName, backCoolTankWaSolid, ns.material(backCoolTank.waMat));
2263 backCoolTankLog.placeVolume(backCoolTankWaLog, copyOne, Transform3D(Rotation3D(),
Position(0, 0, 0)));
2265 edm::LogVerbatim(
"EcalGeom") << backCoolTankWaLog.name() <<
":" << copyOne <<
" positioned in "
2266 << backCoolTankLog.name();
2269 string bBracketName(backCoolTank.backBracketName + std::to_string(iMod + 1));
2270 Solid backBracketSolid = Box(backCoolTank.backBracketHeight / 2., backCoolTank.width / 2., halfZTank);
2271 Volume backBracketLog =
Volume(bBracketName, backBracketSolid, ns.material(backCoolTank.backBracketMat));
2272 if (0 != backCoolTank.here) {
2273 backCoolLog.placeVolume(backBracketLog,
2275 Transform3D(Rotation3D(),
2276 Position(backCool.barHeight - backCoolHeight / 2. -
2277 backCoolTank.backBracketHeight / 2. + bottomThick,
2278 -backCool.barWidth / 2. - backCoolTank.width / 2.,
2281 edm::LogVerbatim(
"EcalGeom") << backBracketLog.name() <<
":" << copyOne <<
" positioned in "
2282 << backCoolLog.name();
2287 Position bSumTra(backCool.barHeight - backCoolHeight / 2. + bottomThick, 0, 0);
2288 for (
unsigned int j(0);
j != nMisc; ++
j) {
2290 Box(backMisc.vecThick[iMod * nMisc +
j] / 2, backCool.barWidth / 2. + backCoolTank.width, halfZBCool);
2293 Volume(backMisc.vecName[iMod * nMisc +
j], bSolid, ns.material(backMisc.vecMat[iMod * nMisc +
j]));
2295 const Position bTra(backMisc.vecThick[iMod * nMisc +
j] / 2, 0_mm, 0_mm);
2297 if (0 != backMisc.here) {
2298 backCoolLog.placeVolume(bLog, copyOne, Transform3D(Rotation3D(), bSumTra + bTra));
2300 edm::LogVerbatim(
"EcalGeom") << bLog.name() <<
":" << copyOne <<
" positioned in " << backCoolLog.name();
2304 bSumTra += 2 * bTra;
2307 const double bHalfWidth(backCool.barWidth / 2. + backCoolTank.width);
2309 if (0 != mbLyr.here) {
2310 Position mTra(-backCoolHeight / 2. + mbCoolTube.outDiam, 0, 0);
2311 for (
unsigned int j(0);
j != mbLyr.vecMBLyrThick.size(); ++
j)
2313 Solid mSolid = Box(mbLyr.vecMBLyrThick[
j] / 2, bHalfWidth, halfZBCool);
2315 mbLyr.vecMBLyrName[
j] +
"_" + std::to_string(iMod + 1), mSolid, ns.material(mbLyr.vecMBLyrMat[
j]));
2317 mTra +=
Position(mbLyr.vecMBLyrThick[
j] / 2.0, 0_mm, 0_mm);
2318 backCoolLog.placeVolume(mLog, copyOne, Transform3D(Rotation3D(), mTra));
2320 edm::LogVerbatim(
"EcalGeom") << mLog.name() <<
":" << copyOne <<
" positioned in " << backCoolLog.name();
2322 mTra +=
Position(mbLyr.vecMBLyrThick[
j] / 2.0, 0_mm, 0_mm);
2326 if (0 != mbCoolTube.here) {
2327 const string mBName(mbCoolTube.name +
"_" + std::to_string(iMod + 1));
2329 Solid mBCoolTubeSolid = Tube(0, mbCoolTube.outDiam / 2, halfZBCool, 0_deg, 360_deg);
2330 Volume mBLog =
Volume(mBName, mBCoolTubeSolid, ns.material(mbCoolTube.mat));
2332 const string mBWaName(mbCoolTube.name +
"Wa_" + std::to_string(iMod + 1));
2333 Solid mBCoolTubeWaSolid = Tube(mBWaName, 0, mbCoolTube.innDiam / 2, halfZBCool, 0_deg, 360_deg);
2334 Volume mBWaLog =
Volume(mBWaName, mBCoolTubeWaSolid, ns.material(backPipe.waterMat));
2335 mBLog.placeVolume(mBWaLog, copyOne);
2337 edm::LogVerbatim(
"EcalGeom") << mBWaLog.name() <<
":" << copyOne <<
" positioned in " << mBLog.name();
2340 for (
unsigned int j(0);
j != dryAirTube.mbCoolTubeNum; ++
j)
2342 backCoolLog.placeVolume(mBLog,
2344 Transform3D(Rotation3D(),
2345 Position(-backCoolHeight / 2.0 + mbCoolTube.outDiam / 2.,
2346 -bHalfWidth + (
j + 1) * bHalfWidth / 5,
2349 edm::LogVerbatim(
"EcalGeom") << mBLog.name() <<
":" << (2 *
j + 1) <<
" positioned in "
2350 << backCoolLog.name();
2360 if (0 != backPipe.here && 0 != iMod) {
2361 string bPipeName(backPipe.name +
"_" + std::to_string(iMod + 1));
2362 string bInnerName(backPipe.name +
"_H2O_" + std::to_string(iMod + 1));
2364 Solid backPipeSolid = Tube(bPipeName, 0_mm, backPipe.vecDiam[iMod] / 2, pipeLength / 2, 0_deg, 360_deg);
2365 Solid backInnerSolid = Tube(
2366 bInnerName, 0_mm, backPipe.vecDiam[iMod] / 2 - backPipe.vecThick[iMod], pipeLength / 2, 0_deg, 360_deg);
2368 Volume backPipeLog =
Volume(bPipeName, backPipeSolid, ns.material(backPipe.mat));
2369 Volume backInnerLog =
Volume(bInnerName, backInnerSolid, ns.material(backPipe.waterMat));
2371 const Position bPipeTra1(back.xOff + back.sideHeight - 0.7 * backPipe.vecDiam[iMod],
2372 back.yOff + back.plateWidth / 2 - back.sideWidth - 0.7 * backPipe.vecDiam[iMod],
2375 spmLog.placeVolume(backPipeLog, copyOne, Transform3D(Rotation3D(), bPipeTra1));
2377 edm::LogVerbatim(
"EcalGeom") << backPipeLog.name() <<
":" << copyOne <<
" positioned in "
2381 bPipeTra1.x(), back.yOff - back.plateWidth / 2 + back.sideWidth + backPipe.vecDiam[iMod], bPipeTra1.z());
2383 spmLog.placeVolume(backPipeLog, copyTwo, Transform3D(Rotation3D(), bPipeTra2));
2385 edm::LogVerbatim(
"EcalGeom") << backPipeLog.name() <<
":" << copyTwo <<
" positioned in "
2389 backPipeLog.placeVolume(backInnerLog, copyOne, Transform3D(Rotation3D(),
Position()));
2391 edm::LogVerbatim(
"EcalGeom") << backInnerLog.name() <<
":" << copyOne <<
" positioned in "
2392 << backPipeLog.name();
2403 if (0 != dryAirTube.here) {
2404 string dryAirTubName(dryAirTube.name + std::to_string(iMod + 1));
2406 Solid dryAirTubeSolid =
2407 Tube(dryAirTubName, dryAirTube.innDiam / 2, dryAirTube.outDiam / 2, pipeLength / 2, 0_deg, 360_deg);
2408 Volume dryAirTubeLog =
Volume(ns.prepend(dryAirTubName), dryAirTubeSolid, ns.material(dryAirTube.mat));
2410 const Position dryAirTubeTra1(back.xOff + back.sideHeight - 0.7 * dryAirTube.outDiam - backPipe.vecDiam[iMod],
2411 back.yOff + back.plateWidth / 2 - back.sideWidth - 1.2 * dryAirTube.outDiam,
2414 spmLog.placeVolume(dryAirTubeLog, copyOne, Transform3D(Rotation3D(), dryAirTubeTra1));
2416 edm::LogVerbatim(
"EcalGeom") << dryAirTubeLog.name() <<
":" << copyOne <<
" positioned in "
2420 const Position dryAirTubeTra2(dryAirTubeTra1.x(),
2421 back.yOff - back.plateWidth / 2 + back.sideWidth + 0.7 * dryAirTube.outDiam,
2422 dryAirTubeTra1.z());
2424 spmLog.placeVolume(dryAirTubeLog, copyTwo, Transform3D(Rotation3D(), dryAirTubeTra2));
2426 edm::LogVerbatim(
"EcalGeom") << dryAirTubeLog.name() <<
":" << copyTwo <<
" positioned in "
2438 Position cTra(backCool.barHeight / 2. - backCoolHeight / 2. + bottomThick, 0, -halfZTank + halfZCoolVFE);
2439 const unsigned int numSec(static_cast<unsigned int>(backCool.vecBackCoolNSec[iMod]));
2440 for (
unsigned int jSec(0); jSec != numSec; ++jSec) {
2441 const unsigned int nMax(static_cast<unsigned int>(backCool.vecBackCoolNPerSec[iNSec++]));
2442 for (
unsigned int iBar(0); iBar !=
nMax; ++iBar) {
2443 backCoolLog.placeVolume(backCoolVFELog, iCVFECopy++, cTra);
2445 edm::LogVerbatim(
"EcalGeom") << backCoolVFELog.name() <<
":" << iCVFECopy <<
" positioned in "
2446 << backCoolLog.name();
2448 cTra +=
Position(0, 0, backMisc.backCBStdSep);
2450 cTra -=
Position(0, 0, backMisc.backCBStdSep);
2451 if (jSec != numSec - 1)
2452 cTra +=
Position(0, 0, backCool.vecBackCoolSecSep[iSep++]);
2473 double patchHeight(0);
2474 for (
unsigned int iPatch(0); iPatch != patchPanel.vecThick.size(); ++iPatch) {
2475 patchHeight += patchPanel.vecThick[iPatch];
2478 array<double, 3> patchParms{
2479 {patchHeight / 2., backCool.barWidth / 2., (spm.vecZPts.back() - grille.vecZOff.back() - grille.thick) / 2}};
2480 Solid patchSolid = Box(patchParms[0], patchParms[1], patchParms[2]);
2481 Volume patchLog =
Volume(patchPanel.name, patchSolid, ns.material(spm.mat));
2483 const Position patchTra(back.xOff + 4_mm, 0_mm, grille.vecZOff.back() + grille.thick + patchParms[2]);
2484 if (0 != patchPanel.here) {
2485 spmLog.placeVolume(patchLog, copyOne, patchTra);
2487 edm::LogVerbatim(
"EcalGeom") << patchLog.name() <<
":" << copyOne <<
" positioned in "
2492 Position pTra(-patchParms[0], 0, 0);
2494 for (
unsigned int j(0);
j != patchPanel.vecNames.size(); ++
j) {
2495 Solid pSolid = Box(patchPanel.vecThick[
j] / 2., patchParms[1], patchParms[2]);
2496 Volume pLog =
Volume(patchPanel.vecNames[
j], pSolid, ns.material(patchPanel.vecMat[
j]));
2498 pTra +=
Position(patchPanel.vecThick[
j] / 2, 0_mm, 0_mm);
2499 patchLog.placeVolume(pLog, copyOne, pTra);
2501 edm::LogVerbatim(
"EcalGeom") << pLog.name() <<
":" << copyOne <<
" positioned in " << patchLog.name();
2504 pTra +=
Position(patchPanel.vecThick[
j] / 2, 0_mm, 0_mm);
2518 if (0 != pincer.rodHere) {
2521 Solid rodSolid = Box(pincer.rodName, pincer.envWidthHalf, pincer.envHeightHalf, ilyLengthHalf);
2522 Volume rodLog =
Volume(pincer.rodName, rodSolid, ns.material(pincer.rodMat));
2524 array<double, 3> envParms{{pincer.envWidthHalf, pincer.envHeightHalf, pincer.envLengthHalf}};
2525 Solid envSolid = Box(pincer.envName, envParms[0], envParms[1], envParms[2]);
2526 Volume envLog =
Volume(pincer.envName, envSolid, ns.material(pincer.envMat));
2528 array<double, 3> blkParms{{pincer.envWidthHalf, pincer.envHeightHalf, pincer.blkLengthHalf}};
2529 Solid blkSolid = Box(pincer.blkName, blkParms[0], blkParms[1], blkParms[2]);
2530 Volume blkLog =
Volume(pincer.blkName, blkSolid, ns.material(pincer.blkMat));
2532 envLog.placeVolume(blkLog, copyOne,
Position(0_mm, 0_mm, pincer.envLengthHalf - pincer.blkLengthHalf));
2534 edm::LogVerbatim(
"EcalGeom") << blkLog.name() <<
":" << copyOne <<
" positioned in " << envLog.name();
2537 array<double, 3> cutParms{{pincer.cutWidth / 2., pincer.cutHeight / 2., pincer.blkLengthHalf}};
2538 Solid cutSolid = Box(pincer.cutName, cutParms[0], cutParms[1], cutParms[2]);
2539 Volume cutLog =
Volume(pincer.cutName, cutSolid, ns.material(pincer.cutMat));
2544 +blkParms[0] - cutParms[0] - pincer.shim1Width + pincer.shim2Width, -blkParms[1] + cutParms[1], 0_mm));
2546 edm::LogVerbatim(
"EcalGeom") << cutLog.name() <<
":" << copyOne <<
" positioned in " << blkLog.name();
2548 array<double, 3> shim2Parms{{pincer.shim2Width / 2., pincer.shimHeight / 2., pincer.blkLengthHalf}};
2549 Solid shim2Solid = Box(pincer.shim2Name, shim2Parms[0], shim2Parms[1], shim2Parms[2]);
2550 Volume shim2Log =
Volume(pincer.shim2Name, shim2Solid, ns.material(pincer.shimMat));
2552 shim2Log, copyOne,
Position(+cutParms[0] - shim2Parms[0], -cutParms[1] + shim2Parms[1], 0_mm));
2554 edm::LogVerbatim(
"EcalGeom") << shim2Log.name() <<
":" << copyOne <<
" positioned in " << cutLog.name();
2557 array<double, 3> shim1Parms{
2558 {pincer.shim1Width / 2., pincer.shimHeight / 2., pincer.envLengthHalf - pincer.blkLengthHalf}};
2559 Solid shim1Solid = Box(pincer.shim1Name, shim1Parms[0], shim1Parms[1], shim1Parms[2]);
2560 Volume shim1Log =
Volume(pincer.shim1Name, shim1Solid, ns.material(pincer.shimMat));
2564 Position(+envParms[0] - shim1Parms[0], -envParms[1] + shim1Parms[1], -envParms[2] + shim1Parms[2]));
2566 edm::LogVerbatim(
"EcalGeom") << shim1Log.name() <<
":" << copyOne <<
" positioned in " << envLog.name();
2569 for (
unsigned int iEnv(0); iEnv != pincer.vecEnvZOff.size(); ++iEnv) {
2571 envLog, 1 + iEnv,
Position(0_mm, 0_mm, -ilyLengthHalf + pincer.vecEnvZOff[iEnv] - pincer.envLengthHalf));
2573 edm::LogVerbatim(
"EcalGeom") << envLog.name() <<
":" << (1 + iEnv) <<
" positioned in " << rodLog.name();
2578 const double radius(ilyRMin - pincer.envHeightHalf - 1_mm);
2579 const string xilyName(ily.name + std::to_string(ily.vecIlyMat.size() - 1));
2581 for (
unsigned int iRod(0); iRod != pincer.vecRodAzimuth.size(); ++iRod) {
2583 radius *
cos(pincer.vecRodAzimuth[iRod]),
radius *
sin(pincer.vecRodAzimuth[iRod]), 0_mm);
2584 xilyLog.placeVolume(rodLog,
2586 Transform3D(myrot(ns,
2587 pincer.rodName + std::to_string(iRod),
2588 CLHEP::HepRotationZ(90_deg + pincer.vecRodAzimuth[iRod])),
2591 edm::LogVerbatim(
"EcalGeom") << rodLog.name() <<
":" << (1 + iRod) <<
" positioned in " << xilyLog.name();