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.8.12.1 2002/07/24 10:08:27 alibrary
21 Revision 1.9 2002/07/23 13:08:46 morsch
22 All volume names start with "Q".
24 Revision 1.8 2000/10/02 21:28:15 fca
25 Removal of useless dependecies via forward declarations
27 Revision 1.7 2000/06/11 12:38:00 morsch
28 Coding rule violations corrected
30 Revision 1.6 1999/10/06 19:57:07 fca
31 Correct materials in pipe
33 Revision 1.5 1999/09/29 09:24:30 fca
34 Introduction of the Copyright and cvs Log
38 ///////////////////////////////////////////////////////////////////////////////
44 <img src="picts/AliPIPEClass.gif">
48 ///////////////////////////////////////////////////////////////////////////////
50 #include "AliPIPEv3.h"
57 //_____________________________________________________________________________
58 AliPIPEv3::AliPIPEv3()
61 // Default constructor for beam pipe
65 //_____________________________________________________________________________
66 AliPIPEv3::AliPIPEv3(const char *name, const char *title)
70 // Standard constructor for beam pipe
74 //_____________________________________________________________________________
75 void AliPIPEv3::CreateGeometry()
78 // Create Beam Pipe geometry
82 <img src="picts/AliPIPE.gif">
87 <img src="picts/AliPIPETree.gif">
91 Float_t tpar[3], dzmo, zpos;
92 Float_t bepar[3], alpar[3],sspar[3],flange[3],vacpar[3];
95 // const Double_t z_flange = 150;
96 //for undulated structure
97 char cn18[][5]={"CN01","CN02","CN03","CN04","CN05","CN06","CN07","CN08"};
98 char cn48[][5]={"CN21","CN22","CN23","CN24","CN25","CN26","CN27","CN28"};
99 // char undul[][5]={'BELO','UNDL'};
106 Int_t *idtmed = fIdtmed->GetArray()-1999;
107 // the mother of all beam pipes
113 gMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3);
115 // All beam pipe details as per the provisonal drawings given by Lars
116 // Leistam on 31.5.99
118 // Beryllium beam pipe, length 56.6 cm, centered at vertex
128 gMC->Gsvolu("QQBE", "TUBE", idtmed[2004], bepar, 3);
129 gMC->Gsvolu("QAC1", "TUBE", idtmed[2015], vacpar, 3);
130 gMC->Gspos("QAC1", 1, "QQBE", 0., 0., 0., 0, "ONLY");
131 gMC->Gspos("QQBE", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
133 // now beam pipes only in negative z-part for use in PMD.
135 // SS Flange 4 cm thick, 5.8 cm ID, 6.3 cm OD
139 zpos = zpos -bepar[2] - flange[2];
144 gMC->Gsvolu("QFL1", "TUBE", idtmed[2018], flange, 3);
145 gMC->Gsvolu("QAC2", "TUBE", idtmed[2015], vacpar, 3);
146 gMC->Gspos("QAC2", 1, "QFL1", 0., 0., 0., 0, "ONLY");
147 gMC->Gspos("QFL1", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
149 // Aluminium alloy beam pipe, 1mm thick, 230 cm long
153 zpos = zpos - flange[2] - alpar[2];
158 gMC->Gsvolu("QQAL", "TUBE", idtmed[2003], alpar, 3);
159 gMC->Gsvolu("QAC3", "TUBE", idtmed[2015], vacpar, 3);
160 gMC->Gspos("QAC3", 1, "QQAL", 0., 0., 0., 0, "ONLY");
161 gMC->Gspos("QQAL", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
164 // SS tube 2.0 cm long, 0.8 mm thick, 5.96 cm OD
169 zpos = zpos - alpar[2] - sspar[2];
174 gMC->Gsvolu("QSS1", "TUBE", idtmed[2018], sspar, 3);
175 gMC->Gsvolu("QAC4", "TUBE", idtmed[2015], vacpar, 3);
176 gMC->Gspos("QAC4", 1, "QSS1", 0., 0., 0., 0, "ONLY");
177 gMC->Gspos("QSS1", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
180 // SS Flange 3 cm thick 7.4 cm OD, 5.8 cm ID
185 zpos = zpos - sspar[2] - flange[2];
190 gMC->Gsvolu("QFL2", "TUBE", idtmed[2018], flange, 3);
191 gMC->Gsvolu("QAC5", "TUBE", idtmed[2015], vacpar, 3);
192 gMC->Gspos("QAC5", 1, "QFL2", 0., 0., 0., 0, "ONLY");
193 gMC->Gspos("QFL2", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
196 // SS tube 4.0 cm long, 0.8 mm thick, 5.96 cm OD
201 zpos = zpos - flange[2] - sspar[2];
206 gMC->Gsvolu("QSS2", "TUBE", idtmed[2018], sspar, 3);
207 gMC->Gsvolu("QAC6", "TUBE", idtmed[2015], vacpar, 3);
208 gMC->Gspos("QAC6", 1, "QSS2", 0., 0., 0., 0, "ONLY");
209 gMC->Gspos("QSS2", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
213 // SS Bellow 8.4 cm long, 6.5 cm ID, 7.5 cm OD
214 // 0.8 mm thick material, 0.3 cm pitch.
215 // zundul=4.2, rundul=6.5, thick=0.08
221 Undulation("BELO",pitch,thick,zundul,rundul,cn18);
224 zpos = zpos - sspar[2] - bellow[2];
225 gMC->Gspos("BELO", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
227 // SS tube 20.0 cm long, 0.8 mm thick, 5.96 cm OD
232 zpos = zpos - bellow[2] - sspar[2];
237 gMC->Gsvolu("QSS3", "TUBE", idtmed[2018], sspar, 3);
238 gMC->Gsvolu("QAC7", "TUBE", idtmed[2015], vacpar, 3);
239 gMC->Gspos("QAC7", 1, "QSS3", 0., 0., 0., 0, "ONLY");
240 gMC->Gspos("QSS3", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
243 // SS Bellow 8.4 cm long, 6.5 cm ID, 7.5 cm OD
244 // 0.8 mm thick material, 0.3 cm pitch.
247 zpos = zpos - sspar[2] - bellow[2];
248 gMC->Gspos("BELO", 2, "QQMO", 0., 0., zpos, 0, "ONLY");
250 // SS tube 4.7 cm long, 0.8 mm thick,
255 zpos = zpos - bellow[2] - sspar[2];
260 gMC->Gsvolu("QSS4", "TUBE", idtmed[2018], sspar, 3);
261 gMC->Gsvolu("QAC8", "TUBE", idtmed[2015], vacpar, 3);
262 gMC->Gspos("QAC8", 1, "QSS4", 0., 0., 0., 0, "ONLY");
263 gMC->Gspos("QSS4", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
265 // SS Flange 2.2 cm thick, ID=5.8 cm, OD=9.8 cm
270 zpos = zpos - sspar[2] - flange[2];
275 gMC->Gsvolu("QFL3", "TUBE", idtmed[2018], flange, 3);
276 gMC->Gsvolu("QAC9", "TUBE", idtmed[2015], vacpar, 3);
277 gMC->Gspos("QAC9", 1, "QFL3", 0., 0., 0., 0, "ONLY");
278 gMC->Gspos("QFL3", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
280 //Total of 3150 mm from vertex on the negative side upto this point.
282 // SS tube 20.0 cm long, 0.15 cm thick, 5.8 cm ID, to support vac. pump
287 zpos = zpos - flange[2] - sspar[2];
292 gMC->Gsvolu("QSS5", "TUBE", idtmed[2018], sspar, 3);
293 gMC->Gsvolu("QA10", "TUBE", idtmed[2015], vacpar, 3);
294 gMC->Gspos("QA10", 1, "QSS5", 0., 0., 0., 0, "ONLY");
295 gMC->Gspos("QSS5", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
298 // last item, undulated SS beam pipe, pitch=0.25, length= 342.0 cm
299 // material thickness 0.015 cm, ID=6.0 cm,
300 // zundul=171.0, thick=0.015, rundul=3.0
305 Undulation("UNDL",pitch,thick,zundul,rundul,cn48);
307 zpos = zpos - sspar[2] - zundul;
308 gMC->Gspos("UNDL", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
310 gMC->Gspos("QQMO", 1, "ALIC", 0., 0., 0.1, 0, "ONLY");
312 // total of 6770 mm length upto this point, end of undulated beam
315 // SS flange 22*2 mm thick
321 zpos = zpos - zundul - flange[2];
326 gMC->Gsvolu("QFL4", "TUBE", idtmed[2018], flange, 3);
327 gMC->Gsvolu("QC11", "TUBE", idtmed[2015], vacpar, 3);
328 gMC->Gspos("QC11", 1, "QFL4", 0., 0., 0., 0, "ONLY");
329 gMC->Gspos("QFL4", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
333 //_____________________________________________________________________________
334 void AliPIPEv3::DrawModule()
337 // Draw a shaded view of the Beam Pipe
340 // Set everything unseen
341 gMC->Gsatt("*", "seen", -1);
343 // Set ALIC mother transparent
344 gMC->Gsatt("ALIC","SEEN",0);
346 // Set the volumes visible
347 gMC->Gsatt("QQMO","seen",1);
348 gMC->Gsatt("QQBE","seen",1);
349 gMC->Gsatt("QFL1","seen",1);
350 gMC->Gsatt("QQAL","seen",1);
351 gMC->Gsatt("QSS1","seen",1);
352 gMC->Gsatt("QFL2","seen",1);
353 gMC->Gsatt("QSS2","seen",1);
354 gMC->Gsatt("QSS3","seen",1);
355 gMC->Gsatt("QSS4","seen",1);
356 gMC->Gsatt("QFL3","seen",1);
357 gMC->Gsatt("QSS5","seen",1);
358 gMC->Gsatt("BELO","seen",1);
359 gMC->Gsatt("UNDL","seen",1);
361 gMC->Gdopt("hide", "on");
362 gMC->Gdopt("shad", "on");
363 gMC->Gsatt("*", "fill", 7);
364 gMC->SetClipBox(".");
365 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
367 gMC->Gdraw("alic", 40, 30, 0, 3, 5, .04, .04);
368 gMC->Gdhead(1111, "Beam Pipe");
369 gMC->Gdman(16, 6, "MAN");
370 gMC->Gdopt("hide","off");
373 //_____________________________________________________________________________
374 void AliPIPEv3::CreateMaterials()
377 // Create materials for beam pipe
380 Int_t isxfld = gAlice->Field()->Integ();
381 Float_t sxmgmx = gAlice->Field()->Max();
383 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
384 Float_t zsteel[4] = { 26.,24.,28.,14. };
385 Float_t wsteel[4] = { .715,.18,.1,.005 };
387 Float_t epsil, stmin, tmaxfd, deemax, stemax;
392 // --- Define the various materials for GEANT ---
393 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
394 AliMaterial(4, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 18.5);
395 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
396 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
397 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
400 // Defines tracking media parameters.
401 // Les valeurs sont commentees pour laisser le defaut
402 // a GEANT (version 3-21, page CONS200), f.m.
403 epsil = .001; // Tracking precision,
404 stemax = -1.; // Maximum displacement for multiple scat
405 tmaxfd = -20.; // Maximum angle due to field deflection
406 deemax = -.3; // Maximum fractional energy loss, DLS
411 AliMedium(15, "AIR_L3_US", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
415 AliMedium(5, "BE_L3_US", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
420 AliMedium(4, "AL_L3_US", 4, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
424 AliMedium(16, "VA_L3_US", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
428 AliMedium(19, "ST_L3_US", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
431 void AliPIPEv3::Undulation(char *undul, Float_t pitch, Float_t thick,
432 Float_t zundul, Float_t rundul, char (*cone)[5])
435 // RUNDUL : Internal radius of the undulated chamber
436 // THICK : material thickness
437 // PITCH : one-QUARTER wave of undulation (cm)
438 // ZUNDUL : half length (cm)
440 // The undulated structure is desgned as a superposition of eight CONES
441 // of suitable sizes, where the inner/outer radius of the cone increases,
442 // then decreases, each half of the wave is assumed to be a semicircle,
443 // which allows to calculate the thickness and the radii of the cone, by
444 // dividing the semicircle into 4 parts of equal arc length.
445 // Thus apear the constants 0.293 and 0.707.
448 const Float_t kConst1 = .293;
449 const Float_t kConst2 = .707;
453 Float_t dcone1[5], dcone2[5], dcone3[5], dcone4[5], dcone5[5],
454 dcone6[5], dcone7[5], dcone8[5];
455 Float_t xc, yc, zc, dundul[3];
456 Int_t *idtmed = fIdtmed->GetArray()-1999;
460 dcone1[0] = kConst1 * pitch / 2;
462 dcone1[2] = dcone1[1] + thick;
463 dcone1[3] = dcone1[1] + kConst2 * pitch;
464 dcone1[4] = dcone1[3] + thick;
466 dcone2[0] = kConst2 * pitch / 2;
467 dcone2[1] = dcone1[3];
468 dcone2[2] = dcone1[4];
469 dcone2[3] = dcone2[1] + kConst1 * pitch;
470 dcone2[4] = dcone2[3] + thick;
472 dcone3[0] = dcone2[0];
473 dcone3[1] = dcone2[3];
474 dcone3[2] = dcone2[4];
475 dcone3[3] = dcone2[1];
476 dcone3[4] = dcone2[2];
478 dcone4[0] = dcone1[0];
479 dcone4[1] = dcone1[3];
480 dcone4[2] = dcone1[4];
481 dcone4[3] = dcone1[1];
482 dcone4[4] = dcone1[2];
484 dcone5[0] = dcone1[0];
485 dcone5[1] = dcone1[1] - thick;
486 dcone5[2] = dcone1[1];
487 dcone5[3] = dcone5[1] - kConst2 * pitch;
488 dcone5[4] = dcone5[3] + thick;
490 dcone6[0] = dcone2[0];
491 dcone6[1] = dcone5[3];
492 dcone6[2] = dcone5[4];
493 dcone6[3] = dcone6[1] - kConst1 * pitch;
494 dcone6[4] = dcone6[3] + thick;
495 dcone7[0] = dcone6[0];
496 dcone7[1] = dcone6[3];
497 dcone7[2] = dcone6[4];
498 dcone7[3] = dcone5[3];
499 dcone7[4] = dcone5[4];
501 dcone8[0] = dcone5[0];
502 dcone8[1] = dcone7[3];
503 dcone8[2] = dcone7[4];
504 dcone8[3] = dcone5[1];
505 dcone8[4] = dcone5[2];
507 gMC->Gsvolu(cone[0], "CONE", idtmed[2018], dcone1, 5);
508 gMC->Gsvolu(cone[1], "CONE", idtmed[2018], dcone2, 5);
509 gMC->Gsvolu(cone[2], "CONE", idtmed[2018], dcone3, 5);
510 gMC->Gsvolu(cone[3], "CONE", idtmed[2018], dcone4, 5);
511 gMC->Gsvolu(cone[4], "CONE", idtmed[2018], dcone5, 5);
512 gMC->Gsvolu(cone[5], "CONE", idtmed[2018], dcone6, 5);
513 gMC->Gsvolu(cone[6], "CONE", idtmed[2018], dcone7, 5);
514 gMC->Gsvolu(cone[7], "CONE", idtmed[2018], dcone8, 5);
515 gMC->Gsatt(cone[0], "SEEN", 0);
516 gMC->Gsatt(cone[1], "SEEN", 0);
517 gMC->Gsatt(cone[2], "SEEN", 0);
518 gMC->Gsatt(cone[3], "SEEN", 0);
519 gMC->Gsatt(cone[4], "SEEN", 0);
520 gMC->Gsatt(cone[5], "SEEN", 0);
521 gMC->Gsatt(cone[6], "SEEN", 0);
522 gMC->Gsatt(cone[7], "SEEN", 0);
524 // DEFINE AN IMAGINARY TUBE VOLUME FOR UNDULATED CHAMBER, FILL WITH VACUUM
526 nwave = Int_t (zundul / (pitch * 2) + .1);
527 dundul[2] = pitch * 2 * nwave;
528 dundul[1] = rundul + pitch + thick * 2;
531 gMC->Gsvolu(undul, "TUBE", idtmed[2015], dundul, 3);
535 zc = -dundul[2] + dcone1[0];
536 for (j = 1; j <= nwave; ++j) {
537 gMC->Gspos(cone[0], j, undul, xc, yc, zc, 0, "ONLY");
538 zc = zc + dcone1[0] + dcone2[0];
539 gMC->Gspos(cone[1], j, undul, xc, yc, zc, 0, "ONLY");
540 zc = zc + dcone2[0] + dcone3[0];
541 gMC->Gspos(cone[2], j, undul, xc, yc, zc, 0, "ONLY");
542 zc = zc + dcone3[0] + dcone4[0];
543 gMC->Gspos(cone[3], j, undul, xc, yc, zc, 0, "ONLY");
544 zc = zc + dcone4[0] + dcone5[0];
545 gMC->Gspos(cone[4], j, undul, xc, yc, zc, 0, "ONLY");
546 zc = zc + dcone5[0] + dcone6[0];
547 gMC->Gspos(cone[5], j, undul, xc, yc, zc, 0, "ONLY");
548 zc = zc + dcone6[0] + dcone7[0];
549 gMC->Gspos(cone[6], j, undul, xc, yc, zc, 0, "ONLY");
550 zc = zc + dcone7[0] + dcone8[0];
551 gMC->Gspos(cone[7], j, undul, xc, yc, zc, 0, "ONLY");
552 zc = zc + dcone8[0] + dcone1[0];