Removal of useless dependecies via forward declarations
[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$
94de3818 18Revision 1.9 2000/09/12 17:00:45 morsch
19Overlaps in YMO3 and YMO4 (side-effect from last update only) corrected.
20
949f3b29 21Revision 1.8 2000/09/12 16:11:43 morsch
22- Bug in volume YGO2 corrected: PCON started with twice the same z-value.
23- Recesses for chambers added to outer Pb cone.
24
404559e5 25Revision 1.7 2000/06/15 09:40:31 morsch
26Obsolete typedef keyword removed
27
56f14ac2 28Revision 1.6 2000/06/13 15:01:38 morsch
29Make kind of heavy shielding material (Pb, NiCuW) dependent on presence of outer cone.
30
bb03e53c 31Revision 1.5 2000/06/12 19:40:00 morsch
32New structure of beam pipe and heating jacket.
33Optional outer Pb cone added. Not yet compatible with chamber inner radii.
34
2b32db74 35Revision 1.4 2000/04/03 08:13:40 fca
36Introduce extra scope for non ANSI compliant C++ compilers
37
74c0d076 38Revision 1.3 2000/01/17 10:29:30 morsch
39Overlap between Shield and Absorber due to limited numerical precision removed
40by displacing the Shield by epsilon = 0.01 cm.
41
f0c34869 42Revision 1.2 2000/01/13 11:27:51 morsch
43Overlaps corrected: YCS3, YCS4; Inner radius YS21 corrected
44
6d4aaa11 45Revision 1.1 2000/01/12 15:44:03 morsch
46Standard version of SHIL
47
6523e275 48*/
49
50///////////////////////////////////////////////////////////////////////////////
51// //
52// Muon Shield Class //
53// This class contains a description of the muon shield //
54// //
55//Begin_Html
56/*
57<img src="picts/AliSHILClass.gif">
58*/
59//End_Html
60// //
61// //
62///////////////////////////////////////////////////////////////////////////////
63
64#include "AliSHILv0.h"
65#include "AliRun.h"
94de3818 66#include "AliMC.h"
6523e275 67#include "AliConst.h"
68
69ClassImp(AliSHILv0)
70
71//_____________________________________________________________________________
72AliSHILv0::AliSHILv0()
73{
74 //
75 // Default constructor for muon shield
76 //
77}
78
79//_____________________________________________________________________________
80AliSHILv0::AliSHILv0(const char *name, const char *title)
81 : AliSHIL(name,title)
82{
83 //
84 // Standard constructor for muon shield
85 //
86 SetMarkerColor(7);
87 SetMarkerStyle(2);
88 SetMarkerSize(0.4);
2b32db74 89 // Pb cone not yet compatible with muon chamber inner radii
90 // Switched off by default
91 fPbCone=kFALSE;
6523e275 92}
93
94//_____________________________________________________________________________
95void AliSHILv0::CreateGeometry()
96{
97 //
98 // Build muon shield geometry
99 //
100 //
101 //Begin_Html
102 /*
103 <img src="picts/AliSHILv0.gif">
104 */
105 //End_Html
106 //Begin_Html
107 /*
108 <img src="picts/AliSHILv0Tree.gif">
109 */
110 //End_Html
111
2b32db74 112 Float_t cpar[5], cpar0[5], tpar[3], par1[39], par2[27], par3[27],
404559e5 113 par4[21], par0[45];
2b32db74 114 Float_t dz, dZ;
6523e275 115
2b32db74 116 Int_t *idtmed = fIdtmed->GetArray()-1699;
117
118#include "ABSOSHILConst.h"
119#include "SHILConst.h"
6523e275 120
56f14ac2 121enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
2b32db74 122 kNiCuW=1720, kVacuum=1714, kAir=1714, kConcrete=1716,
123 kPolyCH2=1717, kSteel=1709, kInsulation=1713};
bb03e53c 124//
125// Material of the rear part of the shield
126 Int_t iHeavy=kNiCuW;
127 if (fPbCone) iHeavy=kPb;
128
2b32db74 129
6523e275 130//
131// Mother volume
132//
2b32db74 133 Float_t dRear1=dRear;
134
135 Float_t zstart=zRear-dRear1;
136
6523e275 137 par0[0] = 0.;
138 par0[1] = 360.;
139 par0[2] = 13.;
140
f0c34869 141 Float_t dl=(zvac12-zstart)/2.;
142 dz=zstart+dl;
6523e275 143//
144 par0[3] = -dl;
145 par0[4] = 0.;
2b32db74 146 par0[5] = zstart * TMath::Tan(accMin);
6523e275 147
2b32db74 148 par0[6] = -dl+dRear1;
6523e275 149 par0[7] = 0.;
2b32db74 150 par0[8] = zRear * TMath::Tan(accMin);
6523e275 151
2b32db74 152 par0[9] = -dl+dRear1;
6523e275 153 par0[10] = 0.;
154 par0[11] = R11;
155
156 par0[12] = -dz+zvac4;
157 par0[13] = 0.;
158 par0[14] = R11;
159
160 par0[15] = -dz+zvac4;
161 par0[16] = 0.;
162 par0[17] = R21;
163
164 par0[18] = -dz+zvac6;
165 par0[19] = 0.;
166 par0[20] = R21;
167
168 par0[21] = -dz+zvac6;
169 par0[22] = 0.;
2b32db74 170 par0[23] = zvac6 * TMath::Tan(accMin);
6523e275 171
2b32db74 172 par0[24] = -dz+zConeE;
6523e275 173 par0[25] = 0.;
174 par0[26] = 30.;
175
176 par0[27] = -dz+zvac10;
177 par0[28] = 0.;
178 par0[29] = 30.;
179
180 par0[30] = -dz+zvac10;
181 par0[31] = 0.;
182 par0[32] = R42;
183
184 par0[33] = -dz+zvac11;
185 par0[34] = 0.;
186 par0[35] = R42;
187
188 par0[36] = -dz+zvac11;
189 par0[37] = 0.;
190 par0[38] = R43;
191
192 par0[39] = -dz+zvac12;
193 par0[40] = 0.;
194 par0[41] = R43;
195
2b32db74 196 gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 42);
f0c34869 197 dz=zstart+dl;
6523e275 198 gMC->Gspos("YMOT", 1, "ALIC", 0., 0., dz, 0, "ONLY");
199//
200
2b32db74 201 dZ=-dl;
6523e275 202
203//
204// First section: bellows below and behind front absorber
205//
206//
6523e275 207 par1[0] = 0.;
208 par1[1] = 360.;
209 par1[2] = 12.;
f0c34869 210 dl=(zvac4-zstart)/2.;
6523e275 211
212 par1[3] = -dl;
2b32db74 213 par1[4] = rAbs+(zstart-zOpen) * TMath::Tan(thetaOpen1);
214 par1[5] = zstart * TMath::Tan(accMin);
6523e275 215
f0c34869 216 par1[6] = -dl+zvac1-zstart;
2b32db74 217 par1[7] = rAbs+ (zvac1-zOpen) * TMath::Tan(thetaOpen1);
218 par1[8] = zvac1 * TMath::Tan(accMin);
6523e275 219
220 par1[9] = par1[6]+dr11;
221 par1[10] = par1[7]+dr11;
2b32db74 222 par1[11] = (zvac1+dr11) * TMath::Tan(accMin);
6523e275 223
2b32db74 224 par1[12] = -dl+dRear1;
6523e275 225 par1[13] = par1[10];
2b32db74 226 par1[14] = zRear * TMath::Tan(accMin);
6523e275 227
2b32db74 228 par1[15] = -dl+dRear1;
6523e275 229 par1[16] = par1[10];
230 par1[17] = R11;
231
f0c34869 232 par1[18] = -dl+(zvac1+dr11+dB1-zstart);
6523e275 233 par1[19] = par1[16];
234 par1[20] = R11;
235
236 par1[21] = par1[18]+dr12;
237 par1[22] = par1[19]+dr12;
238 par1[23] = R11;
239
240 par1[24] = par1[21]+dF1;
241 par1[25] = par1[22];
242 par1[26] = R11;
243
244 par1[27] = par1[24]+dr12;
245 par1[28] = par1[25]-dr12;
246 par1[29] = R11;
247
248 par1[30] = par1[27]+dB1;
249 par1[31] = par1[28];
250 par1[32] = R11;
251
252 par1[33] = par1[30]+dr13;
253 par1[34] = par1[31]-dr13;
254 par1[35] = R11;
255
f0c34869 256 par1[36] = -dl+zvac4-zstart;
2b32db74 257 par1[37] = par1[34]+(zvac4-zvac3)*TMath::Tan(thetaOpen2);
6523e275 258 par1[38] = R11;
259
260 Float_t r2=par1[34];
2b32db74 261 Float_t rBox=par1[31]-0.1;
6523e275 262
2b32db74 263 gMC->Gsvolu("YGO1", "PCON", idtmed[kNiCuW], par1, 39);
74c0d076 264 { // Begin local scope for i
2b32db74 265 for (Int_t i=4; i<38; i+=3) par1[i] = 0;
74c0d076 266 } // End local scope for i
2b32db74 267 gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], par1, 39);
6523e275 268 gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");
2b32db74 269 dZ+=dl;
270 gMC->Gspos("YMO1", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
271 dZ+=dl;
6523e275 272
273//
274// Steel envelope
275 tpar[0]=R11-dRSteel1;
276 tpar[1]=R11;
2b32db74 277 tpar[2]=dl-dRear1/2;
278 gMC->Gsvolu("YSE1", "TUBE", idtmed[kNiCuW], tpar, 3);
6523e275 279 dz=dl-tpar[2];
2b32db74 280 gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
6523e275 281//
282// 1st section: vacuum system
283//
284//
285// Bellow 1
286//
287 tpar[0]=rB1;
288 tpar[1]=rB1+hB1;
289 tpar[2]=eB1/2.;
2b32db74 290 gMC->Gsvolu("YB11", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 291 Float_t dl1=tpar[2];
292
293 tpar[0]=rB1+hB1-eB1;
294 tpar[1]=rB1+hB1;
295 tpar[2]=(lB1/2.-2.*eB1)/2.;
2b32db74 296 gMC->Gsvolu("YB12", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 297 Float_t dl2=tpar[2];
298
299 tpar[0]=rB1-eB1;
300 tpar[1]=rB1;
301 tpar[2]=lB1/8.;
2b32db74 302 gMC->Gsvolu("YB13", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 303 Float_t dl3=tpar[2];
304
305
306 tpar[0]=0;
307 tpar[1]=rB1+hB1;
308 tpar[2]=lB1/2.;
2b32db74 309 gMC->Gsvolu("YBU1", "TUBE", idtmed[kVacuum+40], tpar, 3);
6523e275 310
311 dz=-tpar[2]+dl3;
312 gMC->Gspos("YB13", 1, "YBU1", 0., 0., dz, 0, "ONLY");
313 dz+=dl3;
314 dz+=dl1;
315 gMC->Gspos("YB11", 1, "YBU1", 0., 0., dz, 0, "ONLY");
316 dz+=dl1;
317 dz+=dl2;
318 gMC->Gspos("YB12", 1, "YBU1", 0., 0., dz, 0, "ONLY");
319 dz+=dl2;
320 dz+=dl1;
321 gMC->Gspos("YB11", 2, "YBU1", 0., 0., dz, 0, "ONLY");
322 dz+=dl1;
323 dz+=dl3;
324 gMC->Gspos("YB13", 2, "YBU1", 0., 0., dz, 0, "ONLY");
325
326
327 tpar[0]=0;
328 tpar[1]=rB1+hB1;
329 tpar[2]=10.*lB1/2.;
2b32db74 330 gMC->Gsvolu("YBM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
6523e275 331 dz=-tpar[2]+lB1/2.;
74c0d076 332 { // Begin local scope for i
2b32db74 333 for (Int_t i=0; i<10; i++) {
334 gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0., dz, 0, "ONLY");
335 dz+=lB1;
336 }
74c0d076 337 } // End local scope for i
f0c34869 338 dz=-dl+(zvac1-zstart)+dr11+tpar[2];
6523e275 339 gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
340
2b32db74 341 dz=dl-dr13-(zvac4-zvac3)-tpar[2];
6523e275 342 gMC->Gspos("YBM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
343
344//
345// Flange
346
347 tpar[0]=0;
348 tpar[1]=rF1;
349 tpar[2]=dF1/2.;
2b32db74 350 gMC->Gsvolu("YFM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
6523e275 351
2b32db74 352 tpar[0]=rF1-2.;
6523e275 353 tpar[1]=rF1;
354 tpar[2]=dF1/2.;
2b32db74 355 gMC->Gsvolu("YF11", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 356 gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY");
357
358 tpar[0]=rB1;
2b32db74 359 tpar[1]=rF1-2.;
360 tpar[2]=dFlange/2.;
361 gMC->Gsvolu("YF12", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 362 dz=-dF1/2.+tpar[2];
363 gMC->Gspos("YF12", 1, "YFM1", 0., 0., dz, 0, "ONLY");
364 dz= dF1/2.-tpar[2];
365 gMC->Gspos("YF12", 2, "YFM1", 0., 0., dz, 0, "ONLY");
366
f0c34869 367 dz=-dl+(zvac2-zstart);
6523e275 368 gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
369
6523e275 370//
371// pipe between flange and bellows
2b32db74 372 tpar[0]=rB1-dTubeS;
6523e275 373 tpar[1]=rB1;
374 tpar[2]=2.*(dB1+dr12-10.*lB1)/4.;
2b32db74 375 gMC->Gsvolu("YPF1", "TUBE", idtmed[kSteel+40], tpar, 3);
376
f0c34869 377 dz=-dl+(zvac2-zstart)-dF1/2.-tpar[2];
6523e275 378 gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
f0c34869 379 dz=-dl+(zvac2-zstart)+dF1/2.+tpar[2];
6523e275 380 gMC->Gspos("YPF1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
381
6523e275 382// pipe and heating jackets outside bellows
383//
384// left side
f0c34869 385 cpar0[0]=(zvac1-zstart)/2;
2b32db74 386 cpar0[1]=rVacu+(zstart-zOpen)*TMath::Tan(thetaOpen1)-0.05;
387 cpar0[2]=rAbs +(zstart-zOpen)*TMath::Tan(thetaOpen1);
388 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpen1);
389 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpen1);
390 gMC->Gsvolu("YV11", "CONE", idtmed[kSteel+40], cpar0, 5);
6523e275 391//
392// insulation
2b32db74 393 dTubeS=0.15;
6523e275 394 cpar[0]=cpar0[0];
2b32db74 395 cpar[1]=cpar0[1]+0.15;
396 cpar[2]=cpar0[1]+0.65;
397 cpar[3]=cpar0[3]+0.15;
398 cpar[4]=cpar0[3]+0.65;
399 gMC->Gsvolu("YI11", "CONE", idtmed[kInsulation+40], cpar, 5);
6523e275 400 gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY");
401//
402// clearance
2b32db74 403 cpar[1]=cpar0[1]+0.75;
404 cpar[2]=cpar0[1]+1.25;
405 cpar[3]=cpar0[3]+0.75;
406 cpar[4]=cpar0[3]+1.25;
407 gMC->Gsvolu("YP11", "CONE", idtmed[kVacuum+40], cpar, 5);
6523e275 408 gMC->Gspos("YP11", 1, "YV11", 0., 0., 0., 0, "ONLY");
409
410 dz=-dl+cpar0[0];
411 gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY");
6523e275 412// right side
2b32db74 413 dTubeS=0.35;
414 dVacuS+=0.25;
415
6523e275 416 cpar0[0]=(zvac4-zvac3)/2;
2b32db74 417 cpar0[1]=rB1;
418 cpar0[2]=cpar0[1]+dVacuS;
419
420 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
421 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
422 gMC->Gsvolu("YV12", "CONE", idtmed[kSteel], cpar0, 5);
423 Float_t r2V=cpar0[3];
6523e275 424//
425// insulation
426 cpar[0]=cpar0[0];
2b32db74 427 cpar[1]=cpar0[1]+dTubeS;
428 cpar[2]=cpar0[1]+dTubeS+dInsuS;
429 cpar[3]=cpar0[3]+dTubeS;
430 cpar[4]=cpar0[3]+dTubeS+dInsuS;
431 gMC->Gsvolu("YI12", "CONE", idtmed[kInsulation], cpar, 5);
6523e275 432 gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY");
2b32db74 433
6523e275 434//
435// clearance
2b32db74 436 cpar[1]=cpar0[1]+dTubeS+dInsuS+dEnveS;
437 cpar[2]=cpar0[1]+dTubeS+dInsuS+dEnveS+dFreeS;
438 cpar[3]=cpar0[3]+dTubeS+dInsuS+dEnveS;
439 cpar[4]=cpar0[3]+dTubeS+dInsuS+dEnveS+dFreeS;
440 gMC->Gsvolu("YP12", "CONE", idtmed[kAir], cpar, 5);
6523e275 441 gMC->Gspos("YP12", 1, "YV12", 0., 0., 0., 0, "ONLY");
442
443 dz=dl-cpar0[0];
444 gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY");
6523e275 445//
446// Second Section
2b32db74 447// Between first and second bellow section
448//
6523e275 449
450 par2[0] = 0.;
451 par2[1] = 360.;
404559e5 452 par2[2] = 6.;
6523e275 453 dl=(zvac7-zvac4)/2.;
404559e5 454// recess station 2
6523e275 455 par2[3] = -dl;
2b32db74 456 par2[4] = r2+(zvac4-zvac3) * TMath::Tan(thetaOpen2);
404559e5 457 par2[5] = R21;
6523e275 458
404559e5 459 par2[6] = -dl+(zvac6-zvac4);
460 par2[7] = r2+(zvac6-zvac3) * TMath::Tan(thetaOpen2);
461 par2[8] = R21;
6523e275 462
404559e5 463 par2[9] = -dl+(zvac6-zvac4);
464 par2[10] = par2[7];
465 par2[11] = zvac6*TMath::Tan(accMin);
6523e275 466
2b32db74 467// Start of Pb section
404559e5 468 par2[12] = -dl+(zPb-zvac4);
469 par2[13] = r2+(zPb-zvac3) * TMath::Tan(thetaOpen2);
470 par2[14] = zPb*TMath::Tan(accMin);
6523e275 471
2b32db74 472//
473// end of cone following 2 deg line
404559e5 474 par2[15] = -dl+(zConeE-zvac4);
475 par2[16] = r2+(zConeE-zvac3) * TMath::Tan(thetaOpen2);
476 par2[17] = 30.;
6523e275 477
404559e5 478 par2[18] = -dl+(zvac7-zvac4);
479 par2[19] = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
480 par2[20] = 30.;
2b32db74 481
6523e275 482
404559e5 483 gMC->Gsvolu("YGO2", "PCON", idtmed[kNiCuW+40], par2, 21);
2b32db74 484//
485// Lead cone option replacing Tungsten
486//
487 Float_t parPb[12];
488 parPb[0] = 0.;
489 parPb[1] = 360.;
490 parPb[2] = 3.;
491 Float_t dlPb=(zvac7-zPb)/2.;
492
493 parPb[3] = -dlPb;
494 parPb[4] = 17.657;
495 parPb[5] = zPb*TMath::Tan(accMin);
496
497 parPb[6] = -dlPb+(zConeE-zPb);
498 parPb[7] = parPb[4]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
499 parPb[8] = 30.;
500
501 parPb[9] = dlPb;
502 parPb[10] = parPb[7]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
503 parPb[11] = 30.;
949f3b29 504
505 Float_t rPbLast=parPb[10];
506
507
2b32db74 508 gMC->Gsvolu("YXO2", "PCON", idtmed[kPb], parPb, 12);
509 gMC->Gspos("YXO2", 1, "YGO2", 0., 0., (zPb-zvac4)/2., 0, "ONLY");
404559e5 510
511 parPb[4] = r2+(zPb-zvac3) * TMath::Tan(thetaOpen2);
512 parPb[5] = 17.657;
513
514 parPb[7] = r2+(zConeE-zvac3) * TMath::Tan(thetaOpen2);
515 parPb[8] = parPb[5]+(zConeE-zPb)*TMath::Tan(thetaOpenPb);
2b32db74 516
404559e5 517 parPb[10] = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
518 parPb[11] = parPb[8]+(zvac7-zConeE)*TMath::Tan(thetaOpenPb);
519
520 gMC->Gsvolu("YYO2", "PCON", idtmed[iHeavy+40], parPb, 12);
521 gMC->Gspos("YYO2", 1, "YGO2", 0., 0., (zPb-zvac4)/2., 0, "ONLY");
522
523
74c0d076 524 { // Begin local scope for i
2b32db74 525 for (Int_t i=4; i<23; i+=3) par2[i] = 0;
74c0d076 526 } // End local scope for i
2b32db74 527
528 gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 24);
6523e275 529 gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");
2b32db74 530 dZ+=dl;
531 gMC->Gspos("YMO2", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
532 dZ+=dl;
6523e275 533//
534// Steel envelope
535//
6d4aaa11 536 tpar[0]=R11-dRSteel1;
6523e275 537 tpar[1]=R21;
538 tpar[2]=2;
2b32db74 539 gMC->Gsvolu("YS21", "TUBE", idtmed[kSteel], tpar, 3);
6523e275 540 dz=-dl+tpar[2];
541 gMC->Gspos("YS21", 1, "YGO2", 0., 0., dz, 0, "ONLY");
542 dz+=tpar[2];
543 tpar[0]=R21-dRSteel2;
544 tpar[1]=R21;
545 tpar[2]=(zvac6-zvac5)/2.;
2b32db74 546 gMC->Gsvolu("YS22", "TUBE", idtmed[kSteel], tpar, 3);
6523e275 547 dz+=tpar[2];
548 gMC->Gspos("YS22", 1, "YGO2", 0., 0., dz, 0, "ONLY");
549 dz+=tpar[2];
550
551 cpar[0]=2.;
552 cpar[1]=R21-dRSteel2;
2b32db74 553 cpar[2]=zvac6 * TMath::Tan(accMin);
6523e275 554 cpar[3]=cpar[1];
2b32db74 555 cpar[4]=cpar[2]+4.*TMath::Tan(accMin);
6523e275 556
2b32db74 557 gMC->Gsvolu("YS23", "CONE", idtmed[kSteel], cpar, 5);
6523e275 558 dz+=cpar[0];
559 gMC->Gspos("YS23", 1, "YGO2", 0., 0., dz, 0, "ONLY");
560 dz+=cpar[0];
561
2b32db74 562 cpar[0]=(zPb-zvac6-4.)/2;
6523e275 563 cpar[2]=cpar[4];
2b32db74 564 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
6523e275 565 cpar[1]=cpar[2]-dRSteel2;
566 cpar[3]=cpar[4]-dRSteel2;
567
2b32db74 568 gMC->Gsvolu("YS24", "CONE", idtmed[kSteel], cpar, 5);
6523e275 569 dz+=cpar[0];
570 gMC->Gspos("YS24", 1, "YGO2", 0., 0., dz, 0, "ONLY");
571 dz+=cpar[0];
572
2b32db74 573 cpar[0]=(zConeE-zPb)/2;
574 cpar[2]=cpar[4];
575 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
576 cpar[1]=cpar[2]-dRSteel2;
577 cpar[3]=cpar[4]-dRSteel2;
578
579 gMC->Gsvolu("YS25", "CONE", idtmed[kSteel], cpar, 5);
580 dz=-dlPb+cpar[0];
581 gMC->Gspos("YS25", 1, "YXO2", 0., 0., dz, 0, "ONLY");
582 dz+=cpar[0];
583
6523e275 584 tpar[0]=26.;
585 tpar[1]=30.;
2b32db74 586 tpar[2]=(zvac7-zConeE)/2.;
6523e275 587
2b32db74 588 gMC->Gsvolu("YS26", "TUBE", idtmed[kSteel], tpar, 3);
6523e275 589 dz+=tpar[2];
2b32db74 590 gMC->Gspos("YS26", 1, "YXO2", 0., 0., dz, 0, "ONLY");
6523e275 591 dz+=tpar[2];
2b32db74 592
6523e275 593//
594// 2nd section: vacuum system
2b32db74 595//
6523e275 596 cpar0[0]=(zvac7-zvac4)/2;
2b32db74 597 cpar0[1]=r2V;
598 cpar0[2]=r2V+dVacuS;
599 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
600 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpenB);
601 gMC->Gsvolu("YV21", "CONE", idtmed[kSteel+40], cpar0, 5);
6523e275 602//
603// insulation
604 cpar[0]=cpar0[0];
2b32db74 605 cpar[1]=cpar0[1]+dTubeS;
606 cpar[2]=cpar0[1]+dTubeS+dInsuS;
607 cpar[3]=cpar0[3]+dTubeS;
608 cpar[4]=cpar0[3]+dTubeS+dInsuS;
609 gMC->Gsvolu("YI21", "CONE", idtmed[kInsulation+40], cpar, 5);
6523e275 610 gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY");
611//
612// clearance
2b32db74 613 cpar[1]=cpar0[1]+dTubeS+dInsuS+dEnveS;
614 cpar[2]=cpar0[1]+dTubeS+dInsuS+dEnveS+dFreeS;
615 cpar[3]=cpar0[3]+dTubeS+dInsuS+dEnveS;
616 cpar[4]=cpar0[3]+dTubeS+dInsuS+dEnveS+dFreeS;
617 gMC->Gsvolu("YP21", "CONE", idtmed[kAir+40], cpar, 5);
6523e275 618 gMC->Gspos("YP21", 1, "YV21", 0., 0., 0., 0, "ONLY");
619
620 dz=0.;
621 gMC->Gspos("YV21", 1, "YMO2", 0., 0., dz, 0, "ONLY");
622
2b32db74 623
6523e275 624//
625// Third Section: Bellows and Flange
626//
627 par3[0] = 0.;
628 par3[1] = 360.;
629 par3[2] = 8.;
630 dl=(zvac9-zvac7)/2.;
631
632 par3[3] = -dl;
2b32db74 633 par3[4] = r2+(zvac7-zvac3) * TMath::Tan(thetaOpen2);
6523e275 634 par3[5] = 30.;
635
636 par3[6] = -dl+dr21;
637 par3[7] = par3[4]+dr21;
638 par3[8] = 30.;
639
640 par3[9] = par3[6]+dB2;
641 par3[10] = par3[7];
642 par3[11] = 30.;
643
644 par3[12] = par3[9]+dr22;
645 par3[13] = par3[10]+dr22;
646 par3[14] = 30.;
647
648 par3[15] = par3[12]+dF2;
649 par3[16] = par3[13];
650 par3[17] = 30.;
651
652 par3[18] = par3[15]+dr22;
653 par3[19] = par3[16]-dr22;
654 par3[20] = 30.;
655
656 par3[21] = par3[18]+dB2;
657 par3[22] = par3[19];
658 par3[23] = 30.;
659
660 par3[24] = par3[21]+dr23;
661 par3[25] = par3[22]-dr23;
662 par3[26] = 30.;
2b32db74 663//
664 rBox=par3[22]-0.1;
6523e275 665 Float_t r3=par3[25];
666
bb03e53c 667 gMC->Gsvolu("YGO3", "PCON", idtmed[iHeavy+40], par3, 27);
2b32db74 668
669 parPb[0] = dl;
949f3b29 670 parPb[1] = rPbLast;
2b32db74 671 parPb[2] = 30;
672 parPb[3] = parPb[1]+2.*dl*TMath::Tan(thetaOpenPb);
673 parPb[4] = 30;
674 gMC->Gsvolu("YXO3", "CONE", idtmed[kPb], parPb, 5);
675 gMC->Gspos("YXO3", 1, "YGO3", 0., 0., 0., 0, "ONLY");
74c0d076 676 { // Begin local scope for i
2b32db74 677 for (Int_t i=4; i<26; i+=3) par3[i] = 0;
74c0d076 678 } // End local scope for i
2b32db74 679 gMC->Gsvolu("YMO3", "PCON", idtmed[kVacuum+40], par3, 27);
6523e275 680 gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");
681
682//
683// Steel envelope
684 tpar[0]=26;
685 tpar[1]=30;
686 tpar[2]=dl;
2b32db74 687 gMC->Gsvolu("YS31", "TUBE", idtmed[kSteel], tpar, 3);
688 gMC->Gspos("YS31", 1, "YXO3", 0., 0., 0., 0, "ONLY");
689 dZ+=dl;
690 gMC->Gspos("YMO3", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
691 dZ+=dl;
6523e275 692
693//
694// 3rd section: vacuum system
695//
696//
697// Bellow2
698//
699 tpar[0]=rB2;
700 tpar[1]=rB2+hB2;
701 tpar[2]=eB2/2.;
2b32db74 702 gMC->Gsvolu("YB21", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 703 dl1=tpar[2];
704
705 tpar[0]=rB2+hB2-eB2;
706 tpar[1]=rB2+hB2;
707 tpar[2]=(lB2/2.-2.*eB2)/2.;
2b32db74 708 gMC->Gsvolu("YB22", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 709 dl2=tpar[2];
710
711 tpar[0]=rB2-eB2;
712 tpar[1]=rB2;
713 tpar[2]=lB2/8.;
2b32db74 714 gMC->Gsvolu("YB23", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 715 dl3=tpar[2];
716
717
718 tpar[0]=0;
719 tpar[1]=rB2+hB2;
720 tpar[2]=lB2/2.;
2b32db74 721 gMC->Gsvolu("YBU2", "TUBE", idtmed[kVacuum+40], tpar, 3);
6523e275 722
723 dz=-tpar[2]+dl3;
724 gMC->Gspos("YB23", 1, "YBU2", 0., 0., dz, 0, "ONLY");
725 dz+=dl3;
726 dz+=dl1;
727 gMC->Gspos("YB21", 1, "YBU2", 0., 0., dz, 0, "ONLY");
728 dz+=dl1;
729 dz+=dl2;
730 gMC->Gspos("YB22", 1, "YBU2", 0., 0., dz, 0, "ONLY");
731 dz+=dl2;
732 dz+=dl1;
733 gMC->Gspos("YB21", 2, "YBU2", 0., 0., dz, 0, "ONLY");
734 dz+=dl1;
735 dz+=dl3;
736 gMC->Gspos("YB23", 2, "YBU2", 0., 0., dz, 0, "ONLY");
737
738
739 tpar[0]=0;
740 tpar[1]=rB2+hB2;
741 tpar[2]=7.*lB2/2.;
2b32db74 742 gMC->Gsvolu("YBM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
6523e275 743 dz=-tpar[2]+lB2/2.;
74c0d076 744 { // Begin local scope for i
2b32db74 745 for (Int_t i=0; i<7; i++) {
746 gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY");
747 dz+=lB2;
748 }
74c0d076 749 } // End local scope for i
6523e275 750 dz=-dl+dr21+tpar[2];
751 gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
752
753 dz=dl-dr23-tpar[2];
754 gMC->Gspos("YBM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
755
756//
757// Flange
758
759 tpar[0]=0;
760 tpar[1]=rF2;
761 tpar[2]=dF2/2.;
2b32db74 762 gMC->Gsvolu("YFM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
6523e275 763
2b32db74 764 tpar[0]=rF2-dFlange;
6523e275 765 tpar[1]=rF2;
766 tpar[2]=dF2/2.;
2b32db74 767 gMC->Gsvolu("YF21", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 768 gMC->Gspos("YF21", 1, "YFM2", 0., 0., 0., 0, "ONLY");
769
770 tpar[0]=rB2;
2b32db74 771 tpar[1]=rF2-dFlange;
772 tpar[2]=dFlange/2.;
773 gMC->Gsvolu("YF22", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 774 dz=-dF2/2.+tpar[2];
775 gMC->Gspos("YF22", 1, "YFM2", 0., 0., dz, 0, "ONLY");
776 dz= dF2/2.-tpar[2];
777 gMC->Gspos("YF22", 2, "YFM2", 0., 0., dz, 0, "ONLY");
778
779 dz=dr21/2.-dr23/2.;
780 gMC->Gspos("YFM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
781
782
783//
784// pipe between flange and bellows
2b32db74 785 tpar[0]=rB2-dTubeS;
6523e275 786 tpar[1]=rB2;
787 tpar[2]=2.*(dB2+dr22-7.*lB2)/4.;
2b32db74 788 gMC->Gsvolu("YPF2", "TUBE", idtmed[kSteel+40], tpar, 3);
6523e275 789 dz=dr21/2.-dr23/2.-dF2/2.-tpar[2];
790 gMC->Gspos("YPF2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
791 dz=dr21/2.-dr23/2.+dF2/2.+tpar[2];
792 gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
793
794//
795// 4th section: rear shield and closing cone
796//
797 par4[0] = 0.;
798 par4[1] = 360.;
799 par4[2] = 6.;
800 dl=(zvac12-zvac9)/2.;
801
802 par4[3] = -dl;
803 par4[4] = r3;
804 par4[5] = 30.;
805
806 par4[6] = -dl+(zvac10-zvac9);
2b32db74 807 par4[7] = r3+(zvac10-zvac9) * TMath::Tan(thetaOpen3);
6523e275 808 par4[8] = 30.;
809
810 par4[9] = par4[6];
811 par4[10] = par4[7];
812 par4[11] = R42;
813
814 par4[12] = -dl+(zvac11-zvac9);
2b32db74 815 par4[13] = r3+(zvac11-zvac9) * TMath::Tan(thetaOpen3);
6523e275 816 par4[14] = R42;
817
818 par4[15] = par4[12];
819 par4[16] = par4[13];
820 par4[17] = R43;
821
822 par4[18] = -dl+(zvac12-zvac9);
2b32db74 823 par4[19] = rAbs;
6523e275 824 par4[20] = R43;
825
bb03e53c 826 gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 21);
2b32db74 827
828 parPb[0] = (zvac10-zvac9)/2.;
829 parPb[1] = parPb[3];
830 parPb[2] = 30;
831 parPb[3] = parPb[1]+2.*parPb[0]*TMath::Tan(thetaOpenPb);
832 parPb[4] = 30;
833 gMC->Gsvolu("YXO4", "CONE", idtmed[kPb], parPb, 5);
834 gMC->Gspos("YXO4", 1, "YGO4", 0., 0., -dl+parPb[0], 0, "ONLY");
835
836 parPb[0] = (zvac12-zvac10)/2.;
837 parPb[1] = parPb[3];
838 parPb[2] = 31.;
839 parPb[3] = parPb[1]+2.*parPb[0]*TMath::Tan(thetaOpenPb);
840 parPb[4] = 31.;
841 gMC->Gsvolu("YXO5", "CONE", idtmed[kPb], parPb, 5);
842 gMC->Gspos("YXO5", 1, "YGO4", 0., 0., -dl+(zvac10-zvac9)+parPb[0], 0, "ONLY");
74c0d076 843 { // Begin local scope for i
2b32db74 844 for (Int_t i=4; i<20; i+=3) par4[i] = 0;
74c0d076 845 } // End local scope for i
6523e275 846
2b32db74 847 gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 21);
6523e275 848 gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");
849
850
2b32db74 851
852 dZ+=dl;
853 gMC->Gspos("YMO4", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
854 dZ+=dl;
6523e275 855//
856// Closing concrete cone
857//
858 cpar[0]=(zvac12-zvac11)/2.;
2b32db74 859 cpar[1] = r3+(zvac11-zvac9) * TMath::Tan(thetaOpen3);
6523e275 860 cpar[2] = cpar[1]+0.001;
2b32db74 861 cpar[3] = rAbs;
6523e275 862 cpar[4] = cpar[2];
2b32db74 863 gMC->Gsvolu("YCC4", "CONE", idtmed[kConcrete+40], cpar, 5);
6523e275 864 dz=dl-cpar[0];
865 gMC->Gspos("YCC4", 1, "YGO4", 0., 0., dz, 0, "ONLY");
866//
867// Steel envelope
868//
869 dz=-dl;
870 tpar[0]=26.;
871 tpar[1]=30.;
872 tpar[2]=(zvac10-zvac9)/2.;
2b32db74 873 gMC->Gsvolu("YS41", "TUBE", idtmed[kSteel], tpar, 3);
6523e275 874 dz+=tpar[2];
2b32db74 875 gMC->Gspos("YS41", 1, "YXO4", 0., 0., 0., 0, "ONLY");
6523e275 876 dz+=tpar[2];
2b32db74 877/*
878 tpar[0]=30.;
6523e275 879 tpar[1]=R41;
880 tpar[2]=2.;
2b32db74 881 gMC->Gsvolu("YS42", "TUBE", idtmed[kSteel], tpar, 3);
6523e275 882 dz+=tpar[2];
883 gMC->Gspos("YS42", 1, "YGO4", 0., 0., dz, 0, "ONLY");
884 dz+=tpar[2];
2b32db74 885*/
6523e275 886 tpar[0]=R41-dRSteel2;
887 tpar[1]=R41;
2b32db74 888 tpar[2]=(zvac11-zvac10)/2.;
889 gMC->Gsvolu("YS43", "TUBE", idtmed[kSteel], tpar, 3);
6523e275 890 dz+=tpar[2];
891 gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");
892//
893// rear lead shield
894//
895 tpar[0]=R41;
896 tpar[1]=R42;
897 tpar[2]=(zvac11-zvac10)/2.;
2b32db74 898 gMC->Gsvolu("YPBI", "TUBE", idtmed[kPb+40], tpar, 3);
899 dz-=0;
6523e275 900 gMC->Gspos("YPBI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
901
902 tpar[0]=R42-5;
903 tpar[1]=R42;
904 tpar[2]=(zvac11-zvac10)/2.;
2b32db74 905 gMC->Gsvolu("YPBO", "TUBE", idtmed[kPb], tpar, 3);
6523e275 906 gMC->Gspos("YPBO", 1, "YPBI", 0., 0., 0., 0, "ONLY");
907
908//
909// rear Fe shield
910//
911
2b32db74 912 tpar[0]=31.;
6523e275 913 tpar[1]=R43;
914 tpar[2]=(zvac12-zvac11)/2.;
2b32db74 915 gMC->Gsvolu("YFEI", "TUBE", idtmed[kFe+40], tpar, 3);
6523e275 916 dz=dl-tpar[2];
917 gMC->Gspos("YFEI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
918
2b32db74 919 tpar[0]=31.;
6523e275 920 tpar[1]=R43;
921 tpar[2]=2.5;
2b32db74 922 gMC->Gsvolu("YFEO", "TUBE", idtmed[kFe], tpar, 3);
6523e275 923 dz=-(zvac12-zvac11)/2.+tpar[2];
924 gMC->Gspos("YFEO", 1, "YFEI", 0., 0., dz, 0, "ONLY");
2b32db74 925//
926// Magnet element
927//
928 tpar[0]=0.;
929 tpar[1]=R43;
930 tpar[2]=50.;
931 gMC->Gsvolu("YAEM", "TUBE", idtmed[kAir], tpar, 3);
932 tpar[0]=rAbs;
933 tpar[1]=R43;
934 tpar[2]=50.;
935 gMC->Gsvolu("YFEM", "TUBE", idtmed[kFe], tpar, 3);
936 gMC->Gspos("YFEM", 1, "YAEM", 0., 0., 0., 0, "ONLY");
6523e275 937
938//
2b32db74 939
940 dz=zvac12+50.;
941 gMC->Gspos("YAEM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
942
943
944//
945//
6523e275 946// 4th section: vacuum system
947//
948// up to closing cone
949 cpar0[0]=(zvac11-zvac9)/2;
2b32db74 950 cpar0[1]=r3-dVacuS;
6523e275 951 cpar0[2]=r3;
2b32db74 952 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(thetaOpen3);
953 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(thetaOpen3);
954 gMC->Gsvolu("YV31", "CONE", idtmed[kSteel+40], cpar0, 5);
6523e275 955//
956// insulation
957 cpar[0]=cpar0[0];
2b32db74 958 cpar[1]=cpar0[1]+dTubeS;
959 cpar[2]=cpar0[1]+dTubeS+dInsuS;
960 cpar[3]=cpar0[3]+dTubeS;
961 cpar[4]=cpar0[3]+dTubeS+dInsuS;
962 gMC->Gsvolu("YI31", "CONE", idtmed[kInsulation+40], cpar, 5);
6523e275 963 gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY");
964//
965// clearance
2b32db74 966 cpar[1]=cpar0[2]-dProtS-dFreeS;
967 cpar[2]=cpar0[2]-dProtS;
968 cpar[3]=cpar0[4]-dProtS-dFreeS;
969 cpar[4]=cpar0[4]-dProtS;
970 gMC->Gsvolu("YP31", "CONE", idtmed[kVacuum+40], cpar, 5);
6523e275 971 gMC->Gspos("YP31", 1, "YV31", 0., 0., 0., 0, "ONLY");
972
973 dz=-dl+cpar[0];
974 gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY");
975//
976// closing cone
977 cpar0[0]=(zvac12-zvac11)/2;
2b32db74 978 cpar0[1]=r3-dVacuS+(zvac11-zvac9)*TMath::Tan(thetaOpen3);
979 cpar0[2]=r3 +(zvac11-zvac9)*TMath::Tan(thetaOpen3);
980 cpar0[3]=rVacu;
981 cpar0[4]=rAbs;
982 gMC->Gsvolu("YV32", "CONE", idtmed[kSteel+40], cpar0, 5);
6523e275 983//
984// insulation
985 cpar[0]=cpar0[0];
2b32db74 986 cpar[1]=cpar0[1]+dTubeS;
987 cpar[2]=cpar0[1]+dTubeS+dInsuS;
988 cpar[3]=cpar0[3]+dTubeS;
989 cpar[4]=cpar0[3]+dTubeS+dInsuS;
990 gMC->Gsvolu("YI32", "CONE", idtmed[kInsulation+40], cpar, 5);
6523e275 991 gMC->Gspos("YI32", 1, "YV32", 0., 0., 0., 0, "ONLY");
992//
993// clearance
2b32db74 994 cpar[1]=cpar0[2]-dProtS-dFreeS;
995 cpar[2]=cpar0[2]-dProtS;
996 cpar[3]=cpar0[4]-dProtS-dFreeS;
997 cpar[4]=cpar0[4]-dProtS;
998 gMC->Gsvolu("YP32", "CONE", idtmed[kVacuum+40], cpar, 5);
6523e275 999 gMC->Gspos("YP32", 1, "YV32", 0., 0., 0., 0, "ONLY");
1000
1001 dz=dl-cpar[0];
1002 gMC->Gspos("YV32", 1, "YMO4", 0., 0., dz, 0, "ONLY");
1003//
1004//
1005// MUON trigger wall
2b32db74 1006//
1007 tpar[0] = 50.;
6523e275 1008 tpar[1] = 310.;
2b32db74 1009 tpar[2] = (zFilterOut - zFilterIn) / 2.;
1010 gMC->Gsvolu("YFIM", "TUBE", idtmed[kFe+40], tpar, 3);
1011 dz = (zFilterIn + zFilterOut) / 2.;
6523e275 1012 tpar[2] -= 10.;
2b32db74 1013 gMC->Gsvolu("YFII","TUBE", idtmed[kFe], tpar, 3);
6523e275 1014 gMC->Gspos("YFII", 1, "YFIM", 0., 0., 0., 0, "ONLY");
1015 gMC->Gspos("YFIM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1016//
1017// Shielding close to chamber
1018//
2b32db74 1019 cpar[0]=(zch1-dzch-1.-zRear)/2.;
6523e275 1020 cpar[1]=R11;
2b32db74 1021 cpar[2]=zRear*TMath::Tan(accMin);
6523e275 1022 cpar[3]=R11;
2b32db74 1023 cpar[4]=(zRear+2.*cpar[0])*TMath::Tan(accMin);
1024 gMC->Gsvolu("YCS1", "CONE", idtmed[kNiCuW], cpar, 5);
1025 dz=zRear+cpar[0];
6523e275 1026 gMC->Gspos("YCS1", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1027
1028 cpar[0]=(zvac4-(zch1+dzch+1.))/2.;
1029 cpar[1]=R11;
2b32db74 1030 cpar[2]=(zvac4-2.*cpar[0])*TMath::Tan(accMin);
6523e275 1031 cpar[3]=R11;
6d4aaa11 1032 cpar[4]=R21;
2b32db74 1033 gMC->Gsvolu("YCS2", "CONE", idtmed[kNiCuW], cpar, 5);
6523e275 1034 dz=zvac4-cpar[0];
1035 gMC->Gspos("YCS2", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1036
2b32db74 1037 cpar[0]=(dzch-1.);
1038 cpar[1]=R11;
1039 cpar[2]=(zch1-dzch+1.)*TMath::Tan(accMin);
1040 cpar[3]=R11;
1041 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
1042 gMC->Gsvolu("YCS3", "CONE", idtmed[kNiCuW], cpar, 5);
1043 dz=zch1;
1044 gMC->Gspos("YCS3", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1045
6523e275 1046
1047 cpar[0]=(zch2-dzch-1.-zvac4)/2.;
1048 cpar[1]=R21;
2b32db74 1049 cpar[2]=zvac4*TMath::Tan(accMin);
6523e275 1050 cpar[3]=R21;
2b32db74 1051 cpar[4]=(zvac4+2.*cpar[0])*TMath::Tan(accMin);
1052 gMC->Gsvolu("YCS4", "CONE", idtmed[kNiCuW], cpar, 5);
6523e275 1053 dz=zvac4+cpar[0];
2b32db74 1054 gMC->Gspos("YCS4", 1, "ALIC", 0., 0., dz, 0, "ONLY");
6523e275 1055
1056
1057 cpar[0]=(zvac6-(zch2+dzch+1.))/2.;
6d4aaa11 1058 cpar[1]=R21;
2b32db74 1059 cpar[2]=(zvac6-2.*cpar[0])*TMath::Tan(accMin);
6d4aaa11 1060 cpar[3]=R21;
2b32db74 1061 cpar[4]=zvac6*TMath::Tan(accMin);
1062 gMC->Gsvolu("YCS5", "CONE", idtmed[kNiCuW], cpar, 5);
6523e275 1063 dz=zvac6-cpar[0];
2b32db74 1064 gMC->Gspos("YCS5", 1, "ALIC", 0., 0., dz, 0, "ONLY");
6523e275 1065
2b32db74 1066 cpar[0]=(dzch-1.);
1067 cpar[1]=R21;
1068 cpar[2]=(zch2-dzch+1.)*TMath::Tan(accMin);
1069 cpar[3]=R21;
1070 cpar[4]=cpar[2]+2.*cpar[0]*TMath::Tan(accMin);
1071 gMC->Gsvolu("YCS6", "CONE", idtmed[kNiCuW], cpar, 5);
1072 dz=zch2;
1073 gMC->Gspos("YCS6", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1074//
1075// Outer Pb Cone
1076 if (fPbCone) {
404559e5 1077 par0[0] = 0.;
1078 par0[1] = 360.;
1079 par0[2] = 14.;
1080// start of cone
1081 par0[3] = zConeE;
1082 par0[4] = 30.0;
1083 par0[5] = 30.01;
1084// 3rd station
1085 par0[6] = zch31;
1086 par0[7] = 30.0;
1087 par0[8] = 30.-(zConeE-zch31)*TMath::Tan(thetaOpenPbO);
1088
1089 par0[9] = zch31;
1090 par0[10] = 30.0;
1091 par0[11] = 30.1;
1092
1093 par0[12] = zch32;
1094 par0[13] = 30.0;
1095 par0[14] = 30.1;
1096
1097 par0[15] = zch32;
1098 par0[16] = 30.0;
1099 par0[17] = 30.-(zConeE-zch32)*TMath::Tan(thetaOpenPbO);
1100
1101// 4th station
1102 par0[18] = zch41;
1103 par0[19] = 30.0;
1104 par0[20] = 30.-(zConeE-zch41)*TMath::Tan(thetaOpenPbO);
1105
1106 par0[21] = zch41;
1107 par0[22] = 30.0;
1108 par0[23] = 30.-(zConeE-zch41)*TMath::Tan(thetaOpenPbO)-7.;
1109
1110 par0[24] = zch42;
1111 par0[25] = 30.0;
1112 par0[26] = 30.-(zConeE-zch41)*TMath::Tan(thetaOpenPbO)-7.;
1113
1114 par0[27] = zch42;
1115 par0[28] = 30.0;
1116 par0[29] = 30.-(zConeE-zch42)*TMath::Tan(thetaOpenPbO);
1117
1118// 5th station
1119 par0[30] = zch51;
1120 par0[31] = 30.0;
1121 par0[32] = 30.-(zConeE-zch51)*TMath::Tan(thetaOpenPbO);
1122
1123 par0[33] = zch51;
1124 par0[34] = 30.0;
1125 par0[35] = 30.-(zConeE-zch51)*TMath::Tan(thetaOpenPbO)-7.;
1126
1127 par0[36] = zch52;
1128 par0[37] = 30.0;
1129 par0[38] = 30.-(zConeE-zch51)*TMath::Tan(thetaOpenPbO)-7.;
1130
1131 par0[39] = zch52;
1132 par0[40] = 30.0;
1133 par0[41] = 30.-(zConeE-zch52)*TMath::Tan(thetaOpenPbO);
1134// end of cone
1135 par0[42] = zFilterIn;
1136 par0[43] = 30.0;
1137 par0[44] = 30.-(zConeE-zFilterIn)*TMath::Tan(thetaOpenPbO);
1138//
1139 gMC->Gsvolu("YOPB", "PCON", idtmed[kPb], par0, 45);
1140 dz=0.;
2b32db74 1141 gMC->Gspos("YOPB", 1, "ALIC", 0., 0., dz, 0, "ONLY");
1142 }
6523e275 1143}
1144
1145void AliSHILv0::Init()
1146{
1147 //
1148 // Initialise the muon shield after it has been built
1149 //
1150 Int_t i;
1151 //
1152 printf("\n");
1153 for(i=0;i<35;i++) printf("*");
1154 printf(" SHILv0_INIT ");
1155 for(i=0;i<35;i++) printf("*");
1156 printf("\n");
1157 //
1158 // Here the SHIL initialisation code (if any!)
1159 for(i=0;i<80;i++) printf("*");
1160 printf("\n");
1161}
1162
6523e275 1163
1164
1165