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