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