CMS 3D CMS Logo

DDEcalBarrelAlgo.cc
Go to the documentation of this file.
1 // File: DDEcalBarrelAlgo.cc
3 // Description: Geometry factory class for Ecal Barrel
5 
6 #include <cmath>
7 #include <algorithm>
8 
14 #include "CLHEP/Units/GlobalSystemOfUnits.h"
15 
16 #include <CLHEP/Geometry/Point3D.h>
17 #include <CLHEP/Geometry/Vector3D.h>
18 #include <CLHEP/Geometry/Transform3D.h>
19 #include <map>
20 #include <string>
21 #include <vector>
29 #include "CLHEP/Geometry/Transform3D.h"
30 
31 //#define EDM_ML_DEBUG
32 
33 class DDEcalBarrelAlgo : public DDAlgorithm {
34 public:
36  typedef HepGeom::Point3D<double> Pt3D;
37  typedef HepGeom::Transform3D Tf3D;
38  typedef HepGeom::ReflectZ3D RfZ3D;
39  typedef HepGeom::Translate3D Tl3D;
40  typedef HepGeom::Rotate3D Ro3D;
41  typedef HepGeom::RotateZ3D RoZ3D;
42  typedef HepGeom::RotateY3D RoY3D;
43  typedef HepGeom::RotateX3D RoX3D;
44 
45  typedef CLHEP::Hep3Vector Vec3;
46  typedef CLHEP::HepRotation Rota;
47 
48  //Constructor and Destructor
50  ~DDEcalBarrelAlgo() override;
51 
52  void initialize(const DDNumericArguments& nArgs,
53  const DDVectorArguments& vArgs,
54  const DDMapArguments& mArgs,
55  const DDStringArguments& sArgs,
56  const DDStringVectorArguments& vsArgs) override;
57  void execute(DDCompactView& cpv) override;
58 
59  DDMaterial ddmat(const std::string& s) const;
60  DDName ddname(const std::string& s) const;
61  DDRotation myrot(const std::string& s, const CLHEP::HepRotation& r) const;
62  DDSolid mytrap(const std::string& s, const Trap& t) const;
63 
64  const std::string& idNameSpace() const { return m_idNameSpace; }
65 
66  // barrel parent volume
67  DDName barName() const { return ddname(m_BarName); }
68  DDMaterial barMat() const { return ddmat(m_BarMat); }
69  const std::vector<double>& vecBarZPts() const { return m_vecBarZPts; }
70  const std::vector<double>& vecBarRMin() const { return m_vecBarRMin; }
71  const std::vector<double>& vecBarRMax() const { return m_vecBarRMax; }
72  const std::vector<double>& vecBarTran() const { return m_vecBarTran; }
73  const std::vector<double>& vecBarRota() const { return m_vecBarRota; }
74  const std::vector<double>& vecBarRota2() const { return m_vecBarRota2; }
75  const std::vector<double>& vecBarRota3() const { return m_vecBarRota3; }
76  double barPhiLo() const { return m_BarPhiLo; }
77  double barPhiHi() const { return m_BarPhiHi; }
78  double barHere() const { return m_BarHere; }
79 
80  DDName spmName() const { return ddname(m_SpmName); }
81  DDMaterial spmMat() const { return ddmat(m_SpmMat); }
82  const std::vector<double>& vecSpmZPts() const { return m_vecSpmZPts; }
83  const std::vector<double>& vecSpmRMin() const { return m_vecSpmRMin; }
84  const std::vector<double>& vecSpmRMax() const { return m_vecSpmRMax; }
85  const std::vector<double>& vecSpmTran() const { return m_vecSpmTran; }
86  const std::vector<double>& vecSpmRota() const { return m_vecSpmRota; }
87  const std::vector<double>& vecSpmBTran() const { return m_vecSpmBTran; }
88  const std::vector<double>& vecSpmBRota() const { return m_vecSpmBRota; }
89  unsigned int spmNPerHalf() const { return m_SpmNPerHalf; }
90  double spmLowPhi() const { return m_SpmLowPhi; }
91  double spmDelPhi() const { return m_SpmDelPhi; }
92  double spmPhiOff() const { return m_SpmPhiOff; }
93  const std::vector<double>& vecSpmHere() const { return m_vecSpmHere; }
94  DDName spmCutName() const { return ddname(m_SpmCutName); }
95  double spmCutThick() const { return m_SpmCutThick; }
96  int spmCutShow() const { return m_SpmCutShow; }
97  double spmCutRM() const { return m_SpmCutRM; }
98  double spmCutRP() const { return m_SpmCutRP; }
99  const std::vector<double>& vecSpmCutTM() const { return m_vecSpmCutTM; }
100  const std::vector<double>& vecSpmCutTP() const { return m_vecSpmCutTP; }
101  double spmExpThick() const { return m_SpmExpThick; }
102  double spmExpWide() const { return m_SpmExpWide; }
103  double spmExpYOff() const { return m_SpmExpYOff; }
104  DDName spmSideName() const { return ddname(m_SpmSideName); }
106  double spmSideHigh() const { return m_SpmSideHigh; }
107  double spmSideThick() const { return m_SpmSideThick; }
108  double spmSideYOffM() const { return m_SpmSideYOffM; }
109  double spmSideYOffP() const { return m_SpmSideYOffP; }
110 
111  double nomCryDimAF() const { return m_NomCryDimAF; }
112  double nomCryDimLZ() const { return m_NomCryDimLZ; }
113  const std::vector<double>& vecNomCryDimBF() const { return m_vecNomCryDimBF; }
114  const std::vector<double>& vecNomCryDimCF() const { return m_vecNomCryDimCF; }
115  const std::vector<double>& vecNomCryDimAR() const { return m_vecNomCryDimAR; }
116  const std::vector<double>& vecNomCryDimBR() const { return m_vecNomCryDimBR; }
117  const std::vector<double>& vecNomCryDimCR() const { return m_vecNomCryDimCR; }
118 
119  double underAF() const { return m_UnderAF; }
120  double underLZ() const { return m_UnderLZ; }
121  double underBF() const { return m_UnderBF; }
122  double underCF() const { return m_UnderCF; }
123  double underAR() const { return m_UnderAR; }
124  double underBR() const { return m_UnderBR; }
125  double underCR() const { return m_UnderCR; }
126 
127  double wallThAlv() const { return m_WallThAlv; }
128  double wrapThAlv() const { return m_WrapThAlv; }
129  double clrThAlv() const { return m_ClrThAlv; }
130  const std::vector<double>& vecGapAlvEta() const { return m_vecGapAlvEta; }
131 
132  double wallFrAlv() const { return m_WallFrAlv; }
133  double wrapFrAlv() const { return m_WrapFrAlv; }
134  double clrFrAlv() const { return m_ClrFrAlv; }
135 
136  double wallReAlv() const { return m_WallReAlv; }
137  double wrapReAlv() const { return m_WrapReAlv; }
138  double clrReAlv() const { return m_ClrReAlv; }
139 
140  unsigned int nCryTypes() const { return m_NCryTypes; }
141  unsigned int nCryPerAlvEta() const { return m_NCryPerAlvEta; }
142 
143  const std::string& cryName() const { return m_CryName; }
144  const std::string& clrName() const { return m_ClrName; }
145  const std::string& wrapName() const { return m_WrapName; }
146  const std::string& wallName() const { return m_WallName; }
147 
148  DDMaterial cryMat() const { return ddmat(m_CryMat); }
149  DDMaterial clrMat() const { return ddmat(m_ClrMat); }
150  DDMaterial wrapMat() const { return ddmat(m_WrapMat); }
151  DDMaterial wallMat() const { return ddmat(m_WallMat); }
152 
153  DDName apdName() const { return ddname(m_APDName); }
154  double apdHere() const { return m_APDHere; }
155  DDMaterial apdMat() const { return ddmat(m_APDMat); }
156  double apdSide() const { return m_APDSide; }
157  double apdThick() const { return m_APDThick; }
158  double apdZ() const { return m_APDZ; }
159  double apdX1() const { return m_APDX1; }
160  double apdX2() const { return m_APDX2; }
161 
162  double webHere() const { return m_WebHere; }
163  const std::string& webPlName() const { return m_WebPlName; }
164  const std::string& webClrName() const { return m_WebClrName; }
165  DDMaterial webPlMat() const { return ddmat(m_WebPlMat); }
166  DDMaterial webClrMat() const { return ddmat(m_WebClrMat); }
167  const std::vector<double>& vecWebPlTh() const { return m_vecWebPlTh; }
168  const std::vector<double>& vecWebClrTh() const { return m_vecWebClrTh; }
169  const std::vector<double>& vecWebLength() const { return m_vecWebLength; }
170 
171  double ilyHere() const { return m_IlyHere; }
172  const std::string& ilyName() const { return m_IlyName; }
173  double ilyPhiLow() const { return m_IlyPhiLow; }
174  double ilyDelPhi() const { return m_IlyDelPhi; }
175  const std::vector<std::string>& vecIlyMat() const { return m_vecIlyMat; }
176  const std::vector<double>& vecIlyThick() const { return m_vecIlyThick; }
177 
178  const std::string& ilyPipeName() const { return m_IlyPipeName; }
179  double ilyPipeHere() const { return m_IlyPipeHere; }
181  double ilyPipeOD() const { return m_IlyPipeOD; }
182  double ilyPipeID() const { return m_IlyPipeID; }
183  const std::vector<double>& vecIlyPipeLength() const { return m_vecIlyPipeLength; }
184  const std::vector<double>& vecIlyPipeType() const { return m_vecIlyPipeType; }
185  const std::vector<double>& vecIlyPipePhi() const { return m_vecIlyPipePhi; }
186  const std::vector<double>& vecIlyPipeZ() const { return m_vecIlyPipeZ; }
187 
188  DDName ilyPTMName() const { return ddname(m_IlyPTMName); }
189  double ilyPTMHere() const { return m_IlyPTMHere; }
190  DDMaterial ilyPTMMat() const { return ddmat(m_IlyPTMMat); }
191  double ilyPTMWidth() const { return m_IlyPTMWidth; }
192  double ilyPTMLength() const { return m_IlyPTMLength; }
193  double ilyPTMHeight() const { return m_IlyPTMHeight; }
194  const std::vector<double>& vecIlyPTMZ() const { return m_vecIlyPTMZ; }
195  const std::vector<double>& vecIlyPTMPhi() const { return m_vecIlyPTMPhi; }
196 
198  double ilyFanOutHere() const { return m_IlyFanOutHere; }
200  double ilyFanOutWidth() const { return m_IlyFanOutWidth; }
201  double ilyFanOutLength() const { return m_IlyFanOutLength; }
202  double ilyFanOutHeight() const { return m_IlyFanOutHeight; }
203  const std::vector<double>& vecIlyFanOutZ() const { return m_vecIlyFanOutZ; }
204  const std::vector<double>& vecIlyFanOutPhi() const { return m_vecIlyFanOutPhi; }
205  DDName ilyDiffName() const { return ddname(m_IlyDiffName); }
207  double ilyDiffOff() const { return m_IlyDiffOff; }
208  double ilyDiffLength() const { return m_IlyDiffLength; }
209  DDName ilyBndlName() const { return ddname(m_IlyBndlName); }
211  double ilyBndlOff() const { return m_IlyBndlOff; }
212  double ilyBndlLength() const { return m_IlyBndlLength; }
213  DDName ilyFEMName() const { return ddname(m_IlyFEMName); }
214  DDMaterial ilyFEMMat() const { return ddmat(m_IlyFEMMat); }
215  double ilyFEMWidth() const { return m_IlyFEMWidth; }
216  double ilyFEMLength() const { return m_IlyFEMLength; }
217  double ilyFEMHeight() const { return m_IlyFEMHeight; }
218  const std::vector<double>& vecIlyFEMZ() const { return m_vecIlyFEMZ; }
219  const std::vector<double>& vecIlyFEMPhi() const { return m_vecIlyFEMPhi; }
220 
221  DDName hawRName() const { return ddname(m_HawRName); }
222  DDName fawName() const { return ddname(m_FawName); }
223  double fawHere() const { return m_FawHere; }
224  double hawRHBIG() const { return m_HawRHBIG; }
225  double hawRhsml() const { return m_HawRhsml; }
226  double hawRCutY() const { return m_HawRCutY; }
227  double hawRCutZ() const { return m_HawRCutZ; }
228  double hawRCutDelY() const { return m_HawRCutDelY; }
229  double hawYOffCry() const { return m_HawYOffCry; }
230 
231  unsigned int nFawPerSupm() const { return m_NFawPerSupm; }
232  double fawPhiOff() const { return m_FawPhiOff; }
233  double fawDelPhi() const { return m_FawDelPhi; }
234  double fawPhiRot() const { return m_FawPhiRot; }
235  double fawRadOff() const { return m_FawRadOff; }
236 
237  double gridHere() const { return m_GridHere; }
238  DDName gridName() const { return ddname(m_GridName); }
239  DDMaterial gridMat() const { return ddmat(m_GridMat); }
240  double gridThick() const { return m_GridThick; }
241 
242  double backHere() const { return m_BackHere; }
243  double backXOff() const { return m_BackXOff; }
244  double backYOff() const { return m_BackYOff; }
246  double backSideHere() const { return m_BackSideHere; }
247  double backSideLength() const { return m_BackSideLength; }
248  double backSideHeight() const { return m_BackSideHeight; }
249  double backSideWidth() const { return m_BackSideWidth; }
250  double backSideYOff1() const { return m_BackSideYOff1; }
251  double backSideYOff2() const { return m_BackSideYOff2; }
252  double backSideAngle() const { return m_BackSideAngle; }
255  double backPlateHere() const { return m_BackPlateHere; }
256  double backPlateLength() const { return m_BackPlateLength; }
257  double backPlateThick() const { return m_BackPlateThick; }
258  double backPlateWidth() const { return m_BackPlateWidth; }
261  double backPlate2Thick() const { return m_BackPlate2Thick; }
263  const std::string& grilleName() const { return m_GrilleName; }
264  double grilleThick() const { return m_GrilleThick; }
265  double grilleHere() const { return m_GrilleHere; }
266  double grilleWidth() const { return m_GrilleWidth; }
267  double grilleZSpace() const { return m_GrilleZSpace; }
268  DDMaterial grilleMat() const { return ddmat(m_GrilleMat); }
269  const std::vector<double>& vecGrilleHeight() const { return m_vecGrilleHeight; }
270  const std::vector<double>& vecGrilleZOff() const { return m_vecGrilleZOff; }
271 
274  double grEdgeSlotHere() const { return m_GrEdgeSlotHere; }
275  double grEdgeSlotHeight() const { return m_GrEdgeSlotHeight; }
276  double grEdgeSlotWidth() const { return m_GrEdgeSlotWidth; }
277  const std::string& grMidSlotName() const { return m_GrMidSlotName; }
279  double grMidSlotHere() const { return m_GrMidSlotHere; }
280  double grMidSlotWidth() const { return m_GrMidSlotWidth; }
281  double grMidSlotXOff() const { return m_GrMidSlotXOff; }
282  const std::vector<double>& vecGrMidSlotHeight() const { return m_vecGrMidSlotHeight; }
283 
284  double backPipeHere() const { return m_BackPipeHere; }
285  const std::string& backPipeName() const { return m_BackPipeName; }
286  const std::vector<double>& vecBackPipeDiam() const { return m_vecBackPipeDiam; }
287  const std::vector<double>& vecBackPipeThick() const { return m_vecBackPipeThick; }
290  double backMiscHere() const { return m_BackMiscHere; }
291  const std::vector<double>& vecBackMiscThick() const { return m_vecBackMiscThick; }
292  const std::vector<std::string>& vecBackMiscName() const { return m_vecBackMiscName; }
293  const std::vector<std::string>& vecBackMiscMat() const { return m_vecBackMiscMat; }
294  double patchPanelHere() const { return m_PatchPanelHere; }
295  const std::vector<double>& vecPatchPanelThick() const { return m_vecPatchPanelThick; }
296  const std::vector<std::string>& vecPatchPanelNames() const { return m_vecPatchPanelNames; }
297  const std::vector<std::string>& vecPatchPanelMat() const { return m_vecPatchPanelMat; }
299 
300  const std::vector<std::string>& vecBackCoolName() const { return m_vecBackCoolName; }
301  double backCoolHere() const { return m_BackCoolHere; }
302  double backCoolBarWidth() const { return m_BackCoolBarWidth; }
303  double backCoolBarHeight() const { return m_BackCoolBarHeight; }
305  double backCoolBarHere() const { return m_BackCoolBarHere; }
307  double backCoolBarThick() const { return m_BackCoolBarThick; }
310  double backCoolBarSSThick() const { return m_BackCoolBarSSThick; }
313  double backCoolBarWaThick() const { return m_BackCoolBarWaThick; }
315  double backCoolVFEHere() const { return m_BackCoolVFEHere; }
318  DDName backVFEName() const { return ddname(m_BackVFEName); }
320  const std::vector<double>& vecBackVFELyrThick() const { return m_vecBackVFELyrThick; }
321  const std::vector<std::string>& vecBackVFELyrName() const { return m_vecBackVFELyrName; }
322  const std::vector<std::string>& vecBackVFELyrMat() const { return m_vecBackVFELyrMat; }
323  const std::vector<double>& vecBackCoolNSec() const { return m_vecBackCoolNSec; }
324  const std::vector<double>& vecBackCoolSecSep() const { return m_vecBackCoolSecSep; }
325  const std::vector<double>& vecBackCoolNPerSec() const { return m_vecBackCoolNPerSec; }
326  double backCBStdSep() const { return m_BackCBStdSep; }
327 
328  double backCoolTankHere() const { return m_BackCoolTankHere; }
330  double backCoolTankWidth() const { return m_BackCoolTankWidth; }
331  double backCoolTankThick() const { return m_BackCoolTankThick; }
334  double backCoolTankWaWidth() const { return m_BackCoolTankWaWidth; }
336  const std::string& backBracketName() const { return m_BackBracketName; }
337  double backBracketHeight() const { return m_BackBracketHeight; }
339 
340  double dryAirTubeHere() const { return m_DryAirTubeHere; }
341  const std::string& dryAirTubeName() const { return m_DryAirTubeName; }
342  double mBCoolTubeNum() const { return m_MBCoolTubeNum; }
343  double dryAirTubeInnDiam() const { return m_DryAirTubeInnDiam; }
344  double dryAirTubeOutDiam() const { return m_DryAirTubeOutDiam; }
346  double mBCoolTubeHere() const { return m_MBCoolTubeHere; }
347  const std::string& mBCoolTubeName() const { return m_MBCoolTubeName; }
348  double mBCoolTubeInnDiam() const { return m_MBCoolTubeInnDiam; }
349  double mBCoolTubeOutDiam() const { return m_MBCoolTubeOutDiam; }
351  double mBManifHere() const { return m_MBManifHere; }
352  DDName mBManifName() const { return ddname(m_MBManifName); }
353  double mBManifInnDiam() const { return m_MBManifInnDiam; }
354  double mBManifOutDiam() const { return m_MBManifOutDiam; }
356  double mBLyrHere() const { return m_MBLyrHere; }
357  const std::vector<double>& vecMBLyrThick() const { return m_vecMBLyrThick; }
358  const std::vector<std::string>& vecMBLyrName() const { return m_vecMBLyrName; }
359  const std::vector<std::string>& vecMBLyrMat() const { return m_vecMBLyrMat; }
360 
361  //----------
362 
363  double pincerRodHere() const { return m_PincerRodHere; }
366  std::vector<double> vecPincerRodAzimuth() const { return m_vecPincerRodAzimuth; }
369  double pincerEnvWidth() const { return m_PincerEnvWidth; }
370  double pincerEnvHeight() const { return m_PincerEnvHeight; }
371  double pincerEnvLength() const { return m_PincerEnvLength; }
372  std::vector<double> vecPincerEnvZOff() const { return m_vecPincerEnvZOff; }
373 
376  double pincerBlkLength() const { return m_PincerBlkLength; }
377 
379  double pincerShimHeight() const { return m_PincerShimHeight; }
382  double pincerShim1Width() const { return m_PincerShim1Width; }
383  double pincerShim2Width() const { return m_PincerShim2Width; }
384 
387  double pincerCutWidth() const { return m_PincerCutWidth; }
388  double pincerCutHeight() const { return m_PincerCutHeight; }
389 
390 protected:
391 private:
392  void web(unsigned int iWeb,
393  double bWeb,
394  double BWeb,
395  double LWeb,
396  double theta,
397  const Pt3D& corner,
398  const DDLogicalPart& logPar,
399  double& zee,
400  double side,
401  double front,
402  double delta,
403  DDCompactView& cpv);
404 
405  std::string m_idNameSpace; //Namespace of this and ALL sub-parts
406 
407  // Barrel volume
408  std::string m_BarName; // Barrel volume name
409  std::string m_BarMat; // Barrel material name
410  std::vector<double> m_vecBarZPts; // Barrel list of z pts
411  std::vector<double> m_vecBarRMin; // Barrel list of rMin pts
412  std::vector<double> m_vecBarRMax; // Barrel list of rMax pts
413  std::vector<double> m_vecBarTran; // Barrel translation
414  std::vector<double> m_vecBarRota; // Barrel rotation
415  std::vector<double> m_vecBarRota2; // 2nd Barrel rotation
416  std::vector<double> m_vecBarRota3; // 2nd Barrel rotation
417  double m_BarPhiLo; // Barrel phi lo
418  double m_BarPhiHi; // Barrel phi hi
419  double m_BarHere; // Barrel presence flag
420 
421  // Supermodule volume
422  std::string m_SpmName; // Supermodule volume name
423  std::string m_SpmMat; // Supermodule material name
424  std::vector<double> m_vecSpmZPts; // Supermodule list of z pts
425  std::vector<double> m_vecSpmRMin; // Supermodule list of rMin pts
426  std::vector<double> m_vecSpmRMax; // Supermodule list of rMax pts
427  std::vector<double> m_vecSpmTran; // Supermodule translation
428  std::vector<double> m_vecSpmRota; // Supermodule rotation
429  std::vector<double> m_vecSpmBTran; // Base Supermodule translation
430  std::vector<double> m_vecSpmBRota; // Base Supermodule rotation
431  unsigned int m_SpmNPerHalf; // # Supermodules per half detector
432  double m_SpmLowPhi; // Low phi value of base supermodule
433  double m_SpmDelPhi; // Delta phi value of base supermodule
434  double m_SpmPhiOff; // Phi offset value supermodule
435  std::vector<double> m_vecSpmHere; // Bit saying if a supermodule is present or not
436  std::string m_SpmCutName; // Name of cut box
437  double m_SpmCutThick; // Box thickness
438  int m_SpmCutShow; // Non-zero means show the box on display (testing only)
439  std::vector<double> m_vecSpmCutTM; // Translation for minus phi cut box
440  std::vector<double> m_vecSpmCutTP; // Translation for plus phi cut box
441  double m_SpmCutRM; // Rotation for minus phi cut box
442  double m_SpmCutRP; // Rotation for plus phi cut box
443  double m_SpmExpThick; // Thickness (x) of supermodule expansion box
444  double m_SpmExpWide; // Width (y) of supermodule expansion box
445  double m_SpmExpYOff; // Offset (y) of supermodule expansion box
446  std::string m_SpmSideName; // Supermodule Side Plate volume name
447  std::string m_SpmSideMat; // Supermodule Side Plate material name
448  double m_SpmSideHigh; // Side plate height
449  double m_SpmSideThick; // Side plate thickness
450  double m_SpmSideYOffM; // Side plate Y offset on minus phi side
451  double m_SpmSideYOffP; // Side plate Y offset on plus phi side
452 
453  double m_NomCryDimAF; // Nominal crystal AF
454  double m_NomCryDimLZ; // Nominal crystal LZ
455  std::vector<double> m_vecNomCryDimBF; // Nominal crystal BF
456  std::vector<double> m_vecNomCryDimCF; // Nominal crystal CF
457  std::vector<double> m_vecNomCryDimAR; // Nominal crystal AR
458  std::vector<double> m_vecNomCryDimBR; // Nominal crystal BR
459  std::vector<double> m_vecNomCryDimCR; // Nominal crystal CR
460 
461  double m_UnderAF; // undershoot of AF
462  double m_UnderLZ; // undershoot of LZ
463  double m_UnderBF; // undershoot of BF
464  double m_UnderCF; // undershoot of CF
465  double m_UnderAR; // undershoot of AR
466  double m_UnderBR; // undershoot of BR
467  double m_UnderCR; // undershoot of CR
468 
469  double m_WallThAlv; // alveoli wall thickness
470  double m_WrapThAlv; // wrapping thickness
471  double m_ClrThAlv; // clearance thickness (nominal)
472  std::vector<double> m_vecGapAlvEta; // Extra clearance after each alveoli perp to crystal axis
473 
474  double m_WallFrAlv; // alveoli wall frontage
475  double m_WrapFrAlv; // wrapping frontage
476  double m_ClrFrAlv; // clearance frontage (nominal)
477 
478  double m_WallReAlv; // alveoli wall rearage
479  double m_WrapReAlv; // wrapping rearage
480  double m_ClrReAlv; // clearance rearage (nominal)
481 
482  unsigned int m_NCryTypes; // number of crystal shapes
483  unsigned int m_NCryPerAlvEta; // number of crystals in eta per alveolus
484 
485  std::string m_CryName; // string name of crystal volume
486  std::string m_ClrName; // string name of clearance volume
487  std::string m_WrapName; // string name of wrap volume
488  std::string m_WallName; // string name of wall volume
489 
490  std::string m_CryMat; // string name of crystal material
491  std::string m_ClrMat; // string name of clearance material
492  std::string m_WrapMat; // string name of wrap material
493  std::string m_WallMat; // string name of wall material
494 
496  double m_APDHere; //
498  double m_APDSide; //
499  double m_APDThick; //
500  double m_APDZ; //
501  double m_APDX1; //
502  double m_APDX2; //
503 
504  double m_WebHere; // here flag
505  std::string m_WebPlName; // string name of web plate volume
506  std::string m_WebClrName; // string name of web clearance volume
507  std::string m_WebPlMat; // string name of web material
508  std::string m_WebClrMat; // string name of web clearance material
509  std::vector<double> m_vecWebPlTh; // Thickness of web plates
510  std::vector<double> m_vecWebClrTh; // Thickness of total web clearance
511  std::vector<double> m_vecWebLength; // Length of web plate
512 
513  double m_IlyHere; // here flag
514  std::string m_IlyName; // string name of inner layer volume
515  double m_IlyPhiLow; // low phi of volumes
516  double m_IlyDelPhi; // delta phi of ily
517  std::vector<std::string> m_vecIlyMat; // materials of inner layer volumes
518  std::vector<double> m_vecIlyThick; // Thicknesses of inner layer volumes
519 
520  std::string m_IlyPipeName; // Cooling pipes
521  double m_IlyPipeHere; //
523  double m_IlyPipeOD; //
524  double m_IlyPipeID; //
525  std::vector<double> m_vecIlyPipeLength; //
526  std::vector<double> m_vecIlyPipeType; //
527  std::vector<double> m_vecIlyPipePhi; //
528  std::vector<double> m_vecIlyPipeZ; //
529 
531  double m_IlyPTMHere; //
533  double m_IlyPTMWidth; //
534  double m_IlyPTMLength; //
535  double m_IlyPTMHeight; //
536  std::vector<double> m_vecIlyPTMZ; //
537  std::vector<double> m_vecIlyPTMPhi; //
538 
540  double m_IlyFanOutHere; //
542  double m_IlyFanOutWidth; //
543  double m_IlyFanOutLength; //
544  double m_IlyFanOutHeight; //
545  std::vector<double> m_vecIlyFanOutZ; //
546  std::vector<double> m_vecIlyFanOutPhi; //
549  double m_IlyDiffOff; //
550  double m_IlyDiffLength; //
551  std::string m_IlyBndlName; // Fiber bundle
553  double m_IlyBndlOff; //
554  double m_IlyBndlLength; //
557  double m_IlyFEMWidth; //
558  double m_IlyFEMLength; //
559  double m_IlyFEMHeight; //
560  std::vector<double> m_vecIlyFEMZ; //
561  std::vector<double> m_vecIlyFEMPhi; //
562 
563  std::string m_HawRName; // string name of half-alveolar wedge
564  std::string m_FawName; // string name of full-alveolar wedge
565  double m_FawHere; // here flag
566  double m_HawRHBIG; // height at big end of half alveolar wedge
567  double m_HawRhsml; // height at small end of half alveolar wedge
568  double m_HawRCutY; // x dim of hawR cut box
569  double m_HawRCutZ; // y dim of hawR cut box
570  double m_HawRCutDelY; // y offset of hawR cut box from top of HAW
571  double m_HawYOffCry; // Y offset of crystal wrt HAW at front
572  unsigned int m_NFawPerSupm; // Number of Full Alv. Wedges per supermodule
573  double m_FawPhiOff; // Phi offset for FAW placement
574  double m_FawDelPhi; // Phi delta for FAW placement
575  double m_FawPhiRot; // Phi rotation of FAW about own axis prior to placement
576  double m_FawRadOff; // Radial offset for FAW placement
577 
578  double m_GridHere; // here flag
579  std::string m_GridName; // Grid name
580  std::string m_GridMat; // Grid material
581  double m_GridThick; // Grid Thickness
582 
583  double m_BackXOff; //
584  double m_BackYOff; //
585 
586  double m_BackHere; // here flag
588  double m_BackSideHere; //
589  double m_BackSideLength; //
590  double m_BackSideHeight; //
591  double m_BackSideWidth; //
592  double m_BackSideYOff1; //
593  double m_BackSideYOff2; //
594  double m_BackSideAngle; //
597  double m_BackPlateHere; //
598  double m_BackPlateLength; //
599  double m_BackPlateThick; //
600  double m_BackPlateWidth; //
603  double m_BackPlate2Thick; //
606  double m_GrilleHere; //
607  double m_GrilleThick; //
608  double m_GrilleWidth; //
609  double m_GrilleZSpace; //
611  std::vector<double> m_vecGrilleHeight; //
612  std::vector<double> m_vecGrilleZOff; //
613 
614  std::string m_GrEdgeSlotName; // Slots in Grille
616  double m_GrEdgeSlotHere; //
618  double m_GrEdgeSlotWidth; //
619 
620  std::string m_GrMidSlotName; // Slots in Grille
622  double m_GrMidSlotHere; //
623  double m_GrMidSlotWidth; //
624  double m_GrMidSlotXOff; //
625  std::vector<double> m_vecGrMidSlotHeight; //
626 
627  double m_BackPipeHere; // here flag
629  std::vector<double> m_vecBackPipeDiam; // pipes
630  std::vector<double> m_vecBackPipeThick; // pipes
633 
634  std::vector<std::string> m_vecBackCoolName; // cooling circuits
635  double m_BackCoolHere; // here flag
636  double m_BackCoolBarHere; // here flag
643  std::string m_BackCoolBarSSName; // cooling bar tubing
646  std::string m_BackCoolBarWaName; // cooling bar water
649  double m_BackCoolVFEHere; // here flag
654  std::vector<double> m_vecBackVFELyrThick; //
655  std::vector<std::string> m_vecBackVFELyrName; //
656  std::vector<std::string> m_vecBackVFELyrMat; //
657  std::vector<double> m_vecBackCoolNSec; //
658  std::vector<double> m_vecBackCoolSecSep; //
659  std::vector<double> m_vecBackCoolNPerSec; //
660  double m_BackMiscHere; // here flag
661  std::vector<double> m_vecBackMiscThick; // misc materials
662  std::vector<std::string> m_vecBackMiscName; //
663  std::vector<std::string> m_vecBackMiscMat; //
664  double m_BackCBStdSep; //
665 
666  double m_PatchPanelHere; // here flag
668  std::vector<double> m_vecPatchPanelThick; // patch panel materials
669  std::vector<std::string> m_vecPatchPanelNames; //
670  std::vector<std::string> m_vecPatchPanelMat; //
671 
672  double m_BackCoolTankHere; // here flag
683 
684  double m_DryAirTubeHere; // here flag
685  std::string m_DryAirTubeName; // dry air tube
686  unsigned int m_MBCoolTubeNum; //
690  double m_MBCoolTubeHere; // here flag
691  std::string m_MBCoolTubeName; // mothr bd cooling tube
695  double m_MBManifHere; // here flag
696  std::string m_MBManifName; //mother bd manif
697  double m_MBManifInnDiam; //
698  double m_MBManifOutDiam; //
700  double m_MBLyrHere; // here flag
701  std::vector<double> m_vecMBLyrThick; // mother bd lyrs
702  std::vector<std::string> m_vecMBLyrName; //
703  std::vector<std::string> m_vecMBLyrMat; //
704 
705  //-------------------------------------------------------------------
706 
707  double m_PincerRodHere; // here flag
710  std::vector<double> m_vecPincerRodAzimuth; //
711 
712  std::string m_PincerEnvName; // pincer envelope
714  double m_PincerEnvWidth; //
715  double m_PincerEnvHeight; //
716  double m_PincerEnvLength; //
717  std::vector<double> m_vecPincerEnvZOff; //
718 
719  std::string m_PincerBlkName; // pincer block
721  double m_PincerBlkLength; //
722 
729 
730  std::string m_PincerCutName; // pincer block
732  double m_PincerCutWidth; //
733  double m_PincerCutHeight; //
734 };
735 
736 namespace std {}
737 using namespace std;
738 
740  : m_idNameSpace(""),
741  m_BarName(""),
742  m_BarMat(""),
743  m_vecBarZPts(),
744  m_vecBarRMin(),
745  m_vecBarRMax(),
746  m_vecBarTran(),
747  m_vecBarRota(),
748  m_vecBarRota2(),
749  m_vecBarRota3(),
750  m_BarPhiLo(0),
751  m_BarPhiHi(0),
752  m_BarHere(0),
753  m_SpmName(""),
754  m_SpmMat(""),
755  m_vecSpmZPts(),
756  m_vecSpmRMin(),
757  m_vecSpmRMax(),
758  m_vecSpmTran(),
759  m_vecSpmRota(),
760  m_vecSpmBTran(),
761  m_vecSpmBRota(),
762  m_SpmNPerHalf(0),
763  m_SpmLowPhi(0),
764  m_SpmDelPhi(0),
765  m_SpmPhiOff(0),
766  m_vecSpmHere(),
767  m_SpmCutName(""),
768  m_SpmCutThick(0),
769  m_SpmCutShow(0),
770  m_vecSpmCutTM(),
771  m_vecSpmCutTP(),
772  m_SpmCutRM(0),
773  m_SpmCutRP(0),
774  m_SpmExpThick(0),
775  m_SpmExpWide(0),
776  m_SpmExpYOff(0),
777  m_SpmSideName(""),
778  m_SpmSideMat(""),
779  m_SpmSideHigh(0),
780  m_SpmSideThick(0),
781  m_SpmSideYOffM(0),
782  m_SpmSideYOffP(0),
783  m_NomCryDimAF(0),
784  m_NomCryDimLZ(0),
785  m_vecNomCryDimBF(),
786  m_vecNomCryDimCF(),
787  m_vecNomCryDimAR(),
788  m_vecNomCryDimBR(),
789  m_vecNomCryDimCR(),
790  m_UnderAF(0),
791  m_UnderLZ(0),
792  m_UnderBF(0),
793  m_UnderCF(0),
794  m_UnderAR(0),
795  m_UnderBR(0),
796  m_UnderCR(0),
797  m_WallThAlv(0),
798  m_WrapThAlv(0),
799  m_ClrThAlv(0),
800  m_vecGapAlvEta(),
801  m_WallFrAlv(0),
802  m_WrapFrAlv(0),
803  m_ClrFrAlv(0),
804  m_WallReAlv(0),
805  m_WrapReAlv(0),
806  m_ClrReAlv(0),
807  m_NCryTypes(0),
808  m_NCryPerAlvEta(0),
809  m_CryName(""),
810  m_ClrName(""),
811  m_WrapName(""),
812  m_WallName(""),
813  m_CryMat(""),
814  m_ClrMat(""),
815  m_WrapMat(""),
816  m_WallMat(""),
817 
818  m_APDName(""),
819  m_APDHere(0),
820  m_APDMat(""),
821  m_APDSide(0),
822  m_APDThick(0),
823  m_APDZ(0),
824  m_APDX1(0),
825  m_APDX2(0),
826 
827  m_WebHere(0),
828  m_WebPlName(""),
829  m_WebClrName(""),
830  m_WebPlMat(""),
831  m_WebClrMat(""),
832  m_vecWebPlTh(),
833  m_vecWebClrTh(),
834  m_vecWebLength(),
835  m_IlyHere(0),
836  m_IlyName(),
837  m_IlyPhiLow(0),
838  m_IlyDelPhi(0),
839  m_vecIlyMat(),
840  m_vecIlyThick(),
841  m_IlyPipeName(""),
842  m_IlyPipeHere(0),
843  m_IlyPipeMat(""),
844  m_IlyPipeOD(0),
845  m_IlyPipeID(0),
846  m_vecIlyPipeLength(),
847  m_vecIlyPipeType(),
848  m_vecIlyPipePhi(),
849  m_vecIlyPipeZ(),
850  m_IlyPTMName(""),
851  m_IlyPTMHere(0),
852  m_IlyPTMMat(""),
853  m_IlyPTMWidth(0),
854  m_IlyPTMLength(0),
855  m_IlyPTMHeight(0),
856  m_vecIlyPTMZ(),
857  m_vecIlyPTMPhi(),
858  m_IlyFanOutName(""),
859  m_IlyFanOutHere(0),
860  m_IlyFanOutMat(""),
861  m_IlyFanOutWidth(0),
862  m_IlyFanOutLength(0),
863  m_IlyFanOutHeight(0),
864  m_vecIlyFanOutZ(),
865  m_vecIlyFanOutPhi(),
866  m_IlyDiffName(""),
867  m_IlyDiffMat(""),
868  m_IlyDiffOff(0),
869  m_IlyDiffLength(0),
870  m_IlyBndlName(""),
871  m_IlyBndlMat(""),
872  m_IlyBndlOff(0),
873  m_IlyBndlLength(0),
874  m_IlyFEMName(""),
875  m_IlyFEMMat(""),
876  m_IlyFEMWidth(0),
877  m_IlyFEMLength(0),
878  m_IlyFEMHeight(0),
879  m_vecIlyFEMZ(),
880  m_vecIlyFEMPhi(),
881  m_HawRName(""),
882  m_FawName(""),
883  m_FawHere(0),
884  m_HawRHBIG(0),
885  m_HawRhsml(0),
886  m_HawRCutY(0),
887  m_HawRCutZ(0),
888  m_HawRCutDelY(0),
889  m_HawYOffCry(0),
890  m_NFawPerSupm(0),
891  m_FawPhiOff(0),
892  m_FawDelPhi(0),
893  m_FawPhiRot(0),
894  m_FawRadOff(0),
895  m_GridHere(0),
896  m_GridName(""),
897  m_GridMat(""),
898  m_GridThick(0),
899  m_BackXOff(0),
900  m_BackYOff(0),
901  m_BackHere(0),
902  m_BackSideName(""),
903  m_BackSideHere(0),
904  m_BackSideLength(0),
905  m_BackSideHeight(0),
906  m_BackSideWidth(0),
907  m_BackSideYOff1(0),
908  m_BackSideYOff2(0),
909  m_BackSideAngle(0),
910  m_BackSideMat(""),
911  m_BackPlateName(""),
912  m_BackPlateHere(0),
913  m_BackPlateLength(0),
914  m_BackPlateThick(0),
915  m_BackPlateWidth(0),
916  m_BackPlateMat(""),
917  m_BackPlate2Name(""),
918  m_BackPlate2Thick(0),
919  m_BackPlate2Mat(""),
920  m_GrilleName(""),
921  m_GrilleHere(0),
922  m_GrilleThick(0),
923  m_GrilleWidth(0),
924  m_GrilleZSpace(0),
925  m_GrilleMat(""),
926  m_vecGrilleHeight(),
927  m_vecGrilleZOff(),
928  m_GrEdgeSlotName(""),
929  m_GrEdgeSlotMat(""),
930  m_GrEdgeSlotHere(0),
931  m_GrEdgeSlotHeight(0),
932  m_GrEdgeSlotWidth(0),
933  m_GrMidSlotName(""),
934  m_GrMidSlotMat(""),
935  m_GrMidSlotHere(0),
936  m_GrMidSlotWidth(0),
937  m_GrMidSlotXOff(0),
938  m_vecGrMidSlotHeight(),
939  m_BackPipeHere(0),
940  m_BackPipeName(""),
941  m_vecBackPipeDiam(),
942  m_vecBackPipeThick(),
943  m_BackPipeMat(""),
944  m_BackPipeWaterMat(""),
945 
946  m_vecBackCoolName(),
947  m_BackCoolHere(0),
948  m_BackCoolBarHere(0),
949  m_BackCoolBarWidth(0),
950  m_BackCoolBarHeight(0),
951  m_BackCoolMat(""),
952  m_BackCoolBarName(""),
953  m_BackCoolBarThick(0),
954  m_BackCoolBarMat(""),
955  m_BackCoolBarSSName(""),
956  m_BackCoolBarSSThick(0),
957  m_BackCoolBarSSMat(""),
958  m_BackCoolBarWaName(""),
959  m_BackCoolBarWaThick(0),
960  m_BackCoolBarWaMat(""),
961  m_BackCoolVFEHere(0),
962  m_BackCoolVFEName(""),
963  m_BackCoolVFEMat(""),
964  m_BackVFEName(""),
965  m_BackVFEMat(""),
966  m_vecBackVFELyrThick(),
967  m_vecBackVFELyrName(),
968  m_vecBackVFELyrMat(),
969  m_vecBackCoolNSec(),
970  m_vecBackCoolSecSep(),
971  m_vecBackCoolNPerSec(),
972 
973  m_BackMiscHere(0),
974  m_vecBackMiscThick(),
975  m_vecBackMiscName(),
976  m_vecBackMiscMat(),
977  m_BackCBStdSep(0),
978  m_PatchPanelHere(0),
979  m_PatchPanelName(""),
980  m_vecPatchPanelThick(),
981  m_vecPatchPanelNames(),
982  m_vecPatchPanelMat(),
983  m_BackCoolTankHere(0),
984  m_BackCoolTankName(""),
985  m_BackCoolTankWidth(0),
986  m_BackCoolTankThick(0),
987  m_BackCoolTankMat(""),
988  m_BackCoolTankWaName(""),
989  m_BackCoolTankWaWidth(0),
990  m_BackCoolTankWaMat(""),
991  m_BackBracketName(""),
992  m_BackBracketHeight(0),
993  m_BackBracketMat(""),
994 
995  m_DryAirTubeHere(0),
996  m_DryAirTubeName(""),
997  m_MBCoolTubeNum(0),
998  m_DryAirTubeInnDiam(0),
999  m_DryAirTubeOutDiam(0),
1000  m_DryAirTubeMat(""),
1001  m_MBCoolTubeHere(0),
1002  m_MBCoolTubeName(""),
1003  m_MBCoolTubeInnDiam(0),
1004  m_MBCoolTubeOutDiam(0),
1005  m_MBCoolTubeMat(""),
1006  m_MBManifHere(0),
1007  m_MBManifName(""),
1008  m_MBManifInnDiam(0),
1009  m_MBManifOutDiam(0),
1010  m_MBManifMat(""),
1011  m_MBLyrHere(0),
1012  m_vecMBLyrThick(0),
1013  m_vecMBLyrName(),
1014  m_vecMBLyrMat(),
1015 
1016  m_PincerRodHere(0),
1017  m_PincerRodName(""),
1018  m_PincerRodMat(""),
1019  m_vecPincerRodAzimuth(),
1020  m_PincerEnvName(""),
1021  m_PincerEnvMat(""),
1022  m_PincerEnvWidth(0),
1023  m_PincerEnvHeight(0),
1024  m_PincerEnvLength(0),
1025  m_vecPincerEnvZOff(),
1026  m_PincerBlkName(""),
1027  m_PincerBlkMat(""),
1028  m_PincerBlkLength(0),
1029  m_PincerShim1Name(""),
1030  m_PincerShimHeight(0),
1031  m_PincerShim2Name(""),
1032  m_PincerShimMat(""),
1033  m_PincerShim1Width(0),
1034  m_PincerShim2Width(0),
1035  m_PincerCutName(""),
1036  m_PincerCutMat(""),
1037  m_PincerCutWidth(0),
1038  m_PincerCutHeight(0)
1039 
1040 {
1041 #ifdef EDM_ML_DEBUG
1042  edm::LogVerbatim("EcalGeom") << "DDEcalBarrelAlgo info: Creating an instance";
1043 #endif
1044 }
1045 
1047 
1049  const DDVectorArguments& vArgs,
1050  const DDMapArguments& /*mArgs*/,
1051  const DDStringArguments& sArgs,
1052  const DDStringVectorArguments& vsArgs) {
1053 #ifdef EDM_ML_DEBUG
1054  edm::LogVerbatim("EcalGeom") << "DDEcalBarrelAlgo info: Initialize";
1055 #endif
1057  // TRICK!
1058  m_idNameSpace = parent().name().ns();
1059  // barrel parent volume
1060  m_BarName = sArgs["BarName"];
1061  m_BarMat = sArgs["BarMat"];
1062  m_vecBarZPts = vArgs["BarZPts"];
1063  m_vecBarRMin = vArgs["BarRMin"];
1064  m_vecBarRMax = vArgs["BarRMax"];
1065  m_vecBarTran = vArgs["BarTran"];
1066  m_vecBarRota = vArgs["BarRota"];
1067  m_vecBarRota2 = vArgs["BarRota2"];
1068  m_vecBarRota3 = vArgs["BarRota3"];
1069  m_BarPhiLo = nArgs["BarPhiLo"];
1070  m_BarPhiHi = nArgs["BarPhiHi"];
1071  m_BarHere = nArgs["BarHere"];
1072 
1073  m_SpmName = sArgs["SpmName"];
1074  m_SpmMat = sArgs["SpmMat"];
1075  m_vecSpmZPts = vArgs["SpmZPts"];
1076  m_vecSpmRMin = vArgs["SpmRMin"];
1077  m_vecSpmRMax = vArgs["SpmRMax"];
1078  m_vecSpmTran = vArgs["SpmTran"];
1079  m_vecSpmRota = vArgs["SpmRota"];
1080  m_vecSpmBTran = vArgs["SpmBTran"];
1081  m_vecSpmBRota = vArgs["SpmBRota"];
1082  m_SpmNPerHalf = static_cast<unsigned int>(nArgs["SpmNPerHalf"]);
1083  m_SpmLowPhi = nArgs["SpmLowPhi"];
1084  m_SpmDelPhi = nArgs["SpmDelPhi"];
1085  m_SpmPhiOff = nArgs["SpmPhiOff"];
1086  m_vecSpmHere = vArgs["SpmHere"];
1087  m_SpmCutName = sArgs["SpmCutName"];
1088  m_SpmCutThick = nArgs["SpmCutThick"];
1089  m_SpmCutShow = int(nArgs["SpmCutShow"]);
1090  m_vecSpmCutTM = vArgs["SpmCutTM"];
1091  m_vecSpmCutTP = vArgs["SpmCutTP"];
1092  m_SpmCutRM = nArgs["SpmCutRM"];
1093  m_SpmCutRP = nArgs["SpmCutRP"];
1094  m_SpmExpThick = nArgs["SpmExpThick"];
1095  m_SpmExpWide = nArgs["SpmExpWide"];
1096  m_SpmExpYOff = nArgs["SpmExpYOff"];
1097  m_SpmSideName = sArgs["SpmSideName"];
1098  m_SpmSideMat = sArgs["SpmSideMat"];
1099  m_SpmSideHigh = nArgs["SpmSideHigh"];
1100  m_SpmSideThick = nArgs["SpmSideThick"];
1101  m_SpmSideYOffM = nArgs["SpmSideYOffM"];
1102  m_SpmSideYOffP = nArgs["SpmSideYOffP"];
1103 
1104  m_NomCryDimAF = nArgs["NomCryDimAF"];
1105  m_NomCryDimLZ = nArgs["NomCryDimLZ"];
1106  m_vecNomCryDimBF = vArgs["NomCryDimBF"];
1107  m_vecNomCryDimCF = vArgs["NomCryDimCF"];
1108  m_vecNomCryDimAR = vArgs["NomCryDimAR"];
1109  m_vecNomCryDimBR = vArgs["NomCryDimBR"];
1110  m_vecNomCryDimCR = vArgs["NomCryDimCR"];
1111 
1112  m_UnderAF = nArgs["UnderAF"];
1113  m_UnderLZ = nArgs["UnderLZ"];
1114  m_UnderBF = nArgs["UnderBF"];
1115  m_UnderCF = nArgs["UnderCF"];
1116  m_UnderAR = nArgs["UnderAR"];
1117  m_UnderBR = nArgs["UnderBR"];
1118  m_UnderCR = nArgs["UnderCR"];
1119 
1120  m_WallThAlv = nArgs["WallThAlv"];
1121  m_WrapThAlv = nArgs["WrapThAlv"];
1122  m_ClrThAlv = nArgs["ClrThAlv"];
1123  m_vecGapAlvEta = vArgs["GapAlvEta"];
1124 
1125  m_WallFrAlv = nArgs["WallFrAlv"];
1126  m_WrapFrAlv = nArgs["WrapFrAlv"];
1127  m_ClrFrAlv = nArgs["ClrFrAlv"];
1128 
1129  m_WallReAlv = nArgs["WallReAlv"];
1130  m_WrapReAlv = nArgs["WrapReAlv"];
1131  m_ClrReAlv = nArgs["ClrReAlv"];
1132 
1133  m_NCryTypes = static_cast<unsigned int>(nArgs["NCryTypes"]);
1134  m_NCryPerAlvEta = static_cast<unsigned int>(nArgs["NCryPerAlvEta"]);
1135 
1136  m_CryName = sArgs["CryName"];
1137  m_ClrName = sArgs["ClrName"];
1138  m_WrapName = sArgs["WrapName"];
1139  m_WallName = sArgs["WallName"];
1140 
1141  m_CryMat = sArgs["CryMat"];
1142  m_ClrMat = sArgs["ClrMat"];
1143  m_WrapMat = sArgs["WrapMat"];
1144  m_WallMat = sArgs["WallMat"];
1145 
1146  m_APDName = sArgs["APDName"];
1147  m_APDHere = nArgs["APDHere"];
1148  m_APDMat = sArgs["APDMat"];
1149  m_APDSide = nArgs["APDSide"];
1150  m_APDThick = nArgs["APDThick"];
1151  m_APDZ = nArgs["APDZ"];
1152  m_APDX1 = nArgs["APDX1"];
1153  m_APDX2 = nArgs["APDX2"];
1154 
1155  m_WebHere = nArgs["WebHere"];
1156  m_WebPlName = sArgs["WebPlName"];
1157  m_WebClrName = sArgs["WebClrName"];
1158  m_WebPlMat = sArgs["WebPlMat"];
1159  m_WebClrMat = sArgs["WebClrMat"];
1160  m_vecWebPlTh = vArgs["WebPlTh"];
1161  m_vecWebClrTh = vArgs["WebClrTh"];
1162  m_vecWebLength = vArgs["WebLength"];
1163 
1164  m_IlyHere = nArgs["IlyHere"];
1165  m_IlyName = sArgs["IlyName"];
1166  m_IlyPhiLow = nArgs["IlyPhiLow"];
1167  m_IlyDelPhi = nArgs["IlyDelPhi"];
1168  m_vecIlyMat = vsArgs["IlyMat"];
1169  m_vecIlyThick = vArgs["IlyThick"];
1170 
1171  m_IlyPipeName = sArgs["IlyPipeName"];
1172  m_IlyPipeHere = nArgs["IlyPipeHere"];
1173  m_IlyPipeMat = sArgs["IlyPipeMat"];
1174  m_IlyPipeOD = nArgs["IlyPipeOD"];
1175  m_IlyPipeID = nArgs["IlyPipeID"];
1176  m_vecIlyPipeLength = vArgs["IlyPipeLength"];
1177  m_vecIlyPipeType = vArgs["IlyPipeType"];
1178  m_vecIlyPipePhi = vArgs["IlyPipePhi"];
1179  m_vecIlyPipeZ = vArgs["IlyPipeZ"];
1180 
1181  m_IlyPTMName = sArgs["IlyPTMName"];
1182  m_IlyPTMHere = nArgs["IlyPTMHere"];
1183  m_IlyPTMMat = sArgs["IlyPTMMat"];
1184  m_IlyPTMWidth = nArgs["IlyPTMWidth"];
1185  m_IlyPTMLength = nArgs["IlyPTMLength"];
1186  m_IlyPTMHeight = nArgs["IlyPTMHeight"];
1187  m_vecIlyPTMZ = vArgs["IlyPTMZ"];
1188  m_vecIlyPTMPhi = vArgs["IlyPTMPhi"];
1189 
1190  m_IlyFanOutName = sArgs["IlyFanOutName"];
1191  m_IlyFanOutHere = nArgs["IlyFanOutHere"];
1192  m_IlyFanOutMat = sArgs["IlyFanOutMat"];
1193  m_IlyFanOutWidth = nArgs["IlyFanOutWidth"];
1194  m_IlyFanOutLength = nArgs["IlyFanOutLength"];
1195  m_IlyFanOutHeight = nArgs["IlyFanOutHeight"];
1196  m_vecIlyFanOutZ = vArgs["IlyFanOutZ"];
1197  m_vecIlyFanOutPhi = vArgs["IlyFanOutPhi"];
1198  m_IlyDiffName = sArgs["IlyDiffName"];
1199  m_IlyDiffMat = sArgs["IlyDiffMat"];
1200  m_IlyDiffOff = nArgs["IlyDiffOff"];
1201  m_IlyDiffLength = nArgs["IlyDiffLength"];
1202  m_IlyBndlName = sArgs["IlyBndlName"];
1203  m_IlyBndlMat = sArgs["IlyBndlMat"];
1204  m_IlyBndlOff = nArgs["IlyBndlOff"];
1205  m_IlyBndlLength = nArgs["IlyBndlLength"];
1206  m_IlyFEMName = sArgs["IlyFEMName"];
1207  m_IlyFEMMat = sArgs["IlyFEMMat"];
1208  m_IlyFEMWidth = nArgs["IlyFEMWidth"];
1209  m_IlyFEMLength = nArgs["IlyFEMLength"];
1210  m_IlyFEMHeight = nArgs["IlyFEMHeight"];
1211  m_vecIlyFEMZ = vArgs["IlyFEMZ"];
1212  m_vecIlyFEMPhi = vArgs["IlyFEMPhi"];
1213 
1214  m_HawRName = sArgs["HawRName"];
1215  m_FawName = sArgs["FawName"];
1216  m_FawHere = nArgs["FawHere"];
1217  m_HawRHBIG = nArgs["HawRHBIG"];
1218  m_HawRhsml = nArgs["HawRhsml"];
1219  m_HawRCutY = nArgs["HawRCutY"];
1220  m_HawRCutZ = nArgs["HawRCutZ"];
1221  m_HawRCutDelY = nArgs["HawRCutDelY"];
1222  m_HawYOffCry = nArgs["HawYOffCry"];
1223 
1224  m_NFawPerSupm = static_cast<unsigned int>(nArgs["NFawPerSupm"]);
1225  m_FawPhiOff = nArgs["FawPhiOff"];
1226  m_FawDelPhi = nArgs["FawDelPhi"];
1227  m_FawPhiRot = nArgs["FawPhiRot"];
1228  m_FawRadOff = nArgs["FawRadOff"];
1229 
1230  m_GridHere = nArgs["GridHere"];
1231  m_GridName = sArgs["GridName"];
1232  m_GridMat = sArgs["GridMat"];
1233  m_GridThick = nArgs["GridThick"];
1234 
1235  m_BackHere = nArgs["BackHere"];
1236  m_BackXOff = nArgs["BackXOff"];
1237  m_BackYOff = nArgs["BackYOff"];
1238  m_BackSideName = sArgs["BackSideName"];
1239  m_BackSideHere = nArgs["BackSideHere"];
1240  m_BackSideLength = nArgs["BackSideLength"];
1241  m_BackSideHeight = nArgs["BackSideHeight"];
1242  m_BackSideWidth = nArgs["BackSideWidth"];
1243  m_BackSideYOff1 = nArgs["BackSideYOff1"];
1244  m_BackSideYOff2 = nArgs["BackSideYOff2"];
1245  m_BackSideAngle = nArgs["BackSideAngle"];
1246  m_BackSideMat = sArgs["BackSideMat"];
1247  m_BackPlateName = sArgs["BackPlateName"];
1248  m_BackPlateHere = nArgs["BackPlateHere"];
1249  m_BackPlateLength = nArgs["BackPlateLength"];
1250  m_BackPlateThick = nArgs["BackPlateThick"];
1251  m_BackPlateWidth = nArgs["BackPlateWidth"];
1252  m_BackPlateMat = sArgs["BackPlateMat"];
1253  m_BackPlate2Name = sArgs["BackPlate2Name"];
1254  m_BackPlate2Thick = nArgs["BackPlate2Thick"];
1255  m_BackPlate2Mat = sArgs["BackPlate2Mat"];
1256  m_GrilleName = sArgs["GrilleName"];
1257  m_GrilleHere = nArgs["GrilleHere"];
1258  m_GrilleThick = nArgs["GrilleThick"];
1259  m_GrilleWidth = nArgs["GrilleWidth"];
1260  m_GrilleZSpace = nArgs["GrilleZSpace"];
1261  m_GrilleMat = sArgs["GrilleMat"];
1262  m_vecGrilleHeight = vArgs["GrilleHeight"];
1263  m_vecGrilleZOff = vArgs["GrilleZOff"];
1264 
1265  m_GrEdgeSlotName = sArgs["GrEdgeSlotName"];
1266  m_GrEdgeSlotMat = sArgs["GrEdgeSlotMat"];
1267  m_GrEdgeSlotHere = nArgs["GrEdgeSlotHere"];
1268  m_GrEdgeSlotHeight = nArgs["GrEdgeSlotHeight"];
1269  m_GrEdgeSlotWidth = nArgs["GrEdgeSlotWidth"];
1270  m_GrMidSlotName = sArgs["GrMidSlotName"];
1271  m_GrMidSlotMat = sArgs["GrMidSlotMat"];
1272  m_GrMidSlotHere = nArgs["GrMidSlotHere"];
1273  m_GrMidSlotWidth = nArgs["GrMidSlotWidth"];
1274  m_GrMidSlotXOff = nArgs["GrMidSlotXOff"];
1275  m_vecGrMidSlotHeight = vArgs["GrMidSlotHeight"];
1276 
1277  m_BackPipeHere = nArgs["BackPipeHere"];
1278  m_BackPipeName = sArgs["BackPipeName"];
1279  m_vecBackPipeDiam = vArgs["BackPipeDiam"];
1280  m_vecBackPipeThick = vArgs["BackPipeThick"];
1281  m_BackPipeMat = sArgs["BackPipeMat"];
1282  m_BackPipeWaterMat = sArgs["BackPipeWaterMat"];
1283 
1284  m_BackCoolHere = nArgs["BackCoolHere"];
1285  m_vecBackCoolName = vsArgs["BackCoolName"];
1286  m_BackCoolBarHere = nArgs["BackCoolBarHere"];
1287  m_BackCoolBarWidth = nArgs["BackCoolBarWidth"];
1288  m_BackCoolBarHeight = nArgs["BackCoolBarHeight"];
1289  m_BackCoolMat = sArgs["BackCoolMat"];
1290  m_BackCoolBarName = sArgs["BackCoolBarName"];
1291  m_BackCoolBarThick = nArgs["BackCoolBarThick"];
1292  m_BackCoolBarMat = sArgs["BackCoolBarMat"];
1293  m_BackCoolBarSSName = sArgs["BackCoolBarSSName"];
1294  m_BackCoolBarSSThick = nArgs["BackCoolBarSSThick"];
1295  m_BackCoolBarSSMat = sArgs["BackCoolBarSSMat"];
1296  m_BackCoolBarWaName = sArgs["BackCoolBarWaName"];
1297  m_BackCoolBarWaThick = nArgs["BackCoolBarWaThick"];
1298  m_BackCoolBarWaMat = sArgs["BackCoolBarWaMat"];
1299  m_BackCoolVFEHere = nArgs["BackCoolVFEHere"];
1300  m_BackCoolVFEName = sArgs["BackCoolVFEName"];
1301  m_BackCoolVFEMat = sArgs["BackCoolVFEMat"];
1302  m_BackVFEName = sArgs["BackVFEName"];
1303  m_BackVFEMat = sArgs["BackVFEMat"];
1304  m_vecBackVFELyrThick = vArgs["BackVFELyrThick"];
1305  m_vecBackVFELyrName = vsArgs["BackVFELyrName"];
1306  m_vecBackVFELyrMat = vsArgs["BackVFELyrMat"];
1307  m_vecBackCoolNSec = vArgs["BackCoolNSec"];
1308  m_vecBackCoolSecSep = vArgs["BackCoolSecSep"];
1309  m_vecBackCoolNPerSec = vArgs["BackCoolNPerSec"];
1310  m_BackCBStdSep = nArgs["BackCBStdSep"];
1311 
1312  m_BackMiscHere = nArgs["BackMiscHere"];
1313  m_vecBackMiscThick = vArgs["BackMiscThick"];
1314  m_vecBackMiscName = vsArgs["BackMiscName"];
1315  m_vecBackMiscMat = vsArgs["BackMiscMat"];
1316  m_PatchPanelHere = nArgs["PatchPanelHere"];
1317  m_vecPatchPanelThick = vArgs["PatchPanelThick"];
1318  m_vecPatchPanelNames = vsArgs["PatchPanelNames"];
1319  m_vecPatchPanelMat = vsArgs["PatchPanelMat"];
1320  m_PatchPanelName = sArgs["PatchPanelName"];
1321 
1322  m_BackCoolTankHere = nArgs["BackCoolTankHere"];
1323  m_BackCoolTankName = sArgs["BackCoolTankName"];
1324  m_BackCoolTankWidth = nArgs["BackCoolTankWidth"];
1325  m_BackCoolTankThick = nArgs["BackCoolTankThick"];
1326  m_BackCoolTankMat = sArgs["BackCoolTankMat"];
1327  m_BackCoolTankWaName = sArgs["BackCoolTankWaName"];
1328  m_BackCoolTankWaWidth = nArgs["BackCoolTankWaWidth"];
1329  m_BackCoolTankWaMat = sArgs["BackCoolTankWaMat"];
1330  m_BackBracketName = sArgs["BackBracketName"];
1331  m_BackBracketHeight = nArgs["BackBracketHeight"];
1332  m_BackBracketMat = sArgs["BackBracketMat"];
1333 
1334  m_DryAirTubeHere = nArgs["DryAirTubeHere"];
1335  m_DryAirTubeName = sArgs["DryAirTubeName"];
1336  m_MBCoolTubeNum = static_cast<unsigned int>(nArgs["MBCoolTubeNum"]);
1337  m_DryAirTubeInnDiam = nArgs["DryAirTubeInnDiam"];
1338  m_DryAirTubeOutDiam = nArgs["DryAirTubeOutDiam"];
1339  m_DryAirTubeMat = sArgs["DryAirTubeMat"];
1340  m_MBCoolTubeHere = nArgs["MBCoolTubeHere"];
1341  m_MBCoolTubeName = sArgs["MBCoolTubeName"];
1342  m_MBCoolTubeInnDiam = nArgs["MBCoolTubeInnDiam"];
1343  m_MBCoolTubeOutDiam = nArgs["MBCoolTubeOutDiam"];
1344  m_MBCoolTubeMat = sArgs["MBCoolTubeMat"];
1345  m_MBManifHere = nArgs["MBManifHere"];
1346  m_MBManifName = sArgs["MBManifName"];
1347  m_MBManifInnDiam = nArgs["MBManifInnDiam"];
1348  m_MBManifOutDiam = nArgs["MBManifOutDiam"];
1349  m_MBManifMat = sArgs["MBManifMat"];
1350  m_MBLyrHere = nArgs["MBLyrHere"];
1351  m_vecMBLyrThick = vArgs["MBLyrThick"];
1352  m_vecMBLyrName = vsArgs["MBLyrName"];
1353  m_vecMBLyrMat = vsArgs["MBLyrMat"];
1354 
1355  m_PincerRodHere = nArgs["PincerRodHere"];
1356  m_PincerRodName = sArgs["PincerRodName"];
1357  m_PincerRodMat = sArgs["PincerRodMat"];
1358  m_vecPincerRodAzimuth = vArgs["PincerRodAzimuth"];
1359  m_PincerEnvName = sArgs["PincerEnvName"];
1360  m_PincerEnvMat = sArgs["PincerEnvMat"];
1361  m_PincerEnvWidth = nArgs["PincerEnvWidth"];
1362  m_PincerEnvHeight = nArgs["PincerEnvHeight"];
1363  m_PincerEnvLength = nArgs["PincerEnvLength"];
1364  m_vecPincerEnvZOff = vArgs["PincerEnvZOff"];
1365  m_PincerBlkName = sArgs["PincerBlkName"];
1366  m_PincerBlkMat = sArgs["PincerBlkMat"];
1367  m_PincerBlkLength = nArgs["PincerBlkLength"];
1368  m_PincerShim1Name = sArgs["PincerShim1Name"];
1369  m_PincerShimHeight = nArgs["PincerShimHeight"];
1370  m_PincerShim2Name = sArgs["PincerShim2Name"];
1371  m_PincerShimMat = sArgs["PincerShimMat"];
1372  m_PincerShim1Width = nArgs["PincerShim1Width"];
1373  m_PincerShim2Width = nArgs["PincerShim2Width"];
1374  m_PincerCutName = sArgs["PincerCutName"];
1375  m_PincerCutMat = sArgs["PincerCutMat"];
1376  m_PincerCutWidth = nArgs["PincerCutWidth"];
1377  m_PincerCutHeight = nArgs["PincerCutHeight"];
1378 
1379 #ifdef EDM_ML_DEBUG
1380  edm::LogVerbatim("EcalGeom") << "DDEcalBarrelAlgo info: end initialize";
1381 #endif
1382 }
1383 
1385 // DDEcalBarrelAlgo methods...
1387 
1389 #ifdef EDM_ML_DEBUG
1390  edm::LogVerbatim("EcalGeom") << "******** DDEcalBarrelAlgo execute!" << std::endl;
1391 #endif
1392  if (barHere() != 0) {
1393  const unsigned int copyOne(1);
1394  const unsigned int copyTwo(2);
1395  // Barrel parent volume----------------------------------------------------------
1396  cpv.position(
1398  barMat(),
1401  parent().name(),
1402  copyOne,
1403  DDTranslation(vecBarTran()[0], vecBarTran()[1], vecBarTran()[2]),
1404  myrot(barName().name() + "Rot",
1405  Rota(Vec3(vecBarRota3()[0], vecBarRota3()[1], vecBarRota3()[2]), vecBarRota3()[3]) *
1406  Rota(Vec3(vecBarRota2()[0], vecBarRota2()[1], vecBarRota2()[2]), vecBarRota2()[3]) *
1407  Rota(Vec3(vecBarRota()[0], vecBarRota()[1], vecBarRota()[2]), vecBarRota()[3])));
1408  // End Barrel parent volume----------------------------------------------------------
1409 
1410  // Supermodule parent------------------------------------------------------------
1411 
1412  const DDName spmcut1ddname((0 != spmCutShow()) ? spmName() : ddname(m_SpmName + "CUT1"));
1413  const DDSolid ddspm(
1415 
1416  const unsigned int indx(vecSpmRMax().size() / 2);
1417 
1418  // Deal with the cut boxes first
1419  const DDSolid spmCutBox(DDSolidFactory::box(spmCutName(),
1420  1.05 * (vecSpmRMax()[indx] - vecSpmRMin()[indx]) / 2.,
1421  spmCutThick() / 2.,
1422  fabs(vecSpmZPts().back() - vecSpmZPts().front()) / 2. + 1 * mm));
1423  const std::vector<double>& cutBoxParms(spmCutBox.parameters());
1424  const DDLogicalPart spmCutLog(spmCutName(), spmMat(), spmCutBox);
1425 
1426  // Now the expansion box
1427  const double xExp(spmExpThick() / 2.);
1428  const double yExp(spmExpWide() / 2.);
1429  const double zExp(fabs(vecSpmZPts().back() - vecSpmZPts().front()) / 2.);
1430  const DDName expName(m_SpmName + "EXP");
1431  const DDSolid spmExpBox(DDSolidFactory::box(expName, xExp, yExp, zExp));
1432  const DDTranslation expTra(vecSpmRMax().back() - xExp, spmExpYOff(), vecSpmZPts().front() + zExp);
1433  const DDLogicalPart expLog(expName, spmMat(), spmExpBox);
1434 
1435  // Supermodule side platess
1436  const DDSolid sideSolid(DDSolidFactory::box(
1437  spmSideName(), spmSideHigh() / 2., spmSideThick() / 2., fabs(vecSpmZPts()[1] - vecSpmZPts()[0]) / 2.));
1438  const std::vector<double>& sideParms(sideSolid.parameters());
1439  const DDLogicalPart sideLog(spmSideName(), spmSideMat(), sideSolid);
1440 
1441  DDSolid temp1;
1442  DDSolid temp2;
1443  for (unsigned int icopy(1); icopy <= 2; ++icopy) {
1444  const std::vector<double>& tvec(1 == icopy ? vecSpmCutTM() : vecSpmCutTP());
1445  const double rang(1 == icopy ? spmCutRM() : spmCutRP());
1446 
1447  const Tl3D tr(tvec[0], tvec[1], tvec[2]);
1448  const RoZ3D ro(rang);
1449  const Tf3D alltrot(
1450  RoZ3D(1 == icopy ? spmLowPhi() : spmLowPhi() + spmDelPhi()) *
1451  Tl3D((vecSpmRMax()[indx] + vecSpmRMin()[indx]) / 2., 0, (vecSpmZPts().front() + vecSpmZPts().back()) / 2.) *
1452  tr * ro);
1453 
1454  const DDRotation ddrot(myrot(spmCutName().name() + std::to_string(icopy), alltrot.getRotation()));
1455  const DDTranslation ddtra(alltrot.getTranslation());
1456 
1457  const Tl3D trSide(tvec[0],
1458  tvec[1] + (1 == icopy ? 1. : -1.) * (cutBoxParms[1] + sideParms[1]) +
1459  (1 == icopy ? spmSideYOffM() : spmSideYOffP()),
1460  tvec[2]);
1461  const RoZ3D roSide(rang);
1462  const Tf3D sideRot(RoZ3D(1 == icopy ? spmLowPhi() : spmLowPhi() + spmDelPhi()) *
1463  Tl3D(vecSpmRMin().front() + sideParms[0], 0, vecSpmZPts().front() + sideParms[2]) * trSide *
1464  roSide);
1465 
1466  const DDRotation sideddrot(myrot(spmSideName().name() + std::to_string(icopy), sideRot.getRotation()));
1467  const DDTranslation sideddtra(sideRot.getTranslation());
1468 
1469  cpv.position(sideLog, spmName(), icopy, sideddtra, sideddrot);
1470 
1471  if (0 != spmCutShow()) // do this if we are "showing" the boxes
1472  {
1473  cpv.position(spmCutLog, spmName(), icopy, ddtra, ddrot);
1474  } else // do this if we are subtracting the boxes
1475  {
1476  if (1 == icopy) {
1477  temp1 = DDSolidFactory::subtraction(DDName(m_SpmName + "_T1"), spmcut1ddname, spmCutBox, ddtra, ddrot);
1478  } else {
1479  temp2 = DDSolidFactory::subtraction(spmName(), temp1, spmCutBox, ddtra, ddrot);
1480  }
1481  }
1482  }
1483 
1484  const DDLogicalPart spmLog(spmName(), spmMat(), ((0 != spmCutShow()) ? ddspm : temp2));
1485 
1486  const double dphi(360. * deg / (1. * spmNPerHalf()));
1487  for (unsigned int iphi(0); iphi < 2 * spmNPerHalf(); ++iphi) {
1488  const double phi(iphi * dphi + spmPhiOff()); //- 0.000130/deg ) ;
1489 
1490  // this base rotation includes the base translation & rotation
1491  // plus flipping for the negative z hemisphere, plus
1492  // the phi rotation for this module
1493  const Tf3D rotaBase(RoZ3D(phi) * (iphi < spmNPerHalf() ? Ro3D() : RoX3D(180. * deg)) *
1494  Ro3D(vecSpmBRota()[3], Vec3(vecSpmBRota()[0], vecSpmBRota()[1], vecSpmBRota()[2])) *
1495  Tl3D(Vec3(vecSpmBTran()[0], vecSpmBTran()[1], vecSpmBTran()[2])));
1496 
1497  // here the individual rotations & translations of the supermodule
1498  // are implemented on top of the overall "base" rotation & translation
1499 
1500  const unsigned int offr(4 * iphi);
1501  const unsigned int offt(3 * iphi);
1502 
1503  const Ro3D r1(vecSpmRota()[offr + 3],
1504  Vec3(vecSpmRota()[offr + 0], vecSpmRota()[offr + 1], vecSpmRota()[offr + 2]));
1505 
1506  const Tf3D rotaExtra(r1 * Tl3D(Vec3(vecSpmTran()[offt + 0], vecSpmTran()[offt + 1], vecSpmTran()[offt + 2])));
1507 
1508  const Tf3D both(rotaExtra * rotaBase);
1509 
1510  const DDRotation rota(myrot(spmName().name() + std::to_string(phi / deg), both.getRotation()));
1511 
1512  if (vecSpmHere()[iphi] != 0) {
1513  // convert from CLHEP to DDTranslation & etc. -- Michael Case
1514  DDTranslation myTran(both.getTranslation().x(), both.getTranslation().y(), both.getTranslation().z());
1515  cpv.position(spmLog, barName(), iphi + 1, myTran, rota);
1516  }
1517  }
1518  // End Supermodule parent------------------------------------------------------------
1519 
1520  // Begin Inner Layer volumes---------------------------------------------------------
1521  const double ilyLength(vecSpmZPts()[1] - vecSpmZPts()[0]);
1522  double ilyRMin(vecSpmRMin()[0]);
1523  double ilyThick(0);
1524  for (unsigned int ilyx(0); ilyx != vecIlyThick().size(); ++ilyx) {
1525  ilyThick += vecIlyThick()[ilyx];
1526  }
1527  const DDName ilyDDName(ddname(ilyName()));
1528  const DDSolid ilySolid(
1529  DDSolidFactory::tubs(ilyDDName, ilyLength / 2, ilyRMin, ilyRMin + ilyThick, ilyPhiLow(), ilyDelPhi()));
1530  const DDLogicalPart ilyLog(ilyDDName, spmMat(), ilySolid);
1531  cpv.position(ilyLog, spmLog, copyOne, DDTranslation(0, 0, ilyLength / 2), DDRotation());
1532 
1533  DDLogicalPart ilyPipeLog[200];
1534 
1535  if (0 != ilyPipeHere()) {
1536  for (unsigned int iPipeType(0); iPipeType != vecIlyPipeLength().size(); ++iPipeType) {
1537  const DDName pName(ddname(ilyPipeName() + "_" + std::to_string(iPipeType + 1)));
1538 
1539  DDSolid ilyPipeSolid(
1540  DDSolidFactory::tubs(pName, vecIlyPipeLength()[iPipeType] / 2., 0, ilyPipeOD() / 2, 0 * deg, 360 * deg));
1541  ilyPipeLog[iPipeType] = DDLogicalPart(pName, ilyPipeMat(), ilyPipeSolid);
1542 
1543  const DDName pWaName(ddname(ilyPipeName() + "Wa_" + std::to_string(iPipeType + 1)));
1544  DDSolid ilyPipeWaSolid(
1545  DDSolidFactory::tubs(pWaName, vecIlyPipeLength()[iPipeType] / 2., 0, ilyPipeID() / 2, 0 * deg, 360 * deg));
1546  const DDLogicalPart ilyPipeWaLog(pWaName, backPipeWaterMat(), ilyPipeWaSolid);
1547 
1548  cpv.position(ilyPipeWaLog, pName, copyOne, DDTranslation(0, 0, 0), DDRotation());
1549  }
1550  }
1551 
1552  DDSolid ilyPTMSolid(
1554  const DDLogicalPart ilyPTMLog(ilyPTMName(), ilyPTMMat(), ilyPTMSolid);
1555 
1556  DDSolid ilyFanOutSolid(
1558  const DDLogicalPart ilyFanOutLog(ilyFanOutName(), ilyFanOutMat(), ilyFanOutSolid);
1559 
1560  DDSolid ilyFEMSolid(
1562  const DDLogicalPart ilyFEMLog(ilyFEMName(), ilyFEMMat(), ilyFEMSolid);
1563 
1564  DDSolid ilyDiffSolid(
1566  const DDLogicalPart ilyDiffLog(ilyDiffName(), ilyDiffMat(), ilyDiffSolid);
1567 
1568  DDSolid ilyBndlSolid(
1570  const DDLogicalPart ilyBndlLog(ilyBndlName(), ilyBndlMat(), ilyBndlSolid);
1571  cpv.position(ilyDiffLog,
1572  ilyFanOutName(),
1573  copyOne,
1574  DDTranslation(0, 0, -ilyFanOutLength() / 2 + ilyDiffLength() / 2 + ilyDiffOff()),
1575  DDRotation());
1576  cpv.position(ilyBndlLog,
1577  ilyFanOutName(),
1578  copyOne,
1579  DDTranslation(0, 0, -ilyFanOutLength() / 2 + ilyBndlLength() / 2 + ilyBndlOff()),
1580  DDRotation());
1581 
1582  for (unsigned int ily(0); ily != vecIlyThick().size(); ++ily) {
1583  const double ilyRMax(ilyRMin + vecIlyThick()[ily]);
1584  const DDName xilyName(ddname(ilyName() + std::to_string(ily)));
1585  const DDSolid xilySolid(
1586  DDSolidFactory::tubs(xilyName, ilyLength / 2, ilyRMin, ilyRMax, ilyPhiLow(), ilyDelPhi()));
1587 
1588  const DDLogicalPart xilyLog(xilyName, ddmat(vecIlyMat()[ily]), xilySolid);
1589 
1590  if (0 != ilyHere()) {
1591  cpv.position(xilyLog, ilyLog, copyOne, DDTranslation(0, 0, 0), DDRotation());
1592 
1593  unsigned int copyNum[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1594 
1595  if (10 * mm < vecIlyThick()[ily] && vecIlyThick().size() != (ily + 1) && 0 != ilyPipeHere()) {
1596  if (0 != ilyPTMHere()) {
1597  unsigned int ptmCopy(0);
1598  for (unsigned int ilyPTM(0); ilyPTM != vecIlyPTMZ().size(); ++ilyPTM) {
1599  const double radius(ilyRMax - 1 * mm - ilyPTMHeight() / 2.);
1600  const double phi(vecIlyPTMPhi()[ilyPTM]);
1601  const double yy(radius * sin(phi));
1602  const double xx(radius * cos(phi));
1603  ++ptmCopy;
1604  cpv.position(ilyPTMLog,
1605  xilyLog,
1606  ptmCopy,
1607  DDTranslation(xx, yy, vecIlyPTMZ()[ilyPTM] - ilyLength / 2),
1608  myrot(ilyPTMLog.name().name() + "_rot" + std::to_string(ptmCopy), CLHEP::HepRotationZ(phi)));
1609  }
1610  }
1611  if (0 != ilyFanOutHere()) {
1612  unsigned int fanOutCopy(0);
1613  for (unsigned int ilyFO(0); ilyFO != vecIlyFanOutZ().size(); ++ilyFO) {
1614  const double radius(ilyRMax - 1 * mm - ilyFanOutHeight() / 2.);
1615  const double phi(vecIlyFanOutPhi()[ilyFO]);
1616  const double yy(radius * sin(phi));
1617  const double xx(radius * cos(phi));
1618  ++fanOutCopy;
1619  cpv.position(ilyFanOutLog,
1620  xilyLog,
1621  fanOutCopy,
1622  DDTranslation(xx, yy, vecIlyFanOutZ()[ilyFO] - ilyLength / 2),
1623  myrot(ilyFanOutLog.name().name() + "_rot" + std::to_string(fanOutCopy),
1624  CLHEP::HepRotationZ(phi) * CLHEP::HepRotationY(180 * deg)));
1625  }
1626  unsigned int femCopy(0);
1627  for (unsigned int ilyFEM(0); ilyFEM != vecIlyFEMZ().size(); ++ilyFEM) {
1628  const double radius(ilyRMax - 1 * mm - ilyFEMHeight() / 2.);
1629  const double phi(vecIlyFEMPhi()[ilyFEM]);
1630  const double yy(radius * sin(phi));
1631  const double xx(radius * cos(phi));
1632  ++femCopy;
1633  cpv.position(ilyFEMLog,
1634  xilyLog,
1635  femCopy,
1636  DDTranslation(xx, yy, vecIlyFEMZ()[ilyFEM] - ilyLength / 2),
1637  myrot(ilyFEMLog.name().name() + "_rot" + std::to_string(femCopy), CLHEP::HepRotationZ(phi)));
1638  }
1639  }
1640  for (unsigned int iPipe(0); iPipe != vecIlyPipePhi().size(); ++iPipe) {
1641  const unsigned int type(static_cast<unsigned int>(round(vecIlyPipeType()[iPipe])));
1642 #ifdef EDM_ML_DEBUG
1643  edm::LogVerbatim("EcalGeom") << " iPipe, type= " << iPipe << ", " << type;
1644 #endif
1645  const double zz(-ilyLength / 2 + vecIlyPipeZ()[iPipe] + (9 > type ? vecIlyPipeLength()[type] / 2. : 0));
1646 
1647  for (unsigned int ly(0); ly != 2; ++ly) {
1648  const double radius(0 == ly ? ilyRMin + ilyPipeOD() / 2. + 1 * mm : ilyRMax - ilyPipeOD() / 2. - 1 * mm);
1649  const double phi(vecIlyPipePhi()[iPipe]);
1650  const double yy(radius * sin(phi));
1651  const double xx(radius * cos(phi));
1652  ++copyNum[type],
1653  cpv.position(
1654  ilyPipeLog[type],
1655  xilyLog,
1656  copyNum[type],
1657  DDTranslation(xx, yy, zz),
1658  (9 > type ? DDRotation()
1659  : myrot(ilyPipeLog[type].name().name() + "_rot" + std::to_string(copyNum[type]),
1660  Rota(Vec3(xx, yy, 0), 90 * deg))));
1661  }
1662  }
1663  }
1664  }
1665  ilyRMin = ilyRMax;
1666  }
1667  // End Inner Layer volumes---------------------------------------------------------
1668 
1669  const DDName clyrName(DDName("ECLYR"));
1670  std::vector<double> cri;
1671  std::vector<double> cro;
1672  std::vector<double> czz;
1673  czz.emplace_back(vecSpmZPts()[1]);
1674  cri.emplace_back(vecSpmRMin()[0]);
1675  cro.emplace_back(vecSpmRMin()[0] + 25 * mm);
1676  czz.emplace_back(vecSpmZPts()[2]);
1677  cri.emplace_back(vecSpmRMin()[2]);
1678  cro.emplace_back(vecSpmRMin()[2] + 10 * mm);
1679  const DDSolid clyrSolid(DDSolidFactory::polycone(clyrName, -9.5 * deg, 19 * deg, czz, cri, cro));
1680  const DDLogicalPart clyrLog(clyrName, ddmat(vecIlyMat()[4]), clyrSolid);
1681  cpv.position(clyrLog, spmLog, copyOne, DDTranslation(0, 0, 0), DDRotation());
1682 
1683  // Begin Alveolar Wedge parent ------------------------------------------------------
1684  //----------------
1685 
1686  // the next few lines accumulate dimensions appropriate to crystal type 1
1687  // which we use to set some of the features of the half-alveolar wedge (hawR).
1688 
1689  // const double ANom1 ( vecNomCryDimAR()[0] ) ;
1690  const double BNom1(vecNomCryDimCR()[0]);
1691  const double bNom1(vecNomCryDimCF()[0]);
1692  // const double HNom1 ( vecNomCryDimBR()[0] ) ;
1693  // const double hNom1 ( vecNomCryDimBF()[0] ) ;
1694  const double sWall1(wallThAlv());
1695  const double fWall1(wallFrAlv());
1696  // const double rWall1( wallReAlv() ) ;
1697  const double sWrap1(wrapThAlv());
1698  const double fWrap1(wrapFrAlv());
1699  // const double rWrap1( wrapReAlv() ) ;
1700  const double sClr1(clrThAlv());
1701  const double fClr1(clrFrAlv());
1702  // const double rClr1 ( clrReAlv() ) ;
1703  const double LNom1(nomCryDimLZ());
1704  const double beta1(atan((BNom1 - bNom1) / LNom1));
1705  // const double cosbeta1 ( cos( beta1 ) ) ;
1706  const double sinbeta1(sin(beta1));
1707 
1708  const double tana_hawR((BNom1 - bNom1) / LNom1);
1709 
1710  const double H_hawR(hawRHBIG());
1711  const double h_hawR(hawRhsml());
1712  const double a_hawR(bNom1 + sClr1 + 2 * sWrap1 + 2 * sWall1 - sinbeta1 * (fClr1 + fWrap1 + fWall1));
1713  const double B_hawR(a_hawR + H_hawR * tana_hawR);
1714  const double b_hawR(a_hawR + h_hawR * tana_hawR);
1715  const double L_hawR(vecSpmZPts()[2]);
1716 
1717  const Trap trapHAWR(a_hawR / 2., //double aHalfLengthXNegZLoY , // bl1, A/2
1718  a_hawR / 2., //double aHalfLengthXPosZLoY , // bl2, a/2
1719  b_hawR / 2., //double aHalfLengthXPosZHiY , // tl2, b/2
1720  H_hawR / 2., //double aHalfLengthYNegZ , // h1, H/2
1721  h_hawR / 2., //double aHalfLengthYPosZ , // h2, h/2
1722  L_hawR / 2., //double aHalfLengthZ , // dz, L/2
1723  90 * deg, //double aAngleAD , // alfa1
1724  0, //double aCoord15X , // x15
1725  0 //double aCoord15Y // y15
1726  );
1727 
1728  const DDName hawRName1(ddname(hawRName().name() + "1"));
1729  const DDSolid hawRSolid1(mytrap(hawRName1.name(), trapHAWR));
1730  const DDLogicalPart hawRLog1(hawRName1, spmMat(), hawRSolid1);
1731 
1732  const double al1_fawR(atan((B_hawR - a_hawR) / H_hawR) + M_PI_2);
1733 
1734  // here is trap for Full Alveolar Wedge
1735  const Trap trapFAW(a_hawR, //double aHalfLengthXNegZLoY , // bl1, A/2
1736  a_hawR, //double aHalfLengthXPosZLoY , // bl2, a/2
1737  b_hawR, //double aHalfLengthXPosZHiY , // tl2, b/2
1738  H_hawR / 2., //double aHalfLengthYNegZ , // h1, H/2
1739  h_hawR / 2., //double aHalfLengthYPosZ , // h2, h/2
1740  L_hawR / 2., //double aHalfLengthZ , // dz, L/2
1741  al1_fawR, //double aAngleAD , // alfa1
1742  0, //double aCoord15X , // x15
1743  0 //double aCoord15Y // y15
1744  );
1745 
1746  const DDName fawName1(ddname(fawName().name() + "1"));
1747  const DDSolid fawSolid1(mytrap(fawName1.name(), trapFAW));
1748  const DDLogicalPart fawLog1(fawName1, spmMat(), fawSolid1);
1749 
1750  const Trap::VertexList vHAW(trapHAWR.vertexList());
1751  const Trap::VertexList vFAW(trapFAW.vertexList());
1752 
1753  const double hawBoxClr(1 * mm);
1754 
1755  // HAW cut box to cut off back end of wedge
1756  const DDName hawCutName(ddname(hawRName().name() + "CUTBOX"));
1757  const DDSolid hawCutBox(DDSolidFactory::box(hawCutName, b_hawR / 2 + hawBoxClr, hawRCutY() / 2, hawRCutZ() / 2));
1758  const std::vector<double>& hawBoxParms(hawCutBox.parameters());
1759  const DDLogicalPart hawCutLog(hawCutName, spmMat(), hawCutBox);
1760 
1761  const Pt3D b1(hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1762  const Pt3D b2(-hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]);
1763  const Pt3D b3(-hawBoxParms[0], hawBoxParms[1], -hawBoxParms[2]);
1764 
1765  const double zDel(sqrt(4 * hawBoxParms[2] * hawBoxParms[2] - (h_hawR - hawRCutDelY()) * (h_hawR - hawRCutDelY())));
1766 
1767  const Tf3D hawCutForm(b1,
1768  b2,
1769  b3,
1770  vHAW[2] + Pt3D(hawBoxClr, -hawRCutDelY(), 0),
1771  vHAW[1] + Pt3D(-hawBoxClr, -hawRCutDelY(), 0),
1772  Pt3D(vHAW[0].x() - hawBoxClr, vHAW[0].y(), vHAW[0].z() - zDel));
1773 
1774  const DDSolid hawRSolid(DDSolidFactory::subtraction(
1775  hawRName(),
1776  hawRSolid1,
1777  hawCutBox,
1778  DDTranslation(
1779  hawCutForm.getTranslation().x(), hawCutForm.getTranslation().y(), hawCutForm.getTranslation().z()),
1780  myrot(hawCutName.name() + "R", hawCutForm.getRotation())));
1781  const DDLogicalPart hawRLog(hawRName(), spmMat(), hawRSolid);
1782 
1783  // FAW cut box to cut off back end of wedge
1784  const DDName fawCutName(ddname(fawName().name() + "CUTBOX"));
1785  const DDSolid fawCutBox(DDSolidFactory::box(fawCutName, 2 * hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]));
1786 
1787  const std::vector<double>& fawBoxParms(fawCutBox.parameters());
1788  const DDLogicalPart fawCutLog(fawCutName, spmMat(), fawCutBox);
1789 
1790  const Pt3D bb1(fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1791  const Pt3D bb2(-fawBoxParms[0], fawBoxParms[1], fawBoxParms[2]);
1792  const Pt3D bb3(-fawBoxParms[0], fawBoxParms[1], -fawBoxParms[2]);
1793 
1794  const Tf3D fawCutForm(bb1,
1795  bb2,
1796  bb3,
1797  vFAW[2] + Pt3D(2 * hawBoxClr, -5 * mm, 0),
1798  vFAW[1] + Pt3D(-2 * hawBoxClr, -5 * mm, 0),
1799  Pt3D(vFAW[1].x() - 2 * hawBoxClr, vFAW[1].y() - trapFAW.h(), vFAW[1].z() - zDel));
1800 
1801  const DDSolid fawSolid(DDSolidFactory::subtraction(
1802  fawName(),
1803  fawSolid1,
1804  fawCutBox,
1805  DDTranslation(
1806  fawCutForm.getTranslation().x(), fawCutForm.getTranslation().y(), fawCutForm.getTranslation().z()),
1807  myrot(fawCutName.name() + "R", fawCutForm.getRotation())));
1808  const DDLogicalPart fawLog(fawName(), spmMat(), fawSolid);
1809 
1810  const Tf3D hawRform(vHAW[3],
1811  vHAW[0],
1812  vHAW[1], // HAW inside FAW
1813  vFAW[3],
1814  0.5 * (vFAW[0] + vFAW[3]),
1815  0.5 * (vFAW[1] + vFAW[2]));
1816  cpv.position(
1817  hawRLog,
1818  fawLog,
1819  copyOne,
1820  DDTranslation(hawRform.getTranslation().x(), hawRform.getTranslation().y(), hawRform.getTranslation().z()),
1821  myrot(hawRName().name() + "R", hawRform.getRotation()));
1822 
1823  cpv.position(
1824  hawRLog,
1825  fawLog,
1826  copyTwo,
1827  DDTranslation(-hawRform.getTranslation().x(), -hawRform.getTranslation().y(), -hawRform.getTranslation().z()),
1828  myrot(hawRName().name() + "RotRefl",
1829  CLHEP::HepRotationY(180 * deg) * // rotate about Y after refl thru Z
1830  CLHEP::HepRep3x3(1, 0, 0, 0, 1, 0, 0, 0, -1)));
1831 
1832  /* this for display of haw cut box instead of subtraction
1833  cpv.position( hawCutLog,
1834  hawRName,
1835  copyOne,
1836  hawCutForm.getTranslation(),
1837  myrot( hawCutName.name()+"R",
1838  hawCutForm.getRotation() ) ) ;
1839 */
1840 
1841  for (unsigned int iPhi(1); iPhi <= nFawPerSupm(); ++iPhi) {
1842  const double rPhi(fawPhiOff() + (iPhi - 0.5) * fawDelPhi());
1843 
1844  const Tf3D fawform(RoZ3D(rPhi) * Tl3D(fawRadOff() + (trapFAW.H() + trapFAW.h()) / 4, 0, trapFAW.L() / 2) *
1845  RoZ3D(-90 * deg + fawPhiRot()));
1846  if (fawHere())
1847  cpv.position(
1848  fawLog,
1849  spmLog,
1850  iPhi,
1851  DDTranslation(fawform.getTranslation().x(), fawform.getTranslation().y(), fawform.getTranslation().z()),
1852  myrot(fawName().name() + "_Rot" + std::to_string(iPhi), fawform.getRotation()));
1853  }
1854 
1855  // End Alveolar Wedge parent ------------------------------------------------------
1856 
1857  // Begin Grid + Tablet insertion
1858 
1859  const double h_Grid(gridThick());
1860 
1861  const Trap trapGrid((B_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR) / 2, // bl1, A/2
1862  (b_hawR - h_Grid * (B_hawR - a_hawR) / H_hawR) / 2, // bl2, a/2
1863  b_hawR / 2., // tl2, b/2
1864  h_Grid / 2., // h1, H/2
1865  h_Grid / 2., // h2, h/2
1866  (L_hawR - 8 * cm) / 2., // dz, L/2
1867  90 * deg, // alfa1
1868  0, // x15
1869  H_hawR - h_hawR // y15
1870  );
1871 
1872  const DDSolid gridSolid(mytrap(gridName().name(), trapGrid));
1873  const DDLogicalPart gridLog(gridName(), gridMat(), gridSolid);
1874 
1875  const Trap::VertexList vGrid(trapGrid.vertexList());
1876 
1877  const Tf3D gridForm(vGrid[4],
1878  vGrid[5],
1879  vGrid[6], // Grid inside HAW
1880  vHAW[5] - Pt3D(0, h_Grid, 0),
1881  vHAW[5],
1882  vHAW[6]);
1883 
1884  if (0 != gridHere())
1885  cpv.position(
1886  gridLog,
1887  hawRLog,
1888  copyOne,
1889  DDTranslation(gridForm.getTranslation().x(), gridForm.getTranslation().y(), gridForm.getTranslation().z()),
1890  myrot(gridName().name() + "R", gridForm.getRotation()));
1891 
1892  // End Grid + Tablet insertion
1893 
1894  // begin filling Wedge with crystal plus supports --------------------------
1895 
1896  const double aNom(nomCryDimAF());
1897  const double LNom(nomCryDimLZ());
1898 
1899  const double AUnd(underAR());
1900  const double aUnd(underAF());
1901  // const double BUnd ( underCR() ) ;
1902  const double bUnd(underCF());
1903  const double HUnd(underBR());
1904  const double hUnd(underBF());
1905  const double LUnd(underLZ());
1906 
1907  const double sWall(wallThAlv());
1908  const double sWrap(wrapThAlv());
1909  const double sClr(clrThAlv());
1910 
1911  const double fWall(wallFrAlv());
1912  const double fWrap(wrapFrAlv());
1913  const double fClr(clrFrAlv());
1914 
1915  const double rWall(wallReAlv());
1916  const double rWrap(wrapReAlv());
1917  const double rClr(clrReAlv());
1918 
1919  // theta is angle in yz plane between z axis & leading edge of crystal
1920  double theta(90 * deg);
1921  double zee(0 * mm);
1922  double side(0 * mm);
1923  double zeta(0 * deg); // increment in theta for last crystal
1924 
1925  for (unsigned int cryType(1); cryType <= nCryTypes(); ++cryType) {
1926  const std::string sType("_" + std::string(10 > cryType ? "0" : "") + std::to_string(cryType));
1927 
1928 #ifdef EDM_ML_DEBUG
1929  edm::LogVerbatim("EcalGeom") << "Crytype=" << cryType;
1930 #endif
1931  const double ANom(vecNomCryDimAR()[cryType - 1]);
1932  const double BNom(vecNomCryDimCR()[cryType - 1]);
1933  const double bNom(vecNomCryDimCF()[cryType - 1]);
1934  const double HNom(vecNomCryDimBR()[cryType - 1]);
1935  const double hNom(vecNomCryDimBF()[cryType - 1]);
1936 
1937  const double alfCry(90 * deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd)));
1938 
1939  const Trap trapCry((ANom - AUnd) / 2., //double aHalfLengthXNegZLoY , // bl1, A/2
1940  (aNom - aUnd) / 2., //double aHalfLengthXPosZLoY , // bl2, a/2
1941  (bNom - bUnd) / 2., //double aHalfLengthXPosZHiY , // tl2, b/2
1942  (HNom - HUnd) / 2., //double aHalfLengthYNegZ , // h1, H/2
1943  (hNom - hUnd) / 2., //double aHalfLengthYPosZ , // h2, h/2
1944  (LNom - LUnd) / 2., //double aHalfLengthZ , // dz, L/2
1945  alfCry, //double aAngleAD , // alfa1
1946  aNom - aUnd - ANom + AUnd, //double aCoord15X , // x15
1947  hNom - hUnd - HNom + HUnd //double aCoord15Y // y15
1948  );
1949 
1950  const DDName cryDDName(cryName() + sType);
1951  const DDSolid crySolid(mytrap(cryDDName.name(), trapCry));
1952  const DDLogicalPart cryLog(cryDDName, cryMat(), crySolid);
1953 
1954  //++++++++++++++++++++++++++++++++++ APD ++++++++++++++++++++++++++++++++++
1955 
1956  const DDName apdDDName(apdName().name() + sType);
1957 
1958  const Trap trapAPD(apdSide() / 2., //double aHalfLengthXNegZLoY , // bl1, A/2
1959  apdSide() / 2., //double aHalfLengthXPosZLoY , // bl2, a/2
1960  apdSide() / 2., //double aHalfLengthXPosZHiY , // tl2, b/2
1961  apdSide() / 2., //double aHalfLengthYNegZ , // h1, H/2
1962  apdSide() / 2., //double aHalfLengthYPosZ , // h2, h/2
1963  apdThick() / 2., // dz, L/2
1964  90 * deg, //double aAngleAD , // alfa1
1965  0, //double aCoord15X , // x15
1966  0 //double aCoord15Y // y15
1967  );
1968 
1969  // DDSolid apdSolid ( DDSolidFactory::box( apdDDName,
1970  // apdSide()/2.,
1971  // apdSide()/2.,
1972  // apdThick()/2. ) ) ;
1973  const DDSolid apdSolid(mytrap(apdDDName.name(), trapAPD));
1974  const DDLogicalPart apdLog(apdDDName, apdMat(), apdSolid);
1975 
1976  unsigned int copyAPD(0);
1977  //++++++++++++++++++++++++++++++++++ END APD ++++++++++++++++++++++++++++++++++
1978 
1979  const double delta(atan((HNom - hNom) / LNom));
1980  //unused const double cosdelta ( cos( delta ) ) ;
1981  const double sindelta(sin(delta));
1982 
1983  const double gamma(atan((ANom - aNom) / LNom));
1984  //unused const double cosgamma ( cos( gamma ) ) ;
1985  const double singamma(sin(gamma));
1986 
1987  const double beta(atan((BNom - bNom) / LNom));
1988  //unused const double cosbeta ( cos( beta ) ) ;
1989  const double sinbeta(sin(beta));
1990 
1991  // Now clearance trap
1992  const double alfClr(90 * deg + atan((bNom - aNom) / (hNom + sClr)));
1993 
1994  const Trap trapClr((ANom + sClr + rClr * singamma) / 2., //double aHalfLengthXNegZLoY , // bl1, A/2
1995  (aNom + sClr - fClr * singamma) / 2., //double aHalfLengthXPosZLoY , // bl2, a/2
1996  (bNom + sClr - fClr * sinbeta) / 2., //double aHalfLengthXPosZHiY , // tl2, b/2
1997  (HNom + sClr + rClr * sindelta) / 2., //double aHalfLengthYNegZ , // h1, H/2
1998  (hNom + sClr - fClr * sindelta) / 2., //double aHalfLengthYPosZ , // h2, h/2
1999  (LNom + fClr + rClr) / 2., // dz, L/2
2000  alfClr, //double aAngleAD , // alfa1
2001  aNom - ANom, //double aCoord15X , // x15
2002  hNom - HNom //double aCoord15Y // y15
2003  );
2004 
2005  const DDName clrDDName(clrName() + sType);
2006  const DDSolid clrSolid(mytrap(clrDDName.name(), trapClr));
2007  const DDLogicalPart clrLog(clrDDName, clrMat(), clrSolid);
2008 
2009  // Now wrap trap
2010 
2011  const double alfWrap(90 * deg + atan((bNom - aNom) / (hNom + sClr + 2 * sWrap)));
2012 
2013  const Trap trapWrap((trapClr.A() + 2 * sWrap + rWrap * singamma) / 2, // bl1, A/2
2014  (trapClr.a() + 2 * sWrap - fWrap * singamma) / 2, // bl2, a/2
2015  (trapClr.b() + 2 * sWrap - fWrap * sinbeta) / 2, // tl2, b/2
2016  (trapClr.H() + 2 * sWrap + rWrap * sindelta) / 2, // h1, H/2
2017  (trapClr.h() + 2 * sWrap - fWrap * sindelta) / 2, // h2, h/2
2018  (trapClr.L() + fWrap + rWrap) / 2., // dz, L/2
2019  alfWrap, //double aAngleAD , // alfa1
2020  aNom - ANom - (cryType > 9 ? 0 : 0.020 * mm),
2021  hNom - HNom //double aCoord15Y // y15
2022  );
2023 
2024  const DDName wrapDDName(wrapName() + sType);
2025  const DDSolid wrapSolid(mytrap(wrapDDName.name(), trapWrap));
2026  const DDLogicalPart wrapLog(wrapDDName, wrapMat(), wrapSolid);
2027 
2028  // Now wall trap
2029 
2030  const double alfWall(90 * deg + atan((bNom - aNom) / (hNom + sClr + 2 * sWrap + 2 * sWall)));
2031 
2032  const Trap trapWall((trapWrap.A() + 2 * sWall + rWall * singamma) / 2, // A/2
2033  (trapWrap.a() + 2 * sWall - fWall * singamma) / 2, // a/2
2034  (trapWrap.b() + 2 * sWall - fWall * sinbeta) / 2, // b/2
2035  (trapWrap.H() + 2 * sWall + rWall * sindelta) / 2, // H/2
2036  (trapWrap.h() + 2 * sWall - fWall * sindelta) / 2, // h/2
2037  (trapWrap.L() + fWall + rWall) / 2., // L/2
2038  alfWall, // alfa1
2039  aNom - ANom - (cryType < 10 ? 0.150 * mm : 0.100 * mm),
2040  hNom - HNom // y15
2041  );
2042 
2043  const DDName wallDDName(wallName() + sType);
2044  const DDSolid wallSolid(mytrap(wallDDName.name(), trapWall));
2045  const DDLogicalPart wallLog(wallDDName, wallMat(), wallSolid);
2046 
2047 #ifdef EDM_ML_DEBUG
2048  edm::LogVerbatim("EcalGeom") << "Traps:\n a: " << trapCry.a() << ", " << trapClr.a() << ", " << trapWrap.a()
2049  << ", " << trapWall.a() << "\n b: " << trapCry.b() << ", " << trapClr.b() << ", "
2050  << trapWrap.b() << ", " << trapWall.b() << "\n A: " << trapCry.A() << ", "
2051  << trapClr.A() << ", " << trapWrap.A() << ", " << trapWall.A()
2052  << "\n B: " << trapCry.B() << ", " << trapClr.B() << ", " << trapWrap.B() << ", "
2053  << trapWall.B() << "\n h: " << trapCry.h() << ", " << trapClr.h() << ", "
2054  << trapWrap.h() << ", " << trapWall.h() << "\n H: " << trapCry.H() << ", "
2055  << trapClr.H() << ", " << trapWrap.H() << ", " << trapWall.H()
2056  << "\n a1: " << trapCry.a1() / deg << ", " << trapClr.a1() / deg << ", "
2057  << trapWrap.a1() / deg << ", " << trapWall.a1() / deg
2058  << "\n a4: " << trapCry.a4() / deg << ", " << trapClr.a4() / deg << ", "
2059  << trapWrap.a4() / deg << ", " << trapWall.a4() / deg << "\n x15: " << trapCry.x15()
2060  << ", " << trapClr.x15() << ", " << trapWrap.x15() << ", " << trapWall.x15()
2061  << "\n y15: " << trapCry.y15() << ", " << trapClr.y15() << ", " << trapWrap.y15()
2062  << ", " << trapWall.y15();
2063 #endif
2064  // Now for placement of cry within clr
2065  const Vec3 cryToClr(0, 0, (rClr - fClr) / 2);
2066 
2067  cpv.position(cryLog,
2068  clrLog,
2069  copyOne,
2070  DDTranslation(0, 0, (rClr - fClr) / 2), //SAME as cryToClr above.
2071  DDRotation());
2072 
2073  if (0 != apdHere()) {
2074  cpv.position(
2075  apdLog,
2076  clrLog,
2077  ++copyAPD,
2078  DDTranslation(
2079  +trapCry.bl1() - apdX1(), +trapCry.h1() - apdZ(), -trapCry.dz() - apdThick() / 2. + (rClr - fClr) / 2.),
2080  DDRotation());
2081  cpv.position(
2082  apdLog,
2083  clrLog,
2084  ++copyAPD,
2085  DDTranslation(
2086  +trapCry.bl1() - apdX2(), +trapCry.h1() - apdZ(), -trapCry.dz() - apdThick() / 2. + (rClr - fClr) / 2.),
2087  DDRotation());
2088  }
2089 
2090  const Vec3 clrToWrap(0, 0, (rWrap - fWrap) / 2);
2091 
2092  cpv.position(clrLog,
2093  wrapLog,
2094  copyOne,
2095  DDTranslation(0, 0, (rWrap - fWrap) / 2), //SAME as cryToWrap
2096  DDRotation());
2097 
2098  // Now for placement of clr within wall
2099  const Vec3 wrapToWall1(0, 0, (rWall - fWall) / 2);
2100  const Vec3 wrapToWall(Vec3((cryType > 9 ? 0 : 0.005 * mm), 0, 0) + wrapToWall1);
2101 
2102  cpv.position(wrapLog,
2103  wallLog,
2104  copyOne,
2105  DDTranslation(Vec3((cryType > 9 ? 0 : 0.005 * mm), 0, 0) + wrapToWall1), //SAME as wrapToWall
2106  DDRotation());
2107 
2108  const Trap::VertexList vWall(trapWall.vertexList());
2109  const Trap::VertexList vCry(trapCry.vertexList());
2110 
2111  const double sidePrime((trapWall.a() - trapCry.a()) / 2);
2112  const double frontPrime(fWall + fWrap + fClr + LUnd / 2);
2113 
2114  // define web plates with clearance ===========================================
2115 
2116  if (1 == cryType) // first web plate: inside clearance volume
2117  {
2118  web(0,
2119  trapWall.b(),
2120  trapWall.B(),
2121  trapWall.L(),
2122  theta,
2123  vHAW[4] + Pt3D(0, hawYOffCry(), 0),
2124  hawRLog,
2125  zee,
2126  sidePrime,
2127  frontPrime,
2128  delta,
2129  cpv);
2130  zee += vecGapAlvEta()[0];
2131  }
2132 
2133  for (unsigned int etaAlv(1); etaAlv <= nCryPerAlvEta(); ++etaAlv) {
2134 #ifdef EDM_ML_DEBUG
2135  edm::LogVerbatim("EcalGeom") << "theta=" << theta / deg << ", sidePrime=" << sidePrime
2136  << ", frontPrime=" << frontPrime << ", zeta=" << zeta << ", delta=" << delta
2137  << ", zee=" << zee;
2138 #endif
2139  zee += 0.075 * mm + (side * cos(zeta) + trapWall.h() - sidePrime) / sin(theta);
2140 
2141 #ifdef EDM_ML_DEBUG
2142  edm::LogVerbatim("EcalGeom") << "New zee=" << zee;
2143 #endif
2144 
2145  // make transform for placing enclosed crystal
2146 
2147  const Pt3D trap2(vCry[2] + cryToClr + clrToWrap + wrapToWall);
2148 
2149  const Pt3D trap3(trap2 + Pt3D(0, -trapCry.h(), 0));
2150  const Pt3D trap1(trap3 + Pt3D(-trapCry.a(), 0, 0));
2151 
2152  const Pt3D wedge3(vHAW[4] + Pt3D(sidePrime, hawYOffCry(), zee));
2153  const Pt3D wedge2(wedge3 + Pt3D(0, trapCry.h() * cos(theta), -trapCry.h() * sin(theta)));
2154  const Pt3D wedge1(wedge3 + Pt3D(trapCry.a(), 0, 0));
2155 
2156  const Tf3D tForm1(trap1, trap2, trap3, wedge1, wedge2, wedge3);
2157 
2158  const double xx(0.050 * mm);
2159 
2160  const Tf3D tForm(HepGeom::Translate3D(xx, 0, 0) * tForm1);
2161 
2162  cpv.position(wallLog,
2163  hawRLog,
2164  etaAlv,
2165  DDTranslation(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()),
2166  myrot(wallLog.name().name() + "_" + std::to_string(etaAlv), tForm.getRotation()));
2167 
2168  theta -= delta;
2169  side = sidePrime;
2170  zeta = delta;
2171  }
2172  if (5 == cryType || 9 == cryType || 13 == cryType || 17 == cryType) // web plates
2173  {
2174  const unsigned int webIndex(cryType / 4);
2175  zee += 0.5 * vecGapAlvEta()[cryType] / sin(theta);
2176  web(webIndex,
2177  trapWall.a(),
2178  trapWall.A(),
2179  trapWall.L(),
2180  theta,
2181  vHAW[4] + Pt3D(0, hawYOffCry(), 0),
2182  hawRLog,
2183  zee,
2184  sidePrime,
2185  frontPrime,
2186  delta,
2187  cpv);
2188  zee += 0.5 * vecGapAlvEta()[cryType] / sin(theta);
2189  } else {
2190  if (17 != cryType)
2191  zee += vecGapAlvEta()[cryType] / sin(theta);
2192  }
2193  }
2194  // END filling Wedge with crystal plus supports --------------------------
2195 
2196  //------------------------------------------------------------------------
2197  //------------------------------------------------------------------------
2198  //------------------------------------------------------------------------
2199  //------------------------------------------------------------------------
2200  //**************** Material at outer radius of supermodule ***************
2201  //------------------------------------------------------------------------
2202  //------------------------------------------------------------------------
2203  //------------------------------------------------------------------------
2204  //------------------------------------------------------------------------
2205 
2206  if (0 != backHere()) {
2212 
2213  const DDTranslation outtra(backXOff() + backSideHeight() / 2, backYOff(), backSideLength() / 2);
2214 
2215  const double realBPthick(backPlateThick() + backPlate2Thick());
2216 
2217  DDSolid backPlateSolid(
2218  DDSolidFactory::box(backPlateName(), backPlateWidth() / 2., realBPthick / 2., backPlateLength() / 2.));
2219  const std::vector<double>& backPlateParms(backPlateSolid.parameters());
2220  const DDLogicalPart backPlateLog(backPlateName(), backPlateMat(), backPlateSolid);
2221 
2222  const DDTranslation backPlateTra(
2223  backSideHeight() / 2 + backPlateParms[1], 0 * mm, backPlateParms[2] - backSideLength() / 2);
2224 
2225  DDSolid backPlate2Solid(
2227 
2228  const DDLogicalPart backPlate2Log(backPlate2Name(), backPlate2Mat(), backPlate2Solid);
2229 
2230  const DDTranslation backPlate2Tra(0, -backPlateParms[1] + backPlate2Thick() / 2., 0);
2231  if (0 != backPlateHere()) {
2232  cpv.position(backPlate2Log, backPlateName(), copyOne, backPlate2Tra, DDRotation());
2233 
2234  cpv.position(backPlateLog,
2235  spmName(),
2236  copyOne,
2237  outtra + backPlateTra,
2238  myrot(backPlateName().name() + "Rot5", CLHEP::HepRotationZ(270 * deg)));
2239  }
2245 
2251 
2252  const Trap trapBS(backSideWidth() / 2., //double aHalfLengthXNegZLoY , // bl1, A/2
2253  backSideWidth() / 2., //double aHalfLengthXPosZLoY , // bl2, a/2
2254  backSideWidth() / 4., //double aHalfLengthXPosZHiY , // tl2, b/2
2255  backSideHeight() / 2., //double aHalfLengthYNegZ , // h1, H/2
2256  backSideHeight() / 2., //double aHalfLengthYPosZ , // h2, h/2
2257  backSideLength() / 2., //double aHalfLengthZ , // dz, L/2
2258  backSideAngle(), //double aAngleAD , // alfa1
2259  0, //double aCoord15X , // x15
2260  0 //double aCoord15Y // y15
2261  );
2262 
2263  const DDSolid backSideSolid(mytrap(backSideName().name(), trapBS));
2264  const DDLogicalPart backSideLog(backSideName(), backSideMat(), backSideSolid);
2265 
2266  const DDTranslation backSideTra1(0 * mm, backPlateWidth() / 2 + backSideYOff1(), 1 * mm);
2267  if (0 != backSideHere()) {
2268  cpv.position(
2269  backSideLog,
2270  spmName(),
2271  copyOne,
2272  outtra + backSideTra1,
2273  myrot(backSideName().name() + "Rot8", CLHEP::HepRotationX(180 * deg) * CLHEP::HepRotationZ(90 * deg)));
2274 
2275  const DDTranslation backSideTra2(0 * mm, -backPlateWidth() / 2 + backSideYOff2(), 1 * mm);
2276  cpv.position(backSideLog,
2277  spmName(),
2278  copyTwo,
2279  outtra + backSideTra2,
2280  myrot(backSideName().name() + "Rot9", CLHEP::HepRotationZ(90 * deg)));
2281  }
2287 
2288  //=====================
2289  const double backCoolWidth(backCoolBarWidth() + 2. * backCoolTankWidth());
2290 
2296 
2297  const double manifCut(2 * mm);
2298 
2299  DDSolid mBManifSolid(DDSolidFactory::tubs(
2300  mBManifName(), backCoolWidth / 2. - manifCut, 0, mBManifOutDiam() / 2, 0 * deg, 360 * deg));
2301  const DDLogicalPart mBManifLog(mBManifName(), mBManifMat(), mBManifSolid);
2302 
2303  const DDName mBManifWaName(ddname(mBManifName().name() + "Wa"));
2304  DDSolid mBManifWaSolid(DDSolidFactory::tubs(
2305  mBManifWaName, backCoolWidth / 2. - manifCut, 0, mBManifInnDiam() / 2, 0 * deg, 360 * deg));
2306  const DDLogicalPart mBManifWaLog(mBManifWaName, backPipeWaterMat(), mBManifWaSolid);
2307  cpv.position(mBManifWaLog, mBManifName(), copyOne, DDTranslation(0, 0, 0), DDRotation());
2308 
2314  //=====================
2315 
2321  const double deltaY(-5 * mm);
2322 
2323  DDSolid grEdgeSlotSolid(
2325  const DDLogicalPart grEdgeSlotLog(grEdgeSlotName(), grEdgeSlotMat(), grEdgeSlotSolid);
2326 
2327  unsigned int edgeSlotCopy(0);
2328  unsigned int midSlotCopy(0);
2329 
2330  DDLogicalPart grMidSlotLog[4];
2331 
2332  for (unsigned int iGr(0); iGr != vecGrilleHeight().size(); ++iGr) {
2333  DDName gName(ddname(grilleName() + std::to_string(iGr)));
2334  DDSolid grilleSolid(
2335  DDSolidFactory::box(gName, vecGrilleHeight()[iGr] / 2., backCoolWidth / 2., grilleThick() / 2.));
2336  const DDLogicalPart grilleLog(gName, grilleMat(), grilleSolid);
2337 
2338  const DDTranslation grilleTra(-realBPthick / 2 - vecGrilleHeight()[iGr] / 2,
2339  deltaY,
2340  vecGrilleZOff()[iGr] + grilleThick() / 2 - backSideLength() / 2);
2341  const DDTranslation gTra(outtra + backPlateTra + grilleTra);
2342 
2343  if (0 != grMidSlotHere() && 0 != iGr) {
2344  if (0 == (iGr - 1) % 2) {
2345  DDName mName(ddname(grMidSlotName() + std::to_string(iGr / 2)));
2346  DDSolid grMidSlotSolid(DDSolidFactory::box(
2347  mName, vecGrMidSlotHeight()[(iGr - 1) / 2] / 2., grMidSlotWidth() / 2., grilleThick() / 2.));
2348  grMidSlotLog[(iGr - 1) / 2] = DDLogicalPart(mName, grMidSlotMat(), grMidSlotSolid);
2349  }
2350  cpv.position(grMidSlotLog[(iGr - 1) / 2],
2351  gName,
2352  ++midSlotCopy,
2353  DDTranslation(
2354  vecGrilleHeight()[iGr] / 2. - vecGrMidSlotHeight()[(iGr - 1) / 2] / 2., +grMidSlotXOff(), 0),
2355  DDRotation());
2356  cpv.position(grMidSlotLog[(iGr - 1) / 2],
2357  gName,
2358  ++midSlotCopy,
2359  DDTranslation(
2360  vecGrilleHeight()[iGr] / 2. - vecGrMidSlotHeight()[(iGr - 1) / 2] / 2., -grMidSlotXOff(), 0),
2361  DDRotation());
2362  }
2363 
2364  if (0 != grEdgeSlotHere() && 0 != iGr) {
2365  cpv.position(
2366  grEdgeSlotLog,
2367  gName,
2368  ++edgeSlotCopy,
2369  DDTranslation(
2370  vecGrilleHeight()[iGr] / 2. - grEdgeSlotHeight() / 2., backCoolWidth / 2 - grEdgeSlotWidth() / 2., 0),
2371  DDRotation());
2372  cpv.position(grEdgeSlotLog,
2373  gName,
2374  ++edgeSlotCopy,
2375  DDTranslation(vecGrilleHeight()[iGr] / 2. - grEdgeSlotHeight() / 2.,
2376  -backCoolWidth / 2 + grEdgeSlotWidth() / 2.,
2377  0),
2378  DDRotation());
2379  }
2380  if (0 != grilleHere())
2381  cpv.position(grilleLog, spmName(), iGr, gTra, DDRotation());
2382 
2383  if ((0 != iGr % 2) && (0 != mBManifHere())) {
2384  cpv.position(mBManifLog,
2385  spmName(),
2386  iGr,
2387  gTra - DDTranslation(-mBManifOutDiam() / 2. + vecGrilleHeight()[iGr] / 2.,
2388  manifCut,
2389  grilleThick() / 2. + 3 * mBManifOutDiam() / 2.),
2390  myrot(mBManifName().name() + "R1", CLHEP::HepRotationX(90 * deg)));
2391  cpv.position(mBManifLog,
2392  spmName(),
2393  iGr - 1,
2394  gTra - DDTranslation(-3 * mBManifOutDiam() / 2. + vecGrilleHeight()[iGr] / 2.,
2395  manifCut,
2396  grilleThick() / 2 + 3 * mBManifOutDiam() / 2.),
2397  myrot(mBManifName().name() + "R2", CLHEP::HepRotationX(90 * deg)));
2398  }
2399  }
2400 
2406 
2412 
2413  DDSolid backCoolBarSolid(DDSolidFactory::box(
2415  const DDLogicalPart backCoolBarLog(backCoolBarName(), backCoolBarMat(), backCoolBarSolid);
2416 
2417  DDSolid backCoolBarSSSolid(DDSolidFactory::box(
2419  const DDLogicalPart backCoolBarSSLog(backCoolBarSSName(), backCoolBarSSMat(), backCoolBarSSSolid);
2420  const DDTranslation backCoolBarSSTra(0, 0, 0);
2421  cpv.position(backCoolBarSSLog, backCoolBarName(), copyOne, backCoolBarSSTra, DDRotation());
2422 
2423  DDSolid backCoolBarWaSolid(DDSolidFactory::box(
2425  const DDLogicalPart backCoolBarWaLog(backCoolBarWaName(), backCoolBarWaMat(), backCoolBarWaSolid);
2426  const DDTranslation backCoolBarWaTra(0, 0, 0);
2427  cpv.position(backCoolBarWaLog, backCoolBarSSName(), copyOne, backCoolBarWaTra, DDRotation());
2428 
2434 
2440 
2441  double thickVFE(0);
2442  for (unsigned int iLyr(0); iLyr != vecBackVFELyrThick().size(); ++iLyr) {
2443  thickVFE += vecBackVFELyrThick()[iLyr];
2444  }
2445  DDSolid backVFESolid(
2446  DDSolidFactory::box(backVFEName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., thickVFE / 2.));
2447  const DDLogicalPart backVFELog(backVFEName(), backVFEMat(), backVFESolid);
2448  DDTranslation offTra(0, 0, -thickVFE / 2);
2449  for (unsigned int iLyr(0); iLyr != vecBackVFELyrThick().size(); ++iLyr) {
2450  DDSolid backVFELyrSolid(DDSolidFactory::box(ddname(vecBackVFELyrName()[iLyr]),
2451  backCoolBarHeight() / 2.,
2452  backCoolBarWidth() / 2.,
2453  vecBackVFELyrThick()[iLyr] / 2.));
2454  const DDLogicalPart backVFELyrLog(
2455  ddname(vecBackVFELyrName()[iLyr]), ddmat(vecBackVFELyrMat()[iLyr]), backVFELyrSolid);
2456  const DDTranslation backVFELyrTra(0, 0, vecBackVFELyrThick()[iLyr] / 2);
2457  cpv.position(backVFELyrLog, backVFEName(), copyOne, backVFELyrTra + offTra, DDRotation());
2458  offTra += 2 * backVFELyrTra;
2459  }
2460 
2466 
2472 
2473  const double halfZCoolVFE(thickVFE + backCoolBarThick() / 2.);
2474  DDSolid backCoolVFESolid(
2475  DDSolidFactory::box(backCoolVFEName(), backCoolBarHeight() / 2., backCoolBarWidth() / 2., halfZCoolVFE));
2476  const DDLogicalPart backCoolVFELog(backCoolVFEName(), backCoolVFEMat(), backCoolVFESolid);
2477  if (0 != backCoolBarHere())
2478  cpv.position(backCoolBarLog, backCoolVFEName(), copyOne, DDTranslation(), DDRotation());
2479  if (0 != backCoolVFEHere())
2480  cpv.position(backVFELog,
2481  backCoolVFEName(),
2482  copyOne,
2483  DDTranslation(0, 0, backCoolBarThick() / 2. + thickVFE / 2.),
2484  DDRotation());
2485  cpv.position(backVFELog,
2486  backCoolVFEName(),
2487  copyTwo,
2488  DDTranslation(0, 0, -backCoolBarThick() / 2. - thickVFE / 2.),
2489  myrot(backVFEName().name() + "Flip", CLHEP::HepRotationX(180 * deg)));
2490 
2496 
2502  unsigned int iCVFECopy(1);
2503  unsigned int iSep(0);
2504  unsigned int iNSec(0);
2505  const unsigned int nMisc(vecBackMiscThick().size() / 4);
2506  for (unsigned int iMod(0); iMod != 4; ++iMod) {
2507  const double pipeLength(vecGrilleZOff()[2 * iMod + 1] - vecGrilleZOff()[2 * iMod] - grilleThick() - 3 * mm);
2508 
2509  const double pipeZPos(vecGrilleZOff()[2 * iMod + 1] - pipeLength / 2 - 1.5 * mm);
2510 
2511  // accumulate total height of parent volume
2512 
2513  double backCoolHeight(backCoolBarHeight() + mBCoolTubeOutDiam());
2514  for (unsigned int iMisc(0); iMisc != nMisc; ++iMisc) {
2515  backCoolHeight += vecBackMiscThick()[iMod * nMisc + iMisc];
2516  }
2517  double bottomThick(mBCoolTubeOutDiam());
2518  for (unsigned int iMB(0); iMB != vecMBLyrThick().size(); ++iMB) {
2519  backCoolHeight += vecMBLyrThick()[iMB];
2520  bottomThick += vecMBLyrThick()[iMB];
2521  }
2522 
2523  DDName backCName(ddname(vecBackCoolName()[iMod]));
2524  const double halfZBCool((pipeLength - 2 * mBManifOutDiam() - grilleZSpace()) / 2);
2525  DDSolid backCoolSolid(DDSolidFactory::box(backCName, backCoolHeight / 2., backCoolWidth / 2., halfZBCool));
2526  const DDLogicalPart backCoolLog(backCName, spmMat(), backCoolSolid);
2527 
2528  const DDTranslation bCoolTra(
2529  -realBPthick / 2 + backCoolHeight / 2 - vecGrilleHeight()[2 * iMod],
2530  deltaY,
2531  vecGrilleZOff()[2 * iMod] + grilleThick() + grilleZSpace() + halfZBCool - backSideLength() / 2);
2532  if (0 != backCoolHere())
2533  cpv.position(backCoolLog, spmName(), iMod + 1, outtra + backPlateTra + bCoolTra, DDRotation());
2534 
2535  //===
2536  const double backCoolTankHeight(backCoolBarHeight()); // - backBracketHeight() ) ;
2537 
2538  const double halfZTank(halfZBCool - 5 * cm);
2539 
2540  DDName bTankName(ddname(backCoolTankName() + std::to_string(iMod + 1)));
2541  DDSolid backCoolTankSolid(
2542  DDSolidFactory::box(bTankName, backCoolTankHeight / 2., backCoolTankWidth() / 2., halfZTank));
2543  const DDLogicalPart backCoolTankLog(bTankName, backCoolTankMat(), backCoolTankSolid);
2544  if (0 != backCoolTankHere())
2545  cpv.position(backCoolTankLog,
2546  backCName,
2547  copyOne,
2548  DDTranslation(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick,
2549  backCoolBarWidth() / 2. + backCoolTankWidth() / 2.,
2550  0),
2551  DDRotation());
2552 
2553  DDName bTankWaName(ddname(backCoolTankWaName() + std::to_string(iMod + 1)));
2554  DDSolid backCoolTankWaSolid(DDSolidFactory::box(bTankWaName,
2555  backCoolTankHeight / 2. - backCoolTankThick() / 2.,
2556  backCoolTankWaWidth() / 2.,
2557  halfZTank - backCoolTankThick() / 2.));
2558  const DDLogicalPart backCoolTankWaLog(bTankWaName, backCoolTankWaMat(), backCoolTankWaSolid);
2559  cpv.position(backCoolTankWaLog, bTankName, copyOne, DDTranslation(0, 0, 0), DDRotation());
2560 
2561  DDName bBracketName(ddname(backBracketName() + std::to_string(iMod + 1)));
2562  DDSolid backBracketSolid(
2563  DDSolidFactory::box(bBracketName, backBracketHeight() / 2., backCoolTankWidth() / 2., halfZTank));
2564  const DDLogicalPart backBracketLog(bBracketName, backBracketMat(), backBracketSolid);
2565  if (0 != backCoolTankHere())
2566  cpv.position(backBracketLog,
2567  backCName,
2568  copyOne,
2569  DDTranslation(backCoolBarHeight() - backCoolHeight / 2. - backBracketHeight() / 2. + bottomThick,
2570  -backCoolBarWidth() / 2. - backCoolTankWidth() / 2.,
2571  0),
2572  DDRotation());
2573 
2574  /* cpv.position( backBracketLog,
2575  backCName,
2576  copyTwo,
2577  DDTranslation( backCoolBarHeight() - backCoolHeight/2. - backBracketHeight()/2.,
2578  backCoolBarWidth()/2. + backCoolTankWidth()/2., 0),
2579  DDRotation() ) ;*/
2580 
2581  //===
2582 
2583  DDTranslation bSumTra(backCoolBarHeight() - backCoolHeight / 2. + bottomThick, 0, 0);
2584  for (unsigned int j(0); j != nMisc; ++j) // loop over miscellaneous layers
2585  {
2586  const DDName bName(ddname(vecBackMiscName()[iMod * nMisc + j]));
2587 
2588  DDSolid bSolid(DDSolidFactory::box(bName,
2589  vecBackMiscThick()[iMod * nMisc + j] / 2,
2591  halfZBCool));
2592 
2593  const DDLogicalPart bLog(bName, ddmat(vecBackMiscMat()[iMod * nMisc + j]), bSolid);
2594 
2595  const DDTranslation bTra(vecBackMiscThick()[iMod * nMisc + j] / 2, 0 * mm, 0 * mm);
2596 
2597  if (0 != backMiscHere())
2598  cpv.position(bLog, backCName, copyOne, bSumTra + bTra, DDRotation());
2599 
2600  bSumTra += 2 * bTra;
2601  }
2602 
2603  const double bHalfWidth(backCoolBarWidth() / 2. + backCoolTankWidth());
2604 
2605  if (0 != mBLyrHere()) {
2606  DDTranslation mTra(-backCoolHeight / 2. + mBCoolTubeOutDiam(), 0, 0);
2607  for (unsigned int j(0); j != vecMBLyrThick().size(); ++j) // loop over MB layers
2608  {
2609  const DDName mName(ddname(vecMBLyrName()[j] + "_" + std::to_string(iMod + 1)));
2610 
2611  DDSolid mSolid(DDSolidFactory::box(mName, vecMBLyrThick()[j] / 2, bHalfWidth, halfZBCool));
2612 
2613  const DDLogicalPart mLog(mName, ddmat(vecMBLyrMat()[j]), mSolid);
2614 
2615  mTra += DDTranslation(vecMBLyrThick()[j] / 2.0, 0 * mm, 0 * mm);
2616  cpv.position(mLog, backCName, copyOne, mTra, DDRotation());
2617  mTra += DDTranslation(vecMBLyrThick()[j] / 2.0, 0 * mm, 0 * mm);
2618  }
2619  }
2620 
2621  if (0 != mBCoolTubeHere()) {
2622  const DDName mBName(ddname(mBCoolTubeName() + "_" + std::to_string(iMod + 1)));
2623 
2624  DDSolid mBCoolTubeSolid(
2625  DDSolidFactory::tubs(mBName, halfZBCool, 0, mBCoolTubeOutDiam() / 2, 0 * deg, 360 * deg));
2626  const DDLogicalPart mBLog(mBName, mBCoolTubeMat(), mBCoolTubeSolid);
2627 
2628  const DDName mBWaName(ddname(mBCoolTubeName() + "Wa_" + std::to_string(iMod + 1)));
2629  DDSolid mBCoolTubeWaSolid(
2630  DDSolidFactory::tubs(mBWaName, halfZBCool, 0, mBCoolTubeInnDiam() / 2, 0 * deg, 360 * deg));
2631  const DDLogicalPart mBWaLog(mBWaName, backPipeWaterMat(), mBCoolTubeWaSolid);
2632  cpv.position(mBWaLog, mBName, copyOne, DDTranslation(0, 0, 0), DDRotation());
2633 
2634  for (unsigned int j(0); j != mBCoolTubeNum(); ++j) // loop over all MB cooling circuits
2635  {
2636  cpv.position(
2637  mBLog,
2638  backCName,
2639  2 * j + 1,
2640  DDTranslation(
2641  -backCoolHeight / 2.0 + mBCoolTubeOutDiam() / 2., -bHalfWidth + (j + 1) * bHalfWidth / 5, 0),
2642  DDRotation());
2643  }
2644  }
2645 
2651  if (0 != backPipeHere() && 0 != iMod) {
2652  DDName bPipeName(ddname(backPipeName() + "_" + std::to_string(iMod + 1)));
2653  DDName bInnerName(ddname(backPipeName() + "_H2O_" + std::to_string(iMod + 1)));
2654 
2655  DDSolid backPipeSolid(
2656  DDSolidFactory::tubs(bPipeName, pipeLength / 2, 0 * mm, vecBackPipeDiam()[iMod] / 2, 0 * deg, 360 * deg));
2657 
2658  DDSolid backInnerSolid(DDSolidFactory::tubs(bInnerName,
2659  pipeLength / 2,
2660  0 * mm,
2661  vecBackPipeDiam()[iMod] / 2 - vecBackPipeThick()[iMod],
2662  0 * deg,
2663  360 * deg));
2664 
2665  const DDLogicalPart backPipeLog(bPipeName, backPipeMat(), backPipeSolid);
2666 
2667  const DDLogicalPart backInnerLog(bInnerName, backPipeWaterMat(), backInnerSolid);
2668 
2669  const DDTranslation bPipeTra1(
2670  backXOff() + backSideHeight() - 0.7 * vecBackPipeDiam()[iMod],
2671  backYOff() + backPlateWidth() / 2 - backSideWidth() - 0.7 * vecBackPipeDiam()[iMod],
2672  pipeZPos);
2673 
2674  cpv.position(backPipeLog, spmName(), copyOne, bPipeTra1, DDRotation());
2675 
2676  const DDTranslation bPipeTra2(bPipeTra1.x(),
2677  backYOff() - backPlateWidth() / 2 + backSideWidth() + vecBackPipeDiam()[iMod],
2678  bPipeTra1.z());
2679 
2680  cpv.position(backPipeLog, spmName(), copyTwo, bPipeTra2, DDRotation());
2681 
2682  cpv.position(backInnerLog, bPipeName, copyOne, DDTranslation(), DDRotation());
2683  }
2689 
2690  //=================================================
2691 
2692  if (0 != dryAirTubeHere()) {
2693  DDName dryAirTubName(ddname(dryAirTubeName() + std::to_string(iMod + 1)));
2694 
2695  DDSolid dryAirTubeSolid(DDSolidFactory::tubs(
2696  dryAirTubName, pipeLength / 2, dryAirTubeInnDiam() / 2, dryAirTubeOutDiam() / 2, 0 * deg, 360 * deg));
2697 
2698  const DDLogicalPart dryAirTubeLog(dryAirTubName, dryAirTubeMat(), dryAirTubeSolid);
2699 
2700  const DDTranslation dryAirTubeTra1(
2701  backXOff() + backSideHeight() - 0.7 * dryAirTubeOutDiam() - vecBackPipeDiam()[iMod],
2702  backYOff() + backPlateWidth() / 2 - backSideWidth() - 1.2 * dryAirTubeOutDiam(),
2703  pipeZPos);
2704 
2705  cpv.position(dryAirTubeLog, spmName(), copyOne, dryAirTubeTra1, DDRotation());
2706 
2707  const DDTranslation dryAirTubeTra2(
2708  dryAirTubeTra1.x(),
2709  backYOff() - backPlateWidth() / 2 + backSideWidth() + 0.7 * dryAirTubeOutDiam(),
2710  dryAirTubeTra1.z());
2711 
2712  cpv.position(dryAirTubeLog, spmName(), copyTwo, dryAirTubeTra2, DDRotation());
2713  }
2714  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2715 
2721 
2722  DDTranslation cTra(backCoolBarHeight() / 2. - backCoolHeight / 2. + bottomThick, 0, -halfZTank + halfZCoolVFE);
2723  const unsigned int numSec(static_cast<unsigned int>(vecBackCoolNSec()[iMod]));
2724  for (unsigned int jSec(0); jSec != numSec; ++jSec) {
2725  const unsigned int nMax(static_cast<unsigned int>(vecBackCoolNPerSec()[iNSec++]));
2726  for (unsigned int iBar(0); iBar != nMax; ++iBar) {
2727  cpv.position(backCoolVFELog, backCName, iCVFECopy++, cTra, DDRotation());
2728  cTra += DDTranslation(0, 0, backCBStdSep());
2729  }
2730  cTra -= DDTranslation(0, 0, backCBStdSep()); // backspace to previous
2731  if (jSec != numSec - 1)
2732  cTra += DDTranslation(0, 0, vecBackCoolSecSep()[iSep++]); // now take atypical step
2733  }
2739  }
2740 
2746 
2752 
2753  double patchHeight(0);
2754  for (unsigned int iPatch(0); iPatch != vecPatchPanelThick().size(); ++iPatch) {
2755  patchHeight += vecPatchPanelThick()[iPatch];
2756  }
2757 
2759  patchHeight / 2.,
2760  backCoolBarWidth() / 2.,
2761  (vecSpmZPts().back() - vecGrilleZOff().back() - grilleThick()) / 2));
2762 
2763  const std::vector<double>& patchParms(patchSolid.parameters());
2764 
2765  const DDLogicalPart patchLog(patchPanelName(), spmMat(), patchSolid);
2766 
2767  const DDTranslation patchTra(backXOff() + 4 * mm, 0 * mm, vecGrilleZOff().back() + grilleThick() + patchParms[2]);
2768  if (0 != patchPanelHere())
2769  cpv.position(patchLog, spmName(), copyOne, patchTra, DDRotation());
2770 
2771  DDTranslation pTra(-patchParms[0], 0, 0);
2772 
2773  for (unsigned int j(0); j != vecPatchPanelNames().size(); ++j) {
2774  const DDName pName(ddname(vecPatchPanelNames()[j]));
2775 
2776  DDSolid pSolid(DDSolidFactory::box(pName, vecPatchPanelThick()[j] / 2., patchParms[1], patchParms[2]));
2777 
2778  const DDLogicalPart pLog(pName, ddmat(vecPatchPanelMat()[j]), pSolid);
2779 
2780  pTra += DDTranslation(vecPatchPanelThick()[j] / 2, 0 * mm, 0 * mm);
2781 
2782  cpv.position(pLog, patchPanelName(), copyOne, pTra, DDRotation());
2783 
2784  pTra += DDTranslation(vecPatchPanelThick()[j] / 2, 0 * mm, 0 * mm);
2785  }
2791 
2797 
2798  if (0 != pincerRodHere()) {
2799  // Make hierarchy of rods, envelopes, blocks, shims, and cutouts
2800 
2801  DDSolid rodSolid(
2802  DDSolidFactory::box(pincerRodName(), pincerEnvWidth() / 2., pincerEnvHeight() / 2., ilyLength / 2));
2803  const DDLogicalPart rodLog(pincerRodName(), pincerRodMat(), rodSolid);
2804 
2805  DDSolid envSolid(
2807  const DDLogicalPart envLog(pincerEnvName(), pincerEnvMat(), envSolid);
2808  const std::vector<double>& envParms(envSolid.parameters());
2809 
2810  DDSolid blkSolid(
2812  const DDLogicalPart blkLog(pincerBlkName(), pincerBlkMat(), blkSolid);
2813  const std::vector<double>& blkParms(blkSolid.parameters());
2814  cpv.position(blkLog,
2815  pincerEnvName(),
2816  copyOne,
2817  DDTranslation(0, 0, pincerEnvLength() / 2 - pincerBlkLength() / 2),
2818  DDRotation());
2819 
2820  DDSolid cutSolid(
2822  const DDLogicalPart cutLog(pincerCutName(), pincerCutMat(), cutSolid);
2823  const std::vector<double>& cutParms(cutSolid.parameters());
2824  cpv.position(
2825  cutLog,
2826  pincerBlkName(),
2827  copyOne,
2828  DDTranslation(
2829  +blkParms[0] - cutParms[0] - pincerShim1Width() + pincerShim2Width(), -blkParms[1] + cutParms[1], 0),
2830  DDRotation());
2831 
2832  DDSolid shim2Solid(DDSolidFactory::box(
2834  const DDLogicalPart shim2Log(pincerShim2Name(), pincerShimMat(), shim2Solid);
2835  const std::vector<double>& shim2Parms(shim2Solid.parameters());
2836  cpv.position(shim2Log,
2837  pincerCutName(),
2838  copyOne,
2839  DDTranslation(+cutParms[0] - shim2Parms[0], -cutParms[1] + shim2Parms[1], 0),
2840  DDRotation());
2841 
2843  pincerShim1Width() / 2.,
2844  pincerShimHeight() / 2.,
2845  (pincerEnvLength() - pincerBlkLength()) / 2));
2846 
2847  const DDLogicalPart shim1Log(pincerShim1Name(), pincerShimMat(), shim1Solid);
2848  const std::vector<double>& shim1Parms(shim1Solid.parameters());
2849  cpv.position(
2850  shim1Log,
2851  pincerEnvName(),
2852  copyOne,
2853  DDTranslation(+envParms[0] - shim1Parms[0], -envParms[1] + shim1Parms[1], -envParms[2] + shim1Parms[2]),
2854  DDRotation());
2855 
2856  for (unsigned int iEnv(0); iEnv != vecPincerEnvZOff().size(); ++iEnv) {
2857  cpv.position(envLog,
2858  pincerRodName(),
2859  1 + iEnv,
2860  DDTranslation(0, 0, -ilyLength / 2. + vecPincerEnvZOff()[iEnv] - pincerEnvLength() / 2.),
2861  DDRotation());
2862  }
2863 
2864  // Place the rods
2865  // const double radius ( fawRadOff() - pincerEnvHeight()/2 -1*mm ) ;
2866  const double radius(ilyRMin - pincerEnvHeight() / 2 - 1 * mm);
2867 
2868  const DDName xilyName(ddname(ilyName() + std::to_string(vecIlyMat().size() - 1)));
2869 
2870  for (unsigned int iRod(0); iRod != vecPincerRodAzimuth().size(); ++iRod) {
2871  const DDTranslation rodTra(
2872  radius * cos(vecPincerRodAzimuth()[iRod]), radius * sin(vecPincerRodAzimuth()[iRod]), 0);
2873 
2874  cpv.position(rodLog,
2875  xilyName,
2876  1 + iRod,
2877  rodTra,
2878  myrot(pincerRodName().name() + std::to_string(iRod),
2879  CLHEP::HepRotationZ(90 * deg + vecPincerRodAzimuth()[iRod])));
2880  }
2881  }
2887  }
2888  }
2889 
2890 #ifdef EDM_ML_DEBUG
2891  edm::LogVerbatim("EcalGeom") << "******** DDEcalBarrelAlgo test: end it...";
2892 #endif
2893 }
2894 
2896 DDRotation DDEcalBarrelAlgo::myrot(const std::string& s, const CLHEP::HepRotation& r) const {
2897  return DDrot(
2898  ddname(m_idNameSpace + ":" + s),
2899  std::make_unique<DDRotationMatrix>(r.xx(), r.xy(), r.xz(), r.yx(), r.yy(), r.yz(), r.zx(), r.zy(), r.zz()));
2900 }
2901 
2903 
2905  const pair<std::string, std::string> temp(DDSplit(s));
2906  if (temp.second.empty()) {
2907  return DDName(temp.first, m_idNameSpace);
2908  } else {
2909  return DDName(temp.first, temp.second);
2910  }
2911 }
2912 
2914  return DDSolidFactory::trap(
2915  ddname(s), t.dz(), t.theta(), t.phi(), t.h1(), t.bl1(), t.tl1(), t.alp1(), t.h2(), t.bl2(), t.tl2(), t.alp2());
2916 }
2917 
2918 void DDEcalBarrelAlgo::web(unsigned int iWeb,
2919  double bWeb,
2920  double BWeb,
2921  double LWeb,
2922  double theta,
2923  const HepGeom::Point3D<double>& corner,
2924  const DDLogicalPart& logPar,
2925  double& zee,
2926  double side,
2927  double front,
2928  double delta,
2929  DDCompactView& cpv) {
2930  const unsigned int copyOne(1);
2931 
2932  const double LWebx(vecWebLength()[iWeb]);
2933 
2934  const double BWebx(bWeb + (BWeb - bWeb) * LWebx / LWeb);
2935 
2936  const double thick(vecWebPlTh()[iWeb] + vecWebClrTh()[iWeb]);
2937  const Trap trapWebClr(BWebx / 2, // A/2
2938  bWeb / 2, // a/2
2939  bWeb / 2, // b/2
2940  thick / 2, // H/2
2941  thick / 2, // h/2
2942  LWebx / 2, // L/2
2943  90 * deg, // alfa1
2944  bWeb - BWebx, // x15
2945  0 // y15
2946  );
2947  const DDName webClrDDName(webClrName() + std::to_string(iWeb));
2948  const DDSolid webClrSolid(mytrap(webClrDDName.name(), trapWebClr));
2949  const DDLogicalPart webClrLog(webClrDDName, webClrMat(), webClrSolid);
2950 
2951  const Trap trapWebPl(trapWebClr.A() / 2, // A/2
2952  trapWebClr.a() / 2, // a/2
2953  trapWebClr.b() / 2, // b/2
2954  vecWebPlTh()[iWeb] / 2, // H/2
2955  vecWebPlTh()[iWeb] / 2, // h/2
2956  trapWebClr.L() / 2., // L/2
2957  90 * deg, // alfa1
2958  trapWebClr.b() - trapWebClr.B(), // x15
2959  0 // y15
2960  );
2961  const DDName webPlDDName(webPlName() + std::to_string(iWeb));
2962  const DDSolid webPlSolid(mytrap(webPlDDName.fullname(), trapWebPl));
2963  const DDLogicalPart webPlLog(webPlDDName, webPlMat(), webPlSolid);
2964 
2965  cpv.position(webPlLog, // place plate inside clearance volume
2966  webClrDDName,
2967  copyOne,
2968  DDTranslation(0, 0, 0),
2969  DDRotation());
2970 
2971  const Trap::VertexList vWeb(trapWebClr.vertexList());
2972 
2973  zee += trapWebClr.h() / sin(theta);
2974 
2975  const double beta(theta + delta);
2976 
2977  const double zWeb(zee - front * cos(beta) + side * sin(beta));
2978  const double yWeb(front * sin(beta) + side * cos(beta));
2979 
2980  const Pt3D wedge3(corner + Pt3D(0, -yWeb, zWeb));
2981  const Pt3D wedge2(wedge3 + Pt3D(0, trapWebClr.h() * cos(theta), -trapWebClr.h() * sin(theta)));
2982  const Pt3D wedge1(wedge3 + Pt3D(trapWebClr.a(), 0, 0));
2983 
2984 #ifdef EDM_ML_DEBUG
2985  edm::LogVerbatim("EcalGeom") << "trap1=" << vWeb[0] << ", trap2=" << vWeb[2] << ", trap3=" << vWeb[3];
2986 
2987  edm::LogVerbatim("EcalGeom") << "wedge1=" << wedge1 << ", wedge2=" << wedge2 << ", wedge3=" << wedge3;
2988 #endif
2989  const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3);
2990 
2991  if (0 != webHere())
2992  cpv.position(webClrLog,
2993  logPar,
2994  copyOne,
2995  DDTranslation(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()),
2996  myrot(webClrLog.name().name() + std::to_string(iWeb), tForm.getRotation()));
2997 }
2998 
3000 
3001 DEFINE_EDM_PLUGIN(DDAlgorithmFactory, DDEcalBarrelAlgo, "ecal:DDEcalBarrelAlgo");
double wrapReAlv() const
std::vector< double > m_vecSpmBRota
size
Write out results.
double backCoolBarWaThick() const
const std::string & backCoolTankWaName() const
std::string m_IlyBndlMat
DDMaterial grMidSlotMat() const
Log< level::Info, true > LogVerbatim
unsigned int m_MBCoolTubeNum
DDName ilyFEMName() const
std::string m_BackCoolTankMat
std::string m_GridName
std::string m_SpmSideMat
unsigned int m_SpmNPerHalf
HepGeom::Transform3D Tf3D
double mBLyrHere() const
double spmSideYOffP() const
~DDEcalBarrelAlgo() override
DDName backCoolBarWaName() const
const std::string & webClrName() const
DDMaterial grilleMat() const
DDMaterial barMat() const
std::string m_WebPlName
double backSideWidth() const
DDName barName() const
DDName pincerEnvName() const
std::string m_BackVFEName
const std::vector< double > & vecBackMiscThick() const
void execute(DDCompactView &cpv) override
const std::vector< double > & vecBarRota2() const
CLHEP::HepRotation Rota
std::string m_BackCoolTankWaName
std::vector< double > m_vecIlyPipeLength
double fawPhiRot() const
const std::string & webPlName() const
const std::vector< double > & vecNomCryDimAR() const
double fawDelPhi() const
std::string m_BackPipeMat
std::vector< double > m_vecIlyFanOutPhi
double ilyBndlLength() const
EcalTrapezoidParameters Trap
const std::vector< double > & vecBackCoolNPerSec() const
DDMaterial backPlateMat() const
const std::string & ilyPipeName() const
double backCBStdSep() const
DDMaterial backCoolBarMat() const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
const std::vector< double > & vecBackPipeDiam() const
std::string m_IlyDiffName
DDName backSideName() const
const std::vector< double > & vecGrilleZOff() const
const std::vector< double > & vecNomCryDimCF() const
std::string m_IlyFanOutName
DDMaterial backVFEMat() const
const std::vector< std::string > & vecIlyMat() const
const std::vector< std::string > & vecBackVFELyrMat() const
DDName ilyFanOutName() const
std::vector< double > m_vecWebLength
double underAF() const
std::string m_DryAirTubeMat
DDMaterial pincerRodMat() const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
double mBManifHere() const
DDName pincerShim2Name() const
const std::string & wallName() const
DDMaterial pincerCutMat() const
std::string m_BackCoolBarSSName
double spmCutThick() const
double pincerEnvWidth() const
double pincerCutWidth() const
std::vector< double > m_vecSpmZPts
double grilleThick() const
double apdZ() const
const std::string & wrapName() const
DDName ddname(const std::string &s) const
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:551
DDSolid mytrap(const std::string &s, const Trap &t) const
const std::vector< double > & vecBarRMax() const
double backPlateThick() const
const std::vector< std::string > & vecBackMiscName() const
double ilyPipeOD() const
double ilyPTMHere() const
std::vector< std::string > m_vecPatchPanelMat
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const std::vector< double > & vecIlyFEMZ() const
std::vector< double > m_vecBarZPts
std::vector< double > m_vecBackMiscThick
double ilyPTMLength() const
double grEdgeSlotWidth() const
double underBR() const
double gridHere() const
DDMaterial wrapMat() const
double ilyFEMLength() const
const std::vector< double > & vecGrMidSlotHeight() const
const std::string & grMidSlotName() const
double spmPhiOff() const
double hawRCutZ() const
unsigned int nCryPerAlvEta() const
double backYOff() const
double backCoolTankHere() const
double ilyDelPhi() const
std::string m_PincerShim2Name
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
double backXOff() const
std::vector< double > m_vecSpmRMin
DDName spmCutName() const
#define M_PI_2
const std::vector< double > & vecSpmBTran() const
std::vector< double > m_vecGrilleZOff
double spmLowPhi() const
std::string to_string(const V &value)
Definition: OMSAccess.h:71
double dryAirTubeInnDiam() const
DDMaterial spmMat() const
double mBManifInnDiam() const
std::string m_BackPipeWaterMat
std::string m_PincerShim1Name
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:125
std::vector< double > m_vecGrilleHeight
std::string m_SpmSideName
DDMaterial backPipeWaterMat() const
double grilleZSpace() const
std::vector< std::string > m_vecBackVFELyrMat
std::vector< double > m_vecIlyFEMPhi
DDName spmSideName() const
static std::string & ns()
std::string m_BackSideName
const std::string & idNameSpace() const
const std::string & grilleName() const
const std::vector< double > & vecIlyPipeZ() const
double underAR() const
const std::vector< double > & vecSpmCutTM() const
std::string m_WrapName
double wallFrAlv() const
double nomCryDimAF() const
std::string m_WallName
double grMidSlotWidth() const
DDName ilyPTMName() const
double grilleWidth() const
const std::string & clrName() const
std::string m_WebPlMat
double pincerEnvLength() const
std::string m_IlyFEMMat
double pincerBlkLength() const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
double fawPhiOff() const
DDMaterial backCoolBarSSMat() const
std::string m_PincerRodMat
double apdSide() const
std::vector< double > m_vecBarRMax
std::string m_PincerCutMat
double hawRHBIG() const
const std::vector< std::string > & vecMBLyrName() const
const std::vector< double > & vecSpmHere() const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
std::string m_GrEdgeSlotMat
std::vector< double > m_vecSpmTran
const std::vector< double > & vecSpmRMax() const
double spmSideYOffM() const
DDName patchPanelName() const
double nomCryDimLZ() const
HepGeom::Point3D< double > Pt3D
double barPhiLo() const
std::vector< double > m_vecIlyPTMZ
DDMaterial ilyBndlMat() const
std::string m_BackPlate2Name
unsigned int m_NFawPerSupm
const std::vector< double > & vecIlyPipeLength() const
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
std::vector< double > m_vecBarRota2
unsigned int nCryTypes() const
double backCoolHere() const
std::string m_BackPipeName
std::string m_idNameSpace
const std::vector< double > & vecWebLength() const
double ilyDiffLength() const
std::string m_IlyFanOutMat
std::string m_PincerShimMat
DDMaterial grEdgeSlotMat() const
double fawRadOff() const
DDName ilyBndlName() const
double backMiscHere() const
const std::string & backCoolTankName() const
std::vector< double > m_vecBackCoolNPerSec
std::vector< double > m_vecSpmCutTM
double backPlateLength() const
double wallReAlv() const
const std::vector< double > & vecBarZPts() const
std::vector< double > m_vecWebClrTh
double mBCoolTubeHere() const
const std::string & ilyName() const
const std::vector< double > & vecIlyFanOutPhi() const
double ilyFanOutHeight() const
const std::string & backPipeName() const
DDMaterial cryMat() const
std::string m_GrMidSlotMat
DDMaterial ilyDiffMat() const
unsigned int m_NCryPerAlvEta
std::vector< double > m_vecBarRota
DDMaterial wallMat() const
const std::vector< double > & vecBackVFELyrThick() const
std::vector< double > m_vecBackCoolNSec
const std::vector< double > & vecIlyPTMPhi() const
std::vector< double > m_vecNomCryDimCR
double backHere() const
DDMaterial webPlMat() const
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
double hawRhsml() const
double ilyDiffOff() const
std::vector< double > m_vecPatchPanelThick
std::string m_BackPlate2Mat
double spmCutRP() const
std::string m_IlyDiffMat
double backSideHeight() const
const std::vector< double > & vecNomCryDimBR() const
std::vector< double > m_vecNomCryDimAR
HepGeom::RotateZ3D RoZ3D
double grMidSlotHere() const
unsigned int m_NCryTypes
double patchPanelHere() const
DDMaterial pincerShimMat() const
std::vector< std::string > m_vecIlyMat
const std::vector< std::string > & vecPatchPanelMat() const
std::string m_IlyPTMMat
DDMaterial backPipeMat() const
DDName hawRName() const
const std::vector< double > & vecPatchPanelThick() const
std::vector< double > m_vecBackPipeThick
std::string m_IlyPipeName
double mBCoolTubeInnDiam() const
T sqrt(T t)
Definition: SSEVec.h:19
int spmCutShow() const
double backCoolBarWidth() const
std::string m_MBCoolTubeMat
double grEdgeSlotHeight() const
double apdHere() const
const std::string & mBCoolTubeName() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDName backCoolVFEName() const
std::string m_IlyPTMName
double underCF() const
double underBF() const
std::vector< double > m_vecPincerRodAzimuth
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
double backCoolTankThick() const
CLHEP::Hep3Vector Vec3
std::string m_IlyFEMName
const std::vector< double > & vecBarRota3() const
double dryAirTubeHere() const
const std::vector< std::string > & vecPatchPanelNames() const
double pincerShim2Width() const
double mBManifOutDiam() const
double spmCutRM() const
std::vector< std::string > m_vecMBLyrMat
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double backBracketHeight() const
double backSideHere() const
double clrFrAlv() const
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
const std::vector< double > & vecMBLyrThick() const
DDMaterial backCoolBarWaMat() const
const std::vector< double > & vecBarTran() const
double pincerShim1Width() const
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition: DDSolid.cc:667
double wrapThAlv() const
DDName backPlateName() const
std::vector< double > m_vecIlyThick
double pincerCutHeight() const
double backCoolTankWidth() const
std::vector< double > m_vecIlyPipePhi
DDMaterial apdMat() const
double mBCoolTubeNum() const
double backCoolVFEHere() const
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
Definition: DDSolid.cc:609
DDMaterial pincerBlkMat() const
double spmExpWide() const
double clrReAlv() const
const std::vector< double > & vecWebPlTh() const
std::string m_BackPlateMat
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
Definition: DDSolid.cc:547
const std::vector< double > & vecIlyPTMZ() const
std::string m_PincerCutName
HepGeom::RotateX3D RoX3D
double ilyPhiLow() const
double backPlateWidth() const
std::string m_MBCoolTubeName
double hawYOffCry() const
double grMidSlotXOff() const
std::string m_BackCoolVFEName
std::vector< std::string > m_vecBackVFELyrName
DDName backCoolBarSSName() const
const std::vector< double > & vecIlyFEMPhi() const
std::vector< double > m_vecPincerEnvZOff
DDMaterial webClrMat() const
std::string m_PincerEnvName
DDMaterial clrMat() const
std::vector< double > m_vecBackVFELyrThick
std::string m_BackCoolTankWaMat
std::vector< double > m_vecBackCoolSecSep
unsigned int spmNPerHalf() const
DDMaterial ilyPTMMat() const
DDMaterial mBCoolTubeMat() const
const N & name() const
Definition: DDBase.h:59
double barPhiHi() const
double backCoolBarHeight() const
double backPlateHere() const
std::vector< double > m_vecNomCryDimBF
CaloCellGeometry::Pt3D Pt3D
std::string m_BackBracketName
std::string m_BackCoolMat
const std::vector< double > & vecBackCoolNSec() const
DDName backPlate2Name() const
DDName apdName() const
double ilyPipeID() const
std::string m_PincerRodName
DDMaterial backCoolVFEMat() const
std::string m_GrilleMat
double ilyPTMHeight() const
double hawRCutY() const
std::string m_BackCoolTankName
double wallThAlv() const
const std::vector< double > & vecBackPipeThick() const
const std::vector< double > & vecIlyPipeType() const
const std::vector< double > & vecWebClrTh() const
DDMaterial ilyFanOutMat() const
double spmSideThick() const
double spmSideHigh() const
std::string m_BackCoolBarSSMat
DDRotation myrot(const std::string &s, const CLHEP::HepRotation &r) const
Create a DDRotation from a string converted to DDName and CLHEP::HepRotation converted to DDRotationM...
std::string m_BackCoolBarName
const std::vector< double > & vecIlyThick() const
DDMaterial pincerEnvMat() const
std::vector< double > vecPincerRodAzimuth() const
double spmExpYOff() const
DDName pincerShim1Name() const
std::vector< double > m_vecBarRMin
DDName pincerCutName() const
std::string m_GrilleName
DDName pincerBlkName() const
std::vector< double > m_vecNomCryDimBR
std::vector< double > m_vecNomCryDimCF
std::vector< std::string > m_vecBackMiscMat
std::vector< std::string > m_vecMBLyrName
DDName gridName() const
double apdX2() const
double gridThick() const
double apdX1() const
std::vector< double > m_vecIlyFanOutZ
double hawRCutDelY() const
std::vector< double > m_vecIlyPipeZ
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
Definition: DDSolid.cc:599
double backSideYOff2() const
DDMaterial gridMat() const
double fawHere() const
std::vector< double > m_vecSpmCutTP
const std::vector< double > & vecSpmBRota() const
DDName mBManifName() const
DDName backCoolBarName() const
double backPlate2Thick() const
double barHere() const
const std::vector< double > & vecSpmCutTP() const
double grilleHere() const
double backCoolBarThick() const
std::string m_PincerBlkMat
std::vector< std::string > m_vecPatchPanelNames
const std::vector< std::string > & vecMBLyrMat() const
double ilyFanOutHere() const
HepGeom::RotateY3D RoY3D
double backCoolBarHere() const
std::vector< double > m_vecSpmRMax
DDMaterial backSideMat() const
std::vector< double > m_vecSpmBTran
double backSideAngle() const
std::string m_SpmCutName
std::vector< double > m_vecIlyPTMPhi
const std::vector< std::string > & vecBackMiscMat() const
std::string m_GrEdgeSlotName
double ilyFanOutLength() const
DDName spmName() const
DDMaterial backCoolTankMat() const
std::string m_PincerBlkName
DDMaterial ilyPipeMat() const
std::string m_BackCoolBarWaMat
HepGeom::ReflectZ3D RfZ3D
double ilyHere() const
double ilyBndlOff() const
const std::vector< double > & vecIlyFanOutZ() const
std::string m_IlyBndlName
double underCR() const
unsigned int nFawPerSupm() const
const std::vector< double > & vecSpmRota() const
std::string m_BackPlateName
std::vector< double > m_vecIlyPipeType
std::vector< double > m_vecGapAlvEta
std::string m_HawRName
double pincerRodHere() const
double backCoolBarSSThick() const
std::string m_PincerEnvMat
std::vector< double > m_vecWebPlTh
double ilyFEMWidth() const
const std::string & cryName() const
double ilyPipeHere() const
const std::vector< double > & vecBarRMin() const
std::string m_BackCoolVFEMat
std::string m_WebClrName
double clrThAlv() const
const std::vector< double > & vecSpmZPts() const
double pincerEnvHeight() const
std::vector< double > m_vecMBLyrThick
const std::vector< double > & vecNomCryDimCR() const
DDName fawName() const
const std::vector< std::string > & vecBackVFELyrName() const
DDName pincerRodName() const
std::string m_MBManifMat
std::vector< double > m_vecGrMidSlotHeight
std::string m_BackVFEMat
const std::vector< double > & vecBarRota() const
const std::vector< double > & vecNomCryDimBF() const
std::string m_BackCoolBarMat
std::string m_BackSideMat
DDName backVFEName() const
DDMaterial backBracketMat() const
std::vector< double > m_vecIlyFEMZ
#define DEFINE_EDM_PLUGIN(factory, type, name)
DDMaterial ilyFEMMat() const
DDMaterial ddmat(const std::string &s) const
DDMaterial spmSideMat() const
std::string m_MBManifName
const std::string & dryAirTubeName() const
std::string m_GrMidSlotName
const std::vector< double > & vecIlyPipePhi() const
const std::vector< double > & vecSpmTran() const
DDName ilyDiffName() const
double pincerShimHeight() const
const std::vector< double > & vecGrilleHeight() const
DDName grEdgeSlotName() const
double backSideYOff1() const
static constexpr float b2
double webHere() const
double wrapFrAlv() const
DDMaterial mBManifMat() const
double ilyFanOutWidth() const
std::vector< std::string > m_vecBackMiscName
DDMaterial backPlate2Mat() const
DDMaterial dryAirTubeMat() const
double grEdgeSlotHere() const
std::string m_PatchPanelName
std::string m_DryAirTubeName
double spmExpThick() const
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
Geom::Theta< T > theta() const
const std::vector< double > & vecGapAlvEta() const
std::string m_BackCoolBarWaName
const std::vector< double > & vecSpmRMin() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
HepGeom::Rotate3D Ro3D
std::vector< double > m_vecSpmRota
double ilyFEMHeight() const
const std::vector< std::string > & vecBackCoolName() const
std::vector< double > m_vecBackPipeDiam
CaloCellGeometry::Pt3DVec VertexList
std::vector< double > vecPincerEnvZOff() const
DDMaterial backCoolMat() const
double backCoolTankWaWidth() const
double dryAirTubeOutDiam() const
const std::string & backBracketName() const
double mBCoolTubeOutDiam() const
double ilyPTMWidth() const
DDMaterial backCoolTankWaMat() const
std::vector< double > m_vecSpmHere
HepGeom::Translate3D Tl3D
void web(unsigned int iWeb, double bWeb, double BWeb, double LWeb, double theta, const Pt3D &corner, const DDLogicalPart &logPar, double &zee, double side, double front, double delta, DDCompactView &cpv)
std::string m_BackBracketMat
static constexpr float b1
std::vector< double > m_vecBarRota3
std::vector< double > m_vecBarTran
double apdThick() const
double spmDelPhi() const
double backPipeHere() const
std::string m_IlyPipeMat
double underLZ() const
const std::vector< double > & vecBackCoolSecSep() const
std::vector< std::string > m_vecBackCoolName
std::string m_WebClrMat
double backSideLength() const