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