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