Overlap in closing cone corrected (thanks to Ivana Hrivnacova)
[u/mrichter/AliRoot.git] / STRUCT / AliSHILvF.cxx
CommitLineData
5aba2f60 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
12133ee7 18Revision 1.5 2001/03/16 16:26:05 morsch
19Put vacuum in beam-pipe not air.
20
9d5c07b4 21Revision 1.4 2001/01/31 11:55:27 hristov
22Loop variables declared once (required by HP)
23
3a685df6 24Revision 1.3 2001/01/30 12:28:27 morsch
25Recess station 1 changed do make space for chambers.
26
e2e83b79 27Revision 1.2 2000/12/04 16:30:02 morsch
28Update to geometry defined for the Muon Spectrometer Addendum to the TDR.
29
5aba2f60 30*/
31
32
33#include "AliSHILvF.h"
34#include "AliRun.h"
a0cb6c86 35#include "AliMC.h"
5aba2f60 36#include "AliConst.h"
37#include "AliALIFE.h"
38
39ClassImp(AliSHILvF)
40
41//_____________________________________________________________________________
42AliSHILvF::AliSHILvF()
43{
44 //
45 // Default constructor for muon shield
46 //
47}
48
49//_____________________________________________________________________________
50AliSHILvF::AliSHILvF(const char *name, const char *title)
51 : AliSHIL(name,title)
52{
53 //
54 // Standard constructor for muon shield
55 //
56 SetMarkerColor(7);
57 SetMarkerStyle(2);
58 SetMarkerSize(0.4);
59 // Pb cone not yet compatible with muon chamber inner radii
60 // Switched off by default
61 fPbCone=kFALSE;
62}
63
64//_____________________________________________________________________________
65void AliSHILvF::CreateGeometry()
66{
67 //
68 // Build muon shield geometry
69 //
70 //
71 //Begin_Html
72 /*
73 <img src="picts/AliSHILvF.gif">
74 */
75 //End_Html
76 //Begin_Html
77 /*
78 <img src="picts/AliSHILvFTree.gif">
79 */
80 //End_Html
81
82 Float_t cpar[5], cpar0[5], tpar[3], par1[39], par2[27], par3[27],
a0cb6c86 83 par4[21], par0[45];
5aba2f60 84 Float_t dz, dZ;
85
86 Int_t *idtmed = fIdtmed->GetArray()-1699;
87
88#include "ABSOSHILConst.h"
89#include "SHILConst.h"
90
91enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
9d5c07b4 92 kNiCuW=1720, kVacuum=1715, kAir=1714, kConcrete=1716,
5aba2f60 93 kPolyCH2=1717, kSteel=1709, kInsulation=1713};
94//
95// Material of the rear part of the shield
96 Int_t iHeavy=kNiCuW;
97 if (fPbCone) iHeavy=kPb;
98//
99//
100// begin Fluka
101 AliALIFE* flukaGeom = new AliALIFE("beamshield.alife", "beamshield_vol.inp");
3a685df6 102 Int_t i=0,ifl=0;
5aba2f60 103 Float_t posfluka[3]={0., 0., 0.};
104 Float_t zfluka[12], rfluka1[12], rfluka2[12], rfluka3[12] ;
105//
106// end Fluka
107
108
109//
110// Mother volume
111//
112 Float_t dRear1=dRear;
113
114 Float_t zstart=zRear-dRear1;
115
116 par0[0] = 0.;
117 par0[1] = 360.;
118 par0[2] = 13.;
119
120 Float_t dl=(zvac12-zstart)/2.;
121 dz=zstart+dl;
122//
123 par0[3] = -dl;
124 par0[4] = 0.;
125 par0[5] = zstart * TMath::Tan(accMin);
126
127 par0[6] = -dl+dRear1;
128 par0[7] = 0.;
129 par0[8] = zRear * TMath::Tan(accMin);
130
131 par0[9] = -dl+dRear1;
132 par0[10] = 0.;
133 par0[11] = R11;
134
135 par0[12] = -dz+zvac4;
136 par0[13] = 0.;
137 par0[14] = R11;
138
139 par0[15] = -dz+zvac4;
140 par0[16] = 0.;
141 par0[17] = R21;
142
143 par0[18] = -dz+zvac6;
144 par0[19] = 0.;
145 par0[20] = R21;
146
147 par0[21] = -dz+zvac6;
148 par0[22] = 0.;
149 par0[23] = zvac6 * TMath::Tan(accMin);
150
151 par0[24] = -dz+zConeE;
152 par0[25] = 0.;
153 par0[26] = 30.;
154
155 par0[27] = -dz+zvac10;
156 par0[28] = 0.;
157 par0[29] = 30.;
158
159 par0[30] = -dz+zvac10;
160 par0[31] = 0.;
161 par0[32] = R42;
162
163 par0[33] = -dz+zvac11;
164 par0[34] = 0.;
165 par0[35] = R42;
166
167 par0[36] = -dz+zvac11;
168 par0[37] = 0.;
169 par0[38] = R43;
170
171 par0[39] = -dz+zvac12;
172 par0[40] = 0.;
173 par0[41] = R43;
174
175 gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 42);
176 dz=zstart+dl;
177 gMC->Gspos("YMOT", 1, "ALIC", 0., 0., dz, 0, "ONLY");
178//
179
180 dZ=-dl;
181
182//
183// First section: bellows below and behind front absorber
184//
185//
186 par1[0] = 0.;
187 par1[1] = 360.;
188 par1[2] = 12.;
189 dl=(zvac4-zstart)/2.;
190
191 par1[3] = -dl;
192 par1[4] = rAbs+(zstart-zOpen) * TMath::Tan(thetaOpen1);
193 par1[5] = zstart * TMath::Tan(accMin);
194
195 par1[6] = -dl+zvac1-zstart;
196 par1[7] = rAbs+ (zvac1-zOpen) * TMath::Tan(thetaOpen1);
197 par1[8] = zvac1 * TMath::Tan(accMin);
198
199 par1[9] = par1[6]+dr11;
200 par1[10] = par1[7]+dr11;
201 par1[11] = (zvac1+dr11) * TMath::Tan(accMin);
202
203 par1[12] = -dl+dRear1;
204 par1[13] = par1[10];
205 par1[14] = zRear * TMath::Tan(accMin);
206
207 par1[15] = -dl+dRear1;
208 par1[16] = par1[10];
209 par1[17] = R11;
210
211 par1[18] = -dl+(zvac1+dr11+dB1-zstart);
212 par1[19] = par1[16];
213 par1[20] = R11;
214
215 par1[21] = par1[18]+dr12;
216 par1[22] = par1[19]+dr12;
217 par1[23] = R11;
218
219 par1[24] = par1[21]+dF1;
220 par1[25] = par1[22];
221 par1[26] = R11;
222
223 par1[27] = par1[24]+dr12;
224 par1[28] = par1[25]-dr12;
225 par1[29] = R11;
226
227 par1[30] = par1[27]+dB1;
228 par1[31] = par1[28];
229 par1[32] = R11;
230
231 par1[33] = par1[30]+dr13;
a0cb6c86 232 par1[34] = par1[31];
5aba2f60 233 par1[35] = R11;
234
235 par1[36] = -dl+zvac4-zstart;
a0cb6c86 236 par1[37] = par1[34];
5aba2f60 237 par1[38] = R11;
238
a0cb6c86 239 Float_t r2 = par1[34];
240 Float_t rBox= par1[31]-0.1;
5aba2f60 241 Float_t rc1 = par1[7];
242
243 gMC->Gsvolu("YGO1", "PCON", idtmed[kNiCuW], par1, 39);
244
245//
246// begin Fluka
247 for (ifl=0; ifl<12; ifl++) {
248 zfluka[ifl]=par1[3+3*ifl]+dl+zRear-dRear;
249 rfluka1[ifl] = par1[4+3*ifl];
250 rfluka2[ifl] = par1[5+3*ifl];
251 if (ifl > 3) rfluka2[ifl]=rfluka2[ifl]-dRSteel1;
252 }
253
254
255 Float_t rfluka0[8]={rBox,rBox,rBox,rBox,rBox,rBox,rBox,rBox};
256
257 flukaGeom->Comment("1st part: Shield");
258// Use default for first three cones
259 flukaGeom->SetDefaultVolume("*ACR02");
260 rfluka2[0]=rfluka2[1]=rfluka2[2]=-1;
261//
262 flukaGeom->Comment("Shield");
263 flukaGeom->PolyCone(rfluka1, rfluka2, zfluka, 12, posfluka, "NIW", "MF", "$SHS");
264 flukaGeom->Comment("Vacuum");
a0cb6c86 265 flukaGeom->PolyCone(rfluka0, rfluka1+2, zfluka+2, 8, posfluka, "VACUUM", "MF", "$SHS");
5aba2f60 266//
267// end Fluka
268
269
3a685df6 270 for (i=4; i<38; i+=3) par1[i] = 0;
271
5aba2f60 272 gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], par1, 39);
273 gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");
274 dZ+=dl;
275 gMC->Gspos("YMO1", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
276 dZ+=dl;
277
278//
279// Steel envelope
280 tpar[0]=R11-dRSteel1;
281 tpar[1]=R11;
282 tpar[2]=dl-dRear1/2;
283 gMC->Gsvolu("YSE1", "TUBE", idtmed[kNiCuW], tpar, 3);
284 dz=dl-tpar[2];
285 gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
286
287// begin Fluka
288 flukaGeom->Comment("1st part: Steel Envelope");
289 flukaGeom->Cylinder(tpar[0], tpar[1], zRear, zvac4, posfluka, "NIW", "MF", "$SHS");
290//
291// end Fluka
292
293//
294// 1st section: vacuum system
295//
296//
297// Bellow 1
298//
299 tpar[0]=rB1;
300 tpar[1]=rB1+hB1;
301 tpar[2]=eB1/2.;
302 gMC->Gsvolu("YB11", "TUBE", idtmed[kSteel+40], tpar, 3);
303 Float_t dl1=tpar[2];
304
305 tpar[0]=rB1+hB1-eB1;
306 tpar[1]=rB1+hB1;
307 tpar[2]=(lB1/2.-2.*eB1)/2.;
308 gMC->Gsvolu("YB12", "TUBE", idtmed[kSteel+40], tpar, 3);
309 Float_t dl2=tpar[2];
310
311 tpar[0]=rB1-eB1;
312 tpar[1]=rB1;
313 tpar[2]=lB1/8.;
314 gMC->Gsvolu("YB13", "TUBE", idtmed[kSteel+40], tpar, 3);
315 Float_t dl3=tpar[2];
316
317
318 tpar[0]=0;
319 tpar[1]=rB1+hB1;
320 tpar[2]=lB1/2.;
321 gMC->Gsvolu("YBU1", "TUBE", idtmed[kVacuum+40], tpar, 3);
322
323 dz=-tpar[2]+dl3;
324 gMC->Gspos("YB13", 1, "YBU1", 0., 0., dz, 0, "ONLY");
325 dz+=dl3;
326 dz+=dl1;
327 gMC->Gspos("YB11", 1, "YBU1", 0., 0., dz, 0, "ONLY");
328 dz+=dl1;
329 dz+=dl2;
330 gMC->Gspos("YB12", 1, "YBU1", 0., 0., dz, 0, "ONLY");
331 dz+=dl2;
332 dz+=dl1;
333 gMC->Gspos("YB11", 2, "YBU1", 0., 0., dz, 0, "ONLY");
334 dz+=dl1;
335 dz+=dl3;
336 gMC->Gspos("YB13", 2, "YBU1", 0., 0., dz, 0, "ONLY");
337
338
339 tpar[0]=0;
340 tpar[1]=rB1+hB1;
341 tpar[2]=10.*lB1/2.;
342 gMC->Gsvolu("YBM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
343 dz=-tpar[2]+lB1/2.;
3a685df6 344
345 for (i=0; i<10; i++) {
346 gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0., dz, 0, "ONLY");
347 dz+=lB1;
348 }
349
5aba2f60 350 dz=-dl+(zvac1-zstart)+dr11+tpar[2];
351 gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
352
353 dz=dl-dr13-(zvac4-zvac3)-tpar[2];
354 gMC->Gspos("YBM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
355
356//
357// Flange
358
359 tpar[0]=0;
360 tpar[1]=rF1;
361 tpar[2]=dF1/2.;
362 gMC->Gsvolu("YFM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
363
364 tpar[0]=rF1-2.;
365 tpar[1]=rF1;
366 tpar[2]=dF1/2.;
367 gMC->Gsvolu("YF11", "TUBE", idtmed[kSteel+40], tpar, 3);
368 gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY");
369
370 tpar[0]=rB1;
371 tpar[1]=rF1-2.;
372 tpar[2]=dFlange/2.;
373 gMC->Gsvolu("YF12", "TUBE", idtmed[kSteel+40], tpar, 3);
374 dz=-dF1/2.+tpar[2];
375 gMC->Gspos("YF12", 1, "YFM1", 0., 0., dz, 0, "ONLY");
376 dz= dF1/2.-tpar[2];
377 gMC->Gspos("YF12", 2, "YFM1", 0., 0., dz, 0, "ONLY");
378
379 dz=-dl+(zvac2-zstart);
380 gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
381
382//
383// pipe between flange and bellows
384 tpar[0]=rB1-dTubeS;
385 tpar[1]=rB1;
386 tpar[2]=2.*(dB1+dr12-10.*lB1)/4.;
387 gMC->Gsvolu("YPF1", "TUBE", idtmed[kSteel+40], tpar, 3);
388
389 dz=-dl+(zvac2-zstart)-dF1/2.-tpar[2];
390 gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
391 dz=-dl+(zvac2-zstart)+dF1/2.+tpar[2];
392 gMC->Gspos("YPF1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
393
394//
395// begin Fluka
396 flukaGeom->Comment("First Bellow");
397 Float_t z1=zvac1+dr11;
398 Float_t z2;
399
3a685df6 400 for (i=0; i<10; i++) {
5aba2f60 401 z2=z1+eB1;
402 flukaGeom->Cylinder(0., rB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
403 flukaGeom->Cylinder(rB1, rB1+hB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
404
405 z1=z2;
406 z2+=lB1/2.-eB1;
407 flukaGeom->Cylinder(0., rB1+hB1-eB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
408 flukaGeom->Cylinder(rB1+hB1-eB1, rB1+hB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
409 z1=z2;
410 z2=z1+eB1;
411 flukaGeom->Cylinder(0., rB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
412 flukaGeom->Cylinder(rB1, rB1+hB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
413 z1=z2;
414 z2+=lB1/2.-eB1;
415 flukaGeom->Cylinder(0., rB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
416 flukaGeom->Cylinder(rB1, rB1+eB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
417 flukaGeom->Cylinder(rB1+eB1, rB1+hB1, z1, z2, posfluka, "AIR", "MF", "$SHH");
418 z1=z2;
419 }
420 flukaGeom->Cylinder(rB1+hB1, rB1+hB1+0.5, zvac1+dr11, z1, posfluka, "AIR", "MF", "$SHH");
421 flukaGeom->Cylinder(rB1+hB1+0.5, rBox, zvac1+dr11, z1, posfluka, "AIR", "MF", "$SHH");
422 Float_t zcy1=z1;
423
424
425 flukaGeom->Comment("Second Bellow");
426 z1=zvac3-dr13;
3a685df6 427 for (i=0; i<10; i++) {
5aba2f60 428 z2=z1-eB1;
429 flukaGeom->Cylinder(0., rB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
430 flukaGeom->Cylinder(rB1, rB1+hB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
431 z1=z2;
432 z2-=lB1/2.-eB1;
433 flukaGeom->Cylinder(0., rB1+hB1-eB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
434 flukaGeom->Cylinder(rB1+hB1-eB1, rB1+hB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
435 z1=z2;
436 z2=z1-eB1;
437 flukaGeom->Cylinder(0., rB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
438 flukaGeom->Cylinder(rB1, rB1+hB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
439 z1=z2;
440 z2-=lB1/2.-eB1;
441 flukaGeom->Cylinder(0., rB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
442 flukaGeom->Cylinder(rB1, rB1+eB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
443 flukaGeom->Cylinder(rB1+eB1, rB1+hB1, z2, z1, posfluka, "AIR", "MF", "$SHH");
444 z1=z2;
445 }
446 flukaGeom->Cylinder(rB1+hB1, rB1+hB1+0.5, z1, zvac3-dr13, posfluka, "AIR", "MF", "$SHH");
447 flukaGeom->Cylinder(rB1+hB1+0.5, rBox, z1, zvac3-dr13, posfluka, "AIR", "MF", "$SHH");
448
449 Float_t zcy2=z1;
450 flukaGeom->Comment("Flange");
451 Float_t zfl=(zcy1+zcy2)/2.;
452
453 z1=zfl-dF1/2.;
454 z2=zfl+dF1/2.;
455 flukaGeom->Cylinder(0.,rF1-2. , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
456 flukaGeom->Cylinder(rF1-2., rF1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
a0cb6c86 457 flukaGeom->Cylinder(rF1, rF1+0.05 , z1, z2, posfluka, "AIR", "MF", "$SHH");
458 flukaGeom->Cylinder(rF1+0.05, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
5aba2f60 459 z2=z1;
460 z1=z2-dFlange;
461 flukaGeom->Cylinder(0.,rB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
462 flukaGeom->Cylinder(rB1, rF1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
463 flukaGeom->Cylinder(rF1, rF1+0.5 , z1, z2, posfluka, "AIR", "MF", "$SHH");
464 flukaGeom->Cylinder(rF1+0.5, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
465 z2=z1;
466 z1=zcy1;
467 flukaGeom->Cylinder(0.,rB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
468 flukaGeom->Cylinder(rB1, rB1+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
469 flukaGeom->Cylinder(rB1+0.1, rB1+0.6 , z1, z2, posfluka, "AIR", "MF", "$SHH");
470 flukaGeom->Cylinder(rB1+0.6, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
471
472 z1=zfl+dF1/2.;
473 z2=z1+dFlange;
474 flukaGeom->Cylinder(0.,rB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
475 flukaGeom->Cylinder(rB1, rF1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
476 flukaGeom->Cylinder(rF1, rF1+0.5 , z1, z2, posfluka, "AIR", "MF", "$SHH");
477 flukaGeom->Cylinder(rF1+0.5, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
478 z1=z2;
479 z2=zcy2;
480 flukaGeom->Cylinder(0.,rB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
481 flukaGeom->Cylinder(rB1, rB1+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
482 flukaGeom->Cylinder(rB1+0.1, rB1+0.6 , z1, z2, posfluka, "AIR", "MF", "$SHH");
483 flukaGeom->Cylinder(rB1+0.6, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
484// end Fluka
485//
486
487// pipe and heating jackets outside bellows
488//
489// left side
490 cpar0[0]=(zvac1-zstart)/2;
491 cpar0[1]=rVacu+(zstart-zOpen)*TMath::Tan(thetaOpen1)-0.05;
492 cpar0[2]=rAbs +(zstart-zOpen)*TMath::Tan(thetaOpen1);
493 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpen1);
494 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpen1);
495 gMC->Gsvolu("YV11", "CONE", idtmed[kSteel+40], cpar0, 5);
496//
497// insulation
498 dTubeS=0.15;
499 cpar[0]=cpar0[0];
500 cpar[1]=cpar0[1]+0.15;
501 cpar[2]=cpar0[1]+0.65;
502 cpar[3]=cpar0[3]+0.15;
503 cpar[4]=cpar0[3]+0.65;
504 gMC->Gsvolu("YI11", "CONE", idtmed[kInsulation+40], cpar, 5);
505 gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY");
506//
507// clearance
508 cpar[1]=cpar0[1]+0.75;
509 cpar[2]=cpar0[1]+1.25;
510 cpar[3]=cpar0[3]+0.75;
511 cpar[4]=cpar0[3]+1.25;
512 gMC->Gsvolu("YP11", "CONE", idtmed[kVacuum+40], cpar, 5);
513 gMC->Gspos("YP11", 1, "YV11", 0., 0., 0., 0, "ONLY");
514
515 dz=-dl+cpar0[0];
516 gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY");
517
518// begin Fluka
519//
520 Float_t rf1[10], rf2[10];
521 rf1[0]=0.; rf2[0]=0.;
522 rf1[1] = cpar0[1];
523 rf2[1] = cpar0[3];
524
525
526 rf1[2]=rf1[1]+0.15; rf1[3]=rf1[2]+0.5; rf1[4]=rf1[3]+0.1;
527 rf1[5]=rf1[4]+0.5;
528 rf2[2]=rf2[1]+0.15; rf2[3]=rf2[2]+0.5; rf2[4]=rf2[3]+0.1;
529 rf2[5]=rf2[4]+0.5;
530
531 char* materialsA[7]
532 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "AIR"};
533 char* fieldsA[7]
534 = {"MF", "MF", "MF", "MF", "MF", "MF"};
535 char* cutsA[7]
536 = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH"};
537
538 flukaGeom->Comment("1st part: Beam pipe lateral struture (left)");
539 flukaGeom->OnionCone(rf1, rf2, 6 , zstart, zvac1, posfluka, materialsA, fieldsA, cutsA);
3a685df6 540 for (i=0; i<7; i++) rf1[i]=rf2[i];
541 for (i=1; i<7; i++) rf2[i]=rf1[i]+dr11*TMath::Tan(thetaOpen1);
5aba2f60 542 flukaGeom->OnionCone(rf1, rf2, 6 , zvac1, zvac1+dr11, posfluka, materialsA, fieldsA, cutsA);
543 flukaGeom->Cone(rc1, rf2[5], rc1, rc1+dr11, zvac1 , zvac1+dr11, posfluka,"AIR", "MF", "$SHH");
544//
545// end Fluka
546
547
548// right side
549 dTubeS=0.35;
550 dVacuS+=0.25;
551
552 cpar0[0]=(zvac4-zvac3)/2;
553 cpar0[1]=rB1;
554 cpar0[2]=cpar0[1]+dVacuS;
555
556 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
557 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
558 gMC->Gsvolu("YV12", "CONE", idtmed[kSteel], cpar0, 5);
559 Float_t r2V=cpar0[3];
560//
561// insulation
562 cpar[0]=cpar0[0];
563 cpar[1]=cpar0[1]+dTubeS;
564 cpar[2]=cpar0[1]+dTubeS+dInsuS;
565 cpar[3]=cpar0[3]+dTubeS;
566 cpar[4]=cpar0[3]+dTubeS+dInsuS;
567 gMC->Gsvolu("YI12", "CONE", idtmed[kInsulation], cpar, 5);
568 gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY");
569
570//
571// clearance
572 cpar[1]=cpar0[1]+dTubeS+dInsuS+dEnveS;
573 cpar[2]=cpar0[1]+dTubeS+dInsuS+dEnveS+dFreeS;
574 cpar[3]=cpar0[3]+dTubeS+dInsuS+dEnveS;
575 cpar[4]=cpar0[3]+dTubeS+dInsuS+dEnveS+dFreeS;
576 gMC->Gsvolu("YP12", "CONE", idtmed[kAir], cpar, 5);
577 gMC->Gspos("YP12", 1, "YV12", 0., 0., 0., 0, "ONLY");
578
579 dz=dl-cpar0[0];
580 gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY");
581
582//
583// begin Fluka
584 char* materialsB[8]
585 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "STEEL", "AIR"};
586
587 char* fieldsB[8]
588 = {"MF", "MF", "MF", "MF", "MF", "MF", "MF"};
589
590 char* cutsB[8]
591 = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH", "$SHH"};
592
593 rf1[0]=rf2[0]=0.;
594 rf1[1]=cpar0[1];
595 rf2[1]=cpar0[3];
596
597 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+dInsuS; rf1[4]=rf1[3]+dEnveS;
598 rf1[5]=rf1[4]+dFreeS; rf1[6]=rf1[5]+dProtS; rf1[7]=r2;
599
600 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+dInsuS; rf2[4]=rf2[3]+dEnveS;
601 rf2[5]=rf2[4]+dFreeS; rf2[6]=rf2[5]+dProtS;
a0cb6c86 602 rf2[7]=r2;
5aba2f60 603 flukaGeom->Comment("1st part: Beam pipe lateral structure (right)");
604 flukaGeom->OnionCone(rf1, rf2, 8 , zvac3, zvac4, posfluka, materialsB, fieldsB, cutsB);
3a685df6 605 for (i=0; i<8; i++) rf2[i]=rf1[i];
606 for (i=1; i<7; i++) rf1[i]=rf2[i];
a0cb6c86 607 rf1[7]=rf2[7];
5aba2f60 608 flukaGeom->OnionCone(rf1, rf2, 8 , zvac3-dr13, zvac3, posfluka, materialsB, fieldsB, cutsB);
609//
610// end Fluka
611
612//
613// Second Section
614// Between first and second bellow section
615//
616
617 par2[0] = 0.;
618 par2[1] = 360.;
619 par2[2] = 7.;
620 dl=(zvac7-zvac4)/2.;
a0cb6c86 621// recess station 2
5aba2f60 622 par2[3] = -dl;
a0cb6c86 623 par2[4] = r2;
624 par2[5] = R21;
625
626 par2[6] = -dl+10.;
627 par2[7] = r2;
5aba2f60 628 par2[8] = R21;
629
a0cb6c86 630 par2[9] = -dl+(zvac6-zvac4);
631 par2[10] = r2+(zvac6-zvac4-10.) * TMath::Tan(thetaOpen2);
5aba2f60 632 par2[11] = R21;
633
634 par2[12] = -dl+(zvac6-zvac4);
635 par2[13] = par2[10];
636 par2[14] = zvac6*TMath::Tan(accMin);
637
638// Start of Pb section
639 par2[15] = -dl+(zPb-zvac4);
a0cb6c86 640 par2[16] = r2+(zPb-zvac4-10.) * TMath::Tan(thetaOpen2);
5aba2f60 641 par2[17] = zPb*TMath::Tan(accMin);
642
643//
644// end of cone following 2 deg line
645 par2[18] = -dl+(zConeE-zvac4);
a0cb6c86 646 par2[19] = r2+(zConeE-zvac4-10.) * TMath::Tan(thetaOpen2);
5aba2f60 647 par2[20] = 30.;
648
649 par2[21] = -dl+(zvac7-zvac4);
a0cb6c86 650 par2[22] = r2+(zvac7-zvac4-10.) * TMath::Tan(thetaOpen2);
5aba2f60 651 par2[23] = 30.;
652
653
a0cb6c86 654 gMC->Gsvolu("YGO2", "PCON", idtmed[kNiCuW+40], par2, 24);
5aba2f60 655
656//
657// begin Fluka
658 Float_t rfvacu0[8], rfvacu1[8], rfvacu2[8], rfvacu3[8], rfvacu4[8], rfvacu5[8];
659
660 for (ifl=0; ifl<7; ifl++) {
661 rfluka1[ifl] = par2[4+3*ifl];
662 rfluka2[ifl] = par2[5+3*ifl]-dRSteel2;
663 rfluka3[ifl] = par2[5+3*ifl];
664 rfvacu5[ifl] = r2V;
665 rfvacu4[ifl]=rfvacu5[0]+dTubeS;
666 rfvacu3[ifl]=rfvacu4[0]+dInsuS;
667 rfvacu2[ifl]=rfvacu3[0]+dEnveS;
668 rfvacu1[ifl]=rfvacu2[0]+dFreeS;
669 rfvacu0[ifl]=rfvacu1[0]+dProtS;
670 }
671
672 char* materials1[11]
673 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "STEEL", "AIR", "NIW",
674 "NIW", "STEEL"};
675 char* fields1[11]
676 = {"MF", "MF", "MF", "MF", "MF", "MF", "MF", "MF", "MF", "MF", "MF"};
677 char* cuts1[11]
678 = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH", "$SHH","$SHH","$SHS", "$SHS"};
679
680
681 rf1[0]=0.; rf1[1]=rfvacu5[0]; rf1[2]=rfvacu4[0]; rf1[3]=rfvacu3[0];
682 rf1[4]=rfvacu2[0]; rf1[5]=rfvacu1[0]; rf1[6]=rfvacu0[0];
683 rf1[7]=rfluka1[0]; rf1[9]=R11-dRSteel1;
684 rf1[10]=R21;
3a685df6 685 for (i=1; i<7; i++) rf2[i]=rf1[i]+4.*TMath::Tan(thetaOpenB);
a0cb6c86 686 rf2[7]=rf1[7];
5aba2f60 687 rf2[9]=rf1[9]; rf2[10]=rf1[10];
688 rf1[8]=13.;
689 rf2[8]=rf1[8]+4.*TMath::Tan(thetaOpenPb);
690
a0cb6c86 691 flukaGeom->Comment("2nd part: Beam pipe lateral struture (0)");
5aba2f60 692 flukaGeom->OnionCone(rf1, rf2, 11 , zvac4, zvac4+4, posfluka, materials1, fields1, cuts1);
693
694
3a685df6 695 for (i=0; i<11; i++) rf1[i]=rf2[i];
696 for (i=1; i<7; i++)
a0cb6c86 697 rf2[i]=rf1[i]+20.*TMath::Tan(thetaOpenB);
698 rf2[7]=rf1[7];
699 rf2[8]=rf1[8]+20.*TMath::Tan(thetaOpenPb);
700 rf1[9]=R21-dRSteel2;
701 rf1[10]=R21;
702 rf2[9]=R21-dRSteel2;
703 rf2[10]=R21;
704 flukaGeom->Comment("2nd part: Beam pipe lateral struture (1)");
705 flukaGeom->OnionCone(rf1, rf2, 11 , zvac4+4, zvac4+24, posfluka, materials1, fields1, cuts1);
706
3a685df6 707 for (i=0; i<11; i++) rf1[i]=rf2[i];
708 for (i=1; i<7; i++)
a0cb6c86 709 rf2[i]=rf1[i]+(zvac6-zvac4-24.)*TMath::Tan(thetaOpenB);
710 rf2[7]=rf1[7]+(zvac6-zvac4-24.)*TMath::Tan(thetaOpen2);
711 rf2[8]=rf1[8]+(zvac6-zvac4-24.)*TMath::Tan(thetaOpenPb);
5aba2f60 712 rf1[9]=R21-dRSteel2;
713 rf1[10]=R21;
714 rf2[9]=R21-dRSteel2;
715 rf2[10]=R21;
716 flukaGeom->Comment("2nd part: Beam pipe lateral struture (2)");
a0cb6c86 717 flukaGeom->OnionCone(rf1, rf2, 11 , zvac4+24, zvac6, posfluka, materials1, fields1, cuts1);
5aba2f60 718
3a685df6 719 for (i=0; i<11; i++) rf1[i]=rf2[i];
720 for (i=1; i<7; i++)
5aba2f60 721 rf2[i]=rf1[i]+4.*TMath::Tan(thetaOpenB);
722 rf2[7]=rf1[7]+4.*TMath::Tan(thetaOpen2);
723
724 rf2[8]=rf1[8]+4.*TMath::Tan(thetaOpenPb);
725 rf1[9]=R21-dRSteel2;
726 rf2[9]=R21-dRSteel2;
727 rf1[10]=1;
728 rf2[10]=-1;
729 flukaGeom->Comment("2nd part: Beam pipe lateral struture (3)");
730 flukaGeom->OnionCone(rf1, rf2, 11 , zvac6, zvac6+4, posfluka, materials1, fields1, cuts1);
731
732
3a685df6 733 for (i=0; i<11; i++) rf1[i]=rf2[i];
734 for (i=1; i<7; i++)
5aba2f60 735 rf2[i]=rf1[i]+(zPb-(zvac6-4.))*TMath::Tan(thetaOpenB);
736 rf2[7]=rf1[7]+(zPb-(zvac6-4.))*TMath::Tan(thetaOpen2);
737
738 rf2[8]=rf1[8]+(zPb-(zvac6-4.))*TMath::Tan(thetaOpenPb);
739 rf1[9]=(zvac6+4)*TMath::Tan(accMin)-dRSteel2;
740 rf2[9]=zPb*TMath::Tan(accMin)-dRSteel2;
741 rf1[10]=1.;
742 rf2[10]=-1.;
743 flukaGeom->Comment("2nd part: Beam pipe lateral struture (4)");
744 flukaGeom->OnionCone(rf1, rf2, 11 , zvac6+4, zPb, posfluka, materials1, fields1, cuts1);
745
746
3a685df6 747 for (i=0; i<11; i++) rf1[i]=rf2[i];
748 for (i=1; i<7; i++)
5aba2f60 749 rf2[i]=rf1[i]+(zConeE-zPb)*TMath::Tan(thetaOpenB);
750 rf2[7]=rf1[7]+(zConeE-zPb)*TMath::Tan(thetaOpen2);
751 rf1[8]=rf2[8]+2.;
752 rf2[8]=rf1[8]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
753 rf1[9]=zPb*TMath::Tan(accMin)-dRSteel2;
754 rf2[9]=30.-dRSteel2;
755 rf1[10]=1.;
756 rf2[10]=-1.;
757 flukaGeom->Comment("2nd part: Beam pipe lateral struture (5)");
758 if (fPbCone) materials1[7] = "LEAD";
759 materials1[8]="LEAD";
760 flukaGeom->OnionCone(rf1, rf2, 11 , zPb, zConeE, posfluka, materials1, fields1, cuts1);
761
3a685df6 762 for (i=0; i<11; i++) rf1[i]=rf2[i];
763 for (i=1; i<7; i++)
5aba2f60 764 rf2[i]=rf1[i]+(zvac7-zConeE)*TMath::Tan(thetaOpenB);
765 rf2[7]=rf1[7]+(zvac7-zConeE)*TMath::Tan(thetaOpen2);
766
767 rf1[8]=rf2[8];
768 rf2[8]=rf1[8]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
769 rf1[9]=30.-dRSteel2;
770 rf2[9]=30.-dRSteel2;
771 rf1[10]=30.;
772 rf2[10]=30.;
773 flukaGeom->Comment("2nd part: Beam pipe lateral struture (6)");
a0cb6c86 774 flukaGeom->OnionCone(rf1, rf2, 10 , zConeE, zvac7, posfluka, materials1, fields1, cuts1);
775// Steel envelope and recesses for station 3
776 flukaGeom->Comment("Steel envelope and recesses for station 3");
777 flukaGeom->Cylinder(rf1[9],rf1[10], zConeE, zch31, posfluka, materials1[9], fields1[9], cuts1[9]);
778 flukaGeom->Cylinder(rf1[9], rf1[10]-1, zch31, zch32, posfluka, materials1[9], fields1[9], cuts1[9]);
779 flukaGeom->Cylinder(rf1[10]-1, rf1[10], zch31, zch32, posfluka, "AIR", fields1[9], cuts1[9]);
780 flukaGeom->Cylinder(rf1[9], rf1[10], zch32, zvac7, posfluka, materials1[9], fields1[9], cuts1[9]);
5aba2f60 781
782 Float_t r3V = rf2[1];
783
784// end Fluka
785
786//
787// Lead cone option replacing Tungsten
788//
789 Float_t parPb[12];
790 parPb[0] = 0.;
791 parPb[1] = 360.;
792 parPb[2] = 3.;
793 Float_t dlPb=(zvac7-zPb)/2.;
794
795 parPb[3] = -dlPb;
796 parPb[4] = 17.657;
797 parPb[5] = zPb*TMath::Tan(accMin);
798
799 parPb[6] = -dlPb+(zConeE-zPb);
800 parPb[7] = parPb[4]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
801 parPb[8] = 30.;
802
803 parPb[9] = dlPb;
804 parPb[10] = parPb[7]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
805 parPb[11] = 30.;
a0cb6c86 806
807 Float_t rPbLast=parPb[10];
808
809
5aba2f60 810 gMC->Gsvolu("YXO2", "PCON", idtmed[kPb], parPb, 12);
811 gMC->Gspos("YXO2", 1, "YGO2", 0., 0., (zPb-zvac4)/2., 0, "ONLY");
812
a0cb6c86 813
814 parPb[4] = r2+(zPb-zvac3) * TMath::Tan(thetaOpen2);
815 parPb[5] = 17.657;
816
817 parPb[7] = r2+(zConeE-zvac3) * TMath::Tan(thetaOpen2);
818 parPb[8] = parPb[5]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
819
820 parPb[10] = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
821 parPb[11] = parPb[8]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
822
823 gMC->Gsvolu("YYO2", "PCON", idtmed[iHeavy+40], parPb, 12);
824 gMC->Gspos("YYO2", 1, "YGO2", 0., 0., (zPb-zvac4)/2., 0, "ONLY");
825
3a685df6 826 for (i=4; i<23; i+=3) par2[i] = 0;
5aba2f60 827
828 gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 24);
829 gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");
830 dZ+=dl;
831 gMC->Gspos("YMO2", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
832 dZ+=dl;
833//
834// Steel envelope
835//
a0cb6c86 836// (1)
5aba2f60 837 tpar[0]=R11-dRSteel1;
838 tpar[1]=R21;
839 tpar[2]=2;
840 gMC->Gsvolu("YS21", "TUBE", idtmed[kSteel], tpar, 3);
841 dz=-dl+tpar[2];
842 gMC->Gspos("YS21", 1, "YGO2", 0., 0., dz, 0, "ONLY");
843 dz+=tpar[2];
a0cb6c86 844// (2)
5aba2f60 845 tpar[0]=R21-dRSteel2;
846 tpar[1]=R21;
847 tpar[2]=(zvac6-zvac5)/2.;
848 gMC->Gsvolu("YS22", "TUBE", idtmed[kSteel], tpar, 3);
849 dz+=tpar[2];
850 gMC->Gspos("YS22", 1, "YGO2", 0., 0., dz, 0, "ONLY");
851 dz+=tpar[2];
a0cb6c86 852// (3)
5aba2f60 853 cpar[0]=2.;
854 cpar[1]=R21-dRSteel2;
855 cpar[2]=zvac6 * TMath::Tan(accMin);
856 cpar[3]=cpar[1];
857 cpar[4]=cpar[2]+4.*TMath::Tan(accMin);
5aba2f60 858 gMC->Gsvolu("YS23", "CONE", idtmed[kSteel], cpar, 5);
859 dz+=cpar[0];
860 gMC->Gspos("YS23", 1, "YGO2", 0., 0., dz, 0, "ONLY");
861 dz+=cpar[0];
a0cb6c86 862// (4)
5aba2f60 863 cpar[0]=(zPb-zvac6-4.)/2;
864 cpar[2]=cpar[4];
865 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
866 cpar[1]=cpar[2]-dRSteel2;
867 cpar[3]=cpar[4]-dRSteel2;
868
869 gMC->Gsvolu("YS24", "CONE", idtmed[kSteel], cpar, 5);
870 dz+=cpar[0];
871 gMC->Gspos("YS24", 1, "YGO2", 0., 0., dz, 0, "ONLY");
872 dz+=cpar[0];
873
a0cb6c86 874// (5)
5aba2f60 875 cpar[0]=(zConeE-zPb)/2;
876 cpar[2]=cpar[4];
877 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
878 cpar[1]=cpar[2]-dRSteel2;
879 cpar[3]=cpar[4]-dRSteel2;
880
881 gMC->Gsvolu("YS25", "CONE", idtmed[kSteel], cpar, 5);
882 dz=-dlPb+cpar[0];
883 gMC->Gspos("YS25", 1, "YXO2", 0., 0., dz, 0, "ONLY");
884 dz+=cpar[0];
a0cb6c86 885// (6)
5aba2f60 886 tpar[0]=26.;
887 tpar[1]=30.;
888 tpar[2]=(zvac7-zConeE)/2.;
889
890 gMC->Gsvolu("YS26", "TUBE", idtmed[kSteel], tpar, 3);
891 dz+=tpar[2];
892 gMC->Gspos("YS26", 1, "YXO2", 0., 0., dz, 0, "ONLY");
a0cb6c86 893 dz = -tpar[2];
894
895// Recess in steel for station 3
896//
897 tpar[0]=29.;
898 tpar[1]=30.;
899 tpar[2]=(zch32-zch31)/2.;
900 gMC->Gsvolu("YS27", "TUBE", idtmed[kAir], tpar, 3);
901 dz+=(tpar[2]+zch31-zConeE);
5aba2f60 902
a0cb6c86 903 gMC->Gspos("YS27", 1, "YS26", 0., 0., dz, 0, "ONLY");
904
905//
5aba2f60 906//
907// 2nd section: vacuum system
908//
909 cpar0[0]=(zvac7-zvac4)/2;
910 cpar0[1]=r2V;
911 cpar0[2]=r2V+dVacuS;
912 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
913 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
914 gMC->Gsvolu("YV21", "CONE", idtmed[kSteel+40], cpar0, 5);
915//
916// insulation
917 cpar[0]=cpar0[0];
918 cpar[1]=cpar0[1]+dTubeS;
919 cpar[2]=cpar0[1]+dTubeS+dInsuS;
920 cpar[3]=cpar0[3]+dTubeS;
921 cpar[4]=cpar0[3]+dTubeS+dInsuS;
922 gMC->Gsvolu("YI21", "CONE", idtmed[kInsulation+40], cpar, 5);
923 gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY");
924//
925// clearance
926 cpar[1]=cpar0[1]+dTubeS+dInsuS+dEnveS;
927 cpar[2]=cpar0[1]+dTubeS+dInsuS+dEnveS+dFreeS;
928 cpar[3]=cpar0[3]+dTubeS+dInsuS+dEnveS;
929 cpar[4]=cpar0[3]+dTubeS+dInsuS+dEnveS+dFreeS;
930 gMC->Gsvolu("YP21", "CONE", idtmed[kAir+40], cpar, 5);
931 gMC->Gspos("YP21", 1, "YV21", 0., 0., 0., 0, "ONLY");
932
933 dz=0.;
934 gMC->Gspos("YV21", 1, "YMO2", 0., 0., dz, 0, "ONLY");
935
936
937//
938// Third Section: Bellows and Flange
939//
940 par3[0] = 0.;
941 par3[1] = 360.;
942 par3[2] = 8.;
943 dl=(zvac9-zvac7)/2.;
944
945 par3[3] = -dl;
946 par3[4] = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
947 par3[5] = 30.;
948
949 par3[6] = -dl+dr21;
950 par3[7] = par3[4]+dr21;
951 par3[8] = 30.;
952
953 par3[9] = par3[6]+dB2;
954 par3[10] = par3[7];
955 par3[11] = 30.;
956
957 par3[12] = par3[9]+dr22;
958 par3[13] = par3[10]+dr22;
959 par3[14] = 30.;
960
961 par3[15] = par3[12]+dF2;
962 par3[16] = par3[13];
963 par3[17] = 30.;
964
965 par3[18] = par3[15]+dr22;
966 par3[19] = par3[16]-dr22;
967 par3[20] = 30.;
968
969 par3[21] = par3[18]+dB2;
970 par3[22] = par3[19];
971 par3[23] = 30.;
972
973 par3[24] = par3[21]+dr23;
a0cb6c86 974 par3[25] = par3[22];
5aba2f60 975 par3[26] = 30.;
976//
977 rBox=par3[22]-0.1;
978 Float_t r3=par3[25];
979
980 gMC->Gsvolu("YGO3", "PCON", idtmed[iHeavy+40], par3, 27);
981
5aba2f60 982// begin Fluka
983 Float_t rflukaPb[8];
984 for (ifl=0; ifl<8; ifl++) {
985 zfluka[ifl]=par3[3+3*ifl]+dl+zvac7;
986 rflukaPb[ifl]= 15.+(zfluka[ifl]-zvac4)*TMath::Tan(thetaOpenPb);
987 rfluka1[ifl] = par3[4+3*ifl];
988 rfluka2[ifl] = par3[5+3*ifl]-4.;
989 rfluka3[ifl] = par3[5+3*ifl];
990 rfvacu0[ifl] = 0.;
991 }
3a685df6 992 for (i=0; i<8; i++) rfluka0[i]=rBox;
5aba2f60 993 rfluka0[0]=0.; rfluka0[7]=0.;
994
995 flukaGeom->Comment("3rd part: Shield");
996 flukaGeom->PolyCone(rflukaPb, rfluka2, zfluka, 8, posfluka, "LEAD", "MF", "$SHS");
997
998 if (fPbCone) {
999 flukaGeom->PolyCone(rfluka1, rflukaPb, zfluka, 8, posfluka, "LEAD", "MF", "$SHS");
1000 } else {
1001 flukaGeom->PolyCone(rfluka1, rflukaPb, zfluka, 8, posfluka, "NIW", "MF", "$SHS");
1002 }
1003
1004 flukaGeom->Comment("3rd part: Steel envelope");
1005 flukaGeom->PolyCone(rfluka2, rfluka3, zfluka, 8, posfluka, "STEEL", "MF", "$SHS");
1006 flukaGeom->Comment("3rd part: Vacuum");
1007 flukaGeom->PolyCone(rfluka0+1, rfluka1+1, zfluka+1, 6, posfluka, "AIR", "MF", "$SHH");
1008 flukaGeom->Comment("3rd part: Beam Pipe (left)");
1009
1010 rf1[0]=0.; rf2[0]=0.;
1011 rf1[1] = r3V;
1012 rf2[1] = rf1[1]+dr21*TMath::Tan(thetaOpenB);
1013 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+dInsuS; rf1[4]=rf1[3]+dEnveS;
1014 rf1[5]=rf1[4]+dFreeS; rf1[6]= rf1[5]+dProtS; rf1[7]=par3[4];
1015 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+dInsuS; rf2[4]=rf2[3]+dEnveS;
1016 rf2[5]=rf2[4]+dFreeS; rf2[6]=rf2[5]+dProtS; rf2[7]=rf1[7]+dr21;
1017 flukaGeom->OnionCone(rf1, rf2, 8 , zvac7, zvac7+dr21, posfluka, materialsB, fieldsB, cutsB);
1018
1019
1020 flukaGeom->Comment("3rd part: Beam Pipe (right)");
1021
a0cb6c86 1022 rf1[0]=0.;
1023 rf1[1] = par3[25]-dr23;
5aba2f60 1024 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+dInsuS; rf1[4]=rf1[3]+dEnveS;
a0cb6c86 1025 rf1[5]=rf1[4]+dFreeS; rf1[6]=par3[25];
1026 flukaGeom->OnionCylinder(rf1, 7 , zvac9-dr23, zvac9, posfluka, materialsA, fieldsA, cutsA);
5aba2f60 1027
1028//
1029 flukaGeom->Comment("First Bellow");
1030 z1=zvac7+dr21;
1031
3a685df6 1032 for (i=0; i<7; i++) {
5aba2f60 1033 z2=z1+eB2;
1034 flukaGeom->Cylinder(0., rB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1035 flukaGeom->Cylinder(rB2, rB2+hB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1036
1037 z1=z2;
1038 z2+=lB2/2.-eB2;
1039 flukaGeom->Cylinder(0., rB2+hB2-eB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1040 flukaGeom->Cylinder(rB2+hB2-eB2, rB2+hB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1041 z1=z2;
1042 z2=z1+eB2;
1043 flukaGeom->Cylinder(0., rB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1044 flukaGeom->Cylinder(rB2, rB2+hB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1045 z1=z2;
1046 z2+=lB2/2.-eB2;
1047 flukaGeom->Cylinder(0., rB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1048 flukaGeom->Cylinder(rB2, rB2+eB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1049 flukaGeom->Cylinder(rB2+eB2, rB2+hB2, z1, z2, posfluka, "AIR", "MF", "$SHH");
1050 z1=z2;
1051 }
1052 flukaGeom->Cylinder(rB2+hB2, rB2+hB2+0.2, zvac7+dr21, z1, posfluka, "AIR", "MF", "$SHH");
1053 flukaGeom->Cylinder(rB2+hB2+0.2, rBox, zvac7+dr21, z1, posfluka, "AIR", "MF", "$SHH");
1054 zcy1=z1;
1055
1056
1057 flukaGeom->Comment("Second Bellow");
1058 z1=zvac9-dr23;
3a685df6 1059 for (i=0; i<7; i++) {
5aba2f60 1060 z2=z1-eB2;
1061 flukaGeom->Cylinder(0., rB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1062 flukaGeom->Cylinder(rB2, rB2+hB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
1063 z1=z2;
1064 z2-=lB2/2.-eB2;
1065 flukaGeom->Cylinder(0., rB2+hB2-eB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1066 flukaGeom->Cylinder(rB2+hB2-eB2, rB2+hB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
1067 z1=z2;
1068 z2=z1-eB2;
1069 flukaGeom->Cylinder(0., rB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1070 flukaGeom->Cylinder(rB2, rB2+hB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
1071 z1=z2;
1072 z2-=lB2/2.-eB2;
1073 flukaGeom->Cylinder(0., rB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1074 flukaGeom->Cylinder(rB2, rB2+eB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
1075 flukaGeom->Cylinder(rB2+eB2, rB2+hB2, z2, z1, posfluka, "AIR", "MF", "$SHH");
1076 z1=z2;
1077 }
1078 flukaGeom->Cylinder(rB2+hB2, rB2+hB2+0.2, z1, zvac9-dr23, posfluka, "AIR", "MF", "$SHH");
1079 flukaGeom->Cylinder(rB2+hB2+0.2, rBox, z1, zvac9-dr23, posfluka, "AIR", "MF", "$SHH");
1080
1081 zcy2=z1;
1082 flukaGeom->Comment("Flange");
1083 zfl=(zcy1+zcy2)/2.;
1084
1085 z1=zfl-dF2/2.;
1086 z2=zfl+dF2/2.;
a0cb6c86 1087 flukaGeom->Cylinder(0.,rF2-2., z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1088 flukaGeom->Cylinder(rF2-2., rF2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1089 flukaGeom->Cylinder(rF2, rF2+0.02 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1090 flukaGeom->Cylinder(rF2+0.02, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
5aba2f60 1091 z2=z1;
1092 z1=z2-dFlange;
1093 flukaGeom->Cylinder(0.,rB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1094 flukaGeom->Cylinder(rB2, rF2 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1095 flukaGeom->Cylinder(rF2, rF2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1096 flukaGeom->Cylinder(rF2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
1097 z2=z1;
1098 z1=zcy1;
1099 flukaGeom->Cylinder(0.,rB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1100 flukaGeom->Cylinder(rB2, rB2+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1101 flukaGeom->Cylinder(rB2+0.1, rB2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1102 flukaGeom->Cylinder(rB2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
1103
1104 z1=zfl+dF2/2.;
1105 z2=z1+dFlange;
1106 flukaGeom->Cylinder(0.,rB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1107 flukaGeom->Cylinder(rB2, rF2 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1108 flukaGeom->Cylinder(rF2, rF2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1109 flukaGeom->Cylinder(rF2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
1110 z1=z2;
1111 z2=zcy2;
1112 flukaGeom->Cylinder(0.,rB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1113 flukaGeom->Cylinder(rB2, rB2+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1114 flukaGeom->Cylinder(rB2+0.1, rB2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1115 flukaGeom->Cylinder(rB2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
1116//
1117// end Fluka
1118
1119 parPb[0] = dl;
a0cb6c86 1120 parPb[1] = rPbLast;
5aba2f60 1121 parPb[2] = 30;
1122 parPb[3] = parPb[1]+2.*dl*TMath::Tan(thetaOpenPb);
1123 parPb[4] = 30;
1124 gMC->Gsvolu("YXO3", "CONE", idtmed[kPb], parPb, 5);
1125 gMC->Gspos("YXO3", 1, "YGO3", 0., 0., 0., 0, "ONLY");
3a685df6 1126
1127 for (i=4; i<26; i+=3) par3[i] = 0;
1128
5aba2f60 1129 gMC->Gsvolu("YMO3", "PCON", idtmed[kVacuum+40], par3, 27);
1130 gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");
1131
1132//
1133// Steel envelope
1134 tpar[0]=26;
1135 tpar[1]=30;
1136 tpar[2]=dl;
1137 gMC->Gsvolu("YS31", "TUBE", idtmed[kSteel], tpar, 3);
1138 gMC->Gspos("YS31", 1, "YXO3", 0., 0., 0., 0, "ONLY");
1139 dZ+=dl;
1140 gMC->Gspos("YMO3", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
1141 dZ+=dl;
1142
1143//
1144// 3rd section: vacuum system
1145//
1146//
1147// Bellow2
1148//
1149 tpar[0]=rB2;
1150 tpar[1]=rB2+hB2;
1151 tpar[2]=eB2/2.;
1152 gMC->Gsvolu("YB21", "TUBE", idtmed[kSteel+40], tpar, 3);
1153 dl1=tpar[2];
1154
1155 tpar[0]=rB2+hB2-eB2;
1156 tpar[1]=rB2+hB2;
1157 tpar[2]=(lB2/2.-2.*eB2)/2.;
1158 gMC->Gsvolu("YB22", "TUBE", idtmed[kSteel+40], tpar, 3);
1159 dl2=tpar[2];
1160
1161 tpar[0]=rB2-eB2;
1162 tpar[1]=rB2;
1163 tpar[2]=lB2/8.;
1164 gMC->Gsvolu("YB23", "TUBE", idtmed[kSteel+40], tpar, 3);
1165 dl3=tpar[2];
1166
1167
1168 tpar[0]=0;
1169 tpar[1]=rB2+hB2;
1170 tpar[2]=lB2/2.;
1171 gMC->Gsvolu("YBU2", "TUBE", idtmed[kVacuum+40], tpar, 3);
1172
1173 dz=-tpar[2]+dl3;
1174 gMC->Gspos("YB23", 1, "YBU2", 0., 0., dz, 0, "ONLY");
1175 dz+=dl3;
1176 dz+=dl1;
1177 gMC->Gspos("YB21", 1, "YBU2", 0., 0., dz, 0, "ONLY");
1178 dz+=dl1;
1179 dz+=dl2;
1180 gMC->Gspos("YB22", 1, "YBU2", 0., 0., dz, 0, "ONLY");
1181 dz+=dl2;
1182 dz+=dl1;
1183 gMC->Gspos("YB21", 2, "YBU2", 0., 0., dz, 0, "ONLY");
1184 dz+=dl1;
1185 dz+=dl3;
1186 gMC->Gspos("YB23", 2, "YBU2", 0., 0., dz, 0, "ONLY");
1187
1188
1189 tpar[0]=0;
1190 tpar[1]=rB2+hB2;
1191 tpar[2]=7.*lB2/2.;
1192 gMC->Gsvolu("YBM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
1193 dz=-tpar[2]+lB2/2.;
3a685df6 1194
1195 for (i=0; i<7; i++) {
1196 gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY");
1197 dz+=lB2;
1198 }
1199
5aba2f60 1200 dz=-dl+dr21+tpar[2];
1201 gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
1202
1203 dz=dl-dr23-tpar[2];
1204 gMC->Gspos("YBM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1205
1206//
1207// Flange
1208
1209 tpar[0]=0;
1210 tpar[1]=rF2;
1211 tpar[2]=dF2/2.;
1212 gMC->Gsvolu("YFM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
1213
a0cb6c86 1214 tpar[0]=rF2-2.;
5aba2f60 1215 tpar[1]=rF2;
1216 tpar[2]=dF2/2.;
1217 gMC->Gsvolu("YF21", "TUBE", idtmed[kSteel+40], tpar, 3);
1218 gMC->Gspos("YF21", 1, "YFM2", 0., 0., 0., 0, "ONLY");
1219
1220 tpar[0]=rB2;
a0cb6c86 1221 tpar[1]=rF2-2.;
5aba2f60 1222 tpar[2]=dFlange/2.;
1223 gMC->Gsvolu("YF22", "TUBE", idtmed[kSteel+40], tpar, 3);
1224 dz=-dF2/2.+tpar[2];
1225 gMC->Gspos("YF22", 1, "YFM2", 0., 0., dz, 0, "ONLY");
1226 dz= dF2/2.-tpar[2];
1227 gMC->Gspos("YF22", 2, "YFM2", 0., 0., dz, 0, "ONLY");
1228
1229 dz=dr21/2.-dr23/2.;
1230 gMC->Gspos("YFM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1231
1232
1233//
1234// pipe between flange and bellows
1235 tpar[0]=rB2-dTubeS;
1236 tpar[1]=rB2;
1237 tpar[2]=2.*(dB2+dr22-7.*lB2)/4.;
1238 gMC->Gsvolu("YPF2", "TUBE", idtmed[kSteel+40], tpar, 3);
1239 dz=dr21/2.-dr23/2.-dF2/2.-tpar[2];
1240 gMC->Gspos("YPF2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
1241 dz=dr21/2.-dr23/2.+dF2/2.+tpar[2];
1242 gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1243
a0cb6c86 1244 Float_t dHorZ=55.;
1245
5aba2f60 1246//
1247// 4th section: rear shield and closing cone
1248//
1249 par4[0] = 0.;
1250 par4[1] = 360.;
a0cb6c86 1251 par4[2] = 7.;
5aba2f60 1252 dl=(zvac12-zvac9)/2.;
1253
1254 par4[3] = -dl;
1255 par4[4] = r3;
1256 par4[5] = 30.;
1257
a0cb6c86 1258 par4[6] = -dl+dHorZ;
1259 par4[7] = r3;
5aba2f60 1260 par4[8] = 30.;
1261
a0cb6c86 1262 par4[9] = -dl+(zvac10-zvac9);
1263 par4[10] = r3+(zvac10-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
1264 par4[11] = 30.;
5aba2f60 1265
a0cb6c86 1266 par4[12] = par4[9];
1267 par4[13] = par4[10];
5aba2f60 1268 par4[14] = R42;
1269
a0cb6c86 1270 par4[15] = -dl+(zvac11-zvac9);
1271 par4[16] = r3+(zvac11-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
1272 par4[17] = R42;
5aba2f60 1273
a0cb6c86 1274 par4[18] = par4[15];
1275 par4[19] = par4[16];
5aba2f60 1276 par4[20] = R43;
1277
a0cb6c86 1278 par4[21] = -dl+(zvac12-zvac9);
1279 par4[22] = rAbs;
1280 par4[23] = R43;
1281
1282 gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 24);
5aba2f60 1283
1284 parPb[0] = (zvac10-zvac9)/2.;
1285 parPb[1] = parPb[3];
1286 parPb[2] = 30;
1287 parPb[3] = parPb[1]+2.*parPb[0]*TMath::Tan(thetaOpenPb);
1288 parPb[4] = 30;
1289 gMC->Gsvolu("YXO4", "CONE", idtmed[kPb], parPb, 5);
1290 gMC->Gspos("YXO4", 1, "YGO4", 0., 0., -dl+parPb[0], 0, "ONLY");
1291
1292 parPb[0] = (zvac12-zvac10)/2.;
1293 parPb[1] = parPb[3];
1294 parPb[2] = 31.;
1295 parPb[3] = parPb[1]+2.*parPb[0]*TMath::Tan(thetaOpenPb);
1296 parPb[4] = 31.;
1297 gMC->Gsvolu("YXO5", "CONE", idtmed[kPb], parPb, 5);
1298 gMC->Gspos("YXO5", 1, "YGO4", 0., 0., -dl+(zvac10-zvac9)+parPb[0], 0, "ONLY");
3a685df6 1299
1300 for (i=4; i<23; i+=3) par4[i] = 0;
5aba2f60 1301
a0cb6c86 1302 gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 24);
5aba2f60 1303 gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");
1304
1305
1306
1307 dZ+=dl;
1308 gMC->Gspos("YMO4", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
1309 dZ+=dl;
1310//
1311// Closing concrete cone
1312//
1313 cpar[0]=(zvac12-zvac11)/2.;
a0cb6c86 1314 cpar[1] = r3+(zvac11-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
5aba2f60 1315 cpar[2] = cpar[1]+0.001;
1316 cpar[3] = rAbs;
1317 cpar[4] = cpar[2];
1318 gMC->Gsvolu("YCC4", "CONE", idtmed[kConcrete+40], cpar, 5);
1319 dz=dl-cpar[0];
1320 gMC->Gspos("YCC4", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1321
1322//
1323// begin Fluka
a0cb6c86 1324 Float_t r10=r3+(zvac10-zvac9-dHorZ) * TMath::Tan(thetaOpen3);
5aba2f60 1325 Float_t r11=cpar[1];
a0cb6c86 1326
1327 Float_t rPb0=15.+(zvac9-zvac4)* TMath::Tan(thetaOpenPb);
1328 Float_t rPb1=15.+(zvac9+dHorZ-zvac4)* TMath::Tan(thetaOpenPb);
5aba2f60 1329 Float_t rPb2=15.+(zvac10-zvac4)* TMath::Tan(thetaOpenPb);
1330 flukaGeom->Comment("4th part: Shield");
1331
a0cb6c86 1332 flukaGeom->Cone(rPb0, rPb1, 26.0, 26.0, zvac9, zvac9+dHorZ,
5aba2f60 1333 posfluka, "LEAD", "NF", "$SHH");
1334 if (fPbCone) {
a0cb6c86 1335 flukaGeom->Cone(r3, r3, rPb0, rPb1, zvac9, zvac9+dHorZ,
5aba2f60 1336 posfluka, "LEAD", "NF", "$SHS");
1337 } else {
a0cb6c86 1338 flukaGeom->Cone(r3, r3, rPb0, rPb1, zvac9, zvac9+dHorZ,
1339 posfluka, "NIW", "NF", "$SHS");
1340 }
1341
1342 flukaGeom->Cone(rPb1, rPb2, 26.0, 26.0, zvac9+dHorZ, zvac10,
1343 posfluka, "LEAD", "NF", "$SHH");
1344 if (fPbCone) {
1345 flukaGeom->Cone(r3, r10, rPb1, rPb2, zvac9+dHorZ, zvac10,
1346 posfluka, "LEAD", "NF", "$SHS");
1347 } else {
1348 flukaGeom->Cone(r3, r10, rPb1, rPb2, zvac9+dHorZ, zvac10,
5aba2f60 1349 posfluka, "NIW", "NF", "$SHS");
1350 }
1351
1352
1353 rPb1=rPb2;
1354 rPb2=15.+(zvac11-zvac4)* TMath::Tan(thetaOpenPb);
1355 flukaGeom->Cone(rPb1, rPb2, 30.0, 30.0, zvac10, zvac11,
1356 posfluka, "LEAD", "NF", "$SHH");
1357 if (fPbCone) {
1358 flukaGeom->Cone(r10, r11, rPb1, rPb2, zvac10, zvac11,
1359 posfluka, "LEAD", "NF", "$SHH");
1360 } else {
1361 flukaGeom->Cone(r10, r11, rPb1, rPb2, zvac10, zvac11,
1362 posfluka, "NIW", "NF", "$SHH");
1363 }
1364
1365 flukaGeom->Cylinder( rPb2, 30.0, zvac11, zvac12,
1366 posfluka, "LEAD", "NF", "$SHH");
1367 if (fPbCone) {
1368 flukaGeom->Cylinder( cpar[1], rPb2, zvac11, zvac12,
1369 posfluka, "LEAD", "NF", "$SHH");
1370 } else {
a0cb6c86 1371 flukaGeom->Cylinder( cpar[1], rPb2, zvac11, zvac12,
1372 posfluka, "NIW", "NF", "$SHH");
5aba2f60 1373 }
1374
1375 flukaGeom->Comment("4th part: Steel Envelope");
1376 flukaGeom->Cylinder(26.0, 30., zvac9, zvac10, posfluka, "STEEL", "NF", "$SHH");
1377 flukaGeom->Comment("4th part: Closing Cone");
1378 flukaGeom->Cone(cpar[1]-0.1, cpar[3], cpar[1], cpar[1], zvac11, zvac12,
1379 posfluka, "PORTLAND", "NF", "$SHH");
1380 flukaGeom->Comment("4th part: VACUUM");
1381 flukaGeom->Cone(0., 0., cpar[1]-0.1, cpar[3], zvac11, zvac12,
1382 posfluka, "VACUUM", "NF", "$SHH");
1383//
1384// end Fluka
1385
1386//
1387// Steel envelope
1388//
1389 dz=-dl;
1390 tpar[0]=26.;
1391 tpar[1]=30.;
1392 tpar[2]=(zvac10-zvac9)/2.;
1393 gMC->Gsvolu("YS41", "TUBE", idtmed[kSteel], tpar, 3);
1394 dz+=tpar[2];
1395 gMC->Gspos("YS41", 1, "YXO4", 0., 0., 0., 0, "ONLY");
1396 dz+=tpar[2];
1397/*
1398 tpar[0]=30.;
1399 tpar[1]=R41;
1400 tpar[2]=2.;
1401 gMC->Gsvolu("YS42", "TUBE", idtmed[kSteel], tpar, 3);
1402 dz+=tpar[2];
1403 gMC->Gspos("YS42", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1404 dz+=tpar[2];
1405*/
1406 tpar[0]=R41-dRSteel2;
1407 tpar[1]=R41;
1408 tpar[2]=(zvac11-zvac10)/2.;
1409 gMC->Gsvolu("YS43", "TUBE", idtmed[kSteel], tpar, 3);
1410 dz+=tpar[2];
1411 gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1412//
1413// rear lead shield
1414//
1415 tpar[0]=R41;
1416 tpar[1]=R42;
1417 tpar[2]=(zvac11-zvac10)/2.;
1418 gMC->Gsvolu("YPBI", "TUBE", idtmed[kPb+40], tpar, 3);
1419 dz-=0;
1420 gMC->Gspos("YPBI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1421
1422 tpar[0]=R42-5;
1423 tpar[1]=R42;
1424 tpar[2]=(zvac11-zvac10)/2.;
1425 gMC->Gsvolu("YPBO", "TUBE", idtmed[kPb], tpar, 3);
1426 gMC->Gspos("YPBO", 1, "YPBI", 0., 0., 0., 0, "ONLY");
1427
1428//
1429// rear Fe shield
1430//
1431
1432 tpar[0]=31.;
1433 tpar[1]=R43;
1434 tpar[2]=(zvac12-zvac11)/2.;
1435 gMC->Gsvolu("YFEI", "TUBE", idtmed[kFe+40], tpar, 3);
1436 dz=dl-tpar[2];
1437 gMC->Gspos("YFEI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1438
1439 tpar[0]=31.;
1440 tpar[1]=R43;
1441 tpar[2]=2.5;
1442 gMC->Gsvolu("YFEO", "TUBE", idtmed[kFe], tpar, 3);
1443 dz=-(zvac12-zvac11)/2.+tpar[2];
1444 gMC->Gspos("YFEO", 1, "YFEI", 0., 0., dz, 0, "ONLY");
1445//
1446// Magnet element
1447//
1448 tpar[0]=0.;
1449 tpar[1]=R43;
1450 tpar[2]=50.;
1451 gMC->Gsvolu("YAEM", "TUBE", idtmed[kAir], tpar, 3);
1452 tpar[0]=rAbs;
1453 tpar[1]=R43;
1454 tpar[2]=50.;
1455 gMC->Gsvolu("YFEM", "TUBE", idtmed[kFe], tpar, 3);
1456 gMC->Gspos("YFEM", 1, "YAEM", 0., 0., 0., 0, "ONLY");
1457
1458//
1459
1460 dz=zvac12+50.;
1461 gMC->Gspos("YAEM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1462
1463
1464//
1465//
1466// 4th section: vacuum system
1467//
1468// up to closing cone
a0cb6c86 1469 r3V=r3-dr23+dVacuS;
1470
5aba2f60 1471 cpar0[0]=(zvac11-zvac9)/2;
a0cb6c86 1472 cpar0[1]=r3V-dVacuS;
1473 cpar0[2]=r3V;
5aba2f60 1474 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpen3);
1475 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpen3);
1476 gMC->Gsvolu("YV31", "CONE", idtmed[kSteel+40], cpar0, 5);
1477//
1478// insulation
1479 cpar[0]=cpar0[0];
1480 cpar[1]=cpar0[1]+dTubeS;
1481 cpar[2]=cpar0[1]+dTubeS+dInsuS;
1482 cpar[3]=cpar0[3]+dTubeS;
1483 cpar[4]=cpar0[3]+dTubeS+dInsuS;
1484 gMC->Gsvolu("YI31", "CONE", idtmed[kInsulation+40], cpar, 5);
1485 gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY");
1486//
1487// clearance
1488 cpar[1]=cpar0[2]-dProtS-dFreeS;
1489 cpar[2]=cpar0[2]-dProtS;
1490 cpar[3]=cpar0[4]-dProtS-dFreeS;
1491 cpar[4]=cpar0[4]-dProtS;
1492 gMC->Gsvolu("YP31", "CONE", idtmed[kVacuum+40], cpar, 5);
1493 gMC->Gspos("YP31", 1, "YV31", 0., 0., 0., 0, "ONLY");
1494
1495 dz=-dl+cpar[0];
1496 gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY");
1497
1498//
1499// begin Fluka
a0cb6c86 1500 flukaGeom->Comment("4th part: Beam pipe lateral structure");
3a685df6 1501 for (i=0; i<7; i++) fieldsA[i] = "NF";
a0cb6c86 1502
1503 rf1[0]=0.; rf2[0]=0.;
1504
1505 rf1[1]=cpar0[1]; rf2[1]=rf1[1]+dHorZ*TMath::Tan(thetaOpen3);
1506
1507 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+dInsuS; rf1[4]=rf1[3]+dEnveS;
1508 rf1[5]=rf1[4]+dFreeS; rf1[6]=r3;
1509
1510 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+dInsuS; rf2[4]=rf2[3]+dEnveS;
1511 rf2[5]=rf2[4]+dFreeS; rf2[6]=r3;
1512
1513 flukaGeom->OnionCone(rf1, rf2, 7 , zvac9 , zvac9+dHorZ, posfluka, materialsA, fieldsA, cutsA);
1514
5aba2f60 1515 rf1[0]=0.; rf2[0]=0.;
5aba2f60 1516
a0cb6c86 1517 rf1[1]=rf2[1]; rf2[1]=rf1[1]+(zvac10-zvac9-dHorZ)*TMath::Tan(thetaOpen3);
1518
5aba2f60 1519 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+dInsuS; rf1[4]=rf1[3]+dEnveS;
1520 rf1[5]=rf1[4]+dFreeS; rf1[6]=r3;
a0cb6c86 1521
5aba2f60 1522 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+dInsuS; rf2[4]=rf2[3]+dEnveS;
1523 rf2[5]=rf2[4]+dFreeS; rf2[6]=r10;
1524
5aba2f60 1525
a0cb6c86 1526 flukaGeom->OnionCone(rf1, rf2, 7 , zvac9+dHorZ, zvac10, posfluka, materialsA, fieldsA, cutsA);
5aba2f60 1527
1528 rf1[0]=0.; rf2[0]=0.;
1529 rf1[1]=rf2[1]; rf2[1]=rf1[1]+(zvac11-zvac10)*TMath::Tan(thetaOpen3);
1530
1531 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+dInsuS; rf1[4]=rf1[3]+dEnveS;
1532 rf1[5]=rf1[4]+dFreeS; rf1[6]=r10;
1533 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+dInsuS; rf2[4]=rf2[3]+dEnveS;
1534 rf2[5]=rf2[4]+dFreeS; rf2[6]=r11;
1535
1536 flukaGeom->OnionCone(rf1, rf2, 7 , zvac10, zvac11, posfluka, materialsA, fieldsA, cutsA);
5aba2f60 1537//
1538// end Fluka
1539
1540//
1541// closing cone
1542 cpar0[0]=(zvac12-zvac11)/2;
a0cb6c86 1543 cpar0[1]=r3V-dVacuS+(zvac11-zvac9)*TMath::Tan(thetaOpen3);
1544 cpar0[2]=r3V +(zvac11-zvac9)*TMath::Tan(thetaOpen3);
5aba2f60 1545 cpar0[3]=rVacu;
12133ee7 1546 cpar0[4]=rVacu+dTubeS+dInsuS+dProtS+dFreeS;
5aba2f60 1547 gMC->Gsvolu("YV32", "CONE", idtmed[kSteel+40], cpar0, 5);
1548//
1549// insulation
1550 cpar[0]=cpar0[0];
1551 cpar[1]=cpar0[1]+dTubeS;
1552 cpar[2]=cpar0[1]+dTubeS+dInsuS;
1553 cpar[3]=cpar0[3]+dTubeS;
1554 cpar[4]=cpar0[3]+dTubeS+dInsuS;
1555 gMC->Gsvolu("YI32", "CONE", idtmed[kInsulation+40], cpar, 5);
1556 gMC->Gspos("YI32", 1, "YV32", 0., 0., 0., 0, "ONLY");
1557//
1558// clearance
1559 cpar[1]=cpar0[2]-dProtS-dFreeS;
1560 cpar[2]=cpar0[2]-dProtS;
1561 cpar[3]=cpar0[4]-dProtS-dFreeS;
1562 cpar[4]=cpar0[4]-dProtS;
1563 gMC->Gsvolu("YP32", "CONE", idtmed[kVacuum+40], cpar, 5);
1564 gMC->Gspos("YP32", 1, "YV32", 0., 0., 0., 0, "ONLY");
1565
1566 dz=dl-cpar[0];
1567 gMC->Gspos("YV32", 1, "YMO4", 0., 0., dz, 0, "ONLY");
1568//
1569//
1570// MUON trigger wall
1571//
1572 tpar[0] = 50.;
1573 tpar[1] = 310.;
1574 tpar[2] = (zFilterOut - zFilterIn) / 2.;
1575 gMC->Gsvolu("YFIM", "TUBE", idtmed[kFe+40], tpar, 3);
1576 dz = (zFilterIn + zFilterOut) / 2.;
1577 tpar[2] -= 10.;
1578 gMC->Gsvolu("YFII","TUBE", idtmed[kFe], tpar, 3);
1579 gMC->Gspos("YFII", 1, "YFIM", 0., 0., 0., 0, "ONLY");
1580 gMC->Gspos("YFIM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1581//
1582// Shielding close to chamber
1583//
a0cb6c86 1584//
1585 cpar[0]=(zch11-zRear)/2.;
5aba2f60 1586 cpar[1]=R11;
1587 cpar[2]=zRear*TMath::Tan(accMin);
1588 cpar[3]=R11;
1589 cpar[4]=(zRear+2.*cpar[0])*TMath::Tan(accMin);
1590 gMC->Gsvolu("YCS1", "CONE", idtmed[kNiCuW], cpar, 5);
1591 dz=zRear+cpar[0];
1592 gMC->Gspos("YCS1", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1593
a0cb6c86 1594 cpar[0]=(zvac4-zch12)/2.;
5aba2f60 1595 cpar[1]=R11;
a0cb6c86 1596 cpar[2]=zch12*TMath::Tan(accMin);
5aba2f60 1597 cpar[3]=R11;
a0cb6c86 1598 cpar[4]=(zch12+2.*cpar[0])*TMath::Tan(accMin);
1599 gMC->Gsvolu("YCS3", "CONE", idtmed[kNiCuW], cpar, 5);
5aba2f60 1600 dz=zvac4-cpar[0];
a0cb6c86 1601 gMC->Gspos("YCS3", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1602
5aba2f60 1603
a0cb6c86 1604// Recess station 1
1605
1606 cpar[0]=(zch12-zch11)/2.;
5aba2f60 1607 cpar[1]=R11;
a0cb6c86 1608 cpar[2]=18.;
5aba2f60 1609 cpar[3]=R11;
e2e83b79 1610 cpar[4]=17.9;
a0cb6c86 1611 gMC->Gsvolu("YCS2", "CONE", idtmed[kAir], cpar, 5);
1612 dz=zch11+cpar[0];
1613 gMC->Gspos("YCS2", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1614
1615 Float_t ptubs[5];
1616 ptubs[0] = R11;
e2e83b79 1617 ptubs[1] = 17.9;
a0cb6c86 1618 ptubs[2] = 0.;
1619// phi_min, phi_max
1620 ptubs[3] = 0.;
1621 ptubs[4] = 90.;
1622 gMC->Gsvolu("YCR0", "TUBS", idtmed[kNiCuW], ptubs, 0);
1623 Int_t idrotm[1799];
1624
1625 AliMatrix(idrotm[1701],90., 0., 90., 90., 0., 0.);
1626 AliMatrix(idrotm[1702],90., 90., 90., 180., 0., 0.);
1627 AliMatrix(idrotm[1703],90., 180., 90., 270., 0., 0.);
1628 AliMatrix(idrotm[1704],90., 270., 90., 0., 0., 0.);
12133ee7 1629 // Int_t ipos;
a0cb6c86 1630
1631 dz=-cpar[0];
1632// 1.
1633 ptubs[2]=6.5/2.;
1634 dz+=ptubs[2];
1635 gMC->Gsposp("YCR0", 1, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1636 gMC->Gsposp("YCR0", 2, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1637 dz+=ptubs[2];
1638 dz+=1.5;
1639// 2.
1640 ptubs[2]=5.0/2.;
1641 dz+=ptubs[2];
1642 gMC->Gsposp("YCR0", 3, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1643 gMC->Gsposp("YCR0", 4, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1644 dz+=ptubs[2];
1645 dz+=1.5;
1646// 3.
1647 ptubs[2]=5.0/2.;
1648 dz+=ptubs[2];
1649 gMC->Gsposp("YCR0", 5, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1650 gMC->Gsposp("YCR0", 6, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1651 dz+=ptubs[2];
1652 dz+=1.5;
1653// 4.
1654 ptubs[2]=6.5/2.;
1655 dz+=ptubs[2];
1656 gMC->Gsposp("YCR0", 7, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1657 gMC->Gsposp("YCR0", 8, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1658 dz+=ptubs[2];
1659 dz+=1.5;
5aba2f60 1660
1661
a0cb6c86 1662
1663 cpar[0]=(zch21-zvac4)/2.;
5aba2f60 1664 cpar[1]=R21;
1665 cpar[2]=zvac4*TMath::Tan(accMin);
1666 cpar[3]=R21;
1667 cpar[4]=(zvac4+2.*cpar[0])*TMath::Tan(accMin);
1668 gMC->Gsvolu("YCS4", "CONE", idtmed[kNiCuW], cpar, 5);
1669 dz=zvac4+cpar[0];
1670 gMC->Gspos("YCS4", 1, "ALIC", 0., 0., dz, 0, "ONLY");
5aba2f60 1671
a0cb6c86 1672 cpar[0]=(zvac6-zch22)/2.;
5aba2f60 1673 cpar[1]=R21;
a0cb6c86 1674 cpar[2]=zch22*TMath::Tan(accMin);
5aba2f60 1675 cpar[3]=R21;
a0cb6c86 1676 cpar[4]=(zch22+2.*cpar[0])*TMath::Tan(accMin);
1677 gMC->Gsvolu("YCS6", "CONE", idtmed[kNiCuW], cpar, 5);
5aba2f60 1678 dz=zvac6-cpar[0];
a0cb6c86 1679 gMC->Gspos("YCS6", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1680
1681// Recess station 2
1682
1683 cpar[0]=(zch22-zch21)/2.;
5aba2f60 1684 cpar[1]=R21;
a0cb6c86 1685 cpar[2]=23.;
5aba2f60 1686 cpar[3]=R21;
a0cb6c86 1687 cpar[4]=23.;
1688 gMC->Gsvolu("YCS5", "CONE", idtmed[kAir], cpar, 5);
1689 dz=zch21+cpar[0];
1690 gMC->Gspos("YCS5", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1691
1692 ptubs[0] = R21;
1693 ptubs[1] = 23;
1694 ptubs[2] = 0.;
1695 ptubs[3] = 0.;
1696 ptubs[4] = 90.;
1697 gMC->Gsvolu("YCR1", "TUBS", idtmed[kNiCuW], ptubs, 0);
1698
1699 dz=-cpar[0];
1700// 1.
1701 ptubs[2]=7.5/2.;
1702 dz+=ptubs[2];
1703 gMC->Gsposp("YCR1", 1, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1704 gMC->Gsposp("YCR1", 2, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1705 dz+=ptubs[2];
1706 dz+=1.5;
1707// 2.
1708 ptubs[2]=6.0/2.;
1709 dz+=ptubs[2];
1710 gMC->Gsposp("YCR1", 3, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1711 gMC->Gsposp("YCR1", 4, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1712 dz+=ptubs[2];
1713 dz+=1.5;
1714// 3.
1715 ptubs[2]=6.0/2.;
1716 dz+=ptubs[2];
1717 gMC->Gsposp("YCR1", 5, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1718 gMC->Gsposp("YCR1", 6, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1719 dz+=ptubs[2];
1720 dz+=1.5;
1721// 4.
1722 ptubs[2]=7.5/2.;
1723 dz+=ptubs[2];
1724 gMC->Gsposp("YCR1", 7, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1725 gMC->Gsposp("YCR1", 8, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1726 dz+=ptubs[2];
1727 dz+=1.5;
1728
1729
1730//
1731// begin Fluka
1732 flukaGeom->Cone(R11, R11, -1., -1.,
1733 zRear, zch11, posfluka,"NIW", "MF", "$SHS");
1734
1735 flukaGeom->Cone(R11, R11, -1., -1.,
1736 zch11, zch12, posfluka,"AIR", "MF", "$SHS");
1737
1738 flukaGeom->Cone(R11, R11, -1., -1.,
1739 zch12, zvac4, posfluka,"NIW", "MF", "$SHS");
1740
1741 flukaGeom->Cone(R21, R21, -1., -1.,
1742 zvac4, zch21, posfluka,"NIW", "MF", "$SHS");
1743 flukaGeom->Cone(R21, R21, -1., -1.,
1744 zch21, zch22, posfluka,"AIR", "MF", "$SHS");
1745 flukaGeom->Cone(R21, R21, -1., -1.,
1746 zch22, zvac6, posfluka,"NIW", "MF", "$SHS");
1747
1748
1749 flukaGeom->Finish();
1750
1751//
1752// end Fluka
5aba2f60 1753//
1754// Outer Pb Cone
a0cb6c86 1755
5aba2f60 1756 if (fPbCone) {
a0cb6c86 1757
1758 par0[0] = 0.;
1759 par0[1] = 360.;
1760 par0[2] = 10.;
1761/*
1762// start of cone
1763 par0[3] = zConeE;
1764 par0[4] = 30.;
1765 par0[5] = 30.01;
1766// 3rd station
1767 par0[6] = zch31;
1768 par0[7] = 30.;
1769 par0[8] = 30.+(zch31-zConeE)*TMath::Tan(thetaOpenPbO);
1770
1771 par0[9] = zch31;
1772 par0[10] = 30.0;
1773 par0[11] = par0[8]-1.;
5aba2f60 1774
a0cb6c86 1775
1776 par0[12] = zch32;
1777 par0[13] = 30.0;
1778 par0[14] = par0[11];
1779*/
1780 par0[ 3] = zch32;
1781 par0[ 4] = 30.;
1782 par0[ 5] = 30.+(zch32-zConeE)*TMath::Tan(thetaOpenPbO);
1783
1784// 4th station
1785 par0[ 6] = zch41;
1786 par0[ 7] = 30.;
1787 par0[ 8] = 30.+(zch41-zConeE)*TMath::Tan(thetaOpenPbO);
1788
1789 par0[ 9] = zch41;
1790 par0[10] = 30.;
1791 par0[11] = 37.5;
1792 // recess erice2000
1793 par0[12] = zch42;
1794 par0[13] = 30.;
1795 par0[14] = par0[11];
1796
1797 par0[15] = zch42;
1798 par0[16] = 30.;
1799 par0[17] = 30.+(zch42-zConeE)*TMath::Tan(thetaOpenPbO);
1800
1801// 5th station
1802 par0[18] = zch51;
1803 par0[19] = 30.;
1804 par0[20] = 30.+(zch51-zConeE)*TMath::Tan(thetaOpenPbO);
1805
1806 par0[21] = zch51;
1807 par0[22] = 30.;
1808 par0[23] = 37.5; // recess erice2000
1809
1810 par0[24] = zch52;
1811 par0[25] = 30.;
1812 par0[26] = par0[23];
1813
1814 par0[27] = zch52;
1815 par0[28] = 30.;
1816 par0[29] = 30.+(zch52-zConeE)*TMath::Tan(thetaOpenPbO);
1817// end of cone
1818 par0[30] = zFilterIn;
1819 par0[31] = 30.;
1820 par0[32] = par0[29];
1821//
1822 gMC->Gsvolu("YOPB", "PCON", idtmed[kPb], par0, 33);
1823 dz=0.;
5aba2f60 1824 gMC->Gspos("YOPB", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1825 }
1826}
1827
1828void AliSHILvF::Init()
1829{
1830 //
1831 // Initialise the muon shield after it has been built
1832 //
1833 Int_t i;
1834 //
12133ee7 1835 if(fDebug) {
1836 printf("\n%s: ",ClassName());
1837 for(i=0;i<35;i++) printf("*");
1838 printf(" SHILvF_INIT ");
1839 for(i=0;i<35;i++) printf("*");
1840 printf("\n%s: ",ClassName());
1841 //
1842 // Here the SHIL initialisation code (if any!)
1843 for(i=0;i<80;i++) printf("*");
1844 printf("\n");
1845 }
5aba2f60 1846}