New K0 Analysis
[u/mrichter/AliRoot.git] / STRUCT / AliHALLv3.cxx
CommitLineData
257726e6 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// //
20// Experimental Hall //
21// This class contains the description of the experimental hall //
22// and the shielding blocks. //
23// Author: Andreas Morsch //
24// andreas.morsch@cern.ch //
25// //
26///////////////////////////////////////////////////////////////////////////////
27
28#include <TVirtualMC.h>
29
30#include "AliConst.h"
31#include "AliHALLv3.h"
32#include "AliMagF.h"
33#include "AliRun.h"
34#include "AliLog.h"
5b37b1dd 35#include "AliMC.h"
36#include "AliTrackReference.h"
257726e6 37#include <TGeoVolume.h>
38#include <TGeoManager.h>
39#include <TGeoMatrix.h>
40#include <TGeoCompositeShape.h>
41#include <TGeoBBox.h>
42#include <TGeoTube.h>
43#include <TGeoPgon.h>
44#include <TGeoPcon.h>
45#include <TGeoCone.h>
46#include <TGeoTrd1.h>
47#include <TGeoArb8.h>
48
49ClassImp(AliHALL)
50
51//_____________________________________________________________________________
5b37b1dd 52AliHALLv3::AliHALLv3() : fNewShield24(0), fRefVolumeId(-1), fScoring(0)
257726e6 53{
54 //
55 // Default constructor for the experimental Hall
56 //
57}
58
59//_____________________________________________________________________________
60AliHALLv3::AliHALLv3(const char *name, const char *title)
5b37b1dd 61 : AliHALL(name,title), fNewShield24(0), fRefVolumeId(-1), fScoring(0)
257726e6 62{
63 //
64 // Standard constructor for the experimental Hall
65 //
66
67}
68
69//_____________________________________________________________________________
70void AliHALLv3::CreateGeometry()
71{
72 //
73 // Create the geometry of the exprimental hall
74 //
75 Float_t r2, dy;
76 Float_t phid, phim, h, r;
77 Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
78 Float_t hullen;
79 Float_t phi;
80
81 // The top volume
82 //
83 TGeoVolume* top = gGeoManager->GetVolume("ALIC");
84 TGeoVolumeAssembly* asHall = new TGeoVolumeAssembly("HALL");
85
86 // Rotations
87 // rotation by 90 deg in the y-z plane
a8241b4f 88 TGeoRotation* rot000 = new TGeoRotation("rot000", 90., 0.,180., 0., 90., 90.);
89 TGeoRotation* rot001 = new TGeoRotation("rot001", 270., 0., 90., 90., 180., 0.);
257726e6 90
91 // Materials
92 TGeoMedium* kMedCC = gGeoManager->GetMedium("HALL_CC_C2");
93 TGeoMedium* kMedST = gGeoManager->GetMedium("HALL_STST_C2");
ffb3970c 94 TGeoMedium* kMedAir = gGeoManager->GetMedium("HALL_AIR_C2");
ffb3970c 95
257726e6 96 // Floor thickness
97 Float_t dyFloor = 190.;
98 // Floor width
99 Float_t dxFloor = 1400.;
100 // Floor level
101 Float_t yFloor = -801.;
102 // Pit centre
103 Float_t zPit = 2300.;
104 // Pit radius
105 Float_t rPit = 1140.;
106 // Hall end
107 Float_t zHall24 = 1700.;
108 Float_t zHall26 = 1900.;
109 // Overlap between hall and pit radius
110 Float_t oPit = zHall24 - (zPit - rPit);
111 // Length of the L3 floor
112 Float_t dzL3 = 1700.;
113 // Start of hall roof in y
114 Float_t yHall = 500.;
115 // Radius of the hall roof
116 Float_t rHall = 1070.;
117 //
118 Float_t epsBig = 100.;
119 Float_t epsSmall = 1.;
120
121
122
123 //
124 // RB24/26 Tunnel Floor
125 r = 220.;
126 h = 140.;
127 phi = TMath::ACos(h / r);
128 xl = r * TMath::Sin(phi);
129 dr = 1600.;
130 dh = dr * TMath::Cos(phi);
131 dl = dr * TMath::Sin(phi);
132 if (gAlice->GetModule("ZDC") == 0) {
133 // No ZDC
134 hullen = 370.;
135 } else {
136
137 // ZDC is present
138 hullen = 6520.;
139 }
140
141 TGeoVolume* voHUFL = new TGeoVolume("HUFL",
142 new TGeoTrd1(xl +dl, xl, hullen, dh / 2.),
143 kMedCC);
144 r2 = hullen + zHall26;
2787cdf0 145 asHall->AddNode(voHUFL, 1, new TGeoCombiTrans(70., -100. - dh / 2., -r2 - 0.755, rot000));
ffb3970c 146
257726e6 147 //
148 // RB24/26 wall
ffb3970c 149 phid = phi * kRaddeg;
257726e6 150 TGeoVolume* voHUWA = new TGeoVolume("HUWA",
4cb05f41 151 new TGeoTubeSeg(r, r+dr, hullen, phid - 90. + 0.002, 270. - phid - 0.002),
257726e6 152 kMedCC);
4cb05f41 153 asHall->AddNode(voHUWA, 1, new TGeoTranslation(70., 40., -zHall26 - hullen + 0.002 ));
257726e6 154 //
ffb3970c 155 // Air inside tunnel
156 TGeoTube* shHUWAT1 = new TGeoTube(0., r, hullen);
157 shHUWAT1->SetName("shHUWAT1");
158 //
159 // Space for ZDC
160 TGeoBBox* shHUWAT2 = new TGeoBBox(70., 110., hullen + 20.);
161 shHUWAT2->SetName("shHUWAT2");
162 TGeoTranslation* tHUWAT2 = new TGeoTranslation("tHUWAT2", -70., -30., 0.);
163 tHUWAT2->RegisterYourself();
164
165 TGeoBBox* shHUWAT3 = new TGeoBBox(270., 110., hullen + 20.);
166 shHUWAT3->SetName("shHUWAT3");
167 TGeoTranslation* tHUWAT3 = new TGeoTranslation("tHUWAT3", 0., -110. - 140., 0.);
168 tHUWAT3->RegisterYourself();
169
170 TGeoCompositeShape* shHUWAT = new TGeoCompositeShape("HUWAT", "(shHUWAT1-shHUWAT2:tHUWAT2)-shHUWAT3:tHUWAT3");
171 TGeoVolume* voHUWAT = new TGeoVolume("HUWAT", shHUWAT, kMedAir);
2787cdf0 172 asHall->AddNode(voHUWAT, 1, new TGeoTranslation(70., 40., -zHall26 - hullen - 0.755));
ffb3970c 173
174 //
257726e6 175 // Hall floor
176 // RB26 side
177 phid = 16.197;
178 Float_t dzFloor26 = zHall26 - dzL3/2.;
4cb05f41 179 TGeoBBox* shHHF1 = new TGeoBBox(dxFloor/2. + 470., dyFloor/2., dzFloor26/2. - 0.002);
257726e6 180 shHHF1->SetName("shHHF1");
181 TGeoVolume* voHHF1 = new TGeoVolume("HHF1", shHHF1, kMedCC);
182 asHall->AddNode(voHHF1, 2, new TGeoTranslation(0., yFloor, -(dzL3/2. + dzFloor26/2.)));
183 // RB24 side
184 Float_t dzFloor24 = zHall24 - dzL3/2.;
185 TGeoBBox* shHHF41 = new TGeoBBox(dxFloor/2. + 470., dyFloor/2., dzFloor24/2.);
186 shHHF41->SetName("shHHF41");
187 TGeoTube* shHHF42 = new TGeoTube(0., rPit + epsBig, dyFloor/2.);
188 shHHF42->SetName("shHHF42");
189 TGeoCombiTrans* trHHF42 = new TGeoCombiTrans("trHHF42", 0., 0., dzFloor24/2. + rPit - oPit, rot000);
190 trHHF42->RegisterYourself();
191
192 TGeoCompositeShape* shHHF4 = new TGeoCompositeShape("HHF4", "shHHF41+shHHF42:trHHF42");
193 TGeoVolume* voHHF4 = new TGeoVolume("HHF4", shHHF4, kMedCC);
194 asHall->AddNode(voHHF4, 1, new TGeoTranslation(0., yFloor, dzL3/2. + dzFloor24/2.));
195
196
197 //
198 // Hall side walls
199 Float_t trH1 = (1273.78 - dyFloor)/ 2.;
200 Float_t trBL1 = 207.3;
201 Float_t trTL1 = 50.;
202 Float_t trALP1 = TMath::ATan((trBL1 - trTL1) / 2. / trH1) * kRaddeg;
203 dx = 1.5 * trBL1 - 0.5 * trTL1 + dxFloor/2. + dyFloor * TMath::Tan(phid * kDegrad);
204 TGeoVolume* voHHW11 = new TGeoVolume("HHW11",
4cb05f41 205 new TGeoTrap(dzFloor26/2. - 0.002, 0., 0.,
257726e6 206 trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
207 kMedCC);
208 TGeoVolume* voHHW12 = new TGeoVolume("HHW12",
209 new TGeoTrap(dzFloor24/2., 0., 0.,
210 trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
211 kMedCC);
212
213 dy = yFloor + dyFloor/2. + trH1;
214
215 asHall->AddNode(voHHW12, 1, new TGeoTranslation( dx, dy, (dzL3/2. + dzFloor24/2.)));
216 asHall->AddNode(voHHW12, 2, new TGeoCombiTrans (-dx, dy, (dzL3/2. + dzFloor24/2.), rot001));
4cb05f41 217 asHall->AddNode(voHHW11, 1, new TGeoTranslation( dx, dy, -(dzL3/2. + dzFloor26/2.)));
218 asHall->AddNode(voHHW11, 2, new TGeoCombiTrans (-dx, dy, -(dzL3/2. + dzFloor26/2.), rot001));
257726e6 219
220 Float_t boDY = (yHall - (yFloor + dyFloor/2.) - 2. * trH1)/ 2.;
221 Float_t dzHall = zHall26 + zHall24;
222
4cb05f41 223 TGeoVolume* voHBW1 = new TGeoVolume("HBW1", new TGeoBBox(50., boDY, dzHall / 2. - 0.05), kMedCC);
257726e6 224
225 asHall->AddNode(voHBW1, 1, new TGeoTranslation( 1120., yHall - boDY, (zHall24-zHall26)/2.));
226 asHall->AddNode(voHBW1, 2, new TGeoTranslation(-1120., yHall - boDY, (zHall24-zHall26)/2.));
227
228 //
229 // Slanted wall close to L3 magnet
ffb3970c 230 //
257726e6 231 phim = 45.;
232 hm = 790.;
233 am = hm * TMath::Tan(phim / 2. * kDegrad);
234 bm = (hm + 76.) / hm * am;
235 cm = bm * 2. / TMath::Sqrt(2.);
4cb05f41 236 trH1 = (1273.78 - cm) / 2. - 0.002;
257726e6 237 trBL1 = 235. - cm * TMath::Tan(phid * kDegrad) / 2.;
238 trTL1 = 50.;
239 trALP1 = TMath::ATan((trBL1 - trTL1) / 2. / trH1) * kRaddeg;
240
241 w1 = trBL1;
242 dx = cm * TMath::Tan(phid * kDegrad) + dxFloor/2. + trBL1 * 1.5 - trTL1 * .5;
243
244 TGeoVolume* voHHW2 = new TGeoVolume("HHW2",
4cb05f41 245 new TGeoTrap(dzL3/2. - 0.002, 0., 0.,
257726e6 246 trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
247 kMedCC);
248
249 r2 = cm + yFloor - dyFloor/2. + trH1;
250
251 asHall->AddNode(voHHW2, 1, new TGeoTranslation(dx, r2, 0.));
252 asHall->AddNode(voHHW2, 2, new TGeoCombiTrans(-dx, r2, 0., rot001));
253
254 trH1 = cm / 2.;
255 trBL1 = w1 + cm / 2.;
256 trTL1 = w1;
257 trALP1 = TMath::ATan(.5) * kRaddeg;
258 dx = 1170. - trBL1 * .5 - trTL1 * .5;
259
260 TGeoVolume* voHHW3 = new TGeoVolume("HHW3",
261 new TGeoTrap(dzL3/2., 0., 0.,
262 trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
263 kMedCC);
264
265 r2 = trH1 - 896.;
266 asHall->AddNode(voHHW3, 1, new TGeoTranslation( dx, r2, 0.));
267 asHall->AddNode(voHHW3, 2, new TGeoCombiTrans (-dx, r2, 0., rot001));
268 //
269 // Floor L3
270 Float_t dyFloorL3 = 76.;
271 Float_t dx1FloorL3 = rHall + epsBig - 2. * trBL1;
272 Float_t dx2FloorL3 = dx1FloorL3 + TMath::Tan(phim * kDegrad) * dyFloorL3;
273
274
275 TGeoVolume* voHHF2 = new TGeoVolume("HHF2",
97f8df2e 276 new TGeoTrd1(dx1FloorL3 - 0.5, dx2FloorL3 - 0.5, dzL3/2., dyFloorL3/2.),
257726e6 277 kMedCC);
278
b1ccf85a 279 asHall->AddNode(voHHF2, 1, new TGeoCombiTrans(0., yFloor - dyFloor / 2. + dyFloorL3 / 2. - 0.5,0., rot000));
257726e6 280 //
281 // Tunnel roof and pit
282 // Roof
283 TGeoTubeSeg* shHHC11 = new TGeoTubeSeg(rHall, rHall + 100., dzHall / 2., 0., 180.);
284 shHHC11->SetName("shHHC11");
285 // Pit
286 TGeoTube* shHHC12 = new TGeoTube(rPit, rPit + 100., 1000.);
287 shHHC12->SetName("shHHC12");
288 // Pit inside
289 TGeoTube* shHHC13 = new TGeoTube( 0, rPit - epsSmall, 1000.);
290 shHHC13->SetName("shHHC13");
291 // Roof inside
292 TGeoTubeSeg* shHHC14 = new TGeoTubeSeg(0., rHall, dzHall / 2. + epsBig, 0., 180.);
293 shHHC14->SetName("shHHC14");
294
295 TGeoCombiTrans* trHHC = new TGeoCombiTrans("trHHC", 0., 1000., dzHall/2. + rPit - oPit, rot000);
296 trHHC->RegisterYourself();
297 TGeoCompositeShape* shHHC1 = new TGeoCompositeShape("HHC1", "shHHC11+shHHC12:trHHC-(shHHC14+shHHC13:trHHC)");
298 TGeoVolume* voHHC1 = new TGeoVolume("HHC1", shHHC1, kMedCC);
299
300 asHall->AddNode(voHHC1, 1, new TGeoTranslation(0., yHall, -(zHall26-zHall24)/2.));
301
302
303 //
304 // Pit wall ground level
957fe2c9 305 dy = yFloor + 1206. / 2. + dyFloor/2.;
257726e6 306 TGeoTube* shHHCPW1 = new TGeoTube(rPit, rPit + 100., 1206./2.);
307 shHHCPW1->SetName("shHHCPW1");
308 TGeoCombiTrans* trHHCPW1 = new TGeoCombiTrans("trHHCPW1", 0., 0., 0., rot000);
309 trHHCPW1->RegisterYourself();
310
311 TGeoBBox* shHHCPW2 = new TGeoBBox(rPit + 100., 1206./ 2. + 20., rPit + 100.);
312 shHHCPW2->SetName("shHHCPW2");
957fe2c9 313
314 TGeoTube* shHHCPW3 = new TGeoTube(0., 60., 60.);
315 shHHCPW3->SetName("shHHCPW3");
257726e6 316
317
318 TGeoTranslation* trHHCPW2 = new TGeoTranslation("trHHCPW2", 0., 0., -(rPit + 100.) - oPit);
319 trHHCPW2->RegisterYourself();
320
957fe2c9 321 TGeoTranslation* trHHCPW3 = new TGeoTranslation("trHHCPW3", 0., -dy, rPit + 50.);
322 trHHCPW3->RegisterYourself();
323
324 TGeoCompositeShape* shHHCPW
325 = new TGeoCompositeShape("HHCPW", "shHHCPW1:trHHCPW1-(shHHCPW2:trHHCPW2+shHHCPW3:trHHCPW3)");
257726e6 326 TGeoVolume* voHHCPW = new TGeoVolume("HHCPW", shHHCPW, kMedCC);
957fe2c9 327
257726e6 328 asHall->AddNode(voHHCPW, 1, new TGeoTranslation(0., dy, 2300.));
329 //
330 // Foundations of the Muon Spectrometer
331 // Drawing ALIP2A_0110
332 //
333 TGeoVolumeAssembly* asFMS = new TGeoVolumeAssembly("asFMS");
334 Float_t zFil = -1465.86 - 60.;
335 // Muon Filter Foundation
336 // Pillars
337 dy = 263.54/2.;
338 Float_t ys = yFloor + dyFloor / 2.;
339 TGeoVolume* voFmsMfPil = new TGeoVolume("FmsMfPil", new TGeoBBox( 50., dy, 165.), kMedCC);
340 ys += dy;
341 asFMS->AddNode(voFmsMfPil, 1, new TGeoTranslation(-330. + 50., ys, zFil + 165. - 90.));
342 asFMS->AddNode(voFmsMfPil, 2, new TGeoTranslation( 330. - 50., ys, zFil + 165 - 90.));
343 //
344 // Transverse bars
345 ys += dy;
b8bb2f2a 346 dy = 91.32/2.;
257726e6 347 ys += dy;
97f8df2e 348 TGeoVolume* voFmsMfTb1 = new TGeoVolume("FmsMfTb1", new TGeoBBox(330., dy, 60.), kMedCC);
257726e6 349 asFMS->AddNode(voFmsMfTb1, 1, new TGeoTranslation(0., ys, zFil));
350 ys += dy;
351 dy = 41.14/2.;
352 ys += dy;
353 TGeoVolume* voFmsMfTb2 = new TGeoVolume("FmsMfTb2", new TGeoBBox(330., dy, 60.), kMedCC);
354 asFMS->AddNode(voFmsMfTb2, 1, new TGeoTranslation(0., ys, zFil));
355 //
356 // Dipole foundation
357 ys = yFloor + dyFloor / 2.;
ca3e9926 358 dy = (263.54 - 6.2)/2.;
257726e6 359 ys += dy;
360 TGeoVolume* voFmsDf1 = new TGeoVolume("FmsDf1", new TGeoBBox(370., dy, 448.0 / 2.), kMedCC);
361 asFMS->AddNode(voFmsDf1, 1, new TGeoTranslation(0., ys, zFil + 240. + 224.));
362 TGeoVolume* voFmsDf2 = new TGeoVolume("FmsDf2", new TGeoBBox(370., (263.54 + 110.)/2., 112.0 / 2.), kMedCC);
363 asFMS->AddNode(voFmsDf2, 1, new TGeoTranslation(0., ys - 110./2., zFil + 688. + 56.));
364
365 //
366 // Shielding in front of L3 magnet in PX24 and UX25
367 // Drawing ALIP2I__0016
368 //
369
370 TGeoVolumeAssembly* asShRb24 = new TGeoVolumeAssembly("ShRb24");
371 //
372 // Side walls
373 // start 7450 from IP
374 TGeoVolume* voShRb24Sw = new TGeoVolume("ShRb24Sw", new TGeoBBox(80., 420., 520.), kMedCC);
375 asShRb24->AddNode(voShRb24Sw, 1, new TGeoTranslation(+315, -420. + 140., 0.));
376 asShRb24->AddNode(voShRb24Sw, 2, new TGeoTranslation(-315, -420. + 140., 0.));
377 //
378 // Roof
379 TGeoVolume* voShRb24Ro = new TGeoVolume("ShRb24Ro", new TGeoBBox(395., 80., 520.), kMedCC);
380 asShRb24->AddNode(voShRb24Ro, 1, new TGeoTranslation(0., +80. + 140., 0.));
381 //
84e3df3e 382 // Concrete Plug
257726e6 383 TGeoBBox* shShRb24Pl1 = new TGeoBBox(235., 140., 40.);
384 shShRb24Pl1->SetName("ShRb24Pl1");
84e3df3e 385 // Steel Plug
386 TGeoBBox* shShRb24Pl4 = new TGeoBBox(15., 20., 40.);
387 shShRb24Pl4->SetName("ShRb24Pl4");
388
389 TGeoBBox* shShRb24Pl41 = new TGeoBBox(15., 20., 45.);
390 shShRb24Pl41->SetName("ShRb24Pl41");
391
257726e6 392 //
393 // Opening for beam pipe
84e3df3e 394 Float_t dxShRb24Pl = 14.5;
395 Float_t dyShRb24Pl = 20.0;
396 if (fNewShield24) {
397 dxShRb24Pl = 6.;
398 dyShRb24Pl = 6.;
399 }
400 TGeoBBox* shShRb24Pl2 = new TGeoBBox(dxShRb24Pl, dyShRb24Pl, 60.);
257726e6 401 shShRb24Pl2->SetName("ShRb24Pl2");
402 //
403 // Opening for tubes
404 TGeoBBox* shShRb24Pl3 = new TGeoBBox(20., 60., 60.);
405 shShRb24Pl3->SetName("ShRb24Pl3");
406
407 TGeoTranslation* trPl3 = new TGeoTranslation("trPl3", +235. -90., 80., 0.);
408 trPl3->RegisterYourself();
84e3df3e 409
410 TGeoTranslation* trPl4 = new TGeoTranslation("trPl4", 0., -6., 0.);
411 trPl4->RegisterYourself();
412 TGeoTranslation* trPl5 = new TGeoTranslation("trPl5", 0., +6., 0.);
413 trPl5->RegisterYourself();
414
415 TGeoCompositeShape* shRb24Pl = 0;
416 TGeoCompositeShape* shRb24PlSS = 0;
417 if (!fNewShield24) {
418 shRb24Pl = new TGeoCompositeShape("Rb24Pl", "ShRb24Pl1-ShRb24Pl2:trPl4-ShRb24Pl3:trPl3");
419 } else {
420 shRb24Pl = new TGeoCompositeShape("Rb24Pl", "ShRb24Pl1-(ShRb24Pl41:trPl4+ShRb24Pl3:trPl3)");
421 shRb24PlSS = new TGeoCompositeShape("Rb24PlSS", "ShRb24Pl4-ShRb24Pl2:trPl5");
422 }
423
257726e6 424 TGeoVolume* voRb24Pl = new TGeoVolume("Rb24Pl", shRb24Pl, kMedCC);
84e3df3e 425
257726e6 426 asShRb24->AddNode(voRb24Pl, 1, new TGeoTranslation(0., 0., 520. - 40.));
84e3df3e 427 if (fNewShield24) {
428 TGeoVolume* voRb24PlSS = new TGeoVolume("Rb24PlSS", shRb24PlSS, kMedST);
429 asShRb24->AddNode(voRb24PlSS, 1, new TGeoTranslation(0., -6., 520. - 40.));
430 }
431
257726e6 432
433 //
434 // Concrete platform and shielding PX24
435 // Drawing LHCJUX 250014
436 //
437 TGeoVolumeAssembly* asShPx24 = new TGeoVolumeAssembly("ShPx24");
438 // Platform
439 TGeoVolume* voShPx24Pl = new TGeoVolume("ShPx24Pl", new TGeoBBox(1613.5/2., 120./2., 1205./2.), kMedCC);
440 asShPx24->AddNode(voShPx24Pl, 1, new TGeoTranslation(55., -140. - 60., 0.));
441 // Pillars
442 TGeoVolume* voShPx24Pi = new TGeoVolume("ShPx24Pi", new TGeoBBox(160./2., 440./2., 40/2.), kMedCC);
443 asShPx24->AddNode(voShPx24Pi, 1, new TGeoTranslation(-180. - 80., -220. -260., 1205./2. - 20.));
444 asShPx24->AddNode(voShPx24Pi, 2, new TGeoTranslation(+290. + 80., -220. -260., 1205./2. - 20.));
445 asShPx24->AddNode(voShPx24Pi, 3, new TGeoTranslation(-180. - 80., -220. -260., -1205./2. + 20. + 120.));
446 asShPx24->AddNode(voShPx24Pi, 4, new TGeoTranslation(+290. + 80., -220. -260., -1205./2. + 20. + 120.));
447 asShPx24->AddNode(voShPx24Pi, 5, new TGeoTranslation(-180. - 80., -220. -260., -1205./2. - 20. + 480.));
448 asShPx24->AddNode(voShPx24Pi, 6, new TGeoTranslation(+290. + 80., -220. -260., -1205./2. - 20. + 480.));
449 asShPx24->AddNode(voShPx24Pi, 7, new TGeoTranslation(-180. - 80., -220. -260., -1205./2. - 20. + 800.));
450 asShPx24->AddNode(voShPx24Pi, 8, new TGeoTranslation(+290. + 80., -220. -260., -1205./2. - 20. + 800.));
451 // Side Walls
452 TGeoVolume* voShPx24Sw = new TGeoVolume("ShPx24Sw", new TGeoBBox(160./2., 280./2., 1205./2.), kMedCC);
453 asShPx24->AddNode(voShPx24Sw, 1, new TGeoTranslation(-180, 0., 0.));
454 asShPx24->AddNode(voShPx24Sw, 2, new TGeoTranslation(+290, 0., 0.));
455 // Roof
456 TGeoVolume* voShPx24Ro = new TGeoVolume("ShPx24Ro", new TGeoBBox(630./2., 160./2., 1205./2.), kMedCC);
457 asShPx24->AddNode(voShPx24Ro, 1, new TGeoTranslation(55., 80.+ 140., 0.));
458 asHall->AddNode(asShRb24, 1, new TGeoTranslation(0., 0., +745. + 520.));
459 asHall->AddNode(asShPx24, 1, new TGeoTranslation(0., 0., +745. + 1040. + 1205./ 2.));
460 // Stainless Steel Plug 80 cm thick
461 TGeoBBox* shShPx24Pl1 = new TGeoBBox(155., 140., 40.);
462 shShPx24Pl1->SetName("ShPx24Pl1");
463 // Opening for beam pipe
84e3df3e 464 Float_t dxPx24Pl2 = 9.5;
465 Float_t dyPx24Pl2 = 14.0;
466 // Option for new shielding closer to the beam pipe
467 if (fNewShield24) {
468 dxPx24Pl2 = 6.;
469 dyPx24Pl2 = 6.;
470 }
471 //
472 TGeoBBox* shShPx24Pl2 = new TGeoBBox(dxPx24Pl2, dyPx24Pl2, 60.);
257726e6 473 shShPx24Pl2->SetName("ShPx24Pl2");
84e3df3e 474 TGeoTranslation* trPl2 = new TGeoTranslation("trPl2", -55., 0., 0.);
c9017ad7 475 trPl2->RegisterYourself();
476
477 TGeoCompositeShape* shPx24Pl = new TGeoCompositeShape("Px24Pl", "ShPx24Pl1-ShPx24Pl2:trPl2");
257726e6 478 TGeoVolume* voPx24Pl = new TGeoVolume("Px24Pl", shPx24Pl, kMedST);
479 asShPx24->AddNode(voPx24Pl, 1, new TGeoTranslation(55., 0., -1205./2. + 40.));
480 asHall->AddNode(asFMS, 1, new TGeoTranslation(0., 0., 0.));
5b37b1dd 481
482 //
483 // Scoring plane for beam background simulations
257726e6 484 //
5b37b1dd 485 TGeoVolume* voRB24Scoring = new TGeoVolume("RB24Scoring", new TGeoTube(4.3, 300., 1.), kMedAir);
486 asHall->AddNode(voRB24Scoring, 1, new TGeoTranslation(0., 0., 735.));
487 //
488
257726e6 489 top->AddNode(asHall, 1, gGeoIdentity);
490
491}
5b37b1dd 492
493void AliHALLv3::Init()
494{
495 //
496 // Initialise the module after the geometry has been defined
497 //
498 if(AliLog::GetGlobalDebugLevel()>0) {
499 printf("%s: **************************************"
500 " HALL "
501 "**************************************\n",ClassName());
502 printf("\n%s: Version 3 of HALL initialised\n\n",ClassName());
503 printf("%s: **************************************"
504 " HALL "
505 "**************************************\n",ClassName());
506 }
507//
508// The reference volume id
509 fRefVolumeId = gMC->VolId("RB24Scoring");
510}
511
512void AliHALLv3::StepManager()
513{
514//
515// Stepmanager of AliHALLv2
516// Used for recording of reference tracks entering scoring plane
517//
518 if (!fScoring) return;
519 Int_t copy, id;
520
521 //
522 // Only charged tracks
523 if( !(gMC->TrackCharge()) ) return;
524 //
525 // Only tracks entering mother volume
526 //
527
528 id=gMC->CurrentVolID(copy);
529
530 if ((id != fRefVolumeId)) return;
531 if(!gMC->IsTrackEntering()) return;
532 //
533 // Add the reference track
534 //
535 AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kHALL);
536}
537