CMS 3D CMS Logo

Typedefs | Functions
DDEcalBarrelNewAlgo.cc File Reference
#include "DD4hep/DetFactoryHelper.h"
#include "DD4hep/Printout.h"
#include "DataFormats/Math/interface/CMSUnits.h"
#include "DetectorDescription/Core/interface/DDSplit.h"
#include "DetectorDescription/DDCMS/interface/DDPlugins.h"
#include "DetectorDescription/DDCMS/interface/BenchmarkGrd.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Geometry/CaloGeometry/interface/EcalTrapezoidParameters.h"
#include "Math/AxisAngle.h"
#include "CLHEP/Geometry/Point3D.h"
#include "CLHEP/Geometry/Vector3D.h"
#include "CLHEP/Geometry/Transform3D.h"

Go to the source code of this file.

Typedefs

using EcalTrap = EcalTrapezoidParameters
 
using Pt3D = HepGeom::Point3D< double >
 
using Ro3D = HepGeom::Rotate3D
 
using Rota = CLHEP::HepRotation
 
using RoX3D = HepGeom::RotateX3D
 
using RoZ3D = HepGeom::RotateZ3D
 
using Tf3D = HepGeom::Transform3D
 
using Tl3D = HepGeom::Translate3D
 
using Vec3 = CLHEP::Hep3Vector
 
using VecDouble = vector< double >
 
using VecStr = vector< string >
 

Functions

