Backframe and Baby-Spaceframe added.
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv2.cxx
CommitLineData
7e5caa00 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
eeacf08b 16/* $Id$ */
6304e7d2 17
eeacf08b 18//------------------------------------------------------------------------
19// AliFRAMEv2.cxx
20// symmetric space frame with possibility for holes
21// Author: A.Morsch
22//------------------------------------------------------------------------
7e5caa00 23
88cb7938 24#include <TSystem.h>
25
7e5caa00 26#include "AliFRAMEv2.h"
27#include "AliMagF.h"
28#include "AliRun.h"
f2744db7 29#include "AliConst.h"
7e5caa00 30
31ClassImp(AliFRAMEv2)
32
33//_____________________________________________________________________________
34AliFRAMEv2::AliFRAMEv2()
35{
36// Constructor
37 SetHoles(0);
38}
39
40//_____________________________________________________________________________
41AliFRAMEv2::AliFRAMEv2(const char *name, const char *title)
42 : AliFRAME(name,title)
43{
44// Constructor
45 SetHoles(0);
46}
47
48
49//___________________________________________
50void AliFRAMEv2::CreateGeometry()
51{
52//Begin_Html
53/*
54<img src="picts/frame.gif">
55*/
56//End_Html
57
58
59//Begin_Html
60/*
61<img src="picts/tree_frame.gif">
62*/
63//End_Html
64
4a8eca94 65 Int_t idrotm[2299];
7e5caa00 66 Int_t *idtmed = fIdtmed->GetArray()-1999;
67//
68// The Space frame
69//
70//
e16311cb 71 Float_t pbox[3], ptrap[11], ptrd1[4], ppgon[10];
7e5caa00 72
73 Float_t dx, dy, dz;
74 Int_t i, j, jmod;
75//
76// Constants
77 const Float_t kEps = 0.01;
78 const Int_t kAir = idtmed[2004];
79 const Int_t kSteel = idtmed[2064];
80
81 const Float_t krad2deg = 180./TMath::Pi();
82 const Float_t kdeg2rad = 1./krad2deg;
83
4c057bc8 84 Float_t iFrH = 114.40;
85 Float_t ringH = 4.00;
86 Float_t ringW = 10.00;
87 Float_t longH = 5.39;
88 Float_t longW = 6.00;
89 Float_t dwl = 3.14;
90 Float_t dwh = 0.96;
7e5caa00 91
02e42643 92//
4a8eca94 93 Float_t dymodU[3] = {70.0, 224.0, 341.};
02e42643 94// new ?
4a8eca94 95 Float_t dymodL[3] = {54.0, 178.5, 341.};
af3fbbe1 96
7e5caa00 97//
98// Frame mother volume
99//
b35d7d26 100// ptube[0] = 280.;
101// ptube[1] = 430.;
102// ptube[2] = 376.;
103 ppgon[0] = 0.;
104 ppgon[1] = 360.;
105 ppgon[2] = 18.;
106
107 ppgon[3] = 2.;
b35d7d26 108 ppgon[4] = -376.;
109 ppgon[5] = 280.;
110 ppgon[6] = 421.;
111
112 ppgon[7] = -ppgon[4];
113 ppgon[8] = ppgon[5];
114 ppgon[9] = ppgon[6];
115
116 gMC->Gsvolu("B077", "PGON", kAir, ppgon, 10);
117
118// gMC->Gsvolu("B077", "TUBE", kAir, ptube, 3);
7e5caa00 119 gMC->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY");
120//
55bdc695 121// Reference plane for TRD
122//
123 ppgon[6] = ppgon[5] + 0.1;
124 ppgon[9] = ppgon[6];
125 gMC->Gsvolu("BREF", "PGON", kAir, ppgon, 10);
126 gMC->Gspos("BREF", 1, "B077", 0., 0., 0., 0, "ONLY");
127//
7e5caa00 128// The outer Frame
129//
130
131 Float_t dol = 8.75;
132 Float_t doh = 5.;
133 Float_t ds = 0.35;
134//
135// Mother volume
136//
137 ppgon[0] = 0.;
138 ppgon[1] = 360.;
139 ppgon[2] = 18.;
140
141 ppgon[3] = 2.;
142
143 ppgon[4] = -350.;
144 ppgon[5] = 399.;
145 ppgon[6] = 420.7122;
146
147 ppgon[7] = -ppgon[4];
148 ppgon[8] = ppgon[5];
149 ppgon[9] = ppgon[6];
150 gMC->Gsvolu("B076", "PGON", kAir, ppgon, 10);
151 gMC->Gspos("B076", 1, "B077", 0., 0., 0., 0, "ONLY");
152//
153// Rings
154//
155 dz = 2.*410.2*TMath::Sin(10.*kdeg2rad)-2.*dol*TMath::Cos(10.*kdeg2rad)-
156 2.*doh*TMath::Tan(10.*kdeg2rad);
157 Float_t l1 = dz/2.;
158 Float_t l2 = dz/2.+2.*doh*TMath::Tan(10.*kdeg2rad);
159
160 ptrd1[0] = l1;
161 ptrd1[1] = l2;
162
163 ptrd1[2] = dol;
164 ptrd1[3] = doh;
165 gMC->Gsvolu("B042", "TRD1", kSteel, ptrd1, 4);
166
167 ptrd1[0] = ptrd1[0]+ds*(l2-l1)/2./doh;
168 ptrd1[1] = ptrd1[1]-ds*(l2-l1)/2./doh;
169 ptrd1[2] = dol-ds;
170 ptrd1[3] = doh-ds;
171 gMC->Gsvolu("B043", "TRD1", kAir, ptrd1, 4);
172 gMC->Gspos("B043", 1, "B042", 0., 0., 0., 0, "ONLY");
173//
174// longitudinal bars
175//
176// 170x200x5
177//
178 pbox[0] = dol;
179 pbox[1] = doh;
180 pbox[2] = 350.;
181 gMC->Gsvolu("B033", "BOX", kSteel, pbox, 3);
182 pbox[0] = dol-ds;
183 pbox[1] = doh-ds;
184 gMC->Gsvolu("B034", "BOX", kAir, pbox, 3);
185 gMC->Gspos("B034", 1, "B033", 0., 0., 0., 0, "ONLY");
186
187 pbox[0] = 1.0;
188 pbox[1] = 5.0;
189 pbox[2] = 375.5;
190
191
192 gMC->Gsvolu("B080", "BOX", kSteel, pbox, 3);
b35d7d26 193 gMC->Gspos("B080", 1, "B077", 286.01, 0., 0., 0, "ONLY");
194 gMC->Gspos("B080", 2, "B077", -286.01, 0., 0., 0, "ONLY");
7e5caa00 195
196//
197// Diagonal bars (1)
198//
199 Float_t h, d, dq, x, theta;
200
4a8eca94 201 h = (dymodU[1]-dymodU[0]-2.*dol)*.999;
7e5caa00 202 d = 2.*dol;
203 dq = h*h+dz*dz;
204
205 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
206
207
208 theta = krad2deg * TMath::ACos(x);
209
210 ptrap[0] = dz/2.;
211 ptrap[1] = theta;
212 ptrap[2] = 0.;
213 ptrap[3] = doh;
214 ptrap[4] = dol/x;
215 ptrap[5] = ptrap[4];
216 ptrap[6] = 0;
217 ptrap[7] = ptrap[3];
218 ptrap[8] = ptrap[4];
219 ptrap[9] = ptrap[4];
220 ptrap[10] = 0;
221
222 gMC->Gsvolu("B047", "TRAP", kSteel, ptrap, 11);
223 ptrap[3] = doh-ds;
224 ptrap[4] = (dol-ds)/x;
225 ptrap[5] = ptrap[4];
226 ptrap[7] = ptrap[3];
227 ptrap[8] = ptrap[4];
228 ptrap[9] = ptrap[4];
229 gMC->Gsvolu("B048", "TRAP", kAir, ptrap, 11);
230 gMC->Gspos("B048", 1, "B047", 0.0, 0.0, 0., 0, "ONLY");
231
232/*
233 Crosses (inner most)
234 \\ //
235 \\//
236 //\\
237 // \\
238*/
4a8eca94 239 h = (2.*dymodU[0]-2.*dol)*.999;
7e5caa00 240//
241// Mother volume
242//
243 pbox[0] = h/2;
244 pbox[1] = doh;
245 pbox[2] = dz/2.;
246 gMC->Gsvolu("BM49", "BOX ", kAir, pbox, 3);
247
248
249 dq = h*h+dz*dz;
250 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
251 theta = krad2deg * TMath::ACos(x);
252
253 ptrap[0] = dz/2.-kEps;
254 ptrap[1] = theta;
255 ptrap[2] = 0.;
256 ptrap[3] = doh-kEps;
257 ptrap[4] = dol/x;
258 ptrap[5] = ptrap[4];
259 ptrap[7] = ptrap[3];
260 ptrap[8] = ptrap[4];
261 ptrap[9] = ptrap[4];
262
263 gMC->Gsvolu("B049", "TRAP", kSteel, ptrap, 11);
264 ptrap[0] = ptrap[0]-kEps;
265 ptrap[3] = (doh-ds);
266 ptrap[4] = (dol-ds)/x;
267 ptrap[5] = ptrap[4];
268 ptrap[7] = ptrap[3];
269 ptrap[8] = ptrap[4];
270 ptrap[9] = ptrap[4];
271 gMC->Gsvolu("B050", "TRAP", kAir, ptrap, 11);
272 gMC->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY");
273 gMC->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY");
274
275
276 Float_t dd1 = d*TMath::Tan(theta*kdeg2rad);
277 Float_t dd2 = d/TMath::Tan(2.*theta*kdeg2rad);
278 Float_t theta2 = TMath::ATan(TMath::Abs(dd2-dd1)/d/2.);
279
280
281 ptrap[0] = dol;
282 ptrap[1] = theta2*krad2deg;
283 ptrap[2] = 0.;
284 ptrap[3] = doh;
285 ptrap[4] = (dz/2./x-dd1-dd2)/2.;
286 ptrap[5] = ptrap[4];
287 ptrap[6] = 0.;
288 ptrap[7] = ptrap[3];
289 ptrap[8] = dz/4./x;
290 ptrap[9] = ptrap[8];
291
292
293 gMC->Gsvolu("B051", "TRAP", kSteel, ptrap, 11);
294 Float_t ddx0 = ptrap[8];
295
296 Float_t dd1s = dd1*(1.-2.*ds/d);
297 Float_t dd2s = dd2*(1.-2.*ds/d);
298 Float_t theta2s = TMath::ATan(TMath::Abs(dd2s-dd1s)/(d-2.*ds)/2.);
299
300
301 ptrap[0] = dol-ds;
302 ptrap[1] = theta2s*krad2deg;
303 ptrap[2] = 0.;
304 ptrap[3] = doh-ds;
305 ptrap[4] = ptrap[4]+ds/d/2.*(dd1+dd2);
306 ptrap[5] = ptrap[4];
307 ptrap[6] = 0.;
308 ptrap[7] = ptrap[3];
309 ptrap[8] = ptrap[8]-ds/2./d*(dd1+dd2);
310 ptrap[9] = ptrap[8];
311
312 gMC->Gsvolu("B052", "TRAP", kAir, ptrap, 11);
313 gMC->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY");
314
315 Float_t ddx, ddz, drx, drz, rtheta;
316
4a8eca94 317 AliMatrix(idrotm[2001], -theta+180, 0.0, 90.0, 90.0, 90.-theta, 0.0);
7e5caa00 318 rtheta = (90.-theta)*kdeg2rad;
319 ddx = -ddx0-dol*TMath::Tan(theta2);
320 ddz = -dol;
321
322 drx = TMath::Cos(rtheta) * ddx +TMath::Sin(rtheta) *ddz+pbox[0];
323 drz = -TMath::Sin(rtheta) * ddx +TMath::Cos(rtheta) *ddz-pbox[2];
324 gMC->Gspos("B051", 1, "BM49",
325 drx, 0.0, drz,
4a8eca94 326 idrotm[2001], "ONLY");
7e5caa00 327
4a8eca94 328 AliMatrix(idrotm[2002], -theta, 0.0, 90.0, 90.0, 270.-theta, 0.0);
7e5caa00 329 rtheta = (270.-theta)*kdeg2rad;
330
331 drx = TMath::Cos(rtheta) * ddx + TMath::Sin(rtheta) * ddz-pbox[0];
332 drz = -TMath::Sin(rtheta) * ddx + TMath::Cos(rtheta) * ddz+pbox[2];
333 gMC->Gspos("B051", 2, "BM49",
334 drx, 0.0, drz,
4a8eca94 335 idrotm[2002], "ONLY");
7e5caa00 336
337//
338// Diagonal bars (3)
339//
4a8eca94 340 h = ((dymodU[2]-dymodU[1])-2.*dol)*.999;
7e5caa00 341 dq = h*h+dz*dz;
342 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
343 theta = krad2deg * TMath::ACos(x);
344
345 ptrap[0] = dz/2.;
346 ptrap[1] = theta;
347 ptrap[3] = doh;
348 ptrap[4] = dol/x;
349 ptrap[5] = ptrap[4];
350 ptrap[7] = ptrap[3];
351 ptrap[8] = ptrap[4];
352 ptrap[9] = ptrap[4];
353
354 gMC->Gsvolu("B045", "TRAP", kSteel, ptrap, 11);
355 ptrap[3] = doh-ds;
356 ptrap[4] = (dol-ds)/x;
357 ptrap[5] = ptrap[4];
358 ptrap[7] = ptrap[3];
359 ptrap[8] = ptrap[4];
360 ptrap[9] = ptrap[4];
361 gMC->Gsvolu("B046", "TRAP", kAir, ptrap, 11);
362 gMC->Gspos("B046", 1, "B045", 0.0, 0.0, 0., 0, "ONLY");
363
364//
365// Positioning of diagonal bars
366//
367// Matrices have been imported from Euclid. Some simplification
368// seems possible
369//
4a8eca94 370 AliMatrix(idrotm[2003], 0.0, 0.0, 90.0, 130.0, 90.0, 40.0);
371 AliMatrix(idrotm[2004], 180.0, 0.0, 90.0, 130.0, 90.0, 40.0);
372 AliMatrix(idrotm[2005], 180.0, 0.0, 90.0, 150.0, 90.0, 240.0);
373 AliMatrix(idrotm[2006], 0.0, 0.0, 90.0, 150.0, 90.0, 240.0);
374 AliMatrix(idrotm[2007], 0.0, 0.0, 90.0, 170.0, 90.0, 80.0);
375 AliMatrix(idrotm[2008], 180.0, 0.0, 90.0, 190.0, 90.0, 280.0);
376 AliMatrix(idrotm[2009], 180.0, 0.0, 90.0, 170.0, 90.0, 80.0);
377 AliMatrix(idrotm[2010], 0.0, 0.0, 90.0, 190.0, 90.0, 280.0);
378 AliMatrix(idrotm[2011], 0.0, 0.0, 90.0, 350.0, 90.0, 260.0);
379 AliMatrix(idrotm[2012], 180.0, 0.0, 90.0, 350.0, 90.0, 260.0);
380 AliMatrix(idrotm[2013], 180.0, 0.0, 90.0, 10.0, 90.0, 100.0);
381 AliMatrix(idrotm[2014], 0.0, 0.0, 90.0, 10.0, 90.0, 100.0);
382 AliMatrix(idrotm[2015], 0.0, 0.0, 90.0, 30.0, 90.0, 300.0);
383 AliMatrix(idrotm[2016], 180.0, 0.0, 90.0, 30.0, 90.0, 300.0);
384 AliMatrix(idrotm[2017], 180.0, 0.0, 90.0, 50.0, 90.0, 140.0);
385 AliMatrix(idrotm[2018], 0.0, 0.0, 90.0, 50.0, 90.0, 140.0);
386
387 AliMatrix(idrotm[2019], 180.0, 0.0, 90.0, 130.0, 90.0, 220.0);
388 AliMatrix(idrotm[2020], 180.0, 0.0, 90.0, 50.0, 90.0, 320.0);
389 AliMatrix(idrotm[2021], 180.0, 0.0, 90.0, 150.0, 90.0, 60.0);
390 AliMatrix(idrotm[2022], 180.0, 0.0, 90.0, 30.0, 90.0, 120.0);
391 AliMatrix(idrotm[2023], 180.0, 0.0, 90.0, 170.0, 90.0, 260.0);
392 AliMatrix(idrotm[2024], 180.0, 0.0, 90.0, 190.0, 90.0, 100.0);
393 AliMatrix(idrotm[2025], 180.0, 0.0, 90.0, 350.0, 90.0, 80.0);
394 AliMatrix(idrotm[2026], 180.0, 0.0, 90.0, 10.0, 90.0, 280.0);
395
396 AliMatrix(idrotm[2027], 0.0, 0.0, 90.0, 50.0, 90.0, 320.0);
397 AliMatrix(idrotm[2028], 0.0, 0.0, 90.0, 150.0, 90.0, 60.0);
398 AliMatrix(idrotm[2029], 0.0, 0.0, 90.0, 30.0, 90.0, 120.0);
399 AliMatrix(idrotm[2030], 0.0, 0.0, 90.0, 10.0, 90.0, 280.0);
400 AliMatrix(idrotm[2031], 0.0, 0.0, 90.0, 170.0, 90.0, 260.0);
401 AliMatrix(idrotm[2032], 0.0, 0.0, 90.0, 190.0, 90.0, 100.0);
402 AliMatrix(idrotm[2033], 0.0, 0.0, 90.0, 350.0, 90.0, 80.0);
7e5caa00 403
404 Float_t rd = 410.56;
4a8eca94 405 dz = (dymodU[1]+dymodU[0])/2.;
406 Float_t dz2 = (dymodU[1]+dymodU[2])/2.;
7e5caa00 407
408//
409// phi = 40
410//
411 Float_t phi = 40;
412 dx = rd * TMath::Sin(phi*kdeg2rad);
413 dy = rd * TMath::Cos(phi*kdeg2rad);
414
7e5caa00 415
4a8eca94 416 gMC->Gspos("B045", 1, "B076", -dx, dy, dz2, idrotm[2019], "ONLY");
417 gMC->Gspos("B045", 2, "B076", -dx, dy, -dz2, idrotm[2003], "ONLY"); // ?
418 gMC->Gspos("B045", 3, "B076", dx, dy, dz2, idrotm[2020], "ONLY");
419 gMC->Gspos("B045", 4, "B076", dx, dy, -dz2, idrotm[2027], "ONLY");
7e5caa00 420
7e5caa00 421
422//
423// phi = 60
424//
425
426 phi = 60;
427 dx = rd * TMath::Sin(phi*kdeg2rad);
428 dy = rd * TMath::Cos(phi*kdeg2rad);
7e5caa00 429
4a8eca94 430 gMC->Gspos("B045", 5, "B076", -dx, dy, dz2, idrotm[2021], "ONLY");
431 gMC->Gspos("B045", 6, "B076", -dx, dy, -dz2, idrotm[2028], "ONLY");
432 gMC->Gspos("B045", 7, "B076", dx, dy, dz2, idrotm[2022], "ONLY");
433 gMC->Gspos("B045", 8, "B076", dx, dy, -dz2, idrotm[2029], "ONLY");
7e5caa00 434
7e5caa00 435//
436// phi = 80
437//
438
439 phi = 80;
440 dx = rd * TMath::Sin(phi*kdeg2rad);
441 dy = rd * TMath::Cos(phi*kdeg2rad);
7e5caa00 442
4a8eca94 443 gMC->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2008], "ONLY");
444 gMC->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2010], "ONLY");
445 gMC->Gspos("B047", 15, "B076", dx, -dy, dz, idrotm[2012], "ONLY");
446 gMC->Gspos("B047", 16, "B076", dx, -dy, -dz, idrotm[2011], "ONLY");
7e5caa00 447
4a8eca94 448 gMC->Gspos("B045", 9, "B076", -dx, dy, dz2, idrotm[2023], "ONLY");
449 gMC->Gspos("B045", 10, "B076", -dx, dy, -dz2, idrotm[2031], "ONLY");
450 gMC->Gspos("B045", 11, "B076", dx, dy, dz2, idrotm[2026], "ONLY");
451 gMC->Gspos("B045", 12, "B076", dx, dy, -dz2, idrotm[2030], "ONLY");
7e5caa00 452
4a8eca94 453 gMC->Gspos("B045", 13, "B076", -dx, -dy, dz2, idrotm[2024], "ONLY");
454 gMC->Gspos("B045", 14, "B076", -dx, -dy, -dz2, idrotm[2032], "ONLY");
455 gMC->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2025], "ONLY");
456 gMC->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2033], "ONLY");
7e5caa00 457
4a8eca94 458 gMC->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2025], "ONLY");
459 gMC->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2024], "ONLY");
7e5caa00 460
461
462// The internal frame
463//
464 char* module[3] = {"B071\0", "B074\0", "B075\0"};
465//
466//
467// Mother Volumes
468//
469 ptrd1[0] = 50.18;
470 ptrd1[1] = 70.35;
471// ptrd1[0] = 50.10;
472// ptrd1[1] = 70.20;
473
474 ptrd1[2] = 375.5;
475 ptrd1[3] = 57.2;
476 for (jmod = 0; jmod < 3; jmod++)
477 {
478 gMC->Gsvolu(module[jmod], "TRD1", kAir, ptrd1, 4);
479 }
5f9c2f9e 480// Position of Holes for PHOS (P) and RICH (R) starting at 6h
481// P P P - - R R R - - - - - - - - P P
482 Int_t mod[18] = {1, 1, 1, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
7e5caa00 483
484
485 Float_t r = 341.8;
486 Float_t rout1 = 410.564;
487 Float_t rout2 = 415.2;
488 Int_t modcount[3] = {0, 0, 0};
489
490 for (i=0; i<18; i++) {
491 Float_t phi = i*20.;
492 Float_t phi2 = 270+phi;
493 if (phi2 >= 360.) phi2-=360.;
494
495 dx = TMath::Sin(phi*kdeg2rad)*r;
496 dy = -TMath::Cos(phi*kdeg2rad)*r;
497 modcount[mod[i]]++;
498
4a8eca94 499 AliMatrix(idrotm[2034+i], 90.0, phi, 0., 0., 90., phi2);
500 gMC->Gspos(module[mod[i]], modcount[mod[i]], "B077", dx, dy, 0., idrotm[2034+i], "ONLY");
7e5caa00 501//
502// Position elements of outer Frame
503//
504 dx = TMath::Sin(phi*kdeg2rad)*rout1;
505 dy = -TMath::Cos(phi*kdeg2rad)*rout1;
506 for (j = 0; j < 3; j++)
507 {
4a8eca94 508 dz = dymodU[j];
509 gMC->Gspos("B042", 6*i+2*j+1, "B076", dx, dy, dz, idrotm[2034+i], "ONLY");
510 gMC->Gspos("B042", 6*i+2*j+2, "B076", dx, dy, -dz, idrotm[2034+i], "ONLY");
7e5caa00 511 }
512
513 phi = i*20.+10;
514 phi2 = 270+phi;
4a8eca94 515 AliMatrix(idrotm[2052+i], 90.0, phi, 90., phi2, 0., 0.);
7e5caa00 516
517 dx = TMath::Sin(phi*kdeg2rad)*rout2;
518 dy = -TMath::Cos(phi*kdeg2rad)*rout2;
4a8eca94 519 gMC->Gspos("B033", i+1, "B076", dx, dy, 0., idrotm[2052+i], "ONLY");
7e5caa00 520//
521 }
522// Internal Frame rings
523//
524//
525// new specs: 40x100x6 for inner rings
526// 30x135x6 for front and rear rings
527//
528// currently no distinction between front/rear and inner rings
529//
530//
531//
532 pbox[0] = 50.;
533 pbox[1] = ringW/2.;
534 pbox[2] = ringH/2.;
535
536 gMC->Gsvolu("B072", "BOX ", kSteel, pbox, 3);
537
538 pbox[1] = pbox[1] - 0.6;
539 pbox[2] = pbox[2] - 0.6;
540 gMC->Gsvolu("B073", "BOX ", kAir, pbox, 3);
541 gMC->Gspos("B073", 1, "B072", 0., 0., 0., 0, "ONLY");
542
543// Web frame 0-degree
544//
545// h x w x s = 60x40x4
546// (attention: element is are half bars, "U" shaped)
547//
4a8eca94 548 dz = 106.2;
549 d = 2.*dwl;
550 h = dymodU[0]-dymodL[0];
551 dq = h*h+dz*dz;
552
553 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
7e5caa00 554
4a8eca94 555 theta = TMath::ACos(x);
556 Float_t thetaP = (TMath::Pi()-theta)*krad2deg;
557
558 ptrap[0] = dz/2.;
559 ptrap[1] = thetaP;
560 ptrap[2] = 0.;
561 ptrap[3] = dwh;
562 ptrap[4] = dwl/cos(theta);
563 ptrap[5] = ptrap[4];
564 ptrap[6] = 0;
565 ptrap[7] = ptrap[3];
566 ptrap[8] = ptrap[4];
567 ptrap[9] = ptrap[4];
568 ptrap[10] = 0;
569 gMC->Gsvolu("B063", "TRAP", kSteel, ptrap, 11);
570 ptrap[3] = dwh - 0.2;
571 ptrap[4] = (dwl-0.4)/cos(theta);
572 ptrap[5] = ptrap[4];
573 ptrap[7] = ptrap[3];
574 ptrap[8] = ptrap[4];
575 ptrap[9] = ptrap[4];
576 gMC->Gsvolu("B064", "TRAP", kAir, ptrap, 11);
577 gMC->Gspos("B064", 1, "B063", 0.0, -0.2, 0., 0, "ONLY");
578
579
580 h = 106.2;
581 d = 2.*dwl;
582 dz = dymodU[1]-dymodL[1];
583 dq = h*h+dz*dz;
584
585 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
586
587
588 theta = krad2deg * TMath::ACos(x);
589
590 ptrap[0] = dz/2.;
591 ptrap[1] = theta;
592 ptrap[2] = 0.;
593 ptrap[3] = dwh;
594 ptrap[4] = dwl/x;
595 ptrap[5] = ptrap[4];
596 ptrap[6] = 0;
597 ptrap[7] = ptrap[3];
598 ptrap[8] = ptrap[4];
599 ptrap[9] = ptrap[4];
600 ptrap[10] = 0;
601 gMC->Gsvolu("B163", "TRAP", kSteel, ptrap, 11);
602 ptrap[3] = dwh - 0.2;
603 ptrap[4] = (dwl-0.4)/x;
604 ptrap[5] = ptrap[4];
605 ptrap[7] = ptrap[3];
606 ptrap[8] = ptrap[4];
607 ptrap[9] = ptrap[4];
608 gMC->Gsvolu("B164", "TRAP", kAir, ptrap, 11);
609 gMC->Gspos("B164", 1, "B163", 0.0, -0.2, 0., 0, "ONLY");
610
611
7e5caa00 612 pbox[0] = dwh;
613 pbox[1] = dwl;
614 pbox[2] = (iFrH-ringH-longH)/2.;
4a8eca94 615 gMC->Gsvolu("B263", "BOX ", kSteel, pbox, 3);
7e5caa00 616 pbox[0] = dwh-0.2;
617 pbox[1] = dwl-0.4;
618
4a8eca94 619 gMC->Gsvolu("B264", "BOX ", kAir, pbox, 3);
620 gMC->Gspos("B264", 1, "B263", 0.2, 0., 0., 0, "ONLY");
621
622
623 AliMatrix(idrotm[2070], 90.0, 0.0, 90.0, 270.0, 0.0, 0.0);
624//
625 AliMatrix(idrotm[2071], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0);
626 AliMatrix(idrotm[2072], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
627 AliMatrix(idrotm[2073], 100.0, 180.0, 90.0, 270.0, 10.0, 180.0);
628 AliMatrix(idrotm[2074], 100.0, 180.0, 90.0, 90.0, 10.0, 180.0);
629//
630 AliMatrix(idrotm[2075], 10.0, 0.0, 80.0, 180.0, 90.0, 90.0);
631 AliMatrix(idrotm[2076], 10.0, 0.0, 80.0, 180.0, 90.0, 270.0);
632 AliMatrix(idrotm[2077], 10.0, 180.0, 80.0, 0.0, 90.0, 90.0);
633 AliMatrix(idrotm[2078], 10.0, 180.0, 80.0, 0.0, 90.0, 270.0);
634//
635 AliMatrix(idrotm[2079], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0);
636 AliMatrix(idrotm[2080], 170.0, 180.0, 80.0, 180.0, 90.0, 270.0);
637 AliMatrix(idrotm[2081], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0);
638 AliMatrix(idrotm[2082], 170.0, 0.0, 80.0, 0.0, 90.0, 270.0);
639
640//
641 AliMatrix(idrotm[2083], 170.0, 0.0, 90.0, 90.0, 80.0, 0.0);
642 AliMatrix(idrotm[2084], 170.0, 180.0, 90.0, 90.0, 80.0, 180.0);
643 AliMatrix(idrotm[2085], 90.0, 180.0, 90.0, 90.0, 0.0, 0.0);
644//
645 AliMatrix(idrotm[2086], 90.0, 90.0, 100.0, 0., 170.0, 180.0);
646 AliMatrix(idrotm[2087], 90.0, 90.0, 100.0, 0., 10.0, 0.0);
647 AliMatrix(idrotm[2088], 90.0, 90.0, 80.0, 0., 170.0, 0.0);
648 AliMatrix(idrotm[2089], 90.0, 90.0, 80.0, 0., -10.0, 0.0);
649
7e5caa00 650//
651// web frame diagonal (outer)
652//
653 h = 106.2;
654 d = 2.*dwl;
4a8eca94 655 dz = dymodL[2]-dymodU[1]-dwl;
7e5caa00 656 dq = h*h+dz*dz;
657
658 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
659
660
661 theta = krad2deg * TMath::ACos(x);
662
663 ptrap[0] = dz/2.;
664 ptrap[1] = theta;
665 ptrap[2] = 0.;
666 ptrap[3] = dwh;
667 ptrap[4] = dwl/x;
668 ptrap[5] = ptrap[4];
669 ptrap[6] = 0;
670 ptrap[7] = ptrap[3];
671 ptrap[8] = ptrap[4];
672 ptrap[9] = ptrap[4];
673 ptrap[10] = 0;
674 gMC->Gsvolu("B065", "TRAP", kSteel, ptrap, 11);
675 ptrap[3] = dwh - 0.2;
676 ptrap[4] = (dwl-0.4)/x;
677 ptrap[5] = ptrap[4];
678 ptrap[7] = ptrap[3];
679 ptrap[8] = ptrap[4];
680 ptrap[9] = ptrap[4];
681 gMC->Gsvolu("B066", "TRAP", kAir, ptrap, 11);
682 gMC->Gspos("B066", 1, "B065", 0.0, -0.2, 0., 0, "ONLY");
683
684//
685// web frame diagonal (inner)
686//
4a8eca94 687 dz = dymodL[1]-dymodU[0];
7e5caa00 688 dq = h*h+dz*dz;
4a8eca94 689 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
7e5caa00 690
691
692 theta = krad2deg * TMath::ACos(x);
693
4a8eca94 694 ptrap[0] = (dymodL[1]-dymodU[0])/2.;
7e5caa00 695 ptrap[1] = theta;
696 ptrap[2] = 0.;
697 ptrap[3] = dwh;
698 ptrap[4] = dwl/x;
699 ptrap[5] = ptrap[4];
700 ptrap[6] = 0;
701 ptrap[7] = ptrap[3];
702 ptrap[8] = ptrap[4];
703 ptrap[9] = ptrap[4];
704 ptrap[10] = 0;
705 gMC->Gsvolu("B067", "TRAP", kSteel, ptrap, 11);
706 ptrap[3] = dwh-0.2;
707 ptrap[4] = (dwl-0.4)/x;
708 ptrap[5] = ptrap[4];
709 ptrap[7] = ptrap[3];
710 ptrap[8] = ptrap[4];
711 ptrap[9] = ptrap[4];
712 gMC->Gsvolu("B068", "TRAP", kAir, ptrap, 11);
713 gMC->Gspos("B068", 1, "B067", 0.0, -0.2, 0., 0, "ONLY");
714
715
716 dz = -iFrH/2.+ringH/2.+kEps;
717
718 for (i = 0; i< 3; i++)
719 {
720// ring bars
721 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 722 gMC->Gspos("B072", 6*i+jmod+1, module[jmod], 0, dymodL[i], dz, 0, "ONLY");
723 gMC->Gspos("B072", 6*i+jmod+4, module[jmod], 0, -dymodL[i], dz, idrotm[2070], "ONLY");
7e5caa00 724
725// 0-deg web
4a8eca94 726 if (i==2) {
727 gMC->Gspos("B263", 12*i+jmod+1, module[jmod], 60.0732, dymodU[i], 4.6669, idrotm[2072], "ONLY");
728 gMC->Gspos("B263", 12*i+jmod+4, module[jmod], 60.0732, -dymodU[i], 4.6669, idrotm[2071], "ONLY");
729 gMC->Gspos("B263", 12*i+jmod+7, module[jmod], -60.0732, dymodU[i], 4.6669, idrotm[2074], "ONLY");
730 gMC->Gspos("B263", 12*i+jmod+10, module[jmod], -60.0732, -dymodU[i], 4.6669, idrotm[2073], "ONLY");
731 }
7e5caa00 732 }
733 }
734
735// outer diagonal web
736
4a8eca94 737 dy = (dymodU[0]+dymodL[0])/2.;
738 for (jmod = 0; jmod<3; jmod++) {
739 gMC->Gspos("B063", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2086], "ONLY");
740 gMC->Gspos("B063", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2087], "ONLY");
741 gMC->Gspos("B063", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2088], "ONLY");
742 gMC->Gspos("B063", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2089], "ONLY");
743 }
744
745 dy = (dymodU[1]+dymodL[1])/2.;
746 for (jmod = 0; jmod<3; jmod++) {
747 gMC->Gspos("B163", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2080], "ONLY");
748 gMC->Gspos("B163", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2079], "ONLY");
749 gMC->Gspos("B163", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2082], "ONLY");
750 gMC->Gspos("B163", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2081], "ONLY");
751 }
752
753
754 dy = (dymodL[2]+dymodU[1])/2.-dwl/2.;
7e5caa00 755 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 756 gMC->Gspos("B065", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2076], "ONLY");
757 gMC->Gspos("B065", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2075], "ONLY");
758 gMC->Gspos("B065", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2078], "ONLY");
759 gMC->Gspos("B065", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2077], "ONLY");
7e5caa00 760 }
761
762
4a8eca94 763 dy = (dymodL[1]+dymodU[0])/2.;
7e5caa00 764
765 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 766 gMC->Gspos("B067", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2076], "ONLY");
767 gMC->Gspos("B067", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2075], "ONLY");
768 gMC->Gspos("B067", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2078], "ONLY");
769 gMC->Gspos("B067", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2077], "ONLY");
7e5caa00 770 }
771
772// longitudinal bars (TPC rails attached)
773// new specs:
774// h x w x s = 100 x 75 x 6
775// current:
776// Attention: 2 "U" shaped half rods per cell
777//
778// not yet used
779//
780 ptrap[0] = 2.50;
781 ptrap[1] = 10.00;
782 ptrap[2] = 0.00;
783 ptrap[3] = 350.00;
784 ptrap[4] = 3.75;
785 ptrap[5] = ptrap[4];
786 ptrap[6] = 0;
787 ptrap[7] = ptrap[3];
788 ptrap[8] = ptrap[4];
789 ptrap[9] = ptrap[4];
790 ptrap[10] = 0;
f935f49e 791// gMC->Gsvolu("B059", "TRAP", kSteel, ptrap, 11);
7e5caa00 792 ptrap[0] = 2.2;
793 ptrap[4] = 2.15;
794 ptrap[5] = ptrap[4];
795 ptrap[7] = ptrap[3];
796 ptrap[8] = ptrap[4];
797 ptrap[9] = ptrap[4];
f935f49e 798 //gMC->Gsvolu("B062", "TRAP", kAir, ptrap, 11);
799 //gMC->Gspos("B062", 1, "B059", 0.0, 0., 0., 0, "ONLY");
800
7e5caa00 801//
802// longitudinal bars (no TPC rails attached)
803// new specs: h x w x s = 60 x 60 x 3
804// (was: 75 x 100 x 5?)
805//
806//
807//
808 ptrap[0] = longW/4.;
809 ptrap[4] = longH/2.;
810 ptrap[5] = ptrap[4];
811 ptrap[7] = ptrap[3];
812 ptrap[8] = ptrap[4];
813 ptrap[9] = ptrap[4];
814
815 gMC->Gsvolu("BA59", "TRAP", kSteel, ptrap, 11);
816 ptrap[0] = longW/4.-0.15;
817 ptrap[4] = longH/2.-0.30;
818 ptrap[5] = ptrap[4];
819 ptrap[7] = ptrap[3];
820 ptrap[8] = ptrap[4];
821 ptrap[9] = ptrap[4];
822 gMC->Gsvolu("BA62", "TRAP", kAir, ptrap, 11);
823 gMC->Gspos("BA62", 1, "BA59", 0.0, 0.0, -0.15, 0, "ONLY");
824
825 dz = -iFrH/2.+ringH+longH/2.;
826
827 for (jmod = 0; jmod<3; jmod++) {
4a8eca94 828 gMC->Gspos("BA59", 2*jmod+1, module[jmod], 49.6476, 0.0, dz, idrotm[2084], "ONLY");
829 gMC->Gspos("BA59", 2*jmod+2, module[jmod], -49.6476, 0.0, dz, idrotm[2083], "ONLY");
7e5caa00 830 }
831//
832//
833// Spacer between TRD and TOF modules
834 ptrap[0] = 0.99;
835 ptrap[1] = 10.00;
836 ptrap[2] = 0.00;
837 ptrap[3] = 350.00;
838 ptrap[4] = 0.9;
839 ptrap[5] = ptrap[4];
840 ptrap[6] = 0;
841 ptrap[7] = ptrap[3];
842 ptrap[8] = ptrap[4];
843 ptrap[9] = ptrap[4];
844 ptrap[10] = 0;
845 gMC->Gsvolu("B056", "TRAP", kSteel, ptrap, 11);
846 for (jmod = 0; jmod<3; jmod++) {
847 gMC->Gspos("B056", 2*jmod+1, module[jmod], 61.9607, 0.0, 27.2, 0 , "ONLY");
4a8eca94 848 gMC->Gspos("B056", 2*jmod+2, module[jmod], -61.9607, 0.0, 27.2, idrotm[2085], "ONLY");
7e5caa00 849 }
850//
851// Mother volumes for TRD and TOF
852//
853 if (!fHoles) {
d03c72a2 854 printf("\n FRAME Version without Holes !");
7e5caa00 855 ptrd1[0] = 49.8065;
856 ptrd1[1] = 62.8535;
857 ptrd1[2] = 375.5;
858 ptrd1[3] = 37.;
859 gMC->Gsvolu("BTR1", "TRD1", kAir, ptrd1, 4);
860 gMC->Gsvolu("BTR2", "TRD1", kAir, ptrd1, 4);
861 gMC->Gsvolu("BTR3", "TRD1", kAir, ptrd1, 4);
862
863 ptrd1[0] = 63.2061;
864 ptrd1[1] = 68.3192;
865 ptrd1[2] = 375.5;
866 ptrd1[3] = 14.5;
867 gMC->Gsvolu("BTO1", "TRD1", kAir, ptrd1, 4);
868 gMC->Gsvolu("BTO2", "TRD1", kAir, ptrd1, 4);
869 gMC->Gsvolu("BTO3", "TRD1", kAir, ptrd1, 4);
870
871 gMC->Gspos("BTR1", 1, "B071", 0., 0., -10.8, 0, "ONLY");
872 gMC->Gspos("BTR2", 1, "B074", 0., 0., -10.8, 0, "ONLY");
873 gMC->Gspos("BTR3", 1, "B075", 0., 0., -10.8, 0, "ONLY");
874
875 gMC->Gspos("BTO1", 1, "B071", 0., 0., 42.69, 0, "ONLY");
876 gMC->Gspos("BTO2", 1, "B074", 0., 0., 42.69, 0, "ONLY");
877 gMC->Gspos("BTO3", 1, "B075", 0., 0., 42.69, 0, "ONLY");
878 } else {
d03c72a2 879 printf("\n FRAME Version with Holes !");
7e5caa00 880 ptrd1[0] = 49.8065;
881 ptrd1[1] = 62.8535;
882 ptrd1[2] = 375.5;
883 ptrd1[3] = 37;
884 gMC->Gsvolu("BTR1", "TRD1", kAir, ptrd1, 4);
885 ptrd1[2] = 156.75;
886 gMC->Gsvolu("BTR2", "TRD1", kAir, ptrd1, 4);
887 ptrd1[2] = 79.75;
888 gMC->Gsvolu("BTR3", "TRD1", kAir, ptrd1, 4);
889
890 ptrd1[0] = 63.2061;
891 ptrd1[1] = 68.3192;
892 ptrd1[2] = 375.5;
893 ptrd1[3] = 14.5;
894 gMC->Gsvolu("BTO1", "TRD1", kAir, ptrd1, 4);
895 ptrd1[2] = 156.75;
896 gMC->Gsvolu("BTO2", "TRD1", kAir, ptrd1, 4);
897 ptrd1[2] = 79.75;
898 gMC->Gsvolu("BTO3", "TRD1", kAir, ptrd1, 4);
899
7e5caa00 900
4c057bc8 901 gMC->Gspos("BTR1", 1, "B071", 0., 0.00, -10.8, 0, "ONLY");
902 gMC->Gspos("BTR2", 1, "B074", 0., -218.75, -10.8, idrotm[2070], "ONLY");
903 gMC->Gspos("BTR2", 2, "B074", 0., 218.75, -10.8, 0, "ONLY");
904 gMC->Gspos("BTR3", 1, "B075", 0., -295.75, -10.8, idrotm[2070], "ONLY");
905 gMC->Gspos("BTR3", 2, "B075", 0., 295.75, -10.8, 0, "ONLY");
906
907 gMC->Gspos("BTO1", 1, "B071", 0., 0.00, 42.69, 0, "ONLY");
908 gMC->Gspos("BTO2", 1, "B074", 0., -218.75, 42.69, idrotm[2070], "ONLY");
909 gMC->Gspos("BTO2", 2, "B074", 0., 218.75, 42.69, 0, "ONLY");
910 gMC->Gspos("BTO3", 1, "B075", 0., -295.75, 42.69, idrotm[2070], "ONLY");
911 gMC->Gspos("BTO3", 2, "B075", 0., 295.75, 42.69, 0, "ONLY");
7e5caa00 912 }
b35d7d26 913
914//
915// Geometry of Rails starts here
916//
917//
918//
919// Rails for space-frame
920//
921 Float_t rbox[3];
922
923 rbox[0] = 25.00;
924 rbox[1] = 27.50;
925 rbox[2] = 600.00;
926 gMC->Gsvolu("BRS1", "BOX", kAir, rbox, 3);
927
928 rbox[0] = 25.00;
929 rbox[1] = 3.75;
930 gMC->Gsvolu("BRS2", "BOX", kSteel, rbox, 3);
931
932 rbox[0] = 3.00;
933 rbox[1] = 20.00;
934 gMC->Gsvolu("BRS3", "BOX", kSteel, rbox, 3);
935
936 gMC->Gspos("BRS2", 1, "BRS1", 0., -27.5+3.75, 0., 0, "ONLY");
937 gMC->Gspos("BRS2", 2, "BRS1", 0., 27.5-3.75, 0., 0, "ONLY");
938 gMC->Gspos("BRS3", 1, "BRS1", 0., 0., 0., 0, "ONLY");
939 gMC->Gspos("BRS1", 1, "ALIC", -430.-3., -180., 0., 0, "ONLY");
940 gMC->Gspos("BRS1", 2, "ALIC", 430.+3., -180., 0., 0, "ONLY");
941
942 rbox[0] = 3.0;
e16311cb 943 rbox[1] = 145./2.;
b35d7d26 944 rbox[2] = 25.0;
945 gMC->Gsvolu("BRS4", "BOX", kSteel, rbox, 3);
946
947 gMC->Gspos("BRS4", 1, "ALIC", 430.+3., -180.+55./2.+rbox[1], 224., 0, "ONLY");
948 gMC->Gspos("BRS4", 2, "ALIC", 430.+3., -180.+55./2.+rbox[1], -224., 0, "ONLY");
949 gMC->Gspos("BRS4", 3, "ALIC", -430.-3., -180.+55./2.+rbox[1], 224., 0, "ONLY");
950 gMC->Gspos("BRS4", 4, "ALIC", -430.-3., -180.+55./2.+rbox[1], -224., 0, "ONLY");
951
f2744db7 952
953
954 //
955 // The Backframe
956 //
957 // Inner radius
958 Float_t kBFMRin = 270.0;
959 // Outer Radius
960 Float_t kBFMRou = 417.5;
961 // Width
962 Float_t kBFMdz = 118.0;
963 //
964 //
965 // Rings
966 Float_t kBFRdr = 7.5;
967 Float_t kBFRdz = 8.0;
968 //
969 //
970 // Bars and Spokes
971 //
972 Float_t kBFBd = 8.0;
973 Float_t kBFBdd = 0.6;
974
975
976 // The Mother volume
977 Float_t tpar[3];
978 tpar[0] = kBFMRin;
979 tpar[1] = kBFMRou;
980 tpar[2] = kBFMdz / 2.;
981 gMC->Gsvolu("BFMO", "TUBE", kAir, tpar, 3);
982
983 // Rings
984 //
985 // Inner Ring
986 tpar[0] = kBFMRin;
987 tpar[1] = tpar[0] + kBFRdr;
988 tpar[2] = kBFRdz / 2.;
989
990 gMC->Gsvolu("BFIR", "TUBE", kSteel, tpar, 3);
991
992 tpar[0] = tpar[0] + kBFBdd;
993 tpar[1] = tpar[1] - kBFBdd;
994 tpar[2] = (kBFRdz - 2. * kBFBdd) / 2.;
995
996 gMC->Gsvolu("BFII", "TUBE", kAir, tpar, 3);
997 gMC->Gspos("BFII", 1, "BFIR", 0., 0., 0., 0, "ONLY");
998
999 dz = kBFMdz/2. - kBFRdz / 2.;
1000 gMC->Gspos("BFIR", 1, "BFMO", 0., 0., dz, 0, "ONLY");
1001
1002 //
1003 // Outer RING
1004 tpar[0] = kBFMRou - kBFRdr;
1005 tpar[1] = kBFMRou;
1006 tpar[2] = kBFRdz / 2.;
1007
1008 gMC->Gsvolu("BFOR", "TUBE", kSteel, tpar, 3);
1009
1010 tpar[0] = tpar[0] + kBFBdd;
1011 tpar[1] = tpar[1] - kBFBdd;
1012 tpar[2] = (kBFRdz - 2. * kBFBdd) / 2.;
1013
1014 gMC->Gsvolu("BFOO", "TUBE", kAir, tpar, 3);
1015 gMC->Gspos("BFOO", 1, "BFOR", 0., 0., 0., 0, "ONLY");
1016
1017
1018 dz = kBFMdz/2. - kBFRdz / 2.;
1019 gMC->Gspos("BFIR", 1, "BFMO", 0., 0., dz, 0, "ONLY");
1020 gMC->Gspos("BFIR", 2, "BFMO", 0., 0., -dz, 0, "ONLY");
1021 gMC->Gspos("BFOR", 1, "BFMO", 0., 0., dz, 0, "ONLY");
1022 gMC->Gspos("BFOR", 2, "BFMO", 0., 0., -dz, 0, "ONLY");
1023
1024 //
1025 // Longitudinal Bars
1026 //
1027 Float_t bpar[3];
1028
1029 bpar[0] = kBFBd/2;
1030 bpar[1] = bpar[0];
1031 bpar[2] = kBFMdz/2. - kBFBd;
1032 gMC->Gsvolu("BFLB", "BOX ", kSteel, bpar, 3);
1033
1034 bpar[0] = bpar[0] - kBFBdd;
1035 bpar[1] = bpar[1] - kBFBdd;
1036 bpar[2] = bpar[2] - kBFBdd;
1037 gMC->Gsvolu("BFLL", "BOX ", kAir, bpar, 3);
1038 gMC->Gspos("BFLL", 1, "BFLB", 0., 0., 0., 0, "ONLY");
1039
1040 for (i = 0; i < 18; i++)
1041 {
1042 Float_t ro = kBFMRou - kBFBd / 2.;
1043 Float_t ri = kBFMRin + kBFBd / 2.;
1044
1045 Float_t phi = Float_t(i) * 20.;
1046
1047 Float_t x = ri * TMath::Cos(phi * kDegrad);
1048 Float_t y = ri * TMath::Sin(phi * kDegrad);
1049 AliMatrix(idrotm[2090+i], 90.0, phi, 90.0, phi + 270., 0., 0.);
1050
1051 gMC->Gspos("BFLB", i + 1, "BFMO", x, y, 0., idrotm[2090 + i], "ONLY");
1052
1053 x = ro * TMath::Cos(phi * kDegrad);
1054 y = ro * TMath::Sin(phi * kDegrad);
1055
1056 gMC->Gspos("BFLB", i + 19, "BFMO", x, y, 0., idrotm[2090 +i], "ONLY");
1057 }
1058
1059 //
1060 // Radial Bars
1061 //
1062 bpar[0] = (kBFMRou - kBFMRin - 2. * kBFRdr) / 2.;
1063 bpar[1] = kBFBd/2;
1064 bpar[2] = bpar[1];
1065 //
1066 // Avoid overlap with circle
1067 Float_t rr = kBFMRou - kBFRdr;
1068 Float_t delta = rr - TMath::Sqrt(rr * rr - kBFBd * kBFBd / 4.) + 0.01;
1069 bpar[0] -= delta /2.;
1070
1071
1072 gMC->Gsvolu("BFRB", "BOX ", kSteel, bpar, 3);
1073
1074 bpar[0] = bpar[0] - kBFBdd;
1075 bpar[1] = bpar[1] - kBFBdd;
1076 bpar[2] = bpar[2] - kBFBdd;
1077 gMC->Gsvolu("BFRR", "BOX ", kAir, bpar, 3);
1078 gMC->Gspos("BFRR", 1, "BFRB", 0., 0., 0., 0, "ONLY");
1079
1080 Int_t iphi[10] = {0, 1, 3, 6, 8, 9, 10, 12, 15, 17};
1081
1082 for (i = 0; i < 10; i++)
1083 {
1084
1085 Float_t r = (kBFMRin + kBFMRou)/2.;
1086 Float_t phi = Float_t(iphi[i]) * 20.;
1087
1088 Float_t x = r * TMath::Cos(phi * kDegrad);
1089 Float_t y = r * TMath::Sin(phi * kDegrad);
1090
1091 gMC->Gspos("BFRB", i + 1, "BFMO", x, y, dz, idrotm[2034 + iphi[i]], "ONLY");
1092 gMC->Gspos("BFRB", i + 11, "BFMO", x, y, -dz, idrotm[2034 + iphi[i]], "ONLY");
1093
1094 }
1095
1096 gMC->Gspos("BFMO", i + 19, "ALIC", 0, 0, 376. + kBFMdz/2. + 0.5 , 0, "ONLY");
1097
1098
1099
b35d7d26 1100//
f2744db7 1101//
1102// The Baby Frame
1103//
1104//
1105 //
1106 // Inner radius
1107 Float_t kBBMRin = 278.0;
1108 // Outer Radius
1109 Float_t kBBMRou = 410.5;
1110 // Width
1111 Float_t kBBMdz = 223.0;
1112 Float_t kBBBdz = 6.0;
1113 Float_t kBBBdd = 0.6;
1114
b35d7d26 1115
f2744db7 1116 // The Mother volume
1117
1118 ppgon[0] = 0.;
1119 ppgon[1] = 360.;
1120 ppgon[2] = 18.;
b35d7d26 1121
f2744db7 1122 ppgon[3] = 2.;
1123 ppgon[4] = -kBBMdz / 2. ;
1124 ppgon[5] = kBBMRin;
1125 ppgon[6] = kBBMRou;
1126
1127 ppgon[7] = -ppgon[4];
1128 ppgon[8] = ppgon[5];
1129 ppgon[9] = ppgon[6];
1130
1131 gMC->Gsvolu("BBMO", "PGON", kAir, ppgon, 10);
1132 gMC->Gsdvn("BBCE", "BBMO", 18, 2);
1133
1134 // Longitudinal bars
1135 bpar[0] = kBBBdz/2.;
1136 bpar[1] = bpar[0];
1137 bpar[2] = kBBMdz/2. - kBBBdz;
1138 gMC->Gsvolu("BBLB", "BOX ", kSteel, bpar, 3);
1139 bpar[0] -= kBBBdd;
1140 bpar[1] -= kBBBdd;
1141 bpar[2] -= kBBBdd;
1142 gMC->Gsvolu("BBLL", "BOX ", kAir, bpar, 3);
1143 gMC->Gspos("BBLL", 1, "BBLB", 0., 0., 0., 0, "ONLY");
1144
1145 dx = kBBMRin + kBBBdz/2.;
1146 dy = dx * TMath::Tan(10. * kDegrad) - kBBBdz/2./TMath::Cos(10. * kDegrad);
1147 gMC->Gspos("BBLB", 1, "BBCE", dx, dy, 0., idrotm[2052], "ONLY");
1148
1149 dx = kBBMRou - kBBBdz/2.;
1150 dy = dx * TMath::Tan(10. * kDegrad) - kBBBdz/2./TMath::Cos(10. * kDegrad);
1151
1152 gMC->Gspos("BBLB", 2, "BBCE", dx, dy, 0., idrotm[2052], "ONLY");
1153
1154 //
1155 // Radial Bars
1156 //
1157 bpar[0] = (kBBMRou - kBBMRin) / 2. - kBBBdz;
1158 bpar[1] = kBBBdz/2;
1159 bpar[2] = bpar[1];
1160
1161 gMC->Gsvolu("BBRB", "BOX ", kSteel, bpar, 3);
1162 bpar[0] -= kBBBdd;
1163 bpar[1] -= kBBBdd;
1164 bpar[2] -= kBBBdd;
1165 gMC->Gsvolu("BBRR", "BOX ", kAir, bpar, 3);
1166 gMC->Gspos("BBRR", 1, "BBRB", 0., 0., 0., 0, "ONLY");
1167
1168
1169 dx = (kBBMRou + kBBMRin) / 2.;
1170 dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad);
1171 dz = kBBMdz/2. - kBBBdz / 2.;
1172
1173 gMC->Gspos("BBRB", 1, "BBCE", dx, dy, dz, idrotm[2052], "ONLY");
1174 gMC->Gspos("BBRB", 2, "BBCE", dx, dy, - dz, idrotm[2052], "ONLY");
1175 gMC->Gspos("BBRB", 3, "BBCE", dx, dy, 0., idrotm[2052], "ONLY");
1176
1177 //
1178 // Circular bars
1179 //
1180 // Inner
1181
1182 bpar[1] = kBBMRin * TMath::Sin(10. * kDegrad);
1183 bpar[0] = kBBBdz/2;
1184 bpar[2] = bpar[0];
1185 gMC->Gsvolu("BBC1", "BOX ", kSteel, bpar, 3);
1186 bpar[0] -= kBBBdd;
1187 bpar[1] -= kBBBdd;
1188 bpar[2] -= kBBBdd;
1189 gMC->Gsvolu("BBC2", "BOX ", kAir, bpar, 3);
1190 gMC->Gspos("BBC2", 1, "BBC1", 0., 0., 0., 0, "ONLY");
1191 dx = kBBMRin + kBBBdz/2;
1192 dy = 0.;
1193 gMC->Gspos("BBC1", 1, "BBCE", dx, dy, dz, 0, "ONLY");
1194 gMC->Gspos("BBC1", 2, "BBCE", dx, dy, -dz, 0, "ONLY");
1195 //
1196 // Outer
1197 bpar[1] = (kBBMRou - kBBBdz) * TMath::Sin(10. * kDegrad);
1198 bpar[0] = kBBBdz/2;
1199 bpar[2] = bpar[0];
1200 gMC->Gsvolu("BBC3", "BOX ", kSteel, bpar, 3);
1201 bpar[0] -= kBBBdd;
1202 bpar[1] -= kBBBdd;
1203 bpar[2] -= kBBBdd;
1204 gMC->Gsvolu("BBC4", "BOX ", kAir, bpar, 3);
1205 gMC->Gspos("BBC4", 1, "BBC3", 0., 0., 0., 0, "ONLY");
1206 dx = kBBMRou - kBBBdz/2;
1207 dy = 0.;
1208 gMC->Gspos("BBC3", 1, "BBCE", dx, dy, dz, 0, "ONLY");
1209 gMC->Gspos("BBC3", 2, "BBCE", dx, dy, - dz, 0, "ONLY");
1210 //
1211 // Diagonal Bars
1212 //
1213 h = (kBBMRou - kBBMRin - 2. * kBBBdz);;
1214 d = kBBBdz;
1215 dz = kBBMdz/2. - 1.6 * kBBBdz;
1216 dq = h*h+dz*dz;
1217
1218 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
1219
1220
1221 theta = kRaddeg * TMath::ACos(x);
1222
1223 ptrap[0] = dz/2.;
1224 ptrap[1] = theta;
1225 ptrap[2] = 0.;
1226 ptrap[3] = d/2;
1227 ptrap[4] = d/x/2;
1228 ptrap[5] = ptrap[4];
1229 ptrap[6] = 0;
1230 ptrap[7] = ptrap[3];
1231 ptrap[8] = ptrap[4];
1232 ptrap[9] = ptrap[4];
1233 ptrap[10] = 0;
1234 gMC->Gsvolu("BBD1", "TRAP", kSteel, ptrap, 11);
1235 ptrap[3] = d/2-kBBBdd;
1236 ptrap[4] = (d/2-kBBBdd)/x;
1237 ptrap[5] = ptrap[4];
1238 ptrap[7] = ptrap[3];
1239 ptrap[8] = ptrap[4];
1240 ptrap[9] = ptrap[4];
1241 gMC->Gsvolu("BBD3", "TRAP", kAir, ptrap, 11);
1242 gMC->Gspos("BBD3", 1, "BBD1", 0.0, 0.0, 0., 0, "ONLY");
1243 dx = (kBBMRou + kBBMRin) / 2.;
1244 dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad);
1245 gMC->Gspos("BBD1", 1, "BBCE", dx, dy, dz/2. + kBBBdz/2., idrotm[2052], "ONLY");
1246
1247
1248 ptrap[0] = dz/2.;
1249 ptrap[1] = -theta;
1250 ptrap[2] = 0.;
1251 ptrap[3] = d/2;
1252 ptrap[4] = d/2/x;
1253 ptrap[5] = ptrap[4];
1254 ptrap[6] = 0;
1255 ptrap[7] = ptrap[3];
1256 ptrap[8] = ptrap[4];
1257 ptrap[9] = ptrap[4];
1258 ptrap[10] = 0;
1259 gMC->Gsvolu("BBD2", "TRAP", kSteel, ptrap, 11);
1260 ptrap[3] = d/2-kBBBdd;
1261 ptrap[4] = (d/2-kBBBdd)/x;
1262 ptrap[5] = ptrap[4];
1263 ptrap[7] = ptrap[3];
1264 ptrap[8] = ptrap[4];
1265 ptrap[9] = ptrap[4];
1266 gMC->Gsvolu("BBD4", "TRAP", kAir, ptrap, 11);
1267 gMC->Gspos("BBD4", 1, "BBD2", 0.0, 0.0, 0., 0, "ONLY");
1268 dx = (kBBMRou + kBBMRin) / 2.;
1269 dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad);
1270 gMC->Gspos("BBD2", 1, "BBCE", dx, dy, -dz/2. - kBBBdz/2., idrotm[2052], "ONLY");
1271
1272
1273 gMC->Gspos("BBMO", 1, "ALIC", 0., 0., - 376. - kBBMdz / 2. - 0.5, 0, "ONLY");
1274
1275
7e5caa00 1276}
f2744db7 1277
7e5caa00 1278
1279
1280//___________________________________________
1281void AliFRAMEv2::CreateMaterials()
1282{
eeacf08b 1283 // Creates the materials
7e5caa00 1284 Float_t epsil, stemax, tmaxfd, deemax, stmin;
1285
1286 epsil = 1.e-4; // Tracking precision,
1287 stemax = -0.01; // Maximum displacement for multiple scat
1288 tmaxfd = -20.; // Maximum angle due to field deflection
1289 deemax = -.3; // Maximum fractional energy loss, DLS
1290 stmin = -.8;
1291 Int_t isxfld = gAlice->Field()->Integ();
1292 Float_t sxmgmx = gAlice->Field()->Max();
1293
1294 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
1295 Float_t zsteel[4] = { 26.,24.,28.,14. };
1296 Float_t wsteel[4] = { .715,.18,.1,.005 };
1297
1298 AliMixture(65, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
1299 AliMaterial(5, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
1300 AliMedium(65, "Stainless Steel", 65, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1301 AliMedium( 5, "Air ", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1302}
1303
1304//_____________________________________________________________________________
1305void AliFRAMEv2::Init()
1306{
1307 //
1308 // Initialise the module after the geometry has been defined
1309 //
0a05c568 1310 if(fDebug) {
1311 printf("%s: **************************************"
1312 " FRAME "
1313 "**************************************\n",ClassName());
1314 printf("\n%s: Version 2 of FRAME initialised, symmetric FRAME\n\n",ClassName());
1315 printf("%s: **************************************"
1316 " FRAME "
1317 "**************************************\n",ClassName());
1318 }
55bdc695 1319//
1320// The reference volume id
1321 fRefVolumeId = gMC->VolId("BREF");
7e5caa00 1322}
1323
6304e7d2 1324Int_t AliFRAMEv2::IsVersion() const
1325{
eeacf08b 1326 // Returns the version of the FRAME (1 if no holes, 0 otherwise)
6304e7d2 1327 Int_t version = 0;
1328 if (fHoles == 0) version = 1;
1329 return version;
1330}
7e5caa00 1331
55bdc695 1332void AliFRAMEv2::StepManager()
1333{
1334//
1335// Stepmanager of AliFRAMEv2.cxx
1336// Used for recording of reference tracks entering the spaceframe mother volume
1337//
1338 Int_t copy, id;
1339
1340 //
1341 // Only charged tracks
1342 if( !(gMC->TrackCharge()) ) return;
1343 //
1344 // Only tracks entering mother volume
1345 //
1346
1347 id=gMC->CurrentVolID(copy);
1348
1349 if (id != fRefVolumeId) return;
1350 if(!gMC->IsTrackEntering()) return;
1351 //
1352 // Add the reference track
1353 //
642f15cf 1354 AddTrackReference(gAlice->GetCurrentTrackNumber());
55bdc695 1355}
7e5caa00 1356
55bdc695 1357
7e5caa00 1358
1359
1360
1361