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