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