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