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