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