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