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