1 ///////////////////////////////////////////////////////////////////////////////
7 <img src="picts/AliPIPEClass.gif">
11 ///////////////////////////////////////////////////////////////////////////////
13 #include "AliPIPEv3.h"
19 //_____________________________________________________________________________
20 AliPIPEv3::AliPIPEv3()
23 // Default constructor for beam pipe
27 //_____________________________________________________________________________
28 AliPIPEv3::AliPIPEv3(const char *name, const char *title)
32 // Standard constructor for beam pipe
36 //_____________________________________________________________________________
37 void AliPIPEv3::CreateGeometry()
40 // Create Beam Pipe geometry
44 <img src="picts/AliPIPE.gif">
49 <img src="picts/AliPIPETree.gif">
53 Float_t tpar[3], dzmo, zpos;
54 Float_t bepar[3], alpar[3],sspar[3],flange[3],vacpar[3];
57 // const Double_t z_flange = 150;
58 //for undulated structure
59 char cn18[][5]={"CN01","CN02","CN03","CN04","CN05","CN06","CN07","CN08"};
60 char cn48[][5]={"CN21","CN22","CN23","CN24","CN25","CN26","CN27","CN28"};
61 // char undul[][5]={'BELO','UNDL'};
68 Int_t *idtmed = fIdtmed->GetArray()-1999;
69 // the mother of all beam pipes
75 gMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3);
77 // All beam pipe details as per the provisonal drawings given by Lars
80 // Beryllium beam pipe, length 56.6 cm, centered at vertex
90 gMC->Gsvolu("QQBE", "TUBE", idtmed[2004], bepar, 3);
91 gMC->Gsvolu("VAC1", "TUBE", idtmed[2015], vacpar, 3);
92 gMC->Gspos("VAC1", 1, "QQBE", 0., 0., 0., 0, "ONLY");
93 gMC->Gspos("QQBE", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
95 // now beam pipes only in negative z-part for use in PMD.
97 // SS Flange 4 cm thick, 5.8 cm ID, 6.3 cm OD
101 zpos = zpos -bepar[2] - flange[2];
106 gMC->Gsvolu("QFL1", "TUBE", idtmed[2018], flange, 3);
107 gMC->Gsvolu("VAC2", "TUBE", idtmed[2015], vacpar, 3);
108 gMC->Gspos("VAC2", 1, "QFL1", 0., 0., 0., 0, "ONLY");
109 gMC->Gspos("QFL1", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
111 // Aluminium alloy beam pipe, 1mm thick, 230 cm long
115 zpos = zpos - flange[2] - alpar[2];
120 gMC->Gsvolu("QQAL", "TUBE", idtmed[2003], alpar, 3);
121 gMC->Gsvolu("VAC3", "TUBE", idtmed[2015], vacpar, 3);
122 gMC->Gspos("VAC3", 1, "QQAL", 0., 0., 0., 0, "ONLY");
123 gMC->Gspos("QQAL", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
126 // SS tube 2.0 cm long, 0.8 mm thick, 5.96 cm OD
131 zpos = zpos - alpar[2] - sspar[2];
136 gMC->Gsvolu("QSS1", "TUBE", idtmed[2018], sspar, 3);
137 gMC->Gsvolu("VAC4", "TUBE", idtmed[2015], vacpar, 3);
138 gMC->Gspos("VAC4", 1, "QSS1", 0., 0., 0., 0, "ONLY");
139 gMC->Gspos("QSS1", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
142 // SS Flange 3 cm thick 7.4 cm OD, 5.8 cm ID
147 zpos = zpos - sspar[2] - flange[2];
152 gMC->Gsvolu("QFL2", "TUBE", idtmed[2018], flange, 3);
153 gMC->Gsvolu("VAC5", "TUBE", idtmed[2015], vacpar, 3);
154 gMC->Gspos("VAC5", 1, "QFL2", 0., 0., 0., 0, "ONLY");
155 gMC->Gspos("QFL2", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
158 // SS tube 4.0 cm long, 0.8 mm thick, 5.96 cm OD
163 zpos = zpos - flange[2] - sspar[2];
168 gMC->Gsvolu("QSS2", "TUBE", idtmed[2018], sspar, 3);
169 gMC->Gsvolu("VAC6", "TUBE", idtmed[2015], vacpar, 3);
170 gMC->Gspos("VAC6", 1, "QSS2", 0., 0., 0., 0, "ONLY");
171 gMC->Gspos("QSS2", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
175 // SS Bellow 8.4 cm long, 6.5 cm ID, 7.5 cm OD
176 // 0.8 mm thick material, 0.3 cm pitch.
177 // zundul=4.2, rundul=6.5, thick=0.08
183 Undulation("BELO",pitch,thick,zundul,rundul,cn18);
186 zpos = zpos - sspar[2] - bellow[2];
187 gMC->Gspos("BELO", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
189 // SS tube 20.0 cm long, 0.8 mm thick, 5.96 cm OD
194 zpos = zpos - bellow[2] - sspar[2];
199 gMC->Gsvolu("QSS3", "TUBE", idtmed[2018], sspar, 3);
200 gMC->Gsvolu("VAC7", "TUBE", idtmed[2015], vacpar, 3);
201 gMC->Gspos("VAC7", 1, "QSS3", 0., 0., 0., 0, "ONLY");
202 gMC->Gspos("QSS3", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
205 // SS Bellow 8.4 cm long, 6.5 cm ID, 7.5 cm OD
206 // 0.8 mm thick material, 0.3 cm pitch.
209 zpos = zpos - sspar[2] - bellow[2];
210 gMC->Gspos("BELO", 2, "QQMO", 0., 0., zpos, 0, "ONLY");
212 // SS tube 4.7 cm long, 0.8 mm thick,
217 zpos = zpos - bellow[2] - sspar[2];
222 gMC->Gsvolu("QSS4", "TUBE", idtmed[2018], sspar, 3);
223 gMC->Gsvolu("VAC8", "TUBE", idtmed[2015], vacpar, 3);
224 gMC->Gspos("VAC8", 1, "QSS4", 0., 0., 0., 0, "ONLY");
225 gMC->Gspos("QSS4", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
227 // SS Flange 2.2 cm thick, ID=5.8 cm, OD=9.8 cm
232 zpos = zpos - sspar[2] - flange[2];
237 gMC->Gsvolu("QFL3", "TUBE", idtmed[2018], flange, 3);
238 gMC->Gsvolu("VAC9", "TUBE", idtmed[2015], vacpar, 3);
239 gMC->Gspos("VAC9", 1, "QFL3", 0., 0., 0., 0, "ONLY");
240 gMC->Gspos("QFL3", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
242 //Total of 3150 mm from vertex on the negative side upto this point.
244 // SS tube 20.0 cm long, 0.15 cm thick, 5.8 cm ID, to support vac. pump
249 zpos = zpos - flange[2] - sspar[2];
254 gMC->Gsvolu("QSS5", "TUBE", idtmed[2018], sspar, 3);
255 gMC->Gsvolu("VA10", "TUBE", idtmed[2015], vacpar, 3);
256 gMC->Gspos("VA10", 1, "QSS5", 0., 0., 0., 0, "ONLY");
257 gMC->Gspos("QSS5", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
260 // last item, undulated SS beam pipe, pitch=0.25, length= 342.0 cm
261 // material thickness 0.015 cm, ID=6.0 cm,
262 // zundul=171.0, thick=0.015, rundul=3.0
267 Undulation("UNDL",pitch,thick,zundul,rundul,cn48);
269 zpos = zpos - sspar[2] - zundul;
270 gMC->Gspos("UNDL", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
272 gMC->Gspos("QQMO", 1, "ALIC", 0., 0., 0.1, 0, "ONLY");
274 // total of 6770 mm length upto this point, end of undulated beam
277 // SS flange 22*2 mm thick
283 zpos = zpos - zundul - flange[2];
288 gMC->Gsvolu("QFL4", "TUBE", idtmed[2018], flange, 3);
289 gMC->Gsvolu("VC11", "TUBE", idtmed[2015], vacpar, 3);
290 gMC->Gspos("VC11", 1, "QFL4", 0., 0., 0., 0, "ONLY");
291 gMC->Gspos("QFL4", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
295 //_____________________________________________________________________________
296 void AliPIPEv3::DrawModule()
299 // Draw a shaded view of the Beam Pipe
302 // Set everything unseen
303 gMC->Gsatt("*", "seen", -1);
305 // Set ALIC mother transparent
306 gMC->Gsatt("ALIC","SEEN",0);
308 // Set the volumes visible
309 gMC->Gsatt("QQMO","seen",1);
310 gMC->Gsatt("QQBE","seen",1);
311 gMC->Gsatt("QFL1","seen",1);
312 gMC->Gsatt("QQAL","seen",1);
313 gMC->Gsatt("QSS1","seen",1);
314 gMC->Gsatt("QFL2","seen",1);
315 gMC->Gsatt("QSS2","seen",1);
316 gMC->Gsatt("QSS3","seen",1);
317 gMC->Gsatt("QSS4","seen",1);
318 gMC->Gsatt("QFL3","seen",1);
319 gMC->Gsatt("QSS5","seen",1);
320 gMC->Gsatt("BELO","seen",1);
321 gMC->Gsatt("UNDL","seen",1);
323 gMC->Gdopt("hide", "on");
324 gMC->Gdopt("shad", "on");
325 gMC->Gsatt("*", "fill", 7);
326 gMC->SetClipBox(".");
327 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
329 gMC->Gdraw("alic", 40, 30, 0, 3, 5, .04, .04);
330 gMC->Gdhead(1111, "Beam Pipe");
331 gMC->Gdman(16, 6, "MAN");
332 gMC->Gdopt("hide","off");
335 //_____________________________________________________________________________
336 void AliPIPEv3::CreateMaterials()
339 // Create materials for beam pipe
342 Int_t ISXFLD = gAlice->Field()->Integ();
343 Float_t SXMGMX = gAlice->Field()->Max();
345 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
346 Float_t zsteel[4] = { 26.,24.,28.,14. };
347 Float_t wsteel[4] = { .715,.18,.1,.005 };
349 Float_t epsil, stmin, tmaxfd, deemax, stemax;
354 // --- Define the various materials for GEANT ---
355 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
356 AliMaterial(4, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 18.5);
357 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
358 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
359 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
362 // Defines tracking media parameters.
363 // Les valeurs sont commentees pour laisser le defaut
364 // a GEANT (version 3-21, page CONS200), f.m.
365 epsil = .001; // Tracking precision,
366 stemax = -1.; // Maximum displacement for multiple scat
367 tmaxfd = -20.; // Maximum angle due to field deflection
368 deemax = -.3; // Maximum fractional energy loss, DLS
373 AliMedium(15, "AIR_L3_US", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
377 AliMedium(5, "BE_L3_US", 5, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
382 AliMedium(4, "AL_L3_US", 4, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
386 AliMedium(16, "VA_L3_US", 16, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
390 AliMedium(19, "ST_L3_US", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
393 void AliPIPEv3::Undulation(char *undul, Float_t pitch, Float_t thick,
394 Float_t zundul, Float_t rundul, char (*cone)[5])
397 // RUNDUL : Internal radius of the undulated chamber
398 // THICK : material thickness
399 // PITCH : one-QUARTER wave of undulation (cm)
400 // ZUNDUL : half length (cm)
402 // The undulated structure is desgned as a superposition of eight CONES
403 // of suitable sizes, where the inner/outer radius of the cone increases,
404 // then decreases, each half of the wave is assumed to be a semicircle,
405 // which allows to calculate the thickness and the radii of the cone, by
406 // dividing the semicircle into 4 parts of equal arc length.
407 // Thus apear the constants 0.293 and 0.707.
410 const Float_t const1 = .293;
411 const Float_t const2 = .707;
415 Float_t dcone1[5], dcone2[5], dcone3[5], dcone4[5], dcone5[5],
416 dcone6[5], dcone7[5], dcone8[5];
417 Float_t xc, yc, zc, dundul[3];
418 Int_t *idtmed = fIdtmed->GetArray()-1999;
422 dcone1[0] = const1 * pitch / 2;
424 dcone1[2] = dcone1[1] + thick;
425 dcone1[3] = dcone1[1] + const2 * pitch;
426 dcone1[4] = dcone1[3] + thick;
428 dcone2[0] = const2 * pitch / 2;
429 dcone2[1] = dcone1[3];
430 dcone2[2] = dcone1[4];
431 dcone2[3] = dcone2[1] + const1 * pitch;
432 dcone2[4] = dcone2[3] + thick;
434 dcone3[0] = dcone2[0];
435 dcone3[1] = dcone2[3];
436 dcone3[2] = dcone2[4];
437 dcone3[3] = dcone2[1];
438 dcone3[4] = dcone2[2];
440 dcone4[0] = dcone1[0];
441 dcone4[1] = dcone1[3];
442 dcone4[2] = dcone1[4];
443 dcone4[3] = dcone1[1];
444 dcone4[4] = dcone1[2];
446 dcone5[0] = dcone1[0];
447 dcone5[1] = dcone1[1] - thick;
448 dcone5[2] = dcone1[1];
449 dcone5[3] = dcone5[1] - const2 * pitch;
450 dcone5[4] = dcone5[3] + thick;
452 dcone6[0] = dcone2[0];
453 dcone6[1] = dcone5[3];
454 dcone6[2] = dcone5[4];
455 dcone6[3] = dcone6[1] - const1 * pitch;
456 dcone6[4] = dcone6[3] + thick;
457 dcone7[0] = dcone6[0];
458 dcone7[1] = dcone6[3];
459 dcone7[2] = dcone6[4];
460 dcone7[3] = dcone5[3];
461 dcone7[4] = dcone5[4];
463 dcone8[0] = dcone5[0];
464 dcone8[1] = dcone7[3];
465 dcone8[2] = dcone7[4];
466 dcone8[3] = dcone5[1];
467 dcone8[4] = dcone5[2];
469 gMC->Gsvolu(cone[0], "CONE", idtmed[2015], dcone1, 5);
470 gMC->Gsvolu(cone[1], "CONE", idtmed[2015], dcone2, 5);
471 gMC->Gsvolu(cone[2], "CONE", idtmed[2015], dcone3, 5);
472 gMC->Gsvolu(cone[3], "CONE", idtmed[2015], dcone4, 5);
473 gMC->Gsvolu(cone[4], "CONE", idtmed[2015], dcone5, 5);
474 gMC->Gsvolu(cone[5], "CONE", idtmed[2015], dcone6, 5);
475 gMC->Gsvolu(cone[6], "CONE", idtmed[2015], dcone7, 5);
476 gMC->Gsvolu(cone[7], "CONE", idtmed[2015], dcone8, 5);
477 gMC->Gsatt(cone[0], "SEEN", 0);
478 gMC->Gsatt(cone[1], "SEEN", 0);
479 gMC->Gsatt(cone[2], "SEEN", 0);
480 gMC->Gsatt(cone[3], "SEEN", 0);
481 gMC->Gsatt(cone[4], "SEEN", 0);
482 gMC->Gsatt(cone[5], "SEEN", 0);
483 gMC->Gsatt(cone[6], "SEEN", 0);
484 gMC->Gsatt(cone[7], "SEEN", 0);
486 // DEFINE AN IMAGINARY TUBE VOLUME FOR UNDULATED CHAMBER, FILL WITH VACUUM
488 nwave = Int_t (zundul / (pitch * 2) + .1);
489 dundul[2] = pitch * 2 * nwave;
490 dundul[1] = rundul + pitch + thick * 2;
493 gMC->Gsvolu(undul, "TUBE", idtmed[2015], dundul, 3);
497 zc = -dundul[2] + dcone1[0];
498 for (j = 1; j <= nwave; ++j) {
499 gMC->Gspos(cone[0], j, undul, xc, yc, zc, 0, "ONLY");
500 zc = zc + dcone1[0] + dcone2[0];
501 gMC->Gspos(cone[1], j, undul, xc, yc, zc, 0, "ONLY");
502 zc = zc + dcone2[0] + dcone3[0];
503 gMC->Gspos(cone[2], j, undul, xc, yc, zc, 0, "ONLY");
504 zc = zc + dcone3[0] + dcone4[0];
505 gMC->Gspos(cone[3], j, undul, xc, yc, zc, 0, "ONLY");
506 zc = zc + dcone4[0] + dcone5[0];
507 gMC->Gspos(cone[4], j, undul, xc, yc, zc, 0, "ONLY");
508 zc = zc + dcone5[0] + dcone6[0];
509 gMC->Gspos(cone[5], j, undul, xc, yc, zc, 0, "ONLY");
510 zc = zc + dcone6[0] + dcone7[0];
511 gMC->Gspos(cone[6], j, undul, xc, yc, zc, 0, "ONLY");
512 zc = zc + dcone7[0] + dcone8[0];
513 gMC->Gspos(cone[7], j, undul, xc, yc, zc, 0, "ONLY");
514 zc = zc + dcone8[0] + dcone1[0];