1 ///////////////////////////////////////////////////////////////////////////////
7 <img src="picts/AliPIPEClass.gif">
11 ///////////////////////////////////////////////////////////////////////////////
13 #include "AliPIPEv1.h"
19 //_____________________________________________________________________________
20 AliPIPEv1::AliPIPEv1()
23 // Default constructor for beam pipe
27 //_____________________________________________________________________________
28 AliPIPEv1::AliPIPEv1(const char *name, const char *title)
32 // Standard constructor for beam pipe
36 //_____________________________________________________________________________
37 void AliPIPEv1::CreateGeometry()
40 // Create Beam Pipe geometry
44 <img src="picts/AliPIPE.gif">
49 <img src="picts/AliPIPETree.gif">
53 AliMC* pMC = AliMC::GetMC();
55 Float_t tpar[3], dzmo, zpos, abs_d, abs_l;
58 const Double_t z_flange = 150;
60 Int_t *idtmed = gAlice->Idtmed();
63 abs_d = 90.; // DEFINES DRIFT LENGTH
66 //theta1 = 24.; // 1. angle defining the front absorber
67 //theta2 = 5.; // 2. angle defining the front absorbe
68 //acc_max = 9.; // ANGLE POLAIRE MAXIMUM
69 //acc_min = 2.; // ANGLE POLAIRE MINIMUM DE DETECTION
71 //d_steel = 1.; // THICKNESS OF STEEL SUPPORT
74 //abs_cc = 315.; // DEFINES LENGTH OF CARBON
76 //abs_s = 150.; // DEFINES W-SHIELD LENGTH
77 //abs_n = 80.; // START OF NOSE
108 // the mother of all beam pipes
112 tpar[2] = (abs_d + 700.) / 2.;
113 dzmo = tpar[2] - abs_d;
114 pMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3);
115 pMC->Gspos("QQMO", 1, "ALIC", 0., 0., -dzmo, 0, "ONLY");
117 // BEAM PIPE IN DRIFT SPACE
123 pMC->Gsvolu("QDT1", "TUBE", idtmed[2015], tpar, 3);
126 pMC->Gsvolu("QTB1", "TUBE", idtmed[2004], tpar, 3);
127 pMC->Gspos("QTB1", 1, "QDT1", 0., 0., 0., 0, "ONLY");
128 pMC->Gspos("QDT1", 1, "QQMO", 0., 0., dzmo, 0, "ONLY");
135 pMC->Gsvolu("QDT2", "TUBE", idtmed[2015], tpar, 3);
138 pMC->Gsvolu("QTB2", "TUBE", idtmed[2004], tpar, 3);
139 pMC->Gspos("QTB2", 1, "QDT2", 0., 0., 0., 0, "ONLY");
140 pMC->Gspos("QDT2", 1, "QQMO", 0., 0., dzmo, 0, "ONLY");
142 // beam pipe outside absorber on the left side
149 tpar[2] = (z_flange - 30)/2;
150 pMC->Gsvolu("QDT5", "TUBE", idtmed[2015], tpar, 3);
153 zpos = -30. - tpar[2] + dzmo;
154 pMC->Gsvolu("QTB5", "TUBE", idtmed[2004], tpar, 3);
155 pMC->Gspos("QTB5", 1, "QDT5", 0., 0., 0., 0, "ONLY");
156 pMC->Gspos("QDT5", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
158 // STRAIGHT STEEL PIECE
165 tpar[2] = (zpos + 700.) / 2.;
166 pMC->Gsvolu("QDT7", "TUBE", idtmed[2015], tpar, 3);
168 pMC->Gsvolu("QTB7", "TUBE", idtmed[2018], tpar, 3);
169 pMC->Gspos("QTB7", 1, "QDT7", 0., 0., 0., 0, "ONLY");
170 zpos = zpos - tpar[2] + dzmo;
171 pMC->Gspos("QDT7", 1, "QQMO", 0., 0., zpos, 0, "ONLY");
178 pMC->Gsvolu("QN63", "TUBE", idtmed[2018], tpar, 3);
179 zpos = tpar[2] - z_flange;
180 pMC->Gspos("QN63", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
183 // Replace Absorber or Shield by Beam-Pipe
184 // in case they are not selected
186 if (gAlice->GetModule("ABSO") == 0) {
188 pMC->Gspos("QN63", 2, "ALIC", 0., 0., z_flange, 0, "ONLY");
193 tpar[2] = (z_flange - abs_d) / 2.;
194 pMC->Gsvolu("QDT8", "TUBE", idtmed[2015], tpar, 3);
196 pMC->Gsvolu("QTB8", "TUBE", idtmed[2004], tpar, 3);
197 pMC->Gspos("QTB8", 1, "QDT8", 0., 0., 0., 0, "ONLY");
198 zpos = abs_d + tpar[2];
199 pMC->Gspos("QDT8", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
203 tpar[2] = (abs_l - z_flange) / 2.;
204 pMC->Gsvolu("QDTS", "TUBE", idtmed[2015], tpar, 3);
206 pMC->Gsvolu("QTBS", "TUBE", idtmed[2018], tpar, 3);
207 pMC->Gspos("QTBS", 1, "QDTS", 0., 0., 0., 0, "ONLY");
208 zpos = tpar[2] + z_flange;
209 pMC->Gspos("QDTS", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
211 if (gAlice->GetModule("SHIL") == 0) {
216 tpar[2] = (700. - abs_l) / 2.;
217 pMC->Gsvolu("QDT9", "TUBE", idtmed[2015], tpar, 3);
219 pMC->Gsvolu("QTB9", "TUBE", idtmed[2018], tpar, 3);
220 pMC->Gspos("QTB9", 1, "QDT9", 0., 0., 0., 0, "ONLY");
221 zpos = abs_l + tpar[2];
222 pMC->Gspos("QDT9", 1, "ALIC", 0., 0., zpos, 0, "ONLY");
226 //_____________________________________________________________________________
227 void AliPIPEv1::DrawModule()
230 // Draw a shaded view of the Beam Pipe
233 AliMC* pMC = AliMC::GetMC();
235 // Set everything unseen
236 pMC->Gsatt("*", "seen", -1);
238 // Set ALIC mother transparent
239 pMC->Gsatt("ALIC","SEEN",0);
241 // Set the volumes visible
242 pMC->Gsatt("QQMO","seen",1);
243 pMC->Gsatt("QDT1","seen",1);
244 pMC->Gsatt("QTB1","seen",1);
245 pMC->Gsatt("QDT2","seen",1);
246 pMC->Gsatt("QTB2","seen",1);
247 pMC->Gsatt("QDT5","seen",1);
248 pMC->Gsatt("QTB5","seen",1);
249 pMC->Gsatt("QDT7","seen",1);
250 pMC->Gsatt("QTB7","seen",1);
251 pMC->Gsatt("QN63","seen",1);
253 pMC->Gdopt("hide", "on");
254 pMC->Gdopt("shad", "on");
255 pMC->Gsatt("*", "fill", 7);
256 pMC->SetClipBox(".");
257 pMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
259 pMC->Gdraw("alic", 40, 30, 0, 3, 5, .04, .04);
260 pMC->Gdhead(1111, "Beam Pipe");
261 pMC->Gdman(16, 6, "MAN");
262 pMC->Gdopt("hide","off");
265 //_____________________________________________________________________________
266 void AliPIPEv1::CreateMaterials()
269 // Create materials for beam pipe
272 Int_t ISXFLD = gAlice->Field()->Integ();
273 Float_t SXMGMX = gAlice->Field()->Max();
275 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
276 Float_t zsteel[4] = { 26.,24.,28.,14. };
277 Float_t wsteel[4] = { .715,.18,.1,.005 };
279 Float_t epsil, stmin, tmaxfd, deemax, stemax;
284 // --- Define the various materials for GEANT ---
285 AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
286 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
287 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
288 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
291 // Defines tracking media parameters.
292 // Les valeurs sont commentees pour laisser le defaut
293 // a GEANT (version 3-21, page CONS200), f.m.
294 epsil = .001; // Tracking precision,
295 stemax = -1.; // Maximum displacement for multiple scat
296 tmaxfd = -20.; // Maximum angle due to field deflection
297 deemax = -.3; // Maximum fractional energy loss, DLS
302 AliMedium(2015, "AIR_L3_US", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
306 AliMedium(2005, "BE_L3_US", 5, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
310 AliMedium(2016, "VA_L3_US", 16, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
314 AliMedium(2019, "ST_L3_US", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);