1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.5 1999/09/29 09:24:30 fca
19 Introduction of the Copyright and cvs Log
23 ///////////////////////////////////////////////////////////////////////////////
29 <img src="picts/AliPIPEClass.gif">
33 ///////////////////////////////////////////////////////////////////////////////
35 #include "AliPIPEv3.h"
40 //_____________________________________________________________________________
41 AliPIPEv3::AliPIPEv3()
44 // Default constructor for beam pipe
48 //_____________________________________________________________________________
49 AliPIPEv3::AliPIPEv3(const char *name, const char *title)
53 // Standard constructor for beam pipe
57 //_____________________________________________________________________________
58 void AliPIPEv3::CreateGeometry()
61 // Create Beam Pipe geometry
65 <img src="picts/AliPIPE.gif">
70 <img src="picts/AliPIPETree.gif">
74 Float_t tpar[3], dzmo, zpos;
75 Float_t bepar[3], alpar[3],sspar[3],flange[3],vacpar[3];
78 // const Double_t z_flange = 150;
79 //for undulated structure
80 char cn18[][5]={"CN01","CN02","CN03","CN04","CN05","CN06","CN07","CN08"};
81 char cn48[][5]={"CN21","CN22","CN23","CN24","CN25","CN26","CN27","CN28"};
82 // char undul[][5]={'BELO','UNDL'};
89 Int_t *idtmed = fIdtmed->GetArray()-1999;
90 // the mother of all beam pipes
96 gMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3);
98 // All beam pipe details as per the provisonal drawings given by Lars
101 // Beryllium beam pipe, length 56.6 cm, centered at vertex
111 gMC->Gsvolu("QQBE", "TUBE", idtmed[2004], bepar, 3);
112 gMC->Gsvolu("VAC1", "TUBE", idtmed[2015], vacpar, 3);
113 gMC->Gspos("VAC1", 1, "QQBE", 0., 0., 0., 0, "ONLY");
114 gMC->Gspos("QQBE", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
116 // now beam pipes only in negative z-part for use in PMD.
118 // SS Flange 4 cm thick, 5.8 cm ID, 6.3 cm OD
122 zpos = zpos -bepar[2] - flange[2];
127 gMC->Gsvolu("QFL1", "TUBE", idtmed[2018], flange, 3);
128 gMC->Gsvolu("VAC2", "TUBE", idtmed[2015], vacpar, 3);
129 gMC->Gspos("VAC2", 1, "QFL1", 0., 0., 0., 0, "ONLY");
130 gMC->Gspos("QFL1", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
132 // Aluminium alloy beam pipe, 1mm thick, 230 cm long
136 zpos = zpos - flange[2] - alpar[2];
141 gMC->Gsvolu("QQAL", "TUBE", idtmed[2003], alpar, 3);
142 gMC->Gsvolu("VAC3", "TUBE", idtmed[2015], vacpar, 3);
143 gMC->Gspos("VAC3", 1, "QQAL", 0., 0., 0., 0, "ONLY");
144 gMC->Gspos("QQAL", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
147 // SS tube 2.0 cm long, 0.8 mm thick, 5.96 cm OD
152 zpos = zpos - alpar[2] - sspar[2];
157 gMC->Gsvolu("QSS1", "TUBE", idtmed[2018], sspar, 3);
158 gMC->Gsvolu("VAC4", "TUBE", idtmed[2015], vacpar, 3);
159 gMC->Gspos("VAC4", 1, "QSS1", 0., 0., 0., 0, "ONLY");
160 gMC->Gspos("QSS1", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
163 // SS Flange 3 cm thick 7.4 cm OD, 5.8 cm ID
168 zpos = zpos - sspar[2] - flange[2];
173 gMC->Gsvolu("QFL2", "TUBE", idtmed[2018], flange, 3);
174 gMC->Gsvolu("VAC5", "TUBE", idtmed[2015], vacpar, 3);
175 gMC->Gspos("VAC5", 1, "QFL2", 0., 0., 0., 0, "ONLY");
176 gMC->Gspos("QFL2", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
179 // SS tube 4.0 cm long, 0.8 mm thick, 5.96 cm OD
184 zpos = zpos - flange[2] - sspar[2];
189 gMC->Gsvolu("QSS2", "TUBE", idtmed[2018], sspar, 3);
190 gMC->Gsvolu("VAC6", "TUBE", idtmed[2015], vacpar, 3);
191 gMC->Gspos("VAC6", 1, "QSS2", 0., 0., 0., 0, "ONLY");
192 gMC->Gspos("QSS2", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
196 // SS Bellow 8.4 cm long, 6.5 cm ID, 7.5 cm OD
197 // 0.8 mm thick material, 0.3 cm pitch.
198 // zundul=4.2, rundul=6.5, thick=0.08
204 Undulation("BELO",pitch,thick,zundul,rundul,cn18);
207 zpos = zpos - sspar[2] - bellow[2];
208 gMC->Gspos("BELO", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
210 // SS tube 20.0 cm long, 0.8 mm thick, 5.96 cm OD
215 zpos = zpos - bellow[2] - sspar[2];
220 gMC->Gsvolu("QSS3", "TUBE", idtmed[2018], sspar, 3);
221 gMC->Gsvolu("VAC7", "TUBE", idtmed[2015], vacpar, 3);
222 gMC->Gspos("VAC7", 1, "QSS3", 0., 0., 0., 0, "ONLY");
223 gMC->Gspos("QSS3", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
226 // SS Bellow 8.4 cm long, 6.5 cm ID, 7.5 cm OD
227 // 0.8 mm thick material, 0.3 cm pitch.
230 zpos = zpos - sspar[2] - bellow[2];
231 gMC->Gspos("BELO", 2, "QQMO", 0., 0., zpos, 0, "ONLY");
233 // SS tube 4.7 cm long, 0.8 mm thick,
238 zpos = zpos - bellow[2] - sspar[2];
243 gMC->Gsvolu("QSS4", "TUBE", idtmed[2018], sspar, 3);
244 gMC->Gsvolu("VAC8", "TUBE", idtmed[2015], vacpar, 3);
245 gMC->Gspos("VAC8", 1, "QSS4", 0., 0., 0., 0, "ONLY");
246 gMC->Gspos("QSS4", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
248 // SS Flange 2.2 cm thick, ID=5.8 cm, OD=9.8 cm
253 zpos = zpos - sspar[2] - flange[2];
258 gMC->Gsvolu("QFL3", "TUBE", idtmed[2018], flange, 3);
259 gMC->Gsvolu("VAC9", "TUBE", idtmed[2015], vacpar, 3);
260 gMC->Gspos("VAC9", 1, "QFL3", 0., 0., 0., 0, "ONLY");
261 gMC->Gspos("QFL3", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
263 //Total of 3150 mm from vertex on the negative side upto this point.
265 // SS tube 20.0 cm long, 0.15 cm thick, 5.8 cm ID, to support vac. pump
270 zpos = zpos - flange[2] - sspar[2];
275 gMC->Gsvolu("QSS5", "TUBE", idtmed[2018], sspar, 3);
276 gMC->Gsvolu("VA10", "TUBE", idtmed[2015], vacpar, 3);
277 gMC->Gspos("VA10", 1, "QSS5", 0., 0., 0., 0, "ONLY");
278 gMC->Gspos("QSS5", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
281 // last item, undulated SS beam pipe, pitch=0.25, length= 342.0 cm
282 // material thickness 0.015 cm, ID=6.0 cm,
283 // zundul=171.0, thick=0.015, rundul=3.0
288 Undulation("UNDL",pitch,thick,zundul,rundul,cn48);
290 zpos = zpos - sspar[2] - zundul;
291 gMC->Gspos("UNDL", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
293 gMC->Gspos("QQMO", 1, "ALIC", 0., 0., 0.1, 0, "ONLY");
295 // total of 6770 mm length upto this point, end of undulated beam
298 // SS flange 22*2 mm thick
304 zpos = zpos - zundul - flange[2];
309 gMC->Gsvolu("QFL4", "TUBE", idtmed[2018], flange, 3);
310 gMC->Gsvolu("VC11", "TUBE", idtmed[2015], vacpar, 3);
311 gMC->Gspos("VC11", 1, "QFL4", 0., 0., 0., 0, "ONLY");
312 gMC->Gspos("QFL4", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
316 //_____________________________________________________________________________
317 void AliPIPEv3::DrawModule()
320 // Draw a shaded view of the Beam Pipe
323 // Set everything unseen
324 gMC->Gsatt("*", "seen", -1);
326 // Set ALIC mother transparent
327 gMC->Gsatt("ALIC","SEEN",0);
329 // Set the volumes visible
330 gMC->Gsatt("QQMO","seen",1);
331 gMC->Gsatt("QQBE","seen",1);
332 gMC->Gsatt("QFL1","seen",1);
333 gMC->Gsatt("QQAL","seen",1);
334 gMC->Gsatt("QSS1","seen",1);
335 gMC->Gsatt("QFL2","seen",1);
336 gMC->Gsatt("QSS2","seen",1);
337 gMC->Gsatt("QSS3","seen",1);
338 gMC->Gsatt("QSS4","seen",1);
339 gMC->Gsatt("QFL3","seen",1);
340 gMC->Gsatt("QSS5","seen",1);
341 gMC->Gsatt("BELO","seen",1);
342 gMC->Gsatt("UNDL","seen",1);
344 gMC->Gdopt("hide", "on");
345 gMC->Gdopt("shad", "on");
346 gMC->Gsatt("*", "fill", 7);
347 gMC->SetClipBox(".");
348 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
350 gMC->Gdraw("alic", 40, 30, 0, 3, 5, .04, .04);
351 gMC->Gdhead(1111, "Beam Pipe");
352 gMC->Gdman(16, 6, "MAN");
353 gMC->Gdopt("hide","off");
356 //_____________________________________________________________________________
357 void AliPIPEv3::CreateMaterials()
360 // Create materials for beam pipe
363 Int_t ISXFLD = gAlice->Field()->Integ();
364 Float_t SXMGMX = gAlice->Field()->Max();
366 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
367 Float_t zsteel[4] = { 26.,24.,28.,14. };
368 Float_t wsteel[4] = { .715,.18,.1,.005 };
370 Float_t epsil, stmin, tmaxfd, deemax, stemax;
375 // --- Define the various materials for GEANT ---
376 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
377 AliMaterial(4, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 18.5);
378 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
379 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
380 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
383 // Defines tracking media parameters.
384 // Les valeurs sont commentees pour laisser le defaut
385 // a GEANT (version 3-21, page CONS200), f.m.
386 epsil = .001; // Tracking precision,
387 stemax = -1.; // Maximum displacement for multiple scat
388 tmaxfd = -20.; // Maximum angle due to field deflection
389 deemax = -.3; // Maximum fractional energy loss, DLS
394 AliMedium(15, "AIR_L3_US", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
398 AliMedium(5, "BE_L3_US", 5, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
403 AliMedium(4, "AL_L3_US", 4, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
407 AliMedium(16, "VA_L3_US", 16, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
411 AliMedium(19, "ST_L3_US", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
414 void AliPIPEv3::Undulation(char *undul, Float_t pitch, Float_t thick,
415 Float_t zundul, Float_t rundul, char (*cone)[5])
418 // RUNDUL : Internal radius of the undulated chamber
419 // THICK : material thickness
420 // PITCH : one-QUARTER wave of undulation (cm)
421 // ZUNDUL : half length (cm)
423 // The undulated structure is desgned as a superposition of eight CONES
424 // of suitable sizes, where the inner/outer radius of the cone increases,
425 // then decreases, each half of the wave is assumed to be a semicircle,
426 // which allows to calculate the thickness and the radii of the cone, by
427 // dividing the semicircle into 4 parts of equal arc length.
428 // Thus apear the constants 0.293 and 0.707.
431 const Float_t const1 = .293;
432 const Float_t const2 = .707;
436 Float_t dcone1[5], dcone2[5], dcone3[5], dcone4[5], dcone5[5],
437 dcone6[5], dcone7[5], dcone8[5];
438 Float_t xc, yc, zc, dundul[3];
439 Int_t *idtmed = fIdtmed->GetArray()-1999;
443 dcone1[0] = const1 * pitch / 2;
445 dcone1[2] = dcone1[1] + thick;
446 dcone1[3] = dcone1[1] + const2 * pitch;
447 dcone1[4] = dcone1[3] + thick;
449 dcone2[0] = const2 * pitch / 2;
450 dcone2[1] = dcone1[3];
451 dcone2[2] = dcone1[4];
452 dcone2[3] = dcone2[1] + const1 * pitch;
453 dcone2[4] = dcone2[3] + thick;
455 dcone3[0] = dcone2[0];
456 dcone3[1] = dcone2[3];
457 dcone3[2] = dcone2[4];
458 dcone3[3] = dcone2[1];
459 dcone3[4] = dcone2[2];
461 dcone4[0] = dcone1[0];
462 dcone4[1] = dcone1[3];
463 dcone4[2] = dcone1[4];
464 dcone4[3] = dcone1[1];
465 dcone4[4] = dcone1[2];
467 dcone5[0] = dcone1[0];
468 dcone5[1] = dcone1[1] - thick;
469 dcone5[2] = dcone1[1];
470 dcone5[3] = dcone5[1] - const2 * pitch;
471 dcone5[4] = dcone5[3] + thick;
473 dcone6[0] = dcone2[0];
474 dcone6[1] = dcone5[3];
475 dcone6[2] = dcone5[4];
476 dcone6[3] = dcone6[1] - const1 * pitch;
477 dcone6[4] = dcone6[3] + thick;
478 dcone7[0] = dcone6[0];
479 dcone7[1] = dcone6[3];
480 dcone7[2] = dcone6[4];
481 dcone7[3] = dcone5[3];
482 dcone7[4] = dcone5[4];
484 dcone8[0] = dcone5[0];
485 dcone8[1] = dcone7[3];
486 dcone8[2] = dcone7[4];
487 dcone8[3] = dcone5[1];
488 dcone8[4] = dcone5[2];
490 gMC->Gsvolu(cone[0], "CONE", idtmed[2018], dcone1, 5);
491 gMC->Gsvolu(cone[1], "CONE", idtmed[2018], dcone2, 5);
492 gMC->Gsvolu(cone[2], "CONE", idtmed[2018], dcone3, 5);
493 gMC->Gsvolu(cone[3], "CONE", idtmed[2018], dcone4, 5);
494 gMC->Gsvolu(cone[4], "CONE", idtmed[2018], dcone5, 5);
495 gMC->Gsvolu(cone[5], "CONE", idtmed[2018], dcone6, 5);
496 gMC->Gsvolu(cone[6], "CONE", idtmed[2018], dcone7, 5);
497 gMC->Gsvolu(cone[7], "CONE", idtmed[2018], dcone8, 5);
498 gMC->Gsatt(cone[0], "SEEN", 0);
499 gMC->Gsatt(cone[1], "SEEN", 0);
500 gMC->Gsatt(cone[2], "SEEN", 0);
501 gMC->Gsatt(cone[3], "SEEN", 0);
502 gMC->Gsatt(cone[4], "SEEN", 0);
503 gMC->Gsatt(cone[5], "SEEN", 0);
504 gMC->Gsatt(cone[6], "SEEN", 0);
505 gMC->Gsatt(cone[7], "SEEN", 0);
507 // DEFINE AN IMAGINARY TUBE VOLUME FOR UNDULATED CHAMBER, FILL WITH VACUUM
509 nwave = Int_t (zundul / (pitch * 2) + .1);
510 dundul[2] = pitch * 2 * nwave;
511 dundul[1] = rundul + pitch + thick * 2;
514 gMC->Gsvolu(undul, "TUBE", idtmed[2015], dundul, 3);
518 zc = -dundul[2] + dcone1[0];
519 for (j = 1; j <= nwave; ++j) {
520 gMC->Gspos(cone[0], j, undul, xc, yc, zc, 0, "ONLY");
521 zc = zc + dcone1[0] + dcone2[0];
522 gMC->Gspos(cone[1], j, undul, xc, yc, zc, 0, "ONLY");
523 zc = zc + dcone2[0] + dcone3[0];
524 gMC->Gspos(cone[2], j, undul, xc, yc, zc, 0, "ONLY");
525 zc = zc + dcone3[0] + dcone4[0];
526 gMC->Gspos(cone[3], j, undul, xc, yc, zc, 0, "ONLY");
527 zc = zc + dcone4[0] + dcone5[0];
528 gMC->Gspos(cone[4], j, undul, xc, yc, zc, 0, "ONLY");
529 zc = zc + dcone5[0] + dcone6[0];
530 gMC->Gspos(cone[5], j, undul, xc, yc, zc, 0, "ONLY");
531 zc = zc + dcone6[0] + dcone7[0];
532 gMC->Gspos(cone[6], j, undul, xc, yc, zc, 0, "ONLY");
533 zc = zc + dcone7[0] + dcone8[0];
534 gMC->Gspos(cone[7], j, undul, xc, yc, zc, 0, "ONLY");
535 zc = zc + dcone8[0] + dcone1[0];