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