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