YOUT2 corrected.
[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
eeacf08b 16/* $Id$ */
be4fc320 17
eeacf08b 18//-------------------------------------------------------------------------
19// MUON shielding class
20// Default version
21// Author: A.Morsch
22//-------------------------------------------------------------------------
be4fc320 23
5d12ce38 24#include <TVirtualMC.h>
25#include <TArrayI.h>
3b97cdce 26#include <TGeoVolume.h>
27#include <TGeoTube.h>
28#include <TGeoManager.h>
29#include <TGeoMatrix.h>
30#include <TGeoCompositeShape.h>
31#include <TGeoBBox.h>
32#include <TGeoPgon.h>
33#include <TGeoTorus.h>
5d12ce38 34
be4fc320 35#include "AliSHILv2.h"
be4fc320 36#include "AliConst.h"
4951e003 37#include "AliLog.h"
be4fc320 38
39ClassImp(AliSHILv2)
40
41//_____________________________________________________________________________
42AliSHILv2::AliSHILv2()
43{
44 //
45 // Default constructor for muon shield
46 //
47}
48
49//_____________________________________________________________________________
50AliSHILv2::AliSHILv2(const char *name, const char *title)
51 : AliSHIL(name,title)
52{
53 //
54 // Standard constructor for muon shield
55 //
56 SetMarkerColor(7);
57 SetMarkerStyle(2);
58 SetMarkerSize(0.4);
59 // Pb cone not yet compatible with muon chamber inner radii
60 // Switched off by default
61 SetWriteGeometry();
62 SetPbCone();
63}
64
65//_____________________________________________________________________________
66void AliSHILv2::CreateGeometry()
67{
68 //
69 // Build muon shield geometry
70 //
71 //
72 //Begin_Html
73 /*
74 <img src="picts/AliSHILv2.gif">
75 */
76 //End_Html
77 //Begin_Html
78 /*
79 <img src="picts/AliSHILv2Tree.gif">
80 */
81 //End_Html
82
83 Float_t cpar[5], cpar0[5], tpar[3], par1[100], pars1[100], par2[100], par3[100],
b21c95fc 84 par4[24], par0[100];
be4fc320 85 Float_t dz, dZ;
86
87 Int_t *idtmed = fIdtmed->GetArray()-1699;
dd6a9ea4 88
89 Int_t idrotm[1799];
90
be4fc320 91#include "ABSOSHILConst.h"
92#include "SHILConst2.h"
93
94 enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
95 kNiCuW=1720, kVacuum=1715, kAir=1714, kConcrete=1716,
35a1fda7 96 kPolyCH2=1717, kSteel=1718, kInsulation=1713, kAirMuon = 1774};
3b97cdce 97 Int_t i;
98
be4fc320 99//
100// Material of the rear part of the shield
3b97cdce 101 Int_t iHeavy = kNiCuW;
be4fc320 102 if (fPbCone) iHeavy=kPb;
be4fc320 103//
104// Mother volume
105//
dbbe5bc1 106 Float_t dRear1=kDRear;
be4fc320 107
dbbe5bc1 108 Float_t zstart=kZRear-dRear1;
be4fc320 109
110 par0[0] = 0.;
111 par0[1] = 360.;
112 par0[2] = 28.;
113
dbbe5bc1 114 Float_t dl=(kZvac12-zstart)/2.;
3b97cdce 115 const Float_t kzLength = dl;
116
be4fc320 117 dz=zstart+dl;
118//
119// start
120 par0[3] = -dl;
121 par0[4] = 0.;
dbbe5bc1 122 par0[5] = zstart * TMath::Tan(kAccMin);
be4fc320 123// recess station 1
3b97cdce 124 par0[6] = -dl - zstart + kZch11;
be4fc320 125 par0[7] = 0.;
3b97cdce 126 par0[8] = 18.2;
be4fc320 127
128 par0[9] = par0[6];
129 par0[10] = 0.;
bf026144 130 par0[11] = kR11;
be4fc320 131
3b97cdce 132 par0[12] = -dl - zstart + kZch12;
be4fc320 133 par0[13] = 0.;
bf026144 134 par0[14] = kR11;
be4fc320 135
136 par0[15] = par0[12];
137 par0[16] = 0.;
3b97cdce 138 par0[17] = 19.5;
be4fc320 139// recess station 2
dbbe5bc1 140 par0[18] = -dz+kZch21;
be4fc320 141 par0[19] = 0.;
dbbe5bc1 142 par0[20] = kZch21 * TMath::Tan(kAccMin);
be4fc320 143
dbbe5bc1 144 par0[21] = -dz+kZch21;
be4fc320 145 par0[22] = 0.;
3b97cdce 146 par0[23] = kR21;
be4fc320 147
dbbe5bc1 148 par0[24] = -dz+kZch22;
be4fc320 149 par0[25] = 0.;
3b97cdce 150 par0[26] = kR21;
be4fc320 151
dbbe5bc1 152 par0[27] = -dz+kZch22;
be4fc320 153 par0[28] = 0.;
dbbe5bc1 154 par0[29] = kZch22 * TMath::Tan(kAccMin);
be4fc320 155//
dbbe5bc1 156 par0[30] = -dz+kZvac6;
be4fc320 157 par0[31] = 0.;
dbbe5bc1 158 par0[32] = kZvac6 * TMath::Tan(kAccMin);
be4fc320 159// end of 2 deg cone
dbbe5bc1 160 par0[33] = -dz+kZConeE;
be4fc320 161 par0[34] = 0.;
162 par0[35] = 30.;
163
dbbe5bc1 164 par0[36] = -dz+kZch31;
be4fc320 165 par0[37] = 0.;
166 par0[38] = 30.;
167
dbbe5bc1 168 par0[39] = -dz+kZch31;
be4fc320 169 par0[40] = 0.;
3b97cdce 170 par0[41] = 28.8;
be4fc320 171
dbbe5bc1 172 par0[42] = -dz+kZch32;
be4fc320 173 par0[43] = 0.;
3b97cdce 174 par0[44] = 28.8;
be4fc320 175// start of 1.6 deg cone
dbbe5bc1 176 par0[45] = -dz+kZch32;
be4fc320 177 par0[46] = 0.;
dbbe5bc1 178 par0[47] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 179// recess station 4
dbbe5bc1 180 par0[48] = -dz+kZch41;
be4fc320 181 par0[49] = 0.;
dbbe5bc1 182 par0[50] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 183
dbbe5bc1 184 par0[51] = -dz+kZch41;
be4fc320 185 par0[52] = 0.;
3b97cdce 186 par0[53] = 36.9;
be4fc320 187
dbbe5bc1 188 par0[54] = -dz+kZch42;
be4fc320 189 par0[55] = 0.;
3b97cdce 190 par0[56] = 36.9;
be4fc320 191
dbbe5bc1 192 par0[57] = -dz+kZch42;
be4fc320 193 par0[58] = 0.;
dbbe5bc1 194 par0[59] = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 195
196// recess station 5
197
dbbe5bc1 198 par0[60] = -dz+kZch51;
be4fc320 199 par0[61] = 0.;
dbbe5bc1 200 par0[62] = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 201
dbbe5bc1 202 par0[63] = -dz+kZch51;
be4fc320 203 par0[64] = 0.;
3b97cdce 204 par0[65] = 36.9;
be4fc320 205
dbbe5bc1 206 par0[66] = -dz+kZch52;
be4fc320 207 par0[67] = 0.;
3b97cdce 208 par0[68] = 36.9;
be4fc320 209
dbbe5bc1 210 par0[69] = -dz+kZch52;
be4fc320 211 par0[70] = 0.;
65cb363f 212 par0[71] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 213
214// end of cone
215
dbbe5bc1 216 par0[72] = -dz+kZvac10;
be4fc320 217 par0[73] = 0.;
65cb363f 218 par0[74] = par0[71];
be4fc320 219
dbbe5bc1 220 par0[75] = -dz+kZvac10;
be4fc320 221 par0[76] = 0.;
dbbe5bc1 222 par0[77] = kR42;
be4fc320 223
dbbe5bc1 224 par0[78] = -dz+kZvac11;
be4fc320 225 par0[79] = 0.;
dbbe5bc1 226 par0[80] = kR42;
be4fc320 227
dbbe5bc1 228 par0[81] = -dz+kZvac11;
be4fc320 229 par0[82] = 0.;
dbbe5bc1 230 par0[83] = kR43;
be4fc320 231
dbbe5bc1 232 par0[84] = -dz+kZvac12;
be4fc320 233 par0[85] = 0.;
dbbe5bc1 234 par0[86] = kR43;
be4fc320 235
236 gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 87);
237 dz=zstart+dl;
dd6a9ea4 238 AliMatrix(idrotm[1705], 270., 0., 90., 90., 180., 0.);
be4fc320 239
240 dZ=-dl;
241
35a1fda7 242//
df456ba9 243// Dimuon arm mother volumes (YOUT1, YOUT2)
35a1fda7 244//
245
246 // Dipole parameters
247 Float_t z01 = -724.45;
248 // Float_t z02 = -814.30;
249 Float_t z05 = -1235.55;
250
251// Before dipole
252//
253
254 Float_t zpos = -zstart - kzLength;
255 Float_t shift_after_absorber = 35;
256 Float_t delta = 1e-06;
257 Float_t rst1 = 120;
258 Float_t rst2 = 150;
259 Float_t rst3 = 252;
260 Float_t rst4 = 252;
261 Float_t rst5 = 304;
262 //Float_t rst6 = 430.;
263 Float_t rst7 = 460.;
264
265 // Float_t zstart2 = zpos + zstart;
266
267 par0[0] = 0.;
268 par0[1] = 360.;
269 par0[2] = 11.;
270
271//
272// start
273 // par0[3] = zpos - ( -dl );
274 // start only after absorber
275 // z = -503.00
276 par0[3] = zpos - ( -dl + shift_after_absorber ) + delta;
277 par0[4] = ( zstart + shift_after_absorber ) * TMath::Tan(kAccMin) + delta;
278 par0[5] = rst1;
279
280// recess station 1
281 // z = -517.70
282 par0[6] = zpos - ( -dl - zstart + kZch11 + delta );
283 par0[7] = 18.2 + delta;
284 par0[8] = rst1;
285
286 // z = -517.70
287 par0[9] = par0[6];
288 par0[10] = kR11 + delta;
289 par0[11] = rst1;
290
291 // z = -553.70
292 par0[12] = zpos - ( -dl - zstart + kZch12 - delta );
293 par0[13] = kR11 + delta;
294 par0[14] = rst1;
295
296 // z = -553.70
297 par0[15] = par0[12];
298 par0[16] = 19.5 + delta;
299 par0[17] = rst1;
300
301// recess station 2
302 // z = -661.30
303 par0[18] = zpos - ( -dz+kZch21 + delta );
304 par0[19] = kZch21 * TMath::Tan(kAccMin) + delta;
305 par0[20] = rst2;
306
307 // z = -661.30
308 par0[21] = par0[18];
309 par0[22] = kR21 + delta;
310 par0[23] = rst2;
311
312 // z = -709.90
313 par0[24] = zpos - ( -dz+kZch22 - delta );
314 par0[25] = kR21 + delta;
315 par0[26] = rst2;
316
317 // z = -709.90
318 par0[27] = par0[24];
319 par0[28] = kZch22 * TMath::Tan(kAccMin) + delta;
320 par0[29] = rst2;
321//
322 // z = -711.00
323 par0[30] = zpos - ( -dz+kZvac6 );
324 par0[31] = kZvac6 * TMath::Tan(kAccMin) + delta;
325 par0[32] = rst2;
326
327 Float_t nextZ = zpos - ( -dz+kZConeE );
328 Float_t nextRin = 30. + delta;
329 Float_t nextRout = rst3;
330 Float_t tgin = ( nextRin - par0[31]) / (nextZ - par0[30]);
331 Float_t tgout = ( nextRout - par0[32])/ (nextZ - par0[30]);
332
333 // z = -724.45
334 par0[33] = z01;
335 par0[34] = par0[31] + (z01 - par0[30]) * tgin;
336 par0[35] = par0[32] + (z01 - par0[30]) * tgout;
337
338 gMC->Gsvolu("YOUT1", "PCON", idtmed[kAirMuon], par0, 36);
339 gMC->Gspos("YOUT1", 1, "ALIC", 0., 0., 0., 0, "ONLY");
340
341
342//
343// After dipole
344//
345
346 par0[0] = 0.;
347 par0[1] = 360.;
348 par0[2] = 14.;
349
350 // z = -1235.55
351 par0[3] = z05;
5c6b2419 352 par0[4] = nextRin - (z05 - nextZ) * TMath::Tan(kThetaOpenPbO) + delta ;
35a1fda7 353 par0[5] = rst4;
5c6b2419 354
35a1fda7 355// recess station 4
356 // z = -1259.90
357 par0[6] = zpos - ( -dz+kZch41 + delta );
358 par0[7] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO) + delta;
359 par0[8] = rst4;
360
361 // z = -1259.90
362 par0[9] = par0[6];
363 par0[10] = 36.9 + delta;
364 par0[11] = rst4;
365
366 // z = -1324.10
367 par0[12] = zpos - ( -dz+kZch42 - delta );
368 par0[13] = 36.9 + delta;
369 par0[14] = rst4;
370
371 // z = -1324.10
372 par0[15] = par0[12];
373 par0[16] = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO) + delta;
374 par0[17] = rst5;
375
376// recess station 5
377
378 // z = -1390.00
379 par0[18] = zpos - ( -dz+kZch51 + delta );
380 par0[19] = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO) + delta;
381 par0[20] = rst5;
382
383 // z = -1390.00
384 par0[21] = par0[18];
385 par0[22] = 36.9 + delta;
386 par0[23] = rst5;
387
388 // z = -1454.20
389 par0[24] = zpos - ( -dz+kZch52 - delta );
390 par0[25] = 36.9 + delta;
391 par0[26] = rst5;
392
393 // z = -1454.20
394 par0[27] = par0[24];
395 par0[28] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO) + delta;
396 par0[29] = rst5;
397
398// end of cone
399
400 // z = -1466.00
401 par0[30] = zpos - ( -dz+kZvac10 - delta );
5c6b2419 402 par0[31] = par0[27];
35a1fda7 403 par0[32] = rst7;
404
405 // z = -1466.00
406 par0[33] = par0[30];
407 par0[34] = kR42 + delta;
408 par0[35] = rst7;
409
410 // z = -1800.00
411 par0[36] = zpos - ( -dz+kZvac11 - delta );
412 par0[37] = kR42 + delta;
413 par0[38] = rst7;
414
415 // z = -1800.00
416 par0[39] = par0[36];
417 par0[40] = kR43 + delta;
418 par0[41] = rst7;
419
420 // z = -1900.00
421 par0[42] = zpos - ( -dz+kZvac12 );
422 par0[43] = kR43 + delta;
423 par0[44] = rst7;
424
df456ba9 425 gMC->Gsvolu("YOUT2", "PCON", idtmed[kAirMuon], par0, 45);
426 gMC->Gspos("YOUT2", 1, "ALIC", 0., 0., 0., 0, "ONLY");
35a1fda7 427
be4fc320 428//
429// First section: bellows below and behind front absorber
430//
431//
432 par1[ 0] = 0.;
433 par1[ 1] = 360.;
3b97cdce 434 par1[ 2] = 15.;
dbbe5bc1 435 dl=(kZvac4-zstart)/2.;
be4fc320 436
437 par1[ 3] = -dl;
dbbe5bc1 438 par1[ 4] = kRAbs+(zstart-kZOpen) * TMath::Tan(kThetaOpen1);
439 par1[ 5] = zstart * TMath::Tan(kAccMin);
be4fc320 440
3b97cdce 441 par1[ 6] = -dl-zstart+kZch11;
442 par1[ 7] = par1[4] + (dRear1 + 19.) * TMath::Tan(kThetaOpen1);
443 par1[ 8] = 18.2;
be4fc320 444
3b97cdce 445 par1[ 9] = par1[6];
be4fc320 446 par1[10] = par1[7];
dbbe5bc1 447 par1[11] = kR11;
be4fc320 448
3b97cdce 449 par1[12] = -dl-zstart+kZch12;
450 par1[13] = par1[10] + 36. * TMath::Tan(kThetaOpen1);
dbbe5bc1 451 par1[14] = kR11;
be4fc320 452
3b97cdce 453 par1[15] = -dl+dRear1 + 50.7;
be4fc320 454 par1[16] = par1[13];
3b97cdce 455 par1[17] = 19.5;
be4fc320 456
dbbe5bc1 457 par1[18] = -dl+kZvac1-zstart;
3b97cdce 458 par1[19] = par1[16] + (par1[18] - par1[15]) * TMath::Tan(kThetaOpen1);
459 par1[20] = (par1[18] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 460
3b97cdce 461 par1[21] = -dl+kZvac1-zstart;
462 par1[22] = kRAbs+ (kZvac1-kZOpen) * TMath::Tan(kThetaOpen1);
463 par1[23] = (par1[21] +dl +zstart) * TMath::Tan(kAccMin);
464
be4fc320 465
3b97cdce 466 par1[24] = par1[21]+kDr11/10.;
467 par1[25] = par1[22]+kDr11;
468 par1[26] = (par1[24] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 469
3b97cdce 470 par1[27] = -dl+(kZvac1+kDr11/10.+kDB1-zstart);
471 par1[28] = par1[25];
472 par1[29] = (par1[27] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 473
3b97cdce 474 par1[30] = par1[27]+kDr12;
475 par1[31] = par1[28]+kDr12;
476 par1[32] = (par1[30] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 477
3b97cdce 478 par1[33] = par1[30]+kDF1;
479 par1[34] = par1[31];
480 par1[35] = (par1[33] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 481
3b97cdce 482 par1[36] = par1[33]+kDr12;
483 par1[37] = par1[34]-kDr12;
484 par1[38] = (par1[36] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 485
3b97cdce 486 par1[39] = par1[36]+kDB1;
487 par1[40] = par1[37];
488 par1[41] = (par1[39] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 489
3b97cdce 490 par1[42] = par1[39]+kDr13;
491 par1[43] = par1[40]-kDr13;
492 par1[44] = (par1[42] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 493
3b97cdce 494 par1[45] = -dl+kZvac4-zstart;
495 par1[46] = par1[43];
496 par1[47] = (par1[45] +dl +zstart) * TMath::Tan(kAccMin);
be4fc320 497
3b97cdce 498 Float_t r2 = par1[46];
499 Float_t rBox= par1[46]-0.1;
be4fc320 500
3b97cdce 501 gMC->Gsvolu("YGO1", "PCON", idtmed[kNiCuW+40], par1, 48);
be4fc320 502
3b97cdce 503 for (i=0; i<48; i++) pars1[i] = par1[i];
504 for (i=4; i<47; i+=3) pars1[i] = 0.;
be4fc320 505
3b97cdce 506 gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], pars1, 48);
be4fc320 507 gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");
508 dZ+=dl;
509 gMC->Gspos("YMO1", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
510 dZ+=dl;
511
512
dbbe5bc1 513 tpar[0]=kR21-0.6;
514 tpar[1]=kR21;
515 tpar[2]=(kZvac4-kZvac41)/2.;
be4fc320 516 gMC->Gsvolu("YSE1", "TUBE", idtmed[kSteel], tpar, 3);
517 dz=dl-tpar[2];
518 gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
519
520
dbbe5bc1 521 tpar[0]=kR11-0.6;
522 tpar[1]=kR11;
523 tpar[2]=(kZvac41-zstart-dRear1)/2.;
be4fc320 524 gMC->Gsvolu("YSE2", "TUBE", idtmed[kSteel], tpar, 3);
dbbe5bc1 525 dz=dl-tpar[2]-(kZvac4-kZvac41);
be4fc320 526 gMC->Gspos("YSE2", 1, "YGO1", 0., 0., dz, 0, "ONLY");
527
be4fc320 528//
529// 1st section: vacuum system
530//
531//
532// Bellow 1
533//
dbbe5bc1 534 tpar[0]=kRB1;
535 tpar[1]=kRB1+kHB1;
536 tpar[2]=kEB1/2.;
be4fc320 537 gMC->Gsvolu("YB11", "TUBE", idtmed[kSteel+40], tpar, 3);
538 Float_t dl1=tpar[2];
539
dbbe5bc1 540 tpar[0]=kRB1+kHB1-kEB1;
541 tpar[1]=kRB1+kHB1;
542 tpar[2]=(kLB1/2.-2.*kEB1)/2.;
be4fc320 543 gMC->Gsvolu("YB12", "TUBE", idtmed[kSteel+40], tpar, 3);
544 Float_t dl2=tpar[2];
545
dbbe5bc1 546 tpar[0]=kRB1-kEB1;
547 tpar[1]=kRB1;
548 tpar[2]=kLB1/8.;
be4fc320 549 gMC->Gsvolu("YB13", "TUBE", idtmed[kSteel+40], tpar, 3);
550 Float_t dl3=tpar[2];
551
552
553 tpar[0]=0;
dbbe5bc1 554 tpar[1]=kRB1+kHB1;
555 tpar[2]=kLB1/2.;
be4fc320 556 gMC->Gsvolu("YBU1", "TUBE", idtmed[kVacuum+40], tpar, 3);
557
558 dz=-tpar[2]+dl3;
559 gMC->Gspos("YB13", 1, "YBU1", 0., 0., dz, 0, "ONLY");
560 dz+=dl3;
561 dz+=dl1;
562 gMC->Gspos("YB11", 1, "YBU1", 0., 0., dz, 0, "ONLY");
563 dz+=dl1;
564 dz+=dl2;
565 gMC->Gspos("YB12", 1, "YBU1", 0., 0., dz, 0, "ONLY");
566 dz+=dl2;
567 dz+=dl1;
568 gMC->Gspos("YB11", 2, "YBU1", 0., 0., dz, 0, "ONLY");
569 dz+=dl1;
570 dz+=dl3;
571 gMC->Gspos("YB13", 2, "YBU1", 0., 0., dz, 0, "ONLY");
572
573
574 tpar[0]=0;
dbbe5bc1 575 tpar[1]=kRB1+kHB1+0.5;
576 tpar[2]=12.*kLB1/2.;
be4fc320 577 gMC->Gsvolu("YBM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
578 Float_t bsize = tpar[2];
dbbe5bc1 579 tpar[0]=kRB1+kHB1;
be4fc320 580 gMC->Gsvolu("YBI1", "TUBE", idtmed[kInsulation+40], tpar, 3);
581 gMC->Gspos("YBI1", 2, "YBM1", 0., 0., 0., 0, "ONLY");
582
dbbe5bc1 583 dz=-bsize+kLB1/2.;
be4fc320 584
585 for (i=0; i<12; i++) {
586 gMC->Gspos("YBU1", i+1 , "YBM1", 0., 0., dz, 0, "ONLY");
dbbe5bc1 587 dz+=kLB1;
be4fc320 588 }
589
dbbe5bc1 590 dz=-dl+(kZvac1-zstart)+kDr11/10.+bsize;
be4fc320 591 gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
592
be4fc320 593
594
595//
596// Flange
597
598 tpar[0]=0;
dbbe5bc1 599 tpar[1]=kRF1+0.6;
600 tpar[2]=kDF1/2.;
be4fc320 601 gMC->Gsvolu("YFM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
602// Steel
dbbe5bc1 603 tpar[0]=kRB1;
604 tpar[1]=kRF1+0.6;
605 tpar[2]=kDF1/2.;
be4fc320 606 gMC->Gsvolu("YF11", "TUBE", idtmed[kSteel+40], tpar, 3);
607// Insulation
dbbe5bc1 608 tpar[0]=kRF1;
609 tpar[1]=kRF1+0.5;
610 tpar[2]=kDF1/2.;
be4fc320 611 gMC->Gsvolu("YF12", "TUBE", idtmed[kInsulation+40], tpar, 3);
612
613
614 gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY");
615 gMC->Gspos("YF12", 1, "YFM1", 0., 0., 0., 0, "ONLY");
dbbe5bc1 616 dz=-dl+(kZvac3-zstart)-2.*kDr13-tpar[2];
be4fc320 617 gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY");
618
619//
620// pipe between flange and bellows
621//
622// Steel
dbbe5bc1 623 tpar[0] = kRB1-dTubeS;
624 tpar[1] = kRB1+0.6;
625 tpar[2] = (kZvac3-kZvac1-2.*kDr13-kDr11/10.-kDF1-2.*bsize)/2.;
be4fc320 626 gMC->Gsvolu("YPF1", "TUBE", idtmed[kSteel+40], tpar, 3);
627// Insulation
dbbe5bc1 628 tpar[0]=kRB1;
629 tpar[1]=kRB1+0.5;
be4fc320 630 gMC->Gsvolu("YPS1", "TUBE", idtmed[kInsulation+40], tpar, 3);
631 gMC->Gspos("YPS1", 1, "YPF1", 0., 0., 0., 0, "ONLY");
dbbe5bc1 632 dz=-dl+(kZvac1-zstart)+kDr11/10.+2.*bsize+tpar[2];
be4fc320 633 gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY");
be4fc320 634
be4fc320 635
636// Pipe+Heating 1.5 mm
637// Heating Jacket 5.0 mm
638// Protection 1.0 mm
639// ========================
640// 7.5 mm
641// pipe and heating jackets outside bellows
642//
643// left side
dbbe5bc1 644 cpar0[0]=(kZvac1+kDr11/10.-zstart)/2;
645 cpar0[1]=kRVacu-0.05 +(zstart-kZOpen)*TMath::Tan(kThetaOpen1);
646 cpar0[2]=kRVacu+0.7 +(zstart-kZOpen)*TMath::Tan(kThetaOpen1);
647 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpen1);
648 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpen1);
be4fc320 649 gMC->Gsvolu("YV11", "CONE", idtmed[kSteel+40], cpar0, 5);
650//
651// insulation
652 dTubeS=0.15;
653 cpar[0]=cpar0[0];
654 cpar[1]=cpar0[1]+0.15;
655 cpar[2]=cpar0[1]+0.65;
656 cpar[3]=cpar0[3]+0.15;
657 cpar[4]=cpar0[3]+0.65;
658 gMC->Gsvolu("YI11", "CONE", idtmed[kInsulation+40], cpar, 5);
659 gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY");
660 dz=-dl+cpar0[0];
661 gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY");
662
be4fc320 663// right side
664 dTubeS = 0.35;
665 dVacuS += 0.25;
666
dbbe5bc1 667 cpar0[0] = (kZvac4-kZvac3+2.*kDr13)/2;
668 cpar0[1] = kRB1;
be4fc320 669 cpar0[2] = cpar0[1]+dVacuS;
dbbe5bc1 670 cpar0[3] = cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
671 cpar0[4] = cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
be4fc320 672 gMC->Gsvolu("YV12", "CONE", idtmed[kSteel], cpar0, 5);
673 Float_t r2V=cpar0[3];
674//
675// insulation
676 cpar[0] = cpar0[0];
677 cpar[1] = cpar0[1]+dTubeS;
dbbe5bc1 678 cpar[2] = cpar0[1]+dTubeS+kDInsuS;
be4fc320 679 cpar[3] = cpar0[3]+dTubeS;
dbbe5bc1 680 cpar[4] = cpar0[3]+dTubeS+kDInsuS;
be4fc320 681 gMC->Gsvolu("YI12", "CONE", idtmed[kInsulation], cpar, 5);
682 gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY");
683
684 dz=dl-cpar0[0];
685 gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY");
686
be4fc320 687
688//
689// Second Section
690// Between first and second bellow section
691//
692
693 par2[0] = 0.;
694 par2[1] = 360.;
695 par2[2] = 11.;
dbbe5bc1 696 dl=(kZvac7-kZvac4)/2.;
be4fc320 697// recess station 2
698 par2[3] = -dl;
699 par2[4] = r2;
dbbe5bc1 700 par2[5] = kR21;
be4fc320 701
702 par2[6] = -dl+.1;
703 par2[7] = r2;
dbbe5bc1 704 par2[8] = kR21;
be4fc320 705
dbbe5bc1 706 par2[9] = -dl+(kZvac6-kZvac4);
707 par2[10] = r2+(kZvac6-kZvac4-10.) * TMath::Tan(kThetaOpen2);
708 par2[11] = kR21;
be4fc320 709
dbbe5bc1 710 par2[12] = -dl+(kZvac6-kZvac4);
be4fc320 711 par2[13] = par2[10];
dbbe5bc1 712 par2[14] = kZvac6*TMath::Tan(kAccMin);
be4fc320 713
714// Start of Pb section
dbbe5bc1 715 par2[15] = -dl+(kZPb-kZvac4);
716 par2[16] = r2+(kZPb-kZvac4-10.) * TMath::Tan(kThetaOpen2);
717 par2[17] = kZPb*TMath::Tan(kAccMin);
be4fc320 718//
719// end of cone following 2 deg line
dbbe5bc1 720 par2[18] = -dl+(kZConeE-kZvac4);
721 par2[19] = r2+(kZConeE-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 722 par2[20] = 30.;
723// recess station 3
dbbe5bc1 724 par2[21] = -dl+(kZch31-kZvac4);
725 par2[22] = r2+(kZch31-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 726 par2[23] = 30.;
727
dbbe5bc1 728 par2[24] = -dl+(kZch31-kZvac4);
729 par2[25] = r2+(kZch31-kZvac4-10.) * TMath::Tan(kThetaOpen2);
3b97cdce 730 par2[26] = 28.8;
be4fc320 731
dbbe5bc1 732 par2[27] = -dl+(kZch32-kZvac4);
733 par2[28] = r2+(kZch32-kZvac4-10.) * TMath::Tan(kThetaOpen2);
3b97cdce 734 par2[29] = 28.8;
be4fc320 735
dbbe5bc1 736 par2[30] = -dl+(kZch32-kZvac4);
737 par2[31] = r2+(kZch32-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 738 par2[32] = 30.;
739
dbbe5bc1 740 par2[33] = -dl+(kZvac7-kZvac4);
741 par2[34] = r2+(kZvac7-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 742 par2[35] = 30.;
743
744 gMC->Gsvolu("YGO2", "PCON", idtmed[kSteel+40], par2, 36);
745
be4fc320 746//
747// Lead cone
748//
749 Float_t parPb[18];
750 parPb[ 0] = 0.;
751 parPb[ 1] = 360.;
752 parPb[ 2] = 5.;
dbbe5bc1 753 Float_t dlPb=(kZvac7-kZPb)/2.;
be4fc320 754
755 parPb[ 3] = -dlPb;
dbbe5bc1 756 parPb[ 4] = r2+(kZPb-kZvac4-10.) * TMath::Tan(kThetaOpen2);
757 parPb[ 5] = kZPb*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 758
dbbe5bc1 759 parPb[ 6] = -dlPb+(kZConeE-kZPb);
760 parPb[ 7] = r2+(kZConeE-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 761 parPb[ 8] = 26.;
762
dbbe5bc1 763 parPb[ 9] = -dlPb+(kZch32+4.-kZPb);
764 parPb[10] = r2+(kZch32+4.-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 765 parPb[11] = 26.;
766
dbbe5bc1 767 parPb[12] = -dlPb+(kZch32+4.-kZPb);
768 parPb[13] = r2+(kZch32+4.-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 769 parPb[14] = 30.;
770
771 parPb[15] = dlPb;
dbbe5bc1 772 parPb[16] = r2+(kZvac7-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 773 parPb[17] = 30.;
774
866a26a3 775 gMC->Gsvolu("YXO2", "PCON", idtmed[kPb+40], parPb, 18);
dbbe5bc1 776 gMC->Gspos("YXO2", 1, "YGO2", 0., 0., (kZPb-kZvac4)/2., 0, "ONLY");
be4fc320 777//
778// Concrete replacing Pb
779//
780 Float_t parCC[9];
781 Float_t zCC1 = 1066.;
782 Float_t zCC2 = 1188.;
783
784 parCC[ 0] = 0.;
785 parCC[ 1] = 360.;
786 parCC[ 2] = 2.;
787 Float_t dlCC=(zCC2-zCC1)/2.;
788 parCC[ 3] = -dlCC;
dbbe5bc1 789 parCC[ 4] = r2+(zCC1-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 790 parCC[ 5] = 30.;
791
792 parCC[ 6] = dlCC;
dbbe5bc1 793 parCC[ 7] = r2+(zCC2-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 794 parCC[ 8] = 30.;
795 gMC->Gsvolu("YCO2", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 796// gMC->Gspos("YCO2", 1, "YXO2", 0., 0., dlPb-dlCC-(kZvac7-zCC2), 0, "ONLY");
be4fc320 797
798 zCC1 = 751.75;
dbbe5bc1 799 zCC2 = kZConeE;
be4fc320 800 dlCC=(zCC2-zCC1)/2.;
801 parCC[ 3] = -dlCC;
dbbe5bc1 802 parCC[ 4] = r2+(zCC1-kZvac4-10.) * TMath::Tan(kThetaOpen2);
803 parCC[ 5] = zCC1*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 804
805 parCC[ 6] = dlCC;
dbbe5bc1 806 parCC[ 7] = r2+(zCC2-kZvac4-10.) * TMath::Tan(kThetaOpen2);
be4fc320 807 parCC[ 8] = 26.;
808
809 gMC->Gsvolu("YCO1", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 810// gMC->Gspos("YCO1", 1, "YXO2", 0., 0., dlPb-dlCC-(kZvac7-zCC2), 0, "ONLY");
be4fc320 811
812//
813// W cone
814//
815 Float_t parW[15];
816 parW[0] = 0.;
817 parW[1] = 360.;
818 parW[2] = 4.;
dbbe5bc1 819 Float_t dlW=(kZPb-kZvac4)/2.;
be4fc320 820
821 parW[3] = -dlW;
822 parW[4] = r2;
dbbe5bc1 823 parW[5] = kR21-kDRSteel2;
be4fc320 824
dbbe5bc1 825 parW[6] = -dlW+(kZvac6-kZvac4)+kDRSteel2;
826 parW[7] = r2+(kZvac6-kZvac4+kDRSteel2) * TMath::Tan(kThetaOpen2);
827 parW[8] = kR21-kDRSteel2;
be4fc320 828
dbbe5bc1 829 parW[9] = -dlW+(kZvac6-kZvac4)+kDRSteel2;
830 parW[10] = r2+(kZvac6-kZvac4+kDRSteel2) * TMath::Tan(kThetaOpen2);
831 parW[11] = (kZvac6+kDRSteel2)*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 832
833 parW[12] = dlW;
dbbe5bc1 834 parW[13] = r2+(kZPb-kZvac4) * TMath::Tan(kThetaOpen2);
835 parW[14] = kZPb*TMath::Tan(kAccMin)-kDRSteel2;
be4fc320 836
866a26a3 837 gMC->Gsvolu("YYO2", "PCON", idtmed[kNiCuW+40], parW, 15);
dbbe5bc1 838 gMC->Gspos("YYO2", 1, "YGO2", 0., 0., -(kZvac7-kZPb)/2., 0, "ONLY");
be4fc320 839
840 for (i=4; i<35; i+=3) par2[i] = 0;
841
842 gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 36);
843 gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");
844 dZ+=dl;
845 gMC->Gspos("YMO2", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
846 dZ+=dl;
847//
848//
849// 2nd section: vacuum system
850//
dbbe5bc1 851 cpar0[0]=(kZvac7-kZvac4)/2;
be4fc320 852 cpar0[1]=r2V;
853 cpar0[2]=r2V+dVacuS;
dbbe5bc1 854 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
855 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
be4fc320 856 gMC->Gsvolu("YV21", "CONE", idtmed[kSteel+40], cpar0, 5);
857//
858// insulation
859 cpar[0]=cpar0[0];
860 cpar[1]=cpar0[1]+dTubeS;
dbbe5bc1 861 cpar[2]=cpar0[1]+dTubeS+kDInsuS;
be4fc320 862 cpar[3]=cpar0[3]+dTubeS;
dbbe5bc1 863 cpar[4]=cpar0[3]+dTubeS+kDInsuS;
be4fc320 864 gMC->Gsvolu("YI21", "CONE", idtmed[kInsulation+40], cpar, 5);
865 gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY");
866 gMC->Gspos("YV21", 1, "YMO2", 0., 0., 0., 0, "ONLY");
867
868//
869// Third Section: Bellows and Flange
870//
871 par3[0] = 0.;
872 par3[1] = 360.;
873 par3[2] = 8.;
dbbe5bc1 874 dl=(kZvac9-kZvac7)/2.;
be4fc320 875
876 par3[3] = -dl;
dbbe5bc1 877 par3[4] = r2+(kZvac7-kZvac3) * TMath::Tan(kThetaOpen2);
be4fc320 878 par3[5] = 30.;
879
dbbe5bc1 880 par3[6] = -dl+kDr21;
881 par3[7] = par3[4]+kDr21;
be4fc320 882 par3[8] = 30.;
883
dbbe5bc1 884 par3[9] = par3[6]+kDB2;
be4fc320 885 par3[10] = par3[7];
886 par3[11] = 30.;
887
dbbe5bc1 888 par3[12] = par3[9]+kDr22;
889 par3[13] = par3[10]+kDr22;
be4fc320 890 par3[14] = 30.;
891
dbbe5bc1 892 par3[15] = par3[12]+kDF2;
be4fc320 893 par3[16] = par3[13];
894 par3[17] = 30.;
895
dbbe5bc1 896 par3[18] = par3[15]+kDr22;
897 par3[19] = par3[16]-kDr22;
be4fc320 898 par3[20] = 30.;
899
dbbe5bc1 900 par3[21] = par3[18]+kDB2;
be4fc320 901 par3[22] = par3[19];
902 par3[23] = 30.;
903
dbbe5bc1 904 par3[24] = par3[21]+kDr23;
be4fc320 905 par3[25] = par3[22];
906 par3[26] = 30.;
907//
908 rBox=par3[22]-0.1;
909 Float_t r3=par3[25];
910
911 gMC->Gsvolu("YGO3", "PCON", idtmed[iHeavy+40], par3, 27);
912
be4fc320 913 for (i=4; i<26; i+=3) par3[i] = 0;
914
915 gMC->Gsvolu("YMO3", "PCON", idtmed[kVacuum+40], par3, 27);
916 gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");
917
918//
919// Steel envelope
920// tpar[0]=26;
921// tpar[1]=30;
922// tpar[2]=dl;
923// gMC->Gsvolu("YS31", "TUBE", idtmed[kSteel], tpar, 3);
924// gMC->Gspos("YS31", 1, "YGO3", 0., 0., 0., 0, "ONLY");
925 dZ+=dl;
926 gMC->Gspos("YMO3", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
927 dZ+=dl;
928
929//
930// 3rd section: vacuum system
931//
932//
933// Bellow2
934//
dbbe5bc1 935 tpar[0]=kRB2;
936 tpar[1]=kRB2+kHB2;
937 tpar[2]=kEB2/2.;
be4fc320 938 gMC->Gsvolu("YB21", "TUBE", idtmed[kSteel+40], tpar, 3);
939 dl1=tpar[2];
940
dbbe5bc1 941 tpar[0]=kRB2+kHB2-kEB2;
942 tpar[1]=kRB2+kHB2;
943 tpar[2]=(kLB2/2.-2.*kEB2)/2.;
be4fc320 944 gMC->Gsvolu("YB22", "TUBE", idtmed[kSteel+40], tpar, 3);
945 dl2=tpar[2];
946
dbbe5bc1 947 tpar[0]=kRB2-kEB2;
948 tpar[1]=kRB2;
949 tpar[2]=kLB2/8.;
be4fc320 950 gMC->Gsvolu("YB23", "TUBE", idtmed[kSteel+40], tpar, 3);
951 dl3=tpar[2];
952
953
954 tpar[0]=0;
dbbe5bc1 955 tpar[1]=kRB2+kHB2;
956 tpar[2]=kLB2/2.;
be4fc320 957 gMC->Gsvolu("YBU2", "TUBE", idtmed[kVacuum+40], tpar, 3);
958
959 dz=-tpar[2]+dl3;
960 gMC->Gspos("YB23", 1, "YBU2", 0., 0., dz, 0, "ONLY");
961 dz+=dl3;
962 dz+=dl1;
963 gMC->Gspos("YB21", 1, "YBU2", 0., 0., dz, 0, "ONLY");
964 dz+=dl1;
965 dz+=dl2;
966 gMC->Gspos("YB22", 1, "YBU2", 0., 0., dz, 0, "ONLY");
967 dz+=dl2;
968 dz+=dl1;
969 gMC->Gspos("YB21", 2, "YBU2", 0., 0., dz, 0, "ONLY");
970 dz+=dl1;
971 dz+=dl3;
972 gMC->Gspos("YB23", 2, "YBU2", 0., 0., dz, 0, "ONLY");
973
974
975 tpar[0]=0;
dbbe5bc1 976 tpar[1]=kRB2+kHB2;
977 tpar[2]=7.*kLB2/2.;
be4fc320 978 gMC->Gsvolu("YBM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
dbbe5bc1 979 dz=-tpar[2]+kLB2/2.;
be4fc320 980
981 for (i=0; i<7; i++) {
982 gMC->Gspos("YBU2", i+1 , "YBM2", 0., 0.,dz , 0, "ONLY");
dbbe5bc1 983 dz+=kLB2;
be4fc320 984 }
985
dbbe5bc1 986 dz=-dl+kDr21+tpar[2];
be4fc320 987 gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
988
dbbe5bc1 989 dz=dl-kDr23-tpar[2];
be4fc320 990 gMC->Gspos("YBM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
991
992//
993// Flange
994
995 tpar[0]=0;
dbbe5bc1 996 tpar[1]=kRF2;
997 tpar[2]=kDF2/2.;
be4fc320 998 gMC->Gsvolu("YFM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
999
dbbe5bc1 1000 tpar[0]=kRF2-2.;
1001 tpar[1]=kRF2;
1002 tpar[2]=kDF2/2.;
be4fc320 1003 gMC->Gsvolu("YF21", "TUBE", idtmed[kSteel+40], tpar, 3);
1004 gMC->Gspos("YF21", 1, "YFM2", 0., 0., 0., 0, "ONLY");
1005
dbbe5bc1 1006 tpar[0]=kRB2;
1007 tpar[1]=kRF2-2.;
1008 tpar[2]=kDFlange/2.;
be4fc320 1009 gMC->Gsvolu("YF22", "TUBE", idtmed[kSteel+40], tpar, 3);
dbbe5bc1 1010 dz=-kDF2/2.+tpar[2];
be4fc320 1011 gMC->Gspos("YF22", 1, "YFM2", 0., 0., dz, 0, "ONLY");
dbbe5bc1 1012 dz= kDF2/2.-tpar[2];
be4fc320 1013 gMC->Gspos("YF22", 2, "YFM2", 0., 0., dz, 0, "ONLY");
1014
dbbe5bc1 1015 dz=kDr21/2.-kDr23/2.;
be4fc320 1016 gMC->Gspos("YFM2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1017
1018
1019//
1020// pipe between flange and bellows
dbbe5bc1 1021 tpar[0]=kRB2-dTubeS;
1022 tpar[1]=kRB2;
1023 tpar[2]=2.*(kDB2+kDr22-7.*kLB2)/4.;
be4fc320 1024 gMC->Gsvolu("YPF2", "TUBE", idtmed[kSteel+40], tpar, 3);
dbbe5bc1 1025 dz=kDr21/2.-kDr23/2.-kDF2/2.-tpar[2];
be4fc320 1026 gMC->Gspos("YPF2", 1, "YMO3", 0., 0., dz, 0, "ONLY");
dbbe5bc1 1027 dz=kDr21/2.-kDr23/2.+kDF2/2.+tpar[2];
be4fc320 1028 gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY");
1029
1030 Float_t dHorZ=20.;
1031
1032//
1033// 4th section: rear shield and closing cone
1034//
1035 par4[0] = 0.;
1036 par4[1] = 360.;
1037 par4[2] = 7.;
dbbe5bc1 1038 dl=(kZvac12-kZvac9)/2.;
be4fc320 1039
1040 par4[3] = -dl;
1041 par4[4] = r3;
1042 par4[5] = 30.;
1043
1044 par4[6] = -dl+dHorZ;
1045 par4[7] = r3;
1046 par4[8] = 30.;
1047
dbbe5bc1 1048 par4[9] = -dl+(kZvac10-kZvac9);
1049 par4[10] = r3+(kZvac10-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1050 par4[11] = 30.;
1051
1052 par4[12] = par4[9];
1053 par4[13] = par4[10];
dbbe5bc1 1054 par4[14] = kR42;
be4fc320 1055
dbbe5bc1 1056 par4[15] = -dl+(kZvac11-kZvac9);
1057 par4[16] = r3+(kZvac11-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
1058 par4[17] = kR42;
be4fc320 1059
1060 par4[18] = par4[15];
1061 par4[19] = par4[16];
dbbe5bc1 1062 par4[20] = kR43;
be4fc320 1063
dbbe5bc1 1064 par4[21] = -dl+(kZvac12-kZvac9);
1065 par4[22] = kRVacu+dVacuS;
1066 par4[23] = kR43;
be4fc320 1067
1068 gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 24);
1069
1070
1071 for (i=4; i<23; i+=3) par4[i] = 0;
1072
1073 gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 24);
1074 gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");
1075
1076
1077
1078 dZ+=dl;
1079 gMC->Gspos("YMO4", 1, "YMOT", 0., 0., dZ, 0, "ONLY");
1080 dZ+=dl;
1081//
1082// Concrete replacing Pb
1083//
1084 zCC1 = 1316.;
1085 zCC2 = 1349.;
1086
1087 parCC[ 0] = 0.;
1088 parCC[ 1] = 360.;
1089 parCC[ 2] = 2.;
1090 dlCC=(zCC2-zCC1)/2.;
1091 parCC[ 3] = -dlCC;
dbbe5bc1 1092 parCC[ 4] = r3+(zCC1-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1093 parCC[ 5] = 30.;
1094
1095 parCC[ 6] = dlCC;
dbbe5bc1 1096 parCC[ 7] = r3+(zCC2-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1097 parCC[ 8] = 30.;
1098
1099 gMC->Gsvolu("YCO4", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 1100// gMC->Gspos("YCO4", 1, "YGO4", 0., 0., dl-dlCC-(kZvac12-zCC2), 0, "ONLY");
be4fc320 1101
1102 zCC1 = 1471.;
1103 zCC2 = 1591.;
1104
1105 dlCC=(zCC2-zCC1)/2.;
1106 parCC[ 3] = -dlCC;
dbbe5bc1 1107 parCC[ 4] = r3+(zCC1-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
1108 parCC[ 5] = kR41-kDRSteel2;
be4fc320 1109
1110 parCC[ 6] = dlCC;
dbbe5bc1 1111 parCC[ 7] = r3+(zCC2-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
1112 parCC[ 8] = kR41-kDRSteel2;
be4fc320 1113
1114 gMC->Gsvolu("YCO5", "PCON", idtmed[kSteel], parCC, 9);
dbbe5bc1 1115// gMC->Gspos("YCO5", 1, "YGO4", 0., 0., dl-dlCC-(kZvac12-zCC2), 0, "ONLY");
be4fc320 1116
1117//
1118// Closing concrete cone
1119//
dbbe5bc1 1120 cpar[0]=(kZvac12-kZvac11)/2.;
1121 cpar[1] = r3+(kZvac11-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
be4fc320 1122 cpar[2] = cpar[1]+0.001;
dbbe5bc1 1123 cpar[3] = kRVacu+dVacuS;
be4fc320 1124 cpar[4] = cpar[2];
1125 gMC->Gsvolu("YCC4", "CONE", idtmed[kConcrete+40], cpar, 5);
1126 dz=dl-cpar[0];
1127 gMC->Gspos("YCC4", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1128
be4fc320 1129//
1130// Steel envelope
1131//
1132 dz=-dl;
1133 tpar[0]=26.;
1134 tpar[1]=30.;
dbbe5bc1 1135 tpar[2]=(kZvac10-kZvac9)/2.;
be4fc320 1136 gMC->Gsvolu("YS41", "TUBE", idtmed[kSteel], tpar, 3);
1137 dz+=tpar[2];
1138// gMC->Gspos("YS41", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1139 dz+=tpar[2];
1140
dbbe5bc1 1141 tpar[0]=kR41-kDRSteel2;
1142 tpar[1]=kR41;
1143 tpar[2]=(kZvac11-kZvac10)/2.;
866a26a3 1144 gMC->Gsvolu("YS43", "TUBE", idtmed[kPb+40], tpar, 3);
be4fc320 1145 dz+=tpar[2];
1146 gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1147//
1148// rear lead shield
1149//
dbbe5bc1 1150 tpar[0]=kR41;
1151 tpar[1]=kR42;
1152 tpar[2]=(kZvac11-kZvac10)/2.;
be4fc320 1153 gMC->Gsvolu("YPBI", "TUBE", idtmed[kPb+40], tpar, 3);
1154 dz-=0;
1155 gMC->Gspos("YPBI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1156
1157 tpar[2]=(zCC2-zCC1)/2.;
1158 gMC->Gsvolu("YCO6", "TUBE", idtmed[kSteel+40], tpar, 3);
dbbe5bc1 1159// gMC->Gspos("YCO6", 1, "YPBI", 0., 0., -(kZvac11-kZvac10)/2.+tpar[2], 0, "ONLY");
be4fc320 1160
1161
dbbe5bc1 1162 tpar[0]=kR42-5;
1163 tpar[1]=kR42;
1164 tpar[2]=(kZvac11-kZvac10)/2.;
866a26a3 1165 gMC->Gsvolu("YPBO", "TUBE", idtmed[kPb+40], tpar, 3);
be4fc320 1166 gMC->Gspos("YPBO", 1, "YPBI", 0., 0., 0., 0, "ONLY");
1167
1168 tpar[2]=(zCC2-zCC1)/2.;
1169 gMC->Gsvolu("YCO7", "TUBE", idtmed[kSteel], tpar, 3);
dbbe5bc1 1170// gMC->Gspos("YCO7", 1, "YPBO", 0., 0., -(kZvac11-kZvac10)/2.+tpar[2], 0, "ONLY");
be4fc320 1171
1172//
1173// rear Fe shield
1174//
1175
1176 tpar[0]=31.;
dbbe5bc1 1177 tpar[1]=kR43;
1178 tpar[2]=(kZvac12-kZvac11)/2.;
35a1fda7 1179 gMC->Gsvolu("YFEI", "TUBE", idtmed[kSteel+40], tpar, 3);
be4fc320 1180 dz=dl-tpar[2];
1181 gMC->Gspos("YFEI", 1, "YGO4", 0., 0., dz, 0, "ONLY");
1182
1183 tpar[0]=31.;
dbbe5bc1 1184 tpar[1]=kR43;
be4fc320 1185 tpar[2]=2.5;
35a1fda7 1186 gMC->Gsvolu("YFEO", "TUBE", idtmed[kSteel], tpar, 3);
dbbe5bc1 1187 dz=-(kZvac12-kZvac11)/2.+tpar[2];
be4fc320 1188 gMC->Gspos("YFEO", 1, "YFEI", 0., 0., dz, 0, "ONLY");
be4fc320 1189
1190
1191//
1192//
1193// 4th section: vacuum system
1194//
1195// up to closing cone
1196
3b97cdce 1197 Float_t r3V=r3-kDr23+dVacuS-1.6;
be4fc320 1198
dbbe5bc1 1199 cpar0[0]=(kZvac11-kZvac9)/2;
be4fc320 1200 cpar0[1]=r3V-dVacuS;
1201 cpar0[2]=r3V;
dbbe5bc1 1202 cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpen3);
1203 cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpen3);
be4fc320 1204 gMC->Gsvolu("YV31", "CONE", idtmed[kSteel+40], cpar0, 5);
1205//
1206// insulation
1207 cpar[0]=cpar0[0];
1208 cpar[1]=cpar0[1]+dTubeS;
dbbe5bc1 1209 cpar[2]=cpar0[1]+dTubeS+kDInsuS;
be4fc320 1210 cpar[3]=cpar0[3]+dTubeS;
dbbe5bc1 1211 cpar[4]=cpar0[3]+dTubeS+kDInsuS;
be4fc320 1212 gMC->Gsvolu("YI31", "CONE", idtmed[kInsulation+40], cpar, 5);
1213 gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY");
1214 dz=-dl+cpar[0];
1215 gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY");
1216
be4fc320 1217//
1218// closing cone
dbbe5bc1 1219 cpar0[0]=(kZvac12-kZvac11)/2;
1220 cpar0[1]=r3V-dVacuS+(kZvac11-kZvac9)*TMath::Tan(kThetaOpen3);
1221 cpar0[2]=r3V +(kZvac11-kZvac9)*TMath::Tan(kThetaOpen3);
1222 cpar0[3]=kRVacu;
1223 cpar0[4]=kRVacu+dTubeS+kDInsuS+kDProtS+kDFreeS;
be4fc320 1224 gMC->Gsvolu("YV32", "CONE", idtmed[kSteel+40], cpar0, 5);
1225//
1226// insulation
1227 cpar[0]=cpar0[0];
1228 cpar[1]=cpar0[1]+dTubeS;
dbbe5bc1 1229 cpar[2]=cpar0[1]+dTubeS+kDInsuS;
be4fc320 1230 cpar[3]=cpar0[3]+dTubeS;
dbbe5bc1 1231 cpar[4]=cpar0[3]+dTubeS+kDInsuS;
be4fc320 1232 gMC->Gsvolu("YI32", "CONE", idtmed[kInsulation+40], cpar, 5);
1233 gMC->Gspos("YI32", 1, "YV32", 0., 0., 0., 0, "ONLY");
1234
1235 dz=dl-cpar[0];
1236 gMC->Gspos("YV32", 1, "YMO4", 0., 0., dz, 0, "ONLY");
35a1fda7 1237
1238///////////////////////////////////
1239// Muon Filter //
1240// Drawing ALIP2A__0105 //
1241///////////////////////////////////
1242 TGeoBBox* shMuonFilterO1 = new TGeoBBox(550./2., 620./2., 120./2.);
1243 shMuonFilterO1->SetName("FilterO1");
1244 TGeoTube* shMuonFilterI1 = new TGeoTube(0., 50., 121./2.);
1245 shMuonFilterI1->SetName("FilterI1");
1246 TGeoCompositeShape* shMuonFilterM = new TGeoCompositeShape("YMuonFilterM", "FilterO1-FilterI1");
1247 TGeoVolume* voMuonFilterM = new TGeoVolume("YMuonFilterM", shMuonFilterM, gGeoManager->GetMedium("SHIL_ST_C0"));
1248
1249 TGeoBBox* shMuonFilterO2 = new TGeoBBox(550./2., 620./2., 110./2.);
1250 shMuonFilterO2->SetName("FilterO2");
1251 TGeoTube* shMuonFilterI2 = new TGeoTube(0., 50., 111./2.);
1252 shMuonFilterI2->SetName("FilterI2");
1253 TGeoCompositeShape* shMuonFilterI = new TGeoCompositeShape("YMuonFilterI", "FilterO2-FilterI2");
1254 TGeoVolume* voMuonFilterI = new TGeoVolume("YMuonFilterI", shMuonFilterI, gGeoManager->GetMedium("SHIL_ST_C3"));
1255 voMuonFilterI->SetName("YMuonFilterI");
1256 voMuonFilterM->AddNode(voMuonFilterI, 1, new TGeoTranslation(0., 0., 0.));
1257
dbbe5bc1 1258 dz = (kZFilterIn + kZFilterOut) / 2.;
df456ba9 1259 gMC->Gspos("YMuonFilterM", 1, "YOUT2", 0., 0., - dz, 0, "ONLY");
35a1fda7 1260
be4fc320 1261//
be4fc320 1262// Outer Pb Cone
3b97cdce 1263//
be4fc320 1264 if (fPbCone) {
dbbe5bc1 1265 dl = (kZvac10-kZch32)/2.;
1266 dz = dl+kZch32;
be4fc320 1267
1268 par0[0] = 0.;
1269 par0[1] = 360.;
1270 par0[2] = 10.;
1271
1272 par0[ 3] = -dl;
1273 par0[ 4] = 30.;
dbbe5bc1 1274 par0[ 5] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1275
1276// 4th station
dbbe5bc1 1277 par0[ 6] = -dz + kZch41;
be4fc320 1278 par0[ 7] = 30.;
dbbe5bc1 1279 par0[ 8] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1280
dbbe5bc1 1281 par0[ 9] = -dz + kZch41;
be4fc320 1282 par0[10] = 30.;
3b97cdce 1283 par0[11] = 36.9;
be4fc320 1284 // recess erice2000
dbbe5bc1 1285 par0[12] = -dz + kZch42;
be4fc320 1286 par0[13] = 30.;
1287 par0[14] = par0[11];
1288
dbbe5bc1 1289 par0[15] = -dz + kZch42;
be4fc320 1290 par0[16] = 30.;
dbbe5bc1 1291 par0[17] = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1292
1293// 5th station
dbbe5bc1 1294 par0[18] = -dz + kZch51;
be4fc320 1295 par0[19] = 30.;
dbbe5bc1 1296 par0[20] = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1297
dbbe5bc1 1298 par0[21] = -dz + kZch51;
be4fc320 1299 par0[22] = 30.;
3b97cdce 1300 par0[23] = 36.9; // recess erice2000
be4fc320 1301
dbbe5bc1 1302 par0[24] = -dz + kZch52;
be4fc320 1303 par0[25] = 30.;
1304 par0[26] = par0[23];
1305
dbbe5bc1 1306 par0[27] = -dz + kZch52;
be4fc320 1307 par0[28] = 30.;
a83e7079 1308 par0[29] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1309// end of cone
1310 par0[30] = +dl;
1311 par0[31] = 30.;
1312 par0[32] = par0[29];
1313//
866a26a3 1314 gMC->Gsvolu("YOPB", "PCON", idtmed[kPb+40], par0, 33);
3b97cdce 1315 Float_t dzs = -kzLength + (kZch32-zstart) + dl;
be4fc320 1316 gMC->Gspos("YOPB", 1, "YMOT", 0., 0., dzs, 0, "ONLY");
1317
1318//
1319// Steel envelope
1320//
1321 par0[ 0] = 0.;
1322 par0[ 1] = 360.;
d5806350 1323 par0[ 2] = 11.;
be4fc320 1324
1325 par0[ 3] = -dl;
dbbe5bc1 1326 par0[ 5] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1327 par0[ 4] = par0[ 5] - 4.;
d5806350 1328
be4fc320 1329// 4th station
d5806350 1330
dbbe5bc1 1331 par0[ 6] = -dz + kZch41 - 4.;
1332 par0[ 8] = 30.+(kZch41-4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1333 par0[ 7] = par0[ 8] -4.;
1334
dbbe5bc1 1335 par0[ 9] = -dz + kZch41 - 4.;
be4fc320 1336 par0[11] = par0[8];
1337 par0[10] = 33.5;
1338
dbbe5bc1 1339 par0[12] = -dz + kZch41;
1340 par0[14] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1341 par0[13] = 33.5;
1342
dbbe5bc1 1343 par0[15] = -dz + kZch41;
3b97cdce 1344 par0[17] = 36.9;
1345 par0[16] = 32.9;
d5806350 1346
1347// 5th station
1348
1349 par0[18] = -dz + kZch51;
3b97cdce 1350 par0[20] = 36.9;
1351 par0[19] = 32.9;
be4fc320 1352
d5806350 1353 par0[21] = -dz + kZch52;
3b97cdce 1354 par0[23] = 36.9;
1355 par0[22] = 32.9;
be4fc320 1356
d5806350 1357 par0[24] = -dz + kZch52;
1358 par0[26] = 30.+(kZch52-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1359 par0[25] = 33.5;
1360
d5806350 1361 par0[27] = -dz + kZch52 + 4.;
1362 par0[29] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
1363 par0[28] = 33.5;
be4fc320 1364
d5806350 1365 par0[30] = -dz + kZch52 + 4.;
1366 par0[32] = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
be4fc320 1367 par0[31] = par0[32] - 4.;
be4fc320 1368
d5806350 1369 par0[33] = +dl;
1370 par0[35] = par0[32];
1371 par0[34] = par0[31];
be4fc320 1372
d5806350 1373 gMC->Gsvolu("YOSE", "PCON", idtmed[kSteel], par0, 36);
be4fc320 1374 gMC->Gspos ("YOSE", 1, "YOPB", 0., 0., 0., 0, "ONLY");
1375//
3b97cdce 1376// Extra Tungsten shield close to stations 1 and 2
1377//
1378 TGeoRotation* rot000 = new TGeoRotation("rot000", 90., 0., 90., 90., 0., 0.);
1379 TGeoRotation* rot090 = new TGeoRotation("rot090", 90., 90., 90., 180., 0., 0.);
1380 TGeoRotation* rot180 = new TGeoRotation("rot180", 90., 180., 90., 270., 0., 0.);
1381 TGeoRotation* rot270 = new TGeoRotation("rot270", 90., 270., 90., 0., 0., 0.);
1382 TGeoVolume* mother = gGeoManager->GetVolume("YMOT");
1383 TGeoVolumeAssembly* assembly = new TGeoVolumeAssembly("YASS");
1384 assembly->AddNode(mother, 1, new TGeoTranslation(0., 0., 0.));
1385 TGeoVolumeAssembly* extraShield1 = new TGeoVolumeAssembly("YCRE");
1386 TGeoVolumeAssembly* extraShield2 = new TGeoVolumeAssembly("YCRF");
1387
1388///////////////////////////////////
1389// //
1390// Recess Station 1 //
1391// //
1392///////////////////////////////////
1393
1394
1395///////////////////////////////////
1396// FA W-Ring 2 //
1397// Drawing ALIP2A__0220 //
1398///////////////////////////////////
1399 Float_t faWring2Rinner = 15.40;
1400 Float_t faWring2Router = 18.40;
1401 Float_t faWring2HWidth = 3.75;
1402 Float_t faWring2Cutoffx = 3.35;
1403 Float_t faWring2Cutoffy = 3.35;
1404 TGeoTubeSeg* shFaWring2a = new TGeoTubeSeg(faWring2Rinner, faWring2Router, faWring2HWidth, 0., 90.);
1405 shFaWring2a->SetName("shFaWring2a");
1406 TGeoBBox* shFaWring2b = new TGeoBBox(faWring2Router / 2., faWring2Router / 2., faWring2HWidth);
1407 shFaWring2b->SetName("shFaWring2b");
1408 TGeoTranslation* trFaWring2b
1409 = new TGeoTranslation("trFaWring2b", faWring2Router / 2. + faWring2Cutoffx, faWring2Router / 2. + faWring2Cutoffy, 0.);
1410 trFaWring2b->RegisterYourself();
1411 TGeoCompositeShape* shFaWring2 = new TGeoCompositeShape("shFaWring2", "(shFaWring2a)*(shFaWring2b:trFaWring2b)");
1412 TGeoVolume* voFaWring2 = new TGeoVolume("FA_WRING2", shFaWring2, gGeoManager->GetMedium("SHIL_Ni/W3"));
1413
1414///////////////////////////////////
1415// FA W-Ring 3 //
1416// Drawing ALIP2A__0219 //
1417///////////////////////////////////
1418 Float_t faWring3Rinner = 15.40;
1419 Float_t faWring3Router = 18.40;
1420 Float_t faWring3HWidth = 3.75;
1421 Float_t faWring3Cutoffx = 3.35;
1422 Float_t faWring3Cutoffy = 3.35;
1423 TGeoTubeSeg* shFaWring3a = new TGeoTubeSeg(faWring3Rinner, faWring3Router, faWring3HWidth, 0., 90.);
1424 shFaWring3a->SetName("shFaWring3a");
1425 TGeoBBox* shFaWring3b = new TGeoBBox(faWring3Router / 2., faWring3Router / 2., faWring3HWidth);
1426 shFaWring3b->SetName("shFaWring3b");
1427 TGeoTranslation* trFaWring3b
1428 = new TGeoTranslation("trFaWring3b", faWring3Router / 2. + faWring3Cutoffx, faWring3Router / 2. + faWring3Cutoffy, 0.);
1429 trFaWring3b->RegisterYourself();
1430 TGeoCompositeShape* shFaWring3 = new TGeoCompositeShape("shFaWring3", "(shFaWring3a)*(shFaWring3b:trFaWring3b)");
1431 TGeoVolume* voFaWring3 = new TGeoVolume("FA_WRING3", shFaWring3, gGeoManager->GetMedium("SHIL_Ni/W3"));
1432
1433///////////////////////////////////
1434// FA W-Ring 5 //
1435// Drawing ALIP2A__0221 //
1436///////////////////////////////////
1437 Float_t faWring5Rinner = 15.40;
1438 Float_t faWring5Router = 18.67;
1439 Float_t faWring5HWidth = 1.08;
1440 TGeoVolume* voFaWring5 = new TGeoVolume("FA_WRING5",
1441 new TGeoTube(faWring5Rinner, faWring5Router, faWring5HWidth),
1442 gGeoManager->GetMedium("SHIL_Ni/W3"));
1443
1444//
1445// Position the rings in the assembly
1446//
1447// Distance between rings
1448 Float_t faDWrings = 1.92;
1449//
1450 dz = - (4. * faWring2HWidth + 4. * faWring3HWidth + 2. * faWring5HWidth + 2. * faDWrings) / 2.;
1451 dz += faWring2HWidth;
1452 extraShield1->AddNode(voFaWring2, 1, new TGeoCombiTrans(0., 0., dz, rot090));
1453 extraShield1->AddNode(voFaWring2, 2, new TGeoCombiTrans(0., 0., dz, rot270));
1454 dz += faWring2HWidth; dz += faDWrings;
1455 dz += faWring3HWidth;
1456 extraShield1->AddNode(voFaWring3, 1, new TGeoCombiTrans(0., 0., dz, rot000));
1457 extraShield1->AddNode(voFaWring3, 2, new TGeoCombiTrans(0., 0., dz, rot180));
1458 dz += faWring3HWidth;
1459 dz += faWring5HWidth;
1460 extraShield1->AddNode(voFaWring5, 1, new TGeoTranslation(0., 0., dz));
1461 dz += faWring5HWidth;
1462 dz += faWring3HWidth;
1463 extraShield1->AddNode(voFaWring3, 3, new TGeoCombiTrans(0., 0., dz, rot090));
1464 extraShield1->AddNode(voFaWring3, 4, new TGeoCombiTrans(0., 0., dz, rot270));
1465 dz += faWring3HWidth;
1466 dz += faDWrings;
1467 dz += faWring2HWidth;
1468 extraShield1->AddNode(voFaWring2, 3, new TGeoCombiTrans(0., 0., dz, rot000));
1469 extraShield1->AddNode(voFaWring2, 4, new TGeoCombiTrans(0., 0., dz, rot180));
1470 dz += faWring2HWidth;
1471
35a1fda7 1472 // assembly->AddNode(extraShield1, 1, new TGeoTranslation(0., 0., -kzLength + 49.7 + dz));
1473 Float_t dzKeep = dz;
1474
3b97cdce 1475
1476///////////////////////////////////
1477// //
1478// Recess Station 2 //
1479// //
1480///////////////////////////////////
1481
1482///////////////////////////////////
1483// SAA1 W-Ring 1 //
1484// Drawing ALIP2A__0217 //
1485///////////////////////////////////
1486 Float_t saa1Wring1Width = 5.85;
1487 TGeoPcon* shSaa1Wring1 = new TGeoPcon(0., 360., 2);
1488 shSaa1Wring1->DefineSection(0, 0.00 , 20.30, 23.175);
1489 shSaa1Wring1->DefineSection(1, saa1Wring1Width, 20.30, 23.400);
1490 TGeoVolume* voSaa1Wring1 = new TGeoVolume("SAA1_WRING1", shSaa1Wring1, gGeoManager->GetMedium("SHIL_Ni/W3"));
1491
1492///////////////////////////////////
1493// SAA1 W-Ring 2 //
1494// Drawing ALIP2A__0055 //
1495///////////////////////////////////
1496 Float_t saa1Wring2Rinner = 20.30;
1497 Float_t saa1Wring2Router = 23.40;
1498 Float_t saa1Wring2HWidth = 3.75;
1499 Float_t saa1Wring2Cutoffx = 4.45;
1500 Float_t saa1Wring2Cutoffy = 4.45;
1501 TGeoTubeSeg* shSaa1Wring2a = new TGeoTubeSeg(saa1Wring2Rinner, saa1Wring2Router, saa1Wring2HWidth, 0., 90.);
1502 shSaa1Wring2a->SetName("shSaa1Wring2a");
1503 TGeoBBox* shSaa1Wring2b = new TGeoBBox(saa1Wring2Router / 2., saa1Wring2Router / 2., saa1Wring2HWidth);
1504 shSaa1Wring2b->SetName("shSaa1Wring2b");
1505 TGeoTranslation* trSaa1Wring2b
1506 = new TGeoTranslation("trSaa1Wring2b", saa1Wring2Router / 2. + saa1Wring2Cutoffx, saa1Wring2Router / 2. + saa1Wring2Cutoffy, 0.);
1507 trSaa1Wring2b->RegisterYourself();
1508 TGeoCompositeShape* shSaa1Wring2 = new TGeoCompositeShape("shSaa1Wring2", "(shSaa1Wring2a)*(shSaa1Wring2b:trSaa1Wring2b)");
1509 TGeoVolume* voSaa1Wring2 = new TGeoVolume("SAA1_WRING2", shSaa1Wring2, gGeoManager->GetMedium("SHIL_Ni/W3"));
1510
1511///////////////////////////////////
1512// SAA1 W-Ring 3 //
1513// Drawing ALIP2A__0216 //
1514///////////////////////////////////
1515
1516 Float_t saa1Wring3Rinner = 20.30;
1517 Float_t saa1Wring3Router = 23.40;
1518 Float_t saa1Wring3HWidth = 3.75;
1519 Float_t saa1Wring3Cutoffx = 4.50;
1520 Float_t saa1Wring3Cutoffy = 4.40;
1521 TGeoTubeSeg* shSaa1Wring3a = new TGeoTubeSeg(saa1Wring3Rinner, saa1Wring3Router, saa1Wring3HWidth, 0., 90.);
1522 shSaa1Wring3a->SetName("shSaa1Wring3a");
1523 TGeoBBox* shSaa1Wring3b = new TGeoBBox(saa1Wring3Router / 2., saa1Wring3Router / 2., saa1Wring3HWidth);
1524 shSaa1Wring3b->SetName("shSaa1Wring3b");
1525 TGeoTranslation* trSaa1Wring3b
1526 = new TGeoTranslation("trSaa1Wring3b", saa1Wring3Router / 2. + saa1Wring3Cutoffx, saa1Wring3Router / 2. + saa1Wring3Cutoffy, 0.);
1527 trSaa1Wring3b->RegisterYourself();
1528 TGeoCompositeShape* shSaa1Wring3 = new TGeoCompositeShape("shSaa1Wring3", "(shSaa1Wring3a)*(shSaa1Wring3b:trSaa1Wring3b)");
1529 TGeoVolume* voSaa1Wring3 = new TGeoVolume("SAA1_WRING3", shSaa1Wring3, gGeoManager->GetMedium("SHIL_Ni/W3"));
1530
1531///////////////////////////////////
1532// SAA1 W-Ring 4 //
1533// Drawing ALIP2A__0215 //
1534///////////////////////////////////
1535 Float_t saa1Wring4Width = 5.85;
1536 TGeoPcon* shSaa1Wring4 = new TGeoPcon(0., 360., 5);
1537 shSaa1Wring4->DefineSection(0, 0.00, 20.30, 23.40);
1538 shSaa1Wring4->DefineSection(1, 1.00, 20.30, 23.40);
1539 shSaa1Wring4->DefineSection(2, 1.00, 20.30, 24.50);
1540 shSaa1Wring4->DefineSection(3, 4.85, 20.30, 24.80);
1541 shSaa1Wring4->DefineSection(4, 5.85, 24.10, 24.80);
1542 TGeoVolume* voSaa1Wring4 = new TGeoVolume("SAA1_WRING4", shSaa1Wring4, gGeoManager->GetMedium("SHIL_Ni/W3"));
1543
1544///////////////////////////////////
1545// SAA1 W-Ring 5 //
1546// Drawing ALIP2A__0218 //
1547///////////////////////////////////
1548 Float_t saa1Wring5Rinner = 20.30;
1549 Float_t saa1Wring5Router = 23.40;
1550 Float_t saa1Wring5HWidth = 0.85;
1551 TGeoVolume* voSaa1Wring5 = new TGeoVolume("SAA1_WRING5",
1552 new TGeoTube(saa1Wring5Rinner, saa1Wring5Router, saa1Wring5HWidth),
1553 gGeoManager->GetMedium("SHIL_Ni/W3"));
1554//
1555// Position the rings in the assembly
1556//
1557// Distance between rings
1558 Float_t saa1DWrings = 2.6;
1559//
1560 dz = - (saa1Wring1Width + 6. * saa1Wring2HWidth + 2. * saa1Wring3HWidth + saa1Wring4Width + 2. * saa1Wring5HWidth + 2. * saa1DWrings) / 2.;
1561 extraShield2->AddNode(voSaa1Wring1, 1, new TGeoTranslation(0., 0., dz));
1562 dz += saa1Wring1Width;
1563 dz += saa1Wring2HWidth;
1564 extraShield2->AddNode(voSaa1Wring2, 1, new TGeoCombiTrans(0., 0., dz, rot000));
1565 extraShield2->AddNode(voSaa1Wring2, 2, new TGeoCombiTrans(0., 0., dz, rot180));
1566 dz += saa1Wring2HWidth;
1567 dz += saa1DWrings;
1568 dz += saa1Wring2HWidth;
1569 extraShield2->AddNode(voSaa1Wring2, 3, new TGeoCombiTrans(0., 0., dz, rot090));
1570 extraShield2->AddNode(voSaa1Wring2, 4, new TGeoCombiTrans(0., 0., dz, rot270));
1571 dz += saa1Wring2HWidth;
1572 dz += saa1Wring5HWidth;
1573 extraShield2->AddNode(voSaa1Wring5, 1, new TGeoTranslation(0., 0., dz));
1574 dz += saa1Wring5HWidth;
1575 dz += saa1Wring2HWidth;
30b71199 1576 extraShield2->AddNode(voSaa1Wring2, 5, new TGeoCombiTrans(0., 0., dz, rot000));
1577 extraShield2->AddNode(voSaa1Wring2, 6, new TGeoCombiTrans(0., 0., dz, rot180));
3b97cdce 1578 dz += saa1Wring2HWidth;
1579 dz += saa1DWrings;
1580 dz += saa1Wring3HWidth;
1581 extraShield2->AddNode(voSaa1Wring3, 1, new TGeoCombiTrans(0., 0., dz, rot090));
1582 extraShield2->AddNode(voSaa1Wring3, 2, new TGeoCombiTrans(0., 0., dz, rot270));
1583 dz += saa1Wring3HWidth;
1584 extraShield2->AddNode(voSaa1Wring4, 1, new TGeoTranslation(0., 0., dz));
1585 dz += saa1Wring4Width;
35a1fda7 1586 //assembly->AddNode(extraShield2, 1, new TGeoTranslation(0., 0., -kzLength + (kZch21 - zstart) + dz));
be4fc320 1587
3b97cdce 1588 TGeoRotation* rotxz = new TGeoRotation("rotxz", 90., 0., 90., 90., 180., 0.);
35a1fda7 1589 TGeoVolume* yout1 = gGeoManager->GetVolume("YOUT1");
1590 cout << zstart << "..." << dz << endl;
1591 yout1->AddNode(extraShield1, 1, new TGeoCombiTrans(0., 0., -zstart - ( 49.7 + dzKeep), rotxz));
1592 yout1->AddNode(extraShield2, 1, new TGeoCombiTrans(0., 0., -zstart - (kZch21 - zstart + dz ), rotxz));
1593
1594 TGeoVolume* top = gGeoManager->GetVolume("ALIC");
3b97cdce 1595 top->AddNode(assembly, 1, new TGeoCombiTrans(0., 0., -zstart - kzLength, rotxz));
be4fc320 1596 }
1597}
1598
1599void AliSHILv2::Init()
1600{
1601 //
1602 // Initialise the muon shield after it has been built
1603 //
1604 Int_t i;
1605 //
4951e003 1606 if(AliLog::GetGlobalDebugLevel()>0) {
be4fc320 1607 printf("\n%s: ",ClassName());
1608 for(i=0;i<35;i++) printf("*");
1609 printf(" SHILv2_INIT ");
1610 for(i=0;i<35;i++) printf("*");
1611 printf("\n%s: ",ClassName());
1612 //
1613 // Here the SHIL initialisation code (if any!)
1614 for(i=0;i<80;i++) printf("*");
1615 printf("\n");
1616 }
1617}