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