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