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