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