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