1 ///////////////////////////////////////////////////////////////////////////////
3 // Space frame class //
7 <img src="picts/AliFRAMEClass.gif">
11 ///////////////////////////////////////////////////////////////////////////////
13 #include "AliFRAMEv1.h"
18 //_____________________________________________________________________________
19 AliFRAMEv1::AliFRAMEv1()
22 // Default constructor for space frame
26 //_____________________________________________________________________________
27 AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
28 : AliFRAME(name,title)
31 // Standard constructor for space frame
35 //_____________________________________________________________________________
36 void AliFRAMEv1::CreateGeometry()
39 // Create space frame geometry
43 <img src="picts/AliFRAME.gif">
48 <img src="picts/AliFRAMETree.gif">
52 Int_t *idtmed = fIdtmed->GetArray()-1199;
54 Float_t dphi, dz_small, zpos, ddphi;
57 Float_t par[50], dz_long;
59 // R_IN : INNER RADIUS
60 // R_OU : OUTER RADIUS
61 // DR : WALL THICKNESS
62 // 2*Z_IN : FREE SPACE IN Z FOR PHOS
63 // 2*Z_RI : FREE SPACE IN Z FOR RICH
65 // 2*DZ : WIDTH OF FRAME ELEMENTS
71 Float_t z_ri = 236.25;
80 gMC->Gsvolu("BFMO", "TUBE", idtmed[1214], par, 3);
82 // Rings perpendicular to the beam
84 // full rings at the ends
89 gMC->Gsvolu("BRO1", "TUBE", idtmed[1218], par, 3);
93 gMC->Gsvolu("BRI1", "TUBE", idtmed[1214], par, 3);
94 gMC->Gspos("BRI1", 1, "BRO1", 0., 0., 0., 0, "ONLY");
96 gMC->Gspos("BRO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
97 gMC->Gspos("BRO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
99 // space for the HMPID
106 gMC->Gsvolu("BRO2", "TUBS", idtmed[1218], tspar, 5);
107 tspar[0] = r_in + dr;
108 tspar[1] = r_ou - dr;
110 gMC->Gsvolu("BRI2", "TUBS", idtmed[1214], tspar, 5);
111 gMC->Gspos("BRI2", 1, "BRO2", 0., 0., 0., 0, "ONLY");
113 gMC->Gspos("BRO2", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
114 gMC->Gspos("BRO2", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
123 gMC->Gsvolu("BRO3", "TUBS", idtmed[1218], tspar, 5);
124 tspar[0] = r_in + dr;
125 tspar[1] = r_ou - dr;
127 gMC->Gsvolu("BRI3", "TUBS", idtmed[1214], tspar, 5);
128 gMC->Gspos("BRI3", 1, "BRO3", 0., 0., 0., 0, "ONLY");
130 gMC->Gspos("BRO3", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
131 gMC->Gspos("BRO3", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
133 // longitudinal beams
135 // outside phi=60-120
139 dz_small = (z_ou - z_in -4*dz)/2;
143 tsparl[2] = dz_small;
149 gMC->Gsvolu("BLO1", "TUBS", idtmed[1214], tsparl, 5);
150 gMC->Gsdvt("BLD1", "BLO1", 20., 2, idtmed[1214], 15);
152 // central, leaving space for rich and phos
157 gMC->Gsvolu("BLO2", "TUBS", idtmed[1214], tsparl, 5);
158 gMC->Gsdvt("BLD2", "BLO2", 20., 2, idtmed[1214], 5);
161 gMC->Gsvolu("BLO3", "TUBS", idtmed[1214], tsparl, 5);
162 gMC->Gsdvt("BLD3", "BLO3", 20., 2, idtmed[1214], 5);
166 dphi = dz/(TMath::Pi()*(r_in + r_ou))*360;
167 ddphi = dphi * dr/dz;
168 tspar[0] = tsparl[0];
169 tspar[1] = tsparl[1];
171 tspar[3] = 10. - dphi;
173 gMC->Gsvolu("BL01", "TUBS", idtmed[1218], tspar, 5);
175 tspar[0] = tsparl[0] + dr;
176 tspar[1] = tsparl[1] - dr;
177 tspar[3] = 10. - dphi + ddphi;
178 tspar[4] = 10. - ddphi;
179 gMC->Gsvolu("BL02", "TUBS", idtmed[1214], tspar, 5);
180 gMC->Gspos("BL02", 1, "BL01", 0., 0., 0., 0, "ONLY");
183 tspar[0] = tsparl[0];
184 tspar[1] = tsparl[1];
186 tspar[3] = 10. - dphi;
188 gMC->Gsvolu("BL11", "TUBS", idtmed[1218], tspar, 5);
190 tspar[0] = tsparl[0] + dr;
191 tspar[1] = tsparl[1] - dr;
192 tspar[3] = 10. - dphi + ddphi;
193 tspar[4] = 10. - ddphi;
194 gMC->Gsvolu("BL12", "TUBS", idtmed[1214], tspar, 5);
195 gMC->Gspos("BL12", 1, "BL11", 0., 0., 0., 0, "ONLY");
197 gMC->Gspos("BL01", 1, "BLD1", 0., 0., 0., 0, "ONLY");
198 gMC->Gspos("BL11", 1, "BLD2", 0., 0., 0., 0, "ONLY");
199 gMC->Gspos("BL11", 2, "BLD3", 0., 0., 0., 0, "ONLY");
201 zpos = z_in +2*dz + dz_small;
202 gMC->Gspos("BLO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
203 gMC->Gspos("BLO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
204 gMC->Gspos("BLO2", 1, "BFMO", 0., 0., 0., 0, "ONLY");
205 gMC->Gspos("BLO3", 1, "BFMO", 0., 0., 0., 0, "ONLY");
211 tsparl[2] = (z_ou - z_ri -4*dz)/2;
214 gMC->Gsvolu("BLO4", "TUBS", idtmed[1214], tsparl, 5);
215 gMC->Gsdvt("BLD4", "BLO4", 20., 2, idtmed[1214], 3);
216 tspar[0] = tsparl[0];
217 tspar[1] = tsparl[1];
218 tspar[2] = tsparl[2];
219 tspar[3] = 10. - dphi;
221 gMC->Gsvolu("BL03", "TUBS", idtmed[1218], tspar, 5);
223 tspar[0] = tsparl[0] + dr;
224 tspar[1] = tsparl[1] - dr;
225 tspar[2] = tsparl[2];
226 tspar[3] = 10. - dphi + ddphi;
227 tspar[4] = 10. - ddphi;
228 gMC->Gsvolu("BL04", "TUBS", idtmed[1214], tspar, 5);
229 gMC->Gspos("BL04", 1, "BL03", 0., 0., 0., 0, "ONLY");
231 gMC->Gspos("BL03", 1, "BLD4", 0., 0., 0., 0, "ONLY");
233 gMC->Gspos("BLO4", 1, "BFMO", 0., 0., 293.125, 0, "ONLY");
234 gMC->Gspos("BLO4", 2, "BFMO", 0., 0.,-293.125, 0, "ONLY");
236 gMC->Gspos("BFMO", 1, "ALIC", 0., 0., 0., 0, "ONLY");
237 gMC->Gsatt("BFMO", "SEEN", 0);
240 //_____________________________________________________________________________
241 void AliFRAMEv1::DrawModule()
244 // Draw a shaded view of the space frame
247 // Set everything unseen
248 gMC->Gsatt("*", "seen", -1);
250 // Set ALIC mother transparent
251 gMC->Gsatt("ALIC","SEEN",0);
253 // Set the volumes visible
254 gMC->Gsatt("BFMO","seen",0);
255 gMC->Gsatt("BRO1","seen",1);
256 gMC->Gsatt("BRI1","seen",0);
257 gMC->Gsatt("BRO2","seen",1);
258 gMC->Gsatt("BRI2","seen",0);
259 gMC->Gsatt("BRO3","seen",1);
260 gMC->Gsatt("BRI3","seen",0);
261 gMC->Gsatt("BLO1","seen",0);
262 gMC->Gsatt("BLD1","seen",0);
263 gMC->Gsatt("BLO2","seen",0);
264 gMC->Gsatt("BLD2","seen",0);
265 gMC->Gsatt("BLO3","seen",0);
266 gMC->Gsatt("BLD3","seen",0);
267 gMC->Gsatt("BL01","seen",1);
268 gMC->Gsatt("BL02","seen",1);
269 gMC->Gsatt("BL11","seen",1);
270 gMC->Gsatt("BL12","seen",1);
271 gMC->Gsatt("BLO4","seen",0);
272 gMC->Gsatt("BLD4","seen",0);
273 gMC->Gsatt("BL03","seen",1);
274 gMC->Gsatt("BL04","seen",1);
276 gMC->Gdopt("hide", "on");
277 gMC->Gdopt("shad", "on");
278 gMC->Gsatt("*", "fill", 7);
279 gMC->SetClipBox(".");
281 gMC->Gdraw("alic", 40, 30, 0, 10, 10, .015, .015);
282 gMC->Gdhead(1111, "Space Frame");
283 gMC->Gdman(18, 4, "MAN");
286 //_____________________________________________________________________________
287 void AliFRAMEv1::CreateMaterials()
291 // Create materials for the space frame
294 Int_t ISXFLD = gAlice->Field()->Integ();
295 Float_t SXMGMX = gAlice->Field()->Max();
297 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
298 Float_t zsteel[4] = { 26.,24.,28.,14. };
299 Float_t wsteel[4] = { .715,.18,.1,.005 };
301 Float_t epsil, stmin, deemax, tmaxfd, stemax;
306 // --- Define the various materials for GEANT ---
307 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
308 AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
311 // Defines tracking media parameters.
312 // Les valeurs sont commentees pour laisser le defaut
313 // a GEANT (version 3-21, page CONS200), f.m.
314 epsil = .001; // Tracking precision,
315 stemax = -1.; // Maximum displacement for multiple scat
316 tmaxfd = -20.; // Maximum angle due to field deflection
317 deemax = -.3; // Maximum fractional energy loss, DLS
320 //ifield0 = 0; // Field off
321 //ifield1 = 2; // 1.0 T. FIELD (DIPOLE)
327 AliMedium(15, "AIR_L3_US ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
331 AliMedium(19, "ST_L3_US ", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);