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 ///////////////////////////////////////////////////////////////////////////////
20 // Beam pipe class. Test version //
24 <img src="picts/AliPIPEClass.gif">
28 ///////////////////////////////////////////////////////////////////////////////
30 #include "AliPIPEv1.h"
36 //_____________________________________________________________________________
37 AliPIPEv1::AliPIPEv1()
40 // Default constructor for beam pipe
44 //_____________________________________________________________________________
45 AliPIPEv1::AliPIPEv1(const char *name, const char *title)
49 // Standard constructor for beam pipe
53 //_____________________________________________________________________________
54 void AliPIPEv1::CreateGeometry()
57 // Create Beam Pipe geometry
61 <img src="picts/AliPIPE.gif">
66 <img src="picts/AliPIPETree.gif">
70 Float_t tpar[3], dzmo, zpos, absorberDistance, absorberEnd;
73 const Double_t kZFlange = 150;
75 Int_t *idtmed = fIdtmed->GetArray()-1999;
78 absorberDistance = 90.; // DEFINES DRIFT LENGTH
81 //theta1 = 24.; // 1. angle defining the front absorber
82 //theta2 = 5.; // 2. angle defining the front absorbe
83 //acc_max = 9.; // ANGLE POLAIRE MAXIMUM
84 //acc_min = 2.; // ANGLE POLAIRE MINIMUM DE DETECTION
86 //d_steel = 1.; // THICKNESS OF STEEL SUPPORT
89 //abs_cc = 315.; // DEFINES LENGTH OF CARBON
91 //abs_s = 150.; // DEFINES W-SHIELD LENGTH
92 //abs_n = 80.; // START OF NOSE
107 //zcone_e = 859.0875;
123 // the mother of all beam pipes
127 tpar[2] = (absorberDistance + 700.) / 2.;
128 dzmo = tpar[2] - absorberDistance;
129 gMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3);
130 gMC->Gspos("QQMO", 1, "ALIC", 0., 0., -dzmo, 0, "ONLY");
132 // BEAM PIPE IN DRIFT SPACE
138 gMC->Gsvolu("QDT1", "TUBE", idtmed[2015], tpar, 3);
141 gMC->Gsvolu("QTB1", "TUBE", idtmed[2004], tpar, 3);
142 gMC->Gspos("QTB1", 1, "QDT1", 0., 0., 0., 0, "ONLY");
143 gMC->Gspos("QDT1", 1, "QQMO", 0., 0., dzmo, 0, "ONLY");
150 gMC->Gsvolu("QDT2", "TUBE", idtmed[2015], tpar, 3);
153 gMC->Gsvolu("QTB2", "TUBE", idtmed[2004], tpar, 3);
154 gMC->Gspos("QTB2", 1, "QDT2", 0., 0., 0., 0, "ONLY");
155 gMC->Gspos("QDT2", 1, "QQMO", 0., 0., dzmo, 0, "ONLY");
157 // beam pipe outside absorber on the left side
164 tpar[2] = (kZFlange - 30)/2;
165 gMC->Gsvolu("QDT5", "TUBE", idtmed[2015], tpar, 3);
168 zpos = -30. - tpar[2] + dzmo;
169 gMC->Gsvolu("QTB5", "TUBE", idtmed[2004], tpar, 3);
170 gMC->Gspos("QTB5", 1, "QDT5", 0., 0., 0., 0, "ONLY");
171 gMC->Gspos("QDT5", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
173 // STRAIGHT STEEL PIECE
180 tpar[2] = (zpos + 700.) / 2.;
181 gMC->Gsvolu("QDT7", "TUBE", idtmed[2015], tpar, 3);
183 gMC->Gsvolu("QTB7", "TUBE", idtmed[2018], tpar, 3);
184 gMC->Gspos("QTB7", 1, "QDT7", 0., 0., 0., 0, "ONLY");
185 zpos = zpos - tpar[2] + dzmo;
186 gMC->Gspos("QDT7", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
193 gMC->Gsvolu("QN63", "TUBE", idtmed[2018], tpar, 3);
194 zpos = tpar[2] - kZFlange;
195 gMC->Gspos("QN63", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
198 // Replace Absorber or Shield by Beam-Pipe
199 // in case they are not selected
201 if (gAlice->GetModule("ABSO") == 0) {
203 gMC->Gspos("QN63", 2, "ALIC", 0., 0., kZFlange, 0, "ONLY");
208 tpar[2] = (kZFlange - absorberDistance) / 2.;
209 gMC->Gsvolu("QDT8", "TUBE", idtmed[2015], tpar, 3);
211 gMC->Gsvolu("QTB8", "TUBE", idtmed[2004], tpar, 3);
212 gMC->Gspos("QTB8", 1, "QDT8", 0., 0., 0., 0, "ONLY");
213 zpos = absorberDistance + tpar[2];
214 gMC->Gspos("QDT8", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
218 tpar[2] = (absorberEnd - kZFlange) / 2.;
219 gMC->Gsvolu("QDTS", "TUBE", idtmed[2015], tpar, 3);
221 gMC->Gsvolu("QTBS", "TUBE", idtmed[2018], tpar, 3);
222 gMC->Gspos("QTBS", 1, "QDTS", 0., 0., 0., 0, "ONLY");
223 zpos = tpar[2] + kZFlange;
224 gMC->Gspos("QDTS", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
226 if (gAlice->GetModule("SHIL") == 0) {
231 tpar[2] = (700. - absorberEnd) / 2.;
232 gMC->Gsvolu("QDT9", "TUBE", idtmed[2015], tpar, 3);
234 gMC->Gsvolu("QTB9", "TUBE", idtmed[2018], tpar, 3);
235 gMC->Gspos("QTB9", 1, "QDT9", 0., 0., 0., 0, "ONLY");
236 zpos = absorberEnd + tpar[2];
237 gMC->Gspos("QDT9", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
241 //_____________________________________________________________________________
242 void AliPIPEv1::DrawModule() const
245 // Draw a shaded view of the Beam Pipe
248 // Set everything unseen
249 gMC->Gsatt("*", "seen", -1);
251 // Set ALIC mother transparent
252 gMC->Gsatt("ALIC","SEEN",0);
254 // Set the volumes visible
255 gMC->Gsatt("QQMO","seen",1);
256 gMC->Gsatt("QDT1","seen",1);
257 gMC->Gsatt("QTB1","seen",1);
258 gMC->Gsatt("QDT2","seen",1);
259 gMC->Gsatt("QTB2","seen",1);
260 gMC->Gsatt("QDT5","seen",1);
261 gMC->Gsatt("QTB5","seen",1);
262 gMC->Gsatt("QDT7","seen",1);
263 gMC->Gsatt("QTB7","seen",1);
264 gMC->Gsatt("QN63","seen",1);
266 gMC->Gdopt("hide", "on");
267 gMC->Gdopt("shad", "on");
268 gMC->Gsatt("*", "fill", 7);
269 gMC->SetClipBox(".");
270 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
272 gMC->Gdraw("alic", 40, 30, 0, 3, 5, .04, .04);
273 gMC->Gdhead(1111, "Beam Pipe");
274 gMC->Gdman(16, 6, "MAN");
275 gMC->Gdopt("hide","off");
278 //_____________________________________________________________________________
279 void AliPIPEv1::CreateMaterials()
282 // Create materials for beam pipe
285 Int_t isxfld = gAlice->Field()->Integ();
286 Float_t sxmgmx = gAlice->Field()->Max();
288 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
289 Float_t zsteel[4] = { 26.,24.,28.,14. };
290 Float_t wsteel[4] = { .715,.18,.1,.005 };
292 Float_t epsil, stmin, tmaxfd, deemax, stemax;
297 // --- Define the various materials for GEANT ---
298 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
299 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
300 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
301 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
304 // Defines tracking media parameters.
305 // Les valeurs sont commentees pour laisser le defaut
306 // a GEANT (version 3-21, page CONS200), f.m.
307 epsil = .001; // Tracking precision,
308 stemax = -1.; // Maximum displacement for multiple scat
309 tmaxfd = -20.; // Maximum angle due to field deflection
310 deemax = -.3; // Maximum fractional energy loss, DLS
315 AliMedium(15, "AIR_L3_US", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
319 AliMedium(5, "BE_L3_US", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
323 AliMedium(16, "VA_L3_US", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
327 AliMedium(19, "ST_L3_US", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);