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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // Space frame class //
26 <img src="picts/AliFRAMEClass.gif">
30 ///////////////////////////////////////////////////////////////////////////////
32 #include "AliFRAMEv1.h"
37 //_____________________________________________________________________________
38 AliFRAMEv1::AliFRAMEv1()
41 // Default constructor for space frame
45 //_____________________________________________________________________________
46 AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
47 : AliFRAME(name,title)
50 // Standard constructor for space frame
54 //_____________________________________________________________________________
55 void AliFRAMEv1::CreateGeometry()
58 // Create space frame geometry
62 <img src="picts/AliFRAME.gif">
67 <img src="picts/AliFRAMETree.gif">
71 Int_t *idtmed = fIdtmed->GetArray()-1199;
73 Float_t dphi, dz_small, zpos, ddphi;
76 Float_t par[50], dz_long;
78 // R_IN : INNER RADIUS
79 // R_OU : OUTER RADIUS
80 // DR : WALL THICKNESS
81 // 2*Z_IN : FREE SPACE IN Z FOR PHOS
82 // 2*Z_RI : FREE SPACE IN Z FOR RICH
84 // 2*DZ : WIDTH OF FRAME ELEMENTS
90 Float_t z_ri = 236.25;
99 gMC->Gsvolu("BFMO", "TUBE", idtmed[1214], par, 3);
101 // Rings perpendicular to the beam
103 // full rings at the ends
108 gMC->Gsvolu("BRO1", "TUBE", idtmed[1218], par, 3);
112 gMC->Gsvolu("BRI1", "TUBE", idtmed[1214], par, 3);
113 gMC->Gspos("BRI1", 1, "BRO1", 0., 0., 0., 0, "ONLY");
115 gMC->Gspos("BRO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
116 gMC->Gspos("BRO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
118 // space for the HMPID
125 gMC->Gsvolu("BRO2", "TUBS", idtmed[1218], tspar, 5);
126 tspar[0] = r_in + dr;
127 tspar[1] = r_ou - dr;
129 gMC->Gsvolu("BRI2", "TUBS", idtmed[1214], tspar, 5);
130 gMC->Gspos("BRI2", 1, "BRO2", 0., 0., 0., 0, "ONLY");
132 gMC->Gspos("BRO2", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
133 gMC->Gspos("BRO2", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
142 gMC->Gsvolu("BRO3", "TUBS", idtmed[1218], tspar, 5);
143 tspar[0] = r_in + dr;
144 tspar[1] = r_ou - dr;
146 gMC->Gsvolu("BRI3", "TUBS", idtmed[1214], tspar, 5);
147 gMC->Gspos("BRI3", 1, "BRO3", 0., 0., 0., 0, "ONLY");
149 gMC->Gspos("BRO3", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
150 gMC->Gspos("BRO3", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
152 // longitudinal beams
154 // outside phi=60-120
158 dz_small = (z_ou - z_in -4*dz)/2;
162 tsparl[2] = dz_small;
168 gMC->Gsvolu("BLO1", "TUBS", idtmed[1214], tsparl, 5);
169 gMC->Gsdvt("BLD1", "BLO1", 20., 2, idtmed[1214], 15);
171 // central, leaving space for rich and phos
176 gMC->Gsvolu("BLO2", "TUBS", idtmed[1214], tsparl, 5);
177 gMC->Gsdvt("BLD2", "BLO2", 20., 2, idtmed[1214], 5);
180 gMC->Gsvolu("BLO3", "TUBS", idtmed[1214], tsparl, 5);
181 gMC->Gsdvt("BLD3", "BLO3", 20., 2, idtmed[1214], 5);
185 dphi = dz/(TMath::Pi()*(r_in + r_ou))*360;
186 ddphi = dphi * dr/dz;
187 tspar[0] = tsparl[0];
188 tspar[1] = tsparl[1];
190 tspar[3] = 10. - dphi;
192 gMC->Gsvolu("BL01", "TUBS", idtmed[1218], tspar, 5);
194 tspar[0] = tsparl[0] + dr;
195 tspar[1] = tsparl[1] - dr;
196 tspar[3] = 10. - dphi + ddphi;
197 tspar[4] = 10. - ddphi;
198 gMC->Gsvolu("BL02", "TUBS", idtmed[1214], tspar, 5);
199 gMC->Gspos("BL02", 1, "BL01", 0., 0., 0., 0, "ONLY");
202 tspar[0] = tsparl[0];
203 tspar[1] = tsparl[1];
205 tspar[3] = 10. - dphi;
207 gMC->Gsvolu("BL11", "TUBS", idtmed[1218], tspar, 5);
209 tspar[0] = tsparl[0] + dr;
210 tspar[1] = tsparl[1] - dr;
211 tspar[3] = 10. - dphi + ddphi;
212 tspar[4] = 10. - ddphi;
213 gMC->Gsvolu("BL12", "TUBS", idtmed[1214], tspar, 5);
214 gMC->Gspos("BL12", 1, "BL11", 0., 0., 0., 0, "ONLY");
216 gMC->Gspos("BL01", 1, "BLD1", 0., 0., 0., 0, "ONLY");
217 gMC->Gspos("BL11", 1, "BLD2", 0., 0., 0., 0, "ONLY");
218 gMC->Gspos("BL11", 2, "BLD3", 0., 0., 0., 0, "ONLY");
220 zpos = z_in +2*dz + dz_small;
221 gMC->Gspos("BLO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
222 gMC->Gspos("BLO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
223 gMC->Gspos("BLO2", 1, "BFMO", 0., 0., 0., 0, "ONLY");
224 gMC->Gspos("BLO3", 1, "BFMO", 0., 0., 0., 0, "ONLY");
230 tsparl[2] = (z_ou - z_ri -4*dz)/2;
233 gMC->Gsvolu("BLO4", "TUBS", idtmed[1214], tsparl, 5);
234 gMC->Gsdvt("BLD4", "BLO4", 20., 2, idtmed[1214], 3);
235 tspar[0] = tsparl[0];
236 tspar[1] = tsparl[1];
237 tspar[2] = tsparl[2];
238 tspar[3] = 10. - dphi;
240 gMC->Gsvolu("BL03", "TUBS", idtmed[1218], tspar, 5);
242 tspar[0] = tsparl[0] + dr;
243 tspar[1] = tsparl[1] - dr;
244 tspar[2] = tsparl[2];
245 tspar[3] = 10. - dphi + ddphi;
246 tspar[4] = 10. - ddphi;
247 gMC->Gsvolu("BL04", "TUBS", idtmed[1214], tspar, 5);
248 gMC->Gspos("BL04", 1, "BL03", 0., 0., 0., 0, "ONLY");
250 gMC->Gspos("BL03", 1, "BLD4", 0., 0., 0., 0, "ONLY");
252 gMC->Gspos("BLO4", 1, "BFMO", 0., 0., 293.125, 0, "ONLY");
253 gMC->Gspos("BLO4", 2, "BFMO", 0., 0.,-293.125, 0, "ONLY");
255 gMC->Gspos("BFMO", 1, "ALIC", 0., 0., 0., 0, "ONLY");
256 gMC->Gsatt("BFMO", "SEEN", 0);
259 //_____________________________________________________________________________
260 void AliFRAMEv1::DrawModule()
263 // Draw a shaded view of the space frame
266 // Set everything unseen
267 gMC->Gsatt("*", "seen", -1);
269 // Set ALIC mother transparent
270 gMC->Gsatt("ALIC","SEEN",0);
272 // Set the volumes visible
273 gMC->Gsatt("BFMO","seen",0);
274 gMC->Gsatt("BRO1","seen",1);
275 gMC->Gsatt("BRI1","seen",0);
276 gMC->Gsatt("BRO2","seen",1);
277 gMC->Gsatt("BRI2","seen",0);
278 gMC->Gsatt("BRO3","seen",1);
279 gMC->Gsatt("BRI3","seen",0);
280 gMC->Gsatt("BLO1","seen",0);
281 gMC->Gsatt("BLD1","seen",0);
282 gMC->Gsatt("BLO2","seen",0);
283 gMC->Gsatt("BLD2","seen",0);
284 gMC->Gsatt("BLO3","seen",0);
285 gMC->Gsatt("BLD3","seen",0);
286 gMC->Gsatt("BL01","seen",1);
287 gMC->Gsatt("BL02","seen",1);
288 gMC->Gsatt("BL11","seen",1);
289 gMC->Gsatt("BL12","seen",1);
290 gMC->Gsatt("BLO4","seen",0);
291 gMC->Gsatt("BLD4","seen",0);
292 gMC->Gsatt("BL03","seen",1);
293 gMC->Gsatt("BL04","seen",1);
295 gMC->Gdopt("hide", "on");
296 gMC->Gdopt("shad", "on");
297 gMC->Gsatt("*", "fill", 7);
298 gMC->SetClipBox(".");
300 gMC->Gdraw("alic", 40, 30, 0, 10, 10, .015, .015);
301 gMC->Gdhead(1111, "Space Frame");
302 gMC->Gdman(18, 4, "MAN");
305 //_____________________________________________________________________________
306 void AliFRAMEv1::CreateMaterials()
310 // Create materials for the space frame
313 Int_t ISXFLD = gAlice->Field()->Integ();
314 Float_t SXMGMX = gAlice->Field()->Max();
316 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
317 Float_t zsteel[4] = { 26.,24.,28.,14. };
318 Float_t wsteel[4] = { .715,.18,.1,.005 };
320 Float_t epsil, stmin, deemax, tmaxfd, stemax;
325 // --- Define the various materials for GEANT ---
326 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
327 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
330 // Defines tracking media parameters.
331 // Les valeurs sont commentees pour laisser le defaut
332 // a GEANT (version 3-21, page CONS200), f.m.
333 epsil = .001; // Tracking precision,
334 stemax = -1.; // Maximum displacement for multiple scat
335 tmaxfd = -20.; // Maximum angle due to field deflection
336 deemax = -.3; // Maximum fractional energy loss, DLS
339 //ifield0 = 0; // Field off
340 //ifield1 = 2; // 1.0 T. FIELD (DIPOLE)
346 AliMedium(15, "AIR_L3_US ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
350 AliMedium(19, "ST_L3_US ", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);