Switching from CMAKE_SOURCE_DIR to AliRoot_SOURCE_DIR
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv0.cxx
CommitLineData
4c039060 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$ */
4c039060 17
eeacf08b 18//-------------------------------------------------------------------------
19// Beam pipe class
20// Default version
21// Author: A.Morsch
22//-------------------------------------------------------------------------
fe4da5cc 23
88cb7938 24#include <Riostream.h>
25
c03db787 26#include <TGeoManager.h>
f7a1cc68 27#include <TGeoGlobalMagField.h>
88cb7938 28#include <TSystem.h>
29#include <TVirtualMC.h>
c93255fe 30#include <TArrayI.h>
88cb7938 31
7bd7faf8 32#include "AliConst.h"
33#include "AliMagF.h"
88cb7938 34#include "AliPIPEv0.h"
35#include "AliRun.h"
4951e003 36#include "AliLog.h"
fe4da5cc 37
38ClassImp(AliPIPEv0)
6772b8d8 39
fe4da5cc 40
41//_____________________________________________________________________________
6772b8d8 42AliPIPEv0::AliPIPEv0():
43 fPipeMaterial(kBe)
fe4da5cc 44{
b43eb0dc 45// Constructor
fe4da5cc 46}
47
48//_____________________________________________________________________________
49AliPIPEv0::AliPIPEv0(const char *name, const char *title)
6772b8d8 50 : AliPIPE(name,title),
51 fPipeMaterial(kBe)
fe4da5cc 52{
b43eb0dc 53// Constructor
fe4da5cc 54}
55
56
57//___________________________________________
58void AliPIPEv0::CreateGeometry()
59{
fe4da5cc 60//Begin_Html
61/*
1439f98e 62<img src="picts/pipe.gif">
fe4da5cc 63*/
64//End_Html
65
66
67//Begin_Html
68/*
1439f98e 69<img src="picts/tree_pipe.gif">
fe4da5cc 70*/
71//End_Html
72
4951e003 73 AliDebugClass(1,"Create PIPEv0 geometry");
fe4da5cc 74
fe4da5cc 75
7bd7faf8 76 Int_t *idtmed = fIdtmed->GetArray();
b0090333 77 Float_t ppcon[90], ptube[3], pbox[3];
7bd7faf8 78 Int_t i=0;
79
7bd7faf8 80
81 Int_t idrotm[2099];
82 AliMatrix(idrotm[2001],90.,240., 0., 0., 90.,150.);
83 AliMatrix(idrotm[2002],90., 0., 0., 0., 90.,270.);
84 AliMatrix(idrotm[2003],90.,120., 0., 0., 90., 30.);
85 AliMatrix(idrotm[2004],90.,315., 90., 45., 0., 0.);
86 AliMatrix(idrotm[2005],90.,270., 90., 0., 0., 0.);
87 AliMatrix(idrotm[2006],90.,225., 90.,315., 0., 0.);
88 AliMatrix(idrotm[2007],90.,180., 90.,270., 0., 0.);
89 AliMatrix(idrotm[2008],90.,135., 90.,225., 0., 0.);
90 AliMatrix(idrotm[2009],90., 90., 90.,180., 0., 0.);
91 AliMatrix(idrotm[2010],90., 45., 90.,135., 0., 0.);
92 idrotm[2011] = 0;
93 AliMatrix(idrotm[2012],90.,180., 90., 90.,180., 0.);
94 AliMatrix(idrotm[2013],90., 0., 90., 90.,180., 0.);
614dff1c 95//
96// Bellow
97//
22811e34 98// distance between bellows
614dff1c 99// total size of bellow section
d013be8e 100 const Float_t kdzb = 14.6;
614dff1c 101// size of undulated region
b63a407c 102//
103// Absorber side
104//
105// distance between bellows
d013be8e 106 const Float_t kdzbbA = 4.6;
b63a407c 107// total size of bellow section
d013be8e 108 const Float_t kdzbA = 14.6;
b63a407c 109// size of undulated region
110 const Float_t kdzubA = 3.75;
614dff1c 111
112// half-lengths of various beam pipe sections
113// central Be-Pipe
114 Float_t hlenQbbe1 = 40.;
115 Float_t hlenQbbe2 = 36.5;
116 Float_t hlenQbbe = (hlenQbbe1+hlenQbbe2)/2.;
117//
118//
119// Float_t hlenQbt1 = 5.5/2.;
120//
d2c19024 121// Pipe outside central region (non-absorber side)
122 Float_t hlenQbab = 157.5 + 23./2.;
614dff1c 123//
124// Flange non-absorber side
125 Float_t hlenQb29 = 11.5/2.+1.75 + 5.0;
126//
127// Bellow element
b63a407c 128 Float_t hlenQbe0 = kdzbA;
614dff1c 129//
130// Inox pipe between Be and Bellow (absorber side)
d013be8e 131 Float_t hlenQb24[3] = {11.3/2., 1.8, 3.3};
614dff1c 132//
133//
134 Float_t hlenQb28 = (800.-hlenQbbe1-2.*hlenQbab-4.*hlenQb29-2.*hlenQbe0)/2.;
135//
136// Position of the pump
eeacf08b 137 Float_t zPump = hlenQbbe1+2.*hlenQbab+2.*hlenQb29+kdzb;
614dff1c 138//
139// Inner beam pipe radius
ed9bfb0d 140// Be
eeacf08b 141 const Float_t kRinBe = 2.9;
ed9bfb0d 142// Steel
143 const Float_t kRinSt = 2.9;
144// Bellow
145 const Float_t kRinSB = 2.92;
614dff1c 146//
ed9bfb0d 147// Outer beam pipe radius
148// Be
eeacf08b 149 const Float_t kRoutBe = 2.98;
ed9bfb0d 150// Steel
151 const Float_t kRoutSt = 2.98;
152// Bellow
153 const Float_t kRoutSB = 3.00;
614dff1c 154
155//
156 Float_t dz;
7bd7faf8 157
fe4da5cc 158//
159// The peam pipe up to the Front Absorber
fe4da5cc 160//
7bd7faf8 161// Mother Volume QBPM
614dff1c 162 ppcon[0] = 0;
163 ppcon[1] = 360;
b0090333 164 ppcon[2] = 20;
165// 1
614dff1c 166 ppcon[3] = -90.;
167 ppcon[4] = 0.;
b0090333 168 ppcon[5] = 3.1;
7bd7faf8 169// 2
b0090333 170 ppcon[6] = -84.;
614dff1c 171 ppcon[7] = 0.;
b0090333 172 ppcon[8] = 3.1;
7bd7faf8 173// 3
b0090333 174 ppcon[9] = -84.;
614dff1c 175 ppcon[10] = 0.;
b0090333 176 ppcon[11] = 4.4;
177// 4
178 ppcon[12] = -90+2.*hlenQb24[2]+2.8+2.*hlenQb24[1];
614dff1c 179 ppcon[13] = 0.;
b0090333 180 ppcon[14] = 4.4;
181// 5
182 ppcon[15] = ppcon[12];
614dff1c 183 ppcon[16] = 0.;
b0090333 184 ppcon[17] = 4.1;
22811e34 185// 6
b63a407c 186 ppcon[18] = ppcon[15] + 2.5 + 2.*kdzubA+0.2;
614dff1c 187 ppcon[19] = 0.;
b0090333 188 ppcon[20] = 4.1;
189// 7
190 ppcon[21] = ppcon[18];
614dff1c 191 ppcon[22] = 0.;
b0090333 192 ppcon[23] = 3.2;
193// 8
b63a407c 194 ppcon[24] = ppcon[21] + 2.* kdzbbA-0.4;
614dff1c 195 ppcon[25] = 0.;
b0090333 196 ppcon[26] = 3.2;
7bd7faf8 197// 9
b0090333 198 ppcon[27] = ppcon[24];
199 ppcon[28] = 0.;
200 ppcon[29] = 4.1;
22811e34 201// 10
b0090333 202 ppcon[30] = -44.;
203 ppcon[31] = 0.;
204 ppcon[32] = 4.1;
22811e34 205// 11
b0090333 206 ppcon[33] = -44.;
7bd7faf8 207 ppcon[34] = 0;
b63a407c 208 ppcon[35] = 3.06;
22811e34 209// 12
b0090333 210 ppcon[36] = 38.;
211 ppcon[37] = 0;
b63a407c 212 ppcon[38] = 3.06;
614dff1c 213// 13
b0090333 214 ppcon[39] = 38.;
215 ppcon[40] = 0;
ed9bfb0d 216 ppcon[41] = 4.1;
22811e34 217// 14
b0090333 218 ppcon[42] = hlenQbbe1+2.*hlenQbab-0.1;
614dff1c 219 ppcon[43] = 0.;
ed9bfb0d 220 ppcon[44] = 4.1;
614dff1c 221// 15
222 ppcon[45] = ppcon[42];
223 ppcon[46] = 0.;
ed9bfb0d 224 ppcon[47] = 4.1;
22811e34 225// 16
b0090333 226 ppcon[48] = ppcon[45]+2.*hlenQb29-5.;
614dff1c 227 ppcon[49] = 0.;
ed9bfb0d 228 ppcon[50] = 4.1;
22811e34 229// 17
b0090333 230 ppcon[51] = ppcon[48];
22811e34 231 ppcon[52] = 0.;
b0090333 232 ppcon[53] = 56.;
22811e34 233// 18
eeacf08b 234 ppcon[54] = ppcon[51]+2.*kdzb+10.;
22811e34 235 ppcon[55] = 0.;
b0090333 236 ppcon[56] = 56.;
237// 19
238 ppcon[57] = ppcon[54];
239 ppcon[58] = 0.;
ed9bfb0d 240 ppcon[59] = 4.1;
b0090333 241// 20
242 ppcon[60] = 800.;
243 ppcon[61] = 0.;
ed9bfb0d 244 ppcon[62] = 4.1;
7bd7faf8 245
2942f542 246 TVirtualMC::GetMC()->Gsvolu("QBPM", "PCON", idtmed[kAir], ppcon,63);
614dff1c 247
248
7bd7faf8 249//
cd9c4f3a 250// volume definitions of various sections
251//
cd9c4f3a 252
614dff1c 253//
254// The Vacuum
2942f542 255 TVirtualMC::GetMC()->Gsvolu("QBVA","TUBE", idtmed[kVac], ptube, 0);
614dff1c 256 ptube[0] = 0.0;
eeacf08b 257 ptube[1] = kRinSt;
614dff1c 258 ptube[2] = (90.-hlenQbbe2)/2.;
259 dz = -90. + ptube[2];
2942f542 260 TVirtualMC::GetMC()->Gsposp ("QBVA", 1, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3);
614dff1c 261 dz = dz + ptube[2];
262
eeacf08b 263 ptube[1] = kRinBe;
614dff1c 264 ptube[2] = hlenQbbe+hlenQbab;
265 dz = dz + ptube[2];
2942f542 266 TVirtualMC::GetMC()->Gsposp ("QBVA", 2, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3);
614dff1c 267 dz = dz + ptube[2];
268
eeacf08b 269 ptube[1] = kRinSt;
614dff1c 270 ptube[2] = (800.-hlenQbbe1-2.*hlenQbab)/2.;
271 dz = dz + ptube[2];
2942f542 272 TVirtualMC::GetMC()->Gsposp ("QBVA", 3, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3);
cd9c4f3a 273
614dff1c 274//
275// Be Pipe in central Alice
eeacf08b 276 ptube[0] = kRinBe;
277 ptube[1] = kRoutBe;
cd9c4f3a 278 ptube[2] = hlenQbbe;
7bd7faf8 279
2942f542 280 TVirtualMC::GetMC()->Gsvolu("QBBE","TUBE", idtmed[kBe], ptube, 3);
7bd7faf8 281
282//
614dff1c 283// Support Ring
7bd7faf8 284//
614dff1c 285 // Mother
ed9bfb0d 286 ptube[0] = kRoutSB;
287 ptube[1] = 4.0;
288 ptube[2] = 0.6;
2942f542 289 TVirtualMC::GetMC()->Gsvolu("QBSR", "TUBE", idtmed[kAlu], ptube,3);
ed9bfb0d 290 // Inner support
291 ptube[0] = kRoutSB;
292 ptube[1] = 3.5;
2942f542 293 TVirtualMC::GetMC()->Gsvolu("QBSS", "TUBE", idtmed[kPA], ptube,3);
294 TVirtualMC::GetMC()->Gspos("QBSS", 1, "QBSR", 0.0, 0.0, 0.0, 0, "ONLY");
7bd7faf8 295
2942f542 296 TVirtualMC::GetMC()->Gspos("QBSR", 1, "QBPM", 0.0, 0.0, 40., 0, "ONLY");
297 TVirtualMC::GetMC()->Gspos("QBSR", 2, "QBPM", 0.0, 0.0, 150., 0, "ONLY");
298 TVirtualMC::GetMC()->Gspos("QBSR", 3, "QBPM", 0.0, 0.0, 260., 0, "ONLY");
299 TVirtualMC::GetMC()->Gspos("QBSR", 4, "QBPM", 0.0, 0.0,- 46., 0, "ONLY");
7bd7faf8 300//
614dff1c 301// Flange and Fixed Point: non absorber side
7bd7faf8 302//
614dff1c 303// ---------->
304//
305// Mother
306 ppcon[0] = 0;
307 ppcon[1] = 360;
308 ppcon[2] = 4;
309// 1:
310 ppcon[3] = -hlenQb29;
eeacf08b 311 ppcon[4] = kRinSt;
614dff1c 312 ppcon[5] = 5.8;
313// 2
314 ppcon[6] = ppcon[3]+3.6;
eeacf08b 315 ppcon[7] = kRinSt;
614dff1c 316 ppcon[8] = 5.8;
317// 3
318 ppcon[9] = ppcon[6];
eeacf08b 319 ppcon[10] = kRinSt;
614dff1c 320 ppcon[11] = 3.6;
321// 4
322 ppcon[12] = hlenQb29;
eeacf08b 323 ppcon[13] = kRinSt;
614dff1c 324 ppcon[14] = 3.6;
7bd7faf8 325
2942f542 326 TVirtualMC::GetMC()->Gsvolu("QB29", "PCON", idtmed[kAir], ppcon,15);
7bd7faf8 327
7bd7faf8 328
614dff1c 329// Flange
eeacf08b 330 ptube[0] = kRinSt;
614dff1c 331 ptube[1] = 5.7;
332 ptube[2] = 1.75;
2942f542 333 TVirtualMC::GetMC()->Gsvolu("QF29","TUBE", idtmed[kInox], ptube, 3);
334 TVirtualMC::GetMC()->Gspos("QF29", 1, "QB29", 0.0, 0.0, -hlenQb29+1.75, 0, "ONLY");
614dff1c 335// Pipe
eeacf08b 336 ptube[0] = kRinSt;
b63a407c 337 ptube[1] = 3.06;
cd9c4f3a 338 ptube[2] = hlenQb29;
2942f542 339 TVirtualMC::GetMC()->Gsvolu("QS29","TUBE", idtmed[kInox], ptube, 3);
340 TVirtualMC::GetMC()->Gspos("QS29", 1, "QB29", 0.0, 0.0, 0., 0, "ONLY");
614dff1c 341// Fixed point
eeacf08b 342 ptube[0] = kRinSt;
614dff1c 343 ptube[1] = 3.5;
344 ptube[2] = 0.3;
2942f542 345 TVirtualMC::GetMC()->Gsvolu("QP29","TUBE", idtmed[kInox], ptube, 3);
346 TVirtualMC::GetMC()->Gspos("QP29", 1, "QB29", 0.0, 0.0, -hlenQb29+9.75+3., 0, "ONLY");
22811e34 347
7bd7faf8 348//
614dff1c 349//
cd9c4f3a 350// Inox beam pipe: final section on non-absorber side
7bd7faf8 351
eeacf08b 352 ptube[0] = kRinSt;
353 ptube[1] = kRoutSt;
cd9c4f3a 354 ptube[2] = hlenQb28;
7bd7faf8 355
2942f542 356 TVirtualMC::GetMC()->Gsvolu("QB28","TUBE", idtmed[kInox], ptube, 3);
a3bbe04e 357//
358//
359// Air with high transport cuts outside QB28
360 ptube[0] = 25.;
361 ptube[1] = 100.;
362 ptube[2] = hlenQb28;
7bd7faf8 363
2942f542 364 TVirtualMC::GetMC()->Gsvolu("QA28","TUBE", idtmed[kAirHigh], ptube, 3);
c03db787 365 gGeoManager->SetVolumeAttribute("QA28", "SEEN", 0);
2196bc42 366// Al-Be (40-60 wgt%, rho=2.7 g/cm**3) beam pipe
367//
614dff1c 368// This section is under study (A.M. 1/2/2002)
765e9e1a 369//
370
eeacf08b 371 ptube[0] = kRinBe;
765e9e1a 372 if (fPipeMaterial == kAlu) {
b63a407c 373 ptube[1] = 3.06;
765e9e1a 374 } else if (fPipeMaterial == kBe) {
eeacf08b 375 ptube[1] = kRoutBe;
765e9e1a 376 } else if (fPipeMaterial == kInox){
eeacf08b 377 ptube[1] = kRoutSt;
765e9e1a 378 }
cd9c4f3a 379 ptube[2] = hlenQbab;
2196bc42 380
2942f542 381 TVirtualMC::GetMC()->Gsvolu("QBAB","TUBE", idtmed[fPipeMaterial], ptube, 3);
2196bc42 382
cd9c4f3a 383// 2.5 mm thick SS tube for hanging pump
614dff1c 384/*
385 ptube[0] = Rin;
7bd7faf8 386 ptube[1] = 3.15;
cd9c4f3a 387 ptube[2] = hlenQb26;
7bd7faf8 388
2942f542 389 TVirtualMC::GetMC()->Gsvolu("QB26","TUBE", idtmed[kInox], ptube, 3);
614dff1c 390*/
7bd7faf8 391//
392// Bellows
fe4da5cc 393//
22811e34 394//
7bd7faf8 395// Mother Volume
614dff1c 396 Float_t pconQBE0[33];
397 pconQBE0[ 0]= 0;
398 pconQBE0[ 1]= 360;
b63a407c 399 pconQBE0[ 2]= 10;
614dff1c 400// 1
b63a407c 401 pconQBE0[ 3] = -kdzbA;
ed9bfb0d 402 pconQBE0[ 4] = kRinSB;
403 pconQBE0[ 5] = kRoutSB;
b63a407c 404//
405 pconQBE0[ 6] = -kdzbA+2.5;
ed9bfb0d 406 pconQBE0[ 7] = kRinSB;
407 pconQBE0[ 8] = kRoutSB;
b63a407c 408// 2
409 pconQBE0[ 9] = -kdzbA+2.5;
ed9bfb0d 410 pconQBE0[10] = kRinSB;
b63a407c 411 pconQBE0[11] = 3.60;
614dff1c 412// 3
b63a407c 413 pconQBE0[12] = -kdzbA+2.5+2.*kdzubA;
ed9bfb0d 414 pconQBE0[13] = kRinSB;
b63a407c 415 pconQBE0[14] = 3.60;
614dff1c 416// 4
b63a407c 417 pconQBE0[15] = -kdzbA+2.5+2.*kdzubA;
ed9bfb0d 418 pconQBE0[16] = kRinSB;
419 pconQBE0[17] = kRoutSB;
b63a407c 420// 5
421 pconQBE0[18] = -kdzbA+2.5+2.*kdzubA+2.*kdzbbA;
ed9bfb0d 422 pconQBE0[19] = kRinSB;
423 pconQBE0[20] = kRoutSB;
614dff1c 424// 6
b63a407c 425 pconQBE0[21] = -kdzbA+2.5+2.*kdzubA+2.*kdzbbA;
ed9bfb0d 426 pconQBE0[22] = kRinSB;
b63a407c 427 pconQBE0[23] = 3.60;
428// 7
429 pconQBE0[24] = -kdzbA+2.5+4.*kdzubA+2.*kdzbbA;
ed9bfb0d 430 pconQBE0[25] = kRinSB;
b63a407c 431 pconQBE0[26] = 3.60;
614dff1c 432// 8
b63a407c 433 pconQBE0[27] = -kdzbA+2.5+4.*kdzubA+2.*kdzbbA;
ed9bfb0d 434 pconQBE0[28] = kRinSB;
435 pconQBE0[29] = kRoutSB;
b63a407c 436// 9
437 pconQBE0[30] = -kdzbA+5.0+4.*kdzubA+2.*kdzbbA;
ed9bfb0d 438 pconQBE0[31] = kRinSB;
439 pconQBE0[32] = kRoutSB;
b63a407c 440
2942f542 441 TVirtualMC::GetMC()->Gsvolu("QBE0", "PCON", idtmed[kAir], pconQBE0, 33);
614dff1c 442//
443// Undulated piece mother
ed9bfb0d 444 ptube[0] = kRinSB;
b63a407c 445 ptube[1] = 3.60;
446 ptube[2] = kdzubA;
2942f542 447 TVirtualMC::GetMC()->Gsvolu("QBEM","TUBE", idtmed[kAir], ptube, 3);
b63a407c 448 dz = -kdzbA+kdzubA+2.5;
2942f542 449 TVirtualMC::GetMC()->Gspos("QBEM", 2 ,"QBE0", 0.0, 0.0, dz, 0 , "ONLY");
450 TVirtualMC::GetMC()->Gspos("QBEM", 1 ,"QBE0", 0.0, 0.0, -dz, idrotm[2012], "ONLY");
614dff1c 451//
452 Float_t pund[30];
453 Float_t uw = 0.02;
b63a407c 454 Float_t ur = 2.*kdzubA-36.*uw;
455 Float_t uz = ur/37.;
614dff1c 456 Float_t ut = uz+uw;
457
458 pund[ 0] = 0;
459 pund[ 1] = 360;
13a638e8 460 pund[ 2] = 8;
614dff1c 461
462 pund[ 3] = -ut;
ed9bfb0d 463 pund[ 4] = kRinSB;
464 pund[ 5] = kRinSB+uw;
614dff1c 465
466 pund[ 6] = -ut+uz;
467 pund[ 7] = pund[4];
468 pund[ 8] = pund[5];
469
470 pund[ 9] = pund[6];
471 pund[10] = pund[4];
b63a407c 472 pund[11] = 3.6;
614dff1c 473
474 pund[12] = pund[9]+uw;
475 pund[13] = pund[10];
476 pund[14] = pund[11];
477
478 pund[15] = pund[12];
b63a407c 479 pund[16] = 3.6-uw;
614dff1c 480 pund[17] = pund[14];
481
482 pund[18] = pund[12]+uz;
483 pund[19] = pund[16];
484 pund[20] = pund[17];
485
486 pund[21] = pund[18];
ed9bfb0d 487 pund[22] = kRinSB;
614dff1c 488 pund[23] = pund[20];
489
490 pund[24] = pund[21]+uw;
491 pund[25] = pund[22];
492 pund[26] = pund[23];
614dff1c 493
2942f542 494 TVirtualMC::GetMC()->Gsvolu("QBEU", "PCON", idtmed[kInox], pund, 27);
614dff1c 495
b63a407c 496 for (i = 0; i < 18; i++)
614dff1c 497 {
b63a407c 498 dz = -kdzubA+(1+2*i)*ut;
2942f542 499 TVirtualMC::GetMC()->Gspos("QBEU", i+1 ,"QBEM", 0.0, 0.0, dz, 0 , "ONLY");
7bd7faf8 500 }
ed9bfb0d 501 ptube[0] = kRinSB;
502 ptube[1] = kRinSB+uw;
614dff1c 503 ptube[2] = uz;
2942f542 504 TVirtualMC::GetMC()->Gsvolu("QBEW","TUBE", idtmed[kInox], ptube, 3);
505 TVirtualMC::GetMC()->Gspos("QBEW", 1 ,"QBEM", 0.0, 0.0, kdzubA-uz, 0 , "ONLY");
b63a407c 506
7bd7faf8 507//
614dff1c 508// BeamPipe
2942f542 509 TVirtualMC::GetMC()->Gsvolu("QBEP","TUBE", idtmed[kInox], ptube, 0);
ed9bfb0d 510 ptube[0] = kRinSB;
511 ptube[1] = kRoutSB;
b63a407c 512 ptube[2] = 1.25;
2942f542 513 TVirtualMC::GetMC()->Gsposp("QBEP", 1 ,"QBE0", 0.0, 0.0, -kdzbA+1.25, 0 , "ONLY", ptube, 3);
514 TVirtualMC::GetMC()->Gsposp("QBEP", 2 ,"QBE0", 0.0, 0.0, kdzbA-1.25, 0 , "ONLY", ptube, 3);
b63a407c 515 ptube[2] = kdzbbA;
2942f542 516 TVirtualMC::GetMC()->Gsposp("QBEP", 3 ,"QBE0", 0.0, 0.0, 0., 0 , "ONLY", ptube, 3);
614dff1c 517//
614dff1c 518//
519// ----> End Bellow
520//
521// **** Placement of various sections on non-absorber side ****
7bd7faf8 522//
cd9c4f3a 523 //
614dff1c 524 // first the beryllium section
525 Float_t zpos = -(hlenQbbe2-hlenQbbe1)/2;
2942f542 526 TVirtualMC::GetMC()->Gspos("QBBE", 1, "QBPM", 0., 0., zpos, 0, "ONLY");
cd9c4f3a 527
528 // next meta-metal transition QBT1 on on-absorber side
614dff1c 529// zpos = zpos + hlenQbbe + hlenQbt1;
2942f542 530// TVirtualMC::GetMC()->Gspos("QBT1", 1, "QBPM", 0., 0., zpos, 0, "ONLY");
cd9c4f3a 531
532 // Aluminium OR Al-be alloy section
614dff1c 533 zpos = hlenQbbe1+hlenQbab;
2942f542 534 TVirtualMC::GetMC()->Gspos("QBAB", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
614dff1c 535 //
cd9c4f3a 536 // inox flange at the start of bellow
cd9c4f3a 537 zpos = zpos + hlenQbab + hlenQb29;
2942f542 538 TVirtualMC::GetMC()->Gspos("QB29", 1, "QBPM", 0.0, 0.0, zpos, idrotm[2012], "ONLY");
614dff1c 539 //
cd9c4f3a 540 // bellow section
cd9c4f3a 541 zpos = zpos + hlenQb29 + hlenQbe0;
2942f542 542 TVirtualMC::GetMC()->Gspos("QBE0", 2 ,"QBPM", 0.0, 0.0, zpos, 0, "ONLY");
614dff1c 543 //
cd9c4f3a 544 // inox flange at the end of bellow and start of thick inox for pump
cd9c4f3a 545 zpos = zpos + hlenQbe0 + hlenQb29;
2942f542 546 TVirtualMC::GetMC()->Gspos("QB29", 2, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
614dff1c 547 //
cd9c4f3a 548 //last inox section till 800 cm
cd9c4f3a 549 zpos = zpos + hlenQb29 + hlenQb28;
2942f542 550 TVirtualMC::GetMC()->Gspos("QB28", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
551 TVirtualMC::GetMC()->Gspos("QA28", 1, "ALIC", 0.0, 0.0, zpos, 0, "ONLY");
614dff1c 552
ed9bfb0d 553//******** end of placement on non-absorber side *********
cd9c4f3a 554 //
555 // **** Absorber side *****
556 //
557 //
614dff1c 558//
559// Beam pipes between elements
ed9bfb0d 560//
2942f542 561 TVirtualMC::GetMC()->Gsvolu("QB24","TUBE", idtmed[kInox], ptube, 0);
eeacf08b 562 ptube[0] = kRinSt;
563 ptube[1] = kRoutSt;
614dff1c 564 ptube[2] = hlenQb24[0];
ed9bfb0d 565 Float_t bpbe[33];
566 bpbe[ 0] = 0.;
567 bpbe[ 1] = 360.;
568 bpbe[ 2] = 10.;
569 // 1
570 bpbe[ 3] = -hlenQb24[0];
571 bpbe[ 4] = kRinSB;
572 bpbe[ 5] = kRoutSB;
573 // 2
574 bpbe[ 6] = hlenQb24[0] - 5.8;
575 bpbe[ 7] = kRinSB;
576 bpbe[ 8] = kRoutSB;
577 // 3
578 bpbe[ 9] = hlenQb24[0] - 5.8;
579 bpbe[10] = kRinSt;
580 bpbe[11] = 3.05;
581 // 4
582 bpbe[12] = hlenQb24[0] - 4.5;
583 bpbe[13] = kRinSt;
584 bpbe[14] = 3.05;
585 // 5
586 bpbe[15] = hlenQb24[0] - 4.5;
587 bpbe[16] = kRinSt;
588 bpbe[17] = kRoutSt ;
589 // 6
590 bpbe[18] = hlenQb24[0] - 3.5;
591 bpbe[19] = kRinSt;
592 bpbe[20] = kRoutSt ;
593 // 7
594 bpbe[21] = hlenQb24[0] - 3.5;
595 bpbe[22] = kRinSt;
596 bpbe[23] = 3.05;
597 // 8
598 bpbe[24] = hlenQb24[0] - 3.0;
599 bpbe[25] = kRinSt;
600 bpbe[26] = 3.05;
601 // 9
602 bpbe[27] = hlenQb24[0] - 3.0;
603 bpbe[28] = kRinSt;
604 bpbe[29] = kRoutSt;
605 // 10
606 bpbe[30] = hlenQb24[0];
607 bpbe[31] = kRinSt;
608 bpbe[32] = kRoutSt;
609
2942f542 610 TVirtualMC::GetMC()->Gsvolu("QA24","PCON", idtmed[kInox], bpbe, 33);
ed9bfb0d 611
612 dz = hlenQbbe2 + hlenQb24[0];
613
2942f542 614 TVirtualMC::GetMC()->Gspos("QA24", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY");
614dff1c 615//
616// Bellow on absorber side
ed9bfb0d 617
b63a407c 618 dz = dz+hlenQb24[0] + kdzbA;
2942f542 619 TVirtualMC::GetMC()->Gspos("QBE0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY");
614dff1c 620//
621 ptube[2] = hlenQb24[1];
eeacf08b 622 dz = dz + kdzb + ptube[2];
2942f542 623 TVirtualMC::GetMC()->Gsposp("QB24", 2 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY", ptube, 3);
614dff1c 624 dz = dz + ptube[2];
7bd7faf8 625
7bd7faf8 626//
7bd7faf8 627// Flange
628//
629// Mother Volume
ed9bfb0d 630 ptube[0] = kRinSB;
7bd7faf8 631 ptube[1] = 4.300;
614dff1c 632 ptube[2] = 1.4;
7bd7faf8 633
2942f542 634 TVirtualMC::GetMC()->Gsvolu("QFA0","TUBE", idtmed[kInox], ptube, 3);
614dff1c 635 dz = dz + ptube[2];
2942f542 636 TVirtualMC::GetMC()->Gspos("QFA0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY");
614dff1c 637 dz = dz + ptube[2];
7bd7faf8 638//
614dff1c 639//
ed9bfb0d 640 ptube[0] = kRinSB;
641 ptube[1] = kRoutSB;
614dff1c 642 ptube[2] = hlenQb24[2];
643 dz = dz + ptube[2];
2942f542 644 TVirtualMC::GetMC()->Gsposp("QB24", 3 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY", ptube, 3);
cd9c4f3a 645
fe4da5cc 646// --- Place the PIPE ghost volume (QBPM) in its mother volume (ALIC)
cd9c4f3a 647// by rotating it to 180 deg. and make it invisible
fe4da5cc 648//
2942f542 649 TVirtualMC::GetMC()->Gspos("QBPM",1,"ALIC", 0, 0, 0, 0, "ONLY");
650 TVirtualMC::GetMC()->Gsbool("QBPM", "L3DX");
651 TVirtualMC::GetMC()->Gsbool("QBPM", "L3O3");
652 TVirtualMC::GetMC()->Gsbool("QBPM", "L3O4");
7bd7faf8 653
cd9c4f3a 654
7bd7faf8 655//
cd9c4f3a 656// ******** Ion Pump volume description starts here ******
7bd7faf8 657//
7bd7faf8 658 //
659 // Getters ->
660 pbox[0] = 6.50;
661 pbox[1] = 6.75;
662 pbox[2] = 15.60;
2942f542 663 TVirtualMC::GetMC()->Gsvolu("QI32","BOX", idtmed[kInox], pbox, 3);
7bd7faf8 664
665 pbox[0] = 5.90;
666 pbox[1] = 6.15;
667 pbox[2] = 15.00;
2942f542 668 TVirtualMC::GetMC()->Gsvolu("QI42","BOX", idtmed[kGetter], pbox, 3);
669 TVirtualMC::GetMC()->Gspos("QI42", 1, "QI32", 0.0, 0.0, 0.0, 0, "ONLY");
7bd7faf8 670// <-
671
672 ptube[0] = 0.0;
673 ptube[1] = 19.0;
674 ptube[2] = 2.5;
2942f542 675 TVirtualMC::GetMC()->Gsvolu("QI33","TUBE", idtmed[kInox], ptube, 3);
7bd7faf8 676
677
678 ptube[0] = 0.0;
679 ptube[1] = 15.0;
680 ptube[2] = 2.5;
2942f542 681 TVirtualMC::GetMC()->Gsvolu("QI43","TUBE", idtmed[kAir], ptube, 3);
682 TVirtualMC::GetMC()->Gspos("QI43", 1, "QI33", 0.0, 0.0, 0.0, 0, "ONLY");
7bd7faf8 683//
684// Connecting tube ->
685 ptube[0] = 0.0;
d013be8e 686 ptube[1] = 4.5;
cd9c4f3a 687 ptube[2] = 14.6;
2942f542 688 TVirtualMC::GetMC()->Gsvolu("QI34","TUBE", idtmed[kInox], ptube, 3);
7bd7faf8 689
690 ptube[0] = 0.0;
d013be8e 691 ptube[1] = 3.9;
cd9c4f3a 692 ptube[2] = 14.6;
2942f542 693 TVirtualMC::GetMC()->Gsvolu("QI44","TUBE", idtmed[kAir], ptube, 3);
694 TVirtualMC::GetMC()->Gspos("QI44", 1, "QI34", 0.0, 0.0, 0.0, 0, "ONLY");
7bd7faf8 695// <-
696
697 //
698 // Flange ->
d013be8e 699 ptube[0] = 4.6;
7bd7faf8 700 ptube[1] = 7.30;
701 ptube[2] = 2.15;
2942f542 702 TVirtualMC::GetMC()->Gsvolu("QI35","TUBE", idtmed[kInox], ptube, 3);
7bd7faf8 703// <-
2942f542 704 TVirtualMC::GetMC()->Gspos("QI32", 1, "QBPM", 0.0, -44.25, zPump, 0, "ONLY");
705 TVirtualMC::GetMC()->Gspos("QI33", 1, "QBPM", 0.0, -35.00, zPump,idrotm[2002], "ONLY");
706 TVirtualMC::GetMC()->Gspos("QI34", 1, "QBPM", 0.0, -17.90, zPump,idrotm[2002], "ONLY");
707 TVirtualMC::GetMC()->Gspos("QI35", 1, "QBPM", 0.0, -24.35, zPump,idrotm[2002], "ONLY");
fe4da5cc 708
c03db787 709 gGeoManager->SetVolumeAttribute("QBPM", "SEEN", 1);
710 gGeoManager->SetVolumeAttribute("QBEM", "SEEN", 1);
fe4da5cc 711}
712
cd9c4f3a 713
fe4da5cc 714
715//___________________________________________
716void AliPIPEv0::CreateMaterials()
717{
7bd7faf8 718 //
13391c3e 719 // Define materials for beam pipe
7bd7faf8 720 //
13391c3e 721
4951e003 722 AliDebugClass(1,"Create PIPEv0 materials");
f7a1cc68 723 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
724 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
2196bc42 725 // Steel (Inox)
7bd7faf8 726 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
727 Float_t zsteel[4] = { 26.,24.,28.,14. };
728 Float_t wsteel[4] = { .715,.18,.1,.005 };
2196bc42 729 // AlBe - alloy
730 Float_t aAlBe[2] = { 26.98, 9.01};
731 Float_t zAlBe[2] = { 13.00, 4.00};
732 Float_t wAlBe[2] = { 0.4, 0.6};
ed9bfb0d 733 //
734 // Polyamid
735 Float_t aPA[4] = {16., 14., 12., 1.};
736 Float_t zPA[4] = { 8., 7., 6., 1.};
737 Float_t wPA[4] = { 1., 1., 6., 11.};
002b3738 738 //
739 // Air
740 //
741 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
742 Float_t zAir[4]={6.,7.,8.,18.};
743 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
744 Float_t dAir = 1.20479E-3;
d013be8e 745 Float_t dAir1 = 1.20479E-10;
a3bbe04e 746 //
747 // Kapton
748 //
749 Float_t aKapton[4]={1.00794,12.0107, 14.010,15.9994};
750 Float_t zKapton[4]={1.,6.,7.,8.};
751 Float_t wKapton[4]={0.026362,0.69113,0.07327,0.209235};
752 Float_t dKapton = 1.42;
7bd7faf8 753 //
754 // Berillium
755 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
756 //
757 // Carbon
758 AliMaterial(6, "CARBON$ ", 12.01, 6., 2.265, 18.8, 49.9);
759 //
760 // Aluminum
761 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
762 //
763 // Air
a3bbe04e 764 AliMixture(15, "AIR$", aAir, zAir, dAir, 4, wAir);
765 AliMixture(35, "AIR_HIGH$", aAir, zAir, dAir, 4, wAir);
7bd7faf8 766 //
767 // Vacuum
d013be8e 768 AliMixture(16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);
7bd7faf8 769 //
770 // stainless Steel
771 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
772 //
773 // reduced density steel to approximate pump getter material
774 AliMixture(20, "GETTER$", asteel, zsteel, 1.00, 4, wsteel);
2196bc42 775 // Al-Be alloy
776 //
777 AliMixture(21, "AlBe$", aAlBe, zAlBe, 2.07, 2, wAlBe);
ed9bfb0d 778 // Polyamid
779 //
780 AliMixture(22, "PA$", aPA, zPA, 1.14, -4, wPA);
7bd7faf8 781 //
a3bbe04e 782 // Kapton
783 AliMixture(23, "KAPTON", aKapton, zKapton, dKapton, 4, wKapton);
784 //
7bd7faf8 785 // ****************
786 // Defines tracking media parameters.
787 //
788 Float_t epsil = .001; // Tracking precision,
789 Float_t stemax = -0.01; // Maximum displacement for multiple scat
790 Float_t tmaxfd = -20.; // Maximum angle due to field deflection
791 Float_t deemax = -.3; // Maximum fractional energy loss, DLS
792 Float_t stmin = -.8;
793 // ***************
794 //
795 // Beryllium
796
797 AliMedium(5, "BE", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
798
799 // Carbon
800 AliMedium(6, "C", 6, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
801 //
802 // Aluminum
803 AliMedium(9, "ALU", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
804 //
805 // Air
a3bbe04e 806 AliMedium(15, "AIR", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
807 AliMedium(35, "AIR_HIFG",35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
7bd7faf8 808 //
809 // Vacuum
810 AliMedium(16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
811 //
812 // Steel
813 AliMedium(19, "INOX", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
814 //
815 // Getter
816 AliMedium(20, "GETTER", 20, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
2196bc42 817 //
818 // AlBe - Aloy
819 AliMedium(21, "AlBe" , 21, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
ed9bfb0d 820 //
821 // Polyamid
822 AliMedium(22, "PA" , 22, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
a3bbe04e 823 //
824 // KAPTON
825 AliMedium(23, "KAPTON", 23, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
2196bc42 826
fe4da5cc 827}
828
829
fe4da5cc 830
831
832
833
834
835
836
837