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