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