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