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