overlaps in B076 corrected
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv3.cxx
CommitLineData
b9c35690 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/* $Id$ */
17
18//------------------------------------------------------------------------
19// AliFRAMEv3.cxx
20// symmetric space frame with possibility for holes
21// Author: A.Morsch
22//------------------------------------------------------------------------
23
24#include <TGeoBBox.h>
87829bcb 25#include <TGeoXtru.h>
b9c35690 26#include <TGeoCompositeShape.h>
27#include <TGeoGlobalMagField.h>
28#include <TGeoManager.h>
29#include <TGeoMatrix.h>
30#include <TGeoPgon.h>
31#include <TString.h>
32#include <TSystem.h>
33#include <TVirtualMC.h>
34
35#include "AliFRAMEv3.h"
36#include "AliMagF.h"
37#include "AliRun.h"
38#include "AliConst.h"
39#include "AliMC.h"
40#include "AliLog.h"
41#include "AliTrackReference.h"
42
43
44#include <TGeoTrd1.h>
45
46ClassImp(AliFRAMEv3)
47
48
49//_____________________________________________________________________________
50 AliFRAMEv3::AliFRAMEv3():
51 fHoles(0)
52{
53// Constructor
54}
55
56//_____________________________________________________________________________
57AliFRAMEv3::AliFRAMEv3(const char *name, const char *title)
58 : AliFRAME(name,title),
59 fHoles(0)
60{
61// Constructor
62}
63
64//___________________________________________
65void AliFRAMEv3::CreateGeometry()
66{
67//Begin_Html
68/*
69<img src="picts/frame.gif">
70*/
71//End_Html
72
73
74//Begin_Html
75/*
76<img src="picts/tree_frame.gif">
77*/
78//End_Html
79
80 Int_t idrotm[2299];
81
82
83
84 AliMatrix(idrotm[2070], 90.0, 0.0, 90.0, 270.0, 0.0, 0.0);
85//
86 AliMatrix(idrotm[2083], 170.0, 0.0, 90.0, 90.0, 80.0, 0.0);
87 AliMatrix(idrotm[2084], 170.0, 180.0, 90.0, 90.0, 80.0, 180.0);
88 AliMatrix(idrotm[2085], 90.0, 180.0, 90.0, 90.0, 0.0, 0.0);
89//
90 AliMatrix(idrotm[2086], 80.0, 0.0, 90.0, 90., -10.0, 0.0);
91 AliMatrix(idrotm[2096], 100.0, 0.0, 90.0, 90., 10.0, 0.0);
92//
93 AliMatrix(idrotm[2087], -100.0, 0.0, 90.0, 270., -10.0, 0.0);
94 AliMatrix(idrotm[2097], -80.0, 0.0, 90.0, 270., 10.0, 0.0);
87829bcb 95
b9c35690 96//
97 AliMatrix(idrotm[2088], 90.0, 90.0, 90.0, 180., 0.0, 0.0);
98 AliMatrix(idrotm[2089], 90.0, 90.0, 90.0, 0., 0.0, 0.0);
99//
100 AliMatrix(idrotm[2090], 90.0, 0.0, 0.0, 0., 90.0, 90.0);
101 AliMatrix(idrotm[2091], 0.0, 0.0, 90.0, 90., 90.0, 0.0);
102//
103// Matrices have been imported from Euclid. Some simplification
104// seems possible
105//
106
107 AliMatrix(idrotm[2003], 0.0, 0.0, 90.0, 130.0, 90.0, 40.0);
108 AliMatrix(idrotm[2004], 180.0, 0.0, 90.0, 130.0, 90.0, 40.0);
109 AliMatrix(idrotm[2005], 180.0, 0.0, 90.0, 150.0, 90.0, 240.0);
110 AliMatrix(idrotm[2006], 0.0, 0.0, 90.0, 150.0, 90.0, 240.0);
111 AliMatrix(idrotm[2007], 0.0, 0.0, 90.0, 170.0, 90.0, 80.0);
112 AliMatrix(idrotm[2008], 180.0, 0.0, 90.0, 190.0, 90.0, 280.0);
113 AliMatrix(idrotm[2009], 180.0, 0.0, 90.0, 170.0, 90.0, 80.0);
114 AliMatrix(idrotm[2010], 0.0, 0.0, 90.0, 190.0, 90.0, 280.0);
115 AliMatrix(idrotm[2011], 0.0, 0.0, 90.0, 350.0, 90.0, 260.0);
116 AliMatrix(idrotm[2012], 180.0, 0.0, 90.0, 350.0, 90.0, 260.0);
117 AliMatrix(idrotm[2013], 180.0, 0.0, 90.0, 10.0, 90.0, 100.0);
118 AliMatrix(idrotm[2014], 0.0, 0.0, 90.0, 10.0, 90.0, 100.0);
119 AliMatrix(idrotm[2015], 0.0, 0.0, 90.0, 30.0, 90.0, 300.0);
120 AliMatrix(idrotm[2016], 180.0, 0.0, 90.0, 30.0, 90.0, 300.0);
121 AliMatrix(idrotm[2017], 180.0, 0.0, 90.0, 50.0, 90.0, 140.0);
122 AliMatrix(idrotm[2018], 0.0, 0.0, 90.0, 50.0, 90.0, 140.0);
123
124 AliMatrix(idrotm[2019], 180.0, 0.0, 90.0, 130.0, 90.0, 220.0);
125 AliMatrix(idrotm[2020], 180.0, 0.0, 90.0, 50.0, 90.0, 320.0);
126 AliMatrix(idrotm[2021], 180.0, 0.0, 90.0, 150.0, 90.0, 60.0);
127 AliMatrix(idrotm[2022], 180.0, 0.0, 90.0, 30.0, 90.0, 120.0);
128 AliMatrix(idrotm[2023], 180.0, 0.0, 90.0, 170.0, 90.0, 260.0);
129 AliMatrix(idrotm[2024], 180.0, 0.0, 90.0, 190.0, 90.0, 100.0);
130 AliMatrix(idrotm[2025], 180.0, 0.0, 90.0, 350.0, 90.0, 80.0);
131 AliMatrix(idrotm[2026], 180.0, 0.0, 90.0, 10.0, 90.0, 280.0);
132
133 AliMatrix(idrotm[2027], 0.0, 0.0, 90.0, 50.0, 90.0, 320.0);
134 AliMatrix(idrotm[2028], 0.0, 0.0, 90.0, 150.0, 90.0, 60.0);
135 AliMatrix(idrotm[2029], 0.0, 0.0, 90.0, 30.0, 90.0, 120.0);
136 AliMatrix(idrotm[2030], 0.0, 0.0, 90.0, 10.0, 90.0, 280.0);
137 AliMatrix(idrotm[2031], 0.0, 0.0, 90.0, 170.0, 90.0, 260.0);
138 AliMatrix(idrotm[2032], 0.0, 0.0, 90.0, 190.0, 90.0, 100.0);
139 AliMatrix(idrotm[2033], 0.0, 0.0, 90.0, 350.0, 90.0, 80.0);
140
141
142 Int_t *idtmed = fIdtmed->GetArray()-1999;
143//
144// The Space frame
145//
146//
147 Float_t pbox[3], ptrap[11], ptrd1[4], ppgon[10];
148
149 Float_t dx, dy, dz;
150 Int_t i, j, jmod;
151 jmod = 0;
152//
153// Constants
87829bcb 154//
155 // Materials
b9c35690 156 const Int_t kAir = idtmed[2004];
157 const Int_t kSteel = idtmed[2064];
a9bfe689 158 const Int_t kAlu = idtmed[2008];
159 const Int_t kG10 = idtmed[2021];
87829bcb 160 // Angles
161 const Float_t kEps = 0.01;
b9c35690 162 const Float_t krad2deg = 180. / TMath::Pi();
163 const Float_t kdeg2rad = 1. / krad2deg;
164 const Float_t sin10 = TMath::Sin(10. * kdeg2rad);
87829bcb 165 const Float_t sin20 = TMath::Sin(20. * kdeg2rad);
b9c35690 166 const Float_t tan10 = TMath::Tan(10. * kdeg2rad);
167 const Float_t cos10 = TMath::Cos(10. * kdeg2rad);
87829bcb 168 // Dimensions
169 const Float_t hR = 286.00; // distance of frame wrt vertex (tangential)
170 const Float_t iFrH = 119.00; // Height of inner frame
171 const Float_t ringH = 6.00; // Height of the ring bars
172 const Float_t ringT = 1.00; // Thickness of bars
173 const Float_t ringW = 10.00; // Width of the ring bars in z
b9c35690 174 // Positions of ring bars
175 // outer
176 const Float_t dymodU[3] = {71.5, 228.5, 339.5};
177 // inner
178 const Float_t dymodL[3] = {50.0, 175.0, 297.5};
87829bcb 179 //
b9c35690 180 // orientation of web frame elements
181 const Float_t dymodO[5] = {10., -40., 20., -27.1, 18.4};
182 // Position of web frame elements
183 Float_t dymodW[5] = {70., 73.6, 224.5, 231.4, 340.2};
184 for (Int_t ii = 0; ii < 5; ii++) {
185 dymodW[ii] = dymodW[ii]-3.*TMath::Tan(dymodO[ii]*kdeg2rad);
186 }
87829bcb 187 //
b9c35690 188 // radial length of web frame elements
87829bcb 189 const Float_t dHz = 113./cos10 - 2. * sin10;
b9c35690 190 // inner longitudinal bars 4 x 6
191 const Float_t longH = 6.00;
192 const Float_t longW = 4.00;
87829bcb 193 const Float_t dext = sin10 * longW/2.+0.01;
194 const Float_t iFrH0 = iFrH + 2. * dext;
b9c35690 195 // outer longitudianl bars 8 x 8
196 const Float_t longOD = 8.0;
197 // length of inner longitudinal bars
198 const Float_t longLI = 615.;
87829bcb 199 const Float_t zE = 376.5;
b9c35690 200//
201// Frame mother volume
202//
203 TGeoPgon* shB77A = new TGeoPgon(0., 360., 18, 2);
204 shB77A->SetName("shB77A");
87829bcb 205 shB77A->DefineSection( 0, -zE, 280., 415.7);
206 shB77A->DefineSection( 1, zE, 280., 415.7);
b9c35690 207 TGeoBBox* shB77B = new TGeoBBox(3.42, 2., 375.5);
208 shB77B->SetName("shB77B");
209 TGeoTranslation* trB77A = new TGeoTranslation("trB77A", +283.32, 0., 0.);
210 TGeoTranslation* trB77B = new TGeoTranslation("trB77B", -283.32, 0., 0.);
211 trB77A->RegisterYourself();
212 trB77B->RegisterYourself();
213 TGeoCompositeShape* shB77 = new TGeoCompositeShape("shB77", "shB77A+shB77B:trB77A+shB77B:trB77B");
214 TGeoVolume* voB77 = new TGeoVolume("B077", shB77, gGeoManager->GetMedium("FRAME_Air"));
215 voB77->SetName("B077"); // just to avoid a warning
216 TVirtualMC::GetMC()->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY");
217//
218// Reference plane #1 for TRD
219 TGeoPgon* shBREFA = new TGeoPgon(0.0, 360., 18, 2);
220 shBREFA->DefineSection( 0, -376., 280., 280.1);
221 shBREFA->DefineSection( 1, 376., 280., 280.1);
222 shBREFA->SetName("shBREFA");
223 TGeoCompositeShape* shBREF1 = new TGeoCompositeShape("shBREF1", "shBREFA-(shB77B:trB77A+shB77B:trB77B)");
224 TGeoVolume* voBREF = new TGeoVolume("BREF1", shBREF1, gGeoManager->GetMedium("FRAME_Air"));
225 voBREF->SetVisibility(0);
226 TVirtualMC::GetMC()->Gspos("BREF1", 1, "B077", 0., 0., 0., 0, "ONLY");
227//
228// The outer Frame
229//
230
231 Float_t dol = 4.;
232 Float_t doh = 4.;
233 Float_t ds = 0.63;
234//
235// Mother volume
236//
237 ppgon[0] = 0.;
238 ppgon[1] = 360.;
239 ppgon[2] = 18.;
240
241 ppgon[3] = 2.;
242
87829bcb 243 ppgon[4] = -350.0;
244 ppgon[5] = 402.0;
afaba6e2 245 // ppgon[6] = 415.6;
246 ppgon[6] = 423.6;
b9c35690 247
248 ppgon[7] = -ppgon[4];
249 ppgon[8] = ppgon[5];
250 ppgon[9] = ppgon[6];
251 TVirtualMC::GetMC()->Gsvolu("B076", "PGON", kAir, ppgon, 10);
252 TVirtualMC::GetMC()->Gspos("B076", 1, "B077", 0., 0., 0., 0, "ONLY");
253//
254// Rings
255//
87829bcb 256// dz = 2. * 410.2 * TMath::Tan(10.*kdeg2rad) - 2. *dol * TMath::Cos(10.*kdeg2rad)- 2. * doh * TMath::Tan(10.*kdeg2rad);
257 dz = 2. * 410.2 * sin10 - 2. * dol * cos10 - 2. * doh * tan10;
258 Float_t l1 = dz / 2.;
259 Float_t l2 = dz / 2. + 2. * doh * tan10;
b9c35690 260
261
262 TGeoVolumeAssembly* asBI42 = new TGeoVolumeAssembly("BI42");
263 // Horizontal
87829bcb 264 ptrd1[0] = l2 - 0.6 * tan10;
b9c35690 265 ptrd1[1] = l2;
266 ptrd1[2] = 8.0 / 2.;
267 ptrd1[3] = 0.6 / 2.;
268 TVirtualMC::GetMC()->Gsvolu("BIH142", "TRD1", kSteel, ptrd1, 4);
269 ptrd1[0] = l1;
87829bcb 270 ptrd1[1] = l1 + 0.6 * tan10;
b9c35690 271 ptrd1[2] = 8.0 / 2.;
272 ptrd1[3] = 0.6 / 2.;
273 TVirtualMC::GetMC()->Gsvolu("BIH242", "TRD1", kSteel, ptrd1, 4);
274
275 // Vertical
87829bcb 276 ptrd1[0] = l1 + 0.6 * tan10;
277 ptrd1[1] = l2 - 0.6 * tan10;
b9c35690 278 ptrd1[2] = 0.8 / 2.;
279 ptrd1[3] = 6.8 / 2.;
280 TVirtualMC::GetMC()->Gsvolu("BIV42", "TRD1", kSteel, ptrd1, 4);
281 // Place
282 asBI42->AddNode(gGeoManager->GetVolume("BIV42"), 1, new TGeoTranslation(0., 0., 0.));
283 asBI42->AddNode(gGeoManager->GetVolume("BIH142"), 1, new TGeoTranslation(0., 0., 3.7));
284 asBI42->AddNode(gGeoManager->GetVolume("BIH242"), 1, new TGeoTranslation(0., 0., -3.7));
285//
286// longitudinal bars
287//
288// 80 x 80 x 6.3
289//
290 pbox[0] = dol;
291 pbox[1] = doh;
292 pbox[2] = 345.;
293 TVirtualMC::GetMC()->Gsvolu("B033", "BOX", kSteel, pbox, 3);
294 pbox[0] = dol-ds;
295 pbox[1] = doh-ds;
296 TVirtualMC::GetMC()->Gsvolu("B034", "BOX", kAir, pbox, 3);
297 TVirtualMC::GetMC()->Gspos("B034", 1, "B033", 0., 0., 0., 0, "ONLY");
298
299
300 //
301 // TPC support
302 //
303 pbox[0] = 3.37;
304 pbox[1] = 2.0;
87829bcb 305 pbox[2] = longLI / 2.;
b9c35690 306 TVirtualMC::GetMC()->Gsvolu("B080", "BOX", kSteel, pbox, 3);
307 pbox[0] = 2.78;
87829bcb 308 pbox[1] = 1.40;
309 pbox[2] = longLI / 2.;
b9c35690 310 TVirtualMC::GetMC()->Gsvolu("B081", "BOX", kAir, pbox, 3);
311 TVirtualMC::GetMC()->Gspos("B081", 1, "B080", 0., 0., 0., 0, "ONLY");
312
313 // Small 2nd reference plane elemenet
314 pbox[0] = 0.05;
315 pbox[1] = 2.0;
87829bcb 316 pbox[2] = longLI / 2.;
b9c35690 317 TVirtualMC::GetMC()->Gsvolu("BREF2", "BOX", kAir, pbox, 3);
318 TVirtualMC::GetMC()->Gspos("BREF2", 1, "B080", 3.37 - 0.05, 0., 0., 0, "ONLY");
319
320 TVirtualMC::GetMC()->Gspos("B080", 1, "B077", 283.3, 0., 0., 0, "ONLY");
a9bfe689 321 TVirtualMC::GetMC()->Gspos("B080", 2, "B077", -283.3, 0., 0., idrotm[2088], "ONLY");
b9c35690 322
323
324//
325// Diagonal bars (1)
326//
327 Float_t h, d, dq, x, theta;
328
329 h = (dymodU[1]-dymodU[0]-2.*dol)*.999;
330 d = 2.*dol;
331 dq = h*h+dz*dz;
332
333 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
334
335
336 theta = krad2deg * TMath::ACos(x);
337
338 ptrap[0] = dz/2.;
339 ptrap[1] = theta;
340 ptrap[2] = 0.;
341 ptrap[3] = doh;
342 ptrap[4] = dol/x;
343 ptrap[5] = ptrap[4];
344 ptrap[6] = 0;
345 ptrap[7] = ptrap[3];
346 ptrap[8] = ptrap[4];
347 ptrap[9] = ptrap[4];
348 ptrap[10] = 0;
349
350 TVirtualMC::GetMC()->Gsvolu("B047", "TRAP", kSteel, ptrap, 11);
351 ptrap[3] = doh-ds;
352 ptrap[4] = (dol-ds)/x;
353 ptrap[5] = ptrap[4];
354 ptrap[7] = ptrap[3];
355 ptrap[8] = ptrap[4];
356 ptrap[9] = ptrap[4];
357 TVirtualMC::GetMC()->Gsvolu("B048", "TRAP", kAir, ptrap, 11);
358 TVirtualMC::GetMC()->Gspos("B048", 1, "B047", 0.0, 0.0, 0., 0, "ONLY");
359
360/*
361 Crosses (inner most)
362 \\ //
363 \\//
364 //\\
365 // \\
366*/
367 h = (2.*dymodU[0]-2.*dol)*.999;
368//
369// Mother volume
370//
371 pbox[0] = h/2;
372 pbox[1] = doh;
373 pbox[2] = dz/2.;
374 TVirtualMC::GetMC()->Gsvolu("BM49", "BOX ", kAir, pbox, 3);
375
376
377 dq = h*h+dz*dz;
378 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
379 theta = krad2deg * TMath::ACos(x);
380
381 ptrap[0] = dz/2.-kEps;
382 ptrap[1] = theta;
383 ptrap[2] = 0.;
384 ptrap[3] = doh-kEps;
385 ptrap[4] = dol/x;
386 ptrap[5] = ptrap[4];
387 ptrap[7] = ptrap[3];
388 ptrap[8] = ptrap[4];
389 ptrap[9] = ptrap[4];
390
391 TVirtualMC::GetMC()->Gsvolu("B049", "TRAP", kSteel, ptrap, 11);
392 ptrap[0] = ptrap[0]-kEps;
393 ptrap[3] = (doh-ds);
394 ptrap[4] = (dol-ds)/x;
395 ptrap[5] = ptrap[4];
396 ptrap[7] = ptrap[3];
397 ptrap[8] = ptrap[4];
398 ptrap[9] = ptrap[4];
399 TVirtualMC::GetMC()->Gsvolu("B050", "TRAP", kAir, ptrap, 11);
400 TVirtualMC::GetMC()->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY");
401 TVirtualMC::GetMC()->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY");
402
403
404 Float_t dd1 = d*TMath::Tan(theta*kdeg2rad);
405 Float_t dd2 = d/TMath::Tan(2.*theta*kdeg2rad);
406 Float_t theta2 = TMath::ATan(TMath::Abs(dd2-dd1)/d/2.);
407
408
409 ptrap[0] = dol;
410 ptrap[1] = theta2*krad2deg;
411 ptrap[2] = 0.;
412 ptrap[3] = doh;
413 ptrap[4] = (dz/2./x-dd1-dd2)/2.;
414 ptrap[5] = ptrap[4];
415 ptrap[6] = 0.;
416 ptrap[7] = ptrap[3];
417 ptrap[8] = dz/4./x;
418 ptrap[9] = ptrap[8];
419
420
421 TVirtualMC::GetMC()->Gsvolu("B051", "TRAP", kSteel, ptrap, 11);
422 Float_t ddx0 = ptrap[8];
423
424 Float_t dd1s = dd1*(1.-2.*ds/d);
425 Float_t dd2s = dd2*(1.-2.*ds/d);
426 Float_t theta2s = TMath::ATan(TMath::Abs(dd2s-dd1s)/(d-2.*ds)/2.);
427
428
429 ptrap[0] = dol-ds;
430 ptrap[1] = theta2s*krad2deg;
431 ptrap[2] = 0.;
432 ptrap[3] = doh-ds;
433 ptrap[4] = ptrap[4]+ds/d/2.*(dd1+dd2);
434 ptrap[5] = ptrap[4];
435 ptrap[6] = 0.;
436 ptrap[7] = ptrap[3];
437 ptrap[8] = ptrap[8]-ds/2./d*(dd1+dd2);
438 ptrap[9] = ptrap[8];
439
440 TVirtualMC::GetMC()->Gsvolu("B052", "TRAP", kAir, ptrap, 11);
441 TVirtualMC::GetMC()->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY");
442
443 Float_t ddx, ddz, drx, drz, rtheta;
444
445 AliMatrix(idrotm[2001], -theta+180, 0.0, 90.0, 90.0, 90.-theta, 0.0);
446 rtheta = (90.-theta)*kdeg2rad;
447 ddx = -ddx0-dol*TMath::Tan(theta2);
448 ddz = -dol;
449
450 drx = TMath::Cos(rtheta) * ddx +TMath::Sin(rtheta) *ddz+pbox[0];
451 drz = -TMath::Sin(rtheta) * ddx +TMath::Cos(rtheta) *ddz-pbox[2];
452 TVirtualMC::GetMC()->Gspos("B051", 1, "BM49",
453 drx, 0.0, drz,
454 idrotm[2001], "ONLY");
455
456 AliMatrix(idrotm[2002], -theta, 0.0, 90.0, 90.0, 270.-theta, 0.0);
457 rtheta = (270.-theta)*kdeg2rad;
458
459 drx = TMath::Cos(rtheta) * ddx + TMath::Sin(rtheta) * ddz-pbox[0];
460 drz = -TMath::Sin(rtheta) * ddx + TMath::Cos(rtheta) * ddz+pbox[2];
461 TVirtualMC::GetMC()->Gspos("B051", 2, "BM49",
462 drx, 0.0, drz,
463 idrotm[2002], "ONLY");
464
465//
466// Diagonal bars (3)
467//
468 h = ((dymodU[2]-dymodU[1])-2.*dol)*.999;
469 dq = h*h+dz*dz;
470 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
471 theta = krad2deg * TMath::ACos(x);
472
473 ptrap[0] = dz/2.;
474 ptrap[1] = theta;
475 ptrap[3] = doh;
476 ptrap[4] = dol/x;
477 ptrap[5] = ptrap[4];
478 ptrap[7] = ptrap[3];
479 ptrap[8] = ptrap[4];
480 ptrap[9] = ptrap[4];
481
482 TVirtualMC::GetMC()->Gsvolu("B045", "TRAP", kSteel, ptrap, 11);
483 ptrap[3] = doh-ds;
484 ptrap[4] = (dol-ds)/x;
485 ptrap[5] = ptrap[4];
486 ptrap[7] = ptrap[3];
487 ptrap[8] = ptrap[4];
488 ptrap[9] = ptrap[4];
489 TVirtualMC::GetMC()->Gsvolu("B046", "TRAP", kAir, ptrap, 11);
490 TVirtualMC::GetMC()->Gspos("B046", 1, "B045", 0.0, 0.0, 0., 0, "ONLY");
491
492//
493// Positioning of diagonal bars
494
afaba6e2 495 Float_t rd = 405.5 + 0.51;
b9c35690 496 dz = (dymodU[1]+dymodU[0])/2.;
497 Float_t dz2 = (dymodU[1]+dymodU[2])/2.;
498
499//
500// phi = 40
501//
502 Float_t phi = 40;
503 dx = rd * TMath::Sin(phi*kdeg2rad);
504 dy = rd * TMath::Cos(phi*kdeg2rad);
505
506
507 TVirtualMC::GetMC()->Gspos("B045", 1, "B076", -dx, dy, dz2, idrotm[2019], "ONLY");
508 TVirtualMC::GetMC()->Gspos("B045", 2, "B076", -dx, dy, -dz2, idrotm[2003], "ONLY"); // ?
509 TVirtualMC::GetMC()->Gspos("B045", 3, "B076", dx, dy, dz2, idrotm[2020], "ONLY");
510 TVirtualMC::GetMC()->Gspos("B045", 4, "B076", dx, dy, -dz2, idrotm[2027], "ONLY");
511
512
513//
514// phi = 60
515//
516
517 phi = 60;
518 dx = rd * TMath::Sin(phi*kdeg2rad);
519 dy = rd * TMath::Cos(phi*kdeg2rad);
520
521 TVirtualMC::GetMC()->Gspos("B045", 5, "B076", -dx, dy, dz2, idrotm[2021], "ONLY");
522 TVirtualMC::GetMC()->Gspos("B045", 6, "B076", -dx, dy, -dz2, idrotm[2028], "ONLY");
523 TVirtualMC::GetMC()->Gspos("B045", 7, "B076", dx, dy, dz2, idrotm[2022], "ONLY");
524 TVirtualMC::GetMC()->Gspos("B045", 8, "B076", dx, dy, -dz2, idrotm[2029], "ONLY");
525
526//
527// phi = 80
528//
529
530 phi = 80;
531 dx = rd * TMath::Sin(phi*kdeg2rad);
532 dy = rd * TMath::Cos(phi*kdeg2rad);
533
534 TVirtualMC::GetMC()->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2008], "ONLY");
535 TVirtualMC::GetMC()->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2010], "ONLY");
536 TVirtualMC::GetMC()->Gspos("B047", 15, "B076", dx, -dy, dz, idrotm[2012], "ONLY");
537 TVirtualMC::GetMC()->Gspos("B047", 16, "B076", dx, -dy, -dz, idrotm[2011], "ONLY");
538
539 TVirtualMC::GetMC()->Gspos("B045", 9, "B076", -dx, dy, dz2, idrotm[2023], "ONLY");
540 TVirtualMC::GetMC()->Gspos("B045", 10, "B076", -dx, dy, -dz2, idrotm[2031], "ONLY");
541 TVirtualMC::GetMC()->Gspos("B045", 11, "B076", dx, dy, dz2, idrotm[2026], "ONLY");
542 TVirtualMC::GetMC()->Gspos("B045", 12, "B076", dx, dy, -dz2, idrotm[2030], "ONLY");
543
544 TVirtualMC::GetMC()->Gspos("B045", 13, "B076", -dx, -dy, dz2, idrotm[2024], "ONLY");
545 TVirtualMC::GetMC()->Gspos("B045", 14, "B076", -dx, -dy, -dz2, idrotm[2032], "ONLY");
546 TVirtualMC::GetMC()->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2025], "ONLY");
547 TVirtualMC::GetMC()->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2033], "ONLY");
548
549 TVirtualMC::GetMC()->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2025], "ONLY");
550 TVirtualMC::GetMC()->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2024], "ONLY");
551
552//
87829bcb 553// The inner frame
b9c35690 554//
555//
556// Mother Volumes
557//
87829bcb 558 Float_t dd = longW / 2. / cos10;
559
560
561 ptrd1[0] = (hR - longH/2. - dext) * tan10;
562 ptrd1[1] = (hR - longH/2. + iFrH + dext) * tan10;
563 ptrd1[2] = zE;
564 ptrd1[3] = iFrH0 / 2.;
565
566 /*
567 Double_t xIF[10];
568 Double_t yIF[10];
569 xIF[0] = 0.;
570 xIF[1] = ptrd1[0] - dd;
571 xIF[2] = ptrd1[0];
572 xIF[3] = ptrd1[1];
573 xIF[4] = ptrd1[1] - 4./cos10;
574 xIF[5] = 0.;
575 xIF[6] = - xIF[4];
576 xIF[7] = - xIF[3];
577 xIF[8] = - xIF[2];
578 xIF[9] = - xIF[1];
579 yIF[0] = -iFrH0/2.;
580 yIF[1] = -iFrH0/2.;
581 yIF[2] = -iFrH0/2. - 2. * sin10;
582 yIF[3] = +iFrH0/2. - 4. * sin10;
583 yIF[4] = +iFrH0/2.;
584 yIF[5] = +iFrH0/2.;
585 yIF[6] = yIF[4];
586 yIF[7] = yIF[3];
587 yIF[8] = yIF[2];
588 yIF[9] = yIF[1];
589 TGeoXtru* shIF = new TGeoXtru(2);
590 shIF->DefinePolygon(10, xIF, yIF);
591 shIF->DefineSection(0., -zE, 0., 0.);
592 shIF->DefineSection(1., zE, 0., 0.);
593 */
594 Float_t r = (hR - longH/2. + iFrH0/2. ); // was 342.
595 Float_t rout1 = 406.0;
afaba6e2 596 Float_t rout2 = 412.3 - 4. * sin10 + 0.51;
b9c35690 597 TString module[18];
87829bcb 598 TGeoVolume* voIF[18];
b9c35690 599 for (i = 0; i < 18; i++) {
600
601 // Create volume i
602 char name[16];
87829bcb 603 // module numbering
b9c35690 604 Int_t mod = i + 13;
605 if (mod > 17) mod -= 18;
606 snprintf(name, 16, "BSEGMO%d", mod);
87829bcb 607 //
608 //voIF[i] = new TGeoVolume(name, shIF, gGeoManager->GetMedium("FRAME_Air"));
b9c35690 609 TVirtualMC::GetMC()->Gsvolu(name, "TRD1", kAir, ptrd1, 4);
610 gGeoManager->GetVolume(name)->SetVisibility(kFALSE);
b9c35690 611 module[i] = name;
612 // Place volume i
87829bcb 613 Float_t phi1 = i * 20.;
614 Float_t phi2 = 270 + phi1;
b9c35690 615 if (phi2 >= 360.) phi2 -= 360.;
b9c35690 616 dx = TMath::Sin(phi1*kdeg2rad)*r;
617 dy = -TMath::Cos(phi1*kdeg2rad)*r;
618
619 char nameR[16];
620 snprintf(nameR, 16, "B43_Rot_%d", i);
621 TGeoRotation* rot = new TGeoRotation(nameR, 90.0, phi1, 0., 0., 90., phi2);
622 AliMatrix(idrotm[2034+i], 90.0, phi1, 0., 0., 90., phi2);
623 TGeoVolume* vol77 = gGeoManager->GetVolume("B077");
624 TGeoVolume* volS = gGeoManager->GetVolume(name);
87829bcb 625 //vol77->AddNode(volS, 1, new TGeoTranslation(dx, dy, 0.));
b9c35690 626 vol77->AddNode(volS, 1, new TGeoCombiTrans(dx, dy, 0., rot));
87829bcb 627
b9c35690 628
629//
630// Position elements of outer Frame
631//
632 dx = TMath::Sin(phi1*kdeg2rad)*rout1;
633 dy = -TMath::Cos(phi1*kdeg2rad)*rout1;
634 for (j = 0; j < 3; j++)
635 {
636 dz = dymodU[j];
637 TGeoVolume* vol = gGeoManager->GetVolume("B076");
638 vol->AddNode(asBI42, 6*i+2*j+1, new TGeoCombiTrans(dx, dy, dz, rot));
639 vol->AddNode(asBI42, 6*i+2*j+2, new TGeoCombiTrans(dx, dy, -dz, rot));
640 }
641
642 phi1 = i*20.+10;
643 phi2 = 270+phi1;
644 AliMatrix(idrotm[2052+i], 90.0, phi1, 90., phi2, 0., 0.);
645
646 dx = TMath::Sin(phi1*kdeg2rad)*rout2;
647 dy = -TMath::Cos(phi1*kdeg2rad)*rout2;
648 TVirtualMC::GetMC()->Gspos("B033", i+1, "B076", dx, dy, 0., idrotm[2052+i], "ONLY");
649//
650 }
651// Internal Frame rings
652//
653//
87829bcb 654// 60x60x5x6 for inner rings (I-beam)
655// 100x60x5 for front and rear rings
b9c35690 656//
657// Front and rear
87829bcb 658//
659
660
661 ptrd1[0] = (hR - longH / 2.) * tan10 - dd;
662 ptrd1[1] = (hR + longH / 2.) * tan10 - dd;
b9c35690 663 ptrd1[2] = ringW / 2.;
664 ptrd1[3] = ringH / 2.;
665
666 TVirtualMC::GetMC()->Gsvolu("B072", "TRD1", kSteel, ptrd1, 4);
667
87829bcb 668 ptrd1[0] = (hR - longH / 2. + 0.5) * tan10 - dd;
669 ptrd1[1] = (hR + longH / 2. - 0.5) * tan10 - dd;
b9c35690 670 ptrd1[2] = ringW / 2. - 0.5;
671 ptrd1[3] = ringH / 2. - 0.5;
672
673 TVirtualMC::GetMC()->Gsvolu("B073", "TRD1", kAir, ptrd1, 4);
674 TVirtualMC::GetMC()->Gspos("B073", 1, "B072", 0., 0., 0., 0, "ONLY");
675//
676// I-Beam
677// Mother volume
678 TGeoVolumeAssembly* asBI72 = new TGeoVolumeAssembly("BI72");
679 // Horizontal
87829bcb 680 Float_t rIB1 = hR + ringH/2.;
681 Float_t rIB2 = hR - ringH/2.;
682 ptrd1[0] = (rIB1 - ringT/2.) * sin10 - dd;
683 ptrd1[1] = (rIB1 ) * sin10 - dd;
684 ptrd1[2] = ringH / 2.;
685 ptrd1[3] = ringT / 4.;
b9c35690 686 TVirtualMC::GetMC()->Gsvolu("BIH172", "TRD1", kSteel, ptrd1, 4);
87829bcb 687 ptrd1[0] = (rIB2 ) * sin10 - dd;
688 ptrd1[1] = (rIB2 + ringT/2.) * sin10 - dd;
689 ptrd1[2] = ringH/2.;
690 ptrd1[3] = ringT/4.;
b9c35690 691 TVirtualMC::GetMC()->Gsvolu("BIH272", "TRD1", kSteel, ptrd1, 4);
692
693 // Vertical
87829bcb 694 ptrd1[0] = (rIB2 + ringT/2.) * sin10 - dd;
695 ptrd1[1] = (rIB2 - ringT/2.) * sin10 - dd;
696 ptrd1[2] = 0.6 / 2.;
697 ptrd1[3] = (ringH - ringT) / 2.;
b9c35690 698 TVirtualMC::GetMC()->Gsvolu("BIV72", "TRD1", kSteel, ptrd1, 4);
699 // Place
700 asBI72->AddNode(gGeoManager->GetVolume("BIV72"), 1, new TGeoTranslation(0., 0., 0.));
87829bcb 701 asBI72->AddNode(gGeoManager->GetVolume("BIH172"), 1, new TGeoTranslation(0., 0., (ringH/2. - ringT/4.)));
702 asBI72->AddNode(gGeoManager->GetVolume("BIH272"), 1, new TGeoTranslation(0., 0., -(ringH/2. - ringT/4.)));
b9c35690 703
704// Web frame
705//
706// h x w x s = 60 x 40 x 5
707// (attention: elements are half bars, "U" shaped)
708//
709
710 WebFrame("B063", dHz, dymodO[0], 10.);
711 WebFrame("B163", dHz, dymodO[1], 10.);
712 WebFrame("B263", dHz, dymodO[2], 10.);
713 WebFrame("B363", dHz, dymodO[3], 10.);
714 WebFrame("B463", dHz, dymodO[4], 10.);
715
87829bcb 716 dz = -iFrH / 2. + ringH / 2.;
b9c35690 717
87829bcb 718 Float_t dz0 = longH / 2. - 2.*sin10;
719 Float_t dx0 = (hR + iFrH/2.) * tan10 - longW / 4. / cos10;
720 for (jmod = 0; jmod < 18; jmod++)
b9c35690 721 {
87829bcb 722//
b9c35690 723// ring bars
724 for (i = 0; i < 3; i++) {
b9c35690 725 if (i == 2) {
726 TVirtualMC::GetMC()->Gspos("B072", 6*jmod+i+1, module[jmod], 0, dymodL[i], dz, 0, "ONLY");
727 TVirtualMC::GetMC()->Gspos("B072", 6*jmod+i+4, module[jmod], 0, -dymodL[i], dz, idrotm[2070], "ONLY");
728 } else {
729 TGeoVolume* vol = gGeoManager->GetVolume(module[jmod]);
730 vol->AddNode(asBI72, 6*jmod+i+1, new TGeoTranslation(0, dymodL[i], dz));
731 vol->AddNode(asBI72, 6*jmod+i+4, new TGeoTranslation(0, -dymodL[i], dz));
732 }
733 }
734 }
87829bcb 735//
b9c35690 736// outer diagonal web
737
738 dy = dymodW[0] - (dHz/2.) * TMath::Tan(dymodO[0] * kdeg2rad);
739
740 for (jmod = 0; jmod < 18; jmod++) {
87829bcb 741 TVirtualMC::GetMC()->Gspos("B063I", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2096], "ONLY");
742 TVirtualMC::GetMC()->Gspos("B063", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2097], "ONLY");
743 TVirtualMC::GetMC()->Gspos("B063I", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY");
744 TVirtualMC::GetMC()->Gspos("B063", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY");
b9c35690 745 }
746
747 dy = dymodW[1] - (dHz/2.) * TMath::Tan(dymodO[1] * kdeg2rad);
748
749 for (jmod = 0; jmod < 18; jmod++) {
87829bcb 750 TVirtualMC::GetMC()->Gspos("B163I", 4*jmod+1, module[jmod], dx0, -dy, dz0, idrotm[2096], "ONLY");
751 TVirtualMC::GetMC()->Gspos("B163", 4*jmod+2, module[jmod], dx0, dy, dz0, idrotm[2097], "ONLY");
752 TVirtualMC::GetMC()->Gspos("B163I", 4*jmod+3, module[jmod], -dx0, dy, dz0, idrotm[2087], "ONLY");
753 TVirtualMC::GetMC()->Gspos("B163", 4*jmod+4, module[jmod], -dx0, -dy, dz0, idrotm[2086], "ONLY");
b9c35690 754 }
755
756 dy = dymodW[2] - (dHz/2) * TMath::Tan(dymodO[2] * kdeg2rad);
87829bcb 757
758 for (jmod = 0; jmod < 18; jmod++) {
759 TVirtualMC::GetMC()->Gspos("B263I", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2096], "ONLY");
760 TVirtualMC::GetMC()->Gspos("B263", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2097], "ONLY");
761 TVirtualMC::GetMC()->Gspos("B263I", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY");
762 TVirtualMC::GetMC()->Gspos("B263", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY");
b9c35690 763 }
764
765 dy = dymodW[3] - (dHz/2.) * TMath::Tan(dymodO[3] * kdeg2rad);
766
767 for (jmod = 0; jmod < 18; jmod++) {
87829bcb 768 TVirtualMC::GetMC()->Gspos("B363I", 4*jmod+1, module[jmod], dx0, -dy, dz0, idrotm[2096], "ONLY");
769 TVirtualMC::GetMC()->Gspos("B363", 4*jmod+2, module[jmod], dx0, dy, dz0, idrotm[2097], "ONLY");
770 TVirtualMC::GetMC()->Gspos("B363I", 4*jmod+3, module[jmod], -dx0, dy, dz0, idrotm[2087], "ONLY");
771 TVirtualMC::GetMC()->Gspos("B363", 4*jmod+4, module[jmod], -dx0, -dy, dz0, idrotm[2086], "ONLY");
b9c35690 772 }
773
774 dy = dymodW[4] - (dHz/2.) * TMath::Tan(dymodO[4] * kdeg2rad);
87829bcb 775
776 for (jmod = 0; jmod < 18; jmod++) {
777 TVirtualMC::GetMC()->Gspos("B463I", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2096], "ONLY");
778 TVirtualMC::GetMC()->Gspos("B463", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2097], "ONLY");
779 TVirtualMC::GetMC()->Gspos("B463I", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY");
780 TVirtualMC::GetMC()->Gspos("B463", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY");
b9c35690 781 }
782
783// longitudinal bars (TPC rails attached)
784// new specs:
785// h x w x s = 100 x 75 x 6
786// current:
787// ??
788// ??
789// Attention: 2 "U" shaped half rods per cell
790// longitudinal bars (no TPC rails attached)
791// new specs: h x w x s = 40 x 60 x 5
792//
793//
794//
87829bcb 795 Double_t lbox[3];
b9c35690 796 lbox[0] = longW / 4.;
797 lbox[2] = longH / 2.;
798 lbox[1] = longLI / 2.;
a9bfe689 799 TVirtualMC::GetMC()->Gsvolu("BA59", "BOX", kSteel, lbox, 3);
800 gGeoManager->GetVolume("BA59")->SetVisContainers();
b9c35690 801 lbox[0] = longW / 4. - 0.25;
802 lbox[2] = longH / 2. - 0.50;
803 TVirtualMC::GetMC()->Gsvolu("BA62", "BOX", kAir, lbox, 3);
804 TVirtualMC::GetMC()->Gspos("BA62", 1, "BA59", 0.25, 0.0, 0.0, 0, "ONLY");
805
87829bcb 806 dz = -iFrH / 2. + longH / 2. - 1. * sin10;
807 dx = hR * tan10 - longW / 4. / cos10;
808 for (jmod = 0; jmod < 18; jmod++) {
809 TVirtualMC::GetMC()->Gspos("BA59", 2*jmod+1, module[jmod], dx, 0.0, dz, idrotm[2096], "ONLY");
810 TVirtualMC::GetMC()->Gspos("BA59", 2*jmod+2, module[jmod], -dx, 0.0, dz, idrotm[2087], "ONLY");
811 }
b9c35690 812 //
813 // Rails for TRD
814 //
815 // Pos 1
816 //
87829bcb 817 // angular 80 deg profile
b9c35690 818 lbox[2] = 4.0;
819 lbox[0] = 0.2;
820 lbox[1] = longLI / 2.;
821 TVirtualMC::GetMC()->Gsvolu("BTRDR_10", "BOX", kSteel, lbox, 3);
a9bfe689 822
b9c35690 823 ptrd1[0] = 3.;
824 ptrd1[1] = 3. + 0.4 * tan10;
87829bcb 825 ptrd1[2] = longLI / 2.;
b9c35690 826 ptrd1[3] = 0.2;
827 TVirtualMC::GetMC()->Gsvolu("BTRDR_11", "TRD1", kSteel, ptrd1, 4);
a9bfe689 828
829 lbox[2] = 2.0;
830 lbox[0] = 0.3;
831 lbox[1] = longLI / 2.;
832 TVirtualMC::GetMC()->Gsvolu("BTRDR_12", "BOX", kAlu, lbox, 3);
833 gGeoManager->GetVolume("BTRDR_12")->SetVisContainers();
834
835 lbox[2] = 2.0;
836 lbox[0] = 0.1;
837 lbox[1] = longLI / 2.;
838 TVirtualMC::GetMC()->Gsvolu("BTRDR_13", "BOX", kG10, lbox, 3);
839 TVirtualMC::GetMC()->Gspos("BTRDR_13", 1, "BTRDR_12", -0.2, 0.0, 0.0, 0, "ONLY");
840
841 lbox[2] = 0.1;
842 lbox[0] = 2.0;
843 lbox[1] = longLI / 2.;
844 TVirtualMC::GetMC()->Gsvolu("BTRDR_14", "BOX", kG10, lbox, 3);
87829bcb 845 dz = -iFrH / 2. + longH / 2.;
a9bfe689 846 Float_t zpos = 80.;
847 Int_t isec_1[11] = {0, 1, 2, 3, 4, 5, 13, 14, 15, 16, 17};
e28d8650 848
a9bfe689 849 for (Int_t index = 0; index < 11; index++) {
850 jmod = isec_1[index];
851 Float_t dz1 = dz + 3. + (zpos - 4.);
852 dx0 = (hR + dz0 + zpos - 4.) * tan10 - (longW / 2. + 0.2) / cos10;
853 if (jmod != 5) TVirtualMC::GetMC()->Gspos("BTRDR_10", 2*jmod+1, module[jmod], dx0, 0.0, dz1, idrotm[2096], "ONLY");
854 if (jmod != 13) TVirtualMC::GetMC()->Gspos("BTRDR_10", 2*jmod+2, module[jmod], -dx0, 0.0, dz1, idrotm[2086], "ONLY");
855 dx0 -= 0.5;
856 if (jmod != 5) TVirtualMC::GetMC()->Gspos("BTRDR_12", 2*jmod+1, module[jmod], dx0, 0.0, dz1, idrotm[2096], "ONLY");
857 if (jmod != 13) TVirtualMC::GetMC()->Gspos("BTRDR_12", 2*jmod+2, module[jmod], -dx0, 0.0, dz1, idrotm[2087], "ONLY");
858 dz1 += (4 - 0.2);
859 dx0 = (hR + dz0 + zpos - 0.2) * tan10 - (longW / 2. + 3. + 0.4) / cos10;
860 if (jmod != 5) TVirtualMC::GetMC()->Gspos("BTRDR_11", 2*jmod+1, module[jmod], dx0, 0.0, dz1, 0, "ONLY");
861 if (jmod != 13) TVirtualMC::GetMC()->Gspos("BTRDR_11", 2*jmod+2, module[jmod], -dx0, 0.0, dz1, 0, "ONLY");
862 dz1 -= 0.3;
863 dx0 -= 0.5;
864 if (jmod != 5) TVirtualMC::GetMC()->Gspos("BTRDR_14", 2*jmod+1, module[jmod], dx0, 0.0, dz1, 0, "ONLY");
865 if (jmod != 13) TVirtualMC::GetMC()->Gspos("BTRDR_14", 2*jmod+2, module[jmod], -dx0, 0.0, dz1, 0, "ONLY");
866 }
b9c35690 867
e28d8650 868 // Pos 2
869 // 40 x 10
870 lbox[2] = 2.0;
871 lbox[0] = 0.5;
872 lbox[1] = longLI / 2.;
873 TVirtualMC::GetMC()->Gsvolu("BTRDR_2", "BOX", kAlu, lbox, 3);
874 lbox[2] = 2.0;
875 lbox[0] = 0.1;
876 lbox[1] = longLI / 2.;
877 TVirtualMC::GetMC()->Gsvolu("BTRDR_21", "BOX", kG10, lbox, 3);
878 TVirtualMC::GetMC()->Gspos("BTRDR_21", 1, "BTRDR_2", -0.4, 0.0, 0.0, 0, "ONLY");
879
880 Int_t isec_2a[16] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17};
881 for (Int_t index = 0; index < 16; index++) {
882 jmod = isec_2a[index];
883 dx0 = (hR + dz0 ) * tan10 + 10. * sin10 - (longW / 4. + 0.5) / cos10;
884 if (jmod >8) {
885 TVirtualMC::GetMC()->Gspos("BTRDR_2", 2*jmod+1, module[jmod], dx0-1.5, 0.0, dz + 3. + 8. * cos10, idrotm[2096], "ONLY");
886 } else {
887 TVirtualMC::GetMC()->Gspos("BTRDR_2", 2*jmod+2, module[jmod], -dx0+1.5, 0.0, dz + 3. + 8. * cos10, idrotm[2087], "ONLY");
888 }
889 }
890
891 Int_t isec_2b[6] = {6, 7, 8, 10, 11, 12};
892 for (Int_t index = 0; index < 6; index++) {
893 jmod = isec_2b[index];
894 dx0 = (hR + dz0 + zpos - 3.) * tan10 - (longW / 4. + 0.5) / cos10;
895 if (index < 3) {
896 TVirtualMC::GetMC()->Gspos("BTRDR_2", 2*jmod+2, module[jmod], -dx0+1.5, 0.0, dz + 3. + zpos - 3., idrotm[2087], "ONLY");
897 } else {
898 TVirtualMC::GetMC()->Gspos("BTRDR_2", 2*jmod+1, module[jmod], dx0-1.5, 0.0, dz + 3. + zpos -3. , idrotm[2096], "ONLY");
899 }
900 }
901
902
903 // Pos 3
904 // 40 x 14
905 lbox[0] = 2.0;
906 lbox[2] = 0.7;
87829bcb 907 lbox[1] = longLI / 2.;
e28d8650 908 TVirtualMC::GetMC()->Gsvolu("BTRDR_3", "BOX", kAlu, lbox, 3);
909
910 lbox[0] = 2.0;
911 lbox[2] = 0.1;
87829bcb 912 lbox[1] = longLI / 2.;
e28d8650 913 TVirtualMC::GetMC()->Gsvolu("BTRDR_31", "BOX", kG10, lbox, 3);
914 TVirtualMC::GetMC()->Gspos("BTRDR_31", 1, "BTRDR_3", 0, 0.0, 0.6, 0, "ONLY");
915
916 Int_t isec_3[9] = {5, 6, 7, 8, 9, 10, 11, 12, 13};
917
a9bfe689 918
a9bfe689 919
920 for (Int_t index = 0; index < 9; index++) {
921 jmod = isec_3[index];
922 if (index > 1) TVirtualMC::GetMC()->Gspos("BTRDR_3", 2*jmod+1, module[jmod], 50.96-5-2., 0.0, dz+3.7, 0, "ONLY");
923 if (index < 7) TVirtualMC::GetMC()->Gspos("BTRDR_3", 2*jmod+2, module[jmod], -50.96+5+2., 0.0, dz+3.7, 0, "ONLY");
b9c35690 924 }
87829bcb 925
926
927//
928// TOF Support Structures
929
930//
931// Frame extension rectangular beams
932 lbox[0] = 6;
933 lbox[1] = 3.;
934 lbox[2] = 36.0;
935 TGeoVolume* voBTOFS1 = new TGeoVolume("BTOFS1", new TGeoBBox(lbox), gGeoManager->GetMedium("FRAME_Steel"));
936 lbox[0] = 5.5;
937 lbox[1] = 2.5;
938 lbox[2] = 36.0;
939 TGeoVolume* voBTOFS11 = new TGeoVolume("BTOFS11", new TGeoBBox(lbox), gGeoManager->GetMedium("FRAME_Air"));
940 voBTOFS1->AddNode(voBTOFS11, 1, gGeoIdentity);
941
942//
943// Frame extension rectangular beams
944// upper clamps
945 TGeoXtru* shBTOFS2 = new TGeoXtru(2);
946 TGeoXtru* shBTOFS3 = new TGeoXtru(2);
afaba6e2 947 TGeoXtru* shBTOFS4 = new TGeoXtru(2);
948 TGeoXtru* shBTOFS5 = new TGeoXtru(2);
87829bcb 949
950 Double_t xxtru1[7];
951 Double_t yxtru1[7];
952 // 1
953 xxtru1[0] = 8.5;
954 yxtru1[0] = 4.5;
955 // 2
956 xxtru1[1] = -6.0;
957 yxtru1[1] = 4.5;
958 // 3
959 xxtru1[2] = -8.5;
960 yxtru1[2] = 4.5 - 2.5 * sin10;
961 // 4
962 xxtru1[3] = 8.5 - 14.5 / cos10;
963 yxtru1[3] = -6. - 14.5 * sin10;
964 // 5
965 xxtru1[4] = 8.5 - 10.5 / cos10;
966 yxtru1[4] = -6. - 10.5 * sin10;
967 // 6
968 xxtru1[5] = xxtru1[4] + 8. * sin10;
969 yxtru1[5] = yxtru1[4] - 8./cos10;
970 // 7
971 xxtru1[6] = 8.5;
972 yxtru1[6] = -6.0;
973
974 Double_t xxtru2[7];
975 for (Int_t i = 0; i < 7; i++) xxtru2[i] = -xxtru1[i];
976
afaba6e2 977 Double_t xxtru3[5];
978 Double_t yxtru3[5];
979 Double_t xxtru4[5];
980 for (Int_t i = 0; i < 4; i++) {
981 xxtru3[i] = xxtru1[i];
982 yxtru3[i] = yxtru1[i];
983 }
984 xxtru3[4] = xxtru1[6];
985 yxtru3[4] = yxtru1[6];
986 for (Int_t i = 0; i < 5; i++) xxtru4[i] = -xxtru3[i];
987
87829bcb 988 shBTOFS2->DefinePolygon(7, xxtru1, yxtru1);
989 shBTOFS2->DefineSection(0, -4.);
990 shBTOFS2->DefineSection(1, +4.);
991
992 shBTOFS3->DefinePolygon(7, xxtru2, yxtru1);
993 shBTOFS3->DefineSection(0, -4.);
994 shBTOFS3->DefineSection(1, +4.);
995 TGeoVolume* voBTOFS2 = new TGeoVolume("BTOFS2", shBTOFS2, gGeoManager->GetMedium("FRAME_Steel"));
996 TGeoVolume* voBTOFS3 = new TGeoVolume("BTOFS3", shBTOFS3, gGeoManager->GetMedium("FRAME_Steel"));
997
afaba6e2 998 // different fixation for clamps close to web frame
999 shBTOFS4->DefinePolygon(5, xxtru3, yxtru3);
1000 shBTOFS4->DefineSection(0, -4.);
1001 shBTOFS4->DefineSection(1, +4.);
1002
1003 shBTOFS5->DefinePolygon(5, xxtru4, yxtru3);
1004 shBTOFS5->DefineSection(0, -4.);
1005 shBTOFS5->DefineSection(1, +4.);
1006 TGeoVolume* voBTOFS4 = new TGeoVolume("BTOFS4", shBTOFS4, gGeoManager->GetMedium("FRAME_Steel"));
1007 TGeoVolume* voBTOFS5 = new TGeoVolume("BTOFS5", shBTOFS5, gGeoManager->GetMedium("FRAME_Steel"));
1008
1009
87829bcb 1010 lbox[0] = 5.5;
1011 lbox[1] = 2.5;
1012 lbox[2] = 4.0;
1013 TGeoVolume* voBTOFS21 = new TGeoVolume("BTOFS21", new TGeoBBox(lbox), gGeoManager->GetMedium("FRAME_Air"));
1014 voBTOFS2->AddNode(voBTOFS21, 1, gGeoIdentity);
1015 voBTOFS3->AddNode(voBTOFS21, 2, gGeoIdentity);
afaba6e2 1016 voBTOFS4->AddNode(voBTOFS21, 3, gGeoIdentity);
1017 voBTOFS5->AddNode(voBTOFS21, 4, gGeoIdentity);
1018
87829bcb 1019 TGeoVolumeAssembly* asTOFS00 = new TGeoVolumeAssembly("BTOFS00");
1020 asTOFS00->AddNode(voBTOFS1, 1, gGeoIdentity);
1021 asTOFS00->AddNode(voBTOFS2, 1, new TGeoTranslation(0., 0., 40.));
1022 asTOFS00->AddNode(voBTOFS2, 2, new TGeoTranslation(0., 0., -40.));
1023
1024 TGeoVolumeAssembly* asTOFS01 = new TGeoVolumeAssembly("BTOFS01");
1025 asTOFS01->AddNode(voBTOFS1, 2, gGeoIdentity);
1026 asTOFS01->AddNode(voBTOFS3, 1, new TGeoTranslation(0., 0., 40.));
1027 asTOFS01->AddNode(voBTOFS3, 2, new TGeoTranslation(0., 0., -40.));
1028
afaba6e2 1029 TGeoVolumeAssembly* asTOFS02 = new TGeoVolumeAssembly("BTOFS02");
1030 asTOFS02->AddNode(voBTOFS1, 3, gGeoIdentity);
1031 asTOFS02->AddNode(voBTOFS2, 3, new TGeoTranslation(0., 0., -40.));
1032 asTOFS02->AddNode(voBTOFS4, 2, new TGeoTranslation(0., 0., 40.));
1033
1034 TGeoVolumeAssembly* asTOFS03 = new TGeoVolumeAssembly("BTOFS03");
1035 asTOFS03->AddNode(voBTOFS1, 4, gGeoIdentity);
1036 asTOFS03->AddNode(voBTOFS3, 3, new TGeoTranslation(0., 0., -40.));
1037 asTOFS03->AddNode(voBTOFS5, 2, new TGeoTranslation(0., 0., 40.));
1038
87829bcb 1039
1040 asTOFS00->SetVisibility(1);
1041 asTOFS01->SetVisibility(1);
1042
1043 for (i = 0; i < 18; i++) {
1044 Float_t dx, dy;
1045 Float_t phi1 = i * 20.;
1046 Float_t phi2 = 270. + phi1;
1047 TGeoRotation* rot1 = new TGeoRotation(Form("TOFS_R1_%d", i), 90.0, phi1, 90., phi2, 0., 0.);
1048 dx = TMath::Sin((phi1+8.95) * kdeg2rad) * (rout2 + 12.);
1049 dy = -TMath::Cos((phi1+8.95) * kdeg2rad) * (rout2 + 12.);
afaba6e2 1050 if ((i >3 && i < 8) || (i > 10 && i < 15)) {
1051 (gGeoManager->GetVolume("B076"))->AddNode(asTOFS03, i, new TGeoCombiTrans(dx, dy, 345.-53.-0.5, rot1));
1052 } else {
1053 (gGeoManager->GetVolume("B076"))->AddNode(asTOFS01, i, new TGeoCombiTrans(dx, dy, 345.-53.-0.5, rot1));
1054 }
87829bcb 1055 dx = TMath::Sin((phi1-8.95) * kdeg2rad) * (rout2 + 12.);
1056 dy = -TMath::Cos((phi1-8.95) * kdeg2rad) * (rout2 + 12.);
afaba6e2 1057 if ((i >3 && i < 8) || (i > 10 && i < 15)) {
1058 (gGeoManager->GetVolume("B076"))->AddNode(asTOFS02, i, new TGeoCombiTrans(dx, dy, 345.-53-0.5, rot1));
1059 } else {
1060 (gGeoManager->GetVolume("B076"))->AddNode(asTOFS00, i, new TGeoCombiTrans(dx, dy, 345.-53-0.5, rot1));
1061 }
87829bcb 1062 }
1063
b9c35690 1064//
1065// Thermal shield
1066//
1067
1068 Float_t dyM = 99.0;
1069 MakeHeatScreen("M", dyM, idrotm[2090], idrotm[2091]);
1070 Float_t dyAM = 119.5;
1071 MakeHeatScreen("AM", dyAM, idrotm[2090], idrotm[2091]);
1072 Float_t dyA = 122.5 - 5.5;
1073 MakeHeatScreen("A" , dyA, idrotm[2090], idrotm[2091]);
1074
1075//
1076//
1077//
1078 dz = -57.2 + 0.6;
1079 for (i = 0; i < 18; i++) {
1080
1081 char nameMo[16];
1082 snprintf(nameMo, 16, "BSEGMO%d",i);
1083 // M
1084 TVirtualMC::GetMC()->Gspos("BTSH_M" , i+1 , nameMo, 0., 0., dz, 0, "ONLY");
1085 // AM, CM
1086 dy = dymodL[0] + dyAM / 2. + 3.;
1087 TVirtualMC::GetMC()->Gspos("BTSH_AM", i+ 1, nameMo, 0., dy, dz, 0, "ONLY");
1088 TVirtualMC::GetMC()->Gspos("BTSH_AM", i+19, nameMo, 0., -dy, dz, 0, "ONLY");
1089 // A, C
1090 dy = dymodL[1] + dyA / 2 + 0.4;
1091 TVirtualMC::GetMC()->Gspos("BTSH_A" , i+ 1, nameMo, 0., dy, dz, 0, "ONLY");
1092 TVirtualMC::GetMC()->Gspos("BTSH_A" , i+19, nameMo, 0., -dy, dz, 0, "ONLY");
1093}
1094
1095
1096 //
1097 // TRD mother volumes
1098 //
1099 // absolute position of center 290.43 + 38.95 = 329.38
1100 // frame center 283.00 + 59.50 = 342.50
1101 // relative position of TRD 329.38 - 342.50
1102 ptrd1[0] = 47.4405; // CBL 28/6/2006
1103 ptrd1[1] = 61.1765; // CBL
1104 ptrd1[2] = 375.5; // CBL
1105 ptrd1[3] = 38.95; // CBL
1106
1107 for (i = 0; i < 18; i++) {
1108 char nameCh[16];
1109 snprintf(nameCh, 16, "BTRD%d",i);
1110 char nameMo[16];
1111 snprintf(nameMo, 16, "BSEGMO%d",i);
1112 TVirtualMC::GetMC()->Gsvolu(nameCh, "TRD1", kAir, ptrd1, 4);
1113 gGeoManager->GetVolume(nameCh)->SetVisibility(kFALSE);
1114 TVirtualMC::GetMC()->Gspos(nameCh, 1, nameMo, 0., 0., -13.12, 0, "ONLY"); // CBL 28/6/2006
1115 }
1116
1117//
1118// TOF mother volumes as modified by B.Guerzoni
1119// to remove overlaps/extrusions in case of aligned TOF SMs
1120//
1121 ptrd1[0] = 62.2500;
1122 ptrd1[1] = 64.25;
1123 ptrd1[2] = 372.6;
1124 ptrd1[3] = 14.525/2;
1125 char nameChA[16];
1126 snprintf(nameChA, 16, "BTOFA");
1127 TGeoTrd1 *trd1=new TGeoTrd1(nameChA,ptrd1[0],ptrd1[1],ptrd1[2],ptrd1[3]);
1128 trd1->SetName("BTOFA"); // just to avoid a warning
1129 char nameChB[16];
1130 snprintf(nameChB, 16, "BTOFB");
1131 TGeoBBox *box1 = new TGeoBBox(nameChB,64.25 ,372.6, 14.525/2);
1132 box1->SetName("BTOFB"); // just to avoid a warning
1133 TGeoTranslation *tr1 = new TGeoTranslation("trnsl1",0, 0, -14.525/2 );
1134 tr1->RegisterYourself();
1135 TGeoTranslation *tr2 = new TGeoTranslation("trnsl2",0, 0, +14.525/2 );
1136 tr2->RegisterYourself();
1137 TGeoCompositeShape *btofcs =new TGeoCompositeShape("Btofcs","(BTOFA:trnsl1)+(BTOFB:trnsl2)");
1138
1139
1140 for (i = 0; i < 18; i++) {
1141 char nameCh[16];
1142 snprintf(nameCh, 16, "BTOF%d",i);
1143 char nameMo[16];
1144 snprintf(nameMo, 16, "BSEGMO%d",i);
1145 TGeoVolume* btf = new TGeoVolume(nameCh, btofcs, gGeoManager->GetMedium("FRAME_Air"));
1146 btf->SetName(nameCh);
1147 gGeoManager->GetVolume(nameCh)->SetVisibility(kFALSE);
1148 TVirtualMC::GetMC()->Gspos(nameCh, 1, nameMo, 0., 0., 43.525, 0, "ONLY");
1149 }
1150//
1151// Geometry of Rails starts here
1152//
1153//
1154//
1155// Rails for space-frame
1156//
1157 Float_t rbox[3];
1158
1159 rbox[0] = 25.00;
1160 rbox[1] = 27.50;
1161 rbox[2] = 600.00;
1162 TVirtualMC::GetMC()->Gsvolu("BRS1", "BOX", kAir, rbox, 3);
1163
1164 rbox[0] = 25.00;
1165 rbox[1] = 3.75;
1166 TVirtualMC::GetMC()->Gsvolu("BRS2", "BOX", kSteel, rbox, 3);
1167
1168 rbox[0] = 3.00;
1169 rbox[1] = 20.00;
1170 TVirtualMC::GetMC()->Gsvolu("BRS3", "BOX", kSteel, rbox, 3);
1171
1172 TVirtualMC::GetMC()->Gspos("BRS2", 1, "BRS1", 0., -27.5+3.75, 0., 0, "ONLY");
1173 TVirtualMC::GetMC()->Gspos("BRS2", 2, "BRS1", 0., 27.5-3.75, 0., 0, "ONLY");
1174 TVirtualMC::GetMC()->Gspos("BRS3", 1, "BRS1", 0., 0., 0., 0, "ONLY");
1175 TVirtualMC::GetMC()->Gspos("BRS1", 1, "ALIC", -430.-3., -190., 0., 0, "ONLY");
1176 TVirtualMC::GetMC()->Gspos("BRS1", 2, "ALIC", 430.+3., -190., 0., 0, "ONLY");
1177
1178 rbox[0] = 3.0;
1179 rbox[1] = 145./4.;
1180 rbox[2] = 25.0;
1181 TVirtualMC::GetMC()->Gsvolu("BRS4", "BOX", kSteel, rbox, 3);
1182
1183 TVirtualMC::GetMC()->Gspos("BRS4", 1, "ALIC", 430.+3., -190.+55./2.+rbox[1], 224., 0, "ONLY");
1184 TVirtualMC::GetMC()->Gspos("BRS4", 2, "ALIC", 430.+3., -190.+55./2.+rbox[1], -224., 0, "ONLY");
1185// TVirtualMC::GetMC()->Gspos("BRS4", 3, "ALIC", -430.+3, -180.+55./2.+rbox[1], 224., 0, "ONLY");
1186// TVirtualMC::GetMC()->Gspos("BRS4", 4, "ALIC", -430.+3, -180.+55./2.+rbox[1], -224., 0, "ONLY");
1187
1188
1189
1190 //
1191 // The Backframe
1192 //
1193 // Inner radius
1194 Float_t kBFMRin = 270.0;
1195 // Outer Radius
1196 Float_t kBFMRou = 417.5;
1197 // Width
1198 Float_t kBFMdz = 118.0;
1199 //
1200 //
1201 // Rings
1202 Float_t kBFRdr = 7.5;
1203 Float_t kBFRdz = 8.0;
1204 //
1205 //
1206 // Bars and Spokes
1207 //
1208 Float_t kBFBd = 8.0;
1209 Float_t kBFBdd = 0.6;
1210
1211
1212 // The Mother volume
1213 Float_t tpar[3];
1214 tpar[0] = kBFMRin;
1215 tpar[1] = kBFMRou;
1216 tpar[2] = kBFMdz / 2.;
1217 TVirtualMC::GetMC()->Gsvolu("BFMO", "TUBE", kAir, tpar, 3);
1218
1219 // CBL ////////////////////////////////////////////////////////
1220 //
1221 // TRD mother volume
1222 //
1223
1224 ptrd1[0] = 47.4405 - 0.3;
1225 ptrd1[1] = 61.1765 - 0.3;
1226 ptrd1[2] = kBFMdz / 2.;
1227 ptrd1[3] = 38.95;
1228 TVirtualMC::GetMC()->Gsvolu("BFTRD", "TRD1", kAir, ptrd1, 4);
1229 gGeoManager->GetVolume("BFTRD")->SetVisibility(kFALSE);
1230
1231 for (i = 0; i < 18; i++) {
1232
1233 Float_t phiBF = i * 20.0;
1234 dx = TMath::Sin(phiBF*kdeg2rad)*(342.0-12.62);
1235 dy = -TMath::Cos(phiBF*kdeg2rad)*(342.0-12.62);
1236 TVirtualMC::GetMC()->Gspos("BFTRD",i,"BFMO",dx,dy,0.0,idrotm[2034+i],"ONLY");
1237
1238 }
1239
1240 // CBL ////////////////////////////////////////////////////////
1241
1242 // Rings
1243 //
1244 // Inner Ring
1245 tpar[0] = kBFMRin;
1246 tpar[1] = tpar[0] + kBFRdr;
1247 tpar[2] = kBFRdz / 2.;
1248
1249 TVirtualMC::GetMC()->Gsvolu("BFIR", "TUBE", kSteel, tpar, 3);
1250
1251 tpar[0] = tpar[0] + kBFBdd;
1252 tpar[1] = tpar[1] - kBFBdd;
1253 tpar[2] = (kBFRdz - 2. * kBFBdd) / 2.;
1254
1255 TVirtualMC::GetMC()->Gsvolu("BFII", "TUBE", kAir, tpar, 3);
1256 TVirtualMC::GetMC()->Gspos("BFII", 1, "BFIR", 0., 0., 0., 0, "ONLY");
1257
1258 //
1259 // Outer RING
1260 tpar[0] = kBFMRou - kBFRdr + 0.1;
1261 tpar[1] = kBFMRou;
1262 tpar[2] = kBFRdz / 2.;
1263
1264 TVirtualMC::GetMC()->Gsvolu("BFOR", "TUBE", kSteel, tpar, 3);
1265
1266 tpar[0] = tpar[0] + kBFBdd;
1267 tpar[1] = tpar[1] - kBFBdd;
1268 tpar[2] = (kBFRdz - 2. * kBFBdd) / 2.;
1269
1270 TVirtualMC::GetMC()->Gsvolu("BFOO", "TUBE", kAir, tpar, 3);
1271 TVirtualMC::GetMC()->Gspos("BFOO", 1, "BFOR", 0., 0., 0., 0, "ONLY");
1272
1273
1274 dz = kBFMdz/2. - kBFRdz / 2.;
1275 TVirtualMC::GetMC()->Gspos("BFIR", 1, "BFMO", 0., 0., dz, 0, "ONLY");
1276 TVirtualMC::GetMC()->Gspos("BFIR", 2, "BFMO", 0., 0., -dz, 0, "ONLY");
1277 TVirtualMC::GetMC()->Gspos("BFOR", 1, "BFMO", 0., 0., dz, 0, "ONLY");
1278 TVirtualMC::GetMC()->Gspos("BFOR", 2, "BFMO", 0., 0., -dz, 0, "ONLY");
1279
1280 //
1281 // Longitudinal Bars
1282 //
1283 Float_t bpar[3];
1284
1285 bpar[0] = kBFBd/2;
1286 bpar[1] = bpar[0];
1287 bpar[2] = kBFMdz/2. - kBFBd;
1288 TVirtualMC::GetMC()->Gsvolu("BFLB", "BOX ", kSteel, bpar, 3);
1289
1290 bpar[0] = bpar[0] - kBFBdd;
1291 bpar[1] = bpar[1] - kBFBdd;
1292 bpar[2] = bpar[2] - kBFBdd;
1293 TVirtualMC::GetMC()->Gsvolu("BFLL", "BOX ", kAir, bpar, 3);
1294 TVirtualMC::GetMC()->Gspos("BFLL", 1, "BFLB", 0., 0., 0., 0, "ONLY");
1295
1296 for (i = 0; i < 18; i++)
1297 {
1298 Float_t ro = kBFMRou - kBFBd / 2. - 0.02;
1299 Float_t ri = kBFMRin + kBFBd / 2.;
1300
1301 Float_t phi0 = Float_t(i) * 20.;
1302
1303 Float_t xb = ri * TMath::Cos(phi0 * kDegrad);
1304 Float_t yb = ri * TMath::Sin(phi0 * kDegrad);
1305 AliMatrix(idrotm[2090+i], 90.0, phi0, 90.0, phi0 + 270., 0., 0.);
1306
1307 TVirtualMC::GetMC()->Gspos("BFLB", i + 1, "BFMO", xb, yb, 0., idrotm[2090 + i], "ONLY");
1308
1309 xb = ro * TMath::Cos(phi0 * kDegrad);
1310 yb = ro * TMath::Sin(phi0 * kDegrad);
1311
1312 TVirtualMC::GetMC()->Gspos("BFLB", i + 19, "BFMO", xb, yb, 0., idrotm[2090 +i], "ONLY");
1313 }
1314
1315 //
1316 // Radial Bars
1317 //
1318 bpar[0] = (kBFMRou - kBFMRin - 2. * kBFRdr) / 2.;
1319 bpar[1] = kBFBd/2;
1320 bpar[2] = bpar[1];
1321 //
1322 // Avoid overlap with circle
1323 Float_t rr = kBFMRou - kBFRdr;
1324 Float_t delta = rr - TMath::Sqrt(rr * rr - kBFBd * kBFBd / 4.) + 0.01;
1325 bpar[0] -= delta /2.;
1326
1327
1328 TVirtualMC::GetMC()->Gsvolu("BFRB", "BOX ", kSteel, bpar, 3);
1329
1330 bpar[0] = bpar[0] - kBFBdd;
1331 bpar[1] = bpar[1] - kBFBdd;
1332 bpar[2] = bpar[2] - kBFBdd;
1333 TVirtualMC::GetMC()->Gsvolu("BFRR", "BOX ", kAir, bpar, 3);
1334 TVirtualMC::GetMC()->Gspos("BFRR", 1, "BFRB", 0., 0., 0., 0, "ONLY");
1335
1336 Int_t iphi[10] = {0, 1, 3, 6, 8, 9, 10, 12, 15, 17};
1337
1338 for (i = 0; i < 10; i++)
1339 {
1340
1341 Float_t rb = (kBFMRin + kBFMRou)/2.;
1342 Float_t phib = Float_t(iphi[i]) * 20.;
1343
1344 Float_t xb = rb * TMath::Cos(phib * kDegrad);
1345 Float_t yb = rb * TMath::Sin(phib * kDegrad);
1346
1347 TVirtualMC::GetMC()->Gspos("BFRB", i + 1, "BFMO", xb, yb, dz, idrotm[2034 + iphi[i]], "ONLY");
1348 TVirtualMC::GetMC()->Gspos("BFRB", i + 11, "BFMO", xb, yb, -dz, idrotm[2034 + iphi[i]], "ONLY");
1349
1350 }
1351
1352 TVirtualMC::GetMC()->Gspos("BFMO", i + 19, "ALIC", 0, 0, - 376. - kBFMdz/2. - 0.5 , 0, "ONLY");
1353
1354
1355
1356//
1357//
1358// The Baby Frame
1359//
1360//
1361 //
1362 // Inner radius
1363 Float_t kBBMRin = 278.0;
1364 // Outer Radius
1365 Float_t kBBMRou = 410.5;
1366 // Width
1367 Float_t kBBMdz = 223.0;
1368 Float_t kBBBdz = 6.0;
1369 Float_t kBBBdd = 0.6;
1370
1371
1372 // The Mother volume
1373
1374 ppgon[0] = 0.;
1375 ppgon[1] = 360.;
1376 ppgon[2] = 18.;
1377
1378 ppgon[3] = 2.;
1379 ppgon[4] = -kBBMdz / 2. ;
1380 ppgon[5] = kBBMRin;
1381 ppgon[6] = kBBMRou;
1382
1383 ppgon[7] = -ppgon[4];
1384 ppgon[8] = ppgon[5];
1385 ppgon[9] = ppgon[6];
1386
1387 TVirtualMC::GetMC()->Gsvolu("BBMO", "PGON", kAir, ppgon, 10);
1388 TVirtualMC::GetMC()->Gsdvn("BBCE", "BBMO", 18, 2);
1389
1390 // CBL ////////////////////////////////////////////////////////
1391 //
1392 // TRD mother volume
1393 //
1394
1395 AliMatrix(idrotm[2092], 90.0, 90.0, 0.0, 0.0, 90.0, 0.0);
1396
1397 ptrd1[0] = 47.4405 - 2.5;
1398 ptrd1[1] = 61.1765 - 2.5;
1399 ptrd1[2] = kBBMdz / 2.;
1400 ptrd1[3] = 38.95;
1401 TVirtualMC::GetMC()->Gsvolu("BBTRD", "TRD1", kAir, ptrd1, 4);
1402 gGeoManager->GetVolume("BBTRD")->SetVisibility(kFALSE);
1403 TVirtualMC::GetMC()->Gspos("BBTRD", 1, "BBCE", 342.0-12.62, 0.0, 0.0, idrotm[2092], "ONLY");
1404
1405 // CBL ////////////////////////////////////////////////////////
1406
1407 // Longitudinal bars
1408 bpar[0] = kBBBdz/2.;
1409 bpar[1] = bpar[0];
1410 bpar[2] = kBBMdz/2. - kBBBdz;
1411 TVirtualMC::GetMC()->Gsvolu("BBLB", "BOX ", kSteel, bpar, 3);
1412 bpar[0] -= kBBBdd;
1413 bpar[1] -= kBBBdd;
1414 bpar[2] -= kBBBdd;
1415 TVirtualMC::GetMC()->Gsvolu("BBLL", "BOX ", kAir, bpar, 3);
1416 TVirtualMC::GetMC()->Gspos("BBLL", 1, "BBLB", 0., 0., 0., 0, "ONLY");
1417
1418 dx = kBBMRin + kBBBdz/2. + (bpar[1] + kBBBdd) * TMath::Sin(10. * kDegrad);
1419 dy = dx * TMath::Tan(10. * kDegrad) - kBBBdz/2./TMath::Cos(10. * kDegrad);
1420 TVirtualMC::GetMC()->Gspos("BBLB", 1, "BBCE", dx, dy, 0., idrotm[2052], "ONLY");
1421
1422 dx = kBBMRou - kBBBdz/2. - (bpar[1] + kBBBdd) * TMath::Sin(10. * kDegrad);
1423 dy = dx * TMath::Tan(10. * kDegrad) - kBBBdz/2./TMath::Cos(10. * kDegrad);
1424
1425 TVirtualMC::GetMC()->Gspos("BBLB", 2, "BBCE", dx, dy, 0., idrotm[2052], "ONLY");
1426
1427 //
1428 // Radial Bars
1429 //
1430 bpar[0] = (kBBMRou - kBBMRin) / 2. - kBBBdz;
1431 bpar[1] = kBBBdz/2;
1432 bpar[2] = bpar[1];
1433
1434 TVirtualMC::GetMC()->Gsvolu("BBRB", "BOX ", kSteel, bpar, 3);
1435 bpar[0] -= kBBBdd;
1436 bpar[1] -= kBBBdd;
1437 bpar[2] -= kBBBdd;
1438 TVirtualMC::GetMC()->Gsvolu("BBRR", "BOX ", kAir, bpar, 3);
1439 TVirtualMC::GetMC()->Gspos("BBRR", 1, "BBRB", 0., 0., 0., 0, "ONLY");
1440
1441
1442 dx = (kBBMRou + kBBMRin) / 2.;
1443 dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad);
1444 dz = kBBMdz/2. - kBBBdz / 2.;
1445
1446 TVirtualMC::GetMC()->Gspos("BBRB", 1, "BBCE", dx, dy, dz, idrotm[2052], "ONLY");
1447 TVirtualMC::GetMC()->Gspos("BBRB", 2, "BBCE", dx, dy, - dz, idrotm[2052], "ONLY");
1448 TVirtualMC::GetMC()->Gspos("BBRB", 3, "BBCE", dx, dy, 0., idrotm[2052], "ONLY");
1449
1450 //
1451 // Circular bars
1452 //
1453 // Inner
1454
1455 bpar[1] = kBBMRin * TMath::Sin(10. * kDegrad);
1456 bpar[0] = kBBBdz/2;
1457 bpar[2] = bpar[0];
1458 TVirtualMC::GetMC()->Gsvolu("BBC1", "BOX ", kSteel, bpar, 3);
1459 bpar[0] -= kBBBdd;
1460 bpar[1] -= kBBBdd;
1461 bpar[2] -= kBBBdd;
1462 TVirtualMC::GetMC()->Gsvolu("BBC2", "BOX ", kAir, bpar, 3);
1463 TVirtualMC::GetMC()->Gspos("BBC2", 1, "BBC1", 0., 0., 0., 0, "ONLY");
1464 dx = kBBMRin + kBBBdz/2;
1465 dy = 0.;
1466 TVirtualMC::GetMC()->Gspos("BBC1", 1, "BBCE", dx, dy, dz, 0, "ONLY");
1467 TVirtualMC::GetMC()->Gspos("BBC1", 2, "BBCE", dx, dy, -dz, 0, "ONLY");
1468 //
1469 // Outer
1470 bpar[1] = (kBBMRou - kBBBdz) * TMath::Sin(10. * kDegrad);
1471 bpar[0] = kBBBdz/2;
1472 bpar[2] = bpar[0];
1473 TVirtualMC::GetMC()->Gsvolu("BBC3", "BOX ", kSteel, bpar, 3);
1474 bpar[0] -= kBBBdd;
1475 bpar[1] -= kBBBdd;
1476 bpar[2] -= kBBBdd;
1477 TVirtualMC::GetMC()->Gsvolu("BBC4", "BOX ", kAir, bpar, 3);
1478 TVirtualMC::GetMC()->Gspos("BBC4", 1, "BBC3", 0., 0., 0., 0, "ONLY");
1479 dx = kBBMRou - kBBBdz/2;
1480 dy = 0.;
1481 TVirtualMC::GetMC()->Gspos("BBC3", 1, "BBCE", dx, dy, dz, 0, "ONLY");
1482 TVirtualMC::GetMC()->Gspos("BBC3", 2, "BBCE", dx, dy, - dz, 0, "ONLY");
1483 //
1484 // Diagonal Bars
1485 //
1486 h = (kBBMRou - kBBMRin - 2. * kBBBdz);;
1487 d = kBBBdz;
1488 dz = kBBMdz/2. - 1.6 * kBBBdz;
1489 dq = h*h+dz*dz;
1490
1491 x = TMath::Sqrt((dz*dz-d*d)/dq + d*d*h*h/dq/dq)+d*h/dq;
1492
1493
1494 theta = kRaddeg * TMath::ACos(x);
1495
1496 ptrap[0] = dz/2.;
1497 ptrap[1] = theta;
1498 ptrap[2] = 0.;
1499 ptrap[3] = d/2;
1500 ptrap[4] = d/x/2;
1501 ptrap[5] = ptrap[4];
1502 ptrap[6] = 0;
1503 ptrap[7] = ptrap[3];
1504 ptrap[8] = ptrap[4];
1505 ptrap[9] = ptrap[4];
1506 ptrap[10] = 0;
1507 TVirtualMC::GetMC()->Gsvolu("BBD1", "TRAP", kSteel, ptrap, 11);
1508 ptrap[3] = d/2-kBBBdd;
1509 ptrap[4] = (d/2-kBBBdd)/x;
1510 ptrap[5] = ptrap[4];
1511 ptrap[7] = ptrap[3];
1512 ptrap[8] = ptrap[4];
1513 ptrap[9] = ptrap[4];
1514 TVirtualMC::GetMC()->Gsvolu("BBD3", "TRAP", kAir, ptrap, 11);
1515 TVirtualMC::GetMC()->Gspos("BBD3", 1, "BBD1", 0.0, 0.0, 0., 0, "ONLY");
1516 dx = (kBBMRou + kBBMRin) / 2.;
1517 dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad);
1518 TVirtualMC::GetMC()->Gspos("BBD1", 1, "BBCE", dx, dy, dz/2. + kBBBdz/2., idrotm[2052], "ONLY");
1519
1520
1521 ptrap[0] = dz/2.;
1522 ptrap[1] = -theta;
1523 ptrap[2] = 0.;
1524 ptrap[3] = d/2;
1525 ptrap[4] = d/2/x;
1526 ptrap[5] = ptrap[4];
1527 ptrap[6] = 0;
1528 ptrap[7] = ptrap[3];
1529 ptrap[8] = ptrap[4];
1530 ptrap[9] = ptrap[4];
1531 ptrap[10] = 0;
1532 TVirtualMC::GetMC()->Gsvolu("BBD2", "TRAP", kSteel, ptrap, 11);
1533 ptrap[3] = d/2-kBBBdd;
1534 ptrap[4] = (d/2-kBBBdd)/x;
1535 ptrap[5] = ptrap[4];
1536 ptrap[7] = ptrap[3];
1537 ptrap[8] = ptrap[4];
1538 ptrap[9] = ptrap[4];
1539 TVirtualMC::GetMC()->Gsvolu("BBD4", "TRAP", kAir, ptrap, 11);
1540 TVirtualMC::GetMC()->Gspos("BBD4", 1, "BBD2", 0.0, 0.0, 0., 0, "ONLY");
1541 dx = (kBBMRou + kBBMRin) / 2.;
1542 dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad);
1543 TVirtualMC::GetMC()->Gspos("BBD2", 1, "BBCE", dx, dy, -dz/2. - kBBBdz/2., idrotm[2052], "ONLY");
1544
1545
1546 TVirtualMC::GetMC()->Gspos("BBMO", 1, "ALIC", 0., 0., + 376. + kBBMdz / 2. + 0.5, 0, "ONLY");
1547
1548
1549}
1550
1551//___________________________________________
1552void AliFRAMEv3::AddAlignableVolumes() const
1553{
1554 // Add the 18 spaceframe sectors as alignable volumes
1555 TString basesymname("FRAME/Sector");
1556 TString basevolpath("ALIC_1/B077_1/BSEGMO");
1557 TString symname;
1558 TString volpath;
1559
1560 for(Int_t sec=0; sec<18; sec++)
1561 {
1562 symname = basesymname;
1563 symname += sec;
1564 volpath = basevolpath;
1565 volpath += sec;
1566 volpath += "_1";
1567 if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data()))
1568 AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",
1569 symname.Data(),volpath.Data()));
1570 }
1571}
1572
1573//___________________________________________
1574void AliFRAMEv3::CreateMaterials()
1575{
1576 // Creates the materials
1577 Float_t epsil, stemax, tmaxfd, deemax, stmin;
1578
1579 epsil = 1.e-4; // Tracking precision,
1580 stemax = -0.01; // Maximum displacement for multiple scat
1581 tmaxfd = -20.; // Maximum angle due to field deflection
1582 deemax = -.3; // Maximum fractional energy loss, DLS
1583 stmin = -.8;
1584 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
1585 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
1586
1587
1588 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
1589 Float_t zsteel[4] = { 26.,24.,28.,14. };
1590 Float_t wsteel[4] = { .715,.18,.1,.005 };
1591
1592 //Air
1593
1594 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
1595 Float_t zAir[4]={6.,7.,8.,18.};
1596 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
1597 Float_t dAir = 1.20479E-3;
1598
a9bfe689 1599 // G10
1600 // G10 60% SiO2 40% epoxy
1601 Float_t ag10[4]= {12.01, 1., 15.994, 28.086};
1602 Float_t zg10[4] = { 6., 1., 8., 14.};
1603 Float_t wg10[4] = {0.194, 0.023, 0.443, 0.340};
1604
1605
1606 AliMixture(22, "G10", ag10, zg10, 1.7 , 4, wg10);
1607
87829bcb 1608 AliMixture(65, "STEEL$", asteel, zsteel, 7.88, 4, wsteel);
1609 AliMixture(5, "AIR$ ", aAir, zAir, dAir,4, wAir);
b9c35690 1610 AliMaterial(9, "ALU ", 26.98, 13., 2.7, 8.9, 37.2);
1611
87829bcb 1612 AliMedium(65, "Steel", 65, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
b9c35690 1613 AliMedium( 5, "Air", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
1614 AliMedium( 9, "Aluminum", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
a9bfe689 1615 AliMedium(22, "G10", 22, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
b9c35690 1616
1617}
1618
1619//_____________________________________________________________________________
1620void AliFRAMEv3::Init()
1621{
1622 //
1623 // Initialise the module after the geometry has been defined
1624 //
1625 if(AliLog::GetGlobalDebugLevel()>0) {
1626 printf("%s: **************************************"
1627 " FRAME "
1628 "**************************************\n",ClassName());
1629 printf("\n%s: Version 2 of FRAME initialised, symmetric FRAME\n\n",ClassName());
1630 printf("%s: **************************************"
1631 " FRAME "
1632 "**************************************\n",ClassName());
1633 }
1634//
1635// The reference volume id
1636 fRefVolumeId1 = TVirtualMC::GetMC()->VolId("BREF1");
1637 fRefVolumeId2 = TVirtualMC::GetMC()->VolId("BREF2");
1638}
1639
1640Int_t AliFRAMEv3::IsVersion() const
1641{
1642 // Returns the version of the FRAME (1 if no holes, 0 otherwise)
1643 Int_t version = 0;
1644 if (fHoles == 0) version = 1;
1645 return version;
1646}
1647
1648void AliFRAMEv3::StepManager()
1649{
1650//
1651// Stepmanager of AliFRAMEv3.cxx
1652// Used for recording of reference tracks entering the spaceframe mother volume
1653//
1654 Int_t copy, id;
1655
1656 //
1657 // Only charged tracks
1658 if( !(TVirtualMC::GetMC()->TrackCharge()) ) return;
1659 //
1660 // Only tracks entering mother volume
1661 //
1662
1663 id=TVirtualMC::GetMC()->CurrentVolID(copy);
1664
1665 if ((id != fRefVolumeId1) && (id != fRefVolumeId2)) return;
1666 if(!TVirtualMC::GetMC()->IsTrackEntering()) return;
1667 //
1668 // Add the reference track
1669 //
1670 AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kFRAME);
1671}
1672
1673
1674
1675void AliFRAMEv3::MakeHeatScreen(const char* name, Float_t dyP, Int_t rot1, Int_t rot2)
1676{
1677 // Heat screen panel
1678 //
1679 Int_t *idtmed = fIdtmed->GetArray()-1999;
1680 const Int_t kAir = idtmed[2004];
1681 const Int_t kAlu = idtmed[2008];
1682
1683 Float_t dx, dy;
1684 char mname[16];
1685 char cname [16];
1686 char t1name[16];
1687 char t2name[16];
1688 char t3name[16];
1689 char t4name[16];
1690 char t5name[16];
1691
1692 //
1693 Float_t dxP = 2. * (287. * TMath::Sin(10.* TMath::Pi()/180.) - 2.);
1694 Float_t dzP = 1.05;
1695 //
1696 // Mother volume
1697 Float_t thshM[3];
1698 thshM[0] = dxP / 2.;
1699 thshM[1] = dyP / 2.;
1700 thshM[2] = dzP / 2.;
1701 snprintf(mname, 16, "BTSH_%s", name);
1702 TVirtualMC::GetMC()->Gsvolu(mname, "BOX ", kAir, thshM, 3);
1703 //
1704 // Aluminum sheet
1705 thshM[2] = 0.025;
1706 snprintf(cname, 16, "BTSHA_%s", name);
1707 TVirtualMC::GetMC()->Gsvolu(cname, "BOX ", kAlu, thshM, 3);
1708 TVirtualMC::GetMC()->Gspos(cname, 1, mname, 0., 0., -0.5, 0);
1709 //
1710 // Tubes
1711 Float_t thshT[3];
1712 thshT[0] = 0.4;
1713 thshT[1] = 0.5;
1714 thshT[2] = (dyP / 2. - 8.);
1715 //
1716 snprintf(t1name, 16, "BTSHT1_%s", name);
1717 TVirtualMC::GetMC()->Gsvolu(t1name, "TUBE", kAlu, thshT, 3);
1718 dx = - dxP / 2. + 8. - 0.5;
1719 TVirtualMC::GetMC()->Gspos(t1name, 1, mname, dx, 0., 0.025, rot1);
1720 //
1721 snprintf(t2name, 16, "BTSHT2_%s", name);
1722 snprintf(t3name, 16, "BTSHT3_%s", name);
1723 snprintf(t4name, 16, "BTSHT4_%s", name);
1724 snprintf(t5name, 16, "BTSHT5_%s", name);
1725 thshT[2] = (thshM[1] - 12.);
1726 TVirtualMC::GetMC()->Gsvolu(t2name, "TUBE", kAlu, thshT, 3);
1727 thshT[2] = 7.9/2.;
1728 TVirtualMC::GetMC()->Gsvolu(t3name, "TUBE", kAlu, thshT, 3);
1729 thshT[2] = 23.9/2.;
1730 TVirtualMC::GetMC()->Gsvolu(t4name, "TUBE", kAlu, thshT, 3);
1731
1732 Int_t sig = 1;
1733 Int_t ipo = 1;
1734 for (Int_t i = 0; i < 5; i++) {
1735 sig *= -1;
1736 dx += 8.00;
1737 dy = 4. * sig;
1738 Float_t dy1 = - (thshM[1] - 15.5) * sig;
1739 Float_t dy2 = - (thshM[1] - 7.5) * sig;
1740
1741 TVirtualMC::GetMC()->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1);
1742 dx += 6.9;
1743 TVirtualMC::GetMC()->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1);
1744
1745 TVirtualMC::GetMC()->Gspos(t3name, i+1, mname, dx - 3.45, dy1, 0.025, rot2);
1746 TVirtualMC::GetMC()->Gspos(t4name, i+1, mname, dx - 3.45, dy2, 0.025, rot2);
1747 }
1748 dx += 8.;
1749 TVirtualMC::GetMC()->Gspos(t1name, 2, mname, dx, 0., 0.025, rot1);
1750 TVirtualMC::GetMC()->Gspos(t3name, 6, mname, dx - 3.45, -(thshM[1] - 7.5), 0.025, rot2);
1751}
1752
1753
1754
1755void AliFRAMEv3::WebFrame(const char* name, Float_t dHz, Float_t theta0, Float_t phi0)
1756{
1757 //
1758 // Create a web frame element
1759 //
1760 phi0 = 0.;
1761 Int_t *idtmed = fIdtmed->GetArray()-1999;
1762 const Float_t krad2deg = 180. / TMath::Pi();
1763 const Float_t kdeg2rad = 1. / krad2deg;
1764 const Int_t kAir = idtmed[2004];
1765 const Int_t kSteel = idtmed[2064];
1766
1767 Float_t ptrap[11];
1768 char nameA[16];
1769 snprintf(nameA, 16, "%sA", name );
1770
1771 char nameI[16];
1772 snprintf(nameI, 16, "%sI", name );
1773
1774 theta0 *= kdeg2rad;
1775 phi0 *= kdeg2rad;
1776 // Float_t theta = TMath::ATan(TMath::Tan(theta0)/TMath::Sin(phi0));
1777 Float_t theta = TMath::Pi()/2.;
1778 Float_t phi = TMath::ACos(TMath::Cos(theta0) * TMath::Cos(phi0));
1779
1780 if (phi0 < 0) phi = -phi;
1781
1782 phi *= krad2deg;
1783 theta *= krad2deg;
1784
1785 ptrap[0] = dHz/2;
1786 ptrap[2] = theta;
1787 ptrap[1] = phi;
1788 ptrap[3] = 6./cos(theta0 * kdeg2rad)/2.;
1789 ptrap[4] = 1.;
1790 ptrap[5] = ptrap[4];
1791 ptrap[6] = 0;
1792 ptrap[7] = ptrap[3];
1793 ptrap[8] = ptrap[4];
1794 ptrap[9] = ptrap[4];
1795 ptrap[10] = 0;
1796 TVirtualMC::GetMC()->Gsvolu(name, "TRAP", kSteel, ptrap, 11);
1797 TVirtualMC::GetMC()->Gsvolu(nameI, "TRAP", kSteel, ptrap, 11);
1798 ptrap[3] = (6. - 1.)/cos(theta0 * kdeg2rad)/2.;
1799 ptrap[4] = 0.75;
1800 ptrap[5] = ptrap[4];
1801 ptrap[7] = ptrap[3];
1802 ptrap[8] = ptrap[4];
1803 ptrap[9] = ptrap[4];
1804
1805 TVirtualMC::GetMC()->Gsvolu(nameA, "TRAP", kAir, ptrap, 11);
1806 TVirtualMC::GetMC()->Gspos(nameA, 1, name, -0.25, 0.0, 0., 0, "ONLY");
1807 TVirtualMC::GetMC()->Gspos(nameA, 2, nameI, +0.25, 0.0, 0., 0, "ONLY");
a9bfe689 1808 gGeoManager->GetVolume(name)->SetVisContainers();;
1809 gGeoManager->GetVolume(nameI)->SetVisContainers();;
b9c35690 1810}
1811