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