CMS 3D CMS Logo

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