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