]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliPIPEv0.cxx
New files for folders and Stack
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv0.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.15  2001/05/02 11:50:18  morsch
19 New layout of the non-absorber side provided by Y. Viyogi. Not the final design
20 but the prsent most realistic.
21
22 Revision 1.14  2001/01/20 16:56:33  morsch
23 Put air in connecting tubes and flanges of vacuum pump.
24
25 Revision 1.13  2001/01/20 16:35:27  morsch
26 Increase mother volume for bellows.
27
28 Revision 1.12  2000/12/21 16:41:06  morsch
29 Coding convention clean-up (RS3)
30
31 Revision 1.11  2000/11/28 16:06:57  morsch
32 Undulated beam-pipe replaced by Al-Be (40,60) pipe 1.5 mm thick.
33
34 Revision 1.10  2000/11/24 13:00:37  morsch
35 - Geometry and materials imported from euclid output
36 - include comments
37 - better struturing of volume tree
38 - improved version of flange close to front absorber
39 - more realistic pump materials
40 - undulated beam pipe imported from v3.
41
42 Revision 1.9  2000/10/02 21:28:15  fca
43 Removal of useless dependecies via forward declarations
44
45 Revision 1.8  2000/06/11 12:37:01  morsch
46 Coding rule violations corrected
47
48 Revision 1.7  2000/02/23 16:25:24  fca
49 AliVMC and AliGeant3 classes introduced
50 ReadEuclid moved from AliRun to AliModule
51
52 Revision 1.6  1999/09/29 09:24:30  fca
53 Introduction of the Copyright and cvs Log
54
55 */
56
57 ////////////////////////////////////////////////
58 //  Beam pipe class                            /
59 ////////////////////////////////////////////////
60
61 #include "AliPIPEv0.h"
62 #include "AliRun.h"
63 #include "AliConst.h"
64 #include "AliMagF.h"
65 #include "AliMC.h"
66 #include "TSystem.h"
67  
68 ClassImp(AliPIPEv0)
69  
70 //_____________________________________________________________________________
71 AliPIPEv0::AliPIPEv0()
72 {
73 // Constructor
74 }
75
76 //_____________________________________________________________________________
77 AliPIPEv0::AliPIPEv0(const char *name, const char *title)
78   : AliPIPE(name,title)
79 {
80 // Constructor
81 }
82
83  
84 //___________________________________________
85 void AliPIPEv0::CreateGeometry()
86 {
87 //Begin_Html
88 /*
89 <img src="picts/pipe.gif">
90 */
91 //End_Html
92
93
94 //Begin_Html
95 /*
96 <img src="picts/tree_pipe.gif">
97 */
98 //End_Html
99
100     if(fDebug) printf("%s: Create PIPEv0 geometry \n",ClassName());
101   
102
103     Int_t *idtmed = fIdtmed->GetArray();
104     Float_t ppcon[48], ptube[3], pbox[3];
105     Int_t i=0;
106     
107     enum {kC=6, kAlu=9, kInox=19, kGetter=20, kBe=5, kVac=16, kAir=15, kAlBe=21};
108     
109     Int_t   idrotm[2099];  
110     AliMatrix(idrotm[2001],90.,240.,  0.,  0., 90.,150.);
111     AliMatrix(idrotm[2002],90.,  0.,  0.,  0., 90.,270.);
112     AliMatrix(idrotm[2003],90.,120.,  0.,  0., 90., 30.);
113     AliMatrix(idrotm[2004],90.,315., 90., 45.,  0.,  0.);
114     AliMatrix(idrotm[2005],90.,270., 90.,  0.,  0.,  0.);
115     AliMatrix(idrotm[2006],90.,225., 90.,315.,  0.,  0.);
116     AliMatrix(idrotm[2007],90.,180., 90.,270.,  0.,  0.);
117     AliMatrix(idrotm[2008],90.,135., 90.,225.,  0.,  0.);
118     AliMatrix(idrotm[2009],90., 90., 90.,180.,  0.,  0.);
119     AliMatrix(idrotm[2010],90., 45., 90.,135.,  0.,  0.);
120     idrotm[2011] = 0;
121     AliMatrix(idrotm[2012],90.,180., 90., 90.,180.,  0.);
122     AliMatrix(idrotm[2013],90.,  0., 90., 90.,180.,  0.);
123
124     
125 //
126 // The peam pipe up to the Front Absorber
127 //
128 // Mother Volume QBPM
129     const Float_t dbe1 = 15.;
130     const Float_t dbe2 = 15.;
131     ppcon[0]  =    0;
132     ppcon[1]  =  360;
133     ppcon[2]  =   15;
134 //  1: 
135     ppcon[3]  = - 90;
136     ppcon[4]  =    0;
137     ppcon[5]  =    5.8;
138 //  2
139     ppcon[6]  = - 81.0;
140     ppcon[7]  =    0.;
141     ppcon[8]  =    5.8;
142 //  3
143     ppcon[9]  = - 81.;
144     ppcon[10]  =    0.;
145     ppcon[11] =    4.22;
146 //  4
147     ppcon[12] = - 28.00-dbe2;
148     ppcon[13] =    0;
149     ppcon[14] =    4.22;
150 //  5
151     ppcon[15] = - 28.00-dbe2;
152     ppcon[16] =    0;
153     ppcon[17] =    3.2;
154 //  6
155     ppcon[18] =    0;
156     ppcon[19] =    0;
157     ppcon[20] =    3.2;
158 //  7
159     ppcon[21] =    28.+dbe1;
160     ppcon[22] =    0;
161     ppcon[23] =    3.2;
162 //  8
163     ppcon[24] =   28.+dbe1;
164     ppcon[25] =    0;
165     ppcon[26] =    4.22;
166 //  9
167     ppcon[27] =  250;
168     ppcon[28] =    0;
169     ppcon[29] =   4.22;
170 // 10
171     ppcon[30] =  250;
172     ppcon[31] =    0;
173     ppcon[32] =    5;
174 // 11
175     ppcon[33] =  365;
176     ppcon[34] =    0;
177     ppcon[35] =    5;
178 // 12
179     ppcon[36] =  365;
180     ppcon[37] =    0;
181     ppcon[38] =   56;
182 // 13
183     ppcon[39] =  405;
184     ppcon[40] =    0;
185     ppcon[41] =   56;
186 // 14
187     ppcon[42] =  405;
188     ppcon[43] =    0;
189     ppcon[44] =   5;
190 // 15
191     ppcon[45] =  800;
192     ppcon[46] =    0;
193     ppcon[47] =    5;
194     
195     gMC->Gsvolu("QBPM", "PCON", idtmed[kAir], ppcon, 48);
196
197 //
198 // The Vacuum 
199     ptube[0] =   0.0;
200     ptube[1] =   2.9;
201     ptube[2] = 445.0;
202     
203     gMC->Gsvolu("QBVA","TUBE", idtmed[kVac], ptube, 3);
204     gMC->Gspos ("QBVA", 1, "QBPM", 0., 0., 355., 0, "ONLY");
205 //
206 // volume definitions of various sections
207 //
208 //  distance between bellows
209     const Float_t dzbb =  8.0;
210 //  size of bellow
211     const Float_t dzb  = 11.4;
212
213     //half-lengths of various beam pipe sections
214     Float_t hlenQbbe=43.3;
215     Float_t hlenQbt1=5.5/2.;
216     Float_t hlenQbab=286.6/2.;
217     Float_t hlenQb10=286.6/2.;
218     Float_t hlenQb29=4.4/2.;
219     Float_t hlenQbe0=(2.* dzb + dzbb)/2.;
220     Float_t hlenQb26=20./2.;
221     Float_t hlenQb28=400.6/2.;
222
223 // Be Pipe in central Alice : length 43.3 * 2
224     ptube[0] =  2.90;
225     ptube[1] =  3.00;
226     ptube[2] = hlenQbbe;
227     
228     gMC->Gsvolu("QBBE","TUBE", idtmed[kBe], ptube, 3);
229     
230 //
231 // Metal-Metal Transitions : non-absorber side
232 //
233 //  Be-Al (or Be to Be-Al alloy)
234 //  Mother Volume
235     ptube[0] = 2.900;
236     ptube[1] = 4.200;
237     ptube[2] = hlenQbt1;
238     gMC->Gsvolu("QBT1","TUBE", idtmed[kAir], ptube, 3);
239
240     ptube[0] = 2.900;
241     ptube[1] = 3.150;
242     ptube[2] = 0.375;
243     //
244     //  Be-part
245     gMC->Gsvolu("QB01","TUBE", idtmed[kAlu], ptube, 3);
246
247     ptube[1] = 3.000;
248     gMC->Gsvolu("QBA1","TUBE", idtmed[kBe], ptube, 3);
249
250     gMC->Gspos("QBA1", 1, "QB01", 0., 0., 0, 0, "ONLY");
251     gMC->Gspos("QB01", 1, "QBT1", 0., 0.,-2.75+ptube[2], 0, "ONLY");
252
253     //  Al-part
254     //
255     ptube[0] = 2.900;
256     ptube[1] = 3.150;
257     ptube[2] = 2.375;
258
259     gMC->Gsvolu("QB03","TUBE", idtmed[kAlu], ptube, 3);
260     gMC->Gspos("QB03", 1, "QBT1", 0., 0.,-2.+ptube[2], 0, "ONLY");
261     
262     
263     ptube[0] = 3.15;
264     ptube[1] = 3.50;
265     ptube[2] = 0.10;
266
267     gMC->Gsvolu("QB05","TUBE", idtmed[kAlu], ptube, 3);
268     gMC->Gspos("QB05", 1, "QBT1", 0., 0., 2.55+ptube[2], 0, "ONLY");
269     
270     
271     // Fixations
272     ptube[0] = 0.0;
273     ptube[1] = 0.1;
274     ptube[2] = 0.5;
275     
276     gMC->Gsvolu("QB08","TUBE", idtmed[kInox], ptube, 3);
277     gMC->Gspos("QB08", 1 ,"QBT1",  0.000,  3.650, -1.25, idrotm[2002], "ONLY");
278     gMC->Gspos("QB08", 2 ,"QBT1",  3.161, -1.825, -1.25, idrotm[2001], "ONLY");
279     gMC->Gspos("QB08", 3 ,"QBT1", -3.161, -1.825, -1.25, idrotm[2003], "ONLY");
280     
281     // Carbon ring
282     ptube[0] = 3.15;
283     ptube[1] = 4.10;
284     ptube[2] = 0.55;
285     
286     gMC->Gsvolu("QB07","TUBE", idtmed[kC], ptube, 3);
287
288     ptube[0] = 3.15;
289     ptube[1] = 3.50;
290     ptube[2] = 0.10;
291     gMC->Gsvolu("QBA7","TUBE", idtmed[kInox], ptube, 3);
292     gMC->Gspos("QBA7", 1, "QB07", 0.0, 0.0, 0.55-0.2, 0, "ONLY");
293     gMC->Gspos("QB07", 1, "QBT1", 0.0, 0.0, 2., 0, "ONLY");
294
295
296 //
297 // 1st section Alu non-absorber side
298     ptube[0] = 2.9;
299     ptube[1] = 3.0;
300     ptube[2] = hlenQb10;
301     
302     gMC->Gsvolu("QB10","TUBE", idtmed[kAlu], ptube, 3);
303 //
304 // Support rollers: non absorber side
305 //
306 //  Mother volume
307     ptube[0] = 3.2;
308     ptube[1] = 4.8;
309     ptube[2] = 3.0;
310     gMC->Gsvolu("QBRM","TUBE", idtmed[kAir], ptube, 3);
311
312     ptube[0] = 0.0;
313     ptube[1] = 0.7;
314     ptube[2] = 3.0;
315     
316     gMC->Gsvolu("QB30","TUBE", idtmed[kInox], ptube, 3);
317     
318     for (i=0; i<8; i++) {
319         Float_t phi = 45.+i*45.*kDegrad;
320         Float_t xpos = 4.*TMath::Sin(phi);
321         Float_t ypos = 4.*TMath::Cos(phi);
322         gMC->Gspos("QB30", i+1, "QBRM", xpos, ypos, 0, idrotm[2004+i], "ONLY");
323     }
324
325 //
326 // Flanges: non absorber side
327     ptube[0] = 3.0;
328     ptube[1] = 4.9;
329     ptube[2] = hlenQb29;
330     
331     gMC->Gsvolu("QB29","TUBE", idtmed[kInox], ptube, 3);
332
333 //
334 // Inox beam pipe: final section on non-absorber side
335
336     ptube[0] =   2.90;
337     ptube[1] =   2.98;
338     ptube[2] =   hlenQb28;    
339
340     gMC->Gsvolu("QB28","TUBE", idtmed[kInox], ptube, 3);
341
342 //
343 //  Undulated beam pipe
344 // 
345 /*
346     Float_t pitch=0.25;
347     Float_t thick=0.015;
348     Float_t zundul=171;
349     Float_t rundul=3.0;
350     char cn48[][5]={"QN21","QN22","QN23","QN24","QN25","QN26","QN27","QN28"};
351
352     Undulation("QUND",pitch,thick,zundul,rundul,cn48);
353     gMC->Gspos("QUND", 1, "QBPM", 0., 0., 335.+zundul, 0, "ONLY");
354 */
355
356 //  Al-Be (40-60 wgt%, rho=2.7 g/cm**3) beam pipe
357 //
358     ptube[0] =   2.90;
359     ptube[1] =   3.05;
360     ptube[2] =   hlenQbab;    
361
362     gMC->Gsvolu("QBAB","TUBE", idtmed[kAlBe], ptube, 3);
363
364     
365 //
366 //  last piece : inox pipe from pump till end 
367 //
368     //ptube[0] =   2.90;
369     //ptube[1] =   2.98;
370     //ptube[2] =  61.55;    
371
372     //gMC->Gsvolu("QB48","TUBE", idtmed[kInox], ptube, 3);
373
374 /*
375     ptube[0] = 2.90;
376     ptube[1] = 2.98;
377     ptube[2] = 1.0;
378     
379     gMC->Gsvolu("QB27","TUBE", idtmed[kInox], ptube, 3);
380     gMC->Gspos("QB27", 1, "QBPM", 0.0, 0.0, 208.1, 0, "ONLY");
381 */
382 //
383 // Aluminium collar for support rollers
384     
385     gMC->Gsvolu("QB25","TUBE", idtmed[kAlu], ptube, 0);
386
387
388 // 2.5 mm thick SS tube for hanging pump
389     ptube[0] = 2.90;
390     ptube[1] = 3.15;
391     ptube[2] = hlenQb26;
392     
393     gMC->Gsvolu("QB26","TUBE", idtmed[kInox], ptube, 3);
394
395 //
396 // Bellows
397 //
398 // Mother Volume
399     ptube[0] =  2.90;
400     ptube[1] =  3.75;
401     ptube[2] = (2.*dzb+dzbb)/2.;
402     gMC->Gsvolu("QBE0","TUBE", idtmed[kAir], ptube, 3);
403
404     ptube[2] = dzb/2.;
405
406     gMC->Gsvolu("QBEM","TUBE", idtmed[kAir], ptube, 3);
407     Float_t dz = (dzb+dzbb)/2.;
408     gMC->Gspos("QBEM", 2 ,"QBE0", 0.0, 0.0, -dz, 0 , "ONLY");
409     gMC->Gspos("QBEM", 1 ,"QBE0", 0.0, 0.0,  dz, idrotm[2012], "ONLY");
410     
411     ptube[0] = 2.90;
412     ptube[1] = 3.25;
413     ptube[2] = 3.70;
414     
415     gMC->Gsvolu("QB19","TUBE", idtmed[kVac], ptube, 3);
416     gMC->Gspos("QB19", 1 ,"QBEM", 0.0, 0.0, 0.5, 0 , "ONLY");
417     
418     ptube[0] = 3.25;
419     ptube[1] = 3.74;
420     ptube[2] = 0.095;
421     
422     gMC->Gsvolu("QB18","TUBE", idtmed[kVac], ptube, 3);
423     for (i=0; i<15; i++) {
424         gMC->Gspos("QB18", i+1, "QBEM", 0.0, 0.0, 3.3-i*0.4, 0, "ONLY");
425     }
426     
427     ptube[0] = 2.90;
428     ptube[1] = 3.00;
429     ptube[2] = 1.20;
430     
431     gMC->Gsvolu("QB21","TUBE", idtmed[kVac], ptube, 3);
432     gMC->Gspos("QB21", 1 ,"QBEM", 0.0, 0.0, -4.5, 0 , "ONLY");
433     
434     ptube[0] = 3.250;
435     ptube[1] = 3.750;
436     ptube[2] = 0.005;
437     
438     gMC->Gsvolu("QB15","TUBE", idtmed[kInox], ptube, 3);
439     for (i=0; i<30; i++) {
440         gMC->Gspos("QB15", i+1, "QBEM", 0.0, 0.0, 3.4-i*0.2, 0, "ONLY");
441     }
442     
443     ptube[0] = 3.740;
444     ptube[1] = 3.750;
445     ptube[2] = 0.095;
446     
447     gMC->Gsvolu("QB16","TUBE", idtmed[kInox], ptube, 3);
448     for (i=0; i<15; i++) {
449         gMC->Gspos("QB16", i+1, "QBEM", 0.0, 0.0, 3.3-i*0.4, 0, "ONLY");
450     }
451     
452     ptube[0] = 3.250;
453     ptube[1] = 3.260;
454     ptube[2] = 0.095;
455     
456     gMC->Gsvolu("QB17","TUBE", idtmed[kInox], ptube, 3);
457     for (i=0; i<14; i++) {
458         gMC->Gspos("QB17", i+1, "QBEM", 0.0, 0.0, 3.1-i*0.4, 0, "ONLY");
459     }
460     
461     ptube[0] = 3.250;
462     ptube[1] = 3.260;
463     ptube[2] = 0.3975;
464
465     gMC->Gsvolu("QB14","TUBE", idtmed[kInox], ptube, 3);
466     gMC->Gspos("QB14", 2 ,"QBEM", 0.0, 0.0, -2.8025, 0 , "ONLY");
467     gMC->Gspos("QB14", 1 ,"QBEM", 0.0, 0.0,  3.8025, 0 , "ONLY");
468     
469     ptube[0] = 2.900;
470     ptube[1] = 3.260;
471     ptube[2] = 0.050;
472     
473     gMC->Gsvolu("QB13","TUBE", idtmed[kInox], ptube, 3);
474     gMC->Gspos("QB13", 2 ,"QBEM", 0.0, 0.0, -3.25, 0 , "ONLY");
475     gMC->Gspos("QB13", 1 ,"QBEM", 0.0, 0.0,  4.25, 0 , "ONLY");
476     
477     ptube[0] = 2.900;
478     ptube[1] = 3.000;
479     ptube[2] = 0.700;
480     
481     gMC->Gsvolu("QB12","TUBE", idtmed[kInox], ptube, 3);
482     gMC->Gspos("QB12", 1 ,"QBEM", 0.0, 0.0, 5.0, 0, "ONLY");
483
484
485 //
486 //  pipe between Bellows
487     ptube[0] = 2.9;
488     ptube[1] = 3.0;
489     ptube[2] = dzbb/2.;
490     gMC->Gsvolu("QB23","TUBE", idtmed[kInox], ptube, 3);
491     gMC->Gspos("QB23", 1 ,"QBE0", 0.0, 0.0, 0.0, 0, "ONLY");
492     
493 //
494 // End Bellow
495
496 // **** placement of various sections on non-absorber side ****
497     //
498     // first the beryllium section : 43.3 cm long on both sides of IP
499     // zstart=0, zend=43.3, length=43.3 on one side
500     Float_t zpos=0;
501     gMC->Gspos("QBBE", 1, "QBPM", 0., 0., zpos, 0, "ONLY");
502
503     // next meta-metal transition QBT1 on on-absorber side
504     // zstart=43.3, zend=48.8, length=5.5
505     zpos = zpos + hlenQbbe + hlenQbt1;
506     gMC->Gspos("QBT1", 1, "QBPM", 0., 0.,  zpos, 0, "ONLY");
507     
508     // Aluminium OR Al-be alloy section
509     //zpos=zpos + hlenQbt1 + hlenQb10;
510     //gMC->Gspos("QB10", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
511     // zstart= 48.8, zend=335.4, length=286.6
512     zpos = zpos + hlenQbt1 + hlenQbab;
513     gMC->Gspos("QBAB", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
514
515     // inox flange at the start of bellow
516     // zstart=335.4, zend=339.8, length=4.4
517     zpos = zpos + hlenQbab + hlenQb29;
518     gMC->Gspos("QB29", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
519
520     // bellow section
521     // zstart=339.8, zend=370.6, length=30.9
522     zpos = zpos + hlenQb29 + hlenQbe0;
523     gMC->Gspos("QBE0", 2 ,"QBPM", 0.0, 0.0, zpos, 0, "ONLY");
524
525     // inox flange at the end of bellow and start of thick inox for pump
526     // zstart=370.6, zend=375.0, length=4.4
527     zpos = zpos + hlenQbe0 + hlenQb29;
528     gMC->Gspos("QB29", 2, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
529
530     // 2.5mm thick inox section to hang the pump
531     // zstart=375.0, zend=395.0, length=20.0
532     zpos = zpos + hlenQb29 + hlenQb26;
533     gMC->Gspos("QB26", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
534
535     //inox flange at the end of pump section to join to next pipe
536     // zstart=395.0, zend=399.4, length=4.4
537     zpos = zpos + hlenQb26 + hlenQb29;
538     gMC->Gspos("QB29", 3, "QBPM", 0.0, 0.0, zpos, 0, "ONLY");
539
540     //last inox section till 800 cm
541     // zstart=399.4, zend=800., length=400.6
542     zpos = zpos + hlenQb29 + hlenQb28;
543     gMC->Gspos("QB28", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); 
544
545
546     // aluminium collars and support rollers at two places
547
548     ptube[0] = 3.0;
549     ptube[1] = 3.15;
550     ptube[2] = 2.75;
551
552     gMC->Gsposp("QB25", 1, "QBPM", 0., 0., 654.8, 0, "ONLY", ptube, 3);
553     gMC->Gspos("QBRM", 1, "QBPM", 0., 0., 654.8, 0, "ONLY");
554
555     ptube[0] = 3.05;
556     ptube[1] = 3.20;
557     gMC->Gsposp("QB25", 2, "QBPM", 0., 0., 254.8, 0, "ONLY", ptube, 3);
558     gMC->Gspos("QBRM", 2, "QBPM", 0., 0., 254.8, 0, "ONLY");
559
560
561
562 //******** end of placement on no-absorber side *********
563
564     //
565     // **** Absorber side *****   
566     //
567     //
568     //  metal-metal transition :  Be-Alu on absorber side
569     //  Mother Volume
570     ptube[0] = 2.900;
571     ptube[1] = 4.200;
572     ptube[2] = 2.750;
573     gMC->Gsvolu("QBT2","TUBE", idtmed[kAir], ptube, 3);
574     // z  = 43.3 - 48.8
575     gMC->Gspos("QBT2", 1, "QBPM", 0., 0., -hlenQbbe-ptube[2], idrotm[2012], "ONLY");
576
577     ptube[0] = 2.900;
578     ptube[1] = 3.150;
579     ptube[2] = 0.375;
580     //
581     //  Be-part
582     gMC->Gsvolu("QB02","TUBE", idtmed[kAlu], ptube, 3);
583
584     ptube[1] = 3.000;
585     gMC->Gsvolu("QBA2","TUBE", idtmed[kBe], ptube, 3);
586
587     gMC->Gspos("QBA2", 1, "QB02", 0., 0., 0, 0, "ONLY");
588 //  z = -2.75 -> -2.00
589     gMC->Gspos("QB02", 1, "QBT2", 0., 0.,-2.75+ptube[2], 0, "ONLY");
590
591     // Alu part    
592     ptube[0] = 2.900;
593     ptube[1] = 3.150;
594     ptube[2] = 2.375;
595 // z = -2.00 -> 2.75
596     gMC->Gsvolu("QB04","TUBE", idtmed[kAlu], ptube, 3);
597     gMC->Gspos("QB04", 1, "QBT2", 0., 0.,-2.+ptube[2], 0, "ONLY");
598     
599     
600     ptube[0] = 3.15;
601     ptube[1] = 3.50;
602     ptube[2] = 0.10;
603 // z = 2.55 -> 2.75
604     gMC->Gsvolu("QB06","TUBE", idtmed[kAlu], ptube, 3);
605     gMC->Gspos("QB06", 1, "QBT2", 0., 0., 2.55+ptube[2], 0, "ONLY");
606     
607     
608     // Fixation
609     ptube[0] = 0.0;
610     ptube[1] = 0.1;
611     ptube[2] = 0.5;
612     
613     gMC->Gsvolu("QBA8","TUBE", idtmed[kInox], ptube, 3);
614     gMC->Gspos("QBA8", 1 ,"QBT2",  0.000,  3.650, -1.25, idrotm[2002], "ONLY");
615     gMC->Gspos("QBA8", 2 ,"QBT2",  3.161, -1.825, -1.25, idrotm[2001], "ONLY");
616     gMC->Gspos("QBA8", 3 ,"QBT2", -3.161, -1.825, -1.25, idrotm[2003], "ONLY");
617     
618     // Carbon ring
619     ptube[0] = 3.15;
620     ptube[1] = 4.10;
621     ptube[2] = 0.55;
622     
623     gMC->Gsvolu("QB77","TUBE", idtmed[kC], ptube, 3);
624
625     ptube[0] = 3.15;
626     ptube[1] = 3.50;
627     ptube[2] = 0.10;
628     gMC->Gsvolu("QBB7","TUBE", idtmed[kInox], ptube, 3);
629     gMC->Gspos("QBB7", 1, "QB77", 0.0, 0.0, 0.55-0.2, 0, "ONLY");
630     gMC->Gspos("QB77", 1, "QBT2", 0.0, 0.0, 2., 0, "ONLY");
631
632
633 // beam pipe between metal-metal transition and bellows
634     ptube[0] = 2.9;
635     ptube[1] = 3.0;
636     ptube[2] = (81.7-(2.*dzb+dzbb)-(hlenQbbe+5.5))/2.;
637     
638
639     gMC->Gsvolu("QB24","TUBE", idtmed[kInox], ptube, 3);
640 //  z = 48.8 - 50.9    
641     dz = (hlenQbbe+5.5)+ptube[2];
642     gMC->Gspos("QB24", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY");
643 //
644 // beam pipe between flange and bellows    
645     ptube[0] = 2.90;
646     ptube[1] = 3.00;
647     ptube[2] = 0.45;
648
649     gMC->Gsvolu("QB22","TUBE", idtmed[kInox], ptube, 3);
650     gMC->Gspos("QB22", 1 ,"QBPM", 0.0, 0.0, -82.15, 0, "ONLY");
651
652 // 
653 // Flange
654 // 
655 //  Mother Volume
656     ptube[0] = 2.900;
657     ptube[1] = 4.300;
658     ptube[2] = 1.400;
659     
660     gMC->Gsvolu("QFA0","TUBE", idtmed[kAlu], ptube, 3);
661     gMC->Gspos("QFA0", 1 ,"QBPM", 0.0, 0.0, -84.0, 0, "ONLY");
662 //
663 //  inner Inox piece
664     ptube[0] = 2.900;
665     ptube[1] = 3.500;
666     ptube[2] = 0.450;
667     gMC->Gsvolu("QFA1","TUBE", idtmed[kInox], ptube, 3);
668     gMC->Gspos("QFA1", 1 ,"QFA0", 0.0, 0.0, 0.225, 0, "ONLY");
669 //
670 //  8 x M5 Inox
671     ptube[0] = 0.000;
672     ptube[1] = 0.250;
673     ptube[2] = 1.400;
674     gMC->Gsvolu("QFA2","TUBE", idtmed[kInox], ptube, 3);
675     for (i=0; i<8; i++) {
676         Float_t phi = i*45.*kDegrad;
677         Float_t xpos = 3.9*TMath::Sin(phi);
678         Float_t ypos = 3.9*TMath::Cos(phi);
679         gMC->Gspos("QFA2", i+1, "QFA0", xpos, ypos, 0., 0, "ONLY");
680     }
681
682
683     ptube[0] = 2.900;
684     ptube[1] = 3.000;
685     ptube[2] = 2.300;
686     
687     gMC->Gsvolu("QB32","TUBE", idtmed[kInox], ptube, 3);
688     gMC->Gspos("QB32", 1 ,"QBPM", 0.0, 0.0, -90.+2.3, 0, "ONLY");
689
690     //bellow on absorber side
691     ptube[2] = (2.*dzb+dzbb)/2.;
692     dz = (81.7-ptube[2]);
693     gMC->Gspos("QBE0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY");
694
695
696 // --- Place the PIPE ghost volume (QBPM) in its mother volume (ALIC)
697 //    by rotating it to 180 deg. and make it invisible
698 // 
699
700   
701     gMC->Gspos("QBPM",1,"ALIC",0,0,0,idrotm[2013], "ONLY");
702
703
704 //
705 // ******** Ion Pump volume description starts here ******
706 // 
707     //
708     // Getters ->
709     pbox[0] =  6.50;
710     pbox[1] =  6.75;
711     pbox[2] = 15.60;
712     gMC->Gsvolu("QI32","BOX", idtmed[kInox], pbox, 3);
713     
714     pbox[0] =  5.90;
715     pbox[1] =  6.15;
716     pbox[2] = 15.00;
717     gMC->Gsvolu("QI42","BOX", idtmed[kGetter], pbox, 3);
718     gMC->Gspos("QI42", 1, "QI32", 0.0, 0.0, 0.0, 0, "ONLY");
719 // <-
720
721     ptube[0] =  0.0;
722     ptube[1] = 19.0;
723     ptube[2] =  2.5;
724     gMC->Gsvolu("QI33","TUBE", idtmed[kInox], ptube, 3);
725
726
727     ptube[0] =  0.0;
728     ptube[1] = 15.0;
729     ptube[2] =  2.5;
730     gMC->Gsvolu("QI43","TUBE", idtmed[kAir], ptube, 3);
731     gMC->Gspos("QI43", 1, "QI33", 0.0, 0.0, 0.0, 0, "ONLY");
732 // 
733 // Connecting tube ->
734     ptube[0] =  0.0;
735     ptube[1] =  5.4;
736     //ptube[2] = 13.7;
737     ptube[2] = 14.6;
738     gMC->Gsvolu("QI34","TUBE", idtmed[kInox], ptube, 3);
739     
740     ptube[0] =  0.0;
741     ptube[1] =  4.8;
742     ptube[2] = 14.6;
743     gMC->Gsvolu("QI44","TUBE", idtmed[kAir], ptube, 3);
744     gMC->Gspos("QI44", 1, "QI34", 0.0, 0.0, 0.0, 0, "ONLY");
745 // <-
746
747   //
748   // Flange ->
749     ptube[0] =  5.41;
750     ptube[1] =  7.30;
751     ptube[2] =  2.15;
752     gMC->Gsvolu("QI35","TUBE", idtmed[kInox], ptube, 3);
753 // <-
754     Float_t zPump = 385.;
755     
756     gMC->Gspos("QI32", 1, "QBPM", 0.0, -44.25, zPump, 0, "ONLY");
757     gMC->Gspos("QI33", 1, "QBPM", 0.0, -35.00, zPump,idrotm[2002], "ONLY");
758     gMC->Gspos("QI34", 1, "QBPM", 0.0, -17.90, zPump,idrotm[2002], "ONLY");
759     gMC->Gspos("QI35", 1, "QBPM", 0.0, -24.35, zPump,idrotm[2002], "ONLY");
760
761     gMC->Gsatt("QBPM", "SEEN", 0);
762     gMC->Gsatt("QBEM", "SEEN", 0);
763 }
764
765
766
767 //___________________________________________
768 void AliPIPEv0::CreateMaterials()
769 {
770   //
771   // Define materials for beam pipe
772   //
773
774   if(fDebug) printf("%s: Create PIPEv0 materials \n",ClassName());
775   Int_t   isxfld = gAlice->Field()->Integ();
776   Float_t sxmgmx = gAlice->Field()->Max();
777   // Steel (Inox)  
778   Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
779   Float_t zsteel[4] = { 26.,24.,28.,14. };
780   Float_t wsteel[4] = { .715,.18,.1,.005 };
781   // AlBe - alloy 
782   Float_t aAlBe[2] = { 26.98, 9.01};
783   Float_t zAlBe[2] = { 13.00, 4.00};
784   Float_t wAlBe[2] = { 0.4, 0.6};
785
786   //
787   //     Berillium 
788   AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
789   //
790   //     Carbon 
791   AliMaterial(6,  "CARBON$   ", 12.01, 6., 2.265, 18.8, 49.9);
792   //
793   //     Aluminum 
794   AliMaterial(9,  "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
795   //
796   //     Air 
797   AliMaterial(15, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500.);
798   //
799   //     Vacuum 
800   AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
801   //
802   //     stainless Steel 
803   AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
804   //
805   //     reduced density steel to approximate pump getter material
806   AliMixture(20, "GETTER$", asteel, zsteel, 1.00, 4, wsteel);
807   //     Al-Be alloy
808   //     
809   AliMixture(21, "AlBe$", aAlBe, zAlBe, 2.07, 2, wAlBe);
810   //
811   // **************** 
812   //     Defines tracking media parameters. 
813   //
814   Float_t epsil  = .001;    // Tracking precision, 
815   Float_t stemax = -0.01;   // Maximum displacement for multiple scat 
816   Float_t tmaxfd = -20.;    // Maximum angle due to field deflection 
817   Float_t deemax = -.3;     // Maximum fractional energy loss, DLS 
818   Float_t stmin  = -.8;
819   // *************** 
820   //
821   //    Beryllium 
822   
823   AliMedium(5, "BE",       5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
824
825   //    Carbon 
826   AliMedium(6, "C",        6, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
827   //
828   //    Aluminum 
829   AliMedium(9, "ALU",      9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
830   //
831   //    Air 
832   AliMedium(15, "AIR",    15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
833   //
834   //    Vacuum 
835   AliMedium(16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
836   //
837   //    Steel 
838   AliMedium(19, "INOX",   19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
839   //
840   //    Getter 
841   AliMedium(20, "GETTER", 20, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
842   //
843   //   AlBe - Aloy 
844   AliMedium(21, "AlBe"  , 21, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
845
846 }
847
848
849
850
851
852
853
854
855
856