Small angle absorber in offficial coordinate system for physics.
[u/mrichter/AliRoot.git] / STRUCT / AliSHILv2.cxx
CommitLineData
be4fc320 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$ */
be4fc320 17
eeacf08b 18//-------------------------------------------------------------------------
19// MUON shielding class
20// Default version
21// Author: A.Morsch
22//-------------------------------------------------------------------------
be4fc320 23
24#include "AliSHILv2.h"
25#include "AliRun.h"
be4fc320 26#include "AliConst.h"
27#include "AliALIFE.h"
28
29ClassImp(AliSHILv2)
30
31//_____________________________________________________________________________
32AliSHILv2::AliSHILv2()
33{
34 //
35 // Default constructor for muon shield
36 //
37}
38
39//_____________________________________________________________________________
40AliSHILv2::AliSHILv2(const char *name, const char *title)
41 : AliSHIL(name,title)
42{
43 //
44 // Standard constructor for muon shield
45 //
46 SetMarkerColor(7);
47 SetMarkerStyle(2);
48 SetMarkerSize(0.4);
49 // Pb cone not yet compatible with muon chamber inner radii
50 // Switched off by default
51 SetWriteGeometry();
52 SetPbCone();
53}
54
55//_____________________________________________________________________________
56void AliSHILv2::CreateGeometry()
57{
58 //
59 // Build muon shield geometry
60 //
61 //
62 //Begin_Html
63 /*
64 <img src="picts/AliSHILv2.gif">
65 */
66 //End_Html
67 //Begin_Html
68 /*
69 <img src="picts/AliSHILv2Tree.gif">
70 */
71 //End_Html
72
73 Float_t cpar[5], cpar0[5], tpar[3], par1[100], pars1[100], par2[100], par3[100],
b21c95fc 74 par4[24], par0[100];
be4fc320 75 Float_t dz, dZ;
76
77 Int_t *idtmed = fIdtmed->GetArray()-1699;
dd6a9ea4 78
79 Int_t idrotm[1799];
80
be4fc320 81#include "ABSOSHILConst.h"
82#include "SHILConst2.h"
83
84 enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
85 kNiCuW=1720, kVacuum=1715, kAir=1714, kConcrete=1716,
86 kPolyCH2=1717, kSteel=1709, kInsulation=1713};
87//
88// Material of the rear part of the shield
89 Int_t iHeavy=kNiCuW;
90 if (fPbCone) iHeavy=kPb;
91//
92//
93// begin Fluka
94 AliALIFE* flukaGeom = new AliALIFE("beamshield.alife", "beamshield_vol.inp");
9a4f9621 95
be4fc320 96 Int_t i=0,ifl=0;
97 Float_t posfluka[3]={0., 0., 0.};
98 Float_t zfluka[12], rfluka1[12], rfluka2[12], rfluka3[12] ;
99//
100// end Fluka
101
102
103//
104// Mother volume
105//
dbbe5bc1 106 Float_t dRear1=kDRear;
be4fc320 107
dbbe5bc1 108 Float_t zstart=kZRear-dRear1;
be4fc320 109
110 par0[0] = 0.;
111 par0[1] = 360.;
112 par0[2] = 28.;
113
dbbe5bc1 114 Float_t dl=(kZvac12-zstart)/2.;
be4fc320 115 dz=zstart+dl;
116//
117// start
118 par0[3] = -dl;
119 par0[4] = 0.;
dbbe5bc1 120 par0[5] = zstart * TMath::Tan(kAccMin);
be4fc320 121// recess station 1
dbbe5bc1 122 par0[6] = -dz+kZch11;
be4fc320 123 par0[7] = 0.;
dbbe5bc1 124 par0[8] = kZch11 * TMath::Tan(kAccMin);
be4fc320 125
126 par0[9] = par0[6];
127 par0[10] = 0.;
128 par0[11] = 17.9;
129
dbbe5bc1 130 par0[12] = -dz+kZch12;
be4fc320 131 par0[13] = 0.;
132 par0[14] = 17.9;
133
134 par0[15] = par0[12];
135 par0[16] = 0.;
dbbe5bc1 136 par0[17] = kZch12 * TMath::Tan(kAccMin);
be4fc320 137// recess station 2
dbbe5bc1 138 par0[18] = -dz+kZch21;
be4fc320 139 par0[19] = 0.;
dbbe5bc1 140 par0[20] = kZch21 * TMath::Tan(kAccMin);
be4fc320 141
dbbe5bc1 142 par0[21] = -dz+kZch21;
be4fc320 143 par0[22] = 0.;
144 par0[23] = 23.;
145
dbbe5bc1 146 par0[24] = -dz+kZch22;
be4fc320 147 par0[25] = 0.;
148 par0[26] = 23.;
149
dbbe5bc1 150 par0[27] = -dz+kZch22;
be4fc320 151 par0[28] = 0.;
dbbe5bc1 152 par0[29] = kZch22 * TMath::Tan(kAccMin);
be4fc320 153//
dbbe5bc1 154 par0[30] = -dz+kZvac6;
be4fc320 155 par0[31] = 0.;
dbbe5bc1 156 par0[32] = kZvac6 * TMath::Tan(kAccMin);
be4fc320 157// end of 2 deg cone
dbbe5bc1 158 par0[33] = -dz+kZConeE;
be4fc320 159 par0[34] = 0.;
160 par0[35] = 30.;
161
dbbe5bc1 162 par0[36] = -dz+kZch31;
be4fc320 163 par0[37] = 0.;
164 par0[38] = 30.;
165
dbbe5bc1 166 par0[39] = -dz+kZch31;
be4fc320 167 par0[40] = 0.;
168 par0[41] = 29.;
169
dbbe5bc1 170 par0[42] = -dz+kZch32;
be4fc320 171 par0[43] = 0.;
172 par0[44] = 29.;
173// start of 1.6 deg cone
dbbe5bc1 174 par0[45] = -dz+kZch32;
be4fc320 175 par0[46] = 0.;
dbbe5bc1 176 par0[47] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 177// recess station 4
dbbe5bc1 178 par0[48] = -dz+kZch41;
be4fc320 179 par0[49] = 0.;
dbbe5bc1 180 par0[50] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 181
dbbe5bc1 182 par0[51] = -dz+kZch41;
be4fc320 183 par0[52] = 0.;
184 par0[53] = 37.5;
185
dbbe5bc1 186 par0[54] = -dz+kZch42;
be4fc320 187 par0[55] = 0.;
188 par0[56] = 37.5;
189
dbbe5bc1 190 par0[57] = -dz+kZch42;
be4fc320 191 par0[58] = 0.;
dbbe5bc1 192 par0[59] = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 193
194// recess station 5
195
dbbe5bc1 196 par0[60] = -dz+kZch51;
be4fc320 197 par0[61] = 0.;
dbbe5bc1 198 par0[62] = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 199
dbbe5bc1 200 par0[63] = -dz+kZch51;
be4fc320 201 par0[64] = 0.;
202 par0[65] = 37.5;
203
dbbe5bc1 204 par0[66] = -dz+kZch52;
be4fc320 205 par0[67] = 0.;
206 par0[68] = 37.5;
207
dbbe5bc1 208 par0[69] = -dz+kZch52;
be4fc320 209 par0[70] = 0.;
dbbe5bc1 210 par0[71] = 30.+(kZch52-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 211
212// end of cone
213
dbbe5bc1 214 par0[72] = -dz+kZvac10;
be4fc320 215 par0[73] = 0.;
dbbe5bc1 216 par0[74] = 30.+(kZvac10-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 217
dbbe5bc1 218 par0[75] = -dz+kZvac10;
be4fc320 219 par0[76] = 0.;
dbbe5bc1 220 par0[77] = kR42;
be4fc320 221
dbbe5bc1 222 par0[78] = -dz+kZvac11;
be4fc320 223 par0[79] = 0.;
dbbe5bc1 224 par0[80] = kR42;
be4fc320 225
dbbe5bc1 226 par0[81] = -dz+kZvac11;
be4fc320 227 par0[82] = 0.;
dbbe5bc1 228 par0[83] = kR43;
be4fc320 229
dbbe5bc1 230 par0[84] = -dz+kZvac12;
be4fc320 231 par0[85] = 0.;
dbbe5bc1 232 par0[86] = kR43;
be4fc320 233
234 gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 87);
235 dz=zstart+dl;
dd6a9ea4 236 AliMatrix(idrotm[1705], 270., 0., 90., 90., 180., 0.);
237 gMC->Gspos("YMOT", 1, "ALIC", 0., 0., - dz, idrotm[1705], "ONLY");
92a841cc 238 gMC->Gsbool("YMOT","L3DO");
239 gMC->Gsbool("YMOT","L3O1");
240 gMC->Gsbool("YMOT","L3O2");
241
be4fc320 242//
243
244 dZ=-dl;
245
246//
247// First section: bellows below and behind front absorber
248//
249//
250 par1[ 0] = 0.;
251 par1[ 1] = 360.;
252 par1[ 2] = 14.;
dbbe5bc1 253 dl=(kZvac4-zstart)/2.;
be4fc320 254
255 par1[ 3] = -dl;
dbbe5bc1 256 par1[ 4] = kRAbs+(zstart-kZOpen) * TMath::Tan(kThetaOpen1);
257 par1[ 5] = zstart * TMath::Tan(kAccMin);
be4fc320 258
259 par1[ 6] = -dl+dRear1;
dbbe5bc1 260 par1[ 7] = par1[4] + dRear1 * TMath::Tan(kThetaOpen1);
261 par1[ 8] = kZRear * TMath::Tan(kAccMin);
be4fc320 262
263 par1[ 9] = -dl+dRear1;
264 par1[10] = par1[7];
dbbe5bc1 265 par1[11] = kR11;
be4fc320 266
dbbe5bc1 267 par1[12] = -dl+kZvac41-zstart;
268 par1[13] = kRAbs + (kZvac41-kZOpen) * TMath::Tan(kThetaOpen1);
269 par1[14] = kR11;
be4fc320 270
271 par1[15] = par1[12];
272 par1[16] = par1[13];
dbbe5bc1 273 par1[17] = kR21;
be4fc320 274
275
dbbe5bc1 276 par1[18] = -dl+kZvac1-zstart;
277 par1[19] = kRAbs+ (kZvac1-kZOpen) * TMath::Tan(kThetaOpen1);
278 par1[20] = kR21;
be4fc320 279
dbbe5bc1 280 par1[21] = par1[18]+kDr11/10.;
281 par1[22] = par1[19]+kDr11;
282 par1[23] = kR21;
be4fc320 283
284
dbbe5bc1 285 par1[24] = -dl+(kZvac1+kDr11/10.+kDB1-zstart);
be4fc320 286 par1[25] = par1[22];
dbbe5bc1 287 par1[26] = kR21;
be4fc320 288
dbbe5bc1 289 par1[27] = par1[24]+kDr12;
290 par1[28] = par1[25]+kDr12;
291 par1[29] = kR21;
be4fc320 292
dbbe5bc1 293 par1[30] = par1[27]+kDF1;
be4fc320 294 par1[31] = par1[28];
dbbe5bc1 295 par1[32] = kR21;
be4fc320 296
dbbe5bc1 297 par1[33] = par1[30]+kDr12;
298 par1[34] = par1[31]-kDr12;
299 par1[35] = kR21;
be4fc320 300
dbbe5bc1 301 par1[36] = par1[33]+kDB1;
be4fc320 302 par1[37] = par1[34];
dbbe5bc1 303 par1[38] = kR21;
be4fc320 304
dbbe5bc1 305 par1[39] = par1[36]+kDr13;
306 par1[40] = par1[37]-kDr13;
307 par1[41] = kR21;
be4fc320 308
dbbe5bc1 309 par1[42] = -dl+kZvac4-zstart;
be4fc320 310 par1[43] = par1[40];
dbbe5bc1 311 par1[44] = kR21;
be4fc320 312
313 Float_t r2 = par1[43];
314 Float_t rBox= par1[43]-0.1;
315 Float_t rc1 = par1[7];
316
317 gMC->Gsvolu("YGO1", "PCON", idtmed[kNiCuW], par1, 45);
318
319//
320// begin Fluka
9a4f9621 321
be4fc320 322 for (ifl=0; ifl<14; ifl++) {
dbbe5bc1 323 zfluka[ifl]=par1[3+3*ifl]+dl+kZRear-kDRear;
be4fc320 324 rfluka1[ifl] = par1[4+3*ifl];
325 rfluka2[ifl] = par1[5+3*ifl];
dbbe5bc1 326 if (ifl > 3) rfluka2[ifl]=rfluka2[ifl]-kDRSteel1;
be4fc320 327 }
328
329
330 Float_t rfluka0[8]={rBox,rBox,rBox,rBox,rBox,rBox,rBox,rBox};
331
332 flukaGeom->Comment("1st part: Shield");
333// Use default for first three cones
334 flukaGeom->SetDefaultVolume("*ACR02");
335 rfluka2[0]=rfluka2[1]=rfluka2[2]=-1;
336//
337 flukaGeom->Comment("Shield");
338 flukaGeom->PolyCone(rfluka1, rfluka2, zfluka, 12, posfluka, "NIW", "MF", "$SHS");
339 flukaGeom->Comment("Vacuum");
340 flukaGeom->PolyCone(rfluka0, rfluka1+2, zfluka+2, 8, posfluka, "VACUUM", "MF", "$SHS");
341//
342// end Fluka
343
344 for (i=0; i<45; i++) pars1[i] = par1[i];
345 for (i=4; i<44; i+=3) pars1[i] = 0.;
346
347 gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], pars1, 45);
348 gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");
349 dZ+=dl;
350 gMC->Gspos("YMO1", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
351 dZ+=dl;
352
353
dbbe5bc1 354 tpar[0]=kR21-0.6;
355 tpar[1]=kR21;
356 tpar[2]=(kZvac4-kZvac41)/2.;
be4fc320 357 gMC->Gsvolu("YSE1", "TUBE", idtmed[kSteel], tpar, 3);
358 dz=dl-tpar[2];
359 gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
360
361
dbbe5bc1 362 tpar[0]=kR11-0.6;
363 tpar[1]=kR11;
364 tpar[2]=(kZvac41-zstart-dRear1)/2.;
be4fc320 365 gMC->Gsvolu("YSE2", "TUBE", idtmed[kSteel], tpar, 3);
dbbe5bc1 366 dz=dl-tpar[2]-(kZvac4-kZvac41);
be4fc320 367 gMC->Gspos("YSE2", 1, "YGO1", 0., 0., dz, 0, "ONLY");
368
369// begin Fluka
370 flukaGeom->Comment("1st part: Steel Envelope");
dbbe5bc1 371 flukaGeom->Cylinder(tpar[0], tpar[1], kZRear, kZvac4, posfluka, "NIW", "MF", "$SHS");
be4fc320 372//
373// end Fluka
374
375//
376// 1st section: vacuum system
377//
378//
379// Bellow 1
380//
dbbe5bc1 381 tpar[0]=kRB1;
382 tpar[1]=kRB1+kHB1;
383 tpar[2]=kEB1/2.;
be4fc320 384 gMC->Gsvolu("YB11", "TUBE", idtmed[kSteel+40], tpar, 3);
385 Float_t dl1=tpar[2];
386
dbbe5bc1 387 tpar[0]=kRB1+kHB1-kEB1;
388 tpar[1]=kRB1+kHB1;
389 tpar[2]=(kLB1/2.-2.*kEB1)/2.;
be4fc320 390 gMC->Gsvolu("YB12", "TUBE", idtmed[kSteel+40], tpar, 3);
391 Float_t dl2=tpar[2];
392
dbbe5bc1 393 tpar[0]=kRB1-kEB1;
394 tpar[1]=kRB1;
395 tpar[2]=kLB1/8.;
be4fc320 396 gMC->Gsvolu("YB13", "TUBE", idtmed[kSteel+40], tpar, 3);
397 Float_t dl3=tpar[2];
398
399
400 tpar[0]=0;
dbbe5bc1 401 tpar[1]=kRB1+kHB1;
402 tpar[2]=kLB1/2.;
be4fc320 403 gMC->Gsvolu("YBU1", "TUBE", idtmed[kVacuum+40], tpar, 3);
404
405 dz=-tpar[2]+dl3;
406 gMC->Gspos("YB13", 1, "YBU1", 0., 0., dz, 0, "ONLY");
407 dz+=dl3;
408 dz+=dl1;
409 gMC->Gspos("YB11", 1, "YBU1", 0., 0., dz, 0, "ONLY");
410 dz+=dl1;
411 dz+=dl2;
412 gMC->Gspos("YB12", 1, "YBU1", 0., 0., dz, 0, "ONLY");
413 dz+=dl2;
414 dz+=dl1;
415 gMC->Gspos("YB11", 2, "YBU1", 0., 0., dz, 0, "ONLY");
416 dz+=dl1;
417 dz+=dl3;
418 gMC->Gspos("YB13", 2, "YBU1", 0., 0., dz, 0, "ONLY");
419
420
421 tpar[0]=0;
dbbe5bc1 422 tpar[1]=kRB1+kHB1+0.5;
423 tpar[2]=12.*kLB1/2.;
be4fc320 424 gMC->Gsvolu("YBM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
425 Float_t bsize = tpar[2];
dbbe5bc1 426 tpar[0]=kRB1+kHB1;
be4fc320 427 gMC->Gsvolu("YBI1", "TUBE", idtmed[kInsulation+40], tpar, 3);
428 gMC->Gspos("YBI1", 2, "YBM1", 0., 0., 0., 0, "ONLY");
429
dbbe5bc1 430 dz=-bsize+kLB1/2.;
be4fc320 431
432 for (i=0; i<12; i++) {
433 gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0., dz, 0, "ONLY");
dbbe5bc1 434 dz+=kLB1;
be4fc320 435 }
436
dbbe5bc1 437 dz=-dl+(kZvac1-zstart)+kDr11/10.+bsize;
be4fc320 438 gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
439
dbbe5bc1 440// dz=dl-kDr13-(kZvac4-kZvac3)-bsize;
be4fc320 441// gMC->Gspos("YBM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
442
443
444//
445// Flange
446
447 tpar[0]=0;
dbbe5bc1 448 tpar[1]=kRF1+0.6;
449 tpar[2]=kDF1/2.;
be4fc320 450 gMC->Gsvolu("YFM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
451// Steel
dbbe5bc1 452 tpar[0]=kRB1;
453 tpar[1]=kRF1+0.6;
454 tpar[2]=kDF1/2.;
be4fc320 455 gMC->Gsvolu("YF11", "TUBE", idtmed[kSteel+40], tpar, 3);
456// Insulation
dbbe5bc1 457 tpar[0]=kRF1;
458 tpar[1]=kRF1+0.5;
459 tpar[2]=kDF1/2.;
be4fc320 460 gMC->Gsvolu("YF12", "TUBE", idtmed[kInsulation+40], tpar, 3);
461
462
463 gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY");
464 gMC->Gspos("YF12", 1, "YFM1", 0., 0., 0., 0, "ONLY");
dbbe5bc1 465 dz=-dl+(kZvac3-zstart)-2.*kDr13-tpar[2];
be4fc320 466 gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
467
468//
469// pipe between flange and bellows
470//
471// Steel
dbbe5bc1 472 tpar[0] = kRB1-dTubeS;
473 tpar[1] = kRB1+0.6;
474 tpar[2] = (kZvac3-kZvac1-2.*kDr13-kDr11/10.-kDF1-2.*bsize)/2.;
be4fc320 475 gMC->Gsvolu("YPF1", "TUBE", idtmed[kSteel+40], tpar, 3);
476// Insulation
dbbe5bc1 477 tpar[0]=kRB1;
478 tpar[1]=kRB1+0.5;
be4fc320 479 gMC->Gsvolu("YPS1", "TUBE", idtmed[kInsulation+40], tpar, 3);
480 gMC->Gspos("YPS1", 1, "YPF1", 0., 0., 0., 0, "ONLY");
dbbe5bc1 481 dz=-dl+(kZvac1-zstart)+kDr11/10.+2.*bsize+tpar[2];
be4fc320 482 gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
dbbe5bc1 483// dz=-dl+(kZvac2-zstart)+kDF1/2.+tpar[2];
be4fc320 484// gMC->Gspos("YPF1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
485
486//
487// begin Fluka
488 flukaGeom->Comment("First Bellow");
dbbe5bc1 489 Float_t z1=kZvac1+kDr11;
be4fc320 490 Float_t z2;
491
492 for (i=0; i<10; i++) {
dbbe5bc1 493 z2=z1+kEB1;
494 flukaGeom->Cylinder(0., kRB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
495 flukaGeom->Cylinder(kRB1, kRB1+kHB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
be4fc320 496
497 z1=z2;
dbbe5bc1 498 z2+=kLB1/2.-kEB1;
499 flukaGeom->Cylinder(0., kRB1+kHB1-kEB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
500 flukaGeom->Cylinder(kRB1+kHB1-kEB1, kRB1+kHB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
be4fc320 501 z1=z2;
dbbe5bc1 502 z2=z1+kEB1;
503 flukaGeom->Cylinder(0., kRB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
504 flukaGeom->Cylinder(kRB1, kRB1+kHB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
be4fc320 505 z1=z2;
dbbe5bc1 506 z2+=kLB1/2.-kEB1;
507 flukaGeom->Cylinder(0., kRB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
508 flukaGeom->Cylinder(kRB1, kRB1+kEB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
509 flukaGeom->Cylinder(kRB1+kEB1, kRB1+kHB1, z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 510 z1=z2;
511 }
dbbe5bc1 512 flukaGeom->Cylinder(kRB1+kHB1, kRB1+kHB1+0.5, kZvac1+kDr11, z1, posfluka, "AIR", "MF", "$SHH");
513 flukaGeom->Cylinder(kRB1+kHB1+0.5, rBox, kZvac1+kDr11, z1, posfluka, "AIR", "MF", "$SHH");
be4fc320 514 Float_t zcy1=z1;
515
516
517 flukaGeom->Comment("Second Bellow");
dbbe5bc1 518 z1=kZvac3-kDr13;
be4fc320 519 for (i=0; i<10; i++) {
dbbe5bc1 520 z2=z1-kEB1;
521 flukaGeom->Cylinder(0., kRB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
522 flukaGeom->Cylinder(kRB1, kRB1+kHB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
be4fc320 523 z1=z2;
dbbe5bc1 524 z2-=kLB1/2.-kEB1;
525 flukaGeom->Cylinder(0., kRB1+kHB1-kEB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
526 flukaGeom->Cylinder(kRB1+kHB1-kEB1, kRB1+kHB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
be4fc320 527 z1=z2;
dbbe5bc1 528 z2=z1-kEB1;
529 flukaGeom->Cylinder(0., kRB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
530 flukaGeom->Cylinder(kRB1, kRB1+kHB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
be4fc320 531 z1=z2;
dbbe5bc1 532 z2-=kLB1/2.-kEB1;
533 flukaGeom->Cylinder(0., kRB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
534 flukaGeom->Cylinder(kRB1, kRB1+kEB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
535 flukaGeom->Cylinder(kRB1+kEB1, kRB1+kHB1, z2, z1, posfluka, "AIR", "MF", "$SHH");
be4fc320 536 z1=z2;
537 }
dbbe5bc1 538 flukaGeom->Cylinder(kRB1+kHB1, kRB1+kHB1+0.5, z1, kZvac3-kDr13, posfluka, "AIR", "MF", "$SHH");
539 flukaGeom->Cylinder(kRB1+kHB1+0.5, rBox, z1, kZvac3-kDr13, posfluka, "AIR", "MF", "$SHH");
be4fc320 540
541 Float_t zcy2=z1;
542 flukaGeom->Comment("Flange");
543 Float_t zfl=(zcy1+zcy2)/2.;
544
dbbe5bc1 545 z1=zfl-kDF1/2.;
546 z2=zfl+kDF1/2.;
547 flukaGeom->Cylinder(0.,kRF1-2. , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
548 flukaGeom->Cylinder(kRF1-2., kRF1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
549 flukaGeom->Cylinder(kRF1, kRF1+0.05 , z1, z2, posfluka, "AIR", "MF", "$SHH");
550 flukaGeom->Cylinder(kRF1+0.05, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 551 z2=z1;
dbbe5bc1 552 z1=z2-kDFlange;
553 flukaGeom->Cylinder(0.,kRB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
554 flukaGeom->Cylinder(kRB1, kRF1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
555 flukaGeom->Cylinder(kRF1, kRF1+0.5 , z1, z2, posfluka, "AIR", "MF", "$SHH");
556 flukaGeom->Cylinder(kRF1+0.5, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 557 z2=z1;
558 z1=zcy1;
dbbe5bc1 559 flukaGeom->Cylinder(0.,kRB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
560 flukaGeom->Cylinder(kRB1, kRB1+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
561 flukaGeom->Cylinder(kRB1+0.1, kRB1+0.6 , z1, z2, posfluka, "AIR", "MF", "$SHH");
562 flukaGeom->Cylinder(kRB1+0.6, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
563
564 z1=zfl+kDF1/2.;
565 z2=z1+kDFlange;
566 flukaGeom->Cylinder(0.,kRB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
567 flukaGeom->Cylinder(kRB1, kRF1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
568 flukaGeom->Cylinder(kRF1, kRF1+0.5 , z1, z2, posfluka, "AIR", "MF", "$SHH");
569 flukaGeom->Cylinder(kRF1+0.5, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 570 z1=z2;
571 z2=zcy2;
dbbe5bc1 572 flukaGeom->Cylinder(0.,kRB1 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
573 flukaGeom->Cylinder(kRB1, kRB1+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
574 flukaGeom->Cylinder(kRB1+0.1, kRB1+0.6 , z1, z2, posfluka, "AIR", "MF", "$SHH");
575 flukaGeom->Cylinder(kRB1+0.6, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 576// end Fluka
577//
578
579// Pipe+Heating 1.5 mm
580// Heating Jacket 5.0 mm
581// Protection 1.0 mm
582// ========================
583// 7.5 mm
584// pipe and heating jackets outside bellows
585//
586// left side
dbbe5bc1 587 cpar0[0]=(kZvac1+kDr11/10.-zstart)/2;
588 cpar0[1]=kRVacu-0.05 +(zstart-kZOpen)*TMath::Tan(kThetaOpen1);
589 cpar0[2]=kRVacu+0.7 +(zstart-kZOpen)*TMath::Tan(kThetaOpen1);
590 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpen1);
591 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpen1);
be4fc320 592 gMC->Gsvolu("YV11", "CONE", idtmed[kSteel+40], cpar0, 5);
593//
594// insulation
595 dTubeS=0.15;
596 cpar[0]=cpar0[0];
597 cpar[1]=cpar0[1]+0.15;
598 cpar[2]=cpar0[1]+0.65;
599 cpar[3]=cpar0[3]+0.15;
600 cpar[4]=cpar0[3]+0.65;
601 gMC->Gsvolu("YI11", "CONE", idtmed[kInsulation+40], cpar, 5);
602 gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY");
603 dz=-dl+cpar0[0];
604 gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY");
605
606// begin Fluka
607//
608 Float_t rf1[10], rf2[10];
eeacf08b 609 rf1[0]=0.;
be4fc320 610 rf1[1] = cpar0[1];
eeacf08b 611 rf1[2]=rf1[1]+0.15;
612 rf1[3]=rf1[2]+0.5;
613 rf1[4]=rf1[3]+0.1;
614 rf1[5]=par1[4];
615 rf1[6]=0.; //PH This has to be checked...
be4fc320 616
eeacf08b 617 rf2[0]=0.;
618 rf2[1] = cpar0[3];
619 rf2[2]=rf2[1]+0.15;
620 rf2[3]=rf2[2]+0.5;
621 rf2[4]=rf2[3]+0.1;
be4fc320 622 rf2[5]=par1[7];
eeacf08b 623 rf2[6]=0.; //PH This has to be checked
be4fc320 624
625 char* materialsA[7]
626 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "AIR"};
627 char* fieldsA[7]
628 = {"MF", "MF", "MF", "MF", "MF", "MF"};
629 char* cutsA[7]
630 = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH"};
631
632 flukaGeom->Comment("1st part: Beam pipe lateral struture (left)");
dbbe5bc1 633 flukaGeom->OnionCone(rf1, rf2, 6 , zstart, kZvac1, posfluka, materialsA, fieldsA, cutsA);
be4fc320 634 for (i=0; i<7; i++) rf1[i]=rf2[i];
dbbe5bc1 635 for (i=1; i<7; i++) rf2[i]=rf1[i]+kDr11*TMath::Tan(kThetaOpen1);
636 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac1, kZvac1+kDr11, posfluka, materialsA, fieldsA, cutsA);
637 flukaGeom->Cone(rc1, rf2[5], rc1, rc1+kDr11, kZvac1 , kZvac1+kDr11, posfluka,"AIR", "MF", "$SHH");
be4fc320 638//
639// end Fluka
640
641
642// right side
643 dTubeS = 0.35;
644 dVacuS += 0.25;
645
dbbe5bc1 646 cpar0[0] = (kZvac4-kZvac3+2.*kDr13)/2;
647 cpar0[1] = kRB1;
be4fc320 648 cpar0[2] = cpar0[1]+dVacuS;
dbbe5bc1 649 cpar0[3] = cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
650 cpar0[4] = cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
be4fc320 651 gMC->Gsvolu("YV12", "CONE", idtmed[kSteel], cpar0, 5);
652 Float_t r2V=cpar0[3];
653//
654// insulation
655 cpar[0] = cpar0[0];
656 cpar[1] = cpar0[1]+dTubeS;
dbbe5bc1 657 cpar[2] = cpar0[1]+dTubeS+kDInsuS;
be4fc320 658 cpar[3] = cpar0[3]+dTubeS;
dbbe5bc1 659 cpar[4] = cpar0[3]+dTubeS+kDInsuS;
be4fc320 660 gMC->Gsvolu("YI12", "CONE", idtmed[kInsulation], cpar, 5);
661 gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY");
662
663 dz=dl-cpar0[0];
664 gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY");
665
666//
667// begin Fluka
668 char* materialsB[5]
669 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR"};
670
671 char* fieldsB[5]
672 = {"MF", "MF", "MF", "MF", "MF"};
673
674 char* cutsB[5]
675 = {"$SHH","$SHH","$SHH","$SHH","$SHH"};
676
677 rf1[0]=rf2[0]=0.;
678 rf1[1]=cpar0[1];
679 rf2[1]=cpar0[3];
680
dbbe5bc1 681 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
be4fc320 682 rf1[5]=r2;
683
dbbe5bc1 684 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS;
be4fc320 685 rf2[5]=r2;
686 flukaGeom->Comment("1st part: Beam pipe lateral structure (right)");
dbbe5bc1 687 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac3, kZvac4, posfluka, materialsB, fieldsB, cutsB);
be4fc320 688 for (i=0; i<6; i++) rf2[i]=rf1[i];
689 for (i=1; i<5; i++) rf1[i]=rf2[i];
dbbe5bc1 690 rf1[5]=rf2[5]+kDr13;
691 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac3-kDr13, kZvac3, posfluka, materialsB, fieldsB, cutsB);
be4fc320 692
693//
694// end Fluka
695
696//
697// Second Section
698// Between first and second bellow section
699//
700
701 par2[0] = 0.;
702 par2[1] = 360.;
703 par2[2] = 11.;
dbbe5bc1 704 dl=(kZvac7-kZvac4)/2.;
be4fc320 705// recess station 2
706 par2[3] = -dl;
707 par2[4] = r2;
dbbe5bc1 708 par2[5] = kR21;
be4fc320 709
710 par2[6] = -dl+.1;
711 par2[7] = r2;
dbbe5bc1 712 par2[8] = kR21;
be4fc320 713
dbbe5bc1 714 par2[9] = -dl+(kZvac6-kZvac4);
715 par2[10] = r2+(kZvac6-kZvac4-10.) * TMath::Tan(kThetaOpen2);
716 par2[11] = kR21;
be4fc320 717
dbbe5bc1 718 par2[12] = -dl+(kZvac6-kZvac4);
be4fc320 719 par2[13] = par2[10];
dbbe5bc1 720 par2[14] = kZvac6*TMath::Tan(kAccMin);
be4fc320 721
722// Start of Pb section
dbbe5bc1 723 par2[15] = -dl+(kZPb-kZvac4);
724 par2[16] = r2+(kZPb-kZvac4-10.) * TMath::Tan(kThetaOpen2);
725 par2[17] = kZPb*TMath::Tan(kAccMin);
be4fc320 726//
727// end of cone following 2 deg line
dbbe5bc1 728 par2[18] = -dl+(kZConeE-kZvac4);
729 par2[19] = r2+(kZConeE-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 730 par2[20] = 30.;
731// recess station 3
dbbe5bc1 732 par2[21] = -dl+(kZch31-kZvac4);
733 par2[22] = r2+(kZch31-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 734 par2[23] = 30.;
735
dbbe5bc1 736 par2[24] = -dl+(kZch31-kZvac4);
737 par2[25] = r2+(kZch31-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 738 par2[26] = 29.;
739
dbbe5bc1 740 par2[27] = -dl+(kZch32-kZvac4);
741 par2[28] = r2+(kZch32-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 742 par2[29] = 29.;
743
dbbe5bc1 744 par2[30] = -dl+(kZch32-kZvac4);
745 par2[31] = r2+(kZch32-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 746 par2[32] = 30.;
747
dbbe5bc1 748 par2[33] = -dl+(kZvac7-kZvac4);
749 par2[34] = r2+(kZvac7-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 750 par2[35] = 30.;
751
752 gMC->Gsvolu("YGO2", "PCON", idtmed[kSteel+40], par2, 36);
753
754//
755// begin Fluka
756
757 char* materials1[8]
758 = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "NIW", "NIW", "STEEL"};
759 char* fields1[8]
760 = {"MF", "MF", "MF", "MF", "MF", "MF", "MF", "MF"};
761 char* cuts1[8]
762 = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH"};
763
764 flukaGeom->Comment("2nd part: Beam shield lateral struture (0)");
765 // until end of recess 1
dbbe5bc1 766 rf1[0] = 0.; rf1[1] = r2V; rf1[2] = rf1[1] + dTubeS; rf1[3] = rf1[2] + kDInsuS;
767 rf1[4] = rf1[3] + kDEnveS; rf1[5] = r2; rf1[6] = rf1[5]+2.;
768 rf1[7] = kR11-kDRSteel1; rf1[8] = kR21;
be4fc320 769
dbbe5bc1 770 for (i=1; i<7; i++) rf2[i]=rf1[i]+4.*TMath::Tan(kThetaOpenB);
be4fc320 771 rf2[7] = rf1[7];
772 rf2[8] = rf1[8];
dbbe5bc1 773 flukaGeom->OnionCone(rf1, rf2, 9 , kZvac4, kZvac4+4, posfluka, materials1, fields1, cuts1);
be4fc320 774
775 flukaGeom->Comment("2nd part: Beam shield lateral struture (1)");
776 // until end of recess 2
777 for (i=0; i<9; i++) rf1[i]=rf2[i];
dbbe5bc1 778 rf1[7] = kR21-kDRSteel2; rf1[8] = kR21;
779 for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZvac6-kZvac4-4.)*TMath::Tan(kThetaOpenB);
be4fc320 780 rf2[7] = rf1[7];
781 rf2[8] = rf1[8];
dbbe5bc1 782 flukaGeom->OnionCone(rf1, rf2, 9 , kZvac4+4, kZvac6, posfluka, materials1, fields1, cuts1);
be4fc320 783
784 flukaGeom->Comment("2nd part: Beam shield lateral struture (2)");
785 // steel recess
786 for (i=0; i<9; i++) rf1[i]=rf2[i];
dbbe5bc1 787 rf1[8] = kZvac6*TMath::Tan(kAccMin);
788 rf1[7] = kR21-kDRSteel2;
be4fc320 789
dbbe5bc1 790 for (i=1; i<9; i++) rf2[i]=rf1[i]+4.*TMath::Tan(kThetaOpenB);
be4fc320 791 rf2[7] = rf1[7];
792
dbbe5bc1 793 rf2[8] = -(rf1[8]+4.*TMath::Tan(kAccMin));
be4fc320 794 rf1[8] = -rf1[8];
795
dbbe5bc1 796 flukaGeom->OnionCone(rf1, rf2, 9 , kZvac6, kZvac6+4, posfluka, materials1, fields1, cuts1);
be4fc320 797 rf1[8] = -rf1[8];
798 rf2[8] = -rf2[8];
799
800 flukaGeom->Comment("2nd part: Beam shield lateral struture (3)");
801 // until start of lead section
802 for (i=0; i<9; i++) rf1[i]=rf2[i];
dbbe5bc1 803 for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZPb-kZvac6-4.)*TMath::Tan(kThetaOpenB);
804 rf1[7] = rf1[8] - kDRSteel2;
805 rf2[8] = rf1[8] + (kZPb-kZvac6-4.)*TMath::Tan(kAccMin);
806 rf2[7] = rf2[8] - kDRSteel2;
be4fc320 807
808 rf1[8]=-rf1[8];
809 rf2[8]=-rf2[8];
dbbe5bc1 810 flukaGeom->OnionCone(rf1, rf2, 9 , kZvac6+4, kZPb, posfluka, materials1, fields1, cuts1);
be4fc320 811 rf1[8]=-rf1[8];
812 rf2[8]=-rf2[8];
813
814 flukaGeom->Comment("2nd part: Beam shield lateral struture (4)");
815 // until end of 2deg
816 materials1[5] = "LEAD";
817 materials1[6] = "LEAD";
818 for (i=0; i<9; i++) rf1[i]=rf2[i];
dbbe5bc1 819 for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZConeE-kZPb)*TMath::Tan(kThetaOpenB);
be4fc320 820 rf1[8] = -rf1[8];
821 rf2[8] = -30.;
822 rf2[7] = 26.;
dbbe5bc1 823 flukaGeom->OnionCone(rf1, rf2, 9 , kZPb, kZConeE, posfluka, materials1, fields1, cuts1);
be4fc320 824 rf1[8]=-rf1[8];
825 rf2[8]=-rf2[8];
826
827 flukaGeom->Comment("2nd part: Beam shield lateral struture (4)");
828 // until end of this section
829 for (i=0; i<9; i++) rf1[i]=rf2[i];
dbbe5bc1 830 for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZvac7-kZConeE)*TMath::Tan(kThetaOpenB);
be4fc320 831 rf2[8] = 30;
832 rf2[7] = 26;
dbbe5bc1 833 flukaGeom->OnionCone(rf1, rf2, 9 , kZConeE, kZvac7, posfluka, materials1, fields1, cuts1);
be4fc320 834
835 Float_t r3V = rf2[1];
836
837// end Fluka
838
839//
840// Lead cone
841//
842 Float_t parPb[18];
843 parPb[ 0] = 0.;
844 parPb[ 1] = 360.;
845 parPb[ 2] = 5.;
dbbe5bc1 846 Float_t dlPb=(kZvac7-kZPb)/2.;
be4fc320 847
848 parPb[ 3] = -dlPb;
dbbe5bc1 849 parPb[ 4] = r2+(kZPb-kZvac4-10.) * TMath::Tan(kThetaOpen2);
850 parPb[ 5] = kZPb*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 851
dbbe5bc1 852 parPb[ 6] = -dlPb+(kZConeE-kZPb);
853 parPb[ 7] = r2+(kZConeE-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 854 parPb[ 8] = 26.;
855
dbbe5bc1 856 parPb[ 9] = -dlPb+(kZch32+4.-kZPb);
857 parPb[10] = r2+(kZch32+4.-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 858 parPb[11] = 26.;
859
dbbe5bc1 860 parPb[12] = -dlPb+(kZch32+4.-kZPb);
861 parPb[13] = r2+(kZch32+4.-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 862 parPb[14] = 30.;
863
864 parPb[15] = dlPb;
dbbe5bc1 865 parPb[16] = r2+(kZvac7-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 866 parPb[17] = 30.;
867
868 gMC->Gsvolu("YXO2", "PCON", idtmed[kPb], parPb, 18);
dbbe5bc1 869 gMC->Gspos("YXO2", 1, "YGO2", 0., 0., (kZPb-kZvac4)/2., 0, "ONLY");
be4fc320 870//
871// Concrete replacing Pb
872//
873 Float_t parCC[9];
874 Float_t zCC1 = 1066.;
875 Float_t zCC2 = 1188.;
876
877 parCC[ 0] = 0.;
878 parCC[ 1] = 360.;
879 parCC[ 2] = 2.;
880 Float_t dlCC=(zCC2-zCC1)/2.;
881 parCC[ 3] = -dlCC;
dbbe5bc1 882 parCC[ 4] = r2+(zCC1-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 883 parCC[ 5] = 30.;
884
885 parCC[ 6] = dlCC;
dbbe5bc1 886 parCC[ 7] = r2+(zCC2-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 887 parCC[ 8] = 30.;
888 gMC->Gsvolu("YCO2", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 889// gMC->Gspos("YCO2", 1, "YXO2", 0., 0., dlPb-dlCC-(kZvac7-zCC2), 0, "ONLY");
be4fc320 890
891 zCC1 = 751.75;
dbbe5bc1 892 zCC2 = kZConeE;
be4fc320 893 dlCC=(zCC2-zCC1)/2.;
894 parCC[ 3] = -dlCC;
dbbe5bc1 895 parCC[ 4] = r2+(zCC1-kZvac4-10.) * TMath::Tan(kThetaOpen2);
896 parCC[ 5] = zCC1*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 897
898 parCC[ 6] = dlCC;
dbbe5bc1 899 parCC[ 7] = r2+(zCC2-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 900 parCC[ 8] = 26.;
901
902 gMC->Gsvolu("YCO1", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 903// gMC->Gspos("YCO1", 1, "YXO2", 0., 0., dlPb-dlCC-(kZvac7-zCC2), 0, "ONLY");
be4fc320 904
905//
906// W cone
907//
908 Float_t parW[15];
909 parW[0] = 0.;
910 parW[1] = 360.;
911 parW[2] = 4.;
dbbe5bc1 912 Float_t dlW=(kZPb-kZvac4)/2.;
be4fc320 913
914 parW[3] = -dlW;
915 parW[4] = r2;
dbbe5bc1 916 parW[5] = kR21-kDRSteel2;
be4fc320 917
dbbe5bc1 918 parW[6] = -dlW+(kZvac6-kZvac4)+kDRSteel2;
919 parW[7] = r2+(kZvac6-kZvac4+kDRSteel2) * TMath::Tan(kThetaOpen2);
920 parW[8] = kR21-kDRSteel2;
be4fc320 921
dbbe5bc1 922 parW[9] = -dlW+(kZvac6-kZvac4)+kDRSteel2;
923 parW[10] = r2+(kZvac6-kZvac4+kDRSteel2) * TMath::Tan(kThetaOpen2);
924 parW[11] = (kZvac6+kDRSteel2)*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 925
926 parW[12] = dlW;
dbbe5bc1 927 parW[13] = r2+(kZPb-kZvac4) * TMath::Tan(kThetaOpen2);
928 parW[14] = kZPb*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 929
930 gMC->Gsvolu("YYO2", "PCON", idtmed[kNiCuW], parW, 15);
dbbe5bc1 931 gMC->Gspos("YYO2", 1, "YGO2", 0., 0., -(kZvac7-kZPb)/2., 0, "ONLY");
be4fc320 932
933 for (i=4; i<35; i+=3) par2[i] = 0;
934
935 gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 36);
936 gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");
937 dZ+=dl;
938 gMC->Gspos("YMO2", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
939 dZ+=dl;
940//
941//
942// 2nd section: vacuum system
943//
dbbe5bc1 944 cpar0[0]=(kZvac7-kZvac4)/2;
be4fc320 945 cpar0[1]=r2V;
946 cpar0[2]=r2V+dVacuS;
dbbe5bc1 947 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
948 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
be4fc320 949 gMC->Gsvolu("YV21", "CONE", idtmed[kSteel+40], cpar0, 5);
950//
951// insulation
952 cpar[0]=cpar0[0];
953 cpar[1]=cpar0[1]+dTubeS;
dbbe5bc1 954 cpar[2]=cpar0[1]+dTubeS+kDInsuS;
be4fc320 955 cpar[3]=cpar0[3]+dTubeS;
dbbe5bc1 956 cpar[4]=cpar0[3]+dTubeS+kDInsuS;
be4fc320 957 gMC->Gsvolu("YI21", "CONE", idtmed[kInsulation+40], cpar, 5);
958 gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY");
959 gMC->Gspos("YV21", 1, "YMO2", 0., 0., 0., 0, "ONLY");
960
961//
962// Third Section: Bellows and Flange
963//
964 par3[0] = 0.;
965 par3[1] = 360.;
966 par3[2] = 8.;
dbbe5bc1 967 dl=(kZvac9-kZvac7)/2.;
be4fc320 968
969 par3[3] = -dl;
dbbe5bc1 970 par3[4] = r2+(kZvac7-kZvac3) * TMath::Tan(kThetaOpen2);
be4fc320 971 par3[5] = 30.;
972
dbbe5bc1 973 par3[6] = -dl+kDr21;
974 par3[7] = par3[4]+kDr21;
be4fc320 975 par3[8] = 30.;
976
dbbe5bc1 977 par3[9] = par3[6]+kDB2;
be4fc320 978 par3[10] = par3[7];
979 par3[11] = 30.;
980
dbbe5bc1 981 par3[12] = par3[9]+kDr22;
982 par3[13] = par3[10]+kDr22;
be4fc320 983 par3[14] = 30.;
984
dbbe5bc1 985 par3[15] = par3[12]+kDF2;
be4fc320 986 par3[16] = par3[13];
987 par3[17] = 30.;
988
dbbe5bc1 989 par3[18] = par3[15]+kDr22;
990 par3[19] = par3[16]-kDr22;
be4fc320 991 par3[20] = 30.;
992
dbbe5bc1 993 par3[21] = par3[18]+kDB2;
be4fc320 994 par3[22] = par3[19];
995 par3[23] = 30.;
996
dbbe5bc1 997 par3[24] = par3[21]+kDr23;
be4fc320 998 par3[25] = par3[22];
999 par3[26] = 30.;
1000//
1001 rBox=par3[22]-0.1;
1002 Float_t r3=par3[25];
1003
1004 gMC->Gsvolu("YGO3", "PCON", idtmed[iHeavy+40], par3, 27);
1005
1006// begin Fluka
1007 Float_t rfvacu0[15];
1008 for (ifl=0; ifl<8; ifl++) {
dbbe5bc1 1009 zfluka[ifl]=par3[3+3*ifl]+dl+kZvac7;
be4fc320 1010 rfluka1[ifl] = par3[4+3*ifl];
1011 rfluka2[ifl] = par3[5+3*ifl]-4.;
1012 rfluka3[ifl] = par3[5+3*ifl];
1013 rfvacu0[ifl] = 0.;
1014 }
1015 for (i=0; i<8; i++) rfluka0[i]=rBox;
1016 rfluka0[0]=0.; rfluka0[7]=0.;
1017
1018 flukaGeom->Comment("3rd part: Shield");
1019 flukaGeom->PolyCone(rfluka1, rfluka2, zfluka, 8, posfluka, "LEAD", "MF", "$SHS");
1020 flukaGeom->Comment("3rd part: Steel envelope");
1021 flukaGeom->PolyCone(rfluka2, rfluka3, zfluka, 8, posfluka, "STEEL", "MF", "$SHS");
1022 flukaGeom->Comment("3rd part: Vacuum");
1023 flukaGeom->PolyCone(rfluka0+1, rfluka1+1, zfluka+1, 6, posfluka, "AIR", "MF", "$SHH");
1024
1025 flukaGeom->Comment("3rd part: Beam Pipe (left)");
1026
1027 rf1[0]=0.; rf2[0]=0.;
1028 rf1[1] = r3V;
dbbe5bc1 1029 rf2[1] = rf1[1]+kDr21*TMath::Tan(kThetaOpenB);
1030 rf1[2] = rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
be4fc320 1031 rf1[5] = par3[4];
dbbe5bc1 1032 rf2[2] = rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS;
1033 rf2[5] = rf1[5]+kDr21;
1034 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac7, kZvac7+kDr21, posfluka, materialsB, fieldsB, cutsB);
be4fc320 1035
1036
1037 flukaGeom->Comment("3rd part: Beam Pipe (right)");
1038
1039 rf1[0] = 0.;
1040 rf1[1] = rf2[1];
dbbe5bc1 1041 rf1[2] = rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
be4fc320 1042 rf1[5] = par3[25];
dbbe5bc1 1043 flukaGeom->OnionCylinder(rf1, 6 , kZvac9-kDr23, kZvac9, posfluka, materialsA, fieldsA, cutsA);
be4fc320 1044
1045//
1046 flukaGeom->Comment("First Bellow");
dbbe5bc1 1047 z1=kZvac7+kDr21;
be4fc320 1048
1049 for (i=0; i<7; i++) {
dbbe5bc1 1050 z2=z1+kEB2;
1051 flukaGeom->Cylinder(0., kRB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1052 flukaGeom->Cylinder(kRB2, kRB2+kHB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
be4fc320 1053
1054 z1=z2;
dbbe5bc1 1055 z2+=kLB2/2.-kEB2;
1056 flukaGeom->Cylinder(0., kRB2+kHB2-kEB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1057 flukaGeom->Cylinder(kRB2+kHB2-kEB2, kRB2+kHB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
be4fc320 1058 z1=z2;
dbbe5bc1 1059 z2=z1+kEB2;
1060 flukaGeom->Cylinder(0., kRB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1061 flukaGeom->Cylinder(kRB2, kRB2+kHB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
be4fc320 1062 z1=z2;
dbbe5bc1 1063 z2+=kLB2/2.-kEB2;
1064 flukaGeom->Cylinder(0., kRB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1065 flukaGeom->Cylinder(kRB2, kRB2+kEB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1066 flukaGeom->Cylinder(kRB2+kEB2, kRB2+kHB2, z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 1067 z1=z2;
1068 }
dbbe5bc1 1069 flukaGeom->Cylinder(kRB2+kHB2, kRB2+kHB2+0.2, kZvac7+kDr21, z1, posfluka, "AIR", "MF", "$SHH");
1070 flukaGeom->Cylinder(kRB2+kHB2+0.2, rBox, kZvac7+kDr21, z1, posfluka, "AIR", "MF", "$SHH");
be4fc320 1071 zcy1=z1;
1072
1073
1074 flukaGeom->Comment("Second Bellow");
dbbe5bc1 1075 z1=kZvac9-kDr23;
be4fc320 1076 for (i=0; i<7; i++) {
dbbe5bc1 1077 z2=z1-kEB2;
1078 flukaGeom->Cylinder(0., kRB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1079 flukaGeom->Cylinder(kRB2, kRB2+kHB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
be4fc320 1080 z1=z2;
dbbe5bc1 1081 z2-=kLB2/2.-kEB2;
1082 flukaGeom->Cylinder(0., kRB2+kHB2-kEB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1083 flukaGeom->Cylinder(kRB2+kHB2-kEB2, kRB2+kHB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
be4fc320 1084 z1=z2;
dbbe5bc1 1085 z2=z1-kEB2;
1086 flukaGeom->Cylinder(0., kRB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1087 flukaGeom->Cylinder(kRB2, kRB2+kHB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
be4fc320 1088 z1=z2;
dbbe5bc1 1089 z2-=kLB2/2.-kEB2;
1090 flukaGeom->Cylinder(0., kRB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
1091 flukaGeom->Cylinder(kRB2, kRB2+kEB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
1092 flukaGeom->Cylinder(kRB2+kEB2, kRB2+kHB2, z2, z1, posfluka, "AIR", "MF", "$SHH");
be4fc320 1093 z1=z2;
1094 }
dbbe5bc1 1095 flukaGeom->Cylinder(kRB2+kHB2, kRB2+kHB2+0.2, z1, kZvac9-kDr23, posfluka, "AIR", "MF", "$SHH");
1096 flukaGeom->Cylinder(kRB2+kHB2+0.2, rBox, z1, kZvac9-kDr23, posfluka, "AIR", "MF", "$SHH");
be4fc320 1097
1098 zcy2=z1;
1099 flukaGeom->Comment("Flange");
1100 zfl=(zcy1+zcy2)/2.;
1101
dbbe5bc1 1102 z1=zfl-kDF2/2.;
1103 z2=zfl+kDF2/2.;
1104 flukaGeom->Cylinder(0.,kRF2-2., z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1105 flukaGeom->Cylinder(kRF2-2., kRF2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
1106 flukaGeom->Cylinder(kRF2, kRF2+0.02 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1107 flukaGeom->Cylinder(kRF2+0.02, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 1108 z2=z1;
dbbe5bc1 1109 z1=z2-kDFlange;
1110 flukaGeom->Cylinder(0.,kRB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1111 flukaGeom->Cylinder(kRB2, kRF2 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1112 flukaGeom->Cylinder(kRF2, kRF2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1113 flukaGeom->Cylinder(kRF2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 1114 z2=z1;
1115 z1=zcy1;
dbbe5bc1 1116 flukaGeom->Cylinder(0.,kRB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1117 flukaGeom->Cylinder(kRB2, kRB2+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1118 flukaGeom->Cylinder(kRB2+0.1, kRB2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1119 flukaGeom->Cylinder(kRB2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
1120
1121 z1=zfl+kDF2/2.;
1122 z2=z1+kDFlange;
1123 flukaGeom->Cylinder(0.,kRB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1124 flukaGeom->Cylinder(kRB2, kRF2 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1125 flukaGeom->Cylinder(kRF2, kRF2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1126 flukaGeom->Cylinder(kRF2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 1127 z1=z2;
1128 z2=zcy2;
dbbe5bc1 1129 flukaGeom->Cylinder(0.,kRB2 , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
1130 flukaGeom->Cylinder(kRB2, kRB2+0.1 , z1, z2, posfluka, "STEEL", "MF", "$SHH");
1131 flukaGeom->Cylinder(kRB2+0.1, kRB2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
1132 flukaGeom->Cylinder(kRB2+0.2, rBox , z1, z2, posfluka, "AIR", "MF", "$SHH");
be4fc320 1133//
1134// end Fluka
1135
1136 for (i=4; i<26; i+=3) par3[i] = 0;
1137
1138 gMC->Gsvolu("YMO3", "PCON", idtmed[kVacuum+40], par3, 27);
1139 gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");
1140
1141//
1142// Steel envelope
1143// tpar[0]=26;
1144// tpar[1]=30;
1145// tpar[2]=dl;
1146// gMC->Gsvolu("YS31", "TUBE", idtmed[kSteel], tpar, 3);
1147// gMC->Gspos("YS31", 1, "YGO3", 0., 0., 0., 0, "ONLY");
1148 dZ+=dl;
1149 gMC->Gspos("YMO3", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
1150 dZ+=dl;
1151
1152//
1153// 3rd section: vacuum system
1154//
1155//
1156// Bellow2
1157//
dbbe5bc1 1158 tpar[0]=kRB2;
1159 tpar[1]=kRB2+kHB2;
1160 tpar[2]=kEB2/2.;
be4fc320 1161 gMC->Gsvolu("YB21", "TUBE", idtmed[kSteel+40], tpar, 3);
1162 dl1=tpar[2];
1163
dbbe5bc1 1164 tpar[0]=kRB2+kHB2-kEB2;
1165 tpar[1]=kRB2+kHB2;
1166 tpar[2]=(kLB2/2.-2.*kEB2)/2.;
be4fc320 1167 gMC->Gsvolu("YB22", "TUBE", idtmed[kSteel+40], tpar, 3);
1168 dl2=tpar[2];
1169
dbbe5bc1 1170 tpar[0]=kRB2-kEB2;
1171 tpar[1]=kRB2;
1172 tpar[2]=kLB2/8.;
be4fc320 1173 gMC->Gsvolu("YB23", "TUBE", idtmed[kSteel+40], tpar, 3);
1174 dl3=tpar[2];
1175
1176
1177 tpar[0]=0;
dbbe5bc1 1178 tpar[1]=kRB2+kHB2;
1179 tpar[2]=kLB2/2.;
be4fc320 1180 gMC->Gsvolu("YBU2", "TUBE", idtmed[kVacuum+40], tpar, 3);
1181
1182 dz=-tpar[2]+dl3;
1183 gMC->Gspos("YB23", 1, "YBU2", 0., 0., dz, 0, "ONLY");
1184 dz+=dl3;
1185 dz+=dl1;
1186 gMC->Gspos("YB21", 1, "YBU2", 0., 0., dz, 0, "ONLY");
1187 dz+=dl1;
1188 dz+=dl2;
1189 gMC->Gspos("YB22", 1, "YBU2", 0., 0., dz, 0, "ONLY");
1190 dz+=dl2;
1191 dz+=dl1;
1192 gMC->Gspos("YB21", 2, "YBU2", 0., 0., dz, 0, "ONLY");
1193 dz+=dl1;
1194 dz+=dl3;
1195 gMC->Gspos("YB23", 2, "YBU2", 0., 0., dz, 0, "ONLY");
1196
1197
1198 tpar[0]=0;
dbbe5bc1 1199 tpar[1]=kRB2+kHB2;
1200 tpar[2]=7.*kLB2/2.;
be4fc320 1201 gMC->Gsvolu("YBM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
dbbe5bc1 1202 dz=-tpar[2]+kLB2/2.;
be4fc320 1203
1204 for (i=0; i<7; i++) {
1205 gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY");
dbbe5bc1 1206 dz+=kLB2;
be4fc320 1207 }
1208
dbbe5bc1 1209 dz=-dl+kDr21+tpar[2];
be4fc320 1210 gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
1211
dbbe5bc1 1212 dz=dl-kDr23-tpar[2];
be4fc320 1213 gMC->Gspos("YBM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1214
1215//
1216// Flange
1217
1218 tpar[0]=0;
dbbe5bc1 1219 tpar[1]=kRF2;
1220 tpar[2]=kDF2/2.;
be4fc320 1221 gMC->Gsvolu("YFM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
1222
dbbe5bc1 1223 tpar[0]=kRF2-2.;
1224 tpar[1]=kRF2;
1225 tpar[2]=kDF2/2.;
be4fc320 1226 gMC->Gsvolu("YF21", "TUBE", idtmed[kSteel+40], tpar, 3);
1227 gMC->Gspos("YF21", 1, "YFM2", 0., 0., 0., 0, "ONLY");
1228
dbbe5bc1 1229 tpar[0]=kRB2;
1230 tpar[1]=kRF2-2.;
1231 tpar[2]=kDFlange/2.;
be4fc320 1232 gMC->Gsvolu("YF22", "TUBE", idtmed[kSteel+40], tpar, 3);
dbbe5bc1 1233 dz=-kDF2/2.+tpar[2];
be4fc320 1234 gMC->Gspos("YF22", 1, "YFM2", 0., 0., dz, 0, "ONLY");
dbbe5bc1 1235 dz= kDF2/2.-tpar[2];
be4fc320 1236 gMC->Gspos("YF22", 2, "YFM2", 0., 0., dz, 0, "ONLY");
1237
dbbe5bc1 1238 dz=kDr21/2.-kDr23/2.;
be4fc320 1239 gMC->Gspos("YFM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1240
1241
1242//
1243// pipe between flange and bellows
dbbe5bc1 1244 tpar[0]=kRB2-dTubeS;
1245 tpar[1]=kRB2;
1246 tpar[2]=2.*(kDB2+kDr22-7.*kLB2)/4.;
be4fc320 1247 gMC->Gsvolu("YPF2", "TUBE", idtmed[kSteel+40], tpar, 3);
dbbe5bc1 1248 dz=kDr21/2.-kDr23/2.-kDF2/2.-tpar[2];
be4fc320 1249 gMC->Gspos("YPF2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
dbbe5bc1 1250 dz=kDr21/2.-kDr23/2.+kDF2/2.+tpar[2];
be4fc320 1251 gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1252
1253 Float_t dHorZ=20.;
1254
1255//
1256// 4th section: rear shield and closing cone
1257//
1258 par4[0] = 0.;
1259 par4[1] = 360.;
1260 par4[2] = 7.;
dbbe5bc1 1261 dl=(kZvac12-kZvac9)/2.;
be4fc320 1262
1263 par4[3] = -dl;
1264 par4[4] = r3;
1265 par4[5] = 30.;
1266
1267 par4[6] = -dl+dHorZ;
1268 par4[7] = r3;
1269 par4[8] = 30.;
1270
dbbe5bc1 1271 par4[9] = -dl+(kZvac10-kZvac9);
1272 par4[10] = r3+(kZvac10-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1273 par4[11] = 30.;
1274
1275 par4[12] = par4[9];
1276 par4[13] = par4[10];
dbbe5bc1 1277 par4[14] = kR42;
be4fc320 1278
dbbe5bc1 1279 par4[15] = -dl+(kZvac11-kZvac9);
1280 par4[16] = r3+(kZvac11-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
1281 par4[17] = kR42;
be4fc320 1282
1283 par4[18] = par4[15];
1284 par4[19] = par4[16];
dbbe5bc1 1285 par4[20] = kR43;
be4fc320 1286
dbbe5bc1 1287 par4[21] = -dl+(kZvac12-kZvac9);
1288 par4[22] = kRVacu+dVacuS;
1289 par4[23] = kR43;
be4fc320 1290
1291 gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 24);
1292
1293
1294 for (i=4; i<23; i+=3) par4[i] = 0;
1295
1296 gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 24);
1297 gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");
1298
1299
1300
1301 dZ+=dl;
1302 gMC->Gspos("YMO4", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
1303 dZ+=dl;
1304//
1305// Concrete replacing Pb
1306//
1307 zCC1 = 1316.;
1308 zCC2 = 1349.;
1309
1310 parCC[ 0] = 0.;
1311 parCC[ 1] = 360.;
1312 parCC[ 2] = 2.;
1313 dlCC=(zCC2-zCC1)/2.;
1314 parCC[ 3] = -dlCC;
dbbe5bc1 1315 parCC[ 4] = r3+(zCC1-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1316 parCC[ 5] = 30.;
1317
1318 parCC[ 6] = dlCC;
dbbe5bc1 1319 parCC[ 7] = r3+(zCC2-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1320 parCC[ 8] = 30.;
1321
1322 gMC->Gsvolu("YCO4", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 1323// gMC->Gspos("YCO4", 1, "YGO4", 0., 0., dl-dlCC-(kZvac12-zCC2), 0, "ONLY");
be4fc320 1324
1325 zCC1 = 1471.;
1326 zCC2 = 1591.;
1327
1328 dlCC=(zCC2-zCC1)/2.;
1329 parCC[ 3] = -dlCC;
dbbe5bc1 1330 parCC[ 4] = r3+(zCC1-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
1331 parCC[ 5] = kR41-kDRSteel2;
be4fc320 1332
1333 parCC[ 6] = dlCC;
dbbe5bc1 1334 parCC[ 7] = r3+(zCC2-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
1335 parCC[ 8] = kR41-kDRSteel2;
be4fc320 1336
1337 gMC->Gsvolu("YCO5", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 1338// gMC->Gspos("YCO5", 1, "YGO4", 0., 0., dl-dlCC-(kZvac12-zCC2), 0, "ONLY");
be4fc320 1339
1340//
1341// Closing concrete cone
1342//
dbbe5bc1 1343 cpar[0]=(kZvac12-kZvac11)/2.;
1344 cpar[1] = r3+(kZvac11-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1345 cpar[2] = cpar[1]+0.001;
dbbe5bc1 1346 cpar[3] = kRVacu+dVacuS;
be4fc320 1347 cpar[4] = cpar[2];
1348 gMC->Gsvolu("YCC4", "CONE", idtmed[kConcrete+40], cpar, 5);
1349 dz=dl-cpar[0];
1350 gMC->Gspos("YCC4", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1351
1352//
1353// begin Fluka
1354
dbbe5bc1 1355 Float_t r10=r3+(kZvac10-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1356 Float_t r11=cpar[1];
1357
1358 flukaGeom->Comment("4th part: Shield");
1359
dbbe5bc1 1360 flukaGeom->Cone(r3, r3, 26.0, 26.0, kZvac9, kZvac9+dHorZ,
be4fc320 1361 posfluka, "LEAD", "NF", "$SHH");
1362
dbbe5bc1 1363 flukaGeom->Cone(r3, r10, 26.0, 26.0, kZvac9+dHorZ, kZvac10,
be4fc320 1364 posfluka, "LEAD", "NF", "$SHH");
dbbe5bc1 1365 flukaGeom->Cone(r10, r11, 30.0, 30.0, kZvac10, kZvac11,
be4fc320 1366 posfluka, "LEAD", "NF", "$SHH");
dbbe5bc1 1367 flukaGeom->Cylinder( cpar[1], 30.0, kZvac11, kZvac12,
be4fc320 1368 posfluka, "LEAD", "NF", "$SHH");
1369
1370
1371 flukaGeom->Comment("4th part: Steel Envelope");
dbbe5bc1 1372 flukaGeom->Cylinder(26.0, 30., kZvac9, kZvac10, posfluka, "STEEL", "NF", "$SHH");
be4fc320 1373 flukaGeom->Comment("4th part: Closing Cone");
dbbe5bc1 1374 flukaGeom->Cone(cpar[1]-0.1, cpar[3], cpar[1], cpar[1], kZvac11, kZvac12,
be4fc320 1375 posfluka, "PORTLAND", "NF", "$SHH");
1376 flukaGeom->Comment("4th part: VACUUM");
dbbe5bc1 1377 flukaGeom->Cone(0., 0., cpar[1]-0.1, cpar[3], kZvac11, kZvac12,
be4fc320 1378 posfluka, "VACUUM", "NF", "$SHH");
1379//
1380// end Fluka
1381//
1382// Steel envelope
1383//
1384 dz=-dl;
1385 tpar[0]=26.;
1386 tpar[1]=30.;
dbbe5bc1 1387 tpar[2]=(kZvac10-kZvac9)/2.;
be4fc320 1388 gMC->Gsvolu("YS41", "TUBE", idtmed[kSteel], tpar, 3);
1389 dz+=tpar[2];
1390// gMC->Gspos("YS41", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1391 dz+=tpar[2];
1392
dbbe5bc1 1393 tpar[0]=kR41-kDRSteel2;
1394 tpar[1]=kR41;
1395 tpar[2]=(kZvac11-kZvac10)/2.;
be4fc320 1396 gMC->Gsvolu("YS43", "TUBE", idtmed[kPb], tpar, 3);
1397 dz+=tpar[2];
1398 gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1399//
1400// rear lead shield
1401//
dbbe5bc1 1402 tpar[0]=kR41;
1403 tpar[1]=kR42;
1404 tpar[2]=(kZvac11-kZvac10)/2.;
be4fc320 1405 gMC->Gsvolu("YPBI", "TUBE", idtmed[kPb+40], tpar, 3);
1406 dz-=0;
1407 gMC->Gspos("YPBI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1408
1409 tpar[2]=(zCC2-zCC1)/2.;
1410 gMC->Gsvolu("YCO6", "TUBE", idtmed[kSteel+40], tpar, 3);
dbbe5bc1 1411// gMC->Gspos("YCO6", 1, "YPBI", 0., 0., -(kZvac11-kZvac10)/2.+tpar[2], 0, "ONLY");
be4fc320 1412
1413
dbbe5bc1 1414 tpar[0]=kR42-5;
1415 tpar[1]=kR42;
1416 tpar[2]=(kZvac11-kZvac10)/2.;
be4fc320 1417 gMC->Gsvolu("YPBO", "TUBE", idtmed[kPb], tpar, 3);
1418 gMC->Gspos("YPBO", 1, "YPBI", 0., 0., 0., 0, "ONLY");
1419
1420 tpar[2]=(zCC2-zCC1)/2.;
1421 gMC->Gsvolu("YCO7", "TUBE", idtmed[kSteel], tpar, 3);
dbbe5bc1 1422// gMC->Gspos("YCO7", 1, "YPBO", 0., 0., -(kZvac11-kZvac10)/2.+tpar[2], 0, "ONLY");
be4fc320 1423
1424//
1425// rear Fe shield
1426//
1427
1428 tpar[0]=31.;
dbbe5bc1 1429 tpar[1]=kR43;
1430 tpar[2]=(kZvac12-kZvac11)/2.;
be4fc320 1431 gMC->Gsvolu("YFEI", "TUBE", idtmed[kFe+40], tpar, 3);
1432 dz=dl-tpar[2];
1433 gMC->Gspos("YFEI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1434
1435 tpar[0]=31.;
dbbe5bc1 1436 tpar[1]=kR43;
be4fc320 1437 tpar[2]=2.5;
1438 gMC->Gsvolu("YFEO", "TUBE", idtmed[kFe], tpar, 3);
dbbe5bc1 1439 dz=-(kZvac12-kZvac11)/2.+tpar[2];
be4fc320 1440 gMC->Gspos("YFEO", 1, "YFEI", 0., 0., dz, 0, "ONLY");
1441//
1442// Magnet element
1443//
1444 tpar[0]=0.;
183fe83b 1445 tpar[1]= 40.;
14b05f13 1446 tpar[2]=85.;
be4fc320 1447 gMC->Gsvolu("YAEM", "TUBE", idtmed[kAir], tpar, 3);
14b05f13 1448 tpar[0]=6.3/2.;
183fe83b 1449 tpar[1]=40.;
14b05f13 1450 tpar[2]=85.;
be4fc320 1451 gMC->Gsvolu("YFEM", "TUBE", idtmed[kFe], tpar, 3);
1452 gMC->Gspos("YFEM", 1, "YAEM", 0., 0., 0., 0, "ONLY");
1453
1454//
1455
14b05f13 1456 dz=1921.6 + tpar[2];
dd6a9ea4 1457 gMC->Gspos("YAEM", 1, "ALIC", 0., 0., - dz, 0, "ONLY");
be4fc320 1458
1459
1460//
1461//
1462// 4th section: vacuum system
1463//
1464// up to closing cone
1465
dbbe5bc1 1466 r3V=r3-kDr23+dVacuS-1.6;
be4fc320 1467
dbbe5bc1 1468 cpar0[0]=(kZvac11-kZvac9)/2;
be4fc320 1469 cpar0[1]=r3V-dVacuS;
1470 cpar0[2]=r3V;
dbbe5bc1 1471 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpen3);
1472 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpen3);
be4fc320 1473 gMC->Gsvolu("YV31", "CONE", idtmed[kSteel+40], cpar0, 5);
1474//
1475// insulation
1476 cpar[0]=cpar0[0];
1477 cpar[1]=cpar0[1]+dTubeS;
dbbe5bc1 1478 cpar[2]=cpar0[1]+dTubeS+kDInsuS;
be4fc320 1479 cpar[3]=cpar0[3]+dTubeS;
dbbe5bc1 1480 cpar[4]=cpar0[3]+dTubeS+kDInsuS;
be4fc320 1481 gMC->Gsvolu("YI31", "CONE", idtmed[kInsulation+40], cpar, 5);
1482 gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY");
1483 dz=-dl+cpar[0];
1484 gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY");
1485
1486//
1487// begin Fluka
1488 flukaGeom->Comment("4th part: Beam pipe lateral structure");
1489 for (i=0; i<7; i++) fieldsA[i] = "NF";
1490
1491 rf1[0]=0.; rf2[0]=0.;
dbbe5bc1 1492 rf1[1]=rf2[1]; rf2[1]=rf1[1]+dHorZ*TMath::Tan(kThetaOpen3);
be4fc320 1493
dbbe5bc1 1494 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
be4fc320 1495 rf1[5]=r3;
1496
dbbe5bc1 1497 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS;
be4fc320 1498 rf2[5]=r3;
1499
dbbe5bc1 1500 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac9 , kZvac9+dHorZ, posfluka, materialsA, fieldsA, cutsA);
be4fc320 1501
1502 rf1[0]=0.; rf2[0]=0.;
1503
dbbe5bc1 1504 rf1[1]=rf2[1]; rf2[1]=rf1[1]+(kZvac10-kZvac9-dHorZ)*TMath::Tan(kThetaOpen3);
be4fc320 1505
dbbe5bc1 1506 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
be4fc320 1507 rf1[5]=r3;
1508
dbbe5bc1 1509 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS;
be4fc320 1510 rf2[5]=r10;
1511
1512
dbbe5bc1 1513 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac9+dHorZ, kZvac10, posfluka, materialsA, fieldsA, cutsA);
be4fc320 1514
1515 rf1[0]=0.; rf2[0]=0.;
dbbe5bc1 1516 rf1[1]=rf2[1]; rf2[1]=rf1[1]+(kZvac11-kZvac10)*TMath::Tan(kThetaOpen3);
be4fc320 1517
dbbe5bc1 1518 rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
be4fc320 1519 rf1[5]=r10;
dbbe5bc1 1520 rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS;
be4fc320 1521 rf2[5]=r11;
1522
dbbe5bc1 1523 flukaGeom->OnionCone(rf1, rf2, 6 , kZvac10, kZvac11, posfluka, materialsA, fieldsA, cutsA);
be4fc320 1524//
1525// end Fluka
1526//
1527// closing cone
dbbe5bc1 1528 cpar0[0]=(kZvac12-kZvac11)/2;
1529 cpar0[1]=r3V-dVacuS+(kZvac11-kZvac9)*TMath::Tan(kThetaOpen3);
1530 cpar0[2]=r3V +(kZvac11-kZvac9)*TMath::Tan(kThetaOpen3);
1531 cpar0[3]=kRVacu;
1532 cpar0[4]=kRVacu+dTubeS+kDInsuS+kDProtS+kDFreeS;
be4fc320 1533 gMC->Gsvolu("YV32", "CONE", idtmed[kSteel+40], cpar0, 5);
1534//
1535// insulation
1536 cpar[0]=cpar0[0];
1537 cpar[1]=cpar0[1]+dTubeS;
dbbe5bc1 1538 cpar[2]=cpar0[1]+dTubeS+kDInsuS;
be4fc320 1539 cpar[3]=cpar0[3]+dTubeS;
dbbe5bc1 1540 cpar[4]=cpar0[3]+dTubeS+kDInsuS;
be4fc320 1541 gMC->Gsvolu("YI32", "CONE", idtmed[kInsulation+40], cpar, 5);
1542 gMC->Gspos("YI32", 1, "YV32", 0., 0., 0., 0, "ONLY");
1543
1544 dz=dl-cpar[0];
1545 gMC->Gspos("YV32", 1, "YMO4", 0., 0., dz, 0, "ONLY");
1546//
1547//
1548// MUON trigger wall
1549//
1550 tpar[0] = 50.;
1551 tpar[1] = 310.;
8e985238 1552 tpar[2] = (kZFilterOut - kZFilterIn) / 2.;
be4fc320 1553 gMC->Gsvolu("YFIM", "TUBE", idtmed[kFe+40], tpar, 3);
dbbe5bc1 1554 dz = (kZFilterIn + kZFilterOut) / 2.;
be4fc320 1555 tpar[2] -= 10.;
1556 gMC->Gsvolu("YFII","TUBE", idtmed[kFe], tpar, 3);
1557 gMC->Gspos("YFII", 1, "YFIM", 0., 0., 0., 0, "ONLY");
dd6a9ea4 1558 gMC->Gspos("YFIM", 1, "ALIC", 0., 0., - dz, 0, "ONLY");
be4fc320 1559//
1560// Shielding close to chamber
1561//
1562//
dbbe5bc1 1563 cpar[0]=(kZch11-kZRear)/2.;
1564 cpar[1]=kR11;
1565 cpar[2]=kZRear*TMath::Tan(kAccMin);
1566 cpar[3]=kR11;
1567 cpar[4]=(kZRear+2.*cpar[0])*TMath::Tan(kAccMin);
be4fc320 1568 gMC->Gsvolu("YCS1", "CONE", idtmed[kNiCuW], cpar, 5);
dbbe5bc1 1569 dz=-(kZvac12-zstart)/2.+(kZRear-zstart)+cpar[0];
be4fc320 1570 gMC->Gspos("YCS1", 1, "YMOT", 0., 0., dz, 0, "ONLY");
1571
dbbe5bc1 1572 cpar[0]=(kZvac4-kZch12)/2.;
1573 cpar[1]=kR11;
1574 cpar[2]=kZch12*TMath::Tan(kAccMin);
1575 cpar[3]=kR11;
1576 cpar[4]=(kZch12+2.*cpar[0])*TMath::Tan(kAccMin);
be4fc320 1577 gMC->Gsvolu("YCS3", "CONE", idtmed[kNiCuW], cpar, 5);
dbbe5bc1 1578 dz=-(kZvac12-zstart)/2.+(kZch12-zstart)+cpar[0];
be4fc320 1579 gMC->Gspos("YCS3", 1, "YMOT", 0., 0., dz, 0, "ONLY");
1580
1581
1582// Recess station 1
1583
dbbe5bc1 1584 cpar[0]=(kZch12-kZch11)/2.;
1585 cpar[1]=kR11;
be4fc320 1586 cpar[2]=18.;
dbbe5bc1 1587 cpar[3]=kR11;
be4fc320 1588 cpar[4]=17.9;
1589 gMC->Gsvolu("YCS2", "CONE", idtmed[kAir], cpar, 5);
dbbe5bc1 1590 dz=-(kZvac12-zstart)/2.+(kZch11-zstart)+cpar[0];
be4fc320 1591 gMC->Gspos("YCS2", 1, "YMOT", 0., 0., dz, 0, "ONLY");
1592
1593 Float_t ptubs[5];
dbbe5bc1 1594 ptubs[0] = kR11;
be4fc320 1595 ptubs[1] = 17.9;
1596 ptubs[2] = 0.;
1597// phi_min, phi_max
1598 ptubs[3] = 0.;
1599 ptubs[4] = 90.;
1600 gMC->Gsvolu("YCR0", "TUBS", idtmed[kNiCuW], ptubs, 0);
dd6a9ea4 1601
be4fc320 1602 AliMatrix(idrotm[1701],90., 0., 90., 90., 0., 0.);
1603 AliMatrix(idrotm[1702],90., 90., 90., 180., 0., 0.);
1604 AliMatrix(idrotm[1703],90., 180., 90., 270., 0., 0.);
1605 AliMatrix(idrotm[1704],90., 270., 90., 0., 0., 0.);
1606 // Int_t ipos;
1607
1608 dz=-cpar[0];
1609// 1.
1610 ptubs[2]=6.5/2.;
1611 dz+=ptubs[2];
1612 gMC->Gsposp("YCR0", 1, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1613 gMC->Gsposp("YCR0", 2, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1614 dz+=ptubs[2];
1615 dz+=1.5;
1616// 2.
1617 ptubs[2]=5.0/2.;
1618 dz+=ptubs[2];
1619 gMC->Gsposp("YCR0", 3, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1620 gMC->Gsposp("YCR0", 4, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1621 dz+=ptubs[2];
1622 dz+=1.5;
1623// 3.
1624 ptubs[2]=5.0/2.;
1625 dz+=ptubs[2];
1626 gMC->Gsposp("YCR0", 5, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1627 gMC->Gsposp("YCR0", 6, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1628 dz+=ptubs[2];
1629 dz+=1.5;
1630// 4.
1631 ptubs[2]=6.5/2.;
1632 dz+=ptubs[2];
1633 gMC->Gsposp("YCR0", 7, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1634 gMC->Gsposp("YCR0", 8, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1635 dz+=ptubs[2];
1636 dz+=1.5;
1637
1638
1639
dbbe5bc1 1640 cpar[0]=(kZch21-kZvac4)/2.;
1641 cpar[1]=kR21;
1642 cpar[2]=kZvac4*TMath::Tan(kAccMin);
1643 cpar[3]=kR21;
1644 cpar[4]=(kZvac4+2.*cpar[0])*TMath::Tan(kAccMin);
be4fc320 1645 gMC->Gsvolu("YCS4", "CONE", idtmed[kNiCuW], cpar, 5);
dbbe5bc1 1646 dz=-(kZvac12-zstart)/2.+(kZvac4-zstart)+cpar[0];
be4fc320 1647 gMC->Gspos("YCS4", 1, "YMOT", 0., 0., dz, 0, "ONLY");
1648
dbbe5bc1 1649 cpar[0]=(kZvac6-kZch22)/2.;
1650 cpar[1]=kR21;
1651 cpar[2]=kZch22*TMath::Tan(kAccMin);
1652 cpar[3]=kR21;
1653 cpar[4]=(kZch22+2.*cpar[0])*TMath::Tan(kAccMin);
be4fc320 1654 gMC->Gsvolu("YCS6", "CONE", idtmed[kNiCuW], cpar, 5);
dbbe5bc1 1655 dz=-(kZvac12-zstart)/2.+(kZch22-zstart)+cpar[0];
be4fc320 1656 gMC->Gspos("YCS6", 1, "YMOT", 0., 0., dz, 0, "ONLY");
1657
1658// Recess station 2
1659
dbbe5bc1 1660 cpar[0]=(kZch22-kZch21)/2.;
1661 cpar[1]=kR21;
be4fc320 1662 cpar[2]=23.;
dbbe5bc1 1663 cpar[3]=kR21;
be4fc320 1664 cpar[4]=23.;
1665 gMC->Gsvolu("YCS5", "CONE", idtmed[kAir], cpar, 5);
dbbe5bc1 1666 dz=-(kZvac12-zstart)/2.+(kZch21-zstart)+cpar[0];
be4fc320 1667 gMC->Gspos("YCS5", 1, "YMOT", 0., 0., dz, 0, "ONLY");
1668
dbbe5bc1 1669 ptubs[0] = kR21;
be4fc320 1670 ptubs[1] = 23;
1671 ptubs[2] = 0.;
1672 ptubs[3] = 0.;
1673 ptubs[4] = 90.;
1674 gMC->Gsvolu("YCR1", "TUBS", idtmed[kNiCuW], ptubs, 0);
1675
1676 dz=-cpar[0];
1677// 1.
1678 ptubs[2]=7.5/2.;
1679 dz+=ptubs[2];
1680 gMC->Gsposp("YCR1", 1, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1681 gMC->Gsposp("YCR1", 2, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1682 dz+=ptubs[2];
1683 dz+=1.5;
1684// 2.
1685 ptubs[2]=6.0/2.;
1686 dz+=ptubs[2];
1687 gMC->Gsposp("YCR1", 3, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1688 gMC->Gsposp("YCR1", 4, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1689 dz+=ptubs[2];
1690 dz+=1.5;
1691// 3.
1692 ptubs[2]=6.0/2.;
1693 dz+=ptubs[2];
1694 gMC->Gsposp("YCR1", 5, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
1695 gMC->Gsposp("YCR1", 6, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
1696 dz+=ptubs[2];
1697 dz+=1.5;
1698// 4.
1699 ptubs[2]=7.5/2.;
1700 dz+=ptubs[2];
1701 gMC->Gsposp("YCR1", 7, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
1702 gMC->Gsposp("YCR1", 8, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
1703 dz+=ptubs[2];
1704 dz+=1.5;
1705
1706
1707//
1708// begin Fluka
1709/*
1710 flukaGeom->Cone(R11, R11, -1., -1.,
dbbe5bc1 1711 kZRear, kZch11, posfluka,"NIW", "MF", "$SHS");
be4fc320 1712
1713 flukaGeom->Cone(R11, R11, -1., -1.,
dbbe5bc1 1714 kZch11, kZch12, posfluka,"AIR", "MF", "$SHS");
be4fc320 1715
1716 flukaGeom->Cone(R11, R11, -1., -1.,
dbbe5bc1 1717 kZch12, kZvac4, posfluka,"NIW", "MF", "$SHS");
be4fc320 1718
dbbe5bc1 1719 flukaGeom->Cone(kR21, kR21, -1., -1.,
1720 kZvac4, kZch21, posfluka,"NIW", "MF", "$SHS");
1721 flukaGeom->Cone(kR21, kR21, -1., -1.,
1722 kZch21, kZch22, posfluka,"AIR", "MF", "$SHS");
1723 flukaGeom->Cone(kR21, kR21, -1., -1.,
1724 kZch22, kZvac6, posfluka,"NIW", "MF", "$SHS");
be4fc320 1725
1726*/
9a4f9621 1727 flukaGeom->Finish(!fWriteGeometry);
be4fc320 1728
1729//
1730// end Fluka
1731//
1732// Outer Pb Cone
1733
1734 if (fPbCone) {
dbbe5bc1 1735 dl = (kZvac10-kZch32)/2.;
1736 dz = dl+kZch32;
be4fc320 1737
1738 par0[0] = 0.;
1739 par0[1] = 360.;
1740 par0[2] = 10.;
1741
1742 par0[ 3] = -dl;
1743 par0[ 4] = 30.;
dbbe5bc1 1744 par0[ 5] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1745
1746// 4th station
dbbe5bc1 1747 par0[ 6] = -dz + kZch41;
be4fc320 1748 par0[ 7] = 30.;
dbbe5bc1 1749 par0[ 8] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1750
dbbe5bc1 1751 par0[ 9] = -dz + kZch41;
be4fc320 1752 par0[10] = 30.;
1753 par0[11] = 37.5;
1754 // recess erice2000
dbbe5bc1 1755 par0[12] = -dz + kZch42;
be4fc320 1756 par0[13] = 30.;
1757 par0[14] = par0[11];
1758
dbbe5bc1 1759 par0[15] = -dz + kZch42;
be4fc320 1760 par0[16] = 30.;
dbbe5bc1 1761 par0[17] = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1762
1763// 5th station
dbbe5bc1 1764 par0[18] = -dz + kZch51;
be4fc320 1765 par0[19] = 30.;
dbbe5bc1 1766 par0[20] = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1767
dbbe5bc1 1768 par0[21] = -dz + kZch51;
be4fc320 1769 par0[22] = 30.;
1770 par0[23] = 37.5; // recess erice2000
1771
dbbe5bc1 1772 par0[24] = -dz + kZch52;
be4fc320 1773 par0[25] = 30.;
1774 par0[26] = par0[23];
1775
dbbe5bc1 1776 par0[27] = -dz + kZch52;
be4fc320 1777 par0[28] = 30.;
a83e7079 1778 par0[29] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1779// end of cone
1780 par0[30] = +dl;
1781 par0[31] = 30.;
1782 par0[32] = par0[29];
1783//
1784 gMC->Gsvolu("YOPB", "PCON", idtmed[kPb], par0, 33);
dbbe5bc1 1785 Float_t dzs = -(kZvac12-zstart)/2. + (kZch32-zstart) + dl;
be4fc320 1786 gMC->Gspos("YOPB", 1, "YMOT", 0., 0., dzs, 0, "ONLY");
1787
1788//
1789// Steel envelope
1790//
1791 par0[ 0] = 0.;
1792 par0[ 1] = 360.;
d5806350 1793 par0[ 2] = 11.;
be4fc320 1794
1795 par0[ 3] = -dl;
dbbe5bc1 1796 par0[ 5] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1797 par0[ 4] = par0[ 5] - 4.;
d5806350 1798
be4fc320 1799// 4th station
d5806350 1800
dbbe5bc1 1801 par0[ 6] = -dz + kZch41 - 4.;
1802 par0[ 8] = 30.+(kZch41-4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1803 par0[ 7] = par0[ 8] -4.;
1804
dbbe5bc1 1805 par0[ 9] = -dz + kZch41 - 4.;
be4fc320 1806 par0[11] = par0[8];
1807 par0[10] = 33.5;
1808
dbbe5bc1 1809 par0[12] = -dz + kZch41;
1810 par0[14] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1811 par0[13] = 33.5;
1812
dbbe5bc1 1813 par0[15] = -dz + kZch41;
be4fc320 1814 par0[17] = 37.5;
1815 par0[16] = 33.5;
d5806350 1816
1817// 5th station
1818
1819 par0[18] = -dz + kZch51;
be4fc320 1820 par0[20] = 37.5;
1821 par0[19] = 33.5;
1822
d5806350 1823 par0[21] = -dz + kZch52;
1824 par0[23] = 37.5;
be4fc320 1825 par0[22] = 33.5;
1826
d5806350 1827 par0[24] = -dz + kZch52;
1828 par0[26] = 30.+(kZch52-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1829 par0[25] = 33.5;
1830
d5806350 1831 par0[27] = -dz + kZch52 + 4.;
1832 par0[29] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
1833 par0[28] = 33.5;
be4fc320 1834
d5806350 1835 par0[30] = -dz + kZch52 + 4.;
1836 par0[32] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1837 par0[31] = par0[32] - 4.;
be4fc320 1838
d5806350 1839 par0[33] = +dl;
1840 par0[35] = par0[32];
1841 par0[34] = par0[31];
be4fc320 1842
d5806350 1843 gMC->Gsvolu("YOSE", "PCON", idtmed[kSteel], par0, 36);
be4fc320 1844 gMC->Gspos ("YOSE", 1, "YOPB", 0., 0., 0., 0, "ONLY");
1845//
1846// Concrete replacing lead
1847//
1848 zCC1 = 1066.;
1849 zCC2 = 1188.;
1850 dlCC=(zCC2-zCC1)/2.;
1851 parCC[ 3] = -dlCC;
1852 parCC[ 4] = 30.;
dbbe5bc1 1853 parCC[ 5] = 30.+(zCC1-kZConeE)*TMath::Tan(kThetaOpenPbO)-4.;
be4fc320 1854
1855 parCC[ 6] = dlCC;
1856 parCC[ 7] = 30.;
dbbe5bc1 1857 parCC[ 8] = 30.+(zCC2-kZConeE)*TMath::Tan(kThetaOpenPbO)-4.;
be4fc320 1858 gMC->Gsvolu("YOC1", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 1859// gMC->Gspos("YOC1", 1, "YOPB", 0., 0., dl-dlCC-(kZvac10-zCC2), 0, "ONLY");
be4fc320 1860
1861 zCC1 = 1316.;
1862 zCC2 = 1349.;
1863 dlCC=(zCC2-zCC1)/2.;
1864 parCC[ 3] = -dlCC;
1865 parCC[ 4] = 30.;
dbbe5bc1 1866 parCC[ 5] = 30.+(zCC1-kZConeE)*TMath::Tan(kThetaOpenPbO)-4.;
be4fc320 1867
1868 parCC[ 6] = dlCC;
1869 parCC[ 7] = 30.;
dbbe5bc1 1870 parCC[ 8] = 30.+(zCC2-kZConeE)*TMath::Tan(kThetaOpenPbO)-4.;
be4fc320 1871 gMC->Gsvolu("YOC2", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 1872// gMC->Gspos("YOC2", 1, "YOPB", 0., 0., dl-dlCC-(kZvac10-zCC2), 0, "ONLY");
be4fc320 1873 }
1874}
1875
1876void AliSHILv2::Init()
1877{
1878 //
1879 // Initialise the muon shield after it has been built
1880 //
1881 Int_t i;
1882 //
1883 if(fDebug) {
1884 printf("\n%s: ",ClassName());
1885 for(i=0;i<35;i++) printf("*");
1886 printf(" SHILv2_INIT ");
1887 for(i=0;i<35;i++) printf("*");
1888 printf("\n%s: ",ClassName());
1889 //
1890 // Here the SHIL initialisation code (if any!)
1891 for(i=0;i<80;i++) printf("*");
1892 printf("\n");
1893 }
1894}