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