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