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