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