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