1 ///////////////////////////////////////////////////////////////////////////////
3 // Space frame class //
7 <img src="gif/AliFRAMEClass.gif">
11 ///////////////////////////////////////////////////////////////////////////////
13 #include "AliFRAMEv1.h"
19 //_____________________________________________________________________________
20 AliFRAMEv1::AliFRAMEv1() : AliFRAME()
23 // Default constructor for space frame
27 //_____________________________________________________________________________
28 AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
29 : AliFRAME(name,title)
32 // Standard constructor for space frame
36 //_____________________________________________________________________________
37 void AliFRAMEv1::CreateGeometry()
40 // Create space frame geometry
44 <img src="gif/AliFRAME.gif">
49 <img src="gif/AliFRAMETree.gif">
52 AliMC* pMC = AliMC::GetMC();
54 Int_t *idtmed = gAlice->Idtmed();
56 Float_t dphi, dz_small, zpos, ddphi;
59 Float_t par[50], dz_long;
61 // R_IN : INNER RADIUS
62 // R_OU : OUTER RADIUS
63 // DR : WALL THICKNESS
64 // 2*Z_IN : FREE SPACE IN Z FOR PHOS
65 // 2*Z_RI : FREE SPACE IN Z FOR RICH
67 // 2*DZ : WIDTH OF FRAME ELEMENTS
73 Float_t z_ri = 236.25;
82 pMC->Gsvolu("BFMO", "TUBE", idtmed[1214], par, 3);
84 // Rings perpendicular to the beam
86 // full rings at the ends
91 pMC->Gsvolu("BRO1", "TUBE", idtmed[1218], par, 3);
95 pMC->Gsvolu("BRI1", "TUBE", idtmed[1214], par, 3);
96 pMC->Gspos("BRI1", 1, "BRO1", 0., 0., 0., 0, "ONLY");
98 pMC->Gspos("BRO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
99 pMC->Gspos("BRO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
101 // space for the HMPID
108 pMC->Gsvolu("BRO2", "TUBS", idtmed[1218], tspar, 5);
109 tspar[0] = r_in + dr;
110 tspar[1] = r_ou - dr;
112 pMC->Gsvolu("BRI2", "TUBS", idtmed[1214], tspar, 5);
113 pMC->Gspos("BRI2", 1, "BRO2", 0., 0., 0., 0, "ONLY");
115 pMC->Gspos("BRO2", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
116 pMC->Gspos("BRO2", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
125 pMC->Gsvolu("BRO3", "TUBS", idtmed[1218], tspar, 5);
126 tspar[0] = r_in + dr;
127 tspar[1] = r_ou - dr;
129 pMC->Gsvolu("BRI3", "TUBS", idtmed[1214], tspar, 5);
130 pMC->Gspos("BRI3", 1, "BRO3", 0., 0., 0., 0, "ONLY");
132 pMC->Gspos("BRO3", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
133 pMC->Gspos("BRO3", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
135 // longitudinal beams
137 // outside phi=60-120
141 dz_small = (z_ou - z_in -4*dz)/2;
145 tsparl[2] = dz_small;
151 pMC->Gsvolu("BLO1", "TUBS", idtmed[1214], tsparl, 5);
152 pMC->Gsdvt("BLD1", "BLO1", 20., 2, idtmed[1214], 15);
154 // central, leaving space for rich and phos
159 pMC->Gsvolu("BLO2", "TUBS", idtmed[1214], tsparl, 5);
160 pMC->Gsdvt("BLD2", "BLO2", 20., 2, idtmed[1214], 5);
163 pMC->Gsvolu("BLO3", "TUBS", idtmed[1214], tsparl, 5);
164 pMC->Gsdvt("BLD3", "BLO3", 20., 2, idtmed[1214], 5);
168 dphi = dz/(TMath::Pi()*(r_in + r_ou))*360;
169 ddphi = dphi * dr/dz;
170 tspar[0] = tsparl[0];
171 tspar[1] = tsparl[1];
173 tspar[3] = 10. - dphi;
175 pMC->Gsvolu("BL01", "TUBS", idtmed[1218], tspar, 5);
177 tspar[0] = tsparl[0] + dr;
178 tspar[1] = tsparl[1] - dr;
179 tspar[3] = 10. - dphi + ddphi;
180 tspar[4] = 10. - ddphi;
181 pMC->Gsvolu("BL02", "TUBS", idtmed[1214], tspar, 5);
182 pMC->Gspos("BL02", 1, "BL01", 0., 0., 0., 0, "ONLY");
185 tspar[0] = tsparl[0];
186 tspar[1] = tsparl[1];
188 tspar[3] = 10. - dphi;
190 pMC->Gsvolu("BL11", "TUBS", idtmed[1218], tspar, 5);
192 tspar[0] = tsparl[0] + dr;
193 tspar[1] = tsparl[1] - dr;
194 tspar[3] = 10. - dphi + ddphi;
195 tspar[4] = 10. - ddphi;
196 pMC->Gsvolu("BL12", "TUBS", idtmed[1214], tspar, 5);
197 pMC->Gspos("BL12", 1, "BL11", 0., 0., 0., 0, "ONLY");
199 pMC->Gspos("BL01", 1, "BLD1", 0., 0., 0., 0, "ONLY");
200 pMC->Gspos("BL11", 1, "BLD2", 0., 0., 0., 0, "ONLY");
201 pMC->Gspos("BL11", 2, "BLD3", 0., 0., 0., 0, "ONLY");
203 zpos = z_in +2*dz + dz_small;
204 pMC->Gspos("BLO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
205 pMC->Gspos("BLO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
206 pMC->Gspos("BLO2", 1, "BFMO", 0., 0., 0., 0, "ONLY");
207 pMC->Gspos("BLO3", 1, "BFMO", 0., 0., 0., 0, "ONLY");
213 tsparl[2] = (z_ou - z_ri -4*dz)/2;
216 pMC->Gsvolu("BLO4", "TUBS", idtmed[1214], tsparl, 5);
217 pMC->Gsdvt("BLD4", "BLO4", 20., 2, idtmed[1214], 3);
218 tspar[0] = tsparl[0];
219 tspar[1] = tsparl[1];
220 tspar[2] = tsparl[2];
221 tspar[3] = 10. - dphi;
223 pMC->Gsvolu("BL03", "TUBS", idtmed[1218], tspar, 5);
225 tspar[0] = tsparl[0] + dr;
226 tspar[1] = tsparl[1] - dr;
227 tspar[2] = tsparl[2];
228 tspar[3] = 10. - dphi + ddphi;
229 tspar[4] = 10. - ddphi;
230 pMC->Gsvolu("BL04", "TUBS", idtmed[1214], tspar, 5);
231 pMC->Gspos("BL04", 1, "BL03", 0., 0., 0., 0, "ONLY");
233 pMC->Gspos("BL03", 1, "BLD4", 0., 0., 0., 0, "ONLY");
235 pMC->Gspos("BLO4", 1, "BFMO", 0., 0., 293.125, 0, "ONLY");
236 pMC->Gspos("BLO4", 2, "BFMO", 0., 0.,-293.125, 0, "ONLY");
238 pMC->Gspos("BFMO", 1, "ALIC", 0., 0., 0., 0, "ONLY");
239 pMC->Gsatt("BFMO", "SEEN", 0);
242 //_____________________________________________________________________________
243 void AliFRAMEv1::DrawDetector()
246 // Draw a shaded view of the space frame
249 AliMC* pMC = AliMC::GetMC();
251 // Set everything unseen
252 pMC->Gsatt("*", "seen", -1);
254 // Set ALIC mother transparent
255 pMC->Gsatt("ALIC","SEEN",0);
257 // Set the volumes visible
258 pMC->Gsatt("BFMO","seen",0);
259 pMC->Gsatt("BRO1","seen",1);
260 pMC->Gsatt("BRI1","seen",0);
261 pMC->Gsatt("BRO2","seen",1);
262 pMC->Gsatt("BRI2","seen",0);
263 pMC->Gsatt("BRO3","seen",1);
264 pMC->Gsatt("BRI3","seen",0);
265 pMC->Gsatt("BLO1","seen",0);
266 pMC->Gsatt("BLD1","seen",0);
267 pMC->Gsatt("BLO2","seen",0);
268 pMC->Gsatt("BLD2","seen",0);
269 pMC->Gsatt("BLO3","seen",0);
270 pMC->Gsatt("BLD3","seen",0);
271 pMC->Gsatt("BL01","seen",1);
272 pMC->Gsatt("BL02","seen",1);
273 pMC->Gsatt("BL11","seen",1);
274 pMC->Gsatt("BL12","seen",1);
275 pMC->Gsatt("BLO4","seen",0);
276 pMC->Gsatt("BLD4","seen",0);
277 pMC->Gsatt("BL03","seen",1);
278 pMC->Gsatt("BL04","seen",1);
280 pMC->Gdopt("hide", "on");
281 pMC->Gdopt("shad", "on");
282 pMC->Gsatt("*", "fill", 7);
283 pMC->SetClipBox(".");
285 pMC->Gdraw("alic", 40, 30, 0, 10, 10, .015, .015);
286 pMC->Gdhead(1111, "Space Frame");
287 pMC->Gdman(18, 4, "MAN");
290 //_____________________________________________________________________________
291 void AliFRAMEv1::CreateMaterials()
295 // Create materials for the space frame
298 Int_t ISXFLD = gAlice->Field()->Integ();
299 Float_t SXMGMX = gAlice->Field()->Max();
301 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
302 Float_t zsteel[4] = { 26.,24.,28.,14. };
303 Float_t wsteel[4] = { .715,.18,.1,.005 };
305 Float_t epsil, stmin, deemax, tmaxfd, stemax;
310 // --- Define the various materials for GEANT ---
311 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
312 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
315 // Defines tracking media parameters.
316 // Les valeurs sont commentees pour laisser le defaut
317 // a GEANT (version 3-21, page CONS200), f.m.
318 epsil = .001; // Tracking precision,
319 stemax = -1.; // Maximum displacement for multiple scat
320 tmaxfd = -20.; // Maximum angle due to field deflection
321 deemax = -.3; // Maximum fractional energy loss, DLS
324 //ifield0 = 0; // Field off
325 //ifield1 = 2; // 1.0 T. FIELD (DIPOLE)
331 AliMedium(1215, "AIR_L3_US ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
335 AliMedium(1219, "ST_L3_US ", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);