static long algorithm (dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
 
 DD4HEP_OPEN_PLUGIN (dd4hep, ddcms_det_element_DDCMS_ecal_DDEcalBarrelNewAlgo)
 

Typedef Documentation

◆ EcalTrap

Definition at line 23 of file DDEcalBarrelNewAlgo.cc.

◆ Pt3D

using Pt3D = HepGeom::Point3D<double>

Definition at line 25 of file DDEcalBarrelNewAlgo.cc.

◆ Ro3D

using Ro3D = HepGeom::Rotate3D

Definition at line 28 of file DDEcalBarrelNewAlgo.cc.

◆ Rota

using Rota = CLHEP::HepRotation

Definition at line 27 of file DDEcalBarrelNewAlgo.cc.

◆ RoX3D

using RoX3D = HepGeom::RotateX3D

Definition at line 31 of file DDEcalBarrelNewAlgo.cc.

◆ RoZ3D

using RoZ3D = HepGeom::RotateZ3D

Definition at line 32 of file DDEcalBarrelNewAlgo.cc.

◆ Tf3D

using Tf3D = HepGeom::Transform3D

Definition at line 30 of file DDEcalBarrelNewAlgo.cc.

◆ Tl3D

using Tl3D = HepGeom::Translate3D

Definition at line 29 of file DDEcalBarrelNewAlgo.cc.

◆ Vec3

using Vec3 = CLHEP::Hep3Vector

Definition at line 26 of file DDEcalBarrelNewAlgo.cc.

◆ VecDouble

using VecDouble = vector<double>

Definition at line 21 of file DDEcalBarrelNewAlgo.cc.

◆ VecStr

using VecStr = vector<string>

Definition at line 22 of file DDEcalBarrelNewAlgo.cc.

Function Documentation

◆ algorithm()

static long algorithm ( dd4hep::Detector &  ,
cms::DDParsingContext ctxt,
xml_h  e 
)
static

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Back Cover Plate !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Back Cover Plate !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Back Side Plates !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Back Side Plates !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Mother Board Cooling Manifold Setup !!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Mother Board Cooling Manifold Setup !!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Loop over Grilles & MB Cooling Manifold !!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Loop over Grilles & MB Cooling Manifold !!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Cooling Bar Setup !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Cooling Bar Setup !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin VFE Card Setup !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End VFE Card Setup !!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Cooling Bar + VFE Setup !!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Cooling Bar + VFE Setup !!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Placement of Readout & Cooling by Module !!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Back Water Pipes !!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Back Water Pipes !!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Placement of Cooling + VFE Cards !!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Placement of Readout & Cooling by Module !!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Patch Panel !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Patch Panel !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! Begin Pincers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!! End Pincers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 477 of file DDEcalBarrelNewAlgo.cc.

477  {
478  BenchmarkGrd counter("DDEcalBarrelNewAlgo");
479  cms::DDNamespace ns(ctxt, e, true);
480  cms::DDAlgoArguments args(ctxt, e);
481 
482  // TRICK!
483  string myns{mynamespace(args.parentName()).data(), mynamespace(args.parentName()).size()};
484 
485  // Barrel volume
486  // barrel parent volume
487  Barrel bar;
488  bar.name = ns.prepend(args.str("BarName")); // Barrel volume name
489  bar.mat = args.str("BarMat"); // Barrel material name
490  bar.vecZPts = args.vecDble("BarZPts"); // Barrel list of z pts
491  bar.vecRMin = args.vecDble("BarRMin"); // Barrel list of rMin pts
492  bar.vecRMax = args.vecDble("BarRMax"); // Barrel list of rMax pts
493  bar.vecTran = args.vecDble("BarTran"); // Barrel translation
494  bar.vecRota = args.vecDble("BarRota"); // Barrel rotation
495  bar.vecRota2 = args.vecDble("BarRota2"); // 2nd Barrel rotation
496  bar.vecRota3 = args.vecDble("BarRota3"); // 3rd Barrel rotation
497  bar.phiLo = args.dble("BarPhiLo"); // Barrel phi lo
498  bar.phiHi = args.dble("BarPhiHi"); // Barrel phi hi
499  bar.here = args.dble("BarHere"); // Barrel presence flag
500 
501  // Supermodule volume
502  Supermodule spm;
503  spm.name = ns.prepend(args.str("SpmName")); // Supermodule volume name
504  spm.mat = args.str("SpmMat"); // Supermodule material name
505  spm.vecZPts = args.vecDble("SpmZPts"); // Supermodule list of z pts
506  spm.vecRMin = args.vecDble("SpmRMin"); // Supermodule list of rMin pts
507  spm.vecRMax = args.vecDble("SpmRMax"); // Supermodule list of rMax pts
508  spm.vecTran = args.vecDble("SpmTran"); // Supermodule translation
509  spm.vecRota = args.vecDble("SpmRota"); // Supermodule rotation
510  spm.vecBTran = args.vecDble("SpmBTran"); // Base Supermodule translation
511  spm.vecBRota = args.vecDble("SpmBRota"); // Base Supermodule rotation
512  spm.nPerHalf = args.integer("SpmNPerHalf"); // # Supermodules per half detector
513  spm.lowPhi = args.dble("SpmLowPhi"); // Low phi value of base supermodule
514  spm.delPhi = args.dble("SpmDelPhi"); // Delta phi value of base supermodule
515  spm.phiOff = args.dble("SpmPhiOff"); // Phi offset value supermodule
516  spm.vecHere = args.vecDble("SpmHere"); // Bit saying if a supermodule is present or not
517  spm.cutName = ns.prepend(args.str("SpmCutName")); // Name of cut box
518  spm.cutThick = args.dble("SpmCutThick"); // Box thickness
519  spm.cutShow = args.value<int>("SpmCutShow"); // Non-zero means show the box on display (testing only)
520  spm.vecCutTM = args.vecDble("SpmCutTM"); // Translation for minus phi cut box
521  spm.vecCutTP = args.vecDble("SpmCutTP"); // Translation for plus phi cut box
522  spm.cutRM = args.dble("SpmCutRM"); // Rotation for minus phi cut box
523  spm.cutRP = args.dble("SpmCutRP"); // Rotation for plus phi cut box
524  spm.expThick = args.dble("SpmExpThick"); // Thickness (x) of supermodule expansion box
525  spm.expWide = args.dble("SpmExpWide"); // Width (y) of supermodule expansion box
526  spm.expYOff = args.dble("SpmExpYOff"); // Offset (y) of supermodule expansion box
527  spm.sideName = ns.prepend(args.str("SpmSideName")); // Supermodule Side Plate volume name
528  spm.sideMat = args.str("SpmSideMat"); // Supermodule Side Plate material name
529  spm.sideHigh = args.dble("SpmSideHigh"); // Side plate height
530  spm.sideThick = args.dble("SpmSideThick"); // Side plate thickness
531  spm.sideYOffM = args.dble("SpmSideYOffM"); // Side plate Y offset on minus phi side
532  spm.sideYOffP = args.dble("SpmSideYOffP"); // Side plate Y offset on plus phi side
533 
534  Crystal cry;
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");
542 
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");
550 
551  Alveolus alv;
552  alv.wallThAlv = args.dble("WallThAlv");
553  alv.wrapThAlv = args.dble("WrapThAlv");
554  alv.clrThAlv = args.dble("ClrThAlv");
555  alv.vecGapAlvEta = args.vecDble("GapAlvEta");
556 
557  alv.wallFrAlv = args.dble("WallFrAlv");
558  alv.wrapFrAlv = args.dble("WrapFrAlv");
559  alv.clrFrAlv = args.dble("ClrFrAlv");
560 
561  alv.wallReAlv = args.dble("WallReAlv");
562  alv.wrapReAlv = args.dble("WrapReAlv");
563  alv.clrReAlv = args.dble("ClrReAlv");
564 
565  alv.nCryTypes = args.integer("NCryTypes");
566  alv.nCryPerAlvEta = args.integer("NCryPerAlvEta");
567 
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"));
572 
573  cry.mat = args.str("CryMat");
574  cry.clrMat = args.str("ClrMat");
575  cry.wrapMat = args.str("WrapMat");
576  cry.wallMat = args.str("WallMat");
577 
578  Capsule cap;
579  cap.name = ns.prepend(args.str("CapName"));
580  cap.here = args.dble("CapHere");
581  cap.mat = args.str("CapMat");
582  cap.xSizeHalf = 0.5 * args.dble("CapXSize");
583  cap.ySizeHalf = 0.5 * args.dble("CapYSize");
584  cap.thickHalf = 0.5 * args.dble("CapThick");
585 
586  Ceramic cer;
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");
592 
593  BulkSilicon bSi;
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");
599 
600  APD apd;
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");
608 
609  apd.atjName = ns.prepend(args.str("ATJName"));
610  apd.atjMat = args.str("ATJMat");
611  apd.atjThickHalf = 0.5 * args.dble("ATJThick");
612 
613  apd.sglName = ns.prepend(args.str("SGLName"));
614  apd.sglMat = args.str("SGLMat");
615  apd.sglThick = args.dble("SGLThick");
616 
617  apd.aglName = ns.prepend(args.str("AGLName"));
618  apd.aglMat = args.str("AGLMat");
619  apd.aglThick = args.dble("AGLThick");
620 
621  apd.andName = ns.prepend(args.str("ANDName"));
622  apd.andMat = args.str("ANDMat");
623  apd.andThick = args.dble("ANDThick");
624 
625  Web web;
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");
634 
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");
642 
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");
649  std::transform(ily.vecIlyPipeLengthHalf.begin(),
650  ily.vecIlyPipeLengthHalf.end(),
651  ily.vecIlyPipeLengthHalf.begin(),
652  [](double length) -> double { return 0.5 * length; });
653 
654  ily.vecIlyPipeType = args.vecDble("IlyPipeType");
655  ily.vecIlyPipePhi = args.vecDble("IlyPipePhi");
656  ily.vecIlyPipeZ = args.vecDble("IlyPipeZ");
657 
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");
666 
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");
690 
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");
701 
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");
707 
708  Grid grid;
709  grid.here = args.dble("GridHere");
710  grid.name = ns.prepend(args.str("GridName"));
711  grid.mat = args.str("GridMat");
712  grid.thick = args.dble("GridThick");
713 
714  Back back;
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");
736 
737  Grille grille;
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");
746 
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");
758 
759  BackPipe backPipe;
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");
766 
767  BackCooling backCool;
768  backCool.here = args.dble("BackCoolHere");
769  backCool.vecName = args.vecStr("BackCoolName");
770  std::transform(backCool.vecName.begin(),
771  backCool.vecName.end(),
772  backCool.vecName.begin(),
773  [&ns](std::string name) -> std::string { return ns.prepend(name); });
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");
794  std::transform(backCool.vecBackVFELyrName.begin(),
795  backCool.vecBackVFELyrName.end(),
796  backCool.vecBackVFELyrName.begin(),
797  [&ns](std::string name) -> std::string { return ns.prepend(name); });
798  backCool.vecBackVFELyrMat = args.vecStr("BackVFELyrMat");
799  backCool.vecBackCoolNSec = args.vecDble("BackCoolNSec");
800  backCool.vecBackCoolSecSep = args.vecDble("BackCoolSecSep");
801  backCool.vecBackCoolNPerSec = args.vecDble("BackCoolNPerSec");
802 
803  BackMisc backMisc;
804  backMisc.here = args.dble("BackMiscHere");
805  backMisc.vecThick = args.vecDble("BackMiscThick");
806  backMisc.vecName = args.vecStr("BackMiscName");
807  std::transform(backMisc.vecName.begin(),
808  backMisc.vecName.end(),
809  backMisc.vecName.begin(),
810  [&ns](std::string name) -> std::string { return ns.prepend(name); });
811  backMisc.vecMat = args.vecStr("BackMiscMat");
812  backMisc.backCBStdSep = args.dble("BackCBStdSep");
813 
814  PatchPanel patchPanel;
815  patchPanel.here = args.dble("PatchPanelHere");
816  patchPanel.vecThick = args.vecDble("PatchPanelThick");
817  patchPanel.vecNames = args.vecStr("PatchPanelNames");
818  std::transform(patchPanel.vecNames.begin(),
819  patchPanel.vecNames.end(),
820  patchPanel.vecNames.begin(),
821  [&ns](std::string name) -> std::string { return ns.prepend(name); });
822 
823  patchPanel.vecMat = args.vecStr("PatchPanelMat");
824  patchPanel.name = ns.prepend(args.str("PatchPanelName"));
825 
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");
838 
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");
846 
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");
853 
854  MBManif mbManif;
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");
860 
861  MBLyr mbLyr;
862  mbLyr.here = args.dble("MBLyrHere");
863  mbLyr.vecMBLyrThick = args.vecDble("MBLyrThick");
864  mbLyr.vecMBLyrName = args.vecStr("MBLyrName");
865  std::transform(mbLyr.vecMBLyrName.begin(),
866  mbLyr.vecMBLyrName.end(),
867  mbLyr.vecMBLyrName.begin(),
868  [&ns](std::string name) -> std::string { return ns.prepend(name); });
869  mbLyr.vecMBLyrMat = args.vecStr("MBLyrMat");
870 
871  Pincer pincer;
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");
895 
896  Volume parentVolume = ns.volume(args.parentName());
897  if (bar.here != 0) {
898  const unsigned int copyOne(1);
899  const unsigned int copyTwo(2);
900  // Barrel parent volume----------------------------------------------------------
901  Solid barSolid = Polycone(bar.phiLo, (bar.phiHi - bar.phiLo), bar.vecRMin, bar.vecRMax, bar.vecZPts);
902  Position tran(bar.vecTran[0], bar.vecTran[1], bar.vecTran[2]);
903  Rotation3D rotation = myrot(ns,
904  bar.name + "Rot",
905  Rota(Vec3(bar.vecRota3[0], bar.vecRota3[1], bar.vecRota3[2]), bar.vecRota3[3]) *
906  Rota(Vec3(bar.vecRota2[0], bar.vecRota2[1], bar.vecRota2[2]), bar.vecRota2[3]) *
907  Rota(Vec3(bar.vecRota[0], bar.vecRota[1], bar.vecRota[2]), bar.vecRota[3]));
908  Volume barVolume = Volume(bar.name, barSolid, ns.material(bar.mat));
909  parentVolume.placeVolume(barVolume, copyOne, Transform3D(rotation, tran));
910 #ifdef EDM_ML_DEBUG
911  edm::LogVerbatim("EcalGeom") << barVolume.name() << ":" << copyOne << " positioned in " << parentVolume.name();
912 #endif
913  // End Barrel parent volume----------------------------------------------------------
914 
915  // Supermodule parent------------------------------------------------------------
916 
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);
919 
920  const unsigned int indx(0.5 * spm.vecRMax.size());
921 
922  // Deal with the cut boxes first
923  array<double, 3> cutBoxParms{{1.05 * (spm.vecRMax[indx] - spm.vecRMin[indx]) * 0.5,
924  0.5 * spm.cutThick,
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));
928 
929  // Supermodule side platess
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));
933 
934  Solid temp1;
935  Solid temp2;
936  Position sideddtra1;
937  Position sideddtra2;
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);
943 
944  const Position tr(tvec[0], tvec[1], tvec[2]);
945  RotationZ ro(rang);
946  const double ang(1 == icopy ? spm.lowPhi : spm.lowPhi + spm.delPhi);
947  RotationZ ro1(ang);
948  const Position tr1(
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);
951  if (1 == icopy) {
952  alltrot1 = alltrot;
953  temp1 = SubtractionSolid(spm.name + "_T1", ddspm, spmCutBox, alltrot);
954  } else {
955  alltrot2 = alltrot;
956  temp2 = SubtractionSolid(spm.name, temp1, spmCutBox, alltrot);
957  }
958  const Tl3D trSide(tvec[0],
959  tvec[1] + (1 == icopy ? 1. : -1.) * (cutBoxParms[1] + sideParms[1]) +
960  (1 == icopy ? spm.sideYOffM : spm.sideYOffP),
961  tvec[2]);
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 *
965  roSide);
966 
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;
970  }
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);
974 #ifdef EDM_ML_DEBUG
975  edm::LogVerbatim("EcalGeom") << spmCutLog.name() << ":1 positioned in " << DDSplit(spmLog.name()).first;
976 #endif
977  spmLog.placeVolume(spmCutLog, 1, alltrot2);
978 #ifdef EDM_ML_DEBUG
979  edm::LogVerbatim("EcalGeom") << spmCutLog.name() << ":1 positioned in " << DDSplit(spmLog.name()).first;
980 #endif
981  }
982  spmLog.placeVolume(sideLog, 1, Transform3D(ns.rotation(spm.sideName + std::to_string(1)), sideddtra1));
983 #ifdef EDM_ML_DEBUG
984  edm::LogVerbatim("EcalGeom") << sideLog.name() << ":1 positioned in " << DDSplit(spmLog.name()).first;
985 #endif
986  spmLog.placeVolume(sideLog, 2, Transform3D(ns.rotation(spm.sideName + std::to_string(2)), sideddtra2));
987 #ifdef EDM_ML_DEBUG
988  edm::LogVerbatim("EcalGeom") << sideLog.name() << ":2 positioned in " << DDSplit(spmLog.name()).first;
989 #endif
990 
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);
994 
995  // this base rotation includes the base translation & rotation
996  // plus flipping for the negative z hemisphere, plus
997  // the phi rotation for this module
998  const Tf3D rotaBase(RoZ3D(phi) * (iphi < spm.nPerHalf ? Ro3D() : RoX3D(180._deg)) *
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])));
1001 
1002  // here the individual rotations & translations of the supermodule
1003  // are implemented on top of the overall "base" rotation & translation
1004 
1005  const unsigned int offr(4 * iphi);
1006  const unsigned int offt(3 * iphi);
1007 
1008  const Ro3D r1(spm.vecRota[offr + 3], Vec3(spm.vecRota[offr + 0], spm.vecRota[offr + 1], spm.vecRota[offr + 2]));
1009 
1010  const Tf3D rotaExtra(r1 * Tl3D(Vec3(spm.vecTran[offt + 0], spm.vecTran[offt + 1], spm.vecTran[offt + 2])));
1011 
1012  const Tf3D both(rotaExtra * rotaBase);
1013 
1014  const Rotation3D rota(myrot(ns, spm.name + std::to_string(convertRadToDeg(phi)), both.getRotation()));
1015 
1016  if (spm.vecHere[iphi] != 0) {
1017  // convert from CLHEP to Position & etc.
1018  Position myTran(both.getTranslation().x(), both.getTranslation().y(), both.getTranslation().z());
1019  barVolume.placeVolume(spmLog, iphi + 1, Transform3D(rota, myTran));
1020 #ifdef EDM_ML_DEBUG
1021  edm::LogVerbatim("EcalGeom") << DDSplit(spmLog.name()).first << ":" << (iphi + 1) << " positioned in "
1022  << barVolume.name();
1023 #endif
1024  }
1025  }
1026  // End Supermodule parent------------------------------------------------------------
1027 
1028  // Begin Inner Layer volumes---------------------------------------------------------
1029  const double ilyLengthHalf(0.5 * (spm.vecZPts[1] - spm.vecZPts[0]));
1030  double ilyRMin(spm.vecRMin[0]);
1031  double ilyThick(0);
1032  for (unsigned int ilyx(0); ilyx != ily.vecIlyThick.size(); ++ilyx) {
1033  ilyThick += ily.vecIlyThick[ilyx];
1034  }
1035  Solid ilySolid = Tube(ily.name,
1036  ilyRMin, // rmin
1037  ilyRMin + ilyThick, // rmax
1038  ilyLengthHalf, // dz
1039  ily.phiLow, // startPhi
1040  ily.phiLow + ily.delPhi); // startPhi + deltaPhi
1041  Volume ilyLog = Volume(ily.name, ilySolid, ns.material(spm.mat));
1042  spmLog.placeVolume(ilyLog, copyOne, Position(0, 0, ilyLengthHalf));
1043 #ifdef EDM_ML_DEBUG
1044  edm::LogVerbatim("EcalGeom") << ilyLog.name() << ":" << copyOne << " positioned in "
1045  << DDSplit(spmLog.name()).first;
1046 #endif
1047  Volume ilyPipeLog[200];
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));
1051 
1052  Solid ilyPipeSolid = Tube(pName,
1053  0, // rmin
1054  ily.pipeODHalf, // rmax
1055  ily.vecIlyPipeLengthHalf[iPipeType], // dz
1056  0_deg, // startPhi
1057  360_deg); // startPhi + deltaPhi
1058  ilyPipeLog[iPipeType] = Volume(pName, ilyPipeSolid, ns.material(ily.pipeMat));
1059 
1060  string pWaName(ily.pipeName + "Wa_" + std::to_string(iPipeType + 1));
1061  Solid ilyPipeWaSolid = Tube(pWaName,
1062  0, // rmin
1063  0.5 * ily.pipeID, // rmax
1064  ily.vecIlyPipeLengthHalf[iPipeType], // dz
1065  0_deg, // startPhi
1066  360_deg); // startPhi + deltaPhi
1067  Volume ilyPipeWaLog = Volume(pWaName, ilyPipeWaSolid, ns.material(backPipe.waterMat));
1068  ilyPipeLog[iPipeType].placeVolume(ilyPipeWaLog, copyOne);
1069 #ifdef EDM_ML_DEBUG
1070  edm::LogVerbatim("EcalGeom") << ilyPipeWaLog.name() << ":" << copyOne << " positioned in "
1071  << ilyPipeLog[iPipeType].name();
1072 #endif
1073  }
1074  }
1075 
1076  Solid ilyPTMSolid = Box(ily.pTMHeightHalf, ily.pTMWidthHalf, ily.pTMLengthHalf);
1077  Volume ilyPTMLog = Volume(ily.pTMName, ilyPTMSolid, ns.material(ily.pTMMat));
1078 
1079  Solid ilyFanOutSolid = Box(ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.fanOutLengthHalf);
1080  Volume ilyFanOutLog = Volume(ily.fanOutName, ilyFanOutSolid, ns.material(ily.fanOutMat));
1081 
1082  Solid ilyFEMSolid = Box(ily.fEMHeightHalf, ily.fEMWidthHalf, ily.fEMLengthHalf);
1083  Volume ilyFEMLog = Volume(ily.fEMName, ilyFEMSolid, ns.material(ily.fEMMat));
1084 
1085  Solid ilyDiffSolid = Box(ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.diffLengthHalf);
1086  Volume ilyDiffLog = Volume(ily.diffName, ilyDiffSolid, ns.material(ily.diffMat));
1087 
1088  Solid ilyBndlSolid = Box(ily.fanOutHeightHalf, ily.fanOutWidthHalf, ily.bndlLengthHalf);
1089  Volume ilyBndlLog = Volume(ily.bndlName, ilyBndlSolid, ns.material(ily.bndlMat));
1090 
1091  ilyFanOutLog.placeVolume(
1092  ilyDiffLog, copyOne, Position(0_mm, 0_mm, -ily.fanOutLengthHalf + ily.diffLengthHalf + ily.diffOff));
1093 #ifdef EDM_ML_DEBUG
1094  edm::LogVerbatim("EcalGeom") << ilyDiffLog.name() << ":" << copyOne << " positioned in " << ilyFanOutLog.name();
1095 #endif
1096  ilyFanOutLog.placeVolume(
1097  ilyBndlLog, copyOne, Position(0_mm, 0_mm, -ily.fanOutLengthHalf + ily.bndlLengthHalf + ily.bndlOff));
1098 #ifdef EDM_ML_DEBUG
1099  edm::LogVerbatim("EcalGeom") << ilyBndlLog.name() << ":" << copyOne << " positioned in " << ilyFanOutLog.name();
1100 #endif
1101 
1102  Volume xilyLog;
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);
1110 #ifdef EDM_ML_DEBUG
1111  edm::LogVerbatim("EcalGeom") << xilyLog.name() << ":" << copyOne << " positioned in " << ilyLog.name();
1112 #endif
1113  unsigned int copyNum[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1114 
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]);
1121  const double yy(radius * sin(phi));
1122  const double xx(radius * cos(phi));
1123  ++ptmCopy;
1124  xilyLog.placeVolume(
1125  ilyPTMLog,
1126  ptmCopy,
1127  Transform3D(RotationZ(phi), Position(xx, yy, ily.vecIlyPTMZ[ilyPTM] - ilyLengthHalf)));
1128 #ifdef EDM_ML_DEBUG
1129  edm::LogVerbatim("EcalGeom") << ilyPTMLog.name() << ":" << ptmCopy << " positioned in " << xilyLog.name();
1130 #endif
1131  }
1132  }
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]);
1138  const double yy(radius * sin(phi));
1139  const double xx(radius * cos(phi));
1140  ++fanOutCopy;
1141  xilyLog.placeVolume(ilyFanOutLog,
1142  fanOutCopy,
1143  Transform3D(RotationZ(phi) * RotationY(180_deg),
1144  Position(xx, yy, ily.vecIlyFanOutZ[ilyFO] - ilyLengthHalf)));
1145 #ifdef EDM_ML_DEBUG
1146  edm::LogVerbatim("EcalGeom")
1147  << ilyFanOutLog.name() << ":" << fanOutCopy << " positioned in " << xilyLog.name();
1148 #endif
1149  }
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]);
1154  const double yy(radius * sin(phi));
1155  const double xx(radius * cos(phi));
1156  ++femCopy;
1157  xilyLog.placeVolume(
1158  ilyFEMLog,
1159  femCopy,
1160  Transform3D(RotationZ(phi), Position(xx, yy, ily.vecIlyFEMZ[ilyFEM] - ilyLengthHalf)));
1161 #ifdef EDM_ML_DEBUG
1162  edm::LogVerbatim("EcalGeom") << ilyFEMLog.name() << ":" << femCopy << " positioned in " << xilyLog.name();
1163 #endif
1164  }
1165  }
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));
1169 
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]);
1173  const double yy(radius * sin(phi));
1174  const double xx(radius * cos(phi));
1175  ++copyNum[type];
1176  if (9 > type) {
1177  xilyLog.placeVolume(ilyPipeLog[type], copyNum[type], Position(xx, yy, zz));
1178 #ifdef EDM_ML_DEBUG
1179  edm::LogVerbatim("EcalGeom")
1180  << ilyPipeLog[type].name() << ":" << copyNum[type] << " positioned in " << xilyLog.name();
1181 #endif
1182  } else {
1183  xilyLog.placeVolume(
1184  ilyPipeLog[type],
1185  copyNum[type],
1186  Transform3D(Rotation3D(ROOT::Math::AxisAngle(ROOT::Math::AxisAngle::XYZVector(xx, yy, 0), 90_deg)),
1187  Position(xx, yy, zz)));
1188 #ifdef EDM_ML_DEBUG
1189  edm::LogVerbatim("EcalGeom")
1190  << ilyPipeLog[type].name() << ":" << copyNum[type] << " positioned in " << xilyLog.name();
1191 #endif
1192  }
1193  }
1194  }
1195  }
1196  }
1197  ilyRMin = ilyRMax;
1198  }
1199  // End Inner Layer volumes---------------------------------------------------------
1200 
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);
1214 #ifdef EDM_ML_DEBUG
1215  edm::LogVerbatim("EcalGeom") << clyrLog.name() << ":" << copyOne << " positioned in "
1216  << DDSplit(spmLog.name()).first;
1217 #endif
1218  // Begin Alveolar Wedge parent ------------------------------------------------------
1219  //----------------
1220 
1221  // the next few lines accumulate dimensions appropriate to crystal type 1
1222  // which we use to set some of the features of the half-alveolar wedge (hawR).
1223 
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));
1235 
1236  const double tana_hawR((BNom1 - bNom1) / LNom1);
1237 
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]);
1244 
1245  const EcalTrap trapHAWR(0.5 * a_hawR, //double aHalfLengthXNegZLoY , // bl1, A/2
1246  0.5 * a_hawR, //double aHalfLengthXPosZLoY , // bl2, a/2
1247  0.5 * b_hawR, //double aHalfLengthXPosZHiY , // tl2, b/2
1248  0.5 * H_hawR, //double aHalfLengthYNegZ , // h1, H/2
1249  0.5 * h_hawR, //double aHalfLengthYPosZ , // h2, h/2
1250  0.5 * L_hawR, //double aHalfLengthZ , // dz, L/2
1251  90_deg, //double aAngleAD , // alfa1
1252  0, //double aCoord15X , // x15
1253  0 //double aCoord15Y // y15
1254  );
1255 
1256  string hawRName1(alvWedge.hawRName + "1");
1257  Solid hawRSolid1 = mytrap(hawRName1, trapHAWR);
1258 
1259  const double al1_fawR(atan((B_hawR - a_hawR) / H_hawR) + M_PI_2);
1260 
1261  // here is trap for Full Alveolar Wedge
1262  const EcalTrap trapFAW(a_hawR, //double aHalfLengthXNegZLoY , // bl1, A/2
1263  a_hawR, //double aHalfLengthXPosZLoY , // bl2, a/2
1264  b_hawR, //double aHalfLengthXPosZHiY , // tl2, b/2
1265  0.5 * H_hawR, //double aHalfLengthYNegZ , // h1, H/2
1266  0.5 * h_hawR, //double aHalfLengthYPosZ , // h2, h/2
1267  0.5 * L_hawR, //double aHalfLengthZ , // dz, L/2
1268  al1_fawR, //double aAngleAD , // alfa1
1269  0, //double aCoord15X , // x15
1270  0 //double aCoord15Y // y15
1271  );
1272 
1273  const string fawName1(alvWedge.fawName + "1");
1274  Solid fawSolid1 = mytrap(fawName1, trapFAW);
1275 
1276  const EcalTrap::VertexList vHAW(trapHAWR.vertexList());
1277  const EcalTrap::VertexList vFAW(trapFAW.vertexList());
1278 
1279  const double hawBoxClr(1_mm);
1280 
1281  // HAW cut box to cut off back end of wedge
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]);
1285 
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]);
1289 
1290  const double zDel(
1291  sqrt(4 * hawBoxParms[2] * hawBoxParms[2] - (h_hawR - alvWedge.hawRCutDelY) * (h_hawR - alvWedge.hawRCutDelY)));
1292 
1293  const Tf3D hawCutForm(b1,
1294  b2,
1295  b3,
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));
1299 
1300  Solid hawRSolid = SubtractionSolid(hawRSolid1,
1301  hawCutBox,
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));
1307 
1308  // FAW cut box to cut off back end of wedge
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]);
1312 
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]);
1316 
1317  const Tf3D fawCutForm(bb1,
1318  bb2,
1319  bb3,
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));
1323  // FIXME: EFAW extruded by: EFAW/EHAWR_2 ovlp=0.209316 cm
1324  Solid fawSolid = SubtractionSolid(fawSolid1,
1325  fawCutBox,
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));
1331 
1332  const Tf3D hawRform(vHAW[3],
1333  vHAW[0],
1334  vHAW[1], // HAW inside FAW
1335  vFAW[3],
1336  0.5 * (vFAW[0] + vFAW[3]),
1337  0.5 * (vFAW[1] + vFAW[2]));
1338 
1339  fawLog.placeVolume(
1340  hawRLog,
1341  copyOne,
1342  Transform3D(
1343  myrot(ns, alvWedge.hawRName + "R", hawRform.getRotation()),
1344  Position(hawRform.getTranslation().x(), hawRform.getTranslation().y(), hawRform.getTranslation().z())));
1345 #ifdef EDM_ML_DEBUG
1346  edm::LogVerbatim("EcalGeom") << hawRLog.name() << ":" << copyOne << " positioned in " << fawLog.name();
1347 #endif
1348 
1349  // FIXME: extrusion when using placeVolume,
1350  // use TGeoCombiTrans instead
1351  fawLog->AddNode( //.placeVolume(
1352  hawRLog,
1353  copyTwo,
1355  Rotation3D(1., 0., 0., 0., 1., 0., 0., 0., -1.) * RotationY(-M_PI), // rotate about Y after refl thru Z
1356  Position(-hawRform.getTranslation().x(), -hawRform.getTranslation().y(), -hawRform.getTranslation().z())));
1357 #ifdef EDM_ML_DEBUG
1358  edm::LogVerbatim("EcalGeom") << hawRLog.name() << ":" << copyTwo << " positioned in " << fawLog.name();
1359 #endif
1360  for (unsigned int iPhi(1); iPhi <= alvWedge.nFawPerSupm; ++iPhi) {
1361  const double rPhi(alvWedge.fawPhiOff + (iPhi - 0.5) * alvWedge.fawDelPhi);
1362 
1363  const Tf3D fawform(RoZ3D(rPhi) *
1364  Tl3D(alvWedge.fawRadOff + (trapFAW.H() + trapFAW.h()) / 4, 0, 0.5 * trapFAW.L()) *
1365  RoZ3D(-90_deg + alvWedge.fawPhiRot));
1366  if (alvWedge.fawHere) {
1367  spmLog.placeVolume(
1368  fawLog,
1369  iPhi,
1370  Transform3D(
1371  myrot(ns, alvWedge.fawName + "_Rot" + std::to_string(iPhi), fawform.getRotation()),
1372  Position(fawform.getTranslation().x(), fawform.getTranslation().y(), fawform.getTranslation().z())));
1373 #ifdef EDM_ML_DEBUG
1374  edm::LogVerbatim("EcalGeom") << fawLog.name() << ":" << iPhi << " positioned in "
1375  << DDSplit(spmLog.name()).first;
1376 #endif
1377  }
1378  }
1379 
1380  // End Alveolar Wedge parent ------------------------------------------------------
1381 
1382  // Begin Grid + Tablet insertion
1383 
1384  const double h_Grid(grid.thick);
1385 
1386  const EcalTrap trapGrid(0.5 * (B_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR), // bl1, A/2
1387  0.5 * (b_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR), // bl2, a/2
1388  0.5 * b_hawR, // tl2, b/2
1389  0.5 * h_Grid, // h1, H/2
1390  0.5 * h_Grid, // h2, h/2
1391  0.5 * (L_hawR - 8_cm), // dz, L/2
1392  90_deg, // alfa1
1393  0, // x15
1394  H_hawR - h_hawR // y15
1395  );
1396 
1397  Solid gridSolid = mytrap(grid.name, trapGrid);
1398  Volume gridLog = Volume(grid.name, gridSolid, ns.material(grid.mat));
1399 
1400  const EcalTrap::VertexList vGrid(trapGrid.vertexList());
1401 
1402  const Tf3D gridForm(vGrid[4],
1403  vGrid[5],
1404  vGrid[6], // Grid inside HAW
1405  vHAW[5] - Pt3D(0, h_Grid, 0),
1406  vHAW[5],
1407  vHAW[6]);
1408 
1409  if (0 != grid.here) {
1410  hawRLog.placeVolume(
1411  gridLog,
1412  copyOne,
1413  Transform3D(
1414  myrot(ns, grid.name + "R", gridForm.getRotation()),
1415  Position(gridForm.getTranslation().x(), gridForm.getTranslation().y(), gridForm.getTranslation().z())));
1416 #ifdef EDM_ML_DEBUG
1417  edm::LogVerbatim("EcalGeom") << gridLog.name() << ":" << copyOne << " positioned in " << hawRLog.name();
1418 #endif
1419  }
1420  // End Grid + Tablet insertion
1421 
1422  // begin filling Wedge with crystal plus supports --------------------------
1423 
1424  const double aNom(cry.nomCryDimAF);
1425  const double LNom(cry.nomCryDimLZ);
1426 
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);
1433 
1434  const double sWall(alv.wallThAlv);
1435  const double sWrap(alv.wrapThAlv);
1436  const double sClr(alv.clrThAlv);
1437 
1438  const double fWall(alv.wallFrAlv);
1439  const double fWrap(alv.wrapFrAlv);
1440  const double fClr(alv.clrFrAlv);
1441 
1442  const double rWall(alv.wallReAlv);
1443  const double rWrap(alv.wrapReAlv);
1444  const double rClr(alv.clrReAlv);
1445 
1446  // theta is angle in yz plane between z axis & leading edge of crystal
1447  double theta(90_deg);
1448  double zee(0_mm);
1449  double side(0_mm);
1450  double zeta(0_deg); // increment in theta for last crystal
1451 
1452  for (unsigned int cryType(1); cryType <= alv.nCryTypes; ++cryType) {
1453  const string sType("_" + std::string(10 > cryType ? "0" : "") + std::to_string(cryType));
1454 
1455 #ifdef EDM_ML_DEBUG
1456  edm::LogVerbatim("EcalGeom") << "Crytype=" << cryType;
1457 #endif
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]);
1463 
1464  const double alfCry(90_deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd)));
1465 
1466  const EcalTrap trapCry(0.5 * (ANom - AUnd), //double aHalfLengthXNegZLoY , // bl1, A/2
1467  0.5 * (aNom - aUnd), //double aHalfLengthXPosZLoY , // bl2, a/2
1468  0.5 * (bNom - bUnd), //double aHalfLengthXPosZHiY , // tl2, b/2
1469  0.5 * (HNom - HUnd), //double aHalfLengthYNegZ , // h1, H/2
1470  0.5 * (hNom - hUnd), //double aHalfLengthYPosZ , // h2, h/2
1471  0.5 * (LNom - LUnd), //double aHalfLengthZ , // dz, L/2
1472  alfCry, //double aAngleAD , // alfa1
1473  aNom - aUnd - ANom + AUnd, //double aCoord15X , // x15
1474  hNom - hUnd - HNom + HUnd //double aCoord15Y // y15
1475  );
1476 
1477  const string cryDDName(cry.name + sType);
1478  Solid crySolid = mytrap(cry.name, trapCry);
1479  Volume cryLog = Volume(cryDDName, crySolid, ns.material(cry.mat));
1480 
1481  //++++++++++++++++++++++++++++++++++ APD ++++++++++++++++++++++++++++++++++
1482  const unsigned int copyCap(1);
1483  const string capDDName(cap.name + sType);
1484  Solid capSolid = Box(cap.xSizeHalf, cap.ySizeHalf, cap.thickHalf);
1485  Volume capLog = Volume(capDDName, capSolid, ns.material(cap.mat));
1486 
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);
1491 
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);
1496 
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);
1501 
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);
1506 
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);
1511 
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);
1516 
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);
1521 
1522  //++++++++++++++++++++++++++++++++++ END APD ++++++++++++++++++++++++++++++++++
1523 
1524  const double delta(atan((HNom - hNom) / LNom));
1525  const double sindelta(sin(delta));
1526 
1527  const double gamma(atan((ANom - aNom) / LNom));
1528  const double singamma(sin(gamma));
1529 
1530  const double beta(atan((BNom - bNom) / LNom));
1531  const double sinbeta(sin(beta));
1532 
1533  // Now clearance trap
1534  const double alfClr(90_deg + atan((bNom - aNom) / (hNom + sClr)));
1535 
1536  const EcalTrap trapClr(0.5 * (ANom + sClr + rClr * singamma), //double aHalfLengthXNegZLoY , // bl1, A/2
1537  0.5 * (aNom + sClr - fClr * singamma), //double aHalfLengthXPosZLoY , // bl2, a/2
1538  0.5 * (bNom + sClr - fClr * sinbeta), //double aHalfLengthXPosZHiY , // tl2, b/2
1539  0.5 * (HNom + sClr + rClr * sindelta), //double aHalfLengthYNegZ , // h1, H/2
1540  0.5 * (hNom + sClr - fClr * sindelta), //double aHalfLengthYPosZ , // h2, h/2
1541  0.5 * (LNom + fClr + rClr), // dz, L/2
1542  alfClr, //double aAngleAD , // alfa1
1543  aNom - ANom, //double aCoord15X , // x15
1544  hNom - HNom //double aCoord15Y // y15
1545  );
1546 
1547  const string clrDDName(cry.clrName + sType);
1548  Solid clrSolid = mytrap(clrDDName, trapClr);
1549  Volume clrLog = Volume(clrDDName, clrSolid, ns.material(cry.clrMat));
1550 
1551  // Now wrap trap
1552  const double alfWrap(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap)));
1553 
1554  const EcalTrap trapWrap(0.5 * (trapClr.A() + 2. * sWrap + rWrap * singamma), // bl1, A/2
1555  0.5 * (trapClr.a() + 2. * sWrap - fWrap * singamma), // bl2, a/2
1556  0.5 * (trapClr.b() + 2. * sWrap - fWrap * sinbeta), // tl2, b/2
1557  0.5 * (trapClr.H() + 2. * sWrap + rWrap * sindelta), // h1, H/2
1558  0.5 * (trapClr.h() + 2. * sWrap - fWrap * sindelta), // h2, h/2
1559  0.5 * (trapClr.L() + fWrap + rWrap), // dz, L/2
1560  alfWrap, //double aAngleAD , // alfa1
1561  aNom - ANom - (cryType > 9 ? 0 : 0.020_mm),
1562  hNom - HNom //double aCoord15Y // y15
1563  );
1564 
1565  const string wrapDDName(cry.wrapName + sType);
1566  Solid wrapSolid = mytrap(wrapDDName, trapWrap);
1567  Volume wrapLog = Volume(wrapDDName, wrapSolid, ns.material(cry.wrapMat));
1568 
1569  // Now wall trap
1570 
1571  const double alfWall(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap + 2. * sWall)));
1572 
1573  const EcalTrap trapWall(0.5 * (trapWrap.A() + 2 * sWall + rWall * singamma), // A/2
1574  0.5 * (trapWrap.a() + 2 * sWall - fWall * singamma), // a/2
1575  0.5 * (trapWrap.b() + 2 * sWall - fWall * sinbeta), // b/2
1576  0.5 * (trapWrap.H() + 2 * sWall + rWall * sindelta), // H/2
1577  0.5 * (trapWrap.h() + 2 * sWall - fWall * sindelta), // h/2
1578  0.5 * (trapWrap.L() + fWall + rWall), // L/2
1579  alfWall, // alfa1
1580  aNom - ANom - (cryType < 10 ? 0.150_mm : 0.100_mm),
1581  hNom - HNom // y15
1582  );
1583 
1584  const string wallDDName(cry.wallName + sType);
1585  Solid wallSolid = mytrap(wallDDName, trapWall);
1586  Volume wallLog = Volume(wallDDName, wallSolid, ns.material(cry.wallMat));
1587 
1588  // Now for placement of cry within clr
1589  const Vec3 cryToClr(0., 0., 0.5 * (rClr - fClr));
1590  clrLog.placeVolume(cryLog, copyOne, Position(0_mm, 0_mm, 0.5 * (rClr - fClr)));
1591 #ifdef EDM_ML_DEBUG
1592  edm::LogVerbatim("EcalGeom") << cryLog.name() << ":" << copyOne << " positioned in " << clrLog.name();
1593 #endif
1594  if (0 != cap.here) {
1595  bsiLog.placeVolume(aglLog, copyAGL, Position(0_mm, 0_mm, -0.5 * apd.aglThick + bSi.thickHalf));
1596 #ifdef EDM_ML_DEBUG
1597  edm::LogVerbatim("EcalGeom") << aglLog.name() << ":" << copyAGL << " positioned in " << bsiLog.name();
1598 #endif
1599  bsiLog.placeVolume(andLog, copyAND, Position(0_mm, 0_mm, -0.5 * apd.andThick - apd.aglThick + bSi.thickHalf));
1600 #ifdef EDM_ML_DEBUG
1601  edm::LogVerbatim("EcalGeom") << andLog.name() << ":" << copyAND << " positioned in " << bsiLog.name();
1602 #endif
1603  bsiLog.placeVolume(
1604  apdLog, copyAPD, Position(0_mm, 0_mm, -0.5 * apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf));
1605 #ifdef EDM_ML_DEBUG
1606  edm::LogVerbatim("EcalGeom") << apdLog.name() << ":" << copyAPD << " positioned in " << bsiLog.name();
1607 #endif
1608  bsiLog.placeVolume(
1609  atjLog,
1610  copyATJ,
1611  Position(0_mm, 0_mm, -apd.atjThickHalf - apd.thick - apd.andThick - apd.aglThick + bSi.thickHalf));
1612 #ifdef EDM_ML_DEBUG
1613  edm::LogVerbatim("EcalGeom") << atjLog.name() << ":" << copyATJ << " positioned in " << bsiLog.name();
1614 #endif
1615  cerLog.placeVolume(bsiLog, copyBSi, Position(0_mm, 0_mm, -bSi.thickHalf + cer.thickHalf));
1616 #ifdef EDM_ML_DEBUG
1617  edm::LogVerbatim("EcalGeom") << bsiLog.name() << ":" << copyBSi << " positioned in " << cerLog.name();
1618 #endif
1619  capLog.placeVolume(sglLog, copySGL, Position(0_mm, 0_mm, -0.5 * apd.sglThick + cap.thickHalf));
1620 #ifdef EDM_ML_DEBUG
1621  edm::LogVerbatim("EcalGeom") << sglLog.name() << ":" << copySGL << " positioned in " << capLog.name();
1622 #endif
1623 
1624  for (unsigned int ijkl(0); ijkl != 2; ++ijkl) {
1625  capLog.placeVolume(cerLog,
1626  ++copyCER,
1627  Position(trapCry.bl1() - (0 == ijkl ? apd.x1 : apd.x2),
1628  trapCry.h1() - apd.z,
1629  -apd.sglThick - cer.thickHalf + cap.thickHalf));
1630 #ifdef EDM_ML_DEBUG
1631  edm::LogVerbatim("EcalGeom") << cerLog.name() << ":" << copyCER << " positioned in " << capLog.name();
1632 #endif
1633  }
1634  clrLog.placeVolume(capLog, copyCap, Position(0_mm, 0_mm, -trapCry.dz() - cap.thickHalf + 0.5 * (rClr - fClr)));
1635 #ifdef EDM_ML_DEBUG
1636  edm::LogVerbatim("EcalGeom") << capLog.name() << ":" << copyCap << " positioned in " << clrLog.name();
1637 #endif
1638  }
1639 
1640  const Vec3 clrToWrap(0, 0, 0.5 * (rWrap - fWrap));
1641  wrapLog.placeVolume(clrLog, copyOne, Position(0_mm, 0_mm, 0.5 * (rWrap - fWrap))); //SAME as cryToWrap
1642 #ifdef EDM_ML_DEBUG
1643  edm::LogVerbatim("EcalGeom") << clrLog.name() << ":" << copyOne << " positioned in " << wrapLog.name();
1644 #endif
1645 
1646  // Now for placement of clr within wall
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(
1650  wrapLog,
1651  copyOne,
1652  Position(Vec3((cryType > 9 ? 0_mm : 0.005_mm), 0_mm, 0_mm) + wrapToWall1)); //SAME as wrapToWall
1653 #ifdef EDM_ML_DEBUG
1654  edm::LogVerbatim("EcalGeom") << wrapLog.name() << ":" << copyOne << " positioned in " << wallLog.name();
1655 #endif
1656 
1657  const EcalTrap::VertexList vWall(trapWall.vertexList());
1658  const EcalTrap::VertexList vCry(trapCry.vertexList());
1659 
1660  const double sidePrime(0.5 * (trapWall.a() - trapCry.a()));
1661  const double frontPrime(fWall + fWrap + fClr + 0.5 * LUnd);
1662 
1663  // define web plates with clearance ===========================================
1664 
1665  if (1 == cryType) // first web plate: inside clearance volume
1666  {
1667  const unsigned int iWeb(0);
1668  const Pt3D corner(vHAW[4] + Pt3D(0, alvWedge.hawYOffCry, 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());
1672 
1673  const double thick(web.vecWebPlTh[iWeb] + web.vecWebClrTh[iWeb]);
1674  const EcalTrap trapWebClr(0.5 * BWebx, // A/2
1675  0.5 * trapWall.b(), // a/2
1676  0.5 * trapWall.b(), // b/2
1677  0.5 * thick, // H/2
1678  0.5 * thick, // h/2
1679  0.5 * LWebx, // L/2
1680  90_deg, // alfa1
1681  trapWall.b() - BWebx, // x15
1682  0 // y15
1683  );
1684  std::string webClrName(web.clrName + std::to_string(iWeb));
1685  Solid webClrSolid = mytrap(webClrName, trapWebClr);
1686  Volume webClrLog = Volume(webClrName, webClrSolid, ns.material(web.clrMat));
1687 
1688  const EcalTrap trapWebPl(0.5 * trapWebClr.A(), // A/2
1689  0.5 * trapWebClr.a(), // a/2
1690  0.5 * trapWebClr.b(), // b/2
1691  0.5 * web.vecWebPlTh[iWeb], // H/2
1692  0.5 * web.vecWebPlTh[iWeb], // h/2
1693  0.5 * trapWebClr.L(), // L/2
1694  90._deg, // alfa1
1695  trapWebClr.b() - trapWebClr.B(), // x15
1696  0 // y15
1697  );
1698  std::string webPlName(web.plName + std::to_string(iWeb));
1699  Solid webPlSolid = mytrap(webPlName, trapWebPl);
1700  Volume webPlLog = Volume(webPlName, webPlSolid, ns.material(web.plMat));
1701 
1702  webClrLog.placeVolume(webPlLog, copyOne); // place plate inside clearance volume
1703 #ifdef EDM_ML_DEBUG
1704  edm::LogVerbatim("EcalGeom") << webPlLog.name() << ":" << copyOne << " positioned in " << webClrName;
1705 #endif
1706  const EcalTrap::VertexList vWeb(trapWebClr.vertexList());
1707 
1708  zee += trapWebClr.h() / sin(theta);
1709 
1710  const double beta(theta + delta);
1711 
1712  const double zWeb(zee - frontPrime * cos(beta) + sidePrime * sin(beta));
1713  const double yWeb(frontPrime * sin(beta) + sidePrime * cos(beta));
1714 
1715  const Pt3D wedge3(corner + Pt3D(0, -yWeb, zWeb));
1716  const Pt3D wedge2(wedge3 + Pt3D(0, trapWebClr.h() * cos(theta), -trapWebClr.h() * sin(theta)));
1717  const Pt3D wedge1(wedge3 + Pt3D(trapWebClr.a(), 0, 0));
1718 #ifdef EDM_ML_DEBUG
1719  edm::LogVerbatim("EcalGeom") << "trap1=" << vWeb[0] << ", trap2=" << vWeb[2] << ", trap3=" << vWeb[3];
1720  edm::LogVerbatim("EcalGeom") << "wedge1=" << wedge1 << ", wedge2=" << wedge2 << ", wedge3=" << wedge3;
1721 #endif
1722  const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
1723 
1724  if (0 != web.here) {
1725  hawRLog.placeVolume(
1726  webClrLog,
1727  copyOne,
1728  Transform3D(
1729  myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()),
1730  Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1731 #ifdef EDM_ML_DEBUG
1732  edm::LogVerbatim("EcalGeom") << webClrLog.name() << ":" << copyOne << " positioned in " << hawRLog.name();
1733 #endif
1734  }
1735  zee += alv.vecGapAlvEta[0];
1736  }
1737 
1738  for (unsigned int etaAlv(1); etaAlv <= alv.nCryPerAlvEta; ++etaAlv) {
1739 #ifdef EDM_ML_DEBUG
1740  edm::LogVerbatim("EcalGeom") << "theta=" << convertRadToDeg(theta) << ", sidePrime=" << sidePrime
1741  << ", frontPrime=" << frontPrime << ", zeta=" << zeta << ", delta=" << delta
1742  << ", zee=" << zee;
1743 #endif
1744 
1745  zee += 0.075_mm + (side * cos(zeta) + trapWall.h() - sidePrime) / sin(theta);
1746 
1747  // make transform for placing enclosed crystal
1748 
1749  const Pt3D trap2(vCry[2] + cryToClr + clrToWrap + wrapToWall);
1750 
1751  const Pt3D trap3(trap2 + Pt3D(0, -trapCry.h(), 0));
1752  const Pt3D trap1(trap3 + Pt3D(-trapCry.a(), 0, 0));
1753 
1754  const Pt3D wedge3(vHAW[4] + Pt3D(sidePrime, alvWedge.hawYOffCry, zee));
1755  const Pt3D wedge2(wedge3 + Pt3D(0, trapCry.h() * cos(theta), -trapCry.h() * sin(theta)));
1756  const Pt3D wedge1(wedge3 + Pt3D(trapCry.a(), 0, 0));
1757 
1758  const Tf3D tForm1(trap1, trap2, trap3, wedge1, wedge2, wedge3);
1759 
1760  const double xx(0.050_mm);
1761 
1762  const Tf3D tForm(HepGeom::Translate3D(xx, 0, 0) * tForm1);
1763  hawRLog.placeVolume(
1764  wallLog,
1765  etaAlv,
1766  Transform3D(myrot(ns, wallDDName + "_" + std::to_string(etaAlv), tForm.getRotation()),
1767  Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1768 #ifdef EDM_ML_DEBUG
1769  edm::LogVerbatim("EcalGeom") << wallLog.name() << ":" << etaAlv << " positioned in " << hawRLog.name();
1770 #endif
1771  theta -= delta;
1772  side = sidePrime;
1773  zeta = delta;
1774  }
1775  if (5 == cryType || 9 == cryType || 13 == cryType || 17 == cryType) { // web plates
1776  zee += 0.5 * alv.vecGapAlvEta[cryType] / sin(theta);
1777 
1778  const unsigned int iWeb(cryType / 4);
1779  const Pt3D corner(vHAW[4] + Pt3D(0, alvWedge.hawYOffCry, 0));
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());
1783 
1784  const double thick(web.vecWebPlTh[iWeb] + web.vecWebClrTh[iWeb]);
1785  const EcalTrap trapWebClr(0.5 * BWebx, // A/2
1786  0.5 * trapWall.a(), // a/2
1787  0.5 * trapWall.a(), // b/2
1788  0.5 * thick, // H/2
1789  0.5 * thick, // h/2
1790  0.5 * LWebx, // L/2
1791  90_deg, // alfa1
1792  trapWall.a() - BWebx, // x15
1793  0 // y15
1794  );
1795  std::string webClrName(web.clrName + std::to_string(iWeb));
1796  Solid webClrSolid = mytrap(webClrName, trapWebClr);
1797  Volume webClrLog = Volume(webClrName, webClrSolid, ns.material(web.clrMat));
1798 
1799  const EcalTrap trapWebPl(0.5 * trapWebClr.A(), // A/2
1800  0.5 * trapWebClr.a(), // a/2
1801  0.5 * trapWebClr.b(), // b/2
1802  0.5 * web.vecWebPlTh[iWeb], // H/2
1803  0.5 * web.vecWebPlTh[iWeb], // h/2
1804  0.5 * trapWebClr.L(), // L/2
1805  90._deg, // alfa1
1806  trapWebClr.b() - trapWebClr.B(), // x15
1807  0 // y15
1808  );
1809  std::string webPlName(web.plName + std::to_string(iWeb));
1810  Solid webPlSolid = mytrap(webPlName, trapWebPl);
1811  Volume webPlLog = Volume(webPlName, webPlSolid, ns.material(web.plMat));
1812 
1813  webClrLog.placeVolume(webPlLog, copyOne); // place plate inside clearance volume
1814 #ifdef EDM_ML_DEBUG
1815  edm::LogVerbatim("EcalGeom") << webPlLog.name() << ":" << copyOne << " positioned in " << webClrName;
1816 #endif
1817  const EcalTrap::VertexList vWeb(trapWebClr.vertexList());
1818 
1819  zee += trapWebClr.h() / sin(theta);
1820 
1821  const double beta(theta + delta);
1822 
1823  const double zWeb(zee - frontPrime * cos(beta) + sidePrime * sin(beta));
1824  const double yWeb(frontPrime * sin(beta) + sidePrime * cos(beta));
1825 
1826  const Pt3D wedge3(corner + Pt3D(0, -yWeb, zWeb));
1827  const Pt3D wedge2(wedge3 + Pt3D(0, trapWebClr.h() * cos(theta), -trapWebClr.h() * sin(theta)));
1828  const Pt3D wedge1(wedge3 + Pt3D(trapWebClr.a(), 0, 0));
1829 #ifdef EDM_ML_DEBUG
1830  edm::LogVerbatim("EcalGeom") << "trap1=" << vWeb[0] << ", trap2=" << vWeb[2] << ", trap3=" << vWeb[3];
1831  edm::LogVerbatim("EcalGeom") << "wedge1=" << wedge1 << ", wedge2=" << wedge2 << ", wedge3=" << wedge3;
1832 #endif
1833  const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
1834 
1835  if (0 != web.here) {
1836  hawRLog.placeVolume(
1837  webClrLog,
1838  copyOne,
1839  Transform3D(
1840  myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()),
1841  Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z())));
1842 #ifdef EDM_ML_DEBUG
1843  edm::LogVerbatim("EcalGeom") << webClrLog.name() << ":" << copyOne << " positioned in " << hawRLog.name();
1844 #endif
1845  }
1846 
1847  zee += 0.5 * alv.vecGapAlvEta[cryType] / sin(theta);
1848  } else {
1849  if (17 != cryType)
1850  zee += alv.vecGapAlvEta[cryType] / sin(theta);
1851  }
1852  }
1853  // END filling Wedge with crystal plus supports --------------------------
1854 
1855  //------------------------------------------------------------------------
1856  //------------------------------------------------------------------------
1857  //------------------------------------------------------------------------
1858  //------------------------------------------------------------------------
1859  //**************** Material at outer radius of supermodule ***************
1860  //------------------------------------------------------------------------
1861  //------------------------------------------------------------------------
1862  //------------------------------------------------------------------------
1863  //------------------------------------------------------------------------
1864 
1865  if (0 != back.here) {
1871 
1872  const Position outtra(back.xOff + 0.5 * back.sideHeight, back.yOff, 0.5 * back.sideLength);
1873 
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));
1878 
1879  const Position backPlateTra(
1880  0.5 * back.sideHeight + backPlateParms[1], 0_mm, backPlateParms[2] - 0.5 * back.sideLength);
1881 
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));
1884 
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));
1888 #ifdef EDM_ML_DEBUG
1889  edm::LogVerbatim("EcalGeom") << backPlate2Log.name() << ":" << copyOne << " positioned in "
1890  << backPlateLog.name();
1891 #endif
1892  spmLog.placeVolume(
1893  backPlateLog,
1894  copyOne,
1895  Transform3D(myrot(ns, back.plateName + "Rot5", CLHEP::HepRotationZ(270_deg)), outtra + backPlateTra));
1896 #ifdef EDM_ML_DEBUG
1897  edm::LogVerbatim("EcalGeom") << backPlateLog.name() << ":" << copyOne << " positioned in "
1898  << DDSplit(spmLog.name()).first;
1899 #endif
1900  }
1906 
1912 
1913  const EcalTrap trapBS(back.sideWidth / 2., //double aHalfLengthXNegZLoY , // bl1, A/2
1914  back.sideWidth / 2., //double aHalfLengthXPosZLoY , // bl2, a/2
1915  back.sideWidth / 4., //double aHalfLengthXPosZHiY , // tl2, b/2
1916  back.sideHeight / 2., //double aHalfLengthYNegZ , // h1, H/2
1917  back.sideHeight / 2., //double aHalfLengthYPosZ , // h2, h/2
1918  back.sideLength / 2., //double aHalfLengthZ , // dz, L/2
1919  back.sideAngle, //double aAngleAD , // alfa1
1920  0, //double aCoord15X , // x15
1921  0 //double aCoord15Y // y15
1922  );
1923 
1924  Solid backSideSolid = mytrap(back.sideName, trapBS);
1925  Volume backSideLog = Volume(back.sideName, backSideSolid, ns.material(back.sideMat));
1926 
1927  const Position backSideTra1(0_mm, back.plateWidth / 2 + back.sideYOff1, 1_mm);
1928  if (0 != back.sideHere) {
1929  spmLog.placeVolume(
1930  backSideLog,
1931  copyOne,
1932  Transform3D(myrot(ns, back.sideName + "Rot8", CLHEP::HepRotationX(180_deg) * CLHEP::HepRotationZ(90_deg)),
1933  outtra + backSideTra1));
1934 #ifdef EDM_ML_DEBUG
1935  edm::LogVerbatim("EcalGeom") << backSideLog.name() << ":" << copyOne << " positioned in "
1936  << DDSplit(spmLog.name()).first;
1937 #endif
1938  const Position backSideTra2(0_mm, -back.plateWidth / 2 + back.sideYOff2, 1_mm);
1939  spmLog.placeVolume(
1940  backSideLog,
1941  copyTwo,
1942  Transform3D(myrot(ns, back.sideName + "Rot9", CLHEP::HepRotationZ(90_deg)), outtra + backSideTra2));
1943 #ifdef EDM_ML_DEBUG
1944  edm::LogVerbatim("EcalGeom") << backSideLog.name() << ":" << copyTwo << " positioned in "
1945  << DDSplit(spmLog.name()).first;
1946 #endif
1947  }
1953 
1954  //=====================
1955  const double backCoolWidth(backCool.barWidth + 2. * backCoolTank.width);
1956 
1962 
1963  const double manifCut(2_mm);
1964 
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));
1967 
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);
1972 #ifdef EDM_ML_DEBUG
1973  edm::LogVerbatim("EcalGeom") << mBManifWaLog.name() << ":" << copyOne << " positioned in " << mBManifLog.name();
1974 #endif
1975 
1981  //=====================
1982 
1988  const double deltaY(-5_mm);
1989 
1990  Solid grEdgeSlotSolid = Box(grille.edgeSlotHeight / 2., grille.edgeSlotWidth / 2., grille.thick / 2.);
1991  Volume grEdgeSlotLog = Volume(grille.edgeSlotName, grEdgeSlotSolid, ns.material(grille.edgeSlotMat));
1992 
1993  unsigned int edgeSlotCopy(0);
1994  unsigned int midSlotCopy(0);
1995 
1996  Volume grMidSlotLog[4];
1997 
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));
2002 
2003  const Position grilleTra(-realBPthick / 2 - grille.vecHeight[iGr] / 2,
2004  deltaY,
2005  grille.vecZOff[iGr] + grille.thick / 2 - back.sideLength / 2);
2006  const Position gTra(outtra + backPlateTra + grilleTra);
2007 
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));
2014  }
2015  grilleLog.placeVolume(
2016  grMidSlotLog[(iGr - 1) / 2],
2017  ++midSlotCopy,
2018  Transform3D(Position(
2019  grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., +grille.midSlotXOff, 0)));
2020 #ifdef EDM_ML_DEBUG
2021  edm::LogVerbatim("EcalGeom") << grMidSlotLog[(iGr - 1) / 2].name() << ":" << midSlotCopy << " positioned in "
2022  << grilleLog.name();
2023 #endif
2024  grilleLog.placeVolume(
2025  grMidSlotLog[(iGr - 1) / 2],
2026  ++midSlotCopy,
2027  Transform3D(Position(
2028  grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., -grille.midSlotXOff, 0)));
2029 #ifdef EDM_ML_DEBUG
2030  edm::LogVerbatim("EcalGeom") << grMidSlotLog[(iGr - 1) / 2].name() << ":" << midSlotCopy << " positioned in "
2031  << grilleLog.name();
2032 #endif
2033  }
2034 
2035  if (0 != grille.edgeSlotHere && 0 != iGr) {
2036  grilleLog.placeVolume(grEdgeSlotLog,
2037  ++edgeSlotCopy,
2038  Transform3D(Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.,
2039  backCoolWidth / 2 - grille.edgeSlotWidth / 2.,
2040  0)));
2041 #ifdef EDM_ML_DEBUG
2042  edm::LogVerbatim("EcalGeom") << grEdgeSlotLog.name() << ":" << edgeSlotCopy << " positioned in "
2043  << grilleLog.name();
2044 #endif
2045  grilleLog.placeVolume(grEdgeSlotLog,
2046  ++edgeSlotCopy,
2047  Transform3D(Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.,
2048  -backCoolWidth / 2 + grille.edgeSlotWidth / 2.,
2049  0)));
2050 #ifdef EDM_ML_DEBUG
2051  edm::LogVerbatim("EcalGeom") << grEdgeSlotLog.name() << ":" << edgeSlotCopy << " positioned in "
2052  << grilleLog.name();
2053 #endif
2054  }
2055  if (0 != grille.here) {
2056  spmLog.placeVolume(grilleLog, iGr, Transform3D(gTra));
2057 #ifdef EDM_ML_DEBUG
2058  edm::LogVerbatim("EcalGeom") << grilleLog.name() << ":" << iGr << " positioned in "
2059  << DDSplit(spmLog.name()).first;
2060 #endif
2061  }
2062 
2063  if ((0 != iGr % 2) && (0 != mbManif.here)) {
2064  spmLog.placeVolume(mBManifLog,
2065  iGr,
2066  Transform3D(myrot(ns, mbManif.name + "R1", CLHEP::HepRotationX(90_deg)),
2067  gTra - Position(-mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2.,
2068  manifCut,
2069  grille.thick / 2. + 3 * mbManif.outDiam / 2.)));
2070 #ifdef EDM_ML_DEBUG
2071  edm::LogVerbatim("EcalGeom") << mBManifLog.name() << ":" << iGr << " positioned in "
2072  << DDSplit(spmLog.name()).first;
2073 #endif
2074  spmLog.placeVolume(mBManifLog,
2075  iGr - 1,
2076  Transform3D(myrot(ns, mbManif.name + "R2", CLHEP::HepRotationX(90_deg)),
2077  gTra - Position(-3 * mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2.,
2078  manifCut,
2079  grille.thick / 2 + 3 * mbManif.outDiam / 2.)));
2080 #ifdef EDM_ML_DEBUG
2081  edm::LogVerbatim("EcalGeom") << mBManifLog.name() << ":" << (iGr - 1) << " positioned in "
2082  << DDSplit(spmLog.name()).first;
2083 #endif
2084  }
2085  }
2086 
2092 
2098 
2099  Solid backCoolBarSolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., backCool.barThick / 2.);
2100  Volume backCoolBarLog = Volume(backCool.barName, backCoolBarSolid, ns.material(backCool.barMat));
2101 
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));
2106 #ifdef EDM_ML_DEBUG
2107  edm::LogVerbatim("EcalGeom") << backCoolBarSSLog.name() << ":" << copyOne << " positioned in "
2108  << backCoolBarLog.name();
2109 #endif
2110 
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));
2115 #ifdef EDM_ML_DEBUG
2116  edm::LogVerbatim("EcalGeom") << backCoolBarWaLog.name() << ":" << copyOne << " positioned in "
2117  << backCoolBarSSLog.name();
2118 #endif
2119 
2125 
2131 
2132  double thickVFE(0);
2133  for (unsigned int iLyr(0); iLyr != backCool.vecBackVFELyrThick.size(); ++iLyr) {
2134  thickVFE += backCool.vecBackVFELyrThick[iLyr];
2135  }
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.);
2142  Volume backVFELyrLog =
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));
2146 #ifdef EDM_ML_DEBUG
2147  edm::LogVerbatim("EcalGeom") << backVFELyrLog.name() << ":" << copyOne << " positioned in "
2148  << DDSplit(backVFELog.name()).first;
2149 #endif
2150  offTra += 2 * backVFELyrTra;
2151  }
2152 
2158 
2164 
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());
2170 #ifdef EDM_ML_DEBUG
2171  edm::LogVerbatim("EcalGeom") << backCoolBarLog.name() << ":" << copyOne << " positioned in "
2172  << backCoolVFELog.name();
2173 #endif
2174  }
2175  if (0 != backCool.vFEHere) {
2176  backCoolVFELog.placeVolume(
2177  backVFELog, copyOne, Transform3D(Position(0, 0, backCool.barThick / 2. + thickVFE / 2.)));
2178 #ifdef EDM_ML_DEBUG
2179  edm::LogVerbatim("EcalGeom") << DDSplit(backVFELog.name()).first << ":" << copyOne << " positioned in "
2180  << backCoolVFELog.name();
2181 #endif
2182  }
2183  backCoolVFELog.placeVolume(backVFELog,
2184  copyTwo,
2185  Transform3D(myrot(ns, backCool.backVFEName + "Flip", CLHEP::HepRotationX(180_deg)),
2186  Position(0, 0, -backCool.barThick / 2. - thickVFE / 2.)));
2187 #ifdef EDM_ML_DEBUG
2188  edm::LogVerbatim("EcalGeom") << DDSplit(backVFELog.name()).first << ":" << copyTwo << " positioned in "
2189  << backCoolVFELog.name();
2190 #endif
2191 
2197 
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);
2210 
2211  // accumulate total height of parent volume
2212  double backCoolHeight(backCool.barHeight + mbCoolTube.outDiam);
2213  for (unsigned int iMisc(0); iMisc != nMisc; ++iMisc) {
2214  backCoolHeight += backMisc.vecThick[iMod * nMisc + iMisc];
2215  }
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];
2220  }
2221 
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));
2225 
2226  const Position bCoolTra(
2227  -realBPthick / 2 + backCoolHeight / 2 - grille.vecHeight[2 * iMod],
2228  deltaY,
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);
2232 #ifdef EDM_ML_DEBUG
2233  edm::LogVerbatim("EcalGeom") << backCoolLog.name() << ":" << (iMod + 1) << " positioned in "
2234  << DDSplit(spmLog.name()).first;
2235 #endif
2236  }
2237 
2238  //===
2239  const double backCoolTankHeight(backCool.barHeight); // - backBracketHeight() ) ;
2240  const double halfZTank(halfZBCool - 5_cm);
2241 
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,
2247  copyOne,
2248  Transform3D(Rotation3D(),
2249  Position(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick,
2250  backCool.barWidth / 2. + backCoolTank.width / 2.,
2251  0)));
2252 #ifdef EDM_ML_DEBUG
2253  edm::LogVerbatim("EcalGeom") << backCoolTankLog.name() << ":" << copyOne << " positioned in "
2254  << backCoolLog.name();
2255 #endif
2256  }
2257 
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)));
2264 #ifdef EDM_ML_DEBUG
2265  edm::LogVerbatim("EcalGeom") << backCoolTankWaLog.name() << ":" << copyOne << " positioned in "
2266  << backCoolTankLog.name();
2267 #endif
2268 
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,
2274  copyOne,
2275  Transform3D(Rotation3D(),
2276  Position(backCool.barHeight - backCoolHeight / 2. -
2277  backCoolTank.backBracketHeight / 2. + bottomThick,
2278  -backCool.barWidth / 2. - backCoolTank.width / 2.,
2279  0)));
2280 #ifdef EDM_ML_DEBUG
2281  edm::LogVerbatim("EcalGeom") << backBracketLog.name() << ":" << copyOne << " positioned in "
2282  << backCoolLog.name();
2283 #endif
2284  }
2285  //===
2286 
2287  Position bSumTra(backCool.barHeight - backCoolHeight / 2. + bottomThick, 0, 0);
2288  for (unsigned int j(0); j != nMisc; ++j) { // loop over miscellaneous layers
2289  Solid bSolid =
2290  Box(backMisc.vecThick[iMod * nMisc + j] / 2, backCool.barWidth / 2. + backCoolTank.width, halfZBCool);
2291 
2292  Volume bLog =
2293  Volume(backMisc.vecName[iMod * nMisc + j], bSolid, ns.material(backMisc.vecMat[iMod * nMisc + j]));
2294 
2295  const Position bTra(backMisc.vecThick[iMod * nMisc + j] / 2, 0_mm, 0_mm);
2296 
2297  if (0 != backMisc.here) {
2298  backCoolLog.placeVolume(bLog, copyOne, Transform3D(Rotation3D(), bSumTra + bTra));
2299 #ifdef EDM_ML_DEBUG
2300  edm::LogVerbatim("EcalGeom") << bLog.name() << ":" << copyOne << " positioned in " << backCoolLog.name();
2301 #endif
2302  }
2303 
2304  bSumTra += 2 * bTra;
2305  }
2306 
2307  const double bHalfWidth(backCool.barWidth / 2. + backCoolTank.width);
2308 
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) // loop over MB layers
2312  {
2313  Solid mSolid = Box(mbLyr.vecMBLyrThick[j] / 2, bHalfWidth, halfZBCool);
2314  Volume mLog = Volume(
2315  mbLyr.vecMBLyrName[j] + "_" + std::to_string(iMod + 1), mSolid, ns.material(mbLyr.vecMBLyrMat[j]));
2316 
2317  mTra += Position(mbLyr.vecMBLyrThick[j] / 2.0, 0_mm, 0_mm);
2318  backCoolLog.placeVolume(mLog, copyOne, Transform3D(Rotation3D(), mTra));
2319 #ifdef EDM_ML_DEBUG
2320  edm::LogVerbatim("EcalGeom") << mLog.name() << ":" << copyOne << " positioned in " << backCoolLog.name();
2321 #endif
2322  mTra += Position(mbLyr.vecMBLyrThick[j] / 2.0, 0_mm, 0_mm);
2323  }
2324  }
2325 
2326  if (0 != mbCoolTube.here) {
2327  const string mBName(mbCoolTube.name + "_" + std::to_string(iMod + 1));
2328 
2329  Solid mBCoolTubeSolid = Tube(0, mbCoolTube.outDiam / 2, halfZBCool, 0_deg, 360_deg);
2330  Volume mBLog = Volume(mBName, mBCoolTubeSolid, ns.material(mbCoolTube.mat));
2331 
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);
2336 #ifdef EDM_ML_DEBUG
2337  edm::LogVerbatim("EcalGeom") << mBWaLog.name() << ":" << copyOne << " positioned in " << mBLog.name();
2338 #endif
2339 
2340  for (unsigned int j(0); j != dryAirTube.mbCoolTubeNum; ++j) // loop over all MB cooling circuits
2341  {
2342  backCoolLog.placeVolume(mBLog,
2343  2 * j + 1,
2344  Transform3D(Rotation3D(),
2345  Position(-backCoolHeight / 2.0 + mbCoolTube.outDiam / 2.,
2346  -bHalfWidth + (j + 1) * bHalfWidth / 5,
2347  0)));
2348 #ifdef EDM_ML_DEBUG
2349  edm::LogVerbatim("EcalGeom") << mBLog.name() << ":" << (2 * j + 1) << " positioned in "
2350  << backCoolLog.name();
2351 #endif
2352  }
2353  }
2354 
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));
2363 
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);
2367 
2368  Volume backPipeLog = Volume(bPipeName, backPipeSolid, ns.material(backPipe.mat));
2369  Volume backInnerLog = Volume(bInnerName, backInnerSolid, ns.material(backPipe.waterMat));
2370 
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],
2373  pipeZPos);
2374 
2375  spmLog.placeVolume(backPipeLog, copyOne, Transform3D(Rotation3D(), bPipeTra1));
2376 #ifdef EDM_ML_DEBUG
2377  edm::LogVerbatim("EcalGeom") << backPipeLog.name() << ":" << copyOne << " positioned in "
2378  << DDSplit(spmLog.name()).first;
2379 #endif
2380  const Position bPipeTra2(
2381  bPipeTra1.x(), back.yOff - back.plateWidth / 2 + back.sideWidth + backPipe.vecDiam[iMod], bPipeTra1.z());
2382 
2383  spmLog.placeVolume(backPipeLog, copyTwo, Transform3D(Rotation3D(), bPipeTra2));
2384 #ifdef EDM_ML_DEBUG
2385  edm::LogVerbatim("EcalGeom") << backPipeLog.name() << ":" << copyTwo << " positioned in "
2386  << DDSplit(spmLog.name()).first;
2387 #endif
2388 
2389  backPipeLog.placeVolume(backInnerLog, copyOne, Transform3D(Rotation3D(), Position()));
2390 #ifdef EDM_ML_DEBUG
2391  edm::LogVerbatim("EcalGeom") << backInnerLog.name() << ":" << copyOne << " positioned in "
2392  << backPipeLog.name();
2393 #endif
2394  }
2400 
2401  //=================================================
2402 
2403  if (0 != dryAirTube.here) {
2404  string dryAirTubName(dryAirTube.name + std::to_string(iMod + 1));
2405 
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));
2409 
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,
2412  pipeZPos);
2413 
2414  spmLog.placeVolume(dryAirTubeLog, copyOne, Transform3D(Rotation3D(), dryAirTubeTra1));
2415 #ifdef EDM_ML_DEBUG
2416  edm::LogVerbatim("EcalGeom") << dryAirTubeLog.name() << ":" << copyOne << " positioned in "
2417  << DDSplit(spmLog.name()).first;
2418 #endif
2419 
2420  const Position dryAirTubeTra2(dryAirTubeTra1.x(),
2421  back.yOff - back.plateWidth / 2 + back.sideWidth + 0.7 * dryAirTube.outDiam,
2422  dryAirTubeTra1.z());
2423 
2424  spmLog.placeVolume(dryAirTubeLog, copyTwo, Transform3D(Rotation3D(), dryAirTubeTra2));
2425 #ifdef EDM_ML_DEBUG
2426  edm::LogVerbatim("EcalGeom") << dryAirTubeLog.name() << ":" << copyTwo << " positioned in "
2427  << DDSplit(spmLog.name()).first;
2428 #endif
2429  }
2430  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2431 
2432  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2433  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2434  // !!!!!!!!!!!!!! Begin Placement of Cooling + VFE Cards !!!!!!
2435  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2436  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2437 
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);
2444 #ifdef EDM_ML_DEBUG
2445  edm::LogVerbatim("EcalGeom") << backCoolVFELog.name() << ":" << iCVFECopy << " positioned in "
2446  << backCoolLog.name();
2447 #endif
2448  cTra += Position(0, 0, backMisc.backCBStdSep);
2449  }
2450  cTra -= Position(0, 0, backMisc.backCBStdSep); // backspace to previous
2451  if (jSec != numSec - 1)
2452  cTra += Position(0, 0, backCool.vecBackCoolSecSep[iSep++]); // now take atypical step
2453  }
2459  }
2460 
2466 
2472 
2473  double patchHeight(0);
2474  for (unsigned int iPatch(0); iPatch != patchPanel.vecThick.size(); ++iPatch) {
2475  patchHeight += patchPanel.vecThick[iPatch];
2476  }
2477 
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));
2482 
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);
2486 #ifdef EDM_ML_DEBUG
2487  edm::LogVerbatim("EcalGeom") << patchLog.name() << ":" << copyOne << " positioned in "
2488  << DDSplit(spmLog.name()).first;
2489 #endif
2490  }
2491 
2492  Position pTra(-patchParms[0], 0, 0);
2493 
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]));
2497 
2498  pTra += Position(patchPanel.vecThick[j] / 2, 0_mm, 0_mm);
2499  patchLog.placeVolume(pLog, copyOne, pTra);
2500 #ifdef EDM_ML_DEBUG
2501  edm::LogVerbatim("EcalGeom") << pLog.name() << ":" << copyOne << " positioned in " << patchLog.name();
2502 #endif
2503 
2504  pTra += Position(patchPanel.vecThick[j] / 2, 0_mm, 0_mm);
2505  }
2511 
2517 
2518  if (0 != pincer.rodHere) {
2519  // Make hierarchy of rods, envelopes, blocks, shims, and cutouts
2520 
2521  Solid rodSolid = Box(pincer.rodName, pincer.envWidthHalf, pincer.envHeightHalf, ilyLengthHalf);
2522  Volume rodLog = Volume(pincer.rodName, rodSolid, ns.material(pincer.rodMat));
2523 
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));
2527 
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));
2531 
2532  envLog.placeVolume(blkLog, copyOne, Position(0_mm, 0_mm, pincer.envLengthHalf - pincer.blkLengthHalf));
2533 #ifdef EDM_ML_DEBUG
2534  edm::LogVerbatim("EcalGeom") << blkLog.name() << ":" << copyOne << " positioned in " << envLog.name();
2535 #endif
2536 
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));
2540  blkLog.placeVolume(
2541  cutLog,
2542  copyOne,
2543  Position(
2544  +blkParms[0] - cutParms[0] - pincer.shim1Width + pincer.shim2Width, -blkParms[1] + cutParms[1], 0_mm));
2545 #ifdef EDM_ML_DEBUG
2546  edm::LogVerbatim("EcalGeom") << cutLog.name() << ":" << copyOne << " positioned in " << blkLog.name();
2547 #endif
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));
2551  cutLog.placeVolume(
2552  shim2Log, copyOne, Position(+cutParms[0] - shim2Parms[0], -cutParms[1] + shim2Parms[1], 0_mm));
2553 #ifdef EDM_ML_DEBUG
2554  edm::LogVerbatim("EcalGeom") << shim2Log.name() << ":" << copyOne << " positioned in " << cutLog.name();
2555 #endif
2556 
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));
2561  envLog.placeVolume(
2562  shim1Log,
2563  copyOne,
2564  Position(+envParms[0] - shim1Parms[0], -envParms[1] + shim1Parms[1], -envParms[2] + shim1Parms[2]));
2565 #ifdef EDM_ML_DEBUG
2566  edm::LogVerbatim("EcalGeom") << shim1Log.name() << ":" << copyOne << " positioned in " << envLog.name();
2567 #endif
2568 
2569  for (unsigned int iEnv(0); iEnv != pincer.vecEnvZOff.size(); ++iEnv) {
2570  rodLog.placeVolume(
2571  envLog, 1 + iEnv, Position(0_mm, 0_mm, -ilyLengthHalf + pincer.vecEnvZOff[iEnv] - pincer.envLengthHalf));
2572 #ifdef EDM_ML_DEBUG
2573  edm::LogVerbatim("EcalGeom") << envLog.name() << ":" << (1 + iEnv) << " positioned in " << rodLog.name();
2574 #endif
2575  }
2576 
2577  // Place the rods
2578  const double radius(ilyRMin - pincer.envHeightHalf - 1_mm);
2579  const string xilyName(ily.name + std::to_string(ily.vecIlyMat.size() - 1));
2580 
2581  for (unsigned int iRod(0); iRod != pincer.vecRodAzimuth.size(); ++iRod) {
2582  const Position rodTra(
2583  radius * cos(pincer.vecRodAzimuth[iRod]), radius * sin(pincer.vecRodAzimuth[iRod]), 0_mm);
2584  xilyLog.placeVolume(rodLog,
2585  1 + iRod,
2586  Transform3D(myrot(ns,
2587  pincer.rodName + std::to_string(iRod),
2588  CLHEP::HepRotationZ(90_deg + pincer.vecRodAzimuth[iRod])),
2589  rodTra));
2590 #ifdef EDM_ML_DEBUG
2591  edm::LogVerbatim("EcalGeom") << rodLog.name() << ":" << (1 + iRod) << " positioned in " << xilyLog.name();
2592 #endif
2593  }
2594  }
2600  }
2601  }
2602 
2603  return 1;
2604 }

