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