Default for decays is kAll.
[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$
02e42643 18Revision 1.3 2001/06/22 12:02:20 morsch
19Ring locations matching TRD module positions.
20
af3fbbe1 21Revision 1.2 2001/05/25 07:59:54 morsch
22Initialization print-out in debug mode only.
23
0a05c568 24Revision 1.1 2001/05/11 13:18:05 morsch
25C++ version of spaceframe with specs according to Jan Bielski Feb. 2001
26
7e5caa00 27*/
28
29////////////////////////////////////////////////
30// space frame class /
31///////////////////////////////////////////////
32
33#include "AliFRAMEv2.h"
34#include "AliMagF.h"
35#include "AliRun.h"
36#include "AliMC.h"
37#include "TSystem.h"
38
39ClassImp(AliFRAMEv2)
40
41//_____________________________________________________________________________
42AliFRAMEv2::AliFRAMEv2()
43{
44// Constructor
45 SetHoles(0);
46}
47
48//_____________________________________________________________________________
49AliFRAMEv2::AliFRAMEv2(const char *name, const char *title)
50 : AliFRAME(name,title)
51{
52// Constructor
53 SetHoles(0);
54}
55
56
57//___________________________________________
58void AliFRAMEv2::CreateGeometry()
59{
60//Begin_Html
61/*
62<img src="picts/frame.gif">
63*/
64//End_Html
65
66
67//Begin_Html
68/*
69<img src="picts/tree_frame.gif">
70*/
71//End_Html
72
73 Int_t idrotm[2199];
74 Int_t *idtmed = fIdtmed->GetArray()-1999;
75//
76// The Space frame
77//
78//
79 Float_t pbox[3], ptrap[11], ptrd1[4], ptube[3], ppgon[10];
80
81 Float_t dx, dy, dz;
82 Int_t i, j, jmod;
83//
84// Constants
85 const Float_t kEps = 0.01;
86 const Int_t kAir = idtmed[2004];
87 const Int_t kSteel = idtmed[2064];
88
89 const Float_t krad2deg = 180./TMath::Pi();
90 const Float_t kdeg2rad = 1./krad2deg;
91
92 Float_t iFrH = 114.4;
93 Float_t ringH = 4.;
94 Float_t ringW = 10.;
95 Float_t longH = 5.39;
96 Float_t longW = 6.;
97 Float_t dwl = 3.14;
98 Float_t dwh = 0.96;
99
02e42643 100//
101 Float_t dymod[3] = {70., 224., 341.};
102// new ?
103// Float_t dymod[3] = {59.5, 178.5, 341.};
af3fbbe1 104
7e5caa00 105//
106// Frame mother volume
107//
108 ptube[0] = 280.;
109// ptube[1] = 428.2;
110 ptube[1] = 430.;
111 ptube[2] = 376.;
112 gMC->Gsvolu("B077", "TUBE", kAir, ptube, 3);
113 gMC->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY");
114//
115// The outer Frame
116//
117
118 Float_t dol = 8.75;
119 Float_t doh = 5.;
120 Float_t ds = 0.35;
121//
122// Mother volume
123//
124 ppgon[0] = 0.;
125 ppgon[1] = 360.;
126 ppgon[2] = 18.;
127
128 ppgon[3] = 2.;
129
130 ppgon[4] = -350.;
131 ppgon[5] = 399.;
132 ppgon[6] = 420.7122;
133
134 ppgon[7] = -ppgon[4];
135 ppgon[8] = ppgon[5];
136 ppgon[9] = ppgon[6];
137 gMC->Gsvolu("B076", "PGON", kAir, ppgon, 10);
138 gMC->Gspos("B076", 1, "B077", 0., 0., 0., 0, "ONLY");
139//
140// Rings
141//
142 dz = 2.*410.2*TMath::Sin(10.*kdeg2rad)-2.*dol*TMath::Cos(10.*kdeg2rad)-
143 2.*doh*TMath::Tan(10.*kdeg2rad);
144 Float_t l1 = dz/2.;
145 Float_t l2 = dz/2.+2.*doh*TMath::Tan(10.*kdeg2rad);
146
147 ptrd1[0] = l1;
148 ptrd1[1] = l2;
149
150 ptrd1[2] = dol;
151 ptrd1[3] = doh;
152 gMC->Gsvolu("B042", "TRD1", kSteel, ptrd1, 4);
153
154 ptrd1[0] = ptrd1[0]+ds*(l2-l1)/2./doh;
155 ptrd1[1] = ptrd1[1]-ds*(l2-l1)/2./doh;
156 ptrd1[2] = dol-ds;
157 ptrd1[3] = doh-ds;
158 gMC->Gsvolu("B043", "TRD1", kAir, ptrd1, 4);
159 gMC->Gspos("B043", 1, "B042", 0., 0., 0., 0, "ONLY");
160//
161// longitudinal bars
162//
163// 170x200x5
164//
165 pbox[0] = dol;
166 pbox[1] = doh;
167 pbox[2] = 350.;
168 gMC->Gsvolu("B033", "BOX", kSteel, pbox, 3);
169 pbox[0] = dol-ds;
170 pbox[1] = doh-ds;
171 gMC->Gsvolu("B034", "BOX", kAir, pbox, 3);
172 gMC->Gspos("B034", 1, "B033", 0., 0., 0., 0, "ONLY");
173
174 pbox[0] = 1.0;
175 pbox[1] = 5.0;
176 pbox[2] = 375.5;
177
178
179 gMC->Gsvolu("B080", "BOX", kSteel, pbox, 3);
180 gMC->Gspos("B080", 1, "B077", 281.01, 0., 0., 0, "ONLY");
181 gMC->Gspos("B080", 2, "B077", -281.01, 0., 0., 0, "ONLY");
182
183//
184// Diagonal bars (1)
185//
186 Float_t h, d, dq, x, theta;
187
188 h = (dymod[1]-dymod[0]-2.*dol)*.999;
189 d = 2.*dol;
190 dq = h*h+dz*dz;
191
192 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
193
194
195 theta = krad2deg * TMath::ACos(x);
196
197 ptrap[0] = dz/2.;
198 ptrap[1] = theta;
199 ptrap[2] = 0.;
200 ptrap[3] = doh;
201 ptrap[4] = dol/x;
202 ptrap[5] = ptrap[4];
203 ptrap[6] = 0;
204 ptrap[7] = ptrap[3];
205 ptrap[8] = ptrap[4];
206 ptrap[9] = ptrap[4];
207 ptrap[10] = 0;
208
209 gMC->Gsvolu("B047", "TRAP", kSteel, ptrap, 11);
210 ptrap[3] = doh-ds;
211 ptrap[4] = (dol-ds)/x;
212 ptrap[5] = ptrap[4];
213 ptrap[7] = ptrap[3];
214 ptrap[8] = ptrap[4];
215 ptrap[9] = ptrap[4];
216 gMC->Gsvolu("B048", "TRAP", kAir, ptrap, 11);
217 gMC->Gspos("B048", 1, "B047", 0.0, 0.0, 0., 0, "ONLY");
218
219/*
220 Crosses (inner most)
221 \\ //
222 \\//
223 //\\
224 // \\
225*/
226 h = (2.*dymod[0]-2.*dol)*.999;
227//
228// Mother volume
229//
230 pbox[0] = h/2;
231 pbox[1] = doh;
232 pbox[2] = dz/2.;
233 gMC->Gsvolu("BM49", "BOX ", kAir, pbox, 3);
234
235
236 dq = h*h+dz*dz;
237 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
238 theta = krad2deg * TMath::ACos(x);
239
240 ptrap[0] = dz/2.-kEps;
241 ptrap[1] = theta;
242 ptrap[2] = 0.;
243 ptrap[3] = doh-kEps;
244 ptrap[4] = dol/x;
245 ptrap[5] = ptrap[4];
246 ptrap[7] = ptrap[3];
247 ptrap[8] = ptrap[4];
248 ptrap[9] = ptrap[4];
249
250 gMC->Gsvolu("B049", "TRAP", kSteel, ptrap, 11);
251 ptrap[0] = ptrap[0]-kEps;
252 ptrap[3] = (doh-ds);
253 ptrap[4] = (dol-ds)/x;
254 ptrap[5] = ptrap[4];
255 ptrap[7] = ptrap[3];
256 ptrap[8] = ptrap[4];
257 ptrap[9] = ptrap[4];
258 gMC->Gsvolu("B050", "TRAP", kAir, ptrap, 11);
259 gMC->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY");
260 gMC->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY");
261
262
263 Float_t dd1 = d*TMath::Tan(theta*kdeg2rad);
264 Float_t dd2 = d/TMath::Tan(2.*theta*kdeg2rad);
265 Float_t theta2 = TMath::ATan(TMath::Abs(dd2-dd1)/d/2.);
266
267
268 ptrap[0] = dol;
269 ptrap[1] = theta2*krad2deg;
270 ptrap[2] = 0.;
271 ptrap[3] = doh;
272 ptrap[4] = (dz/2./x-dd1-dd2)/2.;
273 ptrap[5] = ptrap[4];
274 ptrap[6] = 0.;
275 ptrap[7] = ptrap[3];
276 ptrap[8] = dz/4./x;
277 ptrap[9] = ptrap[8];
278
279
280 gMC->Gsvolu("B051", "TRAP", kSteel, ptrap, 11);
281 Float_t ddx0 = ptrap[8];
282
283 Float_t dd1s = dd1*(1.-2.*ds/d);
284 Float_t dd2s = dd2*(1.-2.*ds/d);
285 Float_t theta2s = TMath::ATan(TMath::Abs(dd2s-dd1s)/(d-2.*ds)/2.);
286
287
288 ptrap[0] = dol-ds;
289 ptrap[1] = theta2s*krad2deg;
290 ptrap[2] = 0.;
291 ptrap[3] = doh-ds;
292 ptrap[4] = ptrap[4]+ds/d/2.*(dd1+dd2);
293 ptrap[5] = ptrap[4];
294 ptrap[6] = 0.;
295 ptrap[7] = ptrap[3];
296 ptrap[8] = ptrap[8]-ds/2./d*(dd1+dd2);
297 ptrap[9] = ptrap[8];
298
299 gMC->Gsvolu("B052", "TRAP", kAir, ptrap, 11);
300 gMC->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY");
301
302 Float_t ddx, ddz, drx, drz, rtheta;
303
304 AliMatrix(idrotm[2198], -theta+180, 0.0, 90.0, 90.0, 90.-theta, 0.0);
305 rtheta = (90.-theta)*kdeg2rad;
306 ddx = -ddx0-dol*TMath::Tan(theta2);
307 ddz = -dol;
308
309 drx = TMath::Cos(rtheta) * ddx +TMath::Sin(rtheta) *ddz+pbox[0];
310 drz = -TMath::Sin(rtheta) * ddx +TMath::Cos(rtheta) *ddz-pbox[2];
311 gMC->Gspos("B051", 1, "BM49",
312 drx, 0.0, drz,
313 idrotm[2198], "ONLY");
314
315 AliMatrix(idrotm[2197], -theta, 0.0, 90.0, 90.0, 270.-theta, 0.0);
316 rtheta = (270.-theta)*kdeg2rad;
317
318 drx = TMath::Cos(rtheta) * ddx + TMath::Sin(rtheta) * ddz-pbox[0];
319 drz = -TMath::Sin(rtheta) * ddx + TMath::Cos(rtheta) * ddz+pbox[2];
320 gMC->Gspos("B051", 2, "BM49",
321 drx, 0.0, drz,
322 idrotm[2197], "ONLY");
323
324//
325// Diagonal bars (3)
326//
327 h = ((dymod[2]-dymod[1])-2.*dol)*.999;
328 dq = h*h+dz*dz;
329 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
330 theta = krad2deg * TMath::ACos(x);
331
332 ptrap[0] = dz/2.;
333 ptrap[1] = theta;
334 ptrap[3] = doh;
335 ptrap[4] = dol/x;
336 ptrap[5] = ptrap[4];
337 ptrap[7] = ptrap[3];
338 ptrap[8] = ptrap[4];
339 ptrap[9] = ptrap[4];
340
341 gMC->Gsvolu("B045", "TRAP", kSteel, ptrap, 11);
342 ptrap[3] = doh-ds;
343 ptrap[4] = (dol-ds)/x;
344 ptrap[5] = ptrap[4];
345 ptrap[7] = ptrap[3];
346 ptrap[8] = ptrap[4];
347 ptrap[9] = ptrap[4];
348 gMC->Gsvolu("B046", "TRAP", kAir, ptrap, 11);
349 gMC->Gspos("B046", 1, "B045", 0.0, 0.0, 0., 0, "ONLY");
350
351//
352// Positioning of diagonal bars
353//
354// Matrices have been imported from Euclid. Some simplification
355// seems possible
356//
357 AliMatrix(idrotm[2121], 0.0, 0.0, 90.0, 130.0, 90.0, 40.0);
358 AliMatrix(idrotm[2123], 180.0, 0.0, 90.0, 130.0, 90.0, 40.0);
359 AliMatrix(idrotm[2125], 180.0, 0.0, 90.0, 150.0, 90.0, 240.0);
360 AliMatrix(idrotm[2130], 0.0, 0.0, 90.0, 150.0, 90.0, 240.0);
361 AliMatrix(idrotm[2128], 0.0, 0.0, 90.0, 170.0, 90.0, 80.0);
362 AliMatrix(idrotm[2135], 180.0, 0.0, 90.0, 190.0, 90.0, 280.0);
363 AliMatrix(idrotm[2141], 180.0, 0.0, 90.0, 170.0, 90.0, 80.0);
364 AliMatrix(idrotm[2131], 0.0, 0.0, 90.0, 190.0, 90.0, 280.0);
365 AliMatrix(idrotm[2101], 0.0, 0.0, 90.0, 350.0, 90.0, 260.0);
366 AliMatrix(idrotm[2106], 180.0, 0.0, 90.0, 350.0, 90.0, 260.0);
367 AliMatrix(idrotm[2096], 180.0, 0.0, 90.0, 10.0, 90.0, 100.0);
368 AliMatrix(idrotm[2098], 0.0, 0.0, 90.0, 10.0, 90.0, 100.0);
369 AliMatrix(idrotm[2108], 0.0, 0.0, 90.0, 30.0, 90.0, 300.0);
370 AliMatrix(idrotm[2111], 180.0, 0.0, 90.0, 30.0, 90.0, 300.0);
371 AliMatrix(idrotm[2113], 180.0, 0.0, 90.0, 50.0, 90.0, 140.0);
372 AliMatrix(idrotm[2118], 0.0, 0.0, 90.0, 50.0, 90.0, 140.0);
373
374 AliMatrix(idrotm[2115], 180.0, 0.0, 90.0, 130.0, 90.0, 220.0);
375 AliMatrix(idrotm[2112], 180.0, 0.0, 90.0, 50.0, 90.0, 320.0);
376 AliMatrix(idrotm[2124], 180.0, 0.0, 90.0, 150.0, 90.0, 60.0);
377 AliMatrix(idrotm[2103], 180.0, 0.0, 90.0, 30.0, 90.0, 120.0);
378 AliMatrix(idrotm[2140], 180.0, 0.0, 90.0, 170.0, 90.0, 260.0);
379 AliMatrix(idrotm[2133], 180.0, 0.0, 90.0, 190.0, 90.0, 100.0);
380 AliMatrix(idrotm[2104], 180.0, 0.0, 90.0, 350.0, 90.0, 80.0);
381 AliMatrix(idrotm[2095], 180.0, 0.0, 90.0, 10.0, 90.0, 280.0);
382
383 AliMatrix(idrotm[2119], 0.0, 0.0, 90.0, 50.0, 90.0, 320.0);
384 AliMatrix(idrotm[2139], 0.0, 0.0, 90.0, 150.0, 90.0, 60.0);
385 AliMatrix(idrotm[2107], 0.0, 0.0, 90.0, 30.0, 90.0, 120.0);
386 AliMatrix(idrotm[2099], 0.0, 0.0, 90.0, 10.0, 90.0, 280.0);
387 AliMatrix(idrotm[2129], 0.0, 0.0, 90.0, 170.0, 90.0, 260.0);
388 AliMatrix(idrotm[2144], 0.0, 0.0, 90.0, 190.0, 90.0, 100.0);
389 AliMatrix(idrotm[2100], 0.0, 0.0, 90.0, 350.0, 90.0, 80.0);
390
391 Float_t rd = 410.56;
392 dz = (dymod[1]+dymod[0])/2.;
393 Float_t dz2 = (dymod[1]+dymod[2])/2.;
394
395//
396// phi = 40
397//
398 Float_t phi = 40;
399 dx = rd * TMath::Sin(phi*kdeg2rad);
400 dy = rd * TMath::Cos(phi*kdeg2rad);
401
402 gMC->Gspos("B047", 1, "B076", -dx, dy, dz, idrotm[2123], "ONLY");
403 gMC->Gspos("B047", 2, "B076", -dx, dy, -dz, idrotm[2121], "ONLY");
404 gMC->Gspos("B047", 3, "B076", dx, dy, dz, idrotm[2113], "ONLY");
405 gMC->Gspos("B047", 4, "B076", dx, dy, -dz, idrotm[2118], "ONLY");
406
407 gMC->Gspos("B045", 1, "B076", -dx, dy, dz2, idrotm[2115], "ONLY");
408 gMC->Gspos("B045", 2, "B076", -dx, dy, -dz2, idrotm[2121], "ONLY"); // ?
409 gMC->Gspos("B045", 3, "B076", dx, dy, dz2, idrotm[2112], "ONLY");
410 gMC->Gspos("B045", 4, "B076", dx, dy, -dz2, idrotm[2119], "ONLY");
411
412 gMC->Gspos("BM49", 1, "B076", dx, dy, 0., idrotm[2112], "ONLY");
413 gMC->Gspos("BM49", 2, "B076", -dx, dy, 0., idrotm[2115], "ONLY");
414
415//
416// phi = 60
417//
418
419 phi = 60;
420 dx = rd * TMath::Sin(phi*kdeg2rad);
421 dy = rd * TMath::Cos(phi*kdeg2rad);
422 gMC->Gspos("B047", 5, "B076", -dx, dy, dz, idrotm[2125], "ONLY");
423 gMC->Gspos("B047", 6, "B076", -dx, dy, -dz, idrotm[2130], "ONLY");
424 gMC->Gspos("B047", 7, "B076", dx, dy, dz, idrotm[2111], "ONLY");
425 gMC->Gspos("B047", 8, "B076", dx, dy, -dz, idrotm[2108], "ONLY");
426
427 gMC->Gspos("B045", 5, "B076", -dx, dy, dz2, idrotm[2124], "ONLY");
428 gMC->Gspos("B045", 6, "B076", -dx, dy, -dz2, idrotm[2139], "ONLY");
429 gMC->Gspos("B045", 7, "B076", dx, dy, dz2, idrotm[2103], "ONLY");
430 gMC->Gspos("B045", 8, "B076", dx, dy, -dz2, idrotm[2107], "ONLY");
431
432 gMC->Gspos("BM49", 3, "B076", dx, dy, 0., idrotm[2103], "ONLY");
433 gMC->Gspos("BM49", 4, "B076", -dx, dy, 0., idrotm[2124], "ONLY");
434//
435// phi = 80
436//
437
438 phi = 80;
439 dx = rd * TMath::Sin(phi*kdeg2rad);
440 dy = rd * TMath::Cos(phi*kdeg2rad);
441 gMC->Gspos("B047", 9, "B076", -dx, dy, dz, idrotm[2141], "ONLY");
442 gMC->Gspos("B047", 10, "B076", -dx, dy, -dz, idrotm[2128], "ONLY");
443 gMC->Gspos("B047", 11, "B076", dx, dy, dz, idrotm[2096], "ONLY");
444 gMC->Gspos("B047", 12, "B076", dx, dy, -dz, idrotm[2098], "ONLY");
445
446 gMC->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2135], "ONLY");
447 gMC->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2131], "ONLY");
448 gMC->Gspos("B047", 15, "B076", dx, -dy, dz, idrotm[2106], "ONLY");
449 gMC->Gspos("B047", 16, "B076", dx, -dy, -dz, idrotm[2101], "ONLY");
450
451 gMC->Gspos("B045", 9, "B076", -dx, dy, dz2, idrotm[2140], "ONLY");
452 gMC->Gspos("B045", 10, "B076", -dx, dy, -dz2, idrotm[2129], "ONLY");
453 gMC->Gspos("B045", 11, "B076", dx, dy, dz2, idrotm[2095], "ONLY");
454 gMC->Gspos("B045", 12, "B076", dx, dy, -dz2, idrotm[2099], "ONLY");
455
456 gMC->Gspos("B045", 13, "B076", -dx, -dy, dz2, idrotm[2133], "ONLY");
457 gMC->Gspos("B045", 14, "B076", -dx, -dy, -dz2, idrotm[2144], "ONLY");
458 gMC->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2104], "ONLY");
459 gMC->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2100], "ONLY");
460
461 gMC->Gspos("BM49", 5, "B076", dx, dy, 0., idrotm[2095], "ONLY");
462 gMC->Gspos("BM49", 6, "B076", -dx, dy, 0., idrotm[2140], "ONLY");
463 gMC->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2104], "ONLY");
464 gMC->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2133], "ONLY");
465
466
467// The internal frame
468//
469 char* module[3] = {"B071\0", "B074\0", "B075\0"};
470//
471//
472// Mother Volumes
473//
474 ptrd1[0] = 50.18;
475 ptrd1[1] = 70.35;
476// ptrd1[0] = 50.10;
477// ptrd1[1] = 70.20;
478
479 ptrd1[2] = 375.5;
480 ptrd1[3] = 57.2;
481 for (jmod = 0; jmod < 3; jmod++)
482 {
483 gMC->Gsvolu(module[jmod], "TRD1", kAir, ptrd1, 4);
484 }
485
486 Int_t mod[18] = {1, 1, 1, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 1, 1};
487 Int_t rot1[18] = {53, 52, 49, 69, 30, 71, 64, 83, 81, 151, 150, 145, 146, 147, 148, 149, 60, 51};
488 Int_t rot2[18] = {23, 22, 21, 24, 14, 20, 136, 137, 36, 28, 67, 25, 50, 26, 27, 29, 138, 2};
489
490
491 Float_t r = 341.8;
492 Float_t rout1 = 410.564;
493 Float_t rout2 = 415.2;
494 Int_t modcount[3] = {0, 0, 0};
495
496 for (i=0; i<18; i++) {
497 Float_t phi = i*20.;
498 Float_t phi2 = 270+phi;
499 if (phi2 >= 360.) phi2-=360.;
500
501 dx = TMath::Sin(phi*kdeg2rad)*r;
502 dy = -TMath::Cos(phi*kdeg2rad)*r;
503 modcount[mod[i]]++;
504
505 AliMatrix(idrotm[2000+rot1[i]], 90.0, phi, 0., 0., 90., phi2);
506 gMC->Gspos(module[mod[i]], modcount[mod[i]], "B077", dx, dy, 0., idrotm[2000+rot1[i]], "ONLY");
507//
508// Position elements of outer Frame
509//
510 dx = TMath::Sin(phi*kdeg2rad)*rout1;
511 dy = -TMath::Cos(phi*kdeg2rad)*rout1;
512 for (j = 0; j < 3; j++)
513 {
514 dz = dymod[j];
515 gMC->Gspos("B042", 6*i+2*j+1, "B076", dx, dy, dz, idrotm[2000+rot1[i]], "ONLY");
516 gMC->Gspos("B042", 6*i+2*j+2, "B076", dx, dy, -dz, idrotm[2000+rot1[i]], "ONLY");
517 }
518
519 phi = i*20.+10;
520 phi2 = 270+phi;
521 AliMatrix(idrotm[2000+rot2[i]], 90.0, phi, 90., phi2, 0., 0.);
522
523 dx = TMath::Sin(phi*kdeg2rad)*rout2;
524 dy = -TMath::Cos(phi*kdeg2rad)*rout2;
525 gMC->Gspos("B033", i+1, "B076", dx, dy, 0., idrotm[2000+rot2[i]], "ONLY");
526//
527 }
528// Internal Frame rings
529//
530//
531// new specs: 40x100x6 for inner rings
532// 30x135x6 for front and rear rings
533//
534// currently no distinction between front/rear and inner rings
535//
536//
537//
538 pbox[0] = 50.;
539 pbox[1] = ringW/2.;
540 pbox[2] = ringH/2.;
541
542 gMC->Gsvolu("B072", "BOX ", kSteel, pbox, 3);
543
544 pbox[1] = pbox[1] - 0.6;
545 pbox[2] = pbox[2] - 0.6;
546 gMC->Gsvolu("B073", "BOX ", kAir, pbox, 3);
547 gMC->Gspos("B073", 1, "B072", 0., 0., 0., 0, "ONLY");
548
549// Web frame 0-degree
550//
551// h x w x s = 60x40x4
552// (attention: element is are half bars, "U" shaped)
553//
554
555 pbox[0] = dwh;
556 pbox[1] = dwl;
557 pbox[2] = (iFrH-ringH-longH)/2.;
558 gMC->Gsvolu("B063", "BOX ", kSteel, pbox, 3);
559 pbox[0] = dwh-0.2;
560 pbox[1] = dwl-0.4;
561
562 gMC->Gsvolu("B064", "BOX ", kAir, pbox, 3);
563 gMC->Gspos("B064", 1, "B063", 0.2, 0., 0., 0, "ONLY");
564
565 AliMatrix(idrotm[2013], 90.0, 0.0, 90.0, 270.0, 0.0, 0.0);
566 AliMatrix(idrotm[2001], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0);
567 AliMatrix(idrotm[2003], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
568 AliMatrix(idrotm[2011], 100.0, 180.0, 90.0, 270.0, 10.0, 180.0);
569 AliMatrix(idrotm[2017], 100.0, 180.0, 90.0, 90.0, 10.0, 180.0);
570 AliMatrix(idrotm[2006], 10.0, 0.0, 80.0, 180.0, 90.0, 90.0);
571 AliMatrix(idrotm[2010], 10.0, 0.0, 80.0, 180.0, 90.0, 270.0);
572 AliMatrix(idrotm[2012], 10.0, 180.0, 80.0, 0.0, 90.0, 90.0);
573 AliMatrix(idrotm[2018], 10.0, 180.0, 80.0, 0.0, 90.0, 270.0);
574 AliMatrix(idrotm[2007], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0);
575 AliMatrix(idrotm[2009], 170.0, 180.0, 80.0, 180.0, 90.0, 270.0);
576 AliMatrix(idrotm[2016], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0);
577 AliMatrix(idrotm[2015], 170.0, 0.0, 80.0, 0.0, 90.0, 270.0);
578 AliMatrix(idrotm[2004], 170.0, 0.0, 90.0, 90.0, 80.0, 0.0);
579 AliMatrix(idrotm[2005], 170.0, 180.0, 90.0, 90.0, 80.0, 180.0);
580 AliMatrix(idrotm[2019], 90.0, 180.0, 90.0, 90.0, 0.0, 0.0);
581//
582// web frame diagonal (outer)
583//
584 h = 106.2;
585 d = 2.*dwl;
586 dz = dymod[2]-dymod[1]-2.*dwl;
587 dq = h*h+dz*dz;
588
589 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
590
591
592 theta = krad2deg * TMath::ACos(x);
593
594 ptrap[0] = dz/2.;
595 ptrap[1] = theta;
596 ptrap[2] = 0.;
597 ptrap[3] = dwh;
598 ptrap[4] = dwl/x;
599 ptrap[5] = ptrap[4];
600 ptrap[6] = 0;
601 ptrap[7] = ptrap[3];
602 ptrap[8] = ptrap[4];
603 ptrap[9] = ptrap[4];
604 ptrap[10] = 0;
605 gMC->Gsvolu("B065", "TRAP", kSteel, ptrap, 11);
606 ptrap[3] = dwh - 0.2;
607 ptrap[4] = (dwl-0.4)/x;
608 ptrap[5] = ptrap[4];
609 ptrap[7] = ptrap[3];
610 ptrap[8] = ptrap[4];
611 ptrap[9] = ptrap[4];
612 gMC->Gsvolu("B066", "TRAP", kAir, ptrap, 11);
613 gMC->Gspos("B066", 1, "B065", 0.0, -0.2, 0., 0, "ONLY");
614
615//
616// web frame diagonal (inner)
617//
618 dz = dymod[1]-dymod[0]-2.*dwl;
619 dq = h*h+dz*dz;
620 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
621
622
623 theta = krad2deg * TMath::ACos(x);
624
625 ptrap[0] = (dymod[1]-dymod[0]-2.*dwl)/2.;
626 ptrap[1] = theta;
627 ptrap[2] = 0.;
628 ptrap[3] = dwh;
629 ptrap[4] = dwl/x;
630 ptrap[5] = ptrap[4];
631 ptrap[6] = 0;
632 ptrap[7] = ptrap[3];
633 ptrap[8] = ptrap[4];
634 ptrap[9] = ptrap[4];
635 ptrap[10] = 0;
636 gMC->Gsvolu("B067", "TRAP", kSteel, ptrap, 11);
637 ptrap[3] = dwh-0.2;
638 ptrap[4] = (dwl-0.4)/x;
639 ptrap[5] = ptrap[4];
640 ptrap[7] = ptrap[3];
641 ptrap[8] = ptrap[4];
642 ptrap[9] = ptrap[4];
643 gMC->Gsvolu("B068", "TRAP", kAir, ptrap, 11);
644 gMC->Gspos("B068", 1, "B067", 0.0, -0.2, 0., 0, "ONLY");
645
646
647 dz = -iFrH/2.+ringH/2.+kEps;
648
649 for (i = 0; i< 3; i++)
650 {
651// ring bars
652 for (jmod = 0; jmod<3; jmod++) {
653 gMC->Gspos("B072", 6*i+jmod+1, module[jmod], 0, dymod[i], dz, 0, "ONLY");
654 gMC->Gspos("B072", 6*i+jmod+4, module[jmod], 0, -dymod[i], dz, idrotm[2013], "ONLY");
655
656// 0-deg web
657 gMC->Gspos("B063", 12*i+jmod+1, module[jmod], 60.0732, dymod[i], 4.6669, idrotm[2003], "ONLY");
658 gMC->Gspos("B063", 12*i+jmod+4, module[jmod], 60.0732, -dymod[i], 4.6669, idrotm[2001], "ONLY");
659 gMC->Gspos("B063", 12*i+jmod+7, module[jmod], -60.0732, dymod[i], 4.6669, idrotm[2017], "ONLY");
660 gMC->Gspos("B063", 12*i+jmod+10, module[jmod], -60.0732, -dymod[i], 4.6669, idrotm[2011], "ONLY");
661 }
662 }
663
664// outer diagonal web
665
666 dy = (dymod[2]+dymod[1])/2.;
667 for (jmod = 0; jmod<3; jmod++) {
668 gMC->Gspos("B065", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2010], "ONLY");
669 gMC->Gspos("B065", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2006], "ONLY");
670 gMC->Gspos("B065", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2018], "ONLY");
671 gMC->Gspos("B065", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2012], "ONLY");
672 }
673
674
675 dy = (dymod[1]+dymod[0])/2.;
676
677 for (jmod = 0; jmod<3; jmod++) {
678 gMC->Gspos("B067", 4*jmod+1, module[jmod], 60.0732, dy, 4.6669, idrotm[2009], "ONLY");
679 gMC->Gspos("B067", 4*jmod+2, module[jmod], 60.0732, -dy, 4.6669, idrotm[2007], "ONLY");
680 gMC->Gspos("B067", 4*jmod+3, module[jmod], -60.0732, dy, 4.6669, idrotm[2015], "ONLY");
681 gMC->Gspos("B067", 4*jmod+4, module[jmod], -60.0732, -dy, 4.6669, idrotm[2016], "ONLY");
682 }
683
684// longitudinal bars (TPC rails attached)
685// new specs:
686// h x w x s = 100 x 75 x 6
687// current:
688// Attention: 2 "U" shaped half rods per cell
689//
690// not yet used
691//
692 ptrap[0] = 2.50;
693 ptrap[1] = 10.00;
694 ptrap[2] = 0.00;
695 ptrap[3] = 350.00;
696 ptrap[4] = 3.75;
697 ptrap[5] = ptrap[4];
698 ptrap[6] = 0;
699 ptrap[7] = ptrap[3];
700 ptrap[8] = ptrap[4];
701 ptrap[9] = ptrap[4];
702 ptrap[10] = 0;
703 gMC->Gsvolu("B059", "TRAP", kSteel, ptrap, 11);
704 ptrap[0] = 2.2;
705 ptrap[4] = 2.15;
706 ptrap[5] = ptrap[4];
707 ptrap[7] = ptrap[3];
708 ptrap[8] = ptrap[4];
709 ptrap[9] = ptrap[4];
710 gMC->Gsvolu("B062", "TRAP", kAir, ptrap, 11);
711 gMC->Gspos("B062", 1, "B059", 0.0, -0.3, 0., 0, "ONLY");
712//
713// longitudinal bars (no TPC rails attached)
714// new specs: h x w x s = 60 x 60 x 3
715// (was: 75 x 100 x 5?)
716//
717//
718//
719 ptrap[0] = longW/4.;
720 ptrap[4] = longH/2.;
721 ptrap[5] = ptrap[4];
722 ptrap[7] = ptrap[3];
723 ptrap[8] = ptrap[4];
724 ptrap[9] = ptrap[4];
725
726 gMC->Gsvolu("BA59", "TRAP", kSteel, ptrap, 11);
727 ptrap[0] = longW/4.-0.15;
728 ptrap[4] = longH/2.-0.30;
729 ptrap[5] = ptrap[4];
730 ptrap[7] = ptrap[3];
731 ptrap[8] = ptrap[4];
732 ptrap[9] = ptrap[4];
733 gMC->Gsvolu("BA62", "TRAP", kAir, ptrap, 11);
734 gMC->Gspos("BA62", 1, "BA59", 0.0, 0.0, -0.15, 0, "ONLY");
735
736 dz = -iFrH/2.+ringH+longH/2.;
737
738 for (jmod = 0; jmod<3; jmod++) {
739 gMC->Gspos("BA59", 2*jmod+1, module[jmod], 49.6476, 0.0, dz, idrotm[2005], "ONLY");
740 gMC->Gspos("BA59", 2*jmod+2, module[jmod], -49.6476, 0.0, dz, idrotm[2004], "ONLY");
741 }
742//
743//
744// Spacer between TRD and TOF modules
745 ptrap[0] = 0.99;
746 ptrap[1] = 10.00;
747 ptrap[2] = 0.00;
748 ptrap[3] = 350.00;
749 ptrap[4] = 0.9;
750 ptrap[5] = ptrap[4];
751 ptrap[6] = 0;
752 ptrap[7] = ptrap[3];
753 ptrap[8] = ptrap[4];
754 ptrap[9] = ptrap[4];
755 ptrap[10] = 0;
756 gMC->Gsvolu("B056", "TRAP", kSteel, ptrap, 11);
757 for (jmod = 0; jmod<3; jmod++) {
758 gMC->Gspos("B056", 2*jmod+1, module[jmod], 61.9607, 0.0, 27.2, 0 , "ONLY");
759 gMC->Gspos("B056", 2*jmod+2, module[jmod], -61.9607, 0.0, 27.2, idrotm[2019], "ONLY");
760 }
761//
762// Mother volumes for TRD and TOF
763//
764 if (!fHoles) {
765
766 ptrd1[0] = 49.8065;
767 ptrd1[1] = 62.8535;
768 ptrd1[2] = 375.5;
769 ptrd1[3] = 37.;
770 gMC->Gsvolu("BTR1", "TRD1", kAir, ptrd1, 4);
771 gMC->Gsvolu("BTR2", "TRD1", kAir, ptrd1, 4);
772 gMC->Gsvolu("BTR3", "TRD1", kAir, ptrd1, 4);
773
774 ptrd1[0] = 63.2061;
775 ptrd1[1] = 68.3192;
776 ptrd1[2] = 375.5;
777 ptrd1[3] = 14.5;
778 gMC->Gsvolu("BTO1", "TRD1", kAir, ptrd1, 4);
779 gMC->Gsvolu("BTO2", "TRD1", kAir, ptrd1, 4);
780 gMC->Gsvolu("BTO3", "TRD1", kAir, ptrd1, 4);
781
782 gMC->Gspos("BTR1", 1, "B071", 0., 0., -10.8, 0, "ONLY");
783 gMC->Gspos("BTR2", 1, "B074", 0., 0., -10.8, 0, "ONLY");
784 gMC->Gspos("BTR3", 1, "B075", 0., 0., -10.8, 0, "ONLY");
785
786 gMC->Gspos("BTO1", 1, "B071", 0., 0., 42.69, 0, "ONLY");
787 gMC->Gspos("BTO2", 1, "B074", 0., 0., 42.69, 0, "ONLY");
788 gMC->Gspos("BTO3", 1, "B075", 0., 0., 42.69, 0, "ONLY");
789 } else {
790 ptrd1[0] = 49.8065;
791 ptrd1[1] = 62.8535;
792 ptrd1[2] = 375.5;
793 ptrd1[3] = 37;
794 gMC->Gsvolu("BTR1", "TRD1", kAir, ptrd1, 4);
795 ptrd1[2] = 156.75;
796 gMC->Gsvolu("BTR2", "TRD1", kAir, ptrd1, 4);
797 ptrd1[2] = 79.75;
798 gMC->Gsvolu("BTR3", "TRD1", kAir, ptrd1, 4);
799
800 ptrd1[0] = 63.2061;
801 ptrd1[1] = 68.3192;
802 ptrd1[2] = 375.5;
803 ptrd1[3] = 14.5;
804 gMC->Gsvolu("BTO1", "TRD1", kAir, ptrd1, 4);
805 ptrd1[2] = 156.75;
806 gMC->Gsvolu("BTO2", "TRD1", kAir, ptrd1, 4);
807 ptrd1[2] = 79.75;
808 gMC->Gsvolu("BTO3", "TRD1", kAir, ptrd1, 4);
809
810 gMC->Gspos("BTR1", 1, "B071", 0., 0., -10.8, 0, "ONLY");
811
812 gMC->Gspos("BTR2", 1, "B074", 0., -218.75, -10.8, idrotm[152], "ONLY");
813 gMC->Gspos("BTR2", 2, "B074", 0., 218.75, -10.8, 0, "ONLY");
814
815 gMC->Gspos("BTR3", 1, "B075", 0., -295.75, -10.8, idrotm[152], "ONLY");
816 gMC->Gspos("BTR3", 2, "B075", 0., 295.75, -10.8, 0, "ONLY");
817
818
819 gMC->Gspos("BTO1", 1, "B071", 0., 0., -42.7, 0, "ONLY");
820
821 gMC->Gspos("BTO2", 1, "B074", 0., -218.75, -42.7, idrotm[152], "ONLY");
822 gMC->Gspos("BTO2", 2, "B074", 0., 218.75, -42.7, 0, "ONLY");
823
824 gMC->Gspos("BTO3", 1, "B075", 0., -295.75, -42.7, idrotm[152], "ONLY");
825 gMC->Gspos("BTO3", 2, "B075", 0., 295.75, -42.7, 0, "ONLY");
826
827 }
828}
829
830
831//___________________________________________
832void AliFRAMEv2::CreateMaterials()
833{
834
835 Float_t epsil, stemax, tmaxfd, deemax, stmin;
836
837 epsil = 1.e-4; // Tracking precision,
838 stemax = -0.01; // Maximum displacement for multiple scat
839 tmaxfd = -20.; // Maximum angle due to field deflection
840 deemax = -.3; // Maximum fractional energy loss, DLS
841 stmin = -.8;
842 Int_t isxfld = gAlice->Field()->Integ();
843 Float_t sxmgmx = gAlice->Field()->Max();
844
845 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
846 Float_t zsteel[4] = { 26.,24.,28.,14. };
847 Float_t wsteel[4] = { .715,.18,.1,.005 };
848
849 AliMixture(65, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
850 AliMaterial(5, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
851 AliMedium(65, "Stainless Steel", 65, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
852 AliMedium( 5, "Air ", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
853}
854
855//_____________________________________________________________________________
856void AliFRAMEv2::Init()
857{
858 //
859 // Initialise the module after the geometry has been defined
860 //
0a05c568 861 if(fDebug) {
862 printf("%s: **************************************"
863 " FRAME "
864 "**************************************\n",ClassName());
865 printf("\n%s: Version 2 of FRAME initialised, symmetric FRAME\n\n",ClassName());
866 printf("%s: **************************************"
867 " FRAME "
868 "**************************************\n",ClassName());
869 }
7e5caa00 870}
871
872
873
874
875
876
877
878