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