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