References EcalTrapezoidParameters::a(), EcalTrapezoidParameters::A(), cms::DDNamespace::addVolume(), writedatasetfile::args, EcalTrapezoidParameters::b(), b1, b2, testProducerWithPsetDescEmpty_cfi::b3, zMuMuMuonUserData::beta, EcalTrapezoidParameters::bl1(), reco::HaloData::both, HLT_FULL_cff::cap, angle_units::operators::convertRadToDeg(), distTCMET_cfi::corner, funct::cos(), counter, dd4hep::createPlacement(), data, DDSplit(), dumpMFGeometry_cfg::delta, EcalTrapezoidParameters::dz(), MillePedeFileConverter_cfg::e, dqmdumpme::first, CustomPhysics_cfi::gamma, getRunAppsInfo::grid, EcalTrapezoidParameters::h(), EcalTrapezoidParameters::H(), EcalTrapezoidParameters::h1(), LEDCalibrationChannels::iphi, dqmiolumiharvest::j, EcalTrapezoidParameters::L(), M_PI, M_PI_2, cms::DDNamespace::material(), Skims_PA_cff::name, metDiagnosticParameterSet_cfi::nMax, PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), diffTwoXMLs::r1, CosmicsPD_Skims::radius, idealTransformation::rotation, cms::DDNamespace::rotation(), funct::sin(), findQualityFiles::size, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, theta(), HcalDetIdTransform::transform(), EcalTrapezoidParameters::vertexList(), cms::DDNamespace::volume(), geometryCSVtoXML::xx, geometryCSVtoXML::yy, and geometryCSVtoXML::zz.

