Introduction of the Copyright and cvs Log
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv1.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
18*/
19
fe4da5cc 20///////////////////////////////////////////////////////////////////////////////
21// //
22// Space frame class //
23// //
24//Begin_Html
25/*
1439f98e 26<img src="picts/AliFRAMEClass.gif">
fe4da5cc 27*/
28//End_Html
29// //
30///////////////////////////////////////////////////////////////////////////////
31
32#include "AliFRAMEv1.h"
33#include "AliRun.h"
fe4da5cc 34
35ClassImp(AliFRAMEv1)
36
37//_____________________________________________________________________________
b8032157 38AliFRAMEv1::AliFRAMEv1()
fe4da5cc 39{
40 //
41 // Default constructor for space frame
42 //
43}
44
45//_____________________________________________________________________________
46AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
47 : AliFRAME(name,title)
48{
49 //
50 // Standard constructor for space frame
51 //
52}
53
54//_____________________________________________________________________________
55void AliFRAMEv1::CreateGeometry()
56{
57 //
58 // Create space frame geometry
59 //
60 //Begin_Html
61 /*
1439f98e 62 <img src="picts/AliFRAME.gif">
fe4da5cc 63 */
64 //End_Html
65 //Begin_Html
66 /*
1439f98e 67 <img src="picts/AliFRAMETree.gif">
fe4da5cc 68 */
69 //End_Html
cfce8870 70
ad51aeb0 71 Int_t *idtmed = fIdtmed->GetArray()-1199;
fe4da5cc 72
73 Float_t dphi, dz_small, zpos, ddphi;
74 Float_t tspar[5];
75 Float_t tsparl[5];
76 Float_t par[50], dz_long;
77
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
83 // 2*Z_OU : LENGTH
84 // 2*DZ : WIDTH OF FRAME ELEMENTS
85 Float_t r_in = 395;
86 Float_t r_ou = 420;
87 Float_t dr = 0.3;
88 Float_t z_in = 130;
89 Float_t z_ou = 350;
90 Float_t z_ri = 236.25;
91 Float_t dz = 8.75;
92
93
94 // Space Frame
95
96 par[0] = r_in;
97 par[1] = r_ou;
98 par[2] = z_ou;
cfce8870 99 gMC->Gsvolu("BFMO", "TUBE", idtmed[1214], par, 3);
fe4da5cc 100
101 // Rings perpendicular to the beam
102
103 // full rings at the ends
104
105 par[0] = r_in;
106 par[1] = r_ou;
107 par[2] = dz;
cfce8870 108 gMC->Gsvolu("BRO1", "TUBE", idtmed[1218], par, 3);
fe4da5cc 109 par[0] = r_in +dr;
110 par[1] = r_ou -dr;
111 par[2] = dz - dr;
cfce8870 112 gMC->Gsvolu("BRI1", "TUBE", idtmed[1214], par, 3);
113 gMC->Gspos("BRI1", 1, "BRO1", 0., 0., 0., 0, "ONLY");
fe4da5cc 114 zpos = z_ou - dz;
cfce8870 115 gMC->Gspos("BRO1", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
116 gMC->Gspos("BRO1", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
fe4da5cc 117
118 // space for the HMPID
119
120 tspar[0] = r_in;
121 tspar[1] = r_ou;
122 tspar[2] = dz;
123 tspar[3] = -240.;
124 tspar[4] = 60.;
cfce8870 125 gMC->Gsvolu("BRO2", "TUBS", idtmed[1218], tspar, 5);
fe4da5cc 126 tspar[0] = r_in + dr;
127 tspar[1] = r_ou - dr;
128 tspar[2] = dz - dr;
cfce8870 129 gMC->Gsvolu("BRI2", "TUBS", idtmed[1214], tspar, 5);
130 gMC->Gspos("BRI2", 1, "BRO2", 0., 0., 0., 0, "ONLY");
fe4da5cc 131 zpos = z_in + dz;
cfce8870 132 gMC->Gspos("BRO2", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
133 gMC->Gspos("BRO2", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
fe4da5cc 134
135
136
137 tspar[0] = r_in;
138 tspar[1] = r_ou;
139 tspar[2] = dz;
140 tspar[3] = 60.;
141 tspar[4] = 120.;
cfce8870 142 gMC->Gsvolu("BRO3", "TUBS", idtmed[1218], tspar, 5);
fe4da5cc 143 tspar[0] = r_in + dr;
144 tspar[1] = r_ou - dr;
145 tspar[2] = dz - dr;
cfce8870 146 gMC->Gsvolu("BRI3", "TUBS", idtmed[1214], tspar, 5);
147 gMC->Gspos("BRI3", 1, "BRO3", 0., 0., 0., 0, "ONLY");
fe4da5cc 148 zpos = 245.;
cfce8870 149 gMC->Gspos("BRO3", 1, "BFMO", 0., 0.,-zpos, 0, "ONLY");
150 gMC->Gspos("BRO3", 2, "BFMO", 0., 0., zpos, 0, "ONLY");
fe4da5cc 151
152 // longitudinal beams
153
154 // outside phi=60-120
155
156 // virtual elements
157
158 dz_small = (z_ou - z_in -4*dz)/2;
159 dz_long = z_in;
160 tsparl[0] = r_in;
161 tsparl[1] = r_ou;
162 tsparl[2] = dz_small;
163
164 // left and right
165
166 tsparl[3] = -240.;
167 tsparl[4] = 60.;
cfce8870 168 gMC->Gsvolu("BLO1", "TUBS", idtmed[1214], tsparl, 5);
169 gMC->Gsdvt("BLD1", "BLO1", 20., 2, idtmed[1214], 15);
fe4da5cc 170
171 // central, leaving space for rich and phos
172
173 tsparl[2] = dz_long;
174 tsparl[3] = -20.;
175 tsparl[4] = 60.;
cfce8870 176 gMC->Gsvolu("BLO2", "TUBS", idtmed[1214], tsparl, 5);
177 gMC->Gsdvt("BLD2", "BLO2", 20., 2, idtmed[1214], 5);
fe4da5cc 178 tsparl[3] = 120.;
179 tsparl[4] = 200.;
cfce8870 180 gMC->Gsvolu("BLO3", "TUBS", idtmed[1214], tsparl, 5);
181 gMC->Gsdvt("BLD3", "BLO3", 20., 2, idtmed[1214], 5);
fe4da5cc 182
183 // real elements
184
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];
189 tspar[2] = dz_small;
190 tspar[3] = 10. - dphi;
191 tspar[4] = 10.;
cfce8870 192 gMC->Gsvolu("BL01", "TUBS", idtmed[1218], tspar, 5);
fe4da5cc 193
194 tspar[0] = tsparl[0] + dr;
195 tspar[1] = tsparl[1] - dr;
196 tspar[3] = 10. - dphi + ddphi;
197 tspar[4] = 10. - ddphi;
cfce8870 198 gMC->Gsvolu("BL02", "TUBS", idtmed[1214], tspar, 5);
199 gMC->Gspos("BL02", 1, "BL01", 0., 0., 0., 0, "ONLY");
fe4da5cc 200
201
202 tspar[0] = tsparl[0];
203 tspar[1] = tsparl[1];
204 tspar[2] = dz_long;
205 tspar[3] = 10. - dphi;
206 tspar[4] = 10.;
cfce8870 207 gMC->Gsvolu("BL11", "TUBS", idtmed[1218], tspar, 5);
fe4da5cc 208
209 tspar[0] = tsparl[0] + dr;
210 tspar[1] = tsparl[1] - dr;
211 tspar[3] = 10. - dphi + ddphi;
212 tspar[4] = 10. - ddphi;
cfce8870 213 gMC->Gsvolu("BL12", "TUBS", idtmed[1214], tspar, 5);
214 gMC->Gspos("BL12", 1, "BL11", 0., 0., 0., 0, "ONLY");
fe4da5cc 215
cfce8870 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");
fe4da5cc 219
220 zpos = z_in +2*dz + dz_small;
cfce8870 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");
fe4da5cc 225
226 // PHI=60-120 (RICH)
227
228 tsparl[0] = r_in;
229 tsparl[1] = r_ou;
230 tsparl[2] = (z_ou - z_ri -4*dz)/2;
231 tsparl[3] = 60.;
232 tsparl[4] = 120.;
cfce8870 233 gMC->Gsvolu("BLO4", "TUBS", idtmed[1214], tsparl, 5);
234 gMC->Gsdvt("BLD4", "BLO4", 20., 2, idtmed[1214], 3);
fe4da5cc 235 tspar[0] = tsparl[0];
236 tspar[1] = tsparl[1];
237 tspar[2] = tsparl[2];
238 tspar[3] = 10. - dphi;
239 tspar[4] = 10.;
cfce8870 240 gMC->Gsvolu("BL03", "TUBS", idtmed[1218], tspar, 5);
fe4da5cc 241
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;
cfce8870 247 gMC->Gsvolu("BL04", "TUBS", idtmed[1214], tspar, 5);
248 gMC->Gspos("BL04", 1, "BL03", 0., 0., 0., 0, "ONLY");
fe4da5cc 249
cfce8870 250 gMC->Gspos("BL03", 1, "BLD4", 0., 0., 0., 0, "ONLY");
fe4da5cc 251
cfce8870 252 gMC->Gspos("BLO4", 1, "BFMO", 0., 0., 293.125, 0, "ONLY");
253 gMC->Gspos("BLO4", 2, "BFMO", 0., 0.,-293.125, 0, "ONLY");
fe4da5cc 254
cfce8870 255 gMC->Gspos("BFMO", 1, "ALIC", 0., 0., 0., 0, "ONLY");
256 gMC->Gsatt("BFMO", "SEEN", 0);
fe4da5cc 257}
258
259//_____________________________________________________________________________
b8032157 260void AliFRAMEv1::DrawModule()
fe4da5cc 261{
262 //
263 // Draw a shaded view of the space frame
264 //
265
fe4da5cc 266 // Set everything unseen
cfce8870 267 gMC->Gsatt("*", "seen", -1);
fe4da5cc 268 //
269 // Set ALIC mother transparent
cfce8870 270 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 271 //
272 // Set the volumes visible
cfce8870 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);
fe4da5cc 294 //
cfce8870 295 gMC->Gdopt("hide", "on");
296 gMC->Gdopt("shad", "on");
297 gMC->Gsatt("*", "fill", 7);
298 gMC->SetClipBox(".");
299 gMC->DefaultRange();
300 gMC->Gdraw("alic", 40, 30, 0, 10, 10, .015, .015);
301 gMC->Gdhead(1111, "Space Frame");
302 gMC->Gdman(18, 4, "MAN");
fe4da5cc 303}
304
305//_____________________________________________________________________________
306void AliFRAMEv1::CreateMaterials()
307{
308
309 //
310 // Create materials for the space frame
311 //
312
313 Int_t ISXFLD = gAlice->Field()->Integ();
314 Float_t SXMGMX = gAlice->Field()->Max();
315
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 };
319
320 Float_t epsil, stmin, deemax, tmaxfd, stemax;
321
322 // STEEL
323
324
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);
328
329 // ****************
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
337 stmin = -.8;
338 // ***************
339 //ifield0 = 0; // Field off
340 //ifield1 = 2; // 1.0 T. FIELD (DIPOLE)
341 //ifield3 = 3;
342
343 // Air
344
345 // 0.2 T. FIELD (L3)
ad51aeb0 346 AliMedium(15, "AIR_L3_US ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 347
348 // Steel
349
ad51aeb0 350 AliMedium(19, "ST_L3_US ", 19, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 351}
352
353
354
355
356
357
358
359
360
361
362