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