◆ DD4HEP_OPEN_PLUGIN()

DD4HEP_OPEN_PLUGIN ( dd4hep  ,
ddcms_det_element_DDCMS_ecal_DDEcalBarrelNewAlgo   
)

Definition at line 2606 of file DDEcalBarrelNewAlgo.cc.

writedatasetfile.args
args
Definition: writedatasetfile.py:18
Vec3
CLHEP::Hep3Vector Vec3
Definition: DDEcalBarrelNewAlgo.cc:26
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
EcalTrapezoidParameters
Definition: EcalTrapezoidParameters.h:62
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
angle_units::operators::convertRadToDeg
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
cms::DDNamespace
Definition: DDNamespace.h:16
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
distTCMET_cfi.corner
corner
Definition: distTCMET_cfi.py:38
reco::HaloData::both
Definition: HaloData.h:14
getRunAppsInfo.grid
grid
Definition: getRunAppsInfo.py:92
XYZVector
math::XYZVector XYZVector
Definition: RawParticle.h:26
CustomPhysics_cfi.gamma
gamma
Definition: CustomPhysics_cfi.py:17
Pt3D
HepGeom::Point3D< double > Pt3D
Definition: DDEcalBarrelNewAlgo.cc:25
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
Ro3D
HepGeom::Rotate3D Ro3D
Definition: DDEcalBarrelNewAlgo.cc:28
dqmdumpme.first
first
Definition: dqmdumpme.py:55
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CaloCellGeometry.cc:5
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
RoX3D
HepGeom::RotateX3D RoX3D
Definition: DDEcalBarrelNewAlgo.cc:31
Rota
CLHEP::HepRotation Rota
Definition: DDEcalBarrelNewAlgo.cc:27
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
RoZ3D
HepGeom::RotateZ3D RoZ3D
Definition: DDEcalBarrelNewAlgo.cc:32
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
PixelTestBeamValidation_cfi.Position
Position
Definition: PixelTestBeamValidation_cfi.py:75
RecoMuonCosmics_cff.Barrel
Barrel
Definition: RecoMuonCosmics_cff.py:206
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Tl3D
HepGeom::Translate3D Tl3D
Definition: DDEcalBarrelNewAlgo.cc:29
cms::Volume
dd4hep::Volume Volume
Definition: DDFilteredView.h:47
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
PVValHelper::phi
Definition: PVValidationHelpers.h:68
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
HLT_FULL_cff.cap
cap
Definition: HLT_FULL_cff.py:6335
cms::DDAlgoArguments
Definition: DDAlgoArguments.h:28
counter
static std::atomic< unsigned int > counter
Definition: SharedResourceNames.cc:17
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
testProducerWithPsetDescEmpty_cfi.b3
b3
Definition: testProducerWithPsetDescEmpty_cfi.py:36
BenchmarkGrd
Definition: BenchmarkGrd.h:9
MTDTopologyMode::Mode::bar
genVertex_cff.x
x
Definition: genVertex_cff.py:12
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
web
Definition: __init__.py:1
M_PI_2
#define M_PI_2
Definition: CSCGattiFunction.cc:6
EcalTrapezoidParameters::VertexList
CaloCellGeometry::Pt3DVec VertexList
Definition: EcalTrapezoidParameters.h:64
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Tf3D
HepGeom::Transform3D Tf3D
Definition: DDEcalBarrelNewAlgo.cc:30
dd4hep::createPlacement
TGeoCombiTrans * createPlacement(const Rotation3D &iRot, const Position &iTrans)
Definition: DDDefinitions2Objects.cc:109
metDiagnosticParameterSet_cfi.nMax
nMax
Definition: metDiagnosticParameterSet_cfi.py:11
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
DDSplit
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Definition: DDSplit.cc:3
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37