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