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