Standard version of SHIL
[u/mrichter/AliRoot.git] / STRUCT / AliSHILv0.cxx
CommitLineData
6523e275 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// //
22// Muon Shield Class //
23// This class contains a description of the muon shield //
24// //
25//Begin_Html
26/*
27<img src="picts/AliSHILClass.gif">
28*/
29//End_Html
30// //
31// //
32///////////////////////////////////////////////////////////////////////////////
33
34#include "AliSHILv0.h"
35#include "AliRun.h"
36#include "AliConst.h"
37
38ClassImp(AliSHILv0)
39
40//_____________________________________________________________________________
41AliSHILv0::AliSHILv0()
42{
43 //
44 // Default constructor for muon shield
45 //
46}
47
48//_____________________________________________________________________________
49AliSHILv0::AliSHILv0(const char *name, const char *title)
50 : AliSHIL(name,title)
51{
52 //
53 // Standard constructor for muon shield
54 //
55 SetMarkerColor(7);
56 SetMarkerStyle(2);
57 SetMarkerSize(0.4);
58}
59
60//_____________________________________________________________________________
61void AliSHILv0::CreateGeometry()
62{
63 //
64 // Build muon shield geometry
65 //
66 //
67 //Begin_Html
68 /*
69 <img src="picts/AliSHILv0.gif">
70 */
71 //End_Html
72 //Begin_Html
73 /*
74 <img src="picts/AliSHILv0Tree.gif">
75 */
76 //End_Html
77
78 Float_t cpar[5], cpar0[5], tpar[3], par1[39], par2[21], par3[27], par4[21], par0[42];
79 Float_t dz, DZ;
80
81 Int_t *idtmed = fIdtmed->GetArray()-1699;
82
83#include "ShieldConst.h"
84//
85// Mother volume
86//
87 par0[0] = 0.;
88 par0[1] = 360.;
89 par0[2] = 13.;
90
91 Float_t dl=(zvac12-abs_l+d_rear)/2.;
92 dz=abs_l-d_rear+dl;
93//
94 par0[3] = -dl;
95 par0[4] = 0.;
96 par0[5] = (abs_l-d_rear) * TMath::Tan(acc_min);
97
98 par0[6] = -dl+d_rear;
99 par0[7] = 0.;
100 par0[8] = abs_l * TMath::Tan(acc_min);
101
102 par0[9] = -dl+d_rear;
103 par0[10] = 0.;
104 par0[11] = R11;
105
106 par0[12] = -dz+zvac4;
107 par0[13] = 0.;
108 par0[14] = R11;
109
110 par0[15] = -dz+zvac4;
111 par0[16] = 0.;
112 par0[17] = R21;
113
114 par0[18] = -dz+zvac6;
115 par0[19] = 0.;
116 par0[20] = R21;
117
118 par0[21] = -dz+zvac6;
119 par0[22] = 0.;
120 par0[23] = zvac6 * TMath::Tan(acc_min);
121
122 par0[24] = -dz+zcone_e;
123 par0[25] = 0.;
124 par0[26] = 30.;
125
126 par0[27] = -dz+zvac10;
127 par0[28] = 0.;
128 par0[29] = 30.;
129
130 par0[30] = -dz+zvac10;
131 par0[31] = 0.;
132 par0[32] = R42;
133
134 par0[33] = -dz+zvac11;
135 par0[34] = 0.;
136 par0[35] = R42;
137
138 par0[36] = -dz+zvac11;
139 par0[37] = 0.;
140 par0[38] = R43;
141
142 par0[39] = -dz+zvac12;
143 par0[40] = 0.;
144 par0[41] = R43;
145
146 gMC->Gsvolu("YMOT", "PCON", idtmed[1755], par0, 42);
147 dz=abs_l+dl-d_rear;
148 gMC->Gspos("YMOT", 1, "ALIC", 0., 0., dz, 0, "ONLY");
149//
150
151 DZ=-dl;
152
153//
154// First section: bellows below and behind front absorber
155//
156//
157
158 par1[0] = 0.;
159 par1[1] = 360.;
160 par1[2] = 12.;
161 dl=(zvac4-abs_l+d_rear)/2.;
162
163 par1[3] = -dl;
164 par1[4] = r_abs+(abs_l-d_rear-abs_c) * TMath::Tan(theta_open1);
165 par1[5] = (abs_l-d_rear)* TMath::Tan(acc_min);
166
167 par1[6] = -dl+zvac1-(abs_l-d_rear);
168 par1[7] = r_abs+ (zvac1-abs_c) * TMath::Tan(theta_open1);
169 par1[8] = zvac1 * TMath::Tan(acc_min);
170
171 par1[9] = par1[6]+dr11;
172 par1[10] = par1[7]+dr11;
173 par1[11] = (zvac1+dr11) * TMath::Tan(acc_min);
174
175 par1[12] = -dl+d_rear;
176 par1[13] = par1[10];
177 par1[14] = abs_l * TMath::Tan(acc_min);
178
179 par1[15] = -dl+d_rear;
180 par1[16] = par1[10];
181 par1[17] = R11;
182
183 par1[18] = -dl+(zvac1+dr11+dB1-abs_l+d_rear);
184 par1[19] = par1[16];
185 par1[20] = R11;
186
187 par1[21] = par1[18]+dr12;
188 par1[22] = par1[19]+dr12;
189 par1[23] = R11;
190
191 par1[24] = par1[21]+dF1;
192 par1[25] = par1[22];
193 par1[26] = R11;
194
195 par1[27] = par1[24]+dr12;
196 par1[28] = par1[25]-dr12;
197 par1[29] = R11;
198
199 par1[30] = par1[27]+dB1;
200 par1[31] = par1[28];
201 par1[32] = R11;
202
203 par1[33] = par1[30]+dr13;
204 par1[34] = par1[31]-dr13;
205 par1[35] = R11;
206
207 par1[36] = -dl+zvac4-abs_l+d_rear;
208 par1[37] = par1[34]+(zvac4-zvac3)*TMath::Tan(theta_open2);
209 par1[38] = R11;
210
211 Float_t r2=par1[34];
212
213 gMC->Gsvolu("YGO1", "PCON", idtmed[1760], par1, 39);
214
215 for (Int_t i=4; i<38; i+=3) par1[i] = 0;
216 gMC->Gsvolu("YMO1", "PCON", idtmed[1755], par1, 39);
217
218 gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");
219
220 DZ+=dl;
221 gMC->Gspos("YMO1", 1, "YMOT", 0., 0., DZ, 0, "ONLY");
222 DZ+=dl;
223
224//
225// Steel envelope
226 tpar[0]=R11-dRSteel1;
227 tpar[1]=R11;
228 tpar[2]=dl-d_rear/2;
229 gMC->Gsvolu("YSE1", "TUBE", idtmed[1718], tpar, 3);
230 dz=dl-tpar[2];
231
232 gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
233
234//
235// 1st section: vacuum system
236//
237//
238// Bellow 1
239//
240 tpar[0]=rB1;
241 tpar[1]=rB1+hB1;
242 tpar[2]=eB1/2.;
243 gMC->Gsvolu("YB11", "TUBE", idtmed[1758], tpar, 3);
244 Float_t dl1=tpar[2];
245
246 tpar[0]=rB1+hB1-eB1;
247 tpar[1]=rB1+hB1;
248 tpar[2]=(lB1/2.-2.*eB1)/2.;
249 gMC->Gsvolu("YB12", "TUBE", idtmed[1758], tpar, 3);
250 Float_t dl2=tpar[2];
251
252 tpar[0]=rB1-eB1;
253 tpar[1]=rB1;
254 tpar[2]=lB1/8.;
255 gMC->Gsvolu("YB13", "TUBE", idtmed[1758], tpar, 3);
256 Float_t dl3=tpar[2];
257
258
259 tpar[0]=0;
260 tpar[1]=rB1+hB1;
261 tpar[2]=lB1/2.;
262 gMC->Gsvolu("YBU1", "TUBE", idtmed[1755], tpar, 3);
263
264 dz=-tpar[2]+dl3;
265 gMC->Gspos("YB13", 1, "YBU1", 0., 0., dz, 0, "ONLY");
266 dz+=dl3;
267 dz+=dl1;
268 gMC->Gspos("YB11", 1, "YBU1", 0., 0., dz, 0, "ONLY");
269 dz+=dl1;
270 dz+=dl2;
271 gMC->Gspos("YB12", 1, "YBU1", 0., 0., dz, 0, "ONLY");
272 dz+=dl2;
273 dz+=dl1;
274 gMC->Gspos("YB11", 2, "YBU1", 0., 0., dz, 0, "ONLY");
275 dz+=dl1;
276 dz+=dl3;
277 gMC->Gspos("YB13", 2, "YBU1", 0., 0., dz, 0, "ONLY");
278
279
280 tpar[0]=0;
281 tpar[1]=rB1+hB1;
282 tpar[2]=10.*lB1/2.;
283 gMC->Gsvolu("YBM1", "TUBE", idtmed[1755], tpar, 3);
284 dz=-tpar[2]+lB1/2.;
285 for (Int_t i=0; i<10; i++) {
286 gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0.,dz , 0, "ONLY");
287 dz+=lB1;
288 }
289 dz=-dl+(zvac1-abs_l+d_rear)+dr11+tpar[2];
290 gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
291
292 dz=dl-dr13-(zvac4-zvac3)-tpar[2]-(dr11-dr13);
293 gMC->Gspos("YBM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
294
295//
296// Flange
297
298 tpar[0]=0;
299 tpar[1]=rF1;
300 tpar[2]=dF1/2.;
301 gMC->Gsvolu("YFM1", "TUBE", idtmed[1755], tpar, 3);
302
303 tpar[0]=rF1-d_flange;
304 tpar[1]=rF1;
305 tpar[2]=dF1/2.;
306 gMC->Gsvolu("YF11", "TUBE", idtmed[1758], tpar, 3);
307 gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY");
308
309 tpar[0]=rB1;
310 tpar[1]=rF1-d_flange;
311 tpar[2]=d_flange/2.;
312 gMC->Gsvolu("YF12", "TUBE", idtmed[1758], tpar, 3);
313 dz=-dF1/2.+tpar[2];
314 gMC->Gspos("YF12", 1, "YFM1", 0., 0., dz, 0, "ONLY");
315 dz= dF1/2.-tpar[2];
316 gMC->Gspos("YF12", 2, "YFM1", 0., 0., dz, 0, "ONLY");
317
318 dz=-dl+(zvac2-abs_l+d_rear);
319 gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
320
321
322//
323// pipe between flange and bellows
324 tpar[0]=rB1-d_tube;
325 tpar[1]=rB1;
326 tpar[2]=2.*(dB1+dr12-10.*lB1)/4.;
327 gMC->Gsvolu("YPF1", "TUBE", idtmed[1758], tpar, 3);
328 dz=-dl+(zvac2-abs_l+d_rear)-dF1/2.-tpar[2];
329 gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
330 dz=-dl+(zvac2-abs_l+d_rear)+dF1/2.+tpar[2];
331 gMC->Gspos("YPF1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
332
333//
334// pipe and heating jackets outside bellows
335//
336// left side
337 cpar0[0]=(zvac1-abs_l+d_rear)/2;
338 cpar0[1]=r_vacu+(abs_l-d_rear-abs_c)*TMath::Tan(theta_open1);
339 cpar0[2]=r_abs +(abs_l-d_rear-abs_c)*TMath::Tan(theta_open1);
340 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(theta_open1);
341 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(theta_open1);
342 gMC->Gsvolu("YV11", "CONE", idtmed[1758], cpar0, 5);
343//
344// insulation
345 cpar[0]=cpar0[0];
346 cpar[1]=cpar0[1]+d_tube;
347 cpar[2]=cpar0[1]+d_tube+d_insu;
348 cpar[3]=cpar0[3]+d_tube;
349 cpar[4]=cpar0[3]+d_tube+d_insu;
350 gMC->Gsvolu("YI11", "CONE", idtmed[1753], cpar, 5);
351 gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY");
352//
353// clearance
354 cpar[1]=cpar0[2]-d_prot-d_free;
355 cpar[2]=cpar0[2]-d_prot;
356 cpar[3]=cpar0[4]-d_prot-d_free;
357 cpar[4]=cpar0[4]-d_prot;
358 gMC->Gsvolu("YP11", "CONE", idtmed[1755], cpar, 5);
359 gMC->Gspos("YP11", 1, "YV11", 0., 0., 0., 0, "ONLY");
360
361 dz=-dl+cpar0[0];
362 gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY");
363
364// right side
365 cpar0[0]=(zvac4-zvac3)/2;
366 cpar0[1]=r2-d_vacu;
367 cpar0[2]=r2 ;
368 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(theta_open2);
369 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(theta_open2);
370 gMC->Gsvolu("YV12", "CONE", idtmed[1758], cpar0, 5);
371//
372// insulation
373 cpar[0]=cpar0[0];
374 cpar[1]=cpar0[1]+d_tube;
375 cpar[2]=cpar0[1]+d_tube+d_insu;
376 cpar[3]=cpar0[3]+d_tube;
377 cpar[4]=cpar0[3]+d_tube+d_insu;
378 gMC->Gsvolu("YI12", "CONE", idtmed[1753], cpar, 5);
379 gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY");
380//
381// clearance
382 cpar[1]=cpar0[2]-d_prot-d_free;
383 cpar[2]=cpar0[2]-d_prot;
384 cpar[3]=cpar0[4]-d_prot-d_free;
385 cpar[4]=cpar0[4]-d_prot;
386 gMC->Gsvolu("YP12", "CONE", idtmed[1755], cpar, 5);
387 gMC->Gspos("YP12", 1, "YV12", 0., 0., 0., 0, "ONLY");
388
389 dz=dl-cpar0[0];
390 gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY");
391
392//
393// Second Section
394
395 par2[0] = 0.;
396 par2[1] = 360.;
397 par2[2] = 6.;
398 dl=(zvac7-zvac4)/2.;
399
400 par2[3] = -dl;
401 par2[4] = r2+(zvac5-zvac3) * TMath::Tan(theta_open2);
402 par2[5] = R11;
403
404 par2[6] = -dl;
405 par2[7] = par2[4];
406 par2[8] = R21;
407
408 par2[9] = -dl+(zvac6-zvac4);
409 par2[10] = r2+(zvac6-zvac3) * TMath::Tan(theta_open2);
410 par2[11] = R21;
411
412 par2[12] = -dl+(zvac6-zvac4);
413 par2[13] = par2[10];
414 par2[14] = zvac6*TMath::Tan(acc_min);
415
416 par2[15] = -dl+(zcone_e-zvac4);
417 par2[16] = r2+(zcone_e-zvac3) * TMath::Tan(theta_open2);
418 par2[17] = 30.;
419
420 par2[18] = -dl+(zvac7-zvac4);
421 par2[19] = r2+(zvac7-zvac3) * TMath::Tan(theta_open2);
422 par2[20] = 30.;
423
424
425 gMC->Gsvolu("YGO2", "PCON", idtmed[1760], par2, 21);
426
427 for (Int_t i=4; i<20; i+=3) par2[i] = 0;
428
429 gMC->Gsvolu("YMO2", "PCON", idtmed[1755], par2, 21);
430 gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");
431
432 DZ+=dl;
433 gMC->Gspos("YMO2", 1, "YMOT", 0., 0., DZ, 0, "ONLY");
434 DZ+=dl;
435//
436// Steel envelope
437//
438 tpar[0]=R11-dRSteel2;
439 tpar[1]=R21;
440 tpar[2]=2;
441 gMC->Gsvolu("YS21", "TUBE", idtmed[1718], tpar, 3);
442 dz=-dl+tpar[2];
443 gMC->Gspos("YS21", 1, "YGO2", 0., 0., dz, 0, "ONLY");
444 dz+=tpar[2];
445 tpar[0]=R21-dRSteel2;
446 tpar[1]=R21;
447 tpar[2]=(zvac6-zvac5)/2.;
448 gMC->Gsvolu("YS22", "TUBE", idtmed[1718], tpar, 3);
449 dz+=tpar[2];
450 gMC->Gspos("YS22", 1, "YGO2", 0., 0., dz, 0, "ONLY");
451 dz+=tpar[2];
452
453 cpar[0]=2.;
454 cpar[1]=R21-dRSteel2;
455 cpar[2]=zvac6 * TMath::Tan(acc_min);
456 cpar[3]=cpar[1];
457 cpar[4]=cpar[2]+4.*TMath::Tan(acc_min);
458
459 gMC->Gsvolu("YS23", "CONE", idtmed[1718], cpar, 5);
460 dz+=cpar[0];
461 gMC->Gspos("YS23", 1, "YGO2", 0., 0., dz, 0, "ONLY");
462 dz+=cpar[0];
463
464 cpar[0]=(zcone_e-zvac6-4.)/2;
465 cpar[2]=cpar[4];
466 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(acc_min);
467 cpar[1]=cpar[2]-dRSteel2;
468 cpar[3]=cpar[4]-dRSteel2;
469
470 gMC->Gsvolu("YS24", "CONE", idtmed[1718], cpar, 5);
471 dz+=cpar[0];
472 gMC->Gspos("YS24", 1, "YGO2", 0., 0., dz, 0, "ONLY");
473 dz+=cpar[0];
474
475 tpar[0]=26.;
476 tpar[1]=30.;
477 tpar[2]=(zvac7-zcone_e)/2.;
478
479 gMC->Gsvolu("YS25", "TUBE", idtmed[1718], tpar, 3);
480 dz+=tpar[2];
481 gMC->Gspos("YS25", 1, "YGO2", 0., 0., dz, 0, "ONLY");
482 dz+=tpar[2];
483
484//
485// 2nd section: vacuum system
486
487 cpar0[0]=(zvac7-zvac4)/2;
488 cpar0[1]=r2-d_vacu+(zvac4-zvac3)*TMath::Tan(theta_open2);
489 cpar0[2]=r2 +(zvac4-zvac3)*TMath::Tan(theta_open2);
490 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(theta_open2);
491 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(theta_open2);
492 gMC->Gsvolu("YV21", "CONE", idtmed[1758], cpar0, 5);
493//
494// insulation
495 cpar[0]=cpar0[0];
496 cpar[1]=cpar0[1]+d_tube;
497 cpar[2]=cpar0[1]+d_tube+d_insu;
498 cpar[3]=cpar0[3]+d_tube;
499 cpar[4]=cpar0[3]+d_tube+d_insu;
500 gMC->Gsvolu("YI21", "CONE", idtmed[1753], cpar, 5);
501 gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY");
502//
503// clearance
504 cpar[1]=cpar0[2]-d_prot-d_free;
505 cpar[2]=cpar0[2]-d_prot;
506 cpar[3]=cpar0[4]-d_prot-d_free;
507 cpar[4]=cpar0[4]-d_prot;
508 gMC->Gsvolu("YP21", "CONE", idtmed[1755], cpar, 5);
509 gMC->Gspos("YP21", 1, "YV21", 0., 0., 0., 0, "ONLY");
510
511 dz=0.;
512 gMC->Gspos("YV21", 1, "YMO2", 0., 0., dz, 0, "ONLY");
513
514//
515// Third Section: Bellows and Flange
516//
517 par3[0] = 0.;
518 par3[1] = 360.;
519 par3[2] = 8.;
520 dl=(zvac9-zvac7)/2.;
521
522 par3[3] = -dl;
523 par3[4] = r2+(zvac7-zvac3) * TMath::Tan(theta_open2);
524 par3[5] = 30.;
525
526 par3[6] = -dl+dr21;
527 par3[7] = par3[4]+dr21;
528 par3[8] = 30.;
529
530 par3[9] = par3[6]+dB2;
531 par3[10] = par3[7];
532 par3[11] = 30.;
533
534 par3[12] = par3[9]+dr22;
535 par3[13] = par3[10]+dr22;
536 par3[14] = 30.;
537
538 par3[15] = par3[12]+dF2;
539 par3[16] = par3[13];
540 par3[17] = 30.;
541
542 par3[18] = par3[15]+dr22;
543 par3[19] = par3[16]-dr22;
544 par3[20] = 30.;
545
546 par3[21] = par3[18]+dB2;
547 par3[22] = par3[19];
548 par3[23] = 30.;
549
550 par3[24] = par3[21]+dr23;
551 par3[25] = par3[22]-dr23;
552 par3[26] = 30.;
553
554 Float_t r3=par3[25];
555
556 gMC->Gsvolu("YGO3", "PCON", idtmed[1760], par3, 27);
557
558 for (Int_t i=4; i<26; i+=3) par3[i] = 0;
559
560 gMC->Gsvolu("YMO3", "PCON", idtmed[1755], par3, 27);
561 gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");
562
563//
564// Steel envelope
565 tpar[0]=26;
566 tpar[1]=30;
567 tpar[2]=dl;
568 gMC->Gsvolu("YS31", "TUBE", idtmed[1718], tpar, 3);
569 gMC->Gspos("YS31", 1, "YGO3", 0., 0., 0., 0, "ONLY");
570 DZ+=dl;
571 gMC->Gspos("YMO3", 1, "YMOT", 0., 0., DZ, 0, "ONLY");
572 DZ+=dl;
573
574//
575// 3rd section: vacuum system
576//
577//
578// Bellow2
579//
580 tpar[0]=rB2;
581 tpar[1]=rB2+hB2;
582 tpar[2]=eB2/2.;
583 gMC->Gsvolu("YB21", "TUBE", idtmed[1758], tpar, 3);
584 dl1=tpar[2];
585
586 tpar[0]=rB2+hB2-eB2;
587 tpar[1]=rB2+hB2;
588 tpar[2]=(lB2/2.-2.*eB2)/2.;
589 gMC->Gsvolu("YB22", "TUBE", idtmed[1758], tpar, 3);
590 dl2=tpar[2];
591
592 tpar[0]=rB2-eB2;
593 tpar[1]=rB2;
594 tpar[2]=lB2/8.;
595 gMC->Gsvolu("YB23", "TUBE", idtmed[1758], tpar, 3);
596 dl3=tpar[2];
597
598
599 tpar[0]=0;
600 tpar[1]=rB2+hB2;
601 tpar[2]=lB2/2.;
602 gMC->Gsvolu("YBU2", "TUBE", idtmed[1755], tpar, 3);
603
604 dz=-tpar[2]+dl3;
605 gMC->Gspos("YB23", 1, "YBU2", 0., 0., dz, 0, "ONLY");
606 dz+=dl3;
607 dz+=dl1;
608 gMC->Gspos("YB21", 1, "YBU2", 0., 0., dz, 0, "ONLY");
609 dz+=dl1;
610 dz+=dl2;
611 gMC->Gspos("YB22", 1, "YBU2", 0., 0., dz, 0, "ONLY");
612 dz+=dl2;
613 dz+=dl1;
614 gMC->Gspos("YB21", 2, "YBU2", 0., 0., dz, 0, "ONLY");
615 dz+=dl1;
616 dz+=dl3;
617 gMC->Gspos("YB23", 2, "YBU2", 0., 0., dz, 0, "ONLY");
618
619
620 tpar[0]=0;
621 tpar[1]=rB2+hB2;
622 tpar[2]=7.*lB2/2.;
623 gMC->Gsvolu("YBM2", "TUBE", idtmed[1755], tpar, 3);
624 dz=-tpar[2]+lB2/2.;
625 for (Int_t i=0; i<7; i++) {
626 gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY");
627 dz+=lB2;
628 }
629
630 dz=-dl+dr21+tpar[2];
631 gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
632
633 dz=dl-dr23-tpar[2];
634 gMC->Gspos("YBM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
635
636//
637// Flange
638
639 tpar[0]=0;
640 tpar[1]=rF2;
641 tpar[2]=dF2/2.;
642 gMC->Gsvolu("YFM2", "TUBE", idtmed[1755], tpar, 3);
643
644 tpar[0]=rF2-d_flange;
645 tpar[1]=rF2;
646 tpar[2]=dF2/2.;
647 gMC->Gsvolu("YF21", "TUBE", idtmed[1758], tpar, 3);
648 gMC->Gspos("YF21", 1, "YFM2", 0., 0., 0., 0, "ONLY");
649
650 tpar[0]=rB2;
651 tpar[1]=rF2-d_flange;
652 tpar[2]=d_flange/2.;
653 gMC->Gsvolu("YF22", "TUBE", idtmed[1758], tpar, 3);
654 dz=-dF2/2.+tpar[2];
655 gMC->Gspos("YF22", 1, "YFM2", 0., 0., dz, 0, "ONLY");
656 dz= dF2/2.-tpar[2];
657 gMC->Gspos("YF22", 2, "YFM2", 0., 0., dz, 0, "ONLY");
658
659 dz=dr21/2.-dr23/2.;
660 gMC->Gspos("YFM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
661
662
663//
664// pipe between flange and bellows
665 tpar[0]=rB2-d_tube;
666 tpar[1]=rB2;
667 tpar[2]=2.*(dB2+dr22-7.*lB2)/4.;
668 gMC->Gsvolu("YPF2", "TUBE", idtmed[1758], tpar, 3);
669 dz=dr21/2.-dr23/2.-dF2/2.-tpar[2];
670 gMC->Gspos("YPF2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
671 dz=dr21/2.-dr23/2.+dF2/2.+tpar[2];
672 gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
673
674//
675// 4th section: rear shield and closing cone
676//
677 par4[0] = 0.;
678 par4[1] = 360.;
679 par4[2] = 6.;
680 dl=(zvac12-zvac9)/2.;
681
682 par4[3] = -dl;
683 par4[4] = r3;
684 par4[5] = 30.;
685
686 par4[6] = -dl+(zvac10-zvac9);
687 par4[7] = r3+(zvac10-zvac9) * TMath::Tan(theta_open3);
688 par4[8] = 30.;
689
690 par4[9] = par4[6];
691 par4[10] = par4[7];
692 par4[11] = R42;
693
694 par4[12] = -dl+(zvac11-zvac9);
695 par4[13] = r3+(zvac11-zvac9) * TMath::Tan(theta_open3);
696 par4[14] = R42;
697
698 par4[15] = par4[12];
699 par4[16] = par4[13];
700 par4[17] = R43;
701
702 par4[18] = -dl+(zvac12-zvac9);
703 par4[19] = r_abs;
704 par4[20] = R43;
705
706 gMC->Gsvolu("YGO4", "PCON", idtmed[1760], par4, 21);
707 for (Int_t i=4; i<20; i+=3) par4[i] = 0;
708
709
710 gMC->Gsvolu("YMO4", "PCON", idtmed[1755], par4, 21);
711 gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");
712
713
714 DZ+=dl;
715 gMC->Gspos("YMO4", 1, "YMOT", 0., 0., DZ, 0, "ONLY");
716 DZ+=dl;
717//
718// Closing concrete cone
719//
720 cpar[0]=(zvac12-zvac11)/2.;
721 cpar[1] = r3+(zvac11-zvac9) * TMath::Tan(theta_open3);
722 cpar[2] = cpar[1]+0.001;
723 cpar[3] = r_abs;
724 cpar[4] = cpar[2];
725 gMC->Gsvolu("YCC4", "CONE", idtmed[1752], cpar, 5);
726 dz=dl-cpar[0];
727 gMC->Gspos("YCC4", 1, "YGO4", 0., 0., dz, 0, "ONLY");
728//
729// Steel envelope
730//
731 dz=-dl;
732 tpar[0]=26.;
733 tpar[1]=30.;
734 tpar[2]=(zvac10-zvac9)/2.;
735 gMC->Gsvolu("YS41", "TUBE", idtmed[1718], tpar, 3);
736 dz+=tpar[2];
737 gMC->Gspos("YS41", 1, "YGO4", 0., 0., dz, 0, "ONLY");
738 dz+=tpar[2];
739
740 tpar[0]=26.;
741 tpar[1]=R41;
742 tpar[2]=2.;
743 gMC->Gsvolu("YS42", "TUBE", idtmed[1718], tpar, 3);
744 dz+=tpar[2];
745 gMC->Gspos("YS42", 1, "YGO4", 0., 0., dz, 0, "ONLY");
746 dz+=tpar[2];
747
748 tpar[0]=R41-dRSteel2;
749 tpar[1]=R41;
750 tpar[2]=(zvac11-zvac10-4)/2.;
751 gMC->Gsvolu("YS43", "TUBE", idtmed[1718], tpar, 3);
752 dz+=tpar[2];
753 gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");
754//
755// rear lead shield
756//
757 tpar[0]=R41;
758 tpar[1]=R42;
759 tpar[2]=(zvac11-zvac10)/2.;
760 gMC->Gsvolu("YPBI", "TUBE", idtmed[1752], tpar, 3);
761 dz-=4;
762 gMC->Gspos("YPBI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
763
764 tpar[0]=R42-5;
765 tpar[1]=R42;
766 tpar[2]=(zvac11-zvac10)/2.;
767 gMC->Gsvolu("YPBO", "TUBE", idtmed[1712], tpar, 3);
768 gMC->Gspos("YPBO", 1, "YPBI", 0., 0., 0., 0, "ONLY");
769
770//
771// rear Fe shield
772//
773
774 tpar[0]=R42;
775 tpar[1]=R43;
776 tpar[2]=(zvac12-zvac11)/2.;
777 gMC->Gsvolu("YFEI", "TUBE", idtmed[1749], tpar, 3);
778 dz=dl-tpar[2];
779 gMC->Gspos("YFEI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
780
781 tpar[0]=R42;
782 tpar[1]=R43;
783 tpar[2]=2.5;
784 gMC->Gsvolu("YFEO", "TUBE", idtmed[1709], tpar, 3);
785 dz=-(zvac12-zvac11)/2.+tpar[2];
786 gMC->Gspos("YFEO", 1, "YFEI", 0., 0., dz, 0, "ONLY");
787
788//
789// 4th section: vacuum system
790//
791// up to closing cone
792 cpar0[0]=(zvac11-zvac9)/2;
793 cpar0[1]=r3-d_vacu;
794 cpar0[2]=r3;
795 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(theta_open3);
796 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(theta_open3);
797 gMC->Gsvolu("YV31", "CONE", idtmed[1758], cpar0, 5);
798//
799// insulation
800 cpar[0]=cpar0[0];
801 cpar[1]=cpar0[1]+d_tube;
802 cpar[2]=cpar0[1]+d_tube+d_insu;
803 cpar[3]=cpar0[3]+d_tube;
804 cpar[4]=cpar0[3]+d_tube+d_insu;
805 gMC->Gsvolu("YI31", "CONE", idtmed[1753], cpar, 5);
806 gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY");
807//
808// clearance
809 cpar[1]=cpar0[2]-d_prot-d_free;
810 cpar[2]=cpar0[2]-d_prot;
811 cpar[3]=cpar0[4]-d_prot-d_free;
812 cpar[4]=cpar0[4]-d_prot;
813 gMC->Gsvolu("YP31", "CONE", idtmed[1755], cpar, 5);
814 gMC->Gspos("YP31", 1, "YV31", 0., 0., 0., 0, "ONLY");
815
816 dz=-dl+cpar[0];
817 gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY");
818//
819// closing cone
820 cpar0[0]=(zvac12-zvac11)/2;
821 cpar0[1]=r3-d_vacu+(zvac11-zvac9)*TMath::Tan(theta_open3);
822 cpar0[2]=r3 +(zvac11-zvac9)*TMath::Tan(theta_open3);
823 cpar0[3]=r_vacu;
824 cpar0[4]=r_abs;
825 gMC->Gsvolu("YV32", "CONE", idtmed[1758], cpar0, 5);
826//
827// insulation
828 cpar[0]=cpar0[0];
829 cpar[1]=cpar0[1]+d_tube;
830 cpar[2]=cpar0[1]+d_tube+d_insu;
831 cpar[3]=cpar0[3]+d_tube;
832 cpar[4]=cpar0[3]+d_tube+d_insu;
833 gMC->Gsvolu("YI32", "CONE", idtmed[1753], cpar, 5);
834 gMC->Gspos("YI32", 1, "YV32", 0., 0., 0., 0, "ONLY");
835//
836// clearance
837 cpar[1]=cpar0[2]-d_prot-d_free;
838 cpar[2]=cpar0[2]-d_prot;
839 cpar[3]=cpar0[4]-d_prot-d_free;
840 cpar[4]=cpar0[4]-d_prot;
841 gMC->Gsvolu("YP32", "CONE", idtmed[1755], cpar, 5);
842 gMC->Gspos("YP32", 1, "YV32", 0., 0., 0., 0, "ONLY");
843
844 dz=dl-cpar[0];
845 gMC->Gspos("YV32", 1, "YMO4", 0., 0., dz, 0, "ONLY");
846//
847//
848// MUON trigger wall
849//
850 tpar[0] = 30.;
851 tpar[1] = 310.;
852 tpar[2] = (zfil_out - zfil_in) / 2.;
853 gMC->Gsvolu("YFIM", "TUBE", idtmed[1749], tpar, 3);
854 dz = (zfil_in + zfil_out) / 2.;
855 tpar[2] -= 10.;
856 gMC->Gsvolu("YFII","TUBE", idtmed[1709], tpar, 3);
857 gMC->Gspos("YFII", 1, "YFIM", 0., 0., 0., 0, "ONLY");
858 gMC->Gspos("YFIM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
859//
860// Shielding close to chamber
861//
862
863 cpar[0]=(zch1-dzch-1.-abs_l)/2.;
864 cpar[1]=R11;
865 cpar[2]=abs_l*TMath::Tan(acc_min);
866 cpar[3]=R11;
867 cpar[4]=(abs_l+2.*cpar[0])*TMath::Tan(acc_min);
868 gMC->Gsvolu("YCS1", "CONE", idtmed[1720], cpar, 5);
869 dz=abs_l+cpar[0];
870 gMC->Gspos("YCS1", 1, "ALIC", 0., 0., dz, 0, "ONLY");
871
872 cpar[0]=(zvac4-(zch1+dzch+1.))/2.;
873 cpar[1]=R11;
874 cpar[2]=(zvac4-2.*cpar[0])*TMath::Tan(acc_min);
875 cpar[3]=R11;
876 cpar[4]=zvac4*TMath::Tan(acc_min);
877 gMC->Gsvolu("YCS2", "CONE", idtmed[1720], cpar, 5);
878 dz=zvac4-cpar[0];
879 gMC->Gspos("YCS2", 1, "ALIC", 0., 0., dz, 0, "ONLY");
880
881
882 cpar[0]=(zch2-dzch-1.-zvac4)/2.;
883 cpar[1]=R21;
884 cpar[2]=zvac4*TMath::Tan(acc_min);
885 cpar[3]=R21;
886 cpar[4]=(zvac4+2.*cpar[0])*TMath::Tan(acc_min);
887 gMC->Gsvolu("YCS3", "CONE", idtmed[1720], cpar, 5);
888 dz=zvac4+cpar[0];
889 gMC->Gspos("YCS3", 1, "ALIC", 0., 0., dz, 0, "ONLY");
890
891
892 cpar[0]=(zvac6-(zch2+dzch+1.))/2.;
893 cpar[1]=R11;
894 cpar[2]=(zvac6-2.*cpar[0])*TMath::Tan(acc_min);
895 cpar[3]=R11;
896 cpar[4]=zvac6*TMath::Tan(acc_min);
897 gMC->Gsvolu("YCS4", "CONE", idtmed[1720], cpar, 5);
898 dz=zvac6-cpar[0];
899 gMC->Gspos("YCS4", 1, "ALIC", 0., 0., dz, 0, "ONLY");
900
901}
902
903void AliSHILv0::Init()
904{
905 //
906 // Initialise the muon shield after it has been built
907 //
908 Int_t i;
909 //
910 printf("\n");
911 for(i=0;i<35;i++) printf("*");
912 printf(" SHILv0_INIT ");
913 for(i=0;i<35;i++) printf("*");
914 printf("\n");
915 //
916 // Here the SHIL initialisation code (if any!)
917 for(i=0;i<80;i++) printf("*");
918 printf("\n");
919}
920
921
922
923
924
925
926
927
928