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