AliTrackReference constructor without passing pointer to VMC.
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv2.cxx
CommitLineData
7e5caa00 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
eeacf08b 16/* $Id$ */
6304e7d2 17
eeacf08b 18//------------------------------------------------------------------------
19// AliFRAMEv2.cxx
20// symmetric space frame with possibility for holes
21// Author: A.Morsch
22//------------------------------------------------------------------------
7e5caa00 23
24#include "AliFRAMEv2.h"
25#include "AliMagF.h"
26#include "AliRun.h"
7e5caa00 27#include "TSystem.h"
28
29ClassImp(AliFRAMEv2)
30
31//_____________________________________________________________________________
32AliFRAMEv2::AliFRAMEv2()
33{
34// Constructor
35 SetHoles(0);
36}
37
38//_____________________________________________________________________________
39AliFRAMEv2::AliFRAMEv2(const char *name, const char *title)
40 : AliFRAME(name,title)
41{
42// Constructor
43 SetHoles(0);
44}
45
46
47//___________________________________________
48void AliFRAMEv2::CreateGeometry()
49{
50//Begin_Html
51/*
52<img src="picts/frame.gif">
53*/
54//End_Html
55
56
57//Begin_Html
58/*
59<img src="picts/tree_frame.gif">
60*/
61//End_Html
62
4a8eca94 63 Int_t idrotm[2299];
7e5caa00 64 Int_t *idtmed = fIdtmed->GetArray()-1999;
65//
66// The Space frame
67//
68//
e16311cb 69 Float_t pbox[3], ptrap[11], ptrd1[4], ppgon[10];
7e5caa00 70
71 Float_t dx, dy, dz;
72 Int_t i, j, jmod;
73//
74// Constants
75 const Float_t kEps = 0.01;
76 const Int_t kAir = idtmed[2004];
77 const Int_t kSteel = idtmed[2064];
78
79 const Float_t krad2deg = 180./TMath::Pi();
80 const Float_t kdeg2rad = 1./krad2deg;
81
4c057bc8 82 Float_t iFrH = 114.40;
83 Float_t ringH = 4.00;
84 Float_t ringW = 10.00;
85 Float_t longH = 5.39;
86 Float_t longW = 6.00;
87 Float_t dwl = 3.14;
88 Float_t dwh = 0.96;
7e5caa00 89
02e42643 90//
4a8eca94 91 Float_t dymodU[3] = {70.0, 224.0, 341.};
02e42643 92// new ?
4a8eca94 93 Float_t dymodL[3] = {54.0, 178.5, 341.};
af3fbbe1 94
7e5caa00 95//
96// Frame mother volume
97//
b35d7d26 98// ptube[0] = 280.;
99// ptube[1] = 430.;
100// ptube[2] = 376.;
101 ppgon[0] = 0.;
102 ppgon[1] = 360.;
103 ppgon[2] = 18.;
104
105 ppgon[3] = 2.;
106
107 ppgon[4] = -376.;
108 ppgon[5] = 280.;
109 ppgon[6] = 421.;
110
111 ppgon[7] = -ppgon[4];
112 ppgon[8] = ppgon[5];
113 ppgon[9] = ppgon[6];
114
115 gMC->Gsvolu("B077", "PGON", kAir, ppgon, 10);
116
117// gMC->Gsvolu("B077", "TUBE", kAir, ptube, 3);
7e5caa00 118 gMC->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY");
119//
120// The outer Frame
121//
122
123 Float_t dol = 8.75;
124 Float_t doh = 5.;
125 Float_t ds = 0.35;
126//
127// Mother volume
128//
129 ppgon[0] = 0.;
130 ppgon[1] = 360.;
131 ppgon[2] = 18.;
132
133 ppgon[3] = 2.;
134
135 ppgon[4] = -350.;
136 ppgon[5] = 399.;
137 ppgon[6] = 420.7122;
138
139 ppgon[7] = -ppgon[4];
140 ppgon[8] = ppgon[5];
141 ppgon[9] = ppgon[6];
142 gMC->Gsvolu("B076", "PGON", kAir, ppgon, 10);
143 gMC->Gspos("B076", 1, "B077", 0., 0., 0., 0, "ONLY");
144//
145// Rings
146//
147 dz = 2.*410.2*TMath::Sin(10.*kdeg2rad)-2.*dol*TMath::Cos(10.*kdeg2rad)-
148 2.*doh*TMath::Tan(10.*kdeg2rad);
149 Float_t l1 = dz/2.;
150 Float_t l2 = dz/2.+2.*doh*TMath::Tan(10.*kdeg2rad);
151
152 ptrd1[0] = l1;
153 ptrd1[1] = l2;
154
155 ptrd1[2] = dol;
156 ptrd1[3] = doh;
157 gMC->Gsvolu("B042", "TRD1", kSteel, ptrd1, 4);
158
159 ptrd1[0] = ptrd1[0]+ds*(l2-l1)/2./doh;
160 ptrd1[1] = ptrd1[1]-ds*(l2-l1)/2./doh;
161 ptrd1[2] = dol-ds;
162 ptrd1[3] = doh-ds;
163 gMC->Gsvolu("B043", "TRD1", kAir, ptrd1, 4);
164 gMC->Gspos("B043", 1, "B042", 0., 0., 0., 0, "ONLY");
165//
166// longitudinal bars
167//
168// 170x200x5
169//
170 pbox[0] = dol;
171 pbox[1] = doh;
172 pbox[2] = 350.;
173 gMC->Gsvolu("B033", "BOX", kSteel, pbox, 3);
174 pbox[0] = dol-ds;
175 pbox[1] = doh-ds;
176 gMC->Gsvolu("B034", "BOX", kAir, pbox, 3);
177 gMC->Gspos("B034", 1, "B033", 0., 0., 0., 0, "ONLY");
178
179 pbox[0] = 1.0;
180 pbox[1] = 5.0;
181 pbox[2] = 375.5;
182
183
184 gMC->Gsvolu("B080", "BOX", kSteel, pbox, 3);
b35d7d26 185 gMC->Gspos("B080", 1, "B077", 286.01, 0., 0., 0, "ONLY");
186 gMC->Gspos("B080", 2, "B077", -286.01, 0., 0., 0, "ONLY");
7e5caa00 187
188//
189// Diagonal bars (1)
190//
191 Float_t h, d, dq, x, theta;
192
4a8eca94 193 h = (dymodU[1]-dymodU[0]-2.*dol)*.999;
7e5caa00 194 d = 2.*dol;
195 dq = h*h+dz*dz;
196
197 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
198
199
200 theta = krad2deg * TMath::ACos(x);
201
202 ptrap[0] = dz/2.;
203 ptrap[1] = theta;
204 ptrap[2] = 0.;
205 ptrap[3] = doh;
206 ptrap[4] = dol/x;
207 ptrap[5] = ptrap[4];
208 ptrap[6] = 0;
209 ptrap[7] = ptrap[3];
210 ptrap[8] = ptrap[4];
211 ptrap[9] = ptrap[4];
212 ptrap[10] = 0;
213
214 gMC->Gsvolu("B047", "TRAP", kSteel, ptrap, 11);
215 ptrap[3] = doh-ds;
216 ptrap[4] = (dol-ds)/x;
217 ptrap[5] = ptrap[4];
218 ptrap[7] = ptrap[3];
219 ptrap[8] = ptrap[4];
220 ptrap[9] = ptrap[4];
221 gMC->Gsvolu("B048", "TRAP", kAir, ptrap, 11);
222 gMC->Gspos("B048", 1, "B047", 0.0, 0.0, 0., 0, "ONLY");
223
224/*
225 Crosses (inner most)
226 \\ //
227 \\//
228 //\\
229 // \\
230*/
4a8eca94 231 h = (2.*dymodU[0]-2.*dol)*.999;
7e5caa00 232//
233// Mother volume
234//
235 pbox[0] = h/2;
236 pbox[1] = doh;
237 pbox[2] = dz/2.;
238 gMC->Gsvolu("BM49", "BOX ", kAir, pbox, 3);
239
240
241 dq = h*h+dz*dz;
242 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
243 theta = krad2deg * TMath::ACos(x);
244
245 ptrap[0] = dz/2.-kEps;
246 ptrap[1] = theta;
247 ptrap[2] = 0.;
248 ptrap[3] = doh-kEps;
249 ptrap[4] = dol/x;
250 ptrap[5] = ptrap[4];
251 ptrap[7] = ptrap[3];
252 ptrap[8] = ptrap[4];
253 ptrap[9] = ptrap[4];
254
255 gMC->Gsvolu("B049", "TRAP", kSteel, ptrap, 11);
256 ptrap[0] = ptrap[0]-kEps;
257 ptrap[3] = (doh-ds);
258 ptrap[4] = (dol-ds)/x;
259 ptrap[5] = ptrap[4];
260 ptrap[7] = ptrap[3];
261 ptrap[8] = ptrap[4];
262 ptrap[9] = ptrap[4];
263 gMC->Gsvolu("B050", "TRAP", kAir, ptrap, 11);
264 gMC->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY");
265 gMC->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY");
266
267
268 Float_t dd1 = d*TMath::Tan(theta*kdeg2rad);
269 Float_t dd2 = d/TMath::Tan(2.*theta*kdeg2rad);
270 Float_t theta2 = TMath::ATan(TMath::Abs(dd2-dd1)/d/2.);
271
272
273 ptrap[0] = dol;
274 ptrap[1] = theta2*krad2deg;
275 ptrap[2] = 0.;
276 ptrap[3] = doh;
277 ptrap[4] = (dz/2./x-dd1-dd2)/2.;
278 ptrap[5] = ptrap[4];
279 ptrap[6] = 0.;
280 ptrap[7] = ptrap[3];
281 ptrap[8] = dz/4./x;
282 ptrap[9] = ptrap[8];
283
284
285 gMC->Gsvolu("B051", "TRAP", kSteel, ptrap, 11);
286 Float_t ddx0 = ptrap[8];
287
288 Float_t dd1s = dd1*(1.-2.*ds/d);
289 Float_t dd2s = dd2*(1.-2.*ds/d);
290 Float_t theta2s = TMath::ATan(TMath::Abs(dd2s-dd1s)/(d-2.*ds)/2.);
291
292
293 ptrap[0] = dol-ds;
294 ptrap[1] = theta2s*krad2deg;
295 ptrap[2] = 0.;
296 ptrap[3] = doh-ds;
297 ptrap[4] = ptrap[4]+ds/d/2.*(dd1+dd2);
298 ptrap[5] = ptrap[4];
299 ptrap[6] = 0.;
300 ptrap[7] = ptrap[3];
301 ptrap[8] = ptrap[8]-ds/2./d*(dd1+dd2);
302 ptrap[9] = ptrap[8];
303
304 gMC->Gsvolu("B052", "TRAP", kAir, ptrap, 11);
305 gMC->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY");
306
307 Float_t ddx, ddz, drx, drz, rtheta;
308
4a8eca94 309 AliMatrix(idrotm[2001], -theta+180, 0.0, 90.0, 90.0, 90.-theta, 0.0);
7e5caa00 310 rtheta = (90.-theta)*kdeg2rad;
311 ddx = -ddx0-dol*TMath::Tan(theta2);
312 ddz = -dol;
313
314 drx = TMath::Cos(rtheta) * ddx +TMath::Sin(rtheta) *ddz+pbox[0];
315 drz = -TMath::Sin(rtheta) * ddx +TMath::Cos(rtheta) *ddz-pbox[2];
316 gMC->Gspos("B051", 1, "BM49",
317 drx, 0.0, drz,
4a8eca94 318 idrotm[2001], "ONLY");
7e5caa00 319
4a8eca94 320 AliMatrix(idrotm[2002], -theta, 0.0, 90.0, 90.0, 270.-theta, 0.0);
7e5caa00 321 rtheta = (270.-theta)*kdeg2rad;
322
323 drx = TMath::Cos(rtheta) * ddx + TMath::Sin(rtheta) * ddz-pbox[0];
324 drz = -TMath::Sin(rtheta) * ddx + TMath::Cos(rtheta) * ddz+pbox[2];
325 gMC->Gspos("B051", 2, "BM49",
326 drx, 0.0, drz,
4a8eca94 327 idrotm[2002], "ONLY");
7e5caa00 328
329//
330// Diagonal bars (3)
331//
4a8eca94 332 h = ((dymodU[2]-dymodU[1])-2.*dol)*.999;
7e5caa00 333 dq = h*h+dz*dz;
334 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
335 theta = krad2deg * TMath::ACos(x);
336
337 ptrap[0] = dz/2.;
338 ptrap[1] = theta;
339 ptrap[3] = doh;
340 ptrap[4] = dol/x;
341 ptrap[5] = ptrap[4];
342 ptrap[7] = ptrap[3];
343 ptrap[8] = ptrap[4];
344 ptrap[9] = ptrap[4];
345
346 gMC->Gsvolu("B045", "TRAP", kSteel, ptrap, 11);
347 ptrap[3] = doh-ds;
348 ptrap[4] = (dol-ds)/x;
349 ptrap[5] = ptrap[4];
350 ptrap[7] = ptrap[3];
351 ptrap[8] = ptrap[4];
352 ptrap[9] = ptrap[4];
353 gMC->Gsvolu("B046", "TRAP", kAir, ptrap, 11);
354 gMC->Gspos("B046", 1, "B045", 0.0, 0.0, 0., 0, "ONLY");
355
356//
357// Positioning of diagonal bars
358//
359// Matrices have been imported from Euclid. Some simplification
360// seems possible
361//
4a8eca94 362 AliMatrix(idrotm[2003], 0.0, 0.0, 90.0, 130.0, 90.0, 40.0);
363 AliMatrix(idrotm[2004], 180.0, 0.0, 90.0, 130.0, 90.0, 40.0);
364 AliMatrix(idrotm[2005], 180.0, 0.0, 90.0, 150.0, 90.0, 240.0);
365 AliMatrix(idrotm[2006], 0.0, 0.0, 90.0, 150.0, 90.0, 240.0);
366 AliMatrix(idrotm[2007], 0.0, 0.0, 90.0, 170.0, 90.0, 80.0);
367 AliMatrix(idrotm[2008], 180.0, 0.0, 90.0, 190.0, 90.0, 280.0);
368 AliMatrix(idrotm[2009], 180.0, 0.0, 90.0, 170.0, 90.0, 80.0);
369 AliMatrix(idrotm[2010], 0.0, 0.0, 90.0, 190.0, 90.0, 280.0);
370 AliMatrix(idrotm[2011], 0.0, 0.0, 90.0, 350.0, 90.0, 260.0);
371 AliMatrix(idrotm[2012], 180.0, 0.0, 90.0, 350.0, 90.0, 260.0);
372 AliMatrix(idrotm[2013], 180.0, 0.0, 90.0, 10.0, 90.0, 100.0);
373 AliMatrix(idrotm[2014], 0.0, 0.0, 90.0, 10.0, 90.0, 100.0);
374 AliMatrix(idrotm[2015], 0.0, 0.0, 90.0, 30.0, 90.0, 300.0);
375 AliMatrix(idrotm[2016], 180.0, 0.0, 90.0, 30.0, 90.0, 300.0);
376 AliMatrix(idrotm[2017], 180.0, 0.0, 90.0, 50.0, 90.0, 140.0);
377 AliMatrix(idrotm[2018], 0.0, 0.0, 90.0, 50.0, 90.0, 140.0);
378
379 AliMatrix(idrotm[2019], 180.0, 0.0, 90.0, 130.0, 90.0, 220.0);
380 AliMatrix(idrotm[2020], 180.0, 0.0, 90.0, 50.0, 90.0, 320.0);
381 AliMatrix(idrotm[2021], 180.0, 0.0, 90.0, 150.0, 90.0, 60.0);
382 AliMatrix(idrotm[2022], 180.0, 0.0, 90.0, 30.0, 90.0, 120.0);
383 AliMatrix(idrotm[2023], 180.0, 0.0, 90.0, 170.0, 90.0, 260.0);
384 AliMatrix(idrotm[2024], 180.0, 0.0, 90.0, 190.0, 90.0, 100.0);
385 AliMatrix(idrotm[2025], 180.0, 0.0, 90.0, 350.0, 90.0, 80.0);
386 AliMatrix(idrotm[2026], 180.0, 0.0, 90.0, 10.0, 90.0, 280.0);
387
388 AliMatrix(idrotm[2027], 0.0, 0.0, 90.0, 50.0, 90.0, 320.0);
389 AliMatrix(idrotm[2028], 0.0, 0.0, 90.0, 150.0, 90.0, 60.0);
390 AliMatrix(idrotm[2029], 0.0, 0.0, 90.0, 30.0, 90.0, 120.0);
391 AliMatrix(idrotm[2030], 0.0, 0.0, 90.0, 10.0, 90.0, 280.0);
392 AliMatrix(idrotm[2031], 0.0, 0.0, 90.0, 170.0, 90.0, 260.0);
393 AliMatrix(idrotm[2032], 0.0, 0.0, 90.0, 190.0, 90.0, 100.0);
394 AliMatrix(idrotm[2033], 0.0, 0.0, 90.0, 350.0, 90.0, 80.0);
7e5caa00 395
396 Float_t rd = 410.56;
4a8eca94 397 dz = (dymodU[1]+dymodU[0])/2.;
398 Float_t dz2 = (dymodU[1]+dymodU[2])/2.;
7e5caa00 399
400//
401// phi = 40
402//
403 Float_t phi = 40;
404 dx = rd * TMath::Sin(phi*kdeg2rad);
405 dy = rd * TMath::Cos(phi*kdeg2rad);
406
825c6db0 407// gMC->Gspos("B047", 1, "B076", -dx, dy, dz, idrotm[2004], "ONLY");
408// gMC->Gspos("B047", 2, "B076", -dx, dy, -dz, idrotm[2003], "ONLY");
e16311cb 409// gMC->Gspos("B047", 3, "B076", dx, dy, dz, idrotm[2017], "ONLY");
410// gMC->Gspos("B047", 4, "B076", dx, dy, -dz, idrotm[2018], "ONLY");
7e5caa00 411
4a8eca94 412 gMC->Gspos("B045", 1, "B076", -dx, dy, dz2, idrotm[2019], "ONLY");
413 gMC->Gspos("B045", 2, "B076", -dx, dy, -dz2, idrotm[2003], "ONLY"); // ?
414 gMC->Gspos("B045", 3, "B076", dx, dy, dz2, idrotm[2020], "ONLY");
415 gMC->Gspos("B045", 4, "B076", dx, dy, -dz2, idrotm[2027], "ONLY");
7e5caa00 416
e16311cb 417// gMC->Gspos("BM49", 1, "B076", dx, dy, 0., idrotm[2020], "ONLY");
825c6db0 418// gMC->Gspos("BM49", 2, "B076", -dx, dy, 0., idrotm[2019], "ONLY");
7e5caa00 419
420//
421// phi = 60
422//
423
424 phi = 60;
425 dx = rd * TMath::Sin(phi*kdeg2rad);
426 dy = rd * TMath::Cos(phi*kdeg2rad);
825c6db0 427// gMC->Gspos("B047", 5, "B076", -dx, dy, dz, idrotm[2005], "ONLY");
428// gMC->Gspos("B047", 6, "B076", -dx, dy, -dz, idrotm[2006], "ONLY");
e16311cb 429// gMC->Gspos("B047", 7, "B076", dx, dy, dz, idrotm[2016], "ONLY");
430// gMC->Gspos("B047", 8, "B076", dx, dy, -dz, idrotm[2015], "ONLY");
7e5caa00 431
4a8eca94 432 gMC->Gspos("B045", 5, "B076", -dx, dy, dz2, idrotm[2021], "ONLY");
433 gMC->Gspos("B045", 6, "B076", -dx, dy, -dz2, idrotm[2028], "ONLY");
434 gMC->Gspos("B045", 7, "B076", dx, dy, dz2, idrotm[2022], "ONLY");
435 gMC->Gspos("B045", 8, "B076", dx, dy, -dz2, idrotm[2029], "ONLY");
7e5caa00 436
e16311cb 437// gMC->Gspos("BM49", 3, "B076", dx, dy, 0., idrotm[2022], "ONLY");
825c6db0 438// gMC->Gspos("BM49", 4, "B076", -dx, dy, 0., idrotm[2021], "ONLY");
7e5caa00 439//
440// phi = 80
441//
442
443 phi = 80;
444 dx = rd * TMath::Sin(phi*kdeg2rad);
445 dy = rd * TMath::Cos(phi*kdeg2rad);
825c6db0 446// gMC->Gspos("B047", 9, "B076", -dx, dy, dz, idrotm[2009], "ONLY");
447// gMC->Gspos("B047", 10, "B076", -dx, dy, -dz, idrotm[2007], "ONLY");
e16311cb 448// gMC->Gspos("B047", 11, "B076", dx, dy, dz, idrotm[2013], "ONLY");
449// gMC->Gspos("B047", 12, "B076", dx, dy, -dz, idrotm[2014], "ONLY");
7e5caa00 450
4a8eca94 451 gMC->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2008], "ONLY");
452 gMC->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2010], "ONLY");
453 gMC->Gspos("B047", 15, "B076", dx, -dy, dz, idrotm[2012], "ONLY");
454 gMC->Gspos("B047", 16, "B076", dx, -dy, -dz, idrotm[2011], "ONLY");
7e5caa00 455
4a8eca94 456 gMC->Gspos("B045", 9, "B076", -dx, dy, dz2, idrotm[2023], "ONLY");
457 gMC->Gspos("B045", 10, "B076", -dx, dy, -dz2, idrotm[2031], "ONLY");
458 gMC->Gspos("B045", 11, "B076", dx, dy, dz2, idrotm[2026], "ONLY");
459 gMC->Gspos("B045", 12, "B076", dx, dy, -dz2, idrotm[2030], "ONLY");
7e5caa00 460
4a8eca94 461 gMC->Gspos("B045", 13, "B076", -dx, -dy, dz2, idrotm[2024], "ONLY");
462 gMC->Gspos("B045", 14, "B076", -dx, -dy, -dz2, idrotm[2032], "ONLY");
463 gMC->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2025], "ONLY");
464 gMC->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2033], "ONLY");
7e5caa00 465
e16311cb 466// gMC->Gspos("BM49", 5, "B076", dx, dy, 0., idrotm[2026], "ONLY");
825c6db0 467// gMC->Gspos("BM49", 6, "B076", -dx, dy, 0., idrotm[2023], "ONLY");
4a8eca94 468 gMC->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2025], "ONLY");
469 gMC->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2024], "ONLY");
7e5caa00 470
471
472// The internal frame
473//
474 char* module[3] = {"B071\0", "B074\0", "B075\0"};
475//
476//
477// Mother Volumes
478//
479 ptrd1[0] = 50.18;
480 ptrd1[1] = 70.35;
481// ptrd1[0] = 50.10;
482// ptrd1[1] = 70.20;
483
484 ptrd1[2] = 375.5;
485 ptrd1[3] = 57.2;
486 for (jmod = 0; jmod < 3; jmod++)
487 {
488 gMC->Gsvolu(module[jmod], "TRD1", kAir, ptrd1, 4);
489 }
5f9c2f9e 490// Position of Holes for PHOS (P) and RICH (R) starting at 6h
491// P P P - - R R R - - - - - - - - P P
492 Int_t mod[18] = {1, 1, 1, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
7e5caa00 493
494
495 Float_t r = 341.8;
496 Float_t rout1 = 410.564;
497 Float_t rout2 = 415.2;
498 Int_t modcount[3] = {0, 0, 0};
499
500 for (i=0; i<18; i++) {
501 Float_t phi = i*20.;
502 Float_t phi2 = 270+phi;
503 if (phi2 >= 360.) phi2-=360.;
504
505 dx = TMath::Sin(phi*kdeg2rad)*r;
506 dy = -TMath::Cos(phi*kdeg2rad)*r;
507 modcount[mod[i]]++;
508
4a8eca94 509 AliMatrix(idrotm[2034+i], 90.0, phi, 0., 0., 90., phi2);
510 gMC->Gspos(module[mod[i]], modcount[mod[i]], "B077", dx, dy, 0., idrotm[2034+i], "ONLY");
7e5caa00 511//
512// Position elements of outer Frame
513//
514 dx = TMath::Sin(phi*kdeg2rad)*rout1;
515 dy = -TMath::Cos(phi*kdeg2rad)*rout1;
516 for (j = 0; j < 3; j++)
517 {
4a8eca94 518 dz = dymodU[j];
519 gMC->Gspos("B042", 6*i+2*j+1, "B076", dx, dy, dz, idrotm[2034+i], "ONLY");
520 gMC->Gspos("B042", 6*i+2*j+2, "B076", dx, dy, -dz, idrotm[2034+i], "ONLY");
7e5caa00 521 }
522
523 phi = i*20.+10;
524 phi2 = 270+phi;
4a8eca94 525 AliMatrix(idrotm[2052+i], 90.0, phi, 90., phi2, 0., 0.);
7e5caa00 526
527 dx = TMath::Sin(phi*kdeg2rad)*rout2;
528 dy = -TMath::Cos(phi*kdeg2rad)*rout2;
4a8eca94 529 gMC->Gspos("B033", i+1, "B076", dx, dy, 0., idrotm[2052+i], "ONLY");
7e5caa00 530//
531 }
532// Internal Frame rings
533//
534//
535// new specs: 40x100x6 for inner rings
536// 30x135x6 for front and rear rings
537//
538// currently no distinction between front/rear and inner rings
539//
540//
541//
542 pbox[0] = 50.;
543 pbox[1] = ringW/2.;
544 pbox[2] = ringH/2.;
545
546 gMC->Gsvolu("B072", "BOX ", kSteel, pbox, 3);
547
548 pbox[1] = pbox[1] - 0.6;
549 pbox[2] = pbox[2] - 0.6;
550 gMC->Gsvolu("B073", "BOX ", kAir, pbox, 3);
551 gMC->Gspos("B073", 1, "B072", 0., 0., 0., 0, "ONLY");
552
553// Web frame 0-degree
554//
555// h x w x s = 60x40x4
556// (attention: element is are half bars, "U" shaped)
557//
4a8eca94 558 dz = 106.2;
559 d = 2.*dwl;
560 h = dymodU[0]-dymodL[0];
561 dq = h*h+dz*dz;
562
563 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
7e5caa00 564
4a8eca94 565 theta = TMath::ACos(x);
566 Float_t thetaP = (TMath::Pi()-theta)*krad2deg;
567
568 ptrap[0] = dz/2.;
569 ptrap[1] = thetaP;
570 ptrap[2] = 0.;
571 ptrap[3] = dwh;
572 ptrap[4] = dwl/cos(theta);
573 ptrap[5] = ptrap[4];
574 ptrap[6] = 0;
575 ptrap[7] = ptrap[3];
576 ptrap[8] = ptrap[4];
577 ptrap[9] = ptrap[4];
578 ptrap[10] = 0;
579 gMC->Gsvolu("B063", "TRAP", kSteel, ptrap, 11);
580 ptrap[3] = dwh - 0.2;
581 ptrap[4] = (dwl-0.4)/cos(theta);
582 ptrap[5] = ptrap[4];
583 ptrap[7] = ptrap[3];
584 ptrap[8] = ptrap[4];
585 ptrap[9] = ptrap[4];
586 gMC->Gsvolu("B064", "TRAP", kAir, ptrap, 11);
587 gMC->Gspos("B064", 1, "B063", 0.0, -0.2, 0., 0, "ONLY");
588
589
590 h = 106.2;
591 d = 2.*dwl;
592 dz = dymodU[1]-dymodL[1];
593 dq = h*h+dz*dz;
594
595 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
596
597
598 theta = krad2deg * TMath::ACos(x);
599
600 ptrap[0] = dz/2.;
601 ptrap[1] = theta;
602 ptrap[2] = 0.;
603 ptrap[3] = dwh;
604 ptrap[4] = dwl/x;
605 ptrap[5] = ptrap[4];
606 ptrap[6] = 0;
607 ptrap[7] = ptrap[3];
608 ptrap[8] = ptrap[4];
609 ptrap[9] = ptrap[4];
610 ptrap[10] = 0;
611 gMC->Gsvolu("B163", "TRAP", kSteel, ptrap, 11);
612 ptrap[3] = dwh - 0.2;
613 ptrap[4] = (dwl-0.4)/x;
614 ptrap[5] = ptrap[4];
615 ptrap[7] = ptrap[3];
616 ptrap[8] = ptrap[4];
617 ptrap[9] = ptrap[4];
618 gMC->Gsvolu("B164", "TRAP", kAir, ptrap, 11);
619 gMC->Gspos("B164", 1, "B163", 0.0, -0.2, 0., 0, "ONLY");
620
621
7e5caa00 622 pbox[0] = dwh;
623 pbox[1] = dwl;
624 pbox[2] = (iFrH-ringH-longH)/2.;
4a8eca94 625 gMC->Gsvolu("B263", "BOX ", kSteel, pbox, 3);
7e5caa00 626 pbox[0] = dwh-0.2;
627 pbox[1] = dwl-0.4;
628
4a8eca94 629 gMC->Gsvolu("B264", "BOX ", kAir, pbox, 3);
630 gMC->Gspos("B264", 1, "B263", 0.2, 0., 0., 0, "ONLY");
631
632
633 AliMatrix(idrotm[2070], 90.0, 0.0, 90.0, 270.0, 0.0, 0.0);
634//
635 AliMatrix(idrotm[2071], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0);
636 AliMatrix(idrotm[2072], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
637 AliMatrix(idrotm[2073], 100.0, 180.0, 90.0, 270.0, 10.0, 180.0);
638 AliMatrix(idrotm[2074], 100.0, 180.0, 90.0, 90.0, 10.0, 180.0);
639//
640 AliMatrix(idrotm[2075], 10.0, 0.0, 80.0, 180.0, 90.0, 90.0);
641 AliMatrix(idrotm[2076], 10.0, 0.0, 80.0, 180.0, 90.0, 270.0);
642 AliMatrix(idrotm[2077], 10.0, 180.0, 80.0, 0.0, 90.0, 90.0);
643 AliMatrix(idrotm[2078], 10.0, 180.0, 80.0, 0.0, 90.0, 270.0);
644//
645 AliMatrix(idrotm[2079], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0);
646 AliMatrix(idrotm[2080], 170.0, 180.0, 80.0, 180.0, 90.0, 270.0);
647 AliMatrix(idrotm[2081], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0);
648 AliMatrix(idrotm[2082], 170.0, 0.0, 80.0, 0.0, 90.0, 270.0);
649
650//
651 AliMatrix(idrotm[2083], 170.0, 0.0, 90.0, 90.0, 80.0, 0.0);
652 AliMatrix(idrotm[2084], 170.0, 180.0, 90.0, 90.0, 80.0, 180.0);
653 AliMatrix(idrotm[2085], 90.0, 180.0, 90.0, 90.0, 0.0, 0.0);
654//
655 AliMatrix(idrotm[2086], 90.0, 90.0, 100.0, 0., 170.0, 180.0);
656 AliMatrix(idrotm[2087], 90.0, 90.0, 100.0, 0., 10.0, 0.0);
657 AliMatrix(idrotm[2088], 90.0, 90.0, 80.0, 0., 170.0, 0.0);
658 AliMatrix(idrotm[2089], 90.0, 90.0, 80.0, 0., -10.0, 0.0);
659
7e5caa00 660//
661// web frame diagonal (outer)
662//
663 h = 106.2;
664 d = 2.*dwl;
4a8eca94 665 dz = dymodL[2]-dymodU[1]-dwl;
7e5caa00 666 dq = h*h+dz*dz;
667
668 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
669
670
671 theta = krad2deg * TMath::ACos(x);
672
673 ptrap[0] = dz/2.;
674 ptrap[1] = theta;
675 ptrap[2] = 0.;
676 ptrap[3] = dwh;
677 ptrap[4] = dwl/x;
678 ptrap[5] = ptrap[4];
679 ptrap[6] = 0;
680 ptrap[7] = ptrap[3];
681 ptrap[8] = ptrap[4];
682 ptrap[9] = ptrap[4];
683 ptrap[10] = 0;
684 gMC->Gsvolu("B065", "TRAP", kSteel, ptrap, 11);
685 ptrap[3] = dwh - 0.2;
686 ptrap[4] = (dwl-0.4)/x;
687 ptrap[5] = ptrap[4];
688 ptrap[7] = ptrap[3];
689 ptrap[8] = ptrap[4];
690 ptrap[9] = ptrap[4];
691 gMC->Gsvolu("B066", "TRAP", kAir, ptrap, 11);
692 gMC->Gspos("B066", 1, "B065", 0.0, -0.2, 0., 0, "ONLY");
693
694//
695// web frame diagonal (inner)
696//
4a8eca94 697 dz = dymodL[1]-dymodU[0];
7e5caa00 698 dq = h*h+dz*dz;
4a8eca94 699 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
7e5caa00 700
701
702 theta = krad2deg * TMath::ACos(x);
703
4a8eca94 704 ptrap[0] = (dymodL[1]-dymodU[0])/2.;
7e5caa00 705 ptrap[1] = theta;
706 ptrap[2] = 0.;
707 ptrap[3] = dwh;
708 ptrap[4] = dwl/x;
709 ptrap[5] = ptrap[4];
710 ptrap[6] = 0;
711 ptrap[7] = ptrap[3];
712 ptrap[8] = ptrap[4];
713 ptrap[9] = ptrap[4];
714 ptrap[10] = 0;
715 gMC->Gsvolu("B067", "TRAP", kSteel, ptrap, 11);
716 ptrap[3] = dwh-0.2;
717 ptrap[4] = (dwl-0.4)/x;
718 ptrap[5] = ptrap[4];
719 ptrap[7] = ptrap[3];
720 ptrap[8] = ptrap[4];
721 ptrap[9] = ptrap[4];
722 gMC->Gsvolu("B068", "TRAP", kAir, ptrap, 11);
723 gMC->Gspos("B068", 1, "B067", 0.0, -0.2, 0., 0, "ONLY");
724
725
726 dz = -iFrH/2.+ringH/2.+kEps;
727
728 for (i = 0; i< 3; i++)
729 {
730// ring bars
731 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 732 gMC->Gspos("B072", 6*i+jmod+1, module[jmod], 0, dymodL[i], dz, 0, "ONLY");
733 gMC->Gspos("B072", 6*i+jmod+4, module[jmod], 0, -dymodL[i], dz, idrotm[2070], "ONLY");
7e5caa00 734
735// 0-deg web
4a8eca94 736 if (i==2) {
737 gMC->Gspos("B263", 12*i+jmod+1, module[jmod], 60.0732, dymodU[i], 4.6669, idrotm[2072], "ONLY");
738 gMC->Gspos("B263", 12*i+jmod+4, module[jmod], 60.0732, -dymodU[i], 4.6669, idrotm[2071], "ONLY");
739 gMC->Gspos("B263", 12*i+jmod+7, module[jmod], -60.0732, dymodU[i], 4.6669, idrotm[2074], "ONLY");
740 gMC->Gspos("B263", 12*i+jmod+10, module[jmod], -60.0732, -dymodU[i], 4.6669, idrotm[2073], "ONLY");
741 }
7e5caa00 742 }
743 }
744
745// outer diagonal web
746
4a8eca94 747 dy = (dymodU[0]+dymodL[0])/2.;
748 for (jmod = 0; jmod<3; jmod++) {
749 gMC->Gspos("B063", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2086], "ONLY");
750 gMC->Gspos("B063", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2087], "ONLY");
751 gMC->Gspos("B063", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2088], "ONLY");
752 gMC->Gspos("B063", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2089], "ONLY");
753 }
754
755 dy = (dymodU[1]+dymodL[1])/2.;
756 for (jmod = 0; jmod<3; jmod++) {
757 gMC->Gspos("B163", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2080], "ONLY");
758 gMC->Gspos("B163", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2079], "ONLY");
759 gMC->Gspos("B163", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2082], "ONLY");
760 gMC->Gspos("B163", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2081], "ONLY");
761 }
762
763
764 dy = (dymodL[2]+dymodU[1])/2.-dwl/2.;
7e5caa00 765 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 766 gMC->Gspos("B065", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2076], "ONLY");
767 gMC->Gspos("B065", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2075], "ONLY");
768 gMC->Gspos("B065", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2078], "ONLY");
769 gMC->Gspos("B065", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2077], "ONLY");
7e5caa00 770 }
771
772
4a8eca94 773 dy = (dymodL[1]+dymodU[0])/2.;
7e5caa00 774
775 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 776 gMC->Gspos("B067", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2076], "ONLY");
777 gMC->Gspos("B067", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2075], "ONLY");
778 gMC->Gspos("B067", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2078], "ONLY");
779 gMC->Gspos("B067", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2077], "ONLY");
7e5caa00 780 }
781
782// longitudinal bars (TPC rails attached)
783// new specs:
784// h x w x s = 100 x 75 x 6
785// current:
786// Attention: 2 "U" shaped half rods per cell
787//
788// not yet used
789//
790 ptrap[0] = 2.50;
791 ptrap[1] = 10.00;
792 ptrap[2] = 0.00;
793 ptrap[3] = 350.00;
794 ptrap[4] = 3.75;
795 ptrap[5] = ptrap[4];
796 ptrap[6] = 0;
797 ptrap[7] = ptrap[3];
798 ptrap[8] = ptrap[4];
799 ptrap[9] = ptrap[4];
800 ptrap[10] = 0;
f935f49e 801// gMC->Gsvolu("B059", "TRAP", kSteel, ptrap, 11);
7e5caa00 802 ptrap[0] = 2.2;
803 ptrap[4] = 2.15;
804 ptrap[5] = ptrap[4];
805 ptrap[7] = ptrap[3];
806 ptrap[8] = ptrap[4];
807 ptrap[9] = ptrap[4];
f935f49e 808 //gMC->Gsvolu("B062", "TRAP", kAir, ptrap, 11);
809 //gMC->Gspos("B062", 1, "B059", 0.0, 0., 0., 0, "ONLY");
810
7e5caa00 811//
812// longitudinal bars (no TPC rails attached)
813// new specs: h x w x s = 60 x 60 x 3
814// (was: 75 x 100 x 5?)
815//
816//
817//
818 ptrap[0] = longW/4.;
819 ptrap[4] = longH/2.;
820 ptrap[5] = ptrap[4];
821 ptrap[7] = ptrap[3];
822 ptrap[8] = ptrap[4];
823 ptrap[9] = ptrap[4];
824
825 gMC->Gsvolu("BA59", "TRAP", kSteel, ptrap, 11);
826 ptrap[0] = longW/4.-0.15;
827 ptrap[4] = longH/2.-0.30;
828 ptrap[5] = ptrap[4];
829 ptrap[7] = ptrap[3];
830 ptrap[8] = ptrap[4];
831 ptrap[9] = ptrap[4];
832 gMC->Gsvolu("BA62", "TRAP", kAir, ptrap, 11);
833 gMC->Gspos("BA62", 1, "BA59", 0.0, 0.0, -0.15, 0, "ONLY");
834
835 dz = -iFrH/2.+ringH+longH/2.;
836
837 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 838 gMC->Gspos("BA59", 2*jmod+1, module[jmod], 49.6476, 0.0, dz, idrotm[2084], "ONLY");
839 gMC->Gspos("BA59", 2*jmod+2, module[jmod], -49.6476, 0.0, dz, idrotm[2083], "ONLY");
7e5caa00 840 }
841//
842//
843// Spacer between TRD and TOF modules
844 ptrap[0] = 0.99;
845 ptrap[1] = 10.00;
846 ptrap[2] = 0.00;
847 ptrap[3] = 350.00;
848 ptrap[4] = 0.9;
849 ptrap[5] = ptrap[4];
850 ptrap[6] = 0;
851 ptrap[7] = ptrap[3];
852 ptrap[8] = ptrap[4];
853 ptrap[9] = ptrap[4];
854 ptrap[10] = 0;
855 gMC->Gsvolu("B056", "TRAP", kSteel, ptrap, 11);
856 for (jmod = 0; jmod<3; jmod++) {
857 gMC->Gspos("B056", 2*jmod+1, module[jmod], 61.9607, 0.0, 27.2, 0 , "ONLY");
4a8eca94 858 gMC->Gspos("B056", 2*jmod+2, module[jmod], -61.9607, 0.0, 27.2, idrotm[2085], "ONLY");
7e5caa00 859 }
860//
861// Mother volumes for TRD and TOF
862//
863 if (!fHoles) {
d03c72a2 864 printf("\n FRAME Version without Holes !");
7e5caa00 865 ptrd1[0] = 49.8065;
866 ptrd1[1] = 62.8535;
867 ptrd1[2] = 375.5;
868 ptrd1[3] = 37.;
869 gMC->Gsvolu("BTR1", "TRD1", kAir, ptrd1, 4);
870 gMC->Gsvolu("BTR2", "TRD1", kAir, ptrd1, 4);
871 gMC->Gsvolu("BTR3", "TRD1", kAir, ptrd1, 4);
872
873 ptrd1[0] = 63.2061;
874 ptrd1[1] = 68.3192;
875 ptrd1[2] = 375.5;
876 ptrd1[3] = 14.5;
877 gMC->Gsvolu("BTO1", "TRD1", kAir, ptrd1, 4);
878 gMC->Gsvolu("BTO2", "TRD1", kAir, ptrd1, 4);
879 gMC->Gsvolu("BTO3", "TRD1", kAir, ptrd1, 4);
880
881 gMC->Gspos("BTR1", 1, "B071", 0., 0., -10.8, 0, "ONLY");
882 gMC->Gspos("BTR2", 1, "B074", 0., 0., -10.8, 0, "ONLY");
883 gMC->Gspos("BTR3", 1, "B075", 0., 0., -10.8, 0, "ONLY");
884
885 gMC->Gspos("BTO1", 1, "B071", 0., 0., 42.69, 0, "ONLY");
886 gMC->Gspos("BTO2", 1, "B074", 0., 0., 42.69, 0, "ONLY");
887 gMC->Gspos("BTO3", 1, "B075", 0., 0., 42.69, 0, "ONLY");
888 } else {
d03c72a2 889 printf("\n FRAME Version with Holes !");
7e5caa00 890 ptrd1[0] = 49.8065;
891 ptrd1[1] = 62.8535;
892 ptrd1[2] = 375.5;
893 ptrd1[3] = 37;
894 gMC->Gsvolu("BTR1", "TRD1", kAir, ptrd1, 4);
895 ptrd1[2] = 156.75;
896 gMC->Gsvolu("BTR2", "TRD1", kAir, ptrd1, 4);
897 ptrd1[2] = 79.75;
898 gMC->Gsvolu("BTR3", "TRD1", kAir, ptrd1, 4);
899
900 ptrd1[0] = 63.2061;
901 ptrd1[1] = 68.3192;
902 ptrd1[2] = 375.5;
903 ptrd1[3] = 14.5;
904 gMC->Gsvolu("BTO1", "TRD1", kAir, ptrd1, 4);
905 ptrd1[2] = 156.75;
906 gMC->Gsvolu("BTO2", "TRD1", kAir, ptrd1, 4);
907 ptrd1[2] = 79.75;
908 gMC->Gsvolu("BTO3", "TRD1", kAir, ptrd1, 4);
909
7e5caa00 910
4c057bc8 911 gMC->Gspos("BTR1", 1, "B071", 0., 0.00, -10.8, 0, "ONLY");
912 gMC->Gspos("BTR2", 1, "B074", 0., -218.75, -10.8, idrotm[2070], "ONLY");
913 gMC->Gspos("BTR2", 2, "B074", 0., 218.75, -10.8, 0, "ONLY");
914 gMC->Gspos("BTR3", 1, "B075", 0., -295.75, -10.8, idrotm[2070], "ONLY");
915 gMC->Gspos("BTR3", 2, "B075", 0., 295.75, -10.8, 0, "ONLY");
916
917 gMC->Gspos("BTO1", 1, "B071", 0., 0.00, 42.69, 0, "ONLY");
918 gMC->Gspos("BTO2", 1, "B074", 0., -218.75, 42.69, idrotm[2070], "ONLY");
919 gMC->Gspos("BTO2", 2, "B074", 0., 218.75, 42.69, 0, "ONLY");
920 gMC->Gspos("BTO3", 1, "B075", 0., -295.75, 42.69, idrotm[2070], "ONLY");
921 gMC->Gspos("BTO3", 2, "B075", 0., 295.75, 42.69, 0, "ONLY");
7e5caa00 922 }
b35d7d26 923
924//
925// Geometry of Rails starts here
926//
927//
928//
929// Rails for space-frame
930//
931 Float_t rbox[3];
932
933 rbox[0] = 25.00;
934 rbox[1] = 27.50;
935 rbox[2] = 600.00;
936 gMC->Gsvolu("BRS1", "BOX", kAir, rbox, 3);
937
938 rbox[0] = 25.00;
939 rbox[1] = 3.75;
940 gMC->Gsvolu("BRS2", "BOX", kSteel, rbox, 3);
941
942 rbox[0] = 3.00;
943 rbox[1] = 20.00;
944 gMC->Gsvolu("BRS3", "BOX", kSteel, rbox, 3);
945
946 gMC->Gspos("BRS2", 1, "BRS1", 0., -27.5+3.75, 0., 0, "ONLY");
947 gMC->Gspos("BRS2", 2, "BRS1", 0., 27.5-3.75, 0., 0, "ONLY");
948 gMC->Gspos("BRS3", 1, "BRS1", 0., 0., 0., 0, "ONLY");
949 gMC->Gspos("BRS1", 1, "ALIC", -430.-3., -180., 0., 0, "ONLY");
950 gMC->Gspos("BRS1", 2, "ALIC", 430.+3., -180., 0., 0, "ONLY");
951
952 rbox[0] = 3.0;
e16311cb 953 rbox[1] = 145./2.;
b35d7d26 954 rbox[2] = 25.0;
955 gMC->Gsvolu("BRS4", "BOX", kSteel, rbox, 3);
956
957 gMC->Gspos("BRS4", 1, "ALIC", 430.+3., -180.+55./2.+rbox[1], 224., 0, "ONLY");
958 gMC->Gspos("BRS4", 2, "ALIC", 430.+3., -180.+55./2.+rbox[1], -224., 0, "ONLY");
959 gMC->Gspos("BRS4", 3, "ALIC", -430.-3., -180.+55./2.+rbox[1], 224., 0, "ONLY");
960 gMC->Gspos("BRS4", 4, "ALIC", -430.-3., -180.+55./2.+rbox[1], -224., 0, "ONLY");
961
962//
963// Rails for EMCAL
964//
965/*
966 rbox[0] = 27.50;
967 rbox[1] = 32.50;
968 gMC->Gsvolu("BRE1", "BOX", kAir, rbox, 3);
969
970 rbox[0] = 27.50;
971 rbox[1] = 2.50;
972 gMC->Gsvolu("BRE2", "BOX", kSteel, rbox, 3);
973
974 rbox[0] = 0.50;
975 rbox[1] = 27.50;
976 gMC->Gsvolu("BRE3", "BOX", kSteel, rbox, 3);
977
978 gMC->Gspos("BRE2", 1, "BRE1", 0., -32.5+2.50, 0., 0, "ONLY");
979 gMC->Gspos("BRE2", 2, "BRE1", 0., 32.5-2.50, 0., 0, "ONLY");
980 gMC->Gspos("BRE3", 1, "BRE1", -20., 0., 0., 0, "ONLY");
981 gMC->Gspos("BRE3", 2, "BRE1", 20., 0., 0., 0, "ONLY");
982 gMC->Gspos("BRE1", 1, "ALIC", -496., -190., 0., 0, "ONLY");
983 gMC->Gspos("BRE1", 2, "ALIC", 496., -190., 0., 0, "ONLY");
984*/
7e5caa00 985}
986
987
988//___________________________________________
989void AliFRAMEv2::CreateMaterials()
990{
eeacf08b 991 // Creates the materials
7e5caa00 992 Float_t epsil, stemax, tmaxfd, deemax, stmin;
993
994 epsil = 1.e-4; // Tracking precision,
995 stemax = -0.01; // Maximum displacement for multiple scat
996 tmaxfd = -20.; // Maximum angle due to field deflection
997 deemax = -.3; // Maximum fractional energy loss, DLS
998 stmin = -.8;
999 Int_t isxfld = gAlice->Field()->Integ();
1000 Float_t sxmgmx = gAlice->Field()->Max();
1001
1002 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
1003 Float_t zsteel[4] = { 26.,24.,28.,14. };
1004 Float_t wsteel[4] = { .715,.18,.1,.005 };
1005
1006 AliMixture(65, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
1007 AliMaterial(5, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
1008 AliMedium(65, "Stainless Steel", 65, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1009 AliMedium( 5, "Air ", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1010}
1011
1012//_____________________________________________________________________________
1013void AliFRAMEv2::Init()
1014{
1015 //
1016 // Initialise the module after the geometry has been defined
1017 //
0a05c568 1018 if(fDebug) {
1019 printf("%s: **************************************"
1020 " FRAME "
1021 "**************************************\n",ClassName());
1022 printf("\n%s: Version 2 of FRAME initialised, symmetric FRAME\n\n",ClassName());
1023 printf("%s: **************************************"
1024 " FRAME "
1025 "**************************************\n",ClassName());
1026 }
7e5caa00 1027}
1028
6304e7d2 1029Int_t AliFRAMEv2::IsVersion() const
1030{
eeacf08b 1031 // Returns the version of the FRAME (1 if no holes, 0 otherwise)
6304e7d2 1032 Int_t version = 0;
1033 if (fHoles == 0) version = 1;
1034 return version;
1035}
7e5caa00 1036
1037
1038
1039
1040
1041