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