CMS 3D CMS Logo

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