File indexing completed on 2021-12-08 08:16:20
0001
0002
0003
0004
0005
0006 #include <cmath>
0007 #include <algorithm>
0008
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
0011 #include "DetectorDescription/Core/interface/DDSolid.h"
0012 #include "DetectorDescription/Core/interface/DDCurrentNamespace.h"
0013 #include "DetectorDescription/Core/interface/DDTranslation.h"
0014 #include "CLHEP/Units/GlobalSystemOfUnits.h"
0015
0016 #include <CLHEP/Geometry/Point3D.h>
0017 #include <CLHEP/Geometry/Vector3D.h>
0018 #include <CLHEP/Geometry/Transform3D.h>
0019 #include <map>
0020 #include <string>
0021 #include <vector>
0022 #include "DetectorDescription/Core/interface/DDTypes.h"
0023 #include "DetectorDescription/Core/interface/DDName.h"
0024 #include "DetectorDescription/Core/interface/DDAlgorithm.h"
0025 #include "DetectorDescription/Core/interface/DDMaterial.h"
0026 #include "DetectorDescription/Core/interface/DDSplit.h"
0027 #include "DetectorDescription/Core/interface/DDTransform.h"
0028 #include "Geometry/CaloGeometry/interface/EcalTrapezoidParameters.h"
0029 #include "CLHEP/Geometry/Transform3D.h"
0030
0031
0032
0033 class DDEcalBarrelNewAlgo : public DDAlgorithm {
0034 public:
0035 typedef EcalTrapezoidParameters Trap;
0036 typedef HepGeom::Point3D<double> Pt3D;
0037 typedef HepGeom::Transform3D Tf3D;
0038 typedef HepGeom::ReflectZ3D RfZ3D;
0039 typedef HepGeom::Translate3D Tl3D;
0040 typedef HepGeom::Rotate3D Ro3D;
0041 typedef HepGeom::RotateZ3D RoZ3D;
0042 typedef HepGeom::RotateY3D RoY3D;
0043 typedef HepGeom::RotateX3D RoX3D;
0044
0045 typedef CLHEP::Hep3Vector Vec3;
0046 typedef CLHEP::HepRotation Rota;
0047
0048
0049 DDEcalBarrelNewAlgo();
0050 ~DDEcalBarrelNewAlgo() override;
0051
0052 void initialize(const DDNumericArguments& nArgs,
0053 const DDVectorArguments& vArgs,
0054 const DDMapArguments& mArgs,
0055 const DDStringArguments& sArgs,
0056 const DDStringVectorArguments& vsArgs) override;
0057 void execute(DDCompactView& cpv) override;
0058
0059 DDMaterial ddmat(const std::string& s) const;
0060 DDName ddname(const std::string& s) const;
0061 DDRotation myrot(const std::string& s, const CLHEP::HepRotation& r) const;
0062 DDSolid mytrap(const std::string& s, const Trap& t) const;
0063
0064 const std::string& idNameSpace() const { return m_idNameSpace; }
0065
0066
0067 DDName barName() const { return ddname(m_BarName); }
0068 DDMaterial barMat() const { return ddmat(m_BarMat); }
0069 const std::vector<double>& vecBarZPts() const { return m_vecBarZPts; }
0070 const std::vector<double>& vecBarRMin() const { return m_vecBarRMin; }
0071 const std::vector<double>& vecBarRMax() const { return m_vecBarRMax; }
0072 const std::vector<double>& vecBarTran() const { return m_vecBarTran; }
0073 const std::vector<double>& vecBarRota() const { return m_vecBarRota; }
0074 const std::vector<double>& vecBarRota2() const { return m_vecBarRota2; }
0075 const std::vector<double>& vecBarRota3() const { return m_vecBarRota3; }
0076 double barPhiLo() const { return m_BarPhiLo; }
0077 double barPhiHi() const { return m_BarPhiHi; }
0078 double barHere() const { return m_BarHere; }
0079
0080 DDName spmName() const { return ddname(m_SpmName); }
0081 DDMaterial spmMat() const { return ddmat(m_SpmMat); }
0082 const std::vector<double>& vecSpmZPts() const { return m_vecSpmZPts; }
0083 const std::vector<double>& vecSpmRMin() const { return m_vecSpmRMin; }
0084 const std::vector<double>& vecSpmRMax() const { return m_vecSpmRMax; }
0085 const std::vector<double>& vecSpmTran() const { return m_vecSpmTran; }
0086 const std::vector<double>& vecSpmRota() const { return m_vecSpmRota; }
0087 const std::vector<double>& vecSpmBTran() const { return m_vecSpmBTran; }
0088 const std::vector<double>& vecSpmBRota() const { return m_vecSpmBRota; }
0089 unsigned int spmNPerHalf() const { return m_SpmNPerHalf; }
0090 double spmLowPhi() const { return m_SpmLowPhi; }
0091 double spmDelPhi() const { return m_SpmDelPhi; }
0092 double spmPhiOff() const { return m_SpmPhiOff; }
0093 const std::vector<double>& vecSpmHere() const { return m_vecSpmHere; }
0094 DDName spmCutName() const { return ddname(m_SpmCutName); }
0095 double spmCutThick() const { return m_SpmCutThick; }
0096 int spmCutShow() const { return m_SpmCutShow; }
0097 double spmCutRM() const { return m_SpmCutRM; }
0098 double spmCutRP() const { return m_SpmCutRP; }
0099 const std::vector<double>& vecSpmCutTM() const { return m_vecSpmCutTM; }
0100 const std::vector<double>& vecSpmCutTP() const { return m_vecSpmCutTP; }
0101 double spmExpThick() const { return m_SpmExpThick; }
0102 double spmExpWide() const { return m_SpmExpWide; }
0103 double spmExpYOff() const { return m_SpmExpYOff; }
0104 DDName spmSideName() const { return ddname(m_SpmSideName); }
0105 DDMaterial spmSideMat() const { return ddmat(m_SpmSideMat); }
0106 double spmSideHigh() const { return m_SpmSideHigh; }
0107 double spmSideThick() const { return m_SpmSideThick; }
0108 double spmSideYOffM() const { return m_SpmSideYOffM; }
0109 double spmSideYOffP() const { return m_SpmSideYOffP; }
0110
0111 double nomCryDimAF() const { return m_NomCryDimAF; }
0112 double nomCryDimLZ() const { return m_NomCryDimLZ; }
0113 const std::vector<double>& vecNomCryDimBF() const { return m_vecNomCryDimBF; }
0114 const std::vector<double>& vecNomCryDimCF() const { return m_vecNomCryDimCF; }
0115 const std::vector<double>& vecNomCryDimAR() const { return m_vecNomCryDimAR; }
0116 const std::vector<double>& vecNomCryDimBR() const { return m_vecNomCryDimBR; }
0117 const std::vector<double>& vecNomCryDimCR() const { return m_vecNomCryDimCR; }
0118
0119 double underAF() const { return m_UnderAF; }
0120 double underLZ() const { return m_UnderLZ; }
0121 double underBF() const { return m_UnderBF; }
0122 double underCF() const { return m_UnderCF; }
0123 double underAR() const { return m_UnderAR; }
0124 double underBR() const { return m_UnderBR; }
0125 double underCR() const { return m_UnderCR; }
0126
0127 double wallThAlv() const { return m_WallThAlv; }
0128 double wrapThAlv() const { return m_WrapThAlv; }
0129 double clrThAlv() const { return m_ClrThAlv; }
0130 const std::vector<double>& vecGapAlvEta() const { return m_vecGapAlvEta; }
0131
0132 double wallFrAlv() const { return m_WallFrAlv; }
0133 double wrapFrAlv() const { return m_WrapFrAlv; }
0134 double clrFrAlv() const { return m_ClrFrAlv; }
0135
0136 double wallReAlv() const { return m_WallReAlv; }
0137 double wrapReAlv() const { return m_WrapReAlv; }
0138 double clrReAlv() const { return m_ClrReAlv; }
0139
0140 unsigned int nCryTypes() const { return m_NCryTypes; }
0141 unsigned int nCryPerAlvEta() const { return m_NCryPerAlvEta; }
0142
0143 const std::string& cryName() const { return m_CryName; }
0144 const std::string& clrName() const { return m_ClrName; }
0145 const std::string& wrapName() const { return m_WrapName; }
0146 const std::string& wallName() const { return m_WallName; }
0147
0148 DDMaterial cryMat() const { return ddmat(m_CryMat); }
0149 DDMaterial clrMat() const { return ddmat(m_ClrMat); }
0150 DDMaterial wrapMat() const { return ddmat(m_WrapMat); }
0151 DDMaterial wallMat() const { return ddmat(m_WallMat); }
0152 DDName capName() const { return ddname(m_capName); }
0153 double capHere() const { return m_capHere; }
0154 DDMaterial capMat() const { return ddmat(m_capMat); }
0155 double capXSize() const { return m_capXSize; }
0156 double capYSize() const { return m_capYSize; }
0157 double capThick() const { return m_capThick; }
0158
0159 DDName cerName() const { return ddname(m_CERName); }
0160 DDMaterial cerMat() const { return ddmat(m_CERMat); }
0161 double cerXSize() const { return m_CERXSize; }
0162 double cerYSize() const { return m_CERYSize; }
0163 double cerThick() const { return m_CERThick; }
0164
0165 DDName bsiName() const { return ddname(m_BSiName); }
0166 DDMaterial bsiMat() const { return ddmat(m_BSiMat); }
0167 double bsiXSize() const { return m_BSiXSize; }
0168 double bsiYSize() const { return m_BSiYSize; }
0169 double bsiThick() const { return m_BSiThick; }
0170
0171 DDName atjName() const { return ddname(m_ATJName); }
0172 DDMaterial atjMat() const { return ddmat(m_ATJMat); }
0173 double atjThick() const { return m_ATJThick; }
0174
0175 DDName sglName() const { return ddname(m_SGLName); }
0176 DDMaterial sglMat() const { return ddmat(m_SGLMat); }
0177 double sglThick() const { return m_SGLThick; }
0178
0179 DDName aglName() const { return ddname(m_AGLName); }
0180 DDMaterial aglMat() const { return ddmat(m_AGLMat); }
0181 double aglThick() const { return m_AGLThick; }
0182
0183 DDName andName() const { return ddname(m_ANDName); }
0184 DDMaterial andMat() const { return ddmat(m_ANDMat); }
0185 double andThick() const { return m_ANDThick; }
0186
0187 DDName apdName() const { return ddname(m_APDName); }
0188 DDMaterial apdMat() const { return ddmat(m_APDMat); }
0189 double apdSide() const { return m_APDSide; }
0190 double apdThick() const { return m_APDThick; }
0191 double apdZ() const { return m_APDZ; }
0192 double apdX1() const { return m_APDX1; }
0193 double apdX2() const { return m_APDX2; }
0194
0195 double webHere() const { return m_WebHere; }
0196 const std::string& webPlName() const { return m_WebPlName; }
0197 const std::string& webClrName() const { return m_WebClrName; }
0198 DDMaterial webPlMat() const { return ddmat(m_WebPlMat); }
0199 DDMaterial webClrMat() const { return ddmat(m_WebClrMat); }
0200 const std::vector<double>& vecWebPlTh() const { return m_vecWebPlTh; }
0201 const std::vector<double>& vecWebClrTh() const { return m_vecWebClrTh; }
0202 const std::vector<double>& vecWebLength() const { return m_vecWebLength; }
0203
0204 double ilyHere() const { return m_IlyHere; }
0205 const std::string& ilyName() const { return m_IlyName; }
0206 double ilyPhiLow() const { return m_IlyPhiLow; }
0207 double ilyDelPhi() const { return m_IlyDelPhi; }
0208 const std::vector<std::string>& vecIlyMat() const { return m_vecIlyMat; }
0209 const std::vector<double>& vecIlyThick() const { return m_vecIlyThick; }
0210
0211 const std::string& ilyPipeName() const { return m_IlyPipeName; }
0212 double ilyPipeHere() const { return m_IlyPipeHere; }
0213 DDMaterial ilyPipeMat() const { return ddmat(m_IlyPipeMat); }
0214 double ilyPipeOD() const { return m_IlyPipeOD; }
0215 double ilyPipeID() const { return m_IlyPipeID; }
0216 const std::vector<double>& vecIlyPipeLength() const { return m_vecIlyPipeLength; }
0217 const std::vector<double>& vecIlyPipeType() const { return m_vecIlyPipeType; }
0218 const std::vector<double>& vecIlyPipePhi() const { return m_vecIlyPipePhi; }
0219 const std::vector<double>& vecIlyPipeZ() const { return m_vecIlyPipeZ; }
0220
0221 DDName ilyPTMName() const { return ddname(m_IlyPTMName); }
0222 double ilyPTMHere() const { return m_IlyPTMHere; }
0223 DDMaterial ilyPTMMat() const { return ddmat(m_IlyPTMMat); }
0224 double ilyPTMWidth() const { return m_IlyPTMWidth; }
0225 double ilyPTMLength() const { return m_IlyPTMLength; }
0226 double ilyPTMHeight() const { return m_IlyPTMHeight; }
0227 const std::vector<double>& vecIlyPTMZ() const { return m_vecIlyPTMZ; }
0228 const std::vector<double>& vecIlyPTMPhi() const { return m_vecIlyPTMPhi; }
0229
0230 DDName ilyFanOutName() const { return ddname(m_IlyFanOutName); }
0231 double ilyFanOutHere() const { return m_IlyFanOutHere; }
0232 DDMaterial ilyFanOutMat() const { return ddmat(m_IlyFanOutMat); }
0233 double ilyFanOutWidth() const { return m_IlyFanOutWidth; }
0234 double ilyFanOutLength() const { return m_IlyFanOutLength; }
0235 double ilyFanOutHeight() const { return m_IlyFanOutHeight; }
0236 const std::vector<double>& vecIlyFanOutZ() const { return m_vecIlyFanOutZ; }
0237 const std::vector<double>& vecIlyFanOutPhi() const { return m_vecIlyFanOutPhi; }
0238 DDName ilyDiffName() const { return ddname(m_IlyDiffName); }
0239 DDMaterial ilyDiffMat() const { return ddmat(m_IlyDiffMat); }
0240 double ilyDiffOff() const { return m_IlyDiffOff; }
0241 double ilyDiffLength() const { return m_IlyDiffLength; }
0242 DDName ilyBndlName() const { return ddname(m_IlyBndlName); }
0243 DDMaterial ilyBndlMat() const { return ddmat(m_IlyBndlMat); }
0244 double ilyBndlOff() const { return m_IlyBndlOff; }
0245 double ilyBndlLength() const { return m_IlyBndlLength; }
0246 DDName ilyFEMName() const { return ddname(m_IlyFEMName); }
0247 DDMaterial ilyFEMMat() const { return ddmat(m_IlyFEMMat); }
0248 double ilyFEMWidth() const { return m_IlyFEMWidth; }
0249 double ilyFEMLength() const { return m_IlyFEMLength; }
0250 double ilyFEMHeight() const { return m_IlyFEMHeight; }
0251 const std::vector<double>& vecIlyFEMZ() const { return m_vecIlyFEMZ; }
0252 const std::vector<double>& vecIlyFEMPhi() const { return m_vecIlyFEMPhi; }
0253
0254 DDName hawRName() const { return ddname(m_HawRName); }
0255 DDName fawName() const { return ddname(m_FawName); }
0256 double fawHere() const { return m_FawHere; }
0257 double hawRHBIG() const { return m_HawRHBIG; }
0258 double hawRhsml() const { return m_HawRhsml; }
0259 double hawRCutY() const { return m_HawRCutY; }
0260 double hawRCutZ() const { return m_HawRCutZ; }
0261 double hawRCutDelY() const { return m_HawRCutDelY; }
0262 double hawYOffCry() const { return m_HawYOffCry; }
0263
0264 unsigned int nFawPerSupm() const { return m_NFawPerSupm; }
0265 double fawPhiOff() const { return m_FawPhiOff; }
0266 double fawDelPhi() const { return m_FawDelPhi; }
0267 double fawPhiRot() const { return m_FawPhiRot; }
0268 double fawRadOff() const { return m_FawRadOff; }
0269
0270 double gridHere() const { return m_GridHere; }
0271 DDName gridName() const { return ddname(m_GridName); }
0272 DDMaterial gridMat() const { return ddmat(m_GridMat); }
0273 double gridThick() const { return m_GridThick; }
0274
0275 double backHere() const { return m_BackHere; }
0276 double backXOff() const { return m_BackXOff; }
0277 double backYOff() const { return m_BackYOff; }
0278 DDName backSideName() const { return ddname(m_BackSideName); }
0279 double backSideHere() const { return m_BackSideHere; }
0280 double backSideLength() const { return m_BackSideLength; }
0281 double backSideHeight() const { return m_BackSideHeight; }
0282 double backSideWidth() const { return m_BackSideWidth; }
0283 double backSideYOff1() const { return m_BackSideYOff1; }
0284 double backSideYOff2() const { return m_BackSideYOff2; }
0285 double backSideAngle() const { return m_BackSideAngle; }
0286 DDMaterial backSideMat() const { return ddmat(m_BackSideMat); }
0287 DDName backPlateName() const { return ddname(m_BackPlateName); }
0288 double backPlateHere() const { return m_BackPlateHere; }
0289 double backPlateLength() const { return m_BackPlateLength; }
0290 double backPlateThick() const { return m_BackPlateThick; }
0291 double backPlateWidth() const { return m_BackPlateWidth; }
0292 DDMaterial backPlateMat() const { return ddmat(m_BackPlateMat); }
0293 DDName backPlate2Name() const { return ddname(m_BackPlate2Name); }
0294 double backPlate2Thick() const { return m_BackPlate2Thick; }
0295 DDMaterial backPlate2Mat() const { return ddmat(m_BackPlate2Mat); }
0296 const std::string& grilleName() const { return m_GrilleName; }
0297 double grilleThick() const { return m_GrilleThick; }
0298 double grilleHere() const { return m_GrilleHere; }
0299 double grilleWidth() const { return m_GrilleWidth; }
0300 double grilleZSpace() const { return m_GrilleZSpace; }
0301 DDMaterial grilleMat() const { return ddmat(m_GrilleMat); }
0302 const std::vector<double>& vecGrilleHeight() const { return m_vecGrilleHeight; }
0303 const std::vector<double>& vecGrilleZOff() const { return m_vecGrilleZOff; }
0304
0305 DDName grEdgeSlotName() const { return ddname(m_GrEdgeSlotName); }
0306 DDMaterial grEdgeSlotMat() const { return ddmat(m_GrEdgeSlotMat); }
0307 double grEdgeSlotHere() const { return m_GrEdgeSlotHere; }
0308 double grEdgeSlotHeight() const { return m_GrEdgeSlotHeight; }
0309 double grEdgeSlotWidth() const { return m_GrEdgeSlotWidth; }
0310 const std::string& grMidSlotName() const { return m_GrMidSlotName; }
0311 DDMaterial grMidSlotMat() const { return ddmat(m_GrMidSlotMat); }
0312 double grMidSlotHere() const { return m_GrMidSlotHere; }
0313 double grMidSlotWidth() const { return m_GrMidSlotWidth; }
0314 double grMidSlotXOff() const { return m_GrMidSlotXOff; }
0315 const std::vector<double>& vecGrMidSlotHeight() const { return m_vecGrMidSlotHeight; }
0316
0317 double backPipeHere() const { return m_BackPipeHere; }
0318 const std::string& backPipeName() const { return m_BackPipeName; }
0319 const std::vector<double>& vecBackPipeDiam() const { return m_vecBackPipeDiam; }
0320 const std::vector<double>& vecBackPipeThick() const { return m_vecBackPipeThick; }
0321 DDMaterial backPipeMat() const { return ddmat(m_BackPipeMat); }
0322 DDMaterial backPipeWaterMat() const { return ddmat(m_BackPipeWaterMat); }
0323 double backMiscHere() const { return m_BackMiscHere; }
0324 const std::vector<double>& vecBackMiscThick() const { return m_vecBackMiscThick; }
0325 const std::vector<std::string>& vecBackMiscName() const { return m_vecBackMiscName; }
0326 const std::vector<std::string>& vecBackMiscMat() const { return m_vecBackMiscMat; }
0327 double patchPanelHere() const { return m_PatchPanelHere; }
0328 const std::vector<double>& vecPatchPanelThick() const { return m_vecPatchPanelThick; }
0329 const std::vector<std::string>& vecPatchPanelNames() const { return m_vecPatchPanelNames; }
0330 const std::vector<std::string>& vecPatchPanelMat() const { return m_vecPatchPanelMat; }
0331 DDName patchPanelName() const { return ddname(m_PatchPanelName); }
0332
0333 const std::vector<std::string>& vecBackCoolName() const { return m_vecBackCoolName; }
0334 double backCoolHere() const { return m_BackCoolHere; }
0335 double backCoolBarWidth() const { return m_BackCoolBarWidth; }
0336 double backCoolBarHeight() const { return m_BackCoolBarHeight; }
0337 DDMaterial backCoolMat() const { return ddmat(m_BackCoolMat); }
0338 double backCoolBarHere() const { return m_BackCoolBarHere; }
0339 DDName backCoolBarName() const { return ddname(m_BackCoolBarName); }
0340 double backCoolBarThick() const { return m_BackCoolBarThick; }
0341 DDMaterial backCoolBarMat() const { return ddmat(m_BackCoolBarMat); }
0342 DDName backCoolBarSSName() const { return ddname(m_BackCoolBarSSName); }
0343 double backCoolBarSSThick() const { return m_BackCoolBarSSThick; }
0344 DDMaterial backCoolBarSSMat() const { return ddmat(m_BackCoolBarSSMat); }
0345 DDName backCoolBarWaName() const { return ddname(m_BackCoolBarWaName); }
0346 double backCoolBarWaThick() const { return m_BackCoolBarWaThick; }
0347 DDMaterial backCoolBarWaMat() const { return ddmat(m_BackCoolBarWaMat); }
0348 double backCoolVFEHere() const { return m_BackCoolVFEHere; }
0349 DDName backCoolVFEName() const { return ddname(m_BackCoolVFEName); }
0350 DDMaterial backCoolVFEMat() const { return ddmat(m_BackCoolVFEMat); }
0351 DDName backVFEName() const { return ddname(m_BackVFEName); }
0352 DDMaterial backVFEMat() const { return ddmat(m_BackVFEMat); }
0353 const std::vector<double>& vecBackVFELyrThick() const { return m_vecBackVFELyrThick; }
0354 const std::vector<std::string>& vecBackVFELyrName() const { return m_vecBackVFELyrName; }
0355 const std::vector<std::string>& vecBackVFELyrMat() const { return m_vecBackVFELyrMat; }
0356 const std::vector<double>& vecBackCoolNSec() const { return m_vecBackCoolNSec; }
0357 const std::vector<double>& vecBackCoolSecSep() const { return m_vecBackCoolSecSep; }
0358 const std::vector<double>& vecBackCoolNPerSec() const { return m_vecBackCoolNPerSec; }
0359 double backCBStdSep() const { return m_BackCBStdSep; }
0360
0361 double backCoolTankHere() const { return m_BackCoolTankHere; }
0362 const std::string& backCoolTankName() const { return m_BackCoolTankName; }
0363 double backCoolTankWidth() const { return m_BackCoolTankWidth; }
0364 double backCoolTankThick() const { return m_BackCoolTankThick; }
0365 DDMaterial backCoolTankMat() const { return ddmat(m_BackCoolTankMat); }
0366 const std::string& backCoolTankWaName() const { return m_BackCoolTankWaName; }
0367 double backCoolTankWaWidth() const { return m_BackCoolTankWaWidth; }
0368 DDMaterial backCoolTankWaMat() const { return ddmat(m_BackCoolTankWaMat); }
0369 const std::string& backBracketName() const { return m_BackBracketName; }
0370 double backBracketHeight() const { return m_BackBracketHeight; }
0371 DDMaterial backBracketMat() const { return ddmat(m_BackBracketMat); }
0372
0373 double dryAirTubeHere() const { return m_DryAirTubeHere; }
0374 const std::string& dryAirTubeName() const { return m_DryAirTubeName; }
0375 double mBCoolTubeNum() const { return m_MBCoolTubeNum; }
0376 double dryAirTubeInnDiam() const { return m_DryAirTubeInnDiam; }
0377 double dryAirTubeOutDiam() const { return m_DryAirTubeOutDiam; }
0378 DDMaterial dryAirTubeMat() const { return ddmat(m_DryAirTubeMat); }
0379 double mBCoolTubeHere() const { return m_MBCoolTubeHere; }
0380 const std::string& mBCoolTubeName() const { return m_MBCoolTubeName; }
0381 double mBCoolTubeInnDiam() const { return m_MBCoolTubeInnDiam; }
0382 double mBCoolTubeOutDiam() const { return m_MBCoolTubeOutDiam; }
0383 DDMaterial mBCoolTubeMat() const { return ddmat(m_MBCoolTubeMat); }
0384 double mBManifHere() const { return m_MBManifHere; }
0385 DDName mBManifName() const { return ddname(m_MBManifName); }
0386 double mBManifInnDiam() const { return m_MBManifInnDiam; }
0387 double mBManifOutDiam() const { return m_MBManifOutDiam; }
0388 DDMaterial mBManifMat() const { return ddmat(m_MBManifMat); }
0389 double mBLyrHere() const { return m_MBLyrHere; }
0390 const std::vector<double>& vecMBLyrThick() const { return m_vecMBLyrThick; }
0391 const std::vector<std::string>& vecMBLyrName() const { return m_vecMBLyrName; }
0392 const std::vector<std::string>& vecMBLyrMat() const { return m_vecMBLyrMat; }
0393
0394
0395
0396 double pincerRodHere() const { return m_PincerRodHere; }
0397 DDName pincerRodName() const { return ddname(m_PincerRodName); }
0398 DDMaterial pincerRodMat() const { return ddmat(m_PincerRodMat); }
0399 std::vector<double> vecPincerRodAzimuth() const { return m_vecPincerRodAzimuth; }
0400 DDName pincerEnvName() const { return ddname(m_PincerEnvName); }
0401 DDMaterial pincerEnvMat() const { return ddmat(m_PincerEnvMat); }
0402 double pincerEnvWidth() const { return m_PincerEnvWidth; }
0403 double pincerEnvHeight() const { return m_PincerEnvHeight; }
0404 double pincerEnvLength() const { return m_PincerEnvLength; }
0405 std::vector<double> vecPincerEnvZOff() const { return m_vecPincerEnvZOff; }
0406
0407 DDName pincerBlkName() const { return ddname(m_PincerBlkName); }
0408 DDMaterial pincerBlkMat() const { return ddmat(m_PincerBlkMat); }
0409 double pincerBlkLength() const { return m_PincerBlkLength; }
0410
0411 DDName pincerShim1Name() const { return ddname(m_PincerShim1Name); }
0412 double pincerShimHeight() const { return m_PincerShimHeight; }
0413 DDName pincerShim2Name() const { return ddname(m_PincerShim2Name); }
0414 DDMaterial pincerShimMat() const { return ddmat(m_PincerShimMat); }
0415 double pincerShim1Width() const { return m_PincerShim1Width; }
0416 double pincerShim2Width() const { return m_PincerShim2Width; }
0417
0418 DDName pincerCutName() const { return ddname(m_PincerCutName); }
0419 DDMaterial pincerCutMat() const { return ddmat(m_PincerCutMat); }
0420 double pincerCutWidth() const { return m_PincerCutWidth; }
0421 double pincerCutHeight() const { return m_PincerCutHeight; }
0422
0423 protected:
0424 private:
0425 void web(unsigned int iWeb,
0426 double bWeb,
0427 double BWeb,
0428 double LWeb,
0429 double theta,
0430 const Pt3D& corner,
0431 const DDLogicalPart& logPar,
0432 double& zee,
0433 double side,
0434 double front,
0435 double delta,
0436 DDCompactView& cpv);
0437
0438 std::string m_idNameSpace;
0439
0440
0441 std::string m_BarName;
0442 std::string m_BarMat;
0443 std::vector<double> m_vecBarZPts;
0444 std::vector<double> m_vecBarRMin;
0445 std::vector<double> m_vecBarRMax;
0446 std::vector<double> m_vecBarTran;
0447 std::vector<double> m_vecBarRota;
0448 std::vector<double> m_vecBarRota2;
0449 std::vector<double> m_vecBarRota3;
0450 double m_BarPhiLo;
0451 double m_BarPhiHi;
0452 double m_BarHere;
0453
0454
0455 std::string m_SpmName;
0456 std::string m_SpmMat;
0457 std::vector<double> m_vecSpmZPts;
0458 std::vector<double> m_vecSpmRMin;
0459 std::vector<double> m_vecSpmRMax;
0460 std::vector<double> m_vecSpmTran;
0461 std::vector<double> m_vecSpmRota;
0462 std::vector<double> m_vecSpmBTran;
0463 std::vector<double> m_vecSpmBRota;
0464 unsigned int m_SpmNPerHalf;
0465 double m_SpmLowPhi;
0466 double m_SpmDelPhi;
0467 double m_SpmPhiOff;
0468 std::vector<double> m_vecSpmHere;
0469 std::string m_SpmCutName;
0470 double m_SpmCutThick;
0471 int m_SpmCutShow;
0472 std::vector<double> m_vecSpmCutTM;
0473 std::vector<double> m_vecSpmCutTP;
0474 double m_SpmCutRM;
0475 double m_SpmCutRP;
0476 double m_SpmExpThick;
0477 double m_SpmExpWide;
0478 double m_SpmExpYOff;
0479 std::string m_SpmSideName;
0480 std::string m_SpmSideMat;
0481 double m_SpmSideHigh;
0482 double m_SpmSideThick;
0483 double m_SpmSideYOffM;
0484 double m_SpmSideYOffP;
0485
0486 double m_NomCryDimAF;
0487 double m_NomCryDimLZ;
0488 std::vector<double> m_vecNomCryDimBF;
0489 std::vector<double> m_vecNomCryDimCF;
0490 std::vector<double> m_vecNomCryDimAR;
0491 std::vector<double> m_vecNomCryDimBR;
0492 std::vector<double> m_vecNomCryDimCR;
0493
0494 double m_UnderAF;
0495 double m_UnderLZ;
0496 double m_UnderBF;
0497 double m_UnderCF;
0498 double m_UnderAR;
0499 double m_UnderBR;
0500 double m_UnderCR;
0501
0502 double m_WallThAlv;
0503 double m_WrapThAlv;
0504 double m_ClrThAlv;
0505 std::vector<double> m_vecGapAlvEta;
0506
0507 double m_WallFrAlv;
0508 double m_WrapFrAlv;
0509 double m_ClrFrAlv;
0510
0511 double m_WallReAlv;
0512 double m_WrapReAlv;
0513 double m_ClrReAlv;
0514
0515 unsigned int m_NCryTypes;
0516 unsigned int m_NCryPerAlvEta;
0517
0518 std::string m_CryName;
0519 std::string m_ClrName;
0520 std::string m_WrapName;
0521 std::string m_WallName;
0522
0523 std::string m_CryMat;
0524 std::string m_ClrMat;
0525 std::string m_WrapMat;
0526 std::string m_WallMat;
0527
0528 std::string m_capName;
0529 double m_capHere;
0530 std::string m_capMat;
0531 double m_capXSize;
0532 double m_capYSize;
0533 double m_capThick;
0534
0535 std::string m_CERName;
0536 std::string m_CERMat;
0537 double m_CERXSize;
0538 double m_CERYSize;
0539 double m_CERThick;
0540
0541 std::string m_BSiName;
0542 std::string m_BSiMat;
0543 double m_BSiXSize;
0544 double m_BSiYSize;
0545 double m_BSiThick;
0546
0547 std::string m_APDName;
0548 std::string m_APDMat;
0549 double m_APDSide;
0550 double m_APDThick;
0551 double m_APDZ;
0552 double m_APDX1;
0553 double m_APDX2;
0554
0555 std::string m_ATJName;
0556 std::string m_ATJMat;
0557 double m_ATJThick;
0558
0559 std::string m_SGLName;
0560 std::string m_SGLMat;
0561 double m_SGLThick;
0562
0563 std::string m_AGLName;
0564 std::string m_AGLMat;
0565 double m_AGLThick;
0566
0567 std::string m_ANDName;
0568 std::string m_ANDMat;
0569 double m_ANDThick;
0570
0571 double m_WebHere;
0572 std::string m_WebPlName;
0573 std::string m_WebClrName;
0574 std::string m_WebPlMat;
0575 std::string m_WebClrMat;
0576 std::vector<double> m_vecWebPlTh;
0577 std::vector<double> m_vecWebClrTh;
0578 std::vector<double> m_vecWebLength;
0579
0580 double m_IlyHere;
0581 std::string m_IlyName;
0582 double m_IlyPhiLow;
0583 double m_IlyDelPhi;
0584 std::vector<std::string> m_vecIlyMat;
0585 std::vector<double> m_vecIlyThick;
0586
0587 std::string m_IlyPipeName;
0588 double m_IlyPipeHere;
0589 std::string m_IlyPipeMat;
0590 double m_IlyPipeOD;
0591 double m_IlyPipeID;
0592 std::vector<double> m_vecIlyPipeLength;
0593 std::vector<double> m_vecIlyPipeType;
0594 std::vector<double> m_vecIlyPipePhi;
0595 std::vector<double> m_vecIlyPipeZ;
0596
0597 std::string m_IlyPTMName;
0598 double m_IlyPTMHere;
0599 std::string m_IlyPTMMat;
0600 double m_IlyPTMWidth;
0601 double m_IlyPTMLength;
0602 double m_IlyPTMHeight;
0603 std::vector<double> m_vecIlyPTMZ;
0604 std::vector<double> m_vecIlyPTMPhi;
0605
0606 std::string m_IlyFanOutName;
0607 double m_IlyFanOutHere;
0608 std::string m_IlyFanOutMat;
0609 double m_IlyFanOutWidth;
0610 double m_IlyFanOutLength;
0611 double m_IlyFanOutHeight;
0612 std::vector<double> m_vecIlyFanOutZ;
0613 std::vector<double> m_vecIlyFanOutPhi;
0614 std::string m_IlyDiffName;
0615 std::string m_IlyDiffMat;
0616 double m_IlyDiffOff;
0617 double m_IlyDiffLength;
0618 std::string m_IlyBndlName;
0619 std::string m_IlyBndlMat;
0620 double m_IlyBndlOff;
0621 double m_IlyBndlLength;
0622 std::string m_IlyFEMName;
0623 std::string m_IlyFEMMat;
0624 double m_IlyFEMWidth;
0625 double m_IlyFEMLength;
0626 double m_IlyFEMHeight;
0627 std::vector<double> m_vecIlyFEMZ;
0628 std::vector<double> m_vecIlyFEMPhi;
0629
0630 std::string m_HawRName;
0631 std::string m_FawName;
0632 double m_FawHere;
0633 double m_HawRHBIG;
0634 double m_HawRhsml;
0635 double m_HawRCutY;
0636 double m_HawRCutZ;
0637 double m_HawRCutDelY;
0638 double m_HawYOffCry;
0639 unsigned int m_NFawPerSupm;
0640 double m_FawPhiOff;
0641 double m_FawDelPhi;
0642 double m_FawPhiRot;
0643 double m_FawRadOff;
0644
0645 double m_GridHere;
0646 std::string m_GridName;
0647 std::string m_GridMat;
0648 double m_GridThick;
0649
0650 double m_BackXOff;
0651 double m_BackYOff;
0652
0653 double m_BackHere;
0654 std::string m_BackSideName;
0655 double m_BackSideHere;
0656 double m_BackSideLength;
0657 double m_BackSideHeight;
0658 double m_BackSideWidth;
0659 double m_BackSideYOff1;
0660 double m_BackSideYOff2;
0661 double m_BackSideAngle;
0662 std::string m_BackSideMat;
0663 std::string m_BackPlateName;
0664 double m_BackPlateHere;
0665 double m_BackPlateLength;
0666 double m_BackPlateThick;
0667 double m_BackPlateWidth;
0668 std::string m_BackPlateMat;
0669 std::string m_BackPlate2Name;
0670 double m_BackPlate2Thick;
0671 std::string m_BackPlate2Mat;
0672 std::string m_GrilleName;
0673 double m_GrilleHere;
0674 double m_GrilleThick;
0675 double m_GrilleWidth;
0676 double m_GrilleZSpace;
0677 std::string m_GrilleMat;
0678 std::vector<double> m_vecGrilleHeight;
0679 std::vector<double> m_vecGrilleZOff;
0680
0681 std::string m_GrEdgeSlotName;
0682 std::string m_GrEdgeSlotMat;
0683 double m_GrEdgeSlotHere;
0684 double m_GrEdgeSlotHeight;
0685 double m_GrEdgeSlotWidth;
0686
0687 std::string m_GrMidSlotName;
0688 std::string m_GrMidSlotMat;
0689 double m_GrMidSlotHere;
0690 double m_GrMidSlotWidth;
0691 double m_GrMidSlotXOff;
0692 std::vector<double> m_vecGrMidSlotHeight;
0693
0694 double m_BackPipeHere;
0695 std::string m_BackPipeName;
0696 std::vector<double> m_vecBackPipeDiam;
0697 std::vector<double> m_vecBackPipeThick;
0698 std::string m_BackPipeMat;
0699 std::string m_BackPipeWaterMat;
0700
0701 std::vector<std::string> m_vecBackCoolName;
0702 double m_BackCoolHere;
0703 double m_BackCoolBarHere;
0704 double m_BackCoolBarWidth;
0705 double m_BackCoolBarHeight;
0706 std::string m_BackCoolMat;
0707 std::string m_BackCoolBarName;
0708 double m_BackCoolBarThick;
0709 std::string m_BackCoolBarMat;
0710 std::string m_BackCoolBarSSName;
0711 double m_BackCoolBarSSThick;
0712 std::string m_BackCoolBarSSMat;
0713 std::string m_BackCoolBarWaName;
0714 double m_BackCoolBarWaThick;
0715 std::string m_BackCoolBarWaMat;
0716 double m_BackCoolVFEHere;
0717 std::string m_BackCoolVFEName;
0718 std::string m_BackCoolVFEMat;
0719 std::string m_BackVFEName;
0720 std::string m_BackVFEMat;
0721 std::vector<double> m_vecBackVFELyrThick;
0722 std::vector<std::string> m_vecBackVFELyrName;
0723 std::vector<std::string> m_vecBackVFELyrMat;
0724 std::vector<double> m_vecBackCoolNSec;
0725 std::vector<double> m_vecBackCoolSecSep;
0726 std::vector<double> m_vecBackCoolNPerSec;
0727 double m_BackMiscHere;
0728 std::vector<double> m_vecBackMiscThick;
0729 std::vector<std::string> m_vecBackMiscName;
0730 std::vector<std::string> m_vecBackMiscMat;
0731 double m_BackCBStdSep;
0732
0733 double m_PatchPanelHere;
0734 std::string m_PatchPanelName;
0735 std::vector<double> m_vecPatchPanelThick;
0736 std::vector<std::string> m_vecPatchPanelNames;
0737 std::vector<std::string> m_vecPatchPanelMat;
0738
0739 double m_BackCoolTankHere;
0740 std::string m_BackCoolTankName;
0741 double m_BackCoolTankWidth;
0742 double m_BackCoolTankThick;
0743 std::string m_BackCoolTankMat;
0744 std::string m_BackCoolTankWaName;
0745 double m_BackCoolTankWaWidth;
0746 std::string m_BackCoolTankWaMat;
0747 std::string m_BackBracketName;
0748 double m_BackBracketHeight;
0749 std::string m_BackBracketMat;
0750
0751 double m_DryAirTubeHere;
0752 std::string m_DryAirTubeName;
0753 unsigned int m_MBCoolTubeNum;
0754 double m_DryAirTubeInnDiam;
0755 double m_DryAirTubeOutDiam;
0756 std::string m_DryAirTubeMat;
0757 double m_MBCoolTubeHere;
0758 std::string m_MBCoolTubeName;
0759 double m_MBCoolTubeInnDiam;
0760 double m_MBCoolTubeOutDiam;
0761 std::string m_MBCoolTubeMat;
0762 double m_MBManifHere;
0763 std::string m_MBManifName;
0764 double m_MBManifInnDiam;
0765 double m_MBManifOutDiam;
0766 std::string m_MBManifMat;
0767 double m_MBLyrHere;
0768 std::vector<double> m_vecMBLyrThick;
0769 std::vector<std::string> m_vecMBLyrName;
0770 std::vector<std::string> m_vecMBLyrMat;
0771
0772
0773
0774 double m_PincerRodHere;
0775 std::string m_PincerRodName;
0776 std::string m_PincerRodMat;
0777 std::vector<double> m_vecPincerRodAzimuth;
0778
0779 std::string m_PincerEnvName;
0780 std::string m_PincerEnvMat;
0781 double m_PincerEnvWidth;
0782 double m_PincerEnvHeight;
0783 double m_PincerEnvLength;
0784 std::vector<double> m_vecPincerEnvZOff;
0785
0786 std::string m_PincerBlkName;
0787 std::string m_PincerBlkMat;
0788 double m_PincerBlkLength;
0789
0790 std::string m_PincerShim1Name;
0791 double m_PincerShimHeight;
0792 std::string m_PincerShim2Name;
0793 std::string m_PincerShimMat;
0794 double m_PincerShim1Width;
0795 double m_PincerShim2Width;
0796
0797 std::string m_PincerCutName;
0798 std::string m_PincerCutMat;
0799 double m_PincerCutWidth;
0800 double m_PincerCutHeight;
0801 };
0802
0803 namespace std {}
0804 using namespace std;
0805
0806 DDEcalBarrelNewAlgo::DDEcalBarrelNewAlgo()
0807 : m_idNameSpace(""),
0808 m_BarName(""),
0809 m_BarMat(""),
0810 m_vecBarZPts(),
0811 m_vecBarRMin(),
0812 m_vecBarRMax(),
0813 m_vecBarTran(),
0814 m_vecBarRota(),
0815 m_vecBarRota2(),
0816 m_vecBarRota3(),
0817 m_BarPhiLo(0),
0818 m_BarPhiHi(0),
0819 m_BarHere(0),
0820 m_SpmName(""),
0821 m_SpmMat(""),
0822 m_vecSpmZPts(),
0823 m_vecSpmRMin(),
0824 m_vecSpmRMax(),
0825 m_vecSpmTran(),
0826 m_vecSpmRota(),
0827 m_vecSpmBTran(),
0828 m_vecSpmBRota(),
0829 m_SpmNPerHalf(0),
0830 m_SpmLowPhi(0),
0831 m_SpmDelPhi(0),
0832 m_SpmPhiOff(0),
0833 m_vecSpmHere(),
0834 m_SpmCutName(""),
0835 m_SpmCutThick(0),
0836 m_SpmCutShow(0),
0837 m_vecSpmCutTM(),
0838 m_vecSpmCutTP(),
0839 m_SpmCutRM(0),
0840 m_SpmCutRP(0),
0841 m_SpmExpThick(0),
0842 m_SpmExpWide(0),
0843 m_SpmExpYOff(0),
0844 m_SpmSideName(""),
0845 m_SpmSideMat(""),
0846 m_SpmSideHigh(0),
0847 m_SpmSideThick(0),
0848 m_SpmSideYOffM(0),
0849 m_SpmSideYOffP(0),
0850 m_NomCryDimAF(0),
0851 m_NomCryDimLZ(0),
0852 m_vecNomCryDimBF(),
0853 m_vecNomCryDimCF(),
0854 m_vecNomCryDimAR(),
0855 m_vecNomCryDimBR(),
0856 m_vecNomCryDimCR(),
0857 m_UnderAF(0),
0858 m_UnderLZ(0),
0859 m_UnderBF(0),
0860 m_UnderCF(0),
0861 m_UnderAR(0),
0862 m_UnderBR(0),
0863 m_UnderCR(0),
0864 m_WallThAlv(0),
0865 m_WrapThAlv(0),
0866 m_ClrThAlv(0),
0867 m_vecGapAlvEta(),
0868 m_WallFrAlv(0),
0869 m_WrapFrAlv(0),
0870 m_ClrFrAlv(0),
0871 m_WallReAlv(0),
0872 m_WrapReAlv(0),
0873 m_ClrReAlv(0),
0874 m_NCryTypes(0),
0875 m_NCryPerAlvEta(0),
0876 m_CryName(""),
0877 m_ClrName(""),
0878 m_WrapName(""),
0879 m_WallName(""),
0880 m_CryMat(""),
0881 m_ClrMat(""),
0882 m_WrapMat(""),
0883 m_WallMat(""),
0884
0885 m_capName(""),
0886 m_capHere(0),
0887 m_capMat(""),
0888 m_capXSize(0),
0889 m_capYSize(0),
0890 m_capThick(0),
0891
0892 m_CERName(""),
0893 m_CERMat(""),
0894 m_CERXSize(0),
0895 m_CERYSize(0),
0896 m_CERThick(0),
0897
0898 m_BSiName(""),
0899 m_BSiMat(""),
0900 m_BSiXSize(0),
0901 m_BSiYSize(0),
0902 m_BSiThick(0),
0903
0904 m_APDName(""),
0905 m_APDMat(""),
0906 m_APDSide(0),
0907 m_APDThick(0),
0908 m_APDZ(0),
0909 m_APDX1(0),
0910 m_APDX2(0),
0911
0912 m_ATJName(""),
0913 m_ATJMat(""),
0914 m_ATJThick(0),
0915
0916 m_SGLName(""),
0917 m_SGLMat(""),
0918 m_SGLThick(0),
0919
0920 m_AGLName(""),
0921 m_AGLMat(""),
0922 m_AGLThick(0),
0923
0924 m_ANDName(""),
0925 m_ANDMat(""),
0926 m_ANDThick(0),
0927
0928 m_WebHere(0),
0929 m_WebPlName(""),
0930 m_WebClrName(""),
0931 m_WebPlMat(""),
0932 m_WebClrMat(""),
0933 m_vecWebPlTh(),
0934 m_vecWebClrTh(),
0935 m_vecWebLength(),
0936 m_IlyHere(0),
0937 m_IlyName(),
0938 m_IlyPhiLow(0),
0939 m_IlyDelPhi(0),
0940 m_vecIlyMat(),
0941 m_vecIlyThick(),
0942 m_IlyPipeName(""),
0943 m_IlyPipeHere(0),
0944 m_IlyPipeMat(""),
0945 m_IlyPipeOD(0),
0946 m_IlyPipeID(0),
0947 m_vecIlyPipeLength(),
0948 m_vecIlyPipeType(),
0949 m_vecIlyPipePhi(),
0950 m_vecIlyPipeZ(),
0951 m_IlyPTMName(""),
0952 m_IlyPTMHere(0),
0953 m_IlyPTMMat(""),
0954 m_IlyPTMWidth(0),
0955 m_IlyPTMLength(0),
0956 m_IlyPTMHeight(0),
0957 m_vecIlyPTMZ(),
0958 m_vecIlyPTMPhi(),
0959 m_IlyFanOutName(""),
0960 m_IlyFanOutHere(0),
0961 m_IlyFanOutMat(""),
0962 m_IlyFanOutWidth(0),
0963 m_IlyFanOutLength(0),
0964 m_IlyFanOutHeight(0),
0965 m_vecIlyFanOutZ(),
0966 m_vecIlyFanOutPhi(),
0967 m_IlyDiffName(""),
0968 m_IlyDiffMat(""),
0969 m_IlyDiffOff(0),
0970 m_IlyDiffLength(0),
0971 m_IlyBndlName(""),
0972 m_IlyBndlMat(""),
0973 m_IlyBndlOff(0),
0974 m_IlyBndlLength(0),
0975 m_IlyFEMName(""),
0976 m_IlyFEMMat(""),
0977 m_IlyFEMWidth(0),
0978 m_IlyFEMLength(0),
0979 m_IlyFEMHeight(0),
0980 m_vecIlyFEMZ(),
0981 m_vecIlyFEMPhi(),
0982 m_HawRName(""),
0983 m_FawName(""),
0984 m_FawHere(0),
0985 m_HawRHBIG(0),
0986 m_HawRhsml(0),
0987 m_HawRCutY(0),
0988 m_HawRCutZ(0),
0989 m_HawRCutDelY(0),
0990 m_HawYOffCry(0),
0991 m_NFawPerSupm(0),
0992 m_FawPhiOff(0),
0993 m_FawDelPhi(0),
0994 m_FawPhiRot(0),
0995 m_FawRadOff(0),
0996 m_GridHere(0),
0997 m_GridName(""),
0998 m_GridMat(""),
0999 m_GridThick(0),
1000 m_BackXOff(0),
1001 m_BackYOff(0),
1002 m_BackHere(0),
1003 m_BackSideName(""),
1004 m_BackSideHere(0),
1005 m_BackSideLength(0),
1006 m_BackSideHeight(0),
1007 m_BackSideWidth(0),
1008 m_BackSideYOff1(0),
1009 m_BackSideYOff2(0),
1010 m_BackSideAngle(0),
1011 m_BackSideMat(""),
1012 m_BackPlateName(""),
1013 m_BackPlateHere(0),
1014 m_BackPlateLength(0),
1015 m_BackPlateThick(0),
1016 m_BackPlateWidth(0),
1017 m_BackPlateMat(""),
1018 m_BackPlate2Name(""),
1019 m_BackPlate2Thick(0),
1020 m_BackPlate2Mat(""),
1021 m_GrilleName(""),
1022 m_GrilleHere(0),
1023 m_GrilleThick(0),
1024 m_GrilleWidth(0),
1025 m_GrilleZSpace(0),
1026 m_GrilleMat(""),
1027 m_vecGrilleHeight(),
1028 m_vecGrilleZOff(),
1029 m_GrEdgeSlotName(""),
1030 m_GrEdgeSlotMat(""),
1031 m_GrEdgeSlotHere(0),
1032 m_GrEdgeSlotHeight(0),
1033 m_GrEdgeSlotWidth(0),
1034 m_GrMidSlotName(""),
1035 m_GrMidSlotMat(""),
1036 m_GrMidSlotHere(0),
1037 m_GrMidSlotWidth(0),
1038 m_GrMidSlotXOff(0),
1039 m_vecGrMidSlotHeight(),
1040 m_BackPipeHere(0),
1041 m_BackPipeName(""),
1042 m_vecBackPipeDiam(),
1043 m_vecBackPipeThick(),
1044 m_BackPipeMat(""),
1045 m_BackPipeWaterMat(""),
1046
1047 m_vecBackCoolName(),
1048 m_BackCoolHere(0),
1049 m_BackCoolBarHere(0),
1050 m_BackCoolBarWidth(0),
1051 m_BackCoolBarHeight(0),
1052 m_BackCoolMat(""),
1053 m_BackCoolBarName(""),
1054 m_BackCoolBarThick(0),
1055 m_BackCoolBarMat(""),
1056 m_BackCoolBarSSName(""),
1057 m_BackCoolBarSSThick(0),
1058 m_BackCoolBarSSMat(""),
1059 m_BackCoolBarWaName(""),
1060 m_BackCoolBarWaThick(0),
1061 m_BackCoolBarWaMat(""),
1062 m_BackCoolVFEHere(0),
1063 m_BackCoolVFEName(""),
1064 m_BackCoolVFEMat(""),
1065 m_BackVFEName(""),
1066 m_BackVFEMat(""),
1067 m_vecBackVFELyrThick(),
1068 m_vecBackVFELyrName(),
1069 m_vecBackVFELyrMat(),
1070 m_vecBackCoolNSec(),
1071 m_vecBackCoolSecSep(),
1072 m_vecBackCoolNPerSec(),
1073
1074 m_BackMiscHere(0),
1075 m_vecBackMiscThick(),
1076 m_vecBackMiscName(),
1077 m_vecBackMiscMat(),
1078 m_BackCBStdSep(0),
1079 m_PatchPanelHere(0),
1080 m_PatchPanelName(""),
1081 m_vecPatchPanelThick(),
1082 m_vecPatchPanelNames(),
1083 m_vecPatchPanelMat(),
1084 m_BackCoolTankHere(0),
1085 m_BackCoolTankName(""),
1086 m_BackCoolTankWidth(0),
1087 m_BackCoolTankThick(0),
1088 m_BackCoolTankMat(""),
1089 m_BackCoolTankWaName(""),
1090 m_BackCoolTankWaWidth(0),
1091 m_BackCoolTankWaMat(""),
1092 m_BackBracketName(""),
1093 m_BackBracketHeight(0),
1094 m_BackBracketMat(""),
1095
1096 m_DryAirTubeHere(0),
1097 m_DryAirTubeName(""),
1098 m_MBCoolTubeNum(0),
1099 m_DryAirTubeInnDiam(0),
1100 m_DryAirTubeOutDiam(0),
1101 m_DryAirTubeMat(""),
1102 m_MBCoolTubeHere(0),
1103 m_MBCoolTubeName(""),
1104 m_MBCoolTubeInnDiam(0),
1105 m_MBCoolTubeOutDiam(0),
1106 m_MBCoolTubeMat(""),
1107 m_MBManifHere(0),
1108 m_MBManifName(""),
1109 m_MBManifInnDiam(0),
1110 m_MBManifOutDiam(0),
1111 m_MBManifMat(""),
1112 m_MBLyrHere(0),
1113 m_vecMBLyrThick(0),
1114 m_vecMBLyrName(),
1115 m_vecMBLyrMat(),
1116
1117 m_PincerRodHere(0),
1118 m_PincerRodName(""),
1119 m_PincerRodMat(""),
1120 m_vecPincerRodAzimuth(),
1121 m_PincerEnvName(""),
1122 m_PincerEnvMat(""),
1123 m_PincerEnvWidth(0),
1124 m_PincerEnvHeight(0),
1125 m_PincerEnvLength(0),
1126 m_vecPincerEnvZOff(),
1127 m_PincerBlkName(""),
1128 m_PincerBlkMat(""),
1129 m_PincerBlkLength(0),
1130 m_PincerShim1Name(""),
1131 m_PincerShimHeight(0),
1132 m_PincerShim2Name(""),
1133 m_PincerShimMat(""),
1134 m_PincerShim1Width(0),
1135 m_PincerShim2Width(0),
1136 m_PincerCutName(""),
1137 m_PincerCutMat(""),
1138 m_PincerCutWidth(0),
1139 m_PincerCutHeight(0)
1140
1141 {
1142 #ifdef EDM_ML_DEBUG
1143 edm::LogVerbatim("EcalGeom") << "DDEcalBarrelAlgo info: Creating an instance";
1144 #endif
1145 }
1146
1147 DDEcalBarrelNewAlgo::~DDEcalBarrelNewAlgo() {}
1148
1149 void DDEcalBarrelNewAlgo::initialize(const DDNumericArguments& nArgs,
1150 const DDVectorArguments& vArgs,
1151 const DDMapArguments& ,
1152 const DDStringArguments& sArgs,
1153 const DDStringVectorArguments& vsArgs) {
1154 #ifdef EDM_ML_DEBUG
1155 edm::LogVerbatim("EcalGeom") << "DDEcalBarrelAlgo info: Initialize";
1156 #endif
1157 m_idNameSpace = DDCurrentNamespace::ns();
1158
1159 m_idNameSpace = parent().name().ns();
1160
1161 m_BarName = sArgs["BarName"];
1162 m_BarMat = sArgs["BarMat"];
1163 m_vecBarZPts = vArgs["BarZPts"];
1164 m_vecBarRMin = vArgs["BarRMin"];
1165 m_vecBarRMax = vArgs["BarRMax"];
1166 m_vecBarTran = vArgs["BarTran"];
1167 m_vecBarRota = vArgs["BarRota"];
1168 m_vecBarRota2 = vArgs["BarRota2"];
1169 m_vecBarRota3 = vArgs["BarRota3"];
1170 m_BarPhiLo = nArgs["BarPhiLo"];
1171 m_BarPhiHi = nArgs["BarPhiHi"];
1172 m_BarHere = nArgs["BarHere"];
1173
1174 m_SpmName = sArgs["SpmName"];
1175 m_SpmMat = sArgs["SpmMat"];
1176 m_vecSpmZPts = vArgs["SpmZPts"];
1177 m_vecSpmRMin = vArgs["SpmRMin"];
1178 m_vecSpmRMax = vArgs["SpmRMax"];
1179 m_vecSpmTran = vArgs["SpmTran"];
1180 m_vecSpmRota = vArgs["SpmRota"];
1181 m_vecSpmBTran = vArgs["SpmBTran"];
1182 m_vecSpmBRota = vArgs["SpmBRota"];
1183 m_SpmNPerHalf = static_cast<unsigned int>(nArgs["SpmNPerHalf"]);
1184 m_SpmLowPhi = nArgs["SpmLowPhi"];
1185 m_SpmDelPhi = nArgs["SpmDelPhi"];
1186 m_SpmPhiOff = nArgs["SpmPhiOff"];
1187 m_vecSpmHere = vArgs["SpmHere"];
1188 m_SpmCutName = sArgs["SpmCutName"];
1189 m_SpmCutThick = nArgs["SpmCutThick"];
1190 m_SpmCutShow = int(nArgs["SpmCutShow"]);
1191 m_vecSpmCutTM = vArgs["SpmCutTM"];
1192 m_vecSpmCutTP = vArgs["SpmCutTP"];
1193 m_SpmCutRM = nArgs["SpmCutRM"];
1194 m_SpmCutRP = nArgs["SpmCutRP"];
1195 m_SpmExpThick = nArgs["SpmExpThick"];
1196 m_SpmExpWide = nArgs["SpmExpWide"];
1197 m_SpmExpYOff = nArgs["SpmExpYOff"];
1198 m_SpmSideName = sArgs["SpmSideName"];
1199 m_SpmSideMat = sArgs["SpmSideMat"];
1200 m_SpmSideHigh = nArgs["SpmSideHigh"];
1201 m_SpmSideThick = nArgs["SpmSideThick"];
1202 m_SpmSideYOffM = nArgs["SpmSideYOffM"];
1203 m_SpmSideYOffP = nArgs["SpmSideYOffP"];
1204
1205 m_NomCryDimAF = nArgs["NomCryDimAF"];
1206 m_NomCryDimLZ = nArgs["NomCryDimLZ"];
1207 m_vecNomCryDimBF = vArgs["NomCryDimBF"];
1208 m_vecNomCryDimCF = vArgs["NomCryDimCF"];
1209 m_vecNomCryDimAR = vArgs["NomCryDimAR"];
1210 m_vecNomCryDimBR = vArgs["NomCryDimBR"];
1211 m_vecNomCryDimCR = vArgs["NomCryDimCR"];
1212
1213 m_UnderAF = nArgs["UnderAF"];
1214 m_UnderLZ = nArgs["UnderLZ"];
1215 m_UnderBF = nArgs["UnderBF"];
1216 m_UnderCF = nArgs["UnderCF"];
1217 m_UnderAR = nArgs["UnderAR"];
1218 m_UnderBR = nArgs["UnderBR"];
1219 m_UnderCR = nArgs["UnderCR"];
1220
1221 m_WallThAlv = nArgs["WallThAlv"];
1222 m_WrapThAlv = nArgs["WrapThAlv"];
1223 m_ClrThAlv = nArgs["ClrThAlv"];
1224 m_vecGapAlvEta = vArgs["GapAlvEta"];
1225
1226 m_WallFrAlv = nArgs["WallFrAlv"];
1227 m_WrapFrAlv = nArgs["WrapFrAlv"];
1228 m_ClrFrAlv = nArgs["ClrFrAlv"];
1229
1230 m_WallReAlv = nArgs["WallReAlv"];
1231 m_WrapReAlv = nArgs["WrapReAlv"];
1232 m_ClrReAlv = nArgs["ClrReAlv"];
1233
1234 m_NCryTypes = static_cast<unsigned int>(nArgs["NCryTypes"]);
1235 m_NCryPerAlvEta = static_cast<unsigned int>(nArgs["NCryPerAlvEta"]);
1236
1237 m_CryName = sArgs["CryName"];
1238 m_ClrName = sArgs["ClrName"];
1239 m_WrapName = sArgs["WrapName"];
1240 m_WallName = sArgs["WallName"];
1241
1242 m_CryMat = sArgs["CryMat"];
1243 m_ClrMat = sArgs["ClrMat"];
1244 m_WrapMat = sArgs["WrapMat"];
1245 m_WallMat = sArgs["WallMat"];
1246
1247 m_capName = sArgs["CapName"];
1248 m_capHere = nArgs["CapHere"];
1249 m_capMat = sArgs["CapMat"];
1250 m_capXSize = nArgs["CapXSize"];
1251 m_capYSize = nArgs["CapYSize"];
1252 m_capThick = nArgs["CapThick"];
1253
1254 m_CERName = sArgs["CerName"];
1255 m_CERMat = sArgs["CerMat"];
1256 m_CERXSize = nArgs["CerXSize"];
1257 m_CERYSize = nArgs["CerYSize"];
1258 m_CERThick = nArgs["CerThick"];
1259
1260 m_BSiName = sArgs["BSiName"];
1261 m_BSiMat = sArgs["BSiMat"];
1262 m_BSiXSize = nArgs["BSiXSize"];
1263 m_BSiYSize = nArgs["BSiYSize"];
1264 m_BSiThick = nArgs["BSiThick"];
1265
1266 m_APDName = sArgs["APDName"];
1267 m_APDMat = sArgs["APDMat"];
1268 m_APDSide = nArgs["APDSide"];
1269 m_APDThick = nArgs["APDThick"];
1270 m_APDZ = nArgs["APDZ"];
1271 m_APDX1 = nArgs["APDX1"];
1272 m_APDX2 = nArgs["APDX2"];
1273
1274 m_ATJName = sArgs["ATJName"];
1275 m_ATJMat = sArgs["ATJMat"];
1276 m_ATJThick = nArgs["ATJThick"];
1277
1278 m_SGLName = sArgs["SGLName"];
1279 m_SGLMat = sArgs["SGLMat"];
1280 m_SGLThick = nArgs["SGLThick"];
1281
1282 m_AGLName = sArgs["AGLName"];
1283 m_AGLMat = sArgs["AGLMat"];
1284 m_AGLThick = nArgs["AGLThick"];
1285
1286 m_ANDName = sArgs["ANDName"];
1287 m_ANDMat = sArgs["ANDMat"];
1288 m_ANDThick = nArgs["ANDThick"];
1289
1290 m_WebHere = nArgs["WebHere"];
1291 m_WebPlName = sArgs["WebPlName"];
1292 m_WebClrName = sArgs["WebClrName"];
1293 m_WebPlMat = sArgs["WebPlMat"];
1294 m_WebClrMat = sArgs["WebClrMat"];
1295 m_vecWebPlTh = vArgs["WebPlTh"];
1296 m_vecWebClrTh = vArgs["WebClrTh"];
1297 m_vecWebLength = vArgs["WebLength"];
1298
1299 m_IlyHere = nArgs["IlyHere"];
1300 m_IlyName = sArgs["IlyName"];
1301 m_IlyPhiLow = nArgs["IlyPhiLow"];
1302 m_IlyDelPhi = nArgs["IlyDelPhi"];
1303 m_vecIlyMat = vsArgs["IlyMat"];
1304 m_vecIlyThick = vArgs["IlyThick"];
1305
1306 m_IlyPipeName = sArgs["IlyPipeName"];
1307 m_IlyPipeHere = nArgs["IlyPipeHere"];
1308 m_IlyPipeMat = sArgs["IlyPipeMat"];
1309 m_IlyPipeOD = nArgs["IlyPipeOD"];
1310 m_IlyPipeID = nArgs["IlyPipeID"];
1311 m_vecIlyPipeLength = vArgs["IlyPipeLength"];
1312 m_vecIlyPipeType = vArgs["IlyPipeType"];
1313 m_vecIlyPipePhi = vArgs["IlyPipePhi"];
1314 m_vecIlyPipeZ = vArgs["IlyPipeZ"];
1315
1316 m_IlyPTMName = sArgs["IlyPTMName"];
1317 m_IlyPTMHere = nArgs["IlyPTMHere"];
1318 m_IlyPTMMat = sArgs["IlyPTMMat"];
1319 m_IlyPTMWidth = nArgs["IlyPTMWidth"];
1320 m_IlyPTMLength = nArgs["IlyPTMLength"];
1321 m_IlyPTMHeight = nArgs["IlyPTMHeight"];
1322 m_vecIlyPTMZ = vArgs["IlyPTMZ"];
1323 m_vecIlyPTMPhi = vArgs["IlyPTMPhi"];
1324
1325 m_IlyFanOutName = sArgs["IlyFanOutName"];
1326 m_IlyFanOutHere = nArgs["IlyFanOutHere"];
1327 m_IlyFanOutMat = sArgs["IlyFanOutMat"];
1328 m_IlyFanOutWidth = nArgs["IlyFanOutWidth"];
1329 m_IlyFanOutLength = nArgs["IlyFanOutLength"];
1330 m_IlyFanOutHeight = nArgs["IlyFanOutHeight"];
1331 m_vecIlyFanOutZ = vArgs["IlyFanOutZ"];
1332 m_vecIlyFanOutPhi = vArgs["IlyFanOutPhi"];
1333 m_IlyDiffName = sArgs["IlyDiffName"];
1334 m_IlyDiffMat = sArgs["IlyDiffMat"];
1335 m_IlyDiffOff = nArgs["IlyDiffOff"];
1336 m_IlyDiffLength = nArgs["IlyDiffLength"];
1337 m_IlyBndlName = sArgs["IlyBndlName"];
1338 m_IlyBndlMat = sArgs["IlyBndlMat"];
1339 m_IlyBndlOff = nArgs["IlyBndlOff"];
1340 m_IlyBndlLength = nArgs["IlyBndlLength"];
1341 m_IlyFEMName = sArgs["IlyFEMName"];
1342 m_IlyFEMMat = sArgs["IlyFEMMat"];
1343 m_IlyFEMWidth = nArgs["IlyFEMWidth"];
1344 m_IlyFEMLength = nArgs["IlyFEMLength"];
1345 m_IlyFEMHeight = nArgs["IlyFEMHeight"];
1346 m_vecIlyFEMZ = vArgs["IlyFEMZ"];
1347 m_vecIlyFEMPhi = vArgs["IlyFEMPhi"];
1348
1349 m_HawRName = sArgs["HawRName"];
1350 m_FawName = sArgs["FawName"];
1351 m_FawHere = nArgs["FawHere"];
1352 m_HawRHBIG = nArgs["HawRHBIG"];
1353 m_HawRhsml = nArgs["HawRhsml"];
1354 m_HawRCutY = nArgs["HawRCutY"];
1355 m_HawRCutZ = nArgs["HawRCutZ"];
1356 m_HawRCutDelY = nArgs["HawRCutDelY"];
1357 m_HawYOffCry = nArgs["HawYOffCry"];
1358
1359 m_NFawPerSupm = static_cast<unsigned int>(nArgs["NFawPerSupm"]);
1360 m_FawPhiOff = nArgs["FawPhiOff"];
1361 m_FawDelPhi = nArgs["FawDelPhi"];
1362 m_FawPhiRot = nArgs["FawPhiRot"];
1363 m_FawRadOff = nArgs["FawRadOff"];
1364
1365 m_GridHere = nArgs["GridHere"];
1366 m_GridName = sArgs["GridName"];
1367 m_GridMat = sArgs["GridMat"];
1368 m_GridThick = nArgs["GridThick"];
1369
1370 m_BackHere = nArgs["BackHere"];
1371 m_BackXOff = nArgs["BackXOff"];
1372 m_BackYOff = nArgs["BackYOff"];
1373 m_BackSideName = sArgs["BackSideName"];
1374 m_BackSideHere = nArgs["BackSideHere"];
1375 m_BackSideLength = nArgs["BackSideLength"];
1376 m_BackSideHeight = nArgs["BackSideHeight"];
1377 m_BackSideWidth = nArgs["BackSideWidth"];
1378 m_BackSideYOff1 = nArgs["BackSideYOff1"];
1379 m_BackSideYOff2 = nArgs["BackSideYOff2"];
1380 m_BackSideAngle = nArgs["BackSideAngle"];
1381 m_BackSideMat = sArgs["BackSideMat"];
1382 m_BackPlateName = sArgs["BackPlateName"];
1383 m_BackPlateHere = nArgs["BackPlateHere"];
1384 m_BackPlateLength = nArgs["BackPlateLength"];
1385 m_BackPlateThick = nArgs["BackPlateThick"];
1386 m_BackPlateWidth = nArgs["BackPlateWidth"];
1387 m_BackPlateMat = sArgs["BackPlateMat"];
1388 m_BackPlate2Name = sArgs["BackPlate2Name"];
1389 m_BackPlate2Thick = nArgs["BackPlate2Thick"];
1390 m_BackPlate2Mat = sArgs["BackPlate2Mat"];
1391 m_GrilleName = sArgs["GrilleName"];
1392 m_GrilleHere = nArgs["GrilleHere"];
1393 m_GrilleThick = nArgs["GrilleThick"];
1394 m_GrilleWidth = nArgs["GrilleWidth"];
1395 m_GrilleZSpace = nArgs["GrilleZSpace"];
1396 m_GrilleMat = sArgs["GrilleMat"];
1397 m_vecGrilleHeight = vArgs["GrilleHeight"];
1398 m_vecGrilleZOff = vArgs["GrilleZOff"];
1399
1400 m_GrEdgeSlotName = sArgs["GrEdgeSlotName"];
1401 m_GrEdgeSlotMat = sArgs["GrEdgeSlotMat"];
1402 m_GrEdgeSlotHere = nArgs["GrEdgeSlotHere"];
1403 m_GrEdgeSlotHeight = nArgs["GrEdgeSlotHeight"];
1404 m_GrEdgeSlotWidth = nArgs["GrEdgeSlotWidth"];
1405 m_GrMidSlotName = sArgs["GrMidSlotName"];
1406 m_GrMidSlotMat = sArgs["GrMidSlotMat"];
1407 m_GrMidSlotHere = nArgs["GrMidSlotHere"];
1408 m_GrMidSlotWidth = nArgs["GrMidSlotWidth"];
1409 m_GrMidSlotXOff = nArgs["GrMidSlotXOff"];
1410 m_vecGrMidSlotHeight = vArgs["GrMidSlotHeight"];
1411
1412 m_BackPipeHere = nArgs["BackPipeHere"];
1413 m_BackPipeName = sArgs["BackPipeName"];
1414 m_vecBackPipeDiam = vArgs["BackPipeDiam"];
1415 m_vecBackPipeThick = vArgs["BackPipeThick"];
1416 m_BackPipeMat = sArgs["BackPipeMat"];
1417 m_BackPipeWaterMat = sArgs["BackPipeWaterMat"];
1418
1419 m_BackCoolHere = nArgs["BackCoolHere"];
1420 m_vecBackCoolName = vsArgs["BackCoolName"];
1421 m_BackCoolBarHere = nArgs["BackCoolBarHere"];
1422 m_BackCoolBarWidth = nArgs["BackCoolBarWidth"];
1423 m_BackCoolBarHeight = nArgs["BackCoolBarHeight"];
1424 m_BackCoolMat = sArgs["BackCoolMat"];
1425 m_BackCoolBarName = sArgs["BackCoolBarName"];
1426 m_BackCoolBarThick = nArgs["BackCoolBarThick"];
1427 m_BackCoolBarMat = sArgs["BackCoolBarMat"];
1428 m_BackCoolBarSSName = sArgs["BackCoolBarSSName"];
1429 m_BackCoolBarSSThick = nArgs["BackCoolBarSSThick"];
1430 m_BackCoolBarSSMat = sArgs["BackCoolBarSSMat"];
1431 m_BackCoolBarWaName = sArgs["BackCoolBarWaName"];
1432 m_BackCoolBarWaThick = nArgs["BackCoolBarWaThick"];
1433 m_BackCoolBarWaMat = sArgs["BackCoolBarWaMat"];
1434 m_BackCoolVFEHere = nArgs["BackCoolVFEHere"];
1435 m_BackCoolVFEName = sArgs["BackCoolVFEName"];
1436 m_BackCoolVFEMat = sArgs["BackCoolVFEMat"];
1437 m_BackVFEName = sArgs["BackVFEName"];
1438 m_BackVFEMat = sArgs["BackVFEMat"];
1439 m_vecBackVFELyrThick = vArgs["BackVFELyrThick"];
1440 m_vecBackVFELyrName = vsArgs["BackVFELyrName"];
1441 m_vecBackVFELyrMat = vsArgs["BackVFELyrMat"];
1442 m_vecBackCoolNSec = vArgs["BackCoolNSec"];
1443 m_vecBackCoolSecSep = vArgs["BackCoolSecSep"];
1444 m_vecBackCoolNPerSec = vArgs["BackCoolNPerSec"];
1445 m_BackCBStdSep = nArgs["BackCBStdSep"];
1446
1447 m_BackMiscHere = nArgs["BackMiscHere"];
1448 m_vecBackMiscThick = vArgs["BackMiscThick"];
1449 m_vecBackMiscName = vsArgs["BackMiscName"];
1450 m_vecBackMiscMat = vsArgs["BackMiscMat"];
1451 m_PatchPanelHere = nArgs["PatchPanelHere"];
1452 m_vecPatchPanelThick = vArgs["PatchPanelThick"];
1453 m_vecPatchPanelNames = vsArgs["PatchPanelNames"];
1454 m_vecPatchPanelMat = vsArgs["PatchPanelMat"];
1455 m_PatchPanelName = sArgs["PatchPanelName"];
1456
1457 m_BackCoolTankHere = nArgs["BackCoolTankHere"];
1458 m_BackCoolTankName = sArgs["BackCoolTankName"];
1459 m_BackCoolTankWidth = nArgs["BackCoolTankWidth"];
1460 m_BackCoolTankThick = nArgs["BackCoolTankThick"];
1461 m_BackCoolTankMat = sArgs["BackCoolTankMat"];
1462 m_BackCoolTankWaName = sArgs["BackCoolTankWaName"];
1463 m_BackCoolTankWaWidth = nArgs["BackCoolTankWaWidth"];
1464 m_BackCoolTankWaMat = sArgs["BackCoolTankWaMat"];
1465 m_BackBracketName = sArgs["BackBracketName"];
1466 m_BackBracketHeight = nArgs["BackBracketHeight"];
1467 m_BackBracketMat = sArgs["BackBracketMat"];
1468
1469 m_DryAirTubeHere = nArgs["DryAirTubeHere"];
1470 m_DryAirTubeName = sArgs["DryAirTubeName"];
1471 m_MBCoolTubeNum = static_cast<unsigned int>(nArgs["MBCoolTubeNum"]);
1472 m_DryAirTubeInnDiam = nArgs["DryAirTubeInnDiam"];
1473 m_DryAirTubeOutDiam = nArgs["DryAirTubeOutDiam"];
1474 m_DryAirTubeMat = sArgs["DryAirTubeMat"];
1475 m_MBCoolTubeHere = nArgs["MBCoolTubeHere"];
1476 m_MBCoolTubeName = sArgs["MBCoolTubeName"];
1477 m_MBCoolTubeInnDiam = nArgs["MBCoolTubeInnDiam"];
1478 m_MBCoolTubeOutDiam = nArgs["MBCoolTubeOutDiam"];
1479 m_MBCoolTubeMat = sArgs["MBCoolTubeMat"];
1480 m_MBManifHere = nArgs["MBManifHere"];
1481 m_MBManifName = sArgs["MBManifName"];
1482 m_MBManifInnDiam = nArgs["MBManifInnDiam"];
1483 m_MBManifOutDiam = nArgs["MBManifOutDiam"];
1484 m_MBManifMat = sArgs["MBManifMat"];
1485 m_MBLyrHere = nArgs["MBLyrHere"];
1486 m_vecMBLyrThick = vArgs["MBLyrThick"];
1487 m_vecMBLyrName = vsArgs["MBLyrName"];
1488 m_vecMBLyrMat = vsArgs["MBLyrMat"];
1489
1490 m_PincerRodHere = nArgs["PincerRodHere"];
1491 m_PincerRodName = sArgs["PincerRodName"];
1492 m_PincerRodMat = sArgs["PincerRodMat"];
1493 m_vecPincerRodAzimuth = vArgs["PincerRodAzimuth"];
1494 m_PincerEnvName = sArgs["PincerEnvName"];
1495 m_PincerEnvMat = sArgs["PincerEnvMat"];
1496 m_PincerEnvWidth = nArgs["PincerEnvWidth"];
1497 m_PincerEnvHeight = nArgs["PincerEnvHeight"];
1498 m_PincerEnvLength = nArgs["PincerEnvLength"];
1499 m_vecPincerEnvZOff = vArgs["PincerEnvZOff"];
1500 m_PincerBlkName = sArgs["PincerBlkName"];
1501 m_PincerBlkMat = sArgs["PincerBlkMat"];
1502 m_PincerBlkLength = nArgs["PincerBlkLength"];
1503 m_PincerShim1Name = sArgs["PincerShim1Name"];
1504 m_PincerShimHeight = nArgs["PincerShimHeight"];
1505 m_PincerShim2Name = sArgs["PincerShim2Name"];
1506 m_PincerShimMat = sArgs["PincerShimMat"];
1507 m_PincerShim1Width = nArgs["PincerShim1Width"];
1508 m_PincerShim2Width = nArgs["PincerShim2Width"];
1509 m_PincerCutName = sArgs["PincerCutName"];
1510 m_PincerCutMat = sArgs["PincerCutMat"];
1511 m_PincerCutWidth = nArgs["PincerCutWidth"];
1512 m_PincerCutHeight = nArgs["PincerCutHeight"];
1513
1514 #ifdef EDM_ML_DEBUG
1515 edm::LogVerbatim("EcalGeom") << "DDEcalBarrelAlgo info: end initialize";
1516 #endif
1517 }
1518
1519
1520
1521
1522
1523 void DDEcalBarrelNewAlgo::execute(DDCompactView& cpv) {
1524 #ifdef EDM_ML_DEBUG
1525 edm::LogVerbatim("EcalGeom") << "******** DDEcalBarrelAlgo execute!" << std::endl;
1526 #endif
1527 if (barHere() != 0) {
1528 const unsigned int copyOne(1);
1529 const unsigned int copyTwo(2);
1530
1531 cpv.position(
1532 DDLogicalPart(barName(),
1533 barMat(),
1534 DDSolidFactory::polycone(
1535 barName(), barPhiLo(), (barPhiHi() - barPhiLo()), vecBarZPts(), vecBarRMin(), vecBarRMax())),
1536 parent().name(),
1537 copyOne,
1538 DDTranslation(vecBarTran()[0], vecBarTran()[1], vecBarTran()[2]),
1539 myrot(barName().name() + "Rot",
1540 Rota(Vec3(vecBarRota3()[0], vecBarRota3()[1], vecBarRota3()[2]), vecBarRota3()[3]) *
1541 Rota(Vec3(vecBarRota2()[0], vecBarRota2()[1], vecBarRota2()[2]), vecBarRota2()[3]) *
1542 Rota(Vec3(vecBarRota()[0], vecBarRota()[1], vecBarRota()[2]), vecBarRota()[3])));
1543 #ifdef EDM_ML_DEBUG
1544 edm::LogVerbatim("EBGeom") << barName() << " PolyCone from " << barPhiLo() / CLHEP::deg << " to "
1545 << barPhiHi() / CLHEP::deg << " with " << vecBarZPts().size() << " points";
1546 for (unsigned int k = 0; k < vecBarZPts().size(); ++k)
1547 edm::LogVerbatim("EBGeom") << "[" << k << "] " << vecBarZPts()[k] << ":" << vecBarRMin()[k] << ":"
1548 << vecBarRMax()[k];
1549 edm::LogVerbatim("EBGeomX") << barName() << ":" << copyOne << " positioned in " << parent().name() << " at "
1550 << DDTranslation(vecBarTran()[0], vecBarTran()[1], vecBarTran()[2]) << " with rotation";
1551 #endif
1552
1553
1554
1555
1556 const DDName spmcut1ddname((0 != spmCutShow()) ? spmName() : ddname(m_SpmName + "CUT1"));
1557 const DDSolid ddspm(
1558 DDSolidFactory::polycone(spmcut1ddname, spmLowPhi(), spmDelPhi(), vecSpmZPts(), vecSpmRMin(), vecSpmRMax()));
1559 #ifdef EDM_ML_DEBUG
1560 edm::LogVerbatim("EBGeom") << spmcut1ddname << " PolyCone from " << spmLowPhi() / CLHEP::deg << " to "
1561 << (spmLowPhi() + spmDelPhi()) / CLHEP::deg << " with " << vecSpmZPts().size()
1562 << " points";
1563 for (unsigned int k = 0; k < vecSpmZPts().size(); ++k)
1564 edm::LogVerbatim("EBGeom") << "[" << k << "] " << vecSpmZPts()[k] << ":" << vecSpmRMin()[k] << ":"
1565 << vecSpmRMax()[k];
1566 #endif
1567
1568 const unsigned int indx(vecSpmRMax().size() / 2);
1569
1570
1571 const DDSolid spmCutBox(DDSolidFactory::box(spmCutName(),
1572 1.05 * (vecSpmRMax()[indx] - vecSpmRMin()[indx]) / 2.,
1573 spmCutThick() / 2.,
1574 fabs(vecSpmZPts().back() - vecSpmZPts().front()) / 2. + 1 * mm));
1575 #ifdef EDM_ML_DEBUG
1576 edm::LogVerbatim("EBGeom") << spmCutName() << " Box " << 1.05 * (vecSpmRMax()[indx] - vecSpmRMin()[indx]) / 2.
1577 << ":" << spmCutThick() / 2. << ":"
1578 << (fabs(vecSpmZPts().back() - vecSpmZPts().front()) / 2. + 1 * mm);
1579 #endif
1580 const std::vector<double>& cutBoxParms(spmCutBox.parameters());
1581 const DDLogicalPart spmCutLog(spmCutName(), spmMat(), spmCutBox);
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610 const DDSolid sideSolid(DDSolidFactory::box(
1611 spmSideName(), spmSideHigh() / 2., spmSideThick() / 2., fabs(vecSpmZPts()[1] - vecSpmZPts()[0]) / 2.));
1612 #ifdef EDM_ML_DEBUG
1613 edm::LogVerbatim("EBGeom") << spmSideName() << " Box " << spmSideHigh() / 2. << ":" << spmSideThick() / 2. << ":"
1614 << fabs(vecSpmZPts()[1] - vecSpmZPts()[0]) / 2.;
1615 #endif
1616 const std::vector<double>& sideParms(sideSolid.parameters());
1617 const DDLogicalPart sideLog(spmSideName(), spmSideMat(), sideSolid);
1618
1619 DDSolid temp1;
1620 DDSolid temp2;
1621 for (unsigned int icopy(1); icopy <= 2; ++icopy) {
1622 const std::vector<double>& tvec(1 == icopy ? vecSpmCutTM() : vecSpmCutTP());
1623 const double rang(1 == icopy ? spmCutRM() : spmCutRP());
1624
1625 const Tl3D tr(tvec[0], tvec[1], tvec[2]);
1626 const RoZ3D ro(rang);
1627 const Tf3D alltrot(
1628 RoZ3D(1 == icopy ? spmLowPhi() : spmLowPhi() + spmDelPhi()) *
1629 Tl3D((vecSpmRMax()[indx] + vecSpmRMin()[indx]) / 2., 0, (vecSpmZPts().front() + vecSpmZPts().back()) / 2.) *
1630 tr * ro);
1631
1632 const DDRotation ddrot(myrot(spmCutName().name() + std::to_string(icopy), alltrot.getRotation()));
1633 const DDTranslation ddtra(alltrot.getTranslation());
1634
1635 const Tl3D trSide(tvec[0],
1636 tvec[1] + (1 == icopy ? 1. : -1.) * (cutBoxParms[1] + sideParms[1]) +
1637 (1 == icopy ? spmSideYOffM() : spmSideYOffP()),
1638 tvec[2]);
1639 const RoZ3D roSide(rang);
1640 const Tf3D sideRot(RoZ3D(1 == icopy ? spmLowPhi() : spmLowPhi() + spmDelPhi()) *
1641 Tl3D(vecSpmRMin().front() + sideParms[0], 0, vecSpmZPts().front() + sideParms[2]) * trSide *
1642 roSide);
1643
1644 const DDRotation sideddrot(myrot(spmSideName().name() + std::to_string(icopy), sideRot.getRotation()));
1645 const DDTranslation sideddtra(sideRot.getTranslation());
1646
1647 cpv.position(sideLog, spmName(), icopy, sideddtra, sideddrot);
1648 #ifdef EDM_ML_DEBUG
1649 edm::LogVerbatim("EBGeomX") << sideLog.name() << ":" << icopy << " positioned in " << spmName() << " at "
1650 << sideddtra << " with rotation";
1651 #endif
1652 if (0 != spmCutShow())
1653 {
1654 cpv.position(spmCutLog, spmName(), icopy, ddtra, ddrot);
1655 #ifdef EDM_ML_DEBUG
1656 edm::LogVerbatim("EBGeomX") << spmCutLog.name() << ":" << icopy << " positioned in " << spmName() << " at "
1657 << ddtra << " with rotation";
1658 #endif
1659 } else
1660 {
1661 if (1 == icopy) {
1662 temp1 = DDSolidFactory::subtraction(DDName(m_SpmName + "_T1"), spmcut1ddname, spmCutBox, ddtra, ddrot);
1663 #ifdef EDM_ML_DEBUG
1664 edm::LogVerbatim("EBGeom") << DDName(m_SpmName + "_T1") << " Subtraction " << spmcut1ddname << ":"
1665 << spmCutBox.name() << " at " << ddtra;
1666 #endif
1667 } else {
1668 temp2 = DDSolidFactory::subtraction(spmName(), temp1, spmCutBox, ddtra, ddrot);
1669 #ifdef EDM_ML_DEBUG
1670 edm::LogVerbatim("EBGeom") << spmName() << " Subtraction " << temp1.name() << ":" << spmCutBox.name()
1671 << " at " << ddtra;
1672 #endif
1673 }
1674 }
1675 }
1676
1677 const DDLogicalPart spmLog(spmName(), spmMat(), ((0 != spmCutShow()) ? ddspm : temp2));
1678
1679 const double dphi(360. * deg / (1. * spmNPerHalf()));
1680 for (unsigned int iphi(0); iphi < 2 * spmNPerHalf(); ++iphi) {
1681 const double phi(iphi * dphi + spmPhiOff());
1682
1683
1684
1685
1686 const Tf3D rotaBase(RoZ3D(phi) * (iphi < spmNPerHalf() ? Ro3D() : RoX3D(180. * deg)) *
1687 Ro3D(vecSpmBRota()[3], Vec3(vecSpmBRota()[0], vecSpmBRota()[1], vecSpmBRota()[2])) *
1688 Tl3D(Vec3(vecSpmBTran()[0], vecSpmBTran()[1], vecSpmBTran()[2])));
1689
1690
1691
1692
1693 const unsigned int offr(4 * iphi);
1694 const unsigned int offt(3 * iphi);
1695
1696 const Ro3D r1(vecSpmRota()[offr + 3],
1697 Vec3(vecSpmRota()[offr + 0], vecSpmRota()[offr + 1], vecSpmRota()[offr + 2]));
1698
1699 const Tf3D rotaExtra(r1 * Tl3D(Vec3(vecSpmTran()[offt + 0], vecSpmTran()[offt + 1], vecSpmTran()[offt + 2])));
1700
1701 const Tf3D both(rotaExtra * rotaBase);
1702
1703 const DDRotation rota(myrot(spmName().name() + std::to_string(phi / deg), both.getRotation()));
1704
1705 if (vecSpmHere()[iphi] != 0) {
1706
1707 DDTranslation myTran(both.getTranslation().x(), both.getTranslation().y(), both.getTranslation().z());
1708 cpv.position(spmLog, barName(), iphi + 1, myTran, rota);
1709 #ifdef EDM_ML_DEBUG
1710 edm::LogVerbatim("EBGeomX") << spmLog.name() << ":" << (iphi + 1) << " positioned in " << barName() << " at "
1711 << myTran << " with rotation";
1712 #endif
1713 }
1714 }
1715
1716
1717
1718 const double ilyLength(vecSpmZPts()[1] - vecSpmZPts()[0]);
1719 double ilyRMin(vecSpmRMin()[0]);
1720 double ilyThick(0);
1721 for (unsigned int ilyx(0); ilyx != vecIlyThick().size(); ++ilyx) {
1722 ilyThick += vecIlyThick()[ilyx];
1723 }
1724 const DDName ilyDDName(ddname(ilyName()));
1725 const DDSolid ilySolid(
1726 DDSolidFactory::tubs(ilyDDName, ilyLength / 2, ilyRMin, ilyRMin + ilyThick, ilyPhiLow(), ilyDelPhi()));
1727 #ifdef EDM_ML_DEBUG
1728 edm::LogVerbatim("EBGeom") << ilyDDName << " Tubs " << ilyLength / 2 << ":" << ilyRMin << ":" << ilyRMin + ilyThick
1729 << ":" << ilyPhiLow() / CLHEP::deg << ":" << ilyDelPhi() / CLHEP::deg;
1730 #endif
1731 const DDLogicalPart ilyLog(ilyDDName, spmMat(), ilySolid);
1732 cpv.position(ilyLog, spmLog, copyOne, DDTranslation(0, 0, ilyLength / 2), DDRotation());
1733 #ifdef EDM_ML_DEBUG
1734 edm::LogVerbatim("EBGeomX") << ilyDDName << ":" << copyOne << " positioned in " << spmLog.name() << " at "
1735 << DDTranslation(0, 0, ilyLength / 2) << " with no rotation";
1736 #endif
1737 DDLogicalPart ilyPipeLog[200];
1738
1739 if (0 != ilyPipeHere()) {
1740 for (unsigned int iPipeType(0); iPipeType != vecIlyPipeLength().size(); ++iPipeType) {
1741 const DDName pName(ddname(ilyPipeName() + "_" + std::to_string(iPipeType + 1)));
1742
1743 DDSolid ilyPipeSolid(
1744 DDSolidFactory::tubs(pName, vecIlyPipeLength()[iPipeType] / 2., 0, ilyPipeOD() / 2, 0 * deg, 360 * deg));
1745 #ifdef EDM_ML_DEBUG
1746 edm::LogVerbatim("EBGeom") << pName << " Tubs " << vecIlyPipeLength()[iPipeType] / 2.
1747 << ":0:" << ilyPipeOD() / 2 << ":0:360";
1748 #endif
1749 ilyPipeLog[iPipeType] = DDLogicalPart(pName, ilyPipeMat(), ilyPipeSolid);
1750
1751 const DDName pWaName(ddname(ilyPipeName() + "Wa_" + std::to_string(iPipeType + 1)));
1752 DDSolid ilyPipeWaSolid(
1753 DDSolidFactory::tubs(pWaName, vecIlyPipeLength()[iPipeType] / 2., 0, ilyPipeID() / 2, 0 * deg, 360 * deg));
1754 #ifdef EDM_ML_DEBUG
1755 edm::LogVerbatim("EBGeom") << pWaName << " Tubs " << vecIlyPipeLength()[iPipeType] / 2.
1756 << ":0:" << ilyPipeID() / 2 << ":0:360";
1757 #endif
1758 const DDLogicalPart ilyPipeWaLog(pWaName, backPipeWaterMat(), ilyPipeWaSolid);
1759
1760 cpv.position(ilyPipeWaLog, pName, copyOne, DDTranslation(0, 0, 0), DDRotation());
1761 #ifdef EDM_ML_DEBUG
1762 edm::LogVerbatim("EBGeomX") << pWaName << ":" << copyOne << " positioned in " << pName << " at "
1763 << DDTranslation(0, 0, 0) << " with no rotation";
1764 #endif
1765 }
1766 }
1767
1768 DDSolid ilyPTMSolid(
1769 DDSolidFactory::box(ilyPTMName(), ilyPTMHeight() / 2., ilyPTMWidth() / 2., ilyPTMLength() / 2.));
1770 #ifdef EDM_ML_DEBUG
1771 edm::LogVerbatim("EBGeom") << ilyPTMName() << " Box " << ilyPTMHeight() / 2. << ":" << ilyPTMWidth() / 2. << ":"
1772 << ilyPTMLength() / 2.;
1773 #endif
1774 const DDLogicalPart ilyPTMLog(ilyPTMName(), ilyPTMMat(), ilyPTMSolid);
1775
1776 DDSolid ilyFanOutSolid(
1777 DDSolidFactory::box(ilyFanOutName(), ilyFanOutHeight() / 2., ilyFanOutWidth() / 2., ilyFanOutLength() / 2.));
1778 #ifdef EDM_ML_DEBUG
1779 edm::LogVerbatim("EBGeom") << ilyFanOutName() << " Box " << ilyFanOutHeight() / 2. << ":" << ilyFanOutWidth() / 2.
1780 << ":" << ilyFanOutLength() / 2.;
1781 #endif
1782 const DDLogicalPart ilyFanOutLog(ilyFanOutName(), ilyFanOutMat(), ilyFanOutSolid);
1783
1784 DDSolid ilyFEMSolid(
1785 DDSolidFactory::box(ilyFEMName(), ilyFEMHeight() / 2., ilyFEMWidth() / 2., ilyFEMLength() / 2.));
1786 #ifdef EDM_ML_DEBUG
1787 edm::LogVerbatim("EBGeom") << ilyFEMName() << " Box " << ilyFEMHeight() / 2. << ":" << ilyFEMWidth() / 2. << ":"
1788 << ilyFEMLength() / 2.;
1789 #endif
1790 const DDLogicalPart ilyFEMLog(ilyFEMName(), ilyFEMMat(), ilyFEMSolid);
1791
1792 DDSolid ilyDiffSolid(
1793 DDSolidFactory::box(ilyDiffName(), ilyFanOutHeight() / 2., ilyFanOutWidth() / 2., ilyDiffLength() / 2.));
1794 #ifdef EDM_ML_DEBUG
1795 edm::LogVerbatim("EBGeom") << ilyDiffName() << " Box " << ilyFanOutHeight() / 2. << ":" << ilyFanOutWidth() / 2.
1796 << ":" << ilyDiffLength() / 2.;
1797 #endif
1798 const DDLogicalPart ilyDiffLog(ilyDiffName(), ilyDiffMat(), ilyDiffSolid);
1799
1800 DDSolid ilyBndlSolid(
1801 DDSolidFactory::box(ilyBndlName(), ilyFanOutHeight() / 2., ilyFanOutWidth() / 2., ilyBndlLength() / 2.));
1802 #ifdef EDM_ML_DEBUG
1803 edm::LogVerbatim("EBGeom") << ilyBndlName() << " Box " << ilyFanOutHeight() / 2. << ":" << ilyFanOutWidth() / 2.
1804 << ":" << ilyBndlLength() / 2.;
1805 #endif
1806 const DDLogicalPart ilyBndlLog(ilyBndlName(), ilyBndlMat(), ilyBndlSolid);
1807 cpv.position(ilyDiffLog,
1808 ilyFanOutName(),
1809 copyOne,
1810 DDTranslation(0, 0, -ilyFanOutLength() / 2 + ilyDiffLength() / 2 + ilyDiffOff()),
1811 DDRotation());
1812 #ifdef EDM_ML_DEBUG
1813 edm::LogVerbatim("EBGeomX") << ilyDiffName() << ":" << copyOne << " positioned in " << ilyFanOutName() << " at "
1814 << DDTranslation(0, 0, -ilyFanOutLength() / 2 + ilyDiffLength() / 2 + ilyDiffOff())
1815 << " with no rotation";
1816 #endif
1817 cpv.position(ilyBndlLog,
1818 ilyFanOutName(),
1819 copyOne,
1820 DDTranslation(0, 0, -ilyFanOutLength() / 2 + ilyBndlLength() / 2 + ilyBndlOff()),
1821 DDRotation());
1822 #ifdef EDM_ML_DEBUG
1823 edm::LogVerbatim("EBGeomX") << ilyBndlName() << ":" << copyOne << " positioned in " << ilyFanOutName() << " at "
1824 << DDTranslation(0, 0, -ilyFanOutLength() / 2 + ilyBndlLength() / 2 + ilyBndlOff())
1825 << " with no rotation";
1826 #endif
1827 for (unsigned int ily(0); ily != vecIlyThick().size(); ++ily) {
1828 const double ilyRMax(ilyRMin + vecIlyThick()[ily]);
1829 const DDName xilyName(ddname(ilyName() + std::to_string(ily)));
1830 const DDSolid xilySolid(
1831 DDSolidFactory::tubs(xilyName, ilyLength / 2, ilyRMin, ilyRMax, ilyPhiLow(), ilyDelPhi()));
1832 #ifdef EDM_ML_DEBUG
1833 edm::LogVerbatim("EBGeom") << xilyName << " Tubs " << ilyLength / 2 << ":" << ilyRMin << ":" << ilyRMax << ":"
1834 << ilyPhiLow() / CLHEP::deg << ":" << ilyDelPhi() / CLHEP::deg;
1835 #endif
1836
1837 const DDLogicalPart xilyLog(xilyName, ddmat(vecIlyMat()[ily]), xilySolid);
1838
1839 if (0 != ilyHere()) {
1840 cpv.position(xilyLog, ilyLog, copyOne, DDTranslation(0, 0, 0), DDRotation());
1841 #ifdef EDM_ML_DEBUG
1842 edm::LogVerbatim("EBGeomX") << xilyLog.name() << ":" << copyOne << " positioned in " << ilyLog.name() << " at "
1843 << DDTranslation(0, 0, 0) << " with no rotation";
1844 #endif
1845 unsigned int copyNum[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1846
1847 if (10 * mm < vecIlyThick()[ily] && vecIlyThick().size() != (ily + 1) && 0 != ilyPipeHere()) {
1848 if (0 != ilyPTMHere()) {
1849 unsigned int ptmCopy(0);
1850 for (unsigned int ilyPTM(0); ilyPTM != vecIlyPTMZ().size(); ++ilyPTM) {
1851 const double radius(ilyRMax - 1 * mm - ilyPTMHeight() / 2.);
1852 const double phi(vecIlyPTMPhi()[ilyPTM]);
1853 const double yy(radius * sin(phi));
1854 const double xx(radius * cos(phi));
1855 ++ptmCopy;
1856 cpv.position(ilyPTMLog,
1857 xilyLog,
1858 ptmCopy,
1859 DDTranslation(xx, yy, vecIlyPTMZ()[ilyPTM] - ilyLength / 2),
1860 myrot(ilyPTMLog.name().name() + "_rot" + std::to_string(ptmCopy), CLHEP::HepRotationZ(phi)));
1861 #ifdef EDM_ML_DEBUG
1862 edm::LogVerbatim("EBGeomX")
1863 << ilyPTMLog.name() << ":" << ptmCopy << " positioned in " << xilyLog.name() << " at "
1864 << DDTranslation(xx, yy, vecIlyPTMZ()[ilyPTM] - ilyLength / 2) << " with rotation";
1865 #endif
1866 }
1867 }
1868 if (0 != ilyFanOutHere()) {
1869 unsigned int fanOutCopy(0);
1870 for (unsigned int ilyFO(0); ilyFO != vecIlyFanOutZ().size(); ++ilyFO) {
1871 const double radius(ilyRMax - 1 * mm - ilyFanOutHeight() / 2.);
1872 const double phi(vecIlyFanOutPhi()[ilyFO]);
1873 const double yy(radius * sin(phi));
1874 const double xx(radius * cos(phi));
1875 ++fanOutCopy;
1876 cpv.position(ilyFanOutLog,
1877 xilyLog,
1878 fanOutCopy,
1879 DDTranslation(xx, yy, vecIlyFanOutZ()[ilyFO] - ilyLength / 2),
1880 myrot(ilyFanOutLog.name().name() + "_rot" + std::to_string(fanOutCopy),
1881 CLHEP::HepRotationZ(phi) * CLHEP::HepRotationY(180 * deg)));
1882 #ifdef EDM_ML_DEBUG
1883 edm::LogVerbatim("EBGeomX")
1884 << ilyFanOutLog.name() << ":" << fanOutCopy << " positioned in " << xilyLog.name() << " at "
1885 << DDTranslation(xx, yy, vecIlyFanOutZ()[ilyFO] - ilyLength / 2) << " with rotation";
1886 #endif
1887 }
1888 unsigned int femCopy(0);
1889 for (unsigned int ilyFEM(0); ilyFEM != vecIlyFEMZ().size(); ++ilyFEM) {
1890 const double radius(ilyRMax - 1 * mm - ilyFEMHeight() / 2.);
1891 const double phi(vecIlyFEMPhi()[ilyFEM]);
1892 const double yy(radius * sin(phi));
1893 const double xx(radius * cos(phi));
1894 ++femCopy;
1895 cpv.position(ilyFEMLog,
1896 xilyLog,
1897 femCopy,
1898 DDTranslation(xx, yy, vecIlyFEMZ()[ilyFEM] - ilyLength / 2),
1899 myrot(ilyFEMLog.name().name() + "_rot" + std::to_string(femCopy), CLHEP::HepRotationZ(phi)));
1900 #ifdef EDM_ML_DEBUG
1901 edm::LogVerbatim("EBGeomX")
1902 << ilyFEMLog.name() << ":" << femCopy << " positioned in " << xilyLog.name() << " at "
1903 << DDTranslation(xx, yy, vecIlyFEMZ()[ilyFEM] - ilyLength / 2) << " with rotation";
1904 #endif
1905 }
1906 }
1907 for (unsigned int iPipe(0); iPipe != vecIlyPipePhi().size(); ++iPipe) {
1908 const unsigned int type(static_cast<unsigned int>(round(vecIlyPipeType()[iPipe])));
1909
1910 const double zz(-ilyLength / 2 + vecIlyPipeZ()[iPipe] + (9 > type ? vecIlyPipeLength()[type] / 2. : 0));
1911
1912 for (unsigned int ly(0); ly != 2; ++ly) {
1913 const double radius(0 == ly ? ilyRMin + ilyPipeOD() / 2. + 1 * mm : ilyRMax - ilyPipeOD() / 2. - 1 * mm);
1914 const double phi(vecIlyPipePhi()[iPipe]);
1915 const double yy(radius * sin(phi));
1916 const double xx(radius * cos(phi));
1917 ++copyNum[type],
1918 cpv.position(
1919 ilyPipeLog[type],
1920 xilyLog,
1921 copyNum[type],
1922 DDTranslation(xx, yy, zz),
1923 (9 > type ? DDRotation()
1924 : myrot(ilyPipeLog[type].name().name() + "_rot" + std::to_string(copyNum[type]),
1925 Rota(Vec3(xx, yy, 0), 90 * deg))));
1926 #ifdef EDM_ML_DEBUG
1927 std::string rrr = (9 > type) ? " with no rotation" : " with rotation";
1928 edm::LogVerbatim("EBGeomX") << ilyPipeLog[type].name() << ":" << copyNum[type] << " positioned in "
1929 << xilyLog.name() << " at" << DDTranslation(xx, yy, zz) << rrr;
1930 #endif
1931 }
1932 }
1933 }
1934 }
1935 ilyRMin = ilyRMax;
1936 }
1937
1938
1939 const DDName clyrName(DDName("ECLYR"));
1940 std::vector<double> cri;
1941 std::vector<double> cro;
1942 std::vector<double> czz;
1943 czz.emplace_back(vecSpmZPts()[1]);
1944 cri.emplace_back(vecSpmRMin()[0]);
1945 cro.emplace_back(vecSpmRMin()[0] + 25 * mm);
1946 czz.emplace_back(vecSpmZPts()[2]);
1947 cri.emplace_back(vecSpmRMin()[2]);
1948 cro.emplace_back(vecSpmRMin()[2] + 10 * mm);
1949 const DDSolid clyrSolid(DDSolidFactory::polycone(clyrName, -9.5 * deg, 19 * deg, czz, cri, cro));
1950 #ifdef EDM_ML_DEBUG
1951 edm::LogVerbatim("EBGeom") << clyrName << " PolyCone from -9.5 to 9.5 with " << czz.size() << " points";
1952 for (unsigned int k = 0; k < czz.size(); ++k)
1953 edm::LogVerbatim("EBGeom") << "[" << k << "] " << czz[k] << ":" << cri[k] << ":" << cro[k];
1954 #endif
1955 const DDLogicalPart clyrLog(clyrName, ddmat(vecIlyMat()[4]), clyrSolid);
1956 cpv.position(clyrLog, spmLog, copyOne, DDTranslation(0, 0, 0), DDRotation());
1957 #ifdef EDM_ML_DEBUG
1958 edm::LogVerbatim("EBGeomX") << clyrLog.name() << ":" << copyOne << " positioned in " << spmLog.name() << " at "
1959 << DDTranslation(0, 0, 0) << " with no rotation";
1960 #endif
1961
1962
1963
1964
1965
1966
1967
1968 const double BNom1(vecNomCryDimCR()[0]);
1969 const double bNom1(vecNomCryDimCF()[0]);
1970
1971
1972 const double sWall1(wallThAlv());
1973 const double fWall1(wallFrAlv());
1974
1975 const double sWrap1(wrapThAlv());
1976 const double fWrap1(wrapFrAlv());
1977
1978 const double sClr1(clrThAlv());
1979 const double fClr1(clrFrAlv());
1980
1981 const double LNom1(nomCryDimLZ());
1982 const double beta1(atan((BNom1 - bNom1) / LNom1));
1983
1984 const double sinbeta1(sin(beta1));
1985
1986 const double tana_hawR((BNom1 - bNom1) / LNom1);
1987
1988 const double H_hawR(hawRHBIG());
1989 const double h_hawR(hawRhsml());
1990 const double a_hawR(bNom1 + sClr1 + 2 * sWrap1 + 2 * sWall1 - sinbeta1 * (fClr1 + fWrap1 + fWall1));
1991 const double B_hawR(a_hawR + H_hawR * tana_hawR);
1992 const double b_hawR(a_hawR + h_hawR * tana_hawR);
1993 const double L_hawR(vecSpmZPts()[2]);
1994
1995 const Trap trapHAWR(a_hawR / 2.,
1996 a_hawR / 2.,
1997 b_hawR / 2.,
1998 H_hawR / 2.,
1999 h_hawR / 2.,
2000 L_hawR / 2.,
2001 90 * deg,
2002 0,
2003 0
2004 );
2005
2006 const DDName hawRName1(ddname(hawRName().name() + "1"));
2007 const DDSolid hawRSolid1(mytrap(hawRName1.name(), trapHAWR));
2008 const DDLogicalPart hawRLog1(hawRName1, spmMat(), hawRSolid1);
2009
2010 const double al1_fawR(atan((B_hawR - a_hawR) / H_hawR) + M_PI_2);
2011
2012
2013 const Trap trapFAW(a_hawR,
2014 a_hawR,
2015 b_hawR,
2016 H_hawR / 2.,
2017 h_hawR / 2.,
2018 L_hawR / 2.,
2019 al1_fawR,
2020 0,
2021 0
2022 );
2023
2024 const DDName fawName1(ddname(fawName().name() + "1"));
2025 const DDSolid fawSolid1(mytrap(fawName1.name(), trapFAW));
2026 const DDLogicalPart fawLog1(fawName1, spmMat(), fawSolid1);
2027
2028 const Trap::VertexList vHAW(trapHAWR.vertexList());
2029 const Trap::VertexList vFAW(trapFAW.vertexList());
2030
2031 const double hawBoxClr(1 * mm);
2032
2033
2034 const DDName hawCutName(ddname(hawRName().name() + "CUTBOX"));
2035 const DDSolid hawCutBox(DDSolidFactory::box(hawCutName, b_hawR / 2 + hawBoxClr, hawRCutY() / 2, hawRCutZ() / 2));
2036 #ifdef EDM_ML_DEBUG
2037 edm::LogVerbatim("EBGeom") << hawCutName << " Box " << (b_hawR / 2 + hawBoxClr) << ":" << hawRCutY() / 2 << ":"
2038 << hawRCutZ() / 2;
2039 #endif
2040 const std::vector<double>& hawBoxParms(hawCutBox.parameters());
2041 const DDLogicalPart hawCutLog(hawCutName, spmMat(), hawCutBox);
2042
2043 const Pt3D b1(hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
2044 const Pt3D b2(-hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
2045 const Pt3D b3(-hawBoxParms[0], hawBoxParms[1], -hawBoxParms[2]);
2046
2047 const double zDel(sqrt(4 * hawBoxParms[2] * hawBoxParms[2] - (h_hawR - hawRCutDelY()) * (h_hawR - hawRCutDelY())));
2048
2049 const Tf3D hawCutForm(b1,
2050 b2,
2051 b3,
2052 vHAW[2] + Pt3D(hawBoxClr, -hawRCutDelY(), 0),
2053 vHAW[1] + Pt3D(-hawBoxClr, -hawRCutDelY(), 0),
2054 Pt3D(vHAW[0].x() - hawBoxClr, vHAW[0].y(), vHAW[0].z() - zDel));
2055
2056 const DDSolid hawRSolid(DDSolidFactory::subtraction(
2057 hawRName(),
2058 hawRSolid1,
2059 hawCutBox,
2060 DDTranslation(
2061 hawCutForm.getTranslation().x(), hawCutForm.getTranslation().y(), hawCutForm.getTranslation().z()),
2062 myrot(hawCutName.name() + "R", hawCutForm.getRotation())));
2063 #ifdef EDM_ML_DEBUG
2064 edm::LogVerbatim("EBGeom") << hawRName() << " Subtraction " << hawRSolid1.name() << ":" << hawCutBox.name()
2065 << " at "
2066 << DDTranslation(hawCutForm.getTranslation().x(),
2067 hawCutForm.getTranslation().y(),
2068 hawCutForm.getTranslation().z());
2069 #endif
2070 const DDLogicalPart hawRLog(hawRName(), spmMat(), hawRSolid);
2071
2072
2073 const DDName fawCutName(ddname(fawName().name() + "CUTBOX"));
2074 const DDSolid fawCutBox(DDSolidFactory::box(fawCutName, 2 * hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]));
2075 #ifdef EDM_ML_DEBUG
2076 edm::LogVerbatim("EBGeom") << fawCutName << " Box " << 2 * hawBoxParms[0] << ":" << hawBoxParms[1] << ":"
2077 << hawBoxParms[2];
2078 #endif
2079
2080 const std::vector<double>& fawBoxParms(fawCutBox.parameters());
2081 const DDLogicalPart fawCutLog(fawCutName, spmMat(), fawCutBox);
2082
2083 const Pt3D bb1(fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
2084 const Pt3D bb2(-fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
2085 const Pt3D bb3(-fawBoxParms[0], fawBoxParms[1], -fawBoxParms[2]);
2086
2087 const Tf3D fawCutForm(bb1,
2088 bb2,
2089 bb3,
2090 vFAW[2] + Pt3D(2 * hawBoxClr, -5 * mm, 0),
2091 vFAW[1] + Pt3D(-2 * hawBoxClr, -5 * mm, 0),
2092 Pt3D(vFAW[1].x() - 2 * hawBoxClr, vFAW[1].y() - trapFAW.h(), vFAW[1].z() - zDel));
2093
2094 const DDSolid fawSolid(DDSolidFactory::subtraction(
2095 fawName(),
2096 fawSolid1,
2097 fawCutBox,
2098 DDTranslation(
2099 fawCutForm.getTranslation().x(), fawCutForm.getTranslation().y(), fawCutForm.getTranslation().z()),
2100 myrot(fawCutName.name() + "R", fawCutForm.getRotation())));
2101 #ifdef EDM_ML_DEBUG
2102 edm::LogVerbatim("EBGeom") << fawName() << " Subtraction " << fawSolid1.name() << ":" << fawCutBox.name() << " at "
2103 << DDTranslation(fawCutForm.getTranslation().x(),
2104 fawCutForm.getTranslation().y(),
2105 fawCutForm.getTranslation().z());
2106 #endif
2107 const DDLogicalPart fawLog(fawName(), spmMat(), fawSolid);
2108
2109 const Tf3D hawRform(vHAW[3],
2110 vHAW[0],
2111 vHAW[1],
2112 vFAW[3],
2113 0.5 * (vFAW[0] + vFAW[3]),
2114 0.5 * (vFAW[1] + vFAW[2]));
2115 cpv.position(
2116 hawRLog,
2117 fawLog,
2118 copyOne,
2119 DDTranslation(hawRform.getTranslation().x(), hawRform.getTranslation().y(), hawRform.getTranslation().z()),
2120 myrot(hawRName().name() + "R", hawRform.getRotation()));
2121 #ifdef EDM_ML_DEBUG
2122 edm::LogVerbatim("EBGeomX") << hawRLog.name() << ":" << copyOne << " positioned in " << fawLog.name() << " at "
2123 << DDTranslation(hawRform.getTranslation().x(),
2124 hawRform.getTranslation().y(),
2125 hawRform.getTranslation().z())
2126 << " with rotation";
2127 #endif
2128 cpv.position(
2129 hawRLog,
2130 fawLog,
2131 copyTwo,
2132 DDTranslation(-hawRform.getTranslation().x(), -hawRform.getTranslation().y(), -hawRform.getTranslation().z()),
2133 myrot(hawRName().name() + "RotRefl",
2134 CLHEP::HepRotationY(180 * deg) *
2135 CLHEP::HepRep3x3(1, 0, 0, 0, 1, 0, 0, 0, -1)));
2136 #ifdef EDM_ML_DEBUG
2137 edm::LogVerbatim("EBGeomX") << hawRLog.name() << ":" << copyTwo << " positioned in " << fawLog.name() << " at "
2138 << DDTranslation(-hawRform.getTranslation().x(),
2139 -hawRform.getTranslation().y(),
2140 -hawRform.getTranslation().z())
2141 << " with rotation";
2142 #endif
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152 for (unsigned int iPhi(1); iPhi <= nFawPerSupm(); ++iPhi) {
2153 const double rPhi(fawPhiOff() + (iPhi - 0.5) * fawDelPhi());
2154
2155 const Tf3D fawform(RoZ3D(rPhi) * Tl3D(fawRadOff() + (trapFAW.H() + trapFAW.h()) / 4, 0, trapFAW.L() / 2) *
2156 RoZ3D(-90 * deg + fawPhiRot()));
2157 if (fawHere())
2158 cpv.position(
2159 fawLog,
2160 spmLog,
2161 iPhi,
2162 DDTranslation(fawform.getTranslation().x(), fawform.getTranslation().y(), fawform.getTranslation().z()),
2163 myrot(fawName().name() + "_Rot" + std::to_string(iPhi), fawform.getRotation()));
2164 #ifdef EDM_ML_DEBUG
2165 edm::LogVerbatim("EBGeomX") << fawLog.name() << ":" << iPhi << " positioned in " << spmLog.name() << " at "
2166 << DDTranslation(fawform.getTranslation().x(),
2167 fawform.getTranslation().y(),
2168 fawform.getTranslation().z())
2169 << " with rotation";
2170 #endif
2171 }
2172
2173
2174
2175
2176
2177 const double h_Grid(gridThick());
2178
2179 const Trap trapGrid((B_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR) / 2,
2180 (b_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR) / 2,
2181 b_hawR / 2.,
2182 h_Grid / 2.,
2183 h_Grid / 2.,
2184 (L_hawR - 8 * cm) / 2.,
2185 90 * deg,
2186 0,
2187 H_hawR - h_hawR
2188 );
2189
2190 const DDSolid gridSolid(mytrap(gridName().name(), trapGrid));
2191 const DDLogicalPart gridLog(gridName(), gridMat(), gridSolid);
2192
2193 const Trap::VertexList vGrid(trapGrid.vertexList());
2194
2195 const Tf3D gridForm(vGrid[4],
2196 vGrid[5],
2197 vGrid[6],
2198 vHAW[5] - Pt3D(0, h_Grid, 0),
2199 vHAW[5],
2200 vHAW[6]);
2201
2202 if (0 != gridHere())
2203 cpv.position(
2204 gridLog,
2205 hawRLog,
2206 copyOne,
2207 DDTranslation(gridForm.getTranslation().x(), gridForm.getTranslation().y(), gridForm.getTranslation().z()),
2208 myrot(gridName().name() + "R", gridForm.getRotation()));
2209 #ifdef EDM_ML_DEBUG
2210 edm::LogVerbatim("EBGeomX") << gridLog.name() << ":" << copyOne << " positioned in " << hawRLog.name() << " at "
2211 << DDTranslation(gridForm.getTranslation().x(),
2212 gridForm.getTranslation().y(),
2213 gridForm.getTranslation().z())
2214 << " with rotation";
2215 #endif
2216
2217
2218
2219
2220 const double aNom(nomCryDimAF());
2221 const double LNom(nomCryDimLZ());
2222
2223 const double AUnd(underAR());
2224 const double aUnd(underAF());
2225
2226 const double bUnd(underCF());
2227 const double HUnd(underBR());
2228 const double hUnd(underBF());
2229 const double LUnd(underLZ());
2230
2231 const double sWall(wallThAlv());
2232 const double sWrap(wrapThAlv());
2233 const double sClr(clrThAlv());
2234
2235 const double fWall(wallFrAlv());
2236 const double fWrap(wrapFrAlv());
2237 const double fClr(clrFrAlv());
2238
2239 const double rWall(wallReAlv());
2240 const double rWrap(wrapReAlv());
2241 const double rClr(clrReAlv());
2242
2243
2244 double theta(90 * deg);
2245 double zee(0 * mm);
2246 double side(0 * mm);
2247 double zeta(0 * deg);
2248
2249 for (unsigned int cryType(1); cryType <= nCryTypes(); ++cryType) {
2250 const std::string sType("_" + std::string(10 > cryType ? "0" : "") + std::to_string(cryType));
2251
2252 #ifdef EDM_ML_DEBUG
2253 edm::LogVerbatim("EcalGeom") << "Crytype=" << cryType;
2254 #endif
2255 const double ANom(vecNomCryDimAR()[cryType - 1]);
2256 const double BNom(vecNomCryDimCR()[cryType - 1]);
2257 const double bNom(vecNomCryDimCF()[cryType - 1]);
2258 const double HNom(vecNomCryDimBR()[cryType - 1]);
2259 const double hNom(vecNomCryDimBF()[cryType - 1]);
2260
2261 const double alfCry(90 * deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd)));
2262
2263 const Trap trapCry((ANom - AUnd) / 2.,
2264 (aNom - aUnd) / 2.,
2265 (bNom - bUnd) / 2.,
2266 (HNom - HUnd) / 2.,
2267 (hNom - hUnd) / 2.,
2268 (LNom - LUnd) / 2.,
2269 alfCry,
2270 aNom - aUnd - ANom + AUnd,
2271 hNom - hUnd - HNom + HUnd
2272 );
2273
2274 const DDName cryDDName(cryName() + sType);
2275 const DDSolid crySolid(mytrap(cryDDName.name(), trapCry));
2276 const DDLogicalPart cryLog(cryDDName, cryMat(), crySolid);
2277
2278
2279 const unsigned int copyCap(1);
2280
2281 const DDName capDDName(capName().name() + sType);
2282
2283 DDSolid capSolid(DDSolidFactory::box(capDDName, capXSize() / 2., capYSize() / 2., capThick() / 2.));
2284 #ifdef EDM_ML_DEBUG
2285 edm::LogVerbatim("EBGeom") << capDDName << " Box " << capXSize() / 2. << ":" << capYSize() / 2 << ":"
2286 << capThick() / 2;
2287 #endif
2288
2289 const DDLogicalPart capLog(capDDName, capMat(), capSolid);
2290
2291 const DDName sglDDName(sglName().name() + sType);
2292
2293 DDSolid sglSolid(DDSolidFactory::box(sglDDName, capXSize() / 2., capYSize() / 2., sglThick() / 2.));
2294 #ifdef EDM_ML_DEBUG
2295 edm::LogVerbatim("EBGeom") << sglDDName << " Box " << capXSize() / 2. << ":" << capYSize() / 2 << ":"
2296 << sglThick() / 2;
2297 #endif
2298
2299 const DDLogicalPart sglLog(sglDDName, sglMat(), sglSolid);
2300
2301 const unsigned int copySGL(1);
2302
2303 const DDName cerDDName(cerName().name() + sType);
2304
2305 DDSolid cerSolid(DDSolidFactory::box(cerDDName, cerXSize() / 2., cerYSize() / 2., cerThick() / 2.));
2306 #ifdef EDM_ML_DEBUG
2307 edm::LogVerbatim("EBGeom") << cerDDName << " Box " << cerXSize() / 2. << ":" << cerYSize() / 2 << ":"
2308 << cerThick() / 2;
2309 #endif
2310
2311 const DDLogicalPart cerLog(cerDDName, cerMat(), cerSolid);
2312
2313 unsigned int copyCER(0);
2314
2315 const DDName bsiDDName(bsiName().name() + sType);
2316
2317 DDSolid bsiSolid(DDSolidFactory::box(bsiDDName, bsiXSize() / 2., bsiYSize() / 2., bsiThick() / 2.));
2318 #ifdef EDM_ML_DEBUG
2319 edm::LogVerbatim("EBGeom") << bsiDDName << " Box " << bsiXSize() / 2. << ":" << bsiYSize() / 2 << ":"
2320 << bsiThick() / 2;
2321 #endif
2322
2323 const DDLogicalPart bsiLog(bsiDDName, bsiMat(), bsiSolid);
2324
2325 const unsigned int copyBSi(1);
2326
2327 const DDName atjDDName(atjName().name() + sType);
2328
2329 DDSolid atjSolid(DDSolidFactory::box(atjDDName, apdSide() / 2., apdSide() / 2., atjThick() / 2.));
2330 #ifdef EDM_ML_DEBUG
2331 edm::LogVerbatim("EBGeom") << atjDDName << " Box " << apdSide() / 2. << ":" << apdSide() / 2 << ":"
2332 << atjThick() / 2;
2333 #endif
2334
2335 const DDLogicalPart atjLog(atjDDName, atjMat(), atjSolid);
2336
2337 const unsigned int copyATJ(1);
2338
2339 const DDName aglDDName(aglName().name() + sType);
2340
2341 DDSolid aglSolid(DDSolidFactory::box(aglDDName, bsiXSize() / 2., bsiYSize() / 2., aglThick() / 2.));
2342 #ifdef EDM_ML_DEBUG
2343 edm::LogVerbatim("EBGeom") << aglDDName << " Box " << bsiXSize() / 2. << ":" << bsiYSize() / 2 << ":"
2344 << aglThick() / 2;
2345 #endif
2346
2347 const DDLogicalPart aglLog(aglDDName, aglMat(), aglSolid);
2348
2349 const unsigned int copyAGL(1);
2350
2351 const DDName andDDName(andName().name() + sType);
2352
2353 DDSolid andSolid(DDSolidFactory::box(andDDName, apdSide() / 2., apdSide() / 2., andThick() / 2.));
2354 #ifdef EDM_ML_DEBUG
2355 edm::LogVerbatim("EBGeom") << andDDName << " Box " << apdSide() / 2. << ":" << apdSide() / 2 << ":"
2356 << andThick() / 2;
2357 #endif
2358
2359 const DDLogicalPart andLog(andDDName, andMat(), andSolid);
2360
2361 const unsigned int copyAND(1);
2362
2363 const DDName apdDDName(apdName().name() + sType);
2364
2365 DDSolid apdSolid(DDSolidFactory::box(apdDDName, apdSide() / 2., apdSide() / 2., apdThick() / 2.));
2366 #ifdef EDM_ML_DEBUG
2367 edm::LogVerbatim("EBGeom") << apdDDName << " Box " << apdSide() / 2. << ":" << apdSide() / 2. << ":"
2368 << apdThick() / 2;
2369 #endif
2370
2371 const DDLogicalPart apdLog(apdDDName, apdMat(), apdSolid);
2372
2373 const unsigned int copyAPD(1);
2374
2375
2376 const double delta(atan((HNom - hNom) / LNom));
2377
2378 const double sindelta(sin(delta));
2379
2380 const double gamma(atan((ANom - aNom) / LNom));
2381
2382 const double singamma(sin(gamma));
2383
2384 const double beta(atan((BNom - bNom) / LNom));
2385
2386 const double sinbeta(sin(beta));
2387
2388
2389 const double alfClr(90 * deg + atan((bNom - aNom) / (hNom + sClr)));
2390
2391 const Trap trapClr((ANom + sClr + rClr * singamma) / 2.,
2392 (aNom + sClr - fClr * singamma) / 2.,
2393 (bNom + sClr - fClr * sinbeta) / 2.,
2394 (HNom + sClr + rClr * sindelta) / 2.,
2395 (hNom + sClr - fClr * sindelta) / 2.,
2396 (LNom + fClr + rClr) / 2.,
2397 alfClr,
2398 aNom - ANom,
2399 hNom - HNom
2400 );
2401
2402 const DDName clrDDName(clrName() + sType);
2403 const DDSolid clrSolid(mytrap(clrDDName.name(), trapClr));
2404 const DDLogicalPart clrLog(clrDDName, clrMat(), clrSolid);
2405
2406
2407
2408 const double alfWrap(90 * deg + atan((bNom - aNom) / (hNom + sClr + 2 * sWrap)));
2409
2410 const Trap trapWrap((trapClr.A() + 2 * sWrap + rWrap * singamma) / 2,
2411 (trapClr.a() + 2 * sWrap - fWrap * singamma) / 2,
2412 (trapClr.b() + 2 * sWrap - fWrap * sinbeta) / 2,
2413 (trapClr.H() + 2 * sWrap + rWrap * sindelta) / 2,
2414 (trapClr.h() + 2 * sWrap - fWrap * sindelta) / 2,
2415 (trapClr.L() + fWrap + rWrap) / 2.,
2416 alfWrap,
2417 aNom - ANom - (cryType > 9 ? 0 : 0.020 * mm),
2418 hNom - HNom
2419 );
2420
2421 const DDName wrapDDName(wrapName() + sType);
2422 const DDSolid wrapSolid(mytrap(wrapDDName.name(), trapWrap));
2423 const DDLogicalPart wrapLog(wrapDDName, wrapMat(), wrapSolid);
2424
2425
2426
2427 const double alfWall(90 * deg + atan((bNom - aNom) / (hNom + sClr + 2 * sWrap + 2 * sWall)));
2428
2429 const Trap trapWall((trapWrap.A() + 2 * sWall + rWall * singamma) / 2,
2430 (trapWrap.a() + 2 * sWall - fWall * singamma) / 2,
2431 (trapWrap.b() + 2 * sWall - fWall * sinbeta) / 2,
2432 (trapWrap.H() + 2 * sWall + rWall * sindelta) / 2,
2433 (trapWrap.h() + 2 * sWall - fWall * sindelta) / 2,
2434 (trapWrap.L() + fWall + rWall) / 2.,
2435 alfWall,
2436 aNom - ANom - (cryType < 10 ? 0.150 * mm : 0.100 * mm),
2437 hNom - HNom
2438 );
2439
2440 const DDName wallDDName(wallName() + sType);
2441 const DDSolid wallSolid(mytrap(wallDDName.name(), trapWall));
2442 const DDLogicalPart wallLog(wallDDName, wallMat(), wallSolid);
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488 const Vec3 cryToClr(0, 0, (rClr - fClr) / 2);
2489
2490 cpv.position(cryLog,
2491 clrLog,
2492 copyOne,
2493 DDTranslation(0, 0, (rClr - fClr) / 2),
2494 DDRotation());
2495 #ifdef EDM_ML_DEBUG
2496 edm::LogVerbatim("EBGeomX") << cryLog.name() << ":" << copyOne << " positioned in " << clrLog.name() << " at "
2497 << DDTranslation(0, 0, (rClr - fClr) / 2) << " with no rotation";
2498 #endif
2499 if (0 != capHere()) {
2500 cpv.position(aglLog, bsiLog, copyAGL, DDTranslation(0, 0, -aglThick() / 2. + bsiThick() / 2.), DDRotation());
2501 #ifdef EDM_ML_DEBUG
2502 edm::LogVerbatim("EBGeomX") << aglLog.name() << ":" << copyAGL << " positioned in " << bsiLog.name() << " at "
2503 << DDTranslation(0, 0, -aglThick() / 2. + bsiThick() / 2.) << " with no rotation";
2504 #endif
2505
2506 cpv.position(
2507 andLog, bsiLog, copyAND, DDTranslation(0, 0, -andThick() / 2. - aglThick() + bsiThick() / 2.), DDRotation());
2508 #ifdef EDM_ML_DEBUG
2509 edm::LogVerbatim("EBGeomX") << andLog.name() << ":" << copyAND << " positioned in " << bsiLog.name() << " at "
2510 << DDTranslation(0, 0, -andThick() / 2. - aglThick() + bsiThick() / 2.)
2511 << " with no rotation";
2512 #endif
2513 cpv.position(apdLog,
2514 bsiLog,
2515 copyAPD,
2516 DDTranslation(0, 0, -apdThick() / 2. - andThick() - aglThick() + bsiThick() / 2.),
2517 DDRotation());
2518 #ifdef EDM_ML_DEBUG
2519 edm::LogVerbatim("EBGeomX") << apdLog.name() << ":" << copyAPD << " positioned in " << bsiLog.name() << " at "
2520 << DDTranslation(0, 0, -apdThick() / 2. - andThick() - aglThick() + bsiThick() / 2.)
2521 << " with no rotation";
2522 #endif
2523 cpv.position(atjLog,
2524 bsiLog,
2525 copyATJ,
2526 DDTranslation(0, 0, -atjThick() / 2. - apdThick() - andThick() - aglThick() + bsiThick() / 2.),
2527 DDRotation());
2528 #ifdef EDM_ML_DEBUG
2529 edm::LogVerbatim("EBGeomX")
2530 << atjLog.name() << ":" << copyATJ << " positioned in " << bsiLog.name() << " at "
2531 << DDTranslation(0, 0, -atjThick() / 2. - apdThick() - andThick() - aglThick() + bsiThick() / 2.)
2532 << " with no rotation";
2533 #endif
2534 cpv.position(bsiLog, cerLog, copyBSi, DDTranslation(0, 0, -bsiThick() / 2. + cerThick() / 2.), DDRotation());
2535 #ifdef EDM_ML_DEBUG
2536 edm::LogVerbatim("EBGeomX") << bsiLog.name() << ":" << copyBSi << " positioned in " << cerLog.name() << " at "
2537 << DDTranslation(0, 0, -bsiThick() / 2. + cerThick() / 2.) << " with no rotation";
2538 #endif
2539 cpv.position(sglLog, capLog, copySGL, DDTranslation(0, 0, -sglThick() / 2. + capThick() / 2.), DDRotation());
2540 #ifdef EDM_ML_DEBUG
2541 edm::LogVerbatim("EBGeomX") << sglLog.name() << ":" << copySGL << " positioned in " << capLog.name() << " at "
2542 << DDTranslation(0, 0, -sglThick() / 2. + capThick() / 2.) << " with no rotation";
2543 #endif
2544 for (unsigned int ijkl(0); ijkl != 2; ++ijkl) {
2545 cpv.position(cerLog,
2546 capLog,
2547 ++copyCER,
2548 DDTranslation(trapCry.bl1() - (0 == ijkl ? apdX1() : apdX2()),
2549 trapCry.h1() - apdZ(),
2550 -sglThick() - cerThick() / 2. + capThick() / 2.),
2551 DDRotation());
2552 #ifdef EDM_ML_DEBUG
2553 edm::LogVerbatim("EBGeomX") << cerLog.name() << ":" << copyCER << " positioned in " << capLog.name() << " at "
2554 << DDTranslation(trapCry.bl1() - (0 == ijkl ? apdX1() : apdX2()),
2555 (trapCry.h1() - apdZ()),
2556 (-sglThick() - cerThick() / 2. + capThick() / 2.))
2557 << " with no rotation";
2558 #endif
2559 }
2560 cpv.position(capLog,
2561 clrLog,
2562 copyCap,
2563 DDTranslation(0, 0, -trapCry.dz() - capThick() / 2. + (rClr - fClr) / 2.),
2564 DDRotation());
2565 #ifdef EDM_ML_DEBUG
2566 edm::LogVerbatim("EBGeomX") << capLog.name() << ":" << copyCap << " positioned in " << clrLog.name() << " at "
2567 << DDTranslation(0, 0, -trapCry.dz() - capThick() / 2. + (rClr - fClr) / 2.)
2568 << " with no rotation";
2569 #endif
2570 }
2571
2572 const Vec3 clrToWrap(0, 0, (rWrap - fWrap) / 2);
2573
2574 cpv.position(clrLog,
2575 wrapLog,
2576 copyOne,
2577 DDTranslation(0, 0, (rWrap - fWrap) / 2),
2578 DDRotation());
2579 #ifdef EDM_ML_DEBUG
2580 edm::LogVerbatim("EBGeomX") << clrLog.name() << ":" << copyOne << " positioned in " << wrapLog.name() << " at "
2581 << DDTranslation(0, 0, (rWrap - fWrap) / 2) << " with no rotation";
2582 #endif
2583
2584
2585 const Vec3 wrapToWall1(0, 0, (rWall - fWall) / 2);
2586 const Vec3 wrapToWall(Vec3((cryType > 9 ? 0 : 0.005 * mm), 0, 0) + wrapToWall1);
2587
2588 cpv.position(wrapLog,
2589 wallLog,
2590 copyOne,
2591 DDTranslation(Vec3((cryType > 9 ? 0 : 0.005 * mm), 0, 0) + wrapToWall1),
2592 DDRotation());
2593 #ifdef EDM_ML_DEBUG
2594 edm::LogVerbatim("EBGeomX") << wrapLog.name() << ":" << copyOne << " positioned in " << wallLog.name() << " at "
2595 << DDTranslation(Vec3((cryType > 9 ? 0 : 0.005 * mm), 0, 0) + wrapToWall1)
2596 << " with no rotation";
2597 #endif
2598 const Trap::VertexList vWall(trapWall.vertexList());
2599 const Trap::VertexList vCry(trapCry.vertexList());
2600
2601 const double sidePrime((trapWall.a() - trapCry.a()) / 2);
2602 const double frontPrime(fWall + fWrap + fClr + LUnd / 2);
2603
2604
2605
2606 if (1 == cryType)
2607 {
2608 web(0,
2609 trapWall.b(),
2610 trapWall.B(),
2611 trapWall.L(),
2612 theta,
2613 vHAW[4] + Pt3D(0, hawYOffCry(), 0),
2614 hawRLog,
2615 zee,
2616 sidePrime,
2617 frontPrime,
2618 delta,
2619 cpv);
2620 zee += vecGapAlvEta()[0];
2621 }
2622
2623 for (unsigned int etaAlv(1); etaAlv <= nCryPerAlvEta(); ++etaAlv) {
2624 #ifdef EDM_ML_DEBUG
2625 edm::LogVerbatim("EcalGeom") << "theta=" << theta / deg << ", sidePrime=" << sidePrime
2626 << ", frontPrime=" << frontPrime << ", zeta=" << zeta << ", delta=" << delta
2627 << ", zee=" << zee;
2628 #endif
2629 zee += 0.075 * mm + (side * cos(zeta) + trapWall.h() - sidePrime) / sin(theta);
2630
2631 #ifdef EDM_ML_DEBUG
2632 edm::LogVerbatim("EcalGeom") << "New zee=" << zee;
2633 #endif
2634
2635
2636 const Pt3D trap2(vCry[2] + cryToClr + clrToWrap + wrapToWall);
2637
2638 const Pt3D trap3(trap2 + Pt3D(0, -trapCry.h(), 0));
2639 const Pt3D trap1(trap3 + Pt3D(-trapCry.a(), 0, 0));
2640
2641 const Pt3D wedge3(vHAW[4] + Pt3D(sidePrime, hawYOffCry(), zee));
2642 const Pt3D wedge2(wedge3 + Pt3D(0, trapCry.h() * cos(theta), -trapCry.h() * sin(theta)));
2643 const Pt3D wedge1(wedge3 + Pt3D(trapCry.a(), 0, 0));
2644
2645 const Tf3D tForm1(trap1, trap2, trap3, wedge1, wedge2, wedge3);
2646
2647 const double xx(0.050 * mm);
2648
2649 const Tf3D tForm(HepGeom::Translate3D(xx, 0, 0) * tForm1);
2650
2651 cpv.position(wallLog,
2652 hawRLog,
2653 etaAlv,
2654 DDTranslation(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()),
2655 myrot(wallLog.name().name() + "_" + std::to_string(etaAlv), tForm.getRotation()));
2656 #ifdef EDM_ML_DEBUG
2657 edm::LogVerbatim("EBGeomX") << wallLog.name() << ":" << etaAlv << " positioned in " << hawRLog.name() << " at "
2658 << DDTranslation(tForm.getTranslation().x(),
2659 tForm.getTranslation().y(),
2660 tForm.getTranslation().z())
2661 << " with rotation";
2662 #endif
2663 theta -= delta;
2664 side = sidePrime;
2665 zeta = delta;
2666 }
2667 if (5 == cryType || 9 == cryType || 13 == cryType || 17 == cryType)
2668 {
2669 const unsigned int webIndex(cryType / 4);
2670 zee += 0.5 * vecGapAlvEta()[cryType] / sin(theta);
2671 web(webIndex,
2672 trapWall.a(),
2673 trapWall.A(),
2674 trapWall.L(),
2675 theta,
2676 vHAW[4] + Pt3D(0, hawYOffCry(), 0),
2677 hawRLog,
2678 zee,
2679 sidePrime,
2680 frontPrime,
2681 delta,
2682 cpv);
2683 zee += 0.5 * vecGapAlvEta()[cryType] / sin(theta);
2684 } else {
2685 if (17 != cryType)
2686 zee += vecGapAlvEta()[cryType] / sin(theta);
2687 }
2688 }
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701 if (0 != backHere()) {
2702
2703
2704
2705
2706
2707
2708 const DDTranslation outtra(backXOff() + backSideHeight() / 2, backYOff(), backSideLength() / 2);
2709
2710 const double realBPthick(backPlateThick() + backPlate2Thick());
2711
2712 DDSolid backPlateSolid(
2713 DDSolidFactory::box(backPlateName(), backPlateWidth() / 2., realBPthick / 2., backPlateLength() / 2.));
2714 #ifdef EDM_ML_DEBUG
2715 edm::LogVerbatim("EBGeom") << backPlateName() << " Box " << backPlateWidth() / 2. << ":" << realBPthick / 2.
2716 << ":" << backPlateLength() / 2;
2717 #endif
2718 const std::vector<double>& backPlateParms(backPlateSolid.parameters());
2719 const DDLogicalPart backPlateLog(backPlateName(), backPlateMat(), backPlateSolid);
2720
2721 const DDTranslation backPlateTra(
2722 backSideHeight() / 2 + backPlateParms[1], 0 * mm, backPlateParms[2] - backSideLength() / 2);
2723
2724 DDSolid backPlate2Solid(
2725 DDSolidFactory::box(backPlate2Name(), backPlateWidth() / 2., backPlate2Thick() / 2., backPlateLength() / 2.));
2726 #ifdef EDM_ML_DEBUG
2727 edm::LogVerbatim("EBGeom") << backPlate2Name() << " Box " << backPlateWidth() / 2. << ":"
2728 << backPlate2Thick() / 2. << ":" << backPlateLength() / 2;
2729 #endif
2730
2731 const DDLogicalPart backPlate2Log(backPlate2Name(), backPlate2Mat(), backPlate2Solid);
2732
2733 const DDTranslation backPlate2Tra(0, -backPlateParms[1] + backPlate2Thick() / 2., 0);
2734 if (0 != backPlateHere()) {
2735 cpv.position(backPlate2Log, backPlateName(), copyOne, backPlate2Tra, DDRotation());
2736 #ifdef EDM_ML_DEBUG
2737 edm::LogVerbatim("EBGeomX") << backPlate2Log.name() << ":" << copyOne << " positioned in " << backPlateName()
2738 << " at " << backPlate2Tra << " with no rotation";
2739 #endif
2740 cpv.position(backPlateLog,
2741 spmName(),
2742 copyOne,
2743 outtra + backPlateTra,
2744 myrot(backPlateName().name() + "Rot5", CLHEP::HepRotationZ(270 * deg)));
2745 #ifdef EDM_ML_DEBUG
2746 edm::LogVerbatim("EBGeomX") << backPlateLog.name() << ":" << copyOne << " positioned in " << spmName() << " at "
2747 << (outtra + backPlateTra) << " with rotation";
2748 #endif
2749 }
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762 const Trap trapBS(backSideWidth() / 2.,
2763 backSideWidth() / 2.,
2764 backSideWidth() / 4.,
2765 backSideHeight() / 2.,
2766 backSideHeight() / 2.,
2767 backSideLength() / 2.,
2768 backSideAngle(),
2769 0,
2770 0
2771 );
2772
2773 const DDSolid backSideSolid(mytrap(backSideName().name(), trapBS));
2774 const DDLogicalPart backSideLog(backSideName(), backSideMat(), backSideSolid);
2775
2776 const DDTranslation backSideTra1(0 * mm, backPlateWidth() / 2 + backSideYOff1(), 1 * mm);
2777 if (0 != backSideHere()) {
2778 cpv.position(
2779 backSideLog,
2780 spmName(),
2781 copyOne,
2782 outtra + backSideTra1,
2783 myrot(backSideName().name() + "Rot8", CLHEP::HepRotationX(180 * deg) * CLHEP::HepRotationZ(90 * deg)));
2784 #ifdef EDM_ML_DEBUG
2785 edm::LogVerbatim("EBGeomX") << backSideLog.name() << ":" << copyOne << " positioned in " << spmName() << " at "
2786 << (outtra + backSideTra1) << " with rotation";
2787 #endif
2788 const DDTranslation backSideTra2(0 * mm, -backPlateWidth() / 2 + backSideYOff2(), 1 * mm);
2789 cpv.position(backSideLog,
2790 spmName(),
2791 copyTwo,
2792 outtra + backSideTra2,
2793 myrot(backSideName().name() + "Rot9", CLHEP::HepRotationZ(90 * deg)));
2794 #ifdef EDM_ML_DEBUG
2795 edm::LogVerbatim("EBGeomX") << backSideLog.name() << ":" << copyTwo << " positioned in " << spmName() << " at "
2796 << (outtra + backSideTra2) << " with rotation";
2797 #endif
2798 }
2799
2800
2801
2802
2803
2804
2805
2806 const double backCoolWidth(backCoolBarWidth() + 2. * backCoolTankWidth());
2807
2808
2809
2810
2811
2812
2813
2814 const double manifCut(2 * mm);
2815
2816 DDSolid mBManifSolid(DDSolidFactory::tubs(
2817 mBManifName(), backCoolWidth / 2. - manifCut, 0, mBManifOutDiam() / 2, 0 * deg, 360 * deg));
2818 #ifdef EDM_ML_DEBUG
2819 edm::LogVerbatim("EBGeom") << mBManifName() << " Tubs " << backCoolWidth / 2. - manifCut
2820 << ":0:" << mBManifOutDiam() / 2 << ":0:360";
2821 #endif
2822 const DDLogicalPart mBManifLog(mBManifName(), mBManifMat(), mBManifSolid);
2823
2824 const DDName mBManifWaName(ddname(mBManifName().name() + "Wa"));
2825 DDSolid mBManifWaSolid(DDSolidFactory::tubs(
2826 mBManifWaName, backCoolWidth / 2. - manifCut, 0, mBManifInnDiam() / 2, 0 * deg, 360 * deg));
2827 #ifdef EDM_ML_DEBUG
2828 edm::LogVerbatim("EBGeom") << mBManifWaName << " Tubs " << backCoolWidth / 2. - manifCut
2829 << ":0:" << mBManifInnDiam() / 2 << ":0:360";
2830 #endif
2831 const DDLogicalPart mBManifWaLog(mBManifWaName, backPipeWaterMat(), mBManifWaSolid);
2832 cpv.position(mBManifWaLog, mBManifName(), copyOne, DDTranslation(0, 0, 0), DDRotation());
2833 #ifdef EDM_ML_DEBUG
2834 edm::LogVerbatim("EBGeomX") << mBManifWaLog.name() << ":" << copyOne << " positioned in " << mBManifName()
2835 << " at " << DDTranslation(0, 0, 0) << " with no rotation";
2836 #endif
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849 const double deltaY(-5 * mm);
2850
2851 DDSolid grEdgeSlotSolid(
2852 DDSolidFactory::box(grEdgeSlotName(), grEdgeSlotHeight() / 2., grEdgeSlotWidth() / 2., grilleThick() / 2.));
2853 #ifdef EDM_ML_DEBUG
2854 edm::LogVerbatim("EBGeom") << grEdgeSlotName() << " Box " << grEdgeSlotHeight() / 2. << ":"
2855 << grEdgeSlotWidth() / 2 << ":" << grilleThick() / 2;
2856 #endif
2857 const DDLogicalPart grEdgeSlotLog(grEdgeSlotName(), grEdgeSlotMat(), grEdgeSlotSolid);
2858
2859 unsigned int edgeSlotCopy(0);
2860 unsigned int midSlotCopy(0);
2861
2862 DDLogicalPart grMidSlotLog[4];
2863
2864 for (unsigned int iGr(0); iGr != vecGrilleHeight().size(); ++iGr) {
2865 DDName gName(ddname(grilleName() + std::to_string(iGr)));
2866 DDSolid grilleSolid(
2867 DDSolidFactory::box(gName, vecGrilleHeight()[iGr] / 2., backCoolWidth / 2., grilleThick() / 2.));
2868 #ifdef EDM_ML_DEBUG
2869 edm::LogVerbatim("EBGeom") << gName << " Box " << vecGrilleHeight()[iGr] / 2. << ":" << backCoolWidth / 2 << ":"
2870 << grilleThick() / 2;
2871 #endif
2872 const DDLogicalPart grilleLog(gName, grilleMat(), grilleSolid);
2873
2874 const DDTranslation grilleTra(-realBPthick / 2 - vecGrilleHeight()[iGr] / 2,
2875 deltaY,
2876 vecGrilleZOff()[iGr] + grilleThick() / 2 - backSideLength() / 2);
2877 const DDTranslation gTra(outtra + backPlateTra + grilleTra);
2878
2879 if (0 != grMidSlotHere() && 0 != iGr) {
2880 if (0 == (iGr - 1) % 2) {
2881 DDName mName(ddname(grMidSlotName() + std::to_string(iGr / 2)));
2882 DDSolid grMidSlotSolid(DDSolidFactory::box(
2883 mName, vecGrMidSlotHeight()[(iGr - 1) / 2] / 2., grMidSlotWidth() / 2., grilleThick() / 2.));
2884 #ifdef EDM_ML_DEBUG
2885 edm::LogVerbatim("EBGeom") << mName << " Box " << vecGrMidSlotHeight()[(iGr - 1) / 2] / 2. << ":"
2886 << grMidSlotWidth() / 2 << ":" << grilleThick() / 2;
2887 #endif
2888 grMidSlotLog[(iGr - 1) / 2] = DDLogicalPart(mName, grMidSlotMat(), grMidSlotSolid);
2889 }
2890 cpv.position(grMidSlotLog[(iGr - 1) / 2],
2891 gName,
2892 ++midSlotCopy,
2893 DDTranslation(
2894 vecGrilleHeight()[iGr] / 2. - vecGrMidSlotHeight()[(iGr - 1) / 2] / 2., +grMidSlotXOff(), 0),
2895 DDRotation());
2896 #ifdef EDM_ML_DEBUG
2897 edm::LogVerbatim("EBGeomX") << grMidSlotLog[(iGr - 1) / 2].name() << ":" << midSlotCopy << " positioned in "
2898 << gName << " at "
2899 << DDTranslation(
2900 vecGrilleHeight()[iGr] / 2. - vecGrMidSlotHeight()[(iGr - 1) / 2] / 2.,
2901 +grMidSlotXOff(),
2902 0)
2903 << " with no rotation";
2904 #endif
2905
2906 cpv.position(grMidSlotLog[(iGr - 1) / 2],
2907 gName,
2908 ++midSlotCopy,
2909 DDTranslation(
2910 vecGrilleHeight()[iGr] / 2. - vecGrMidSlotHeight()[(iGr - 1) / 2] / 2., -grMidSlotXOff(), 0),
2911 DDRotation());
2912 #ifdef EDM_ML_DEBUG
2913 edm::LogVerbatim("EBGeomX") << grMidSlotLog[(iGr - 1) / 2].name() << ":" << midSlotCopy << " positioned in "
2914 << gName << " at "
2915 << DDTranslation(
2916 vecGrilleHeight()[iGr] / 2. - vecGrMidSlotHeight()[(iGr - 1) / 2] / 2.,
2917 -grMidSlotXOff(),
2918 0)
2919 << " with no rotation";
2920 #endif
2921 }
2922
2923 if (0 != grEdgeSlotHere() && 0 != iGr) {
2924 cpv.position(
2925 grEdgeSlotLog,
2926 gName,
2927 ++edgeSlotCopy,
2928 DDTranslation(
2929 vecGrilleHeight()[iGr] / 2. - grEdgeSlotHeight() / 2., backCoolWidth / 2 - grEdgeSlotWidth() / 2., 0),
2930 DDRotation());
2931 #ifdef EDM_ML_DEBUG
2932 edm::LogVerbatim("EBGeomX") << grEdgeSlotLog.name() << ":" << edgeSlotCopy << " positioned in " << gName
2933 << " at "
2934 << DDTranslation(vecGrilleHeight()[iGr] / 2. - grEdgeSlotHeight() / 2.,
2935 backCoolWidth / 2 - grEdgeSlotWidth() / 2.,
2936 0)
2937 << " with no rotation";
2938 #endif
2939 cpv.position(grEdgeSlotLog,
2940 gName,
2941 ++edgeSlotCopy,
2942 DDTranslation(vecGrilleHeight()[iGr] / 2. - grEdgeSlotHeight() / 2.,
2943 -backCoolWidth / 2 + grEdgeSlotWidth() / 2.,
2944 0),
2945 DDRotation());
2946 #ifdef EDM_ML_DEBUG
2947 edm::LogVerbatim("EBGeomX") << grEdgeSlotLog.name() << ":" << edgeSlotCopy << " positioned in " << gName
2948 << " at "
2949 << DDTranslation(vecGrilleHeight()[iGr] / 2. - grEdgeSlotHeight() / 2.,
2950 -backCoolWidth / 2 + grEdgeSlotWidth() / 2.,
2951 0)
2952 << " with no rotation";
2953 #endif
2954 }
2955 if (0 != grilleHere()) {
2956 cpv.position(grilleLog, spmName(), iGr, gTra, DDRotation());
2957 #ifdef EDM_ML_DEBUG
2958 edm::LogVerbatim("EBGeomX") << grilleLog.name() << ":" << iGr << " positioned in " << spmName() << " at "
2959 << gTra << " with no rotation";
2960 #endif
2961 }
2962 if ((0 != iGr % 2) && (0 != mBManifHere())) {
2963 cpv.position(mBManifLog,
2964 spmName(),
2965 iGr,
2966 gTra - DDTranslation(-mBManifOutDiam() / 2. + vecGrilleHeight()[iGr] / 2.,
2967 manifCut,
2968 grilleThick() / 2. + 3 * mBManifOutDiam() / 2.),
2969 myrot(mBManifName().name() + "R1", CLHEP::HepRotationX(90 * deg)));
2970 #ifdef EDM_ML_DEBUG
2971 edm::LogVerbatim("EBGeomX") << mBManifLog.name() << ":" << iGr << " positioned in " << spmName() << " at "
2972 << (gTra - DDTranslation(-mBManifOutDiam() / 2. + vecGrilleHeight()[iGr] / 2.,
2973 manifCut,
2974 grilleThick() / 2. + 3 * mBManifOutDiam() / 2.))
2975 << " with rotation";
2976 #endif
2977 cpv.position(mBManifLog,
2978 spmName(),
2979 iGr - 1,
2980 gTra - DDTranslation(-3 * mBManifOutDiam() / 2. + vecGrilleHeight()[iGr] / 2.,
2981 manifCut,
2982 grilleThick() / 2 + 3 * mBManifOutDiam() / 2.),
2983 myrot(mBManifName().name() + "R2", CLHEP::HepRotationX(90 * deg)));
2984 #ifdef EDM_ML_DEBUG
2985 edm::LogVerbatim("EBGeomX") << mBManifLog.name() << ":" << (iGr - 1) << " positioned in " << spmName()
2986 << " at "
2987 << (gTra - DDTranslation(-3 * mBManifOutDiam() / 2. + vecGrilleHeight()[iGr] / 2.,
2988 manifCut,
2989 grilleThick() / 2 + 3 * mBManifOutDiam() / 2.))
2990 << " with rotation";
2991 #endif
2992 }
2993 }
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007 DDSolid backCoolBarSolid(DDSolidFactory::box(
3008 backCoolBarName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., backCoolBarThick() / 2.));
3009 #ifdef EDM_ML_DEBUG
3010 edm::LogVerbatim("EBGeom") << backCoolBarName() << " Box " << backCoolBarHeight() / 2. << ":"
3011 << backCoolBarWidth() / 2 << ":" << backCoolBarThick() / 2;
3012 #endif
3013 const DDLogicalPart backCoolBarLog(backCoolBarName(), backCoolBarMat(), backCoolBarSolid);
3014
3015 DDSolid backCoolBarSSSolid(DDSolidFactory::box(
3016 backCoolBarSSName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., backCoolBarSSThick() / 2.));
3017 #ifdef EDM_ML_DEBUG
3018 edm::LogVerbatim("EBGeom") << backCoolBarSSName() << " Box " << backCoolBarHeight() / 2. << ":"
3019 << backCoolBarWidth() / 2. << ":" << backCoolBarSSThick() / 2.;
3020 #endif
3021 const DDLogicalPart backCoolBarSSLog(backCoolBarSSName(), backCoolBarSSMat(), backCoolBarSSSolid);
3022 const DDTranslation backCoolBarSSTra(0, 0, 0);
3023 cpv.position(backCoolBarSSLog, backCoolBarName(), copyOne, backCoolBarSSTra, DDRotation());
3024 #ifdef EDM_ML_DEBUG
3025 edm::LogVerbatim("EBGeomX") << backCoolBarSSLog.name() << ":" << copyOne << " positioned in " << backCoolBarName()
3026 << " at " << backCoolBarSSTra << " with no rotation";
3027 #endif
3028
3029 DDSolid backCoolBarWaSolid(DDSolidFactory::box(
3030 backCoolBarWaName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., backCoolBarWaThick() / 2.));
3031 #ifdef EDM_ML_DEBUG
3032 edm::LogVerbatim("EBGeom") << backCoolBarWaName() << " Box " << backCoolBarHeight() / 2. << ":"
3033 << backCoolBarWidth() / 2. << ":" << backCoolBarWaThick() / 2;
3034 #endif
3035 const DDLogicalPart backCoolBarWaLog(backCoolBarWaName(), backCoolBarWaMat(), backCoolBarWaSolid);
3036 const DDTranslation backCoolBarWaTra(0, 0, 0);
3037 cpv.position(backCoolBarWaLog, backCoolBarSSName(), copyOne, backCoolBarWaTra, DDRotation());
3038 #ifdef EDM_ML_DEBUG
3039 edm::LogVerbatim("EBGeomX") << backCoolBarWaLog.name() << ":" << copyOne << " positioned in "
3040 << backCoolBarSSName() << " at " << backCoolBarWaTra << " with no rotation";
3041 #endif
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055 double thickVFE(0);
3056 for (unsigned int iLyr(0); iLyr != vecBackVFELyrThick().size(); ++iLyr) {
3057 thickVFE += vecBackVFELyrThick()[iLyr];
3058 }
3059 DDSolid backVFESolid(
3060 DDSolidFactory::box(backVFEName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., thickVFE / 2.));
3061 #ifdef EDM_ML_DEBUG
3062 edm::LogVerbatim("EBGeom") << backVFEName() << " Box " << backCoolBarHeight() / 2. << ":"
3063 << backCoolBarWidth() / 2 << ":" << thickVFE / 2;
3064 #endif
3065 const DDLogicalPart backVFELog(backVFEName(), backVFEMat(), backVFESolid);
3066 DDTranslation offTra(0, 0, -thickVFE / 2);
3067 for (unsigned int iLyr(0); iLyr != vecBackVFELyrThick().size(); ++iLyr) {
3068 DDSolid backVFELyrSolid(DDSolidFactory::box(ddname(vecBackVFELyrName()[iLyr]),
3069 backCoolBarHeight() / 2.,
3070 backCoolBarWidth() / 2.,
3071 vecBackVFELyrThick()[iLyr] / 2.));
3072 #ifdef EDM_ML_DEBUG
3073 edm::LogVerbatim("EBGeom") << ddname(vecBackVFELyrName()[iLyr]) << " Box " << backCoolBarHeight() / 2. << ":"
3074 << backCoolBarWidth() / 2. << ":" << vecBackVFELyrThick()[iLyr] / 2;
3075 #endif
3076 const DDLogicalPart backVFELyrLog(
3077 ddname(vecBackVFELyrName()[iLyr]), ddmat(vecBackVFELyrMat()[iLyr]), backVFELyrSolid);
3078 const DDTranslation backVFELyrTra(0, 0, vecBackVFELyrThick()[iLyr] / 2);
3079 cpv.position(backVFELyrLog, backVFEName(), copyOne, backVFELyrTra + offTra, DDRotation());
3080 #ifdef EDM_ML_DEBUG
3081 edm::LogVerbatim("EBGeomX") << backVFELyrLog.name() << ":" << copyOne << " positioned in " << backVFEName()
3082 << " at " << (backVFELyrTra + offTra) << " with no rotation";
3083 #endif
3084 offTra += 2 * backVFELyrTra;
3085 }
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099 const double halfZCoolVFE(thickVFE + backCoolBarThick() / 2.);
3100 DDSolid backCoolVFESolid(
3101 DDSolidFactory::box(backCoolVFEName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., halfZCoolVFE));
3102 #ifdef EDM_ML_DEBUG
3103 edm::LogVerbatim("EBGeom") << backCoolVFEName() << " Box " << backCoolBarHeight() / 2. << ":"
3104 << backCoolBarWidth() / 2. << ":" << halfZCoolVFE;
3105 #endif
3106 const DDLogicalPart backCoolVFELog(backCoolVFEName(), backCoolVFEMat(), backCoolVFESolid);
3107 if (0 != backCoolBarHere()) {
3108 cpv.position(backCoolBarLog, backCoolVFEName(), copyOne, DDTranslation(), DDRotation());
3109 #ifdef EDM_ML_DEBUG
3110 edm::LogVerbatim("EBGeomX") << backCoolBarLog.name() << ":" << copyOne << " positioned in " << backCoolVFEName()
3111 << " at " << DDTranslation() << " with no rotation";
3112 #endif
3113 }
3114 if (0 != backCoolVFEHere()) {
3115 cpv.position(backVFELog,
3116 backCoolVFEName(),
3117 copyOne,
3118 DDTranslation(0, 0, backCoolBarThick() / 2. + thickVFE / 2.),
3119 DDRotation());
3120 #ifdef EDM_ML_DEBUG
3121 edm::LogVerbatim("EBGeomX") << backVFELog.name() << ":" << copyOne << " positioned in " << backCoolVFEName()
3122 << " at " << DDTranslation(0, 0, backCoolBarThick() / 2. + thickVFE / 2.)
3123 << " with no rotation";
3124 #endif
3125 }
3126 cpv.position(backVFELog,
3127 backCoolVFEName(),
3128 copyTwo,
3129 DDTranslation(0, 0, -backCoolBarThick() / 2. - thickVFE / 2.),
3130 myrot(backVFEName().name() + "Flip", CLHEP::HepRotationX(180 * deg)));
3131 #ifdef EDM_ML_DEBUG
3132 edm::LogVerbatim("EBGeomX") << backVFELog.name() << ":" << copyTwo << " positioned in " << backCoolVFEName()
3133 << " at " << DDTranslation(0, 0, -backCoolBarThick() / 2. - thickVFE / 2.)
3134 << " with rotation";
3135 #endif
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147 unsigned int iCVFECopy(1);
3148 unsigned int iSep(0);
3149 unsigned int iNSec(0);
3150 const unsigned int nMisc(vecBackMiscThick().size() / 4);
3151 for (unsigned int iMod(0); iMod != 4; ++iMod) {
3152 const double pipeLength(vecGrilleZOff()[2 * iMod + 1] - vecGrilleZOff()[2 * iMod] - grilleThick() - 3 * mm);
3153
3154 const double pipeZPos(vecGrilleZOff()[2 * iMod + 1] - pipeLength / 2 - 1.5 * mm);
3155
3156
3157
3158 double backCoolHeight(backCoolBarHeight() + mBCoolTubeOutDiam());
3159 for (unsigned int iMisc(0); iMisc != nMisc; ++iMisc) {
3160 backCoolHeight += vecBackMiscThick()[iMod * nMisc + iMisc];
3161 }
3162 double bottomThick(mBCoolTubeOutDiam());
3163 for (unsigned int iMB(0); iMB != vecMBLyrThick().size(); ++iMB) {
3164 backCoolHeight += vecMBLyrThick()[iMB];
3165 bottomThick += vecMBLyrThick()[iMB];
3166 }
3167
3168 DDName backCName(ddname(vecBackCoolName()[iMod]));
3169 const double halfZBCool((pipeLength - 2 * mBManifOutDiam() - grilleZSpace()) / 2);
3170 DDSolid backCoolSolid(DDSolidFactory::box(backCName, backCoolHeight / 2., backCoolWidth / 2., halfZBCool));
3171 #ifdef EDM_ML_DEBUG
3172 edm::LogVerbatim("EBGeom") << backCName << " Box " << backCoolHeight / 2. << ":" << backCoolWidth / 2. << ":"
3173 << halfZBCool;
3174 #endif
3175 const DDLogicalPart backCoolLog(backCName, spmMat(), backCoolSolid);
3176
3177 const DDTranslation bCoolTra(
3178 -realBPthick / 2 + backCoolHeight / 2 - vecGrilleHeight()[2 * iMod],
3179 deltaY,
3180 vecGrilleZOff()[2 * iMod] + grilleThick() + grilleZSpace() + halfZBCool - backSideLength() / 2);
3181 if (0 != backCoolHere()) {
3182 cpv.position(backCoolLog, spmName(), iMod + 1, outtra + backPlateTra + bCoolTra, DDRotation());
3183 #ifdef EDM_ML_DEBUG
3184 edm::LogVerbatim("EBGeomX") << backCoolLog.name() << ":" << (iMod + 1) << " positioned in " << spmName()
3185 << " at " << (outtra + backPlateTra + bCoolTra) << " with no rotation";
3186 #endif
3187 }
3188
3189 const double backCoolTankHeight(backCoolBarHeight());
3190
3191 const double halfZTank(halfZBCool - 5 * cm);
3192
3193 DDName bTankName(ddname(backCoolTankName() + std::to_string(iMod + 1)));
3194 DDSolid backCoolTankSolid(
3195 DDSolidFactory::box(bTankName, backCoolTankHeight / 2., backCoolTankWidth() / 2., halfZTank));
3196 #ifdef EDM_ML_DEBUG
3197 edm::LogVerbatim("EBGeom") << bTankName << " Box " << backCoolTankHeight / 2. << ":" << backCoolTankWidth() / 2.
3198 << ":" << halfZTank;
3199 #endif
3200 const DDLogicalPart backCoolTankLog(bTankName, backCoolTankMat(), backCoolTankSolid);
3201 if (0 != backCoolTankHere()) {
3202 cpv.position(backCoolTankLog,
3203 backCName,
3204 copyOne,
3205 DDTranslation(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick,
3206 backCoolBarWidth() / 2. + backCoolTankWidth() / 2.,
3207 0),
3208 DDRotation());
3209 #ifdef EDM_ML_DEBUG
3210 edm::LogVerbatim("EBGeomX") << backCoolTankLog.name() << ":" << copyOne << " positioned in " << backCName
3211 << " at "
3212 << DDTranslation(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick,
3213 backCoolBarWidth() / 2. + backCoolTankWidth() / 2.,
3214 0)
3215 << " with no rotation";
3216 #endif
3217 }
3218
3219 DDName bTankWaName(ddname(backCoolTankWaName() + std::to_string(iMod + 1)));
3220 DDSolid backCoolTankWaSolid(DDSolidFactory::box(bTankWaName,
3221 backCoolTankHeight / 2. - backCoolTankThick() / 2.,
3222 backCoolTankWaWidth() / 2.,
3223 halfZTank - backCoolTankThick() / 2.));
3224 #ifdef EDM_ML_DEBUG
3225 edm::LogVerbatim("EBGeom") << bTankWaName << " Box " << (backCoolTankHeight / 2. - backCoolTankThick() / 2.)
3226 << ":" << backCoolTankWaWidth() / 2. << ":"
3227 << (halfZTank - backCoolTankThick() / 2.);
3228 #endif
3229 const DDLogicalPart backCoolTankWaLog(bTankWaName, backCoolTankWaMat(), backCoolTankWaSolid);
3230 cpv.position(backCoolTankWaLog, bTankName, copyOne, DDTranslation(0, 0, 0), DDRotation());
3231 #ifdef EDM_ML_DEBUG
3232 edm::LogVerbatim("EBGeomX") << backCoolTankWaLog.name() << ":" << copyOne << " positioned in " << bTankName
3233 << " at " << DDTranslation(0, 0, 0) << " with no rotation";
3234 #endif
3235
3236 DDName bBracketName(ddname(backBracketName() + std::to_string(iMod + 1)));
3237 DDSolid backBracketSolid(
3238 DDSolidFactory::box(bBracketName, backBracketHeight() / 2., backCoolTankWidth() / 2., halfZTank));
3239 #ifdef EDM_ML_DEBUG
3240 edm::LogVerbatim("EBGeom") << bBracketName << " Box " << backBracketHeight() / 2. << ":"
3241 << backCoolTankWidth() / 2. << ":" << halfZTank;
3242 #endif
3243 const DDLogicalPart backBracketLog(bBracketName, backBracketMat(), backBracketSolid);
3244 if (0 != backCoolTankHere()) {
3245 cpv.position(backBracketLog,
3246 backCName,
3247 copyOne,
3248 DDTranslation(backCoolBarHeight() - backCoolHeight / 2. - backBracketHeight() / 2. + bottomThick,
3249 -backCoolBarWidth() / 2. - backCoolTankWidth() / 2.,
3250 0),
3251 DDRotation());
3252 #ifdef EDM_ML_DEBUG
3253 edm::LogVerbatim("EBGeomX") << backBracketLog.name() << ":" << copyOne << " positioned in " << backCName
3254 << " at "
3255 << DDTranslation(backCoolBarHeight() - backCoolHeight / 2. -
3256 backBracketHeight() / 2. + bottomThick,
3257 -backCoolBarWidth() / 2. - backCoolTankWidth() / 2.,
3258 0)
3259 << " with no rotation";
3260 #endif
3261 }
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272 DDTranslation bSumTra(backCoolBarHeight() - backCoolHeight / 2. + bottomThick, 0, 0);
3273 for (unsigned int j(0); j != nMisc; ++j)
3274 {
3275 const DDName bName(ddname(vecBackMiscName()[iMod * nMisc + j]));
3276
3277 DDSolid bSolid(DDSolidFactory::box(bName,
3278 vecBackMiscThick()[iMod * nMisc + j] / 2,
3279 backCoolBarWidth() / 2. + backCoolTankWidth(),
3280 halfZBCool));
3281 #ifdef EDM_ML_DEBUG
3282 edm::LogVerbatim("EBGeom") << bName << " Box " << vecBackMiscThick()[iMod * nMisc + j] / 2 << ":"
3283 << backCoolBarWidth() / 2. + backCoolTankWidth() << ":" << halfZBCool;
3284 #endif
3285
3286 const DDLogicalPart bLog(bName, ddmat(vecBackMiscMat()[iMod * nMisc + j]), bSolid);
3287
3288 const DDTranslation bTra(vecBackMiscThick()[iMod * nMisc + j] / 2, 0 * mm, 0 * mm);
3289
3290 if (0 != backMiscHere()) {
3291 cpv.position(bLog, backCName, copyOne, bSumTra + bTra, DDRotation());
3292 #ifdef EDM_ML_DEBUG
3293 edm::LogVerbatim("EBGeomX") << bLog.name() << ":" << copyOne << " positioned in " << backCName << " at "
3294 << (bSumTra + bTra) << " with no rotation";
3295 #endif
3296 }
3297 bSumTra += 2 * bTra;
3298 }
3299
3300 const double bHalfWidth(backCoolBarWidth() / 2. + backCoolTankWidth());
3301
3302 if (0 != mBLyrHere()) {
3303 DDTranslation mTra(-backCoolHeight / 2. + mBCoolTubeOutDiam(), 0, 0);
3304 for (unsigned int j(0); j != vecMBLyrThick().size(); ++j)
3305 {
3306 const DDName mName(ddname(vecMBLyrName()[j] + "_" + std::to_string(iMod + 1)));
3307
3308 DDSolid mSolid(DDSolidFactory::box(mName, vecMBLyrThick()[j] / 2, bHalfWidth, halfZBCool));
3309 #ifdef EDM_ML_DEBUG
3310 edm::LogVerbatim("EBGeom") << mName << " Box " << vecMBLyrThick()[j] / 2 << ":" << bHalfWidth << ":"
3311 << halfZBCool;
3312 #endif
3313
3314 const DDLogicalPart mLog(mName, ddmat(vecMBLyrMat()[j]), mSolid);
3315
3316 mTra += DDTranslation(vecMBLyrThick()[j] / 2.0, 0 * mm, 0 * mm);
3317 cpv.position(mLog, backCName, copyOne, mTra, DDRotation());
3318 #ifdef EDM_ML_DEBUG
3319 edm::LogVerbatim("EBGeomX") << mLog.name() << ":" << copyOne << " positioned in " << backCName << " at "
3320 << mTra << " with no rotation";
3321 #endif
3322 mTra += DDTranslation(vecMBLyrThick()[j] / 2.0, 0 * mm, 0 * mm);
3323 }
3324 }
3325
3326 if (0 != mBCoolTubeHere()) {
3327 const DDName mBName(ddname(mBCoolTubeName() + "_" + std::to_string(iMod + 1)));
3328
3329 DDSolid mBCoolTubeSolid(
3330 DDSolidFactory::tubs(mBName, halfZBCool, 0, mBCoolTubeOutDiam() / 2, 0 * deg, 360 * deg));
3331 #ifdef EDM_ML_DEBUG
3332 edm::LogVerbatim("EBGeom") << mBName << " Tubs " << halfZBCool << ":0:" << mBCoolTubeOutDiam() / 2
3333 << ":0:360";
3334 #endif
3335 const DDLogicalPart mBLog(mBName, mBCoolTubeMat(), mBCoolTubeSolid);
3336
3337 const DDName mBWaName(ddname(mBCoolTubeName() + "Wa_" + std::to_string(iMod + 1)));
3338 DDSolid mBCoolTubeWaSolid(
3339 DDSolidFactory::tubs(mBWaName, halfZBCool, 0, mBCoolTubeInnDiam() / 2, 0 * deg, 360 * deg));
3340 #ifdef EDM_ML_DEBUG
3341 edm::LogVerbatim("EBGeom") << mBWaName << " Tubs " << halfZBCool << ":0:" << mBCoolTubeInnDiam() / 2
3342 << ":0:360";
3343 #endif
3344 const DDLogicalPart mBWaLog(mBWaName, backPipeWaterMat(), mBCoolTubeWaSolid);
3345 cpv.position(mBWaLog, mBName, copyOne, DDTranslation(0, 0, 0), DDRotation());
3346 #ifdef EDM_ML_DEBUG
3347 edm::LogVerbatim("EBGeomX") << mBWaLog.name() << ":" << copyOne << " positioned in " << mBName << " at "
3348 << DDTranslation(0, 0, 0) << " with no rotation";
3349 #endif
3350 for (unsigned int j(0); j != mBCoolTubeNum(); ++j)
3351 {
3352 cpv.position(
3353 mBLog,
3354 backCName,
3355 2 * j + 1,
3356 DDTranslation(
3357 -backCoolHeight / 2.0 + mBCoolTubeOutDiam() / 2., -bHalfWidth + (j + 1) * bHalfWidth / 5, 0),
3358 DDRotation());
3359 #ifdef EDM_ML_DEBUG
3360 edm::LogVerbatim("EBGeomX") << mBLog.name() << ":" << (2 * j + 1) << " positioned in " << backCName
3361 << " at "
3362 << DDTranslation(-backCoolHeight / 2.0 + mBCoolTubeOutDiam() / 2.,
3363 -bHalfWidth + (j + 1) * bHalfWidth / 5,
3364 0)
3365 << " with no rotation";
3366 #endif
3367 }
3368 }
3369
3370
3371
3372
3373
3374
3375 if (0 != backPipeHere() && 0 != iMod) {
3376 DDName bPipeName(ddname(backPipeName() + "_" + std::to_string(iMod + 1)));
3377 DDName bInnerName(ddname(backPipeName() + "_H2O_" + std::to_string(iMod + 1)));
3378
3379 DDSolid backPipeSolid(
3380 DDSolidFactory::tubs(bPipeName, pipeLength / 2, 0 * mm, vecBackPipeDiam()[iMod] / 2, 0 * deg, 360 * deg));
3381 #ifdef EDM_ML_DEBUG
3382 edm::LogVerbatim("EBGeom") << bPipeName << " Tubs " << pipeLength / 2 << ":0:" << vecBackPipeDiam()[iMod] / 2
3383 << ":0:360";
3384 #endif
3385
3386 DDSolid backInnerSolid(DDSolidFactory::tubs(bInnerName,
3387 pipeLength / 2,
3388 0 * mm,
3389 vecBackPipeDiam()[iMod] / 2 - vecBackPipeThick()[iMod],
3390 0 * deg,
3391 360 * deg));
3392 #ifdef EDM_ML_DEBUG
3393 edm::LogVerbatim("EBGeom") << bInnerName << " Tubs " << pipeLength / 2
3394 << ":0:" << vecBackPipeDiam()[iMod] / 2 - vecBackPipeThick()[iMod] << ":0:360";
3395 #endif
3396
3397 const DDLogicalPart backPipeLog(bPipeName, backPipeMat(), backPipeSolid);
3398
3399 const DDLogicalPart backInnerLog(bInnerName, backPipeWaterMat(), backInnerSolid);
3400
3401 const DDTranslation bPipeTra1(
3402 backXOff() + backSideHeight() - 0.7 * vecBackPipeDiam()[iMod],
3403 backYOff() + backPlateWidth() / 2 - backSideWidth() - 0.7 * vecBackPipeDiam()[iMod],
3404 pipeZPos);
3405
3406 cpv.position(backPipeLog, spmName(), copyOne, bPipeTra1, DDRotation());
3407 #ifdef EDM_ML_DEBUG
3408 edm::LogVerbatim("EBGeomX") << backPipeLog.name() << ":" << copyOne << " positioned in " << spmName()
3409 << " at " << bPipeTra1 << " with no rotation";
3410 #endif
3411
3412 const DDTranslation bPipeTra2(bPipeTra1.x(),
3413 backYOff() - backPlateWidth() / 2 + backSideWidth() + vecBackPipeDiam()[iMod],
3414 bPipeTra1.z());
3415
3416 cpv.position(backPipeLog, spmName(), copyTwo, bPipeTra2, DDRotation());
3417 #ifdef EDM_ML_DEBUG
3418 edm::LogVerbatim("EBGeomX") << backPipeLog.name() << ":" << copyTwo << " positioned in " << spmName()
3419 << " at " << bPipeTra2 << " with no rotation";
3420 #endif
3421 cpv.position(backInnerLog, bPipeName, copyOne, DDTranslation(), DDRotation());
3422 #ifdef EDM_ML_DEBUG
3423 edm::LogVerbatim("EBGeomX") << backInnerLog.name() << ":" << copyOne << " positioned in " << bPipeName
3424 << " at " << DDTranslation() << " with no rotation";
3425 #endif
3426 }
3427
3428
3429
3430
3431
3432
3433
3434
3435 if (0 != dryAirTubeHere()) {
3436 DDName dryAirTubName(ddname(dryAirTubeName() + std::to_string(iMod + 1)));
3437
3438 DDSolid dryAirTubeSolid(DDSolidFactory::tubs(
3439 dryAirTubName, pipeLength / 2, dryAirTubeInnDiam() / 2, dryAirTubeOutDiam() / 2, 0 * deg, 360 * deg));
3440 #ifdef EDM_ML_DEBUG
3441 edm::LogVerbatim("EBGeom") << dryAirTubName << " Tubs " << pipeLength / 2 << ":" << dryAirTubeInnDiam() / 2
3442 << ":" << dryAirTubeOutDiam() / 2 << ":0:360";
3443 #endif
3444
3445 const DDLogicalPart dryAirTubeLog(dryAirTubName, dryAirTubeMat(), dryAirTubeSolid);
3446
3447 const DDTranslation dryAirTubeTra1(
3448 backXOff() + backSideHeight() - 0.7 * dryAirTubeOutDiam() - vecBackPipeDiam()[iMod],
3449 backYOff() + backPlateWidth() / 2 - backSideWidth() - 1.2 * dryAirTubeOutDiam(),
3450 pipeZPos);
3451
3452 cpv.position(dryAirTubeLog, spmName(), copyOne, dryAirTubeTra1, DDRotation());
3453 #ifdef EDM_ML_DEBUG
3454 edm::LogVerbatim("EBGeomX") << dryAirTubeLog.name() << ":" << copyOne << " positioned in " << spmName()
3455 << " at " << dryAirTubeTra1 << " with no rotation";
3456 #endif
3457
3458 const DDTranslation dryAirTubeTra2(
3459 dryAirTubeTra1.x(),
3460 backYOff() - backPlateWidth() / 2 + backSideWidth() + 0.7 * dryAirTubeOutDiam(),
3461 dryAirTubeTra1.z());
3462
3463 cpv.position(dryAirTubeLog, spmName(), copyTwo, dryAirTubeTra2, DDRotation());
3464 #ifdef EDM_ML_DEBUG
3465 edm::LogVerbatim("EBGeomX") << dryAirTubeLog.name() << ":" << copyTwo << " positioned in " << spmName()
3466 << " at " << dryAirTubeTra2 << " with no rotation";
3467 #endif
3468 }
3469
3470
3471
3472
3473
3474
3475
3476
3477 DDTranslation cTra(backCoolBarHeight() / 2. - backCoolHeight / 2. + bottomThick, 0, -halfZTank + halfZCoolVFE);
3478 const unsigned int numSec(static_cast<unsigned int>(vecBackCoolNSec()[iMod]));
3479 for (unsigned int jSec(0); jSec != numSec; ++jSec) {
3480 const unsigned int nMax(static_cast<unsigned int>(vecBackCoolNPerSec()[iNSec++]));
3481 for (unsigned int iBar(0); iBar != nMax; ++iBar) {
3482 cpv.position(backCoolVFELog, backCName, iCVFECopy++, cTra, DDRotation());
3483 #ifdef EDM_ML_DEBUG
3484 edm::LogVerbatim("EBGeomX") << backCoolVFELog.name() << ":" << iCVFECopy << " positioned in " << backCName
3485 << " at " << cTra << " with no rotation";
3486 #endif
3487 cTra += DDTranslation(0, 0, backCBStdSep());
3488 }
3489 cTra -= DDTranslation(0, 0, backCBStdSep());
3490 if (jSec != numSec - 1)
3491 cTra += DDTranslation(0, 0, vecBackCoolSecSep()[iSep++]);
3492 }
3493
3494
3495
3496
3497
3498 }
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512 double patchHeight(0);
3513 for (unsigned int iPatch(0); iPatch != vecPatchPanelThick().size(); ++iPatch) {
3514 patchHeight += vecPatchPanelThick()[iPatch];
3515 }
3516
3517 DDSolid patchSolid(DDSolidFactory::box(patchPanelName(),
3518 patchHeight / 2.,
3519 backCoolBarWidth() / 2.,
3520 (vecSpmZPts().back() - vecGrilleZOff().back() - grilleThick()) / 2));
3521 #ifdef EDM_ML_DEBUG
3522 edm::LogVerbatim("EBGeom") << patchPanelName() << " Box " << patchHeight / 2. << ":" << backCoolBarWidth() / 2.
3523 << ":" << (vecSpmZPts().back() - vecGrilleZOff().back() - grilleThick()) / 2;
3524 #endif
3525
3526 const std::vector<double>& patchParms(patchSolid.parameters());
3527
3528 const DDLogicalPart patchLog(patchPanelName(), spmMat(), patchSolid);
3529
3530 const DDTranslation patchTra(backXOff() + 4 * mm, 0 * mm, vecGrilleZOff().back() + grilleThick() + patchParms[2]);
3531 if (0 != patchPanelHere()) {
3532 cpv.position(patchLog, spmName(), copyOne, patchTra, DDRotation());
3533 #ifdef EDM_ML_DEBUG
3534 edm::LogVerbatim("EBGeomX") << patchLog.name() << ":" << copyOne << " positioned in " << spmName() << " at "
3535 << patchTra << " with no rotation";
3536 #endif
3537 }
3538 DDTranslation pTra(-patchParms[0], 0, 0);
3539
3540 for (unsigned int j(0); j != vecPatchPanelNames().size(); ++j) {
3541 const DDName pName(ddname(vecPatchPanelNames()[j]));
3542
3543 DDSolid pSolid(DDSolidFactory::box(pName, vecPatchPanelThick()[j] / 2., patchParms[1], patchParms[2]));
3544 #ifdef EDM_ML_DEBUG
3545 edm::LogVerbatim("EBGeom") << pName << " Box " << vecPatchPanelThick()[j] / 2. << ":" << patchParms[1] << ":"
3546 << patchParms[2];
3547 #endif
3548 const DDLogicalPart pLog(pName, ddmat(vecPatchPanelMat()[j]), pSolid);
3549
3550 pTra += DDTranslation(vecPatchPanelThick()[j] / 2, 0 * mm, 0 * mm);
3551
3552 cpv.position(pLog, patchPanelName(), copyOne, pTra, DDRotation());
3553 #ifdef EDM_ML_DEBUG
3554 edm::LogVerbatim("EBGeomX") << pLog.name() << ":" << copyOne << " positioned in " << patchPanelName() << " at "
3555 << pTra << " with no rotation";
3556 #endif
3557 pTra += DDTranslation(vecPatchPanelThick()[j] / 2, 0 * mm, 0 * mm);
3558 }
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571 if (0 != pincerRodHere()) {
3572
3573
3574 DDSolid rodSolid(
3575 DDSolidFactory::box(pincerRodName(), pincerEnvWidth() / 2., pincerEnvHeight() / 2., ilyLength / 2));
3576 #ifdef EDM_ML_DEBUG
3577 edm::LogVerbatim("EBGeom") << pincerRodName() << " Box " << pincerEnvWidth() / 2. << ":"
3578 << pincerEnvHeight() / 2. << ":" << ilyLength / 2;
3579 #endif
3580 const DDLogicalPart rodLog(pincerRodName(), pincerRodMat(), rodSolid);
3581
3582 DDSolid envSolid(
3583 DDSolidFactory::box(pincerEnvName(), pincerEnvWidth() / 2., pincerEnvHeight() / 2., pincerEnvLength() / 2));
3584 #ifdef EDM_ML_DEBUG
3585 edm::LogVerbatim("EBGeom") << pincerEnvName() << " Box " << pincerEnvWidth() / 2. << ":"
3586 << pincerEnvHeight() / 2. << ":" << pincerEnvLength() / 2;
3587 #endif
3588 const DDLogicalPart envLog(pincerEnvName(), pincerEnvMat(), envSolid);
3589 const std::vector<double>& envParms(envSolid.parameters());
3590
3591 DDSolid blkSolid(
3592 DDSolidFactory::box(pincerBlkName(), pincerEnvWidth() / 2., pincerEnvHeight() / 2., pincerBlkLength() / 2));
3593 #ifdef EDM_ML_DEBUG
3594 edm::LogVerbatim("EBGeom") << pincerBlkName() << " Box " << pincerEnvWidth() / 2. << ":"
3595 << pincerEnvHeight() / 2. << ":" << pincerBlkLength() / 2;
3596 #endif
3597 const DDLogicalPart blkLog(pincerBlkName(), pincerBlkMat(), blkSolid);
3598 const std::vector<double>& blkParms(blkSolid.parameters());
3599 cpv.position(blkLog,
3600 pincerEnvName(),
3601 copyOne,
3602 DDTranslation(0, 0, pincerEnvLength() / 2 - pincerBlkLength() / 2),
3603 DDRotation());
3604 #ifdef EDM_ML_DEBUG
3605 edm::LogVerbatim("EBGeomX") << blkLog.name() << ":" << copyOne << " positioned in " << pincerEnvName() << " at "
3606 << DDTranslation(0, 0, pincerEnvLength() / 2 - pincerBlkLength() / 2)
3607 << " with no rotation";
3608 #endif
3609
3610 DDSolid cutSolid(
3611 DDSolidFactory::box(pincerCutName(), pincerCutWidth() / 2., pincerCutHeight() / 2., pincerBlkLength() / 2));
3612 #ifdef EDM_ML_DEBUG
3613 edm::LogVerbatim("EBGeom") << pincerCutName() << " Box " << pincerCutWidth() / 2. << ":"
3614 << pincerCutHeight() / 2 << ":" << pincerBlkLength() / 2;
3615 #endif
3616 const DDLogicalPart cutLog(pincerCutName(), pincerCutMat(), cutSolid);
3617 const std::vector<double>& cutParms(cutSolid.parameters());
3618 cpv.position(
3619 cutLog,
3620 pincerBlkName(),
3621 copyOne,
3622 DDTranslation(
3623 +blkParms[0] - cutParms[0] - pincerShim1Width() + pincerShim2Width(), -blkParms[1] + cutParms[1], 0),
3624 DDRotation());
3625 #ifdef EDM_ML_DEBUG
3626 edm::LogVerbatim("EBGeomX") << cutLog.name() << ":" << copyOne << " positioned in " << pincerBlkName() << " at "
3627 << DDTranslation(
3628 blkParms[0] - cutParms[0] - pincerShim1Width() + pincerShim2Width(),
3629 -blkParms[1] + cutParms[1],
3630 0)
3631 << " with no rotation";
3632 #endif
3633
3634 DDSolid shim2Solid(DDSolidFactory::box(
3635 pincerShim2Name(), pincerShim2Width() / 2., pincerShimHeight() / 2., pincerBlkLength() / 2));
3636 #ifdef EDM_ML_DEBUG
3637 edm::LogVerbatim("EBGeom") << pincerShim2Name() << " Box " << pincerShim2Width() / 2. << ":"
3638 << pincerShimHeight() / 2. << ":" << pincerBlkLength() / 2;
3639 #endif
3640 const DDLogicalPart shim2Log(pincerShim2Name(), pincerShimMat(), shim2Solid);
3641 const std::vector<double>& shim2Parms(shim2Solid.parameters());
3642 cpv.position(shim2Log,
3643 pincerCutName(),
3644 copyOne,
3645 DDTranslation(+cutParms[0] - shim2Parms[0], -cutParms[1] + shim2Parms[1], 0),
3646 DDRotation());
3647 #ifdef EDM_ML_DEBUG
3648 edm::LogVerbatim("EBGeomX") << shim2Log.name() << ":" << copyOne << " positioned in " << pincerCutName()
3649 << " at "
3650 << DDTranslation(+cutParms[0] - shim2Parms[0], -cutParms[1] + shim2Parms[1], 0)
3651 << " with no rotation";
3652 #endif
3653
3654 DDSolid shim1Solid(DDSolidFactory::box(pincerShim1Name(),
3655 pincerShim1Width() / 2.,
3656 pincerShimHeight() / 2.,
3657 (pincerEnvLength() - pincerBlkLength()) / 2));
3658 #ifdef EDM_ML_DEBUG
3659 edm::LogVerbatim("EBGeom") << pincerShim1Name() << " Box " << pincerShim1Width() / 2. << ":"
3660 << pincerShimHeight() / 2. << ":" << (pincerEnvLength() - pincerBlkLength()) / 2;
3661 #endif
3662
3663 const DDLogicalPart shim1Log(pincerShim1Name(), pincerShimMat(), shim1Solid);
3664 const std::vector<double>& shim1Parms(shim1Solid.parameters());
3665 cpv.position(
3666 shim1Log,
3667 pincerEnvName(),
3668 copyOne,
3669 DDTranslation(+envParms[0] - shim1Parms[0], -envParms[1] + shim1Parms[1], -envParms[2] + shim1Parms[2]),
3670 DDRotation());
3671 #ifdef EDM_ML_DEBUG
3672 edm::LogVerbatim("EBGeomX") << shim1Log.name() << ":" << copyOne << " positioned in " << pincerEnvName()
3673 << " at "
3674 << DDTranslation(+envParms[0] - shim1Parms[0],
3675 -envParms[1] + shim1Parms[1],
3676 -envParms[2] + shim1Parms[2])
3677 << " with no rotation";
3678 #endif
3679 for (unsigned int iEnv(0); iEnv != vecPincerEnvZOff().size(); ++iEnv) {
3680 cpv.position(envLog,
3681 pincerRodName(),
3682 1 + iEnv,
3683 DDTranslation(0, 0, -ilyLength / 2. + vecPincerEnvZOff()[iEnv] - pincerEnvLength() / 2.),
3684 DDRotation());
3685 #ifdef EDM_ML_DEBUG
3686 edm::LogVerbatim("EBGeomX") << envLog.name() << ":" << (1 + iEnv) << " positioned in " << pincerRodName()
3687 << " at "
3688 << DDTranslation(
3689 0, 0, -ilyLength / 2. + vecPincerEnvZOff()[iEnv] - pincerEnvLength() / 2.)
3690 << " with no rotation";
3691 #endif
3692 }
3693
3694
3695
3696 const double radius(ilyRMin - pincerEnvHeight() / 2 - 1 * mm);
3697
3698 const DDName xilyName(ddname(ilyName() + std::to_string(vecIlyMat().size() - 1)));
3699
3700 for (unsigned int iRod(0); iRod != vecPincerRodAzimuth().size(); ++iRod) {
3701 const DDTranslation rodTra(
3702 radius * cos(vecPincerRodAzimuth()[iRod]), radius * sin(vecPincerRodAzimuth()[iRod]), 0);
3703
3704 cpv.position(rodLog,
3705 xilyName,
3706 1 + iRod,
3707 rodTra,
3708 myrot(pincerRodName().name() + std::to_string(iRod),
3709 CLHEP::HepRotationZ(90 * deg + vecPincerRodAzimuth()[iRod])));
3710 #ifdef EDM_ML_DEBUG
3711 edm::LogVerbatim("EBGeomX") << rodLog.name() << ":" << (1 + iRod) << " positioned in " << xilyName << " at "
3712 << rodTra << " with rotation";
3713 #endif
3714 }
3715 }
3716
3717
3718
3719
3720
3721 }
3722 }
3723
3724 #ifdef EDM_ML_DEBUG
3725 edm::LogVerbatim("EcalGeom") << "******** DDEcalBarrelAlgo test: end it...";
3726 #endif
3727 }
3728
3729
3730 DDRotation DDEcalBarrelNewAlgo::myrot(const std::string& s, const CLHEP::HepRotation& r) const {
3731 return DDrot(
3732 ddname(m_idNameSpace + ":" + s),
3733 std::make_unique<DDRotationMatrix>(r.xx(), r.xy(), r.xz(), r.yx(), r.yy(), r.yz(), r.zx(), r.zy(), r.zz()));
3734 }
3735
3736 DDMaterial DDEcalBarrelNewAlgo::ddmat(const std::string& s) const { return DDMaterial(ddname(s)); }
3737
3738 DDName DDEcalBarrelNewAlgo::ddname(const std::string& s) const {
3739 const pair<std::string, std::string> temp(DDSplit(s));
3740 if (temp.second.empty()) {
3741 return DDName(temp.first, m_idNameSpace);
3742 } else {
3743 return DDName(temp.first, temp.second);
3744 }
3745 }
3746
3747 DDSolid DDEcalBarrelNewAlgo::mytrap(const std::string& s, const EcalTrapezoidParameters& t) const {
3748 #ifdef EDM_ML_DEBUG
3749 edm::LogVerbatim("EBGeom") << DDName(s) << " Trap " << t.theta() / CLHEP::deg << ":" << t.phi() / CLHEP::deg << ":"
3750 << t.h1() << ":" << t.bl1() << ":" << t.tl1() << ":" << t.alp1() / CLHEP::deg << ":"
3751 << t.h2() << ":" << t.bl2() << ":" << t.tl2() << ":" << t.alp2() / CLHEP::deg;
3752 #endif
3753 return DDSolidFactory::trap(
3754 ddname(s), t.dz(), t.theta(), t.phi(), t.h1(), t.bl1(), t.tl1(), t.alp1(), t.h2(), t.bl2(), t.tl2(), t.alp2());
3755 }
3756
3757 void DDEcalBarrelNewAlgo::web(unsigned int iWeb,
3758 double bWeb,
3759 double BWeb,
3760 double LWeb,
3761 double theta,
3762 const HepGeom::Point3D<double>& corner,
3763 const DDLogicalPart& logPar,
3764 double& zee,
3765 double side,
3766 double front,
3767 double delta,
3768 DDCompactView& cpv) {
3769 const unsigned int copyOne(1);
3770
3771 const double LWebx(vecWebLength()[iWeb]);
3772
3773 const double BWebx(bWeb + (BWeb - bWeb) * LWebx / LWeb);
3774
3775 const double thick(vecWebPlTh()[iWeb] + vecWebClrTh()[iWeb]);
3776 const Trap trapWebClr(BWebx / 2,
3777 bWeb / 2,
3778 bWeb / 2,
3779 thick / 2,
3780 thick / 2,
3781 LWebx / 2,
3782 90 * deg,
3783 bWeb - BWebx,
3784 0
3785 );
3786 const DDName webClrDDName(webClrName() + std::to_string(iWeb));
3787 const DDSolid webClrSolid(mytrap(webClrDDName.name(), trapWebClr));
3788 const DDLogicalPart webClrLog(webClrDDName, webClrMat(), webClrSolid);
3789
3790 const Trap trapWebPl(trapWebClr.A() / 2,
3791 trapWebClr.a() / 2,
3792 trapWebClr.b() / 2,
3793 vecWebPlTh()[iWeb] / 2,
3794 vecWebPlTh()[iWeb] / 2,
3795 trapWebClr.L() / 2.,
3796 90 * deg,
3797 trapWebClr.b() - trapWebClr.B(),
3798 0
3799 );
3800 const DDName webPlDDName(webPlName() + std::to_string(iWeb));
3801 const DDSolid webPlSolid(mytrap(webPlDDName.fullname(), trapWebPl));
3802 const DDLogicalPart webPlLog(webPlDDName, webPlMat(), webPlSolid);
3803
3804 cpv.position(webPlLog,
3805 webClrDDName,
3806 copyOne,
3807 DDTranslation(0, 0, 0),
3808 DDRotation());
3809 #ifdef EDM_ML_DEBUG
3810 edm::LogVerbatim("EBGeomX") << webPlLog.name() << ":" << copyOne << " positioned in " << webClrDDName << " at "
3811 << DDTranslation(0, 0, 0) << " with no rotation";
3812 #endif
3813 const Trap::VertexList vWeb(trapWebClr.vertexList());
3814
3815 zee += trapWebClr.h() / sin(theta);
3816
3817 const double beta(theta + delta);
3818
3819 const double zWeb(zee - front * cos(beta) + side * sin(beta));
3820 const double yWeb(front * sin(beta) + side * cos(beta));
3821
3822 const Pt3D wedge3(corner + Pt3D(0, -yWeb, zWeb));
3823 const Pt3D wedge2(wedge3 + Pt3D(0, trapWebClr.h() * cos(theta), -trapWebClr.h() * sin(theta)));
3824 const Pt3D wedge1(wedge3 + Pt3D(trapWebClr.a(), 0, 0));
3825
3826 #ifdef EDM_ML_DEBUG
3827 edm::LogVerbatim("EcalGeom") << "trap1=" << vWeb[0] << ", trap2=" << vWeb[2] << ", trap3=" << vWeb[3];
3828
3829 edm::LogVerbatim("EcalGeom") << "wedge1=" << wedge1 << ", wedge2=" << wedge2 << ", wedge3=" << wedge3;
3830 #endif
3831 const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
3832
3833 if (0 != webHere()) {
3834 cpv.position(webClrLog,
3835 logPar,
3836 copyOne,
3837 DDTranslation(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()),
3838 myrot(webClrLog.name().name() + std::to_string(iWeb), tForm.getRotation()));
3839 #ifdef EDM_ML_DEBUG
3840 edm::LogVerbatim("EBGeomX") << webClrLog.name() << ":" << copyOne << " positioned in " << logPar.name() << " at "
3841 << DDTranslation(tForm.getTranslation().x(),
3842 tForm.getTranslation().y(),
3843 tForm.getTranslation().z())
3844 << " with rotation";
3845 #endif
3846 }
3847 }
3848
3849 #include "DetectorDescription/Core/interface/DDAlgorithmFactory.h"
3850
3851 DEFINE_EDM_PLUGIN(DDAlgorithmFactory, DDEcalBarrelNewAlgo, "ecal:DDEcalBarrelNewAlgo");