]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliHALL.cxx
Temporary reverting the changes introduced earlier to store the TGeo geometry. New...
[u/mrichter/AliRoot.git] / STRUCT / AliHALL.cxx
CommitLineData
4c039060 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$ */
4c039060 17
fe4da5cc 18///////////////////////////////////////////////////////////////////////////////
19// //
20// Experimental Hall //
21// This class contains the description of the experimental hall //
22// //
23//Begin_Html
24/*
1439f98e 25<img src="picts/AliHALLClass.gif">
fe4da5cc 26</pre>
27<br clear=left>
28<font size=+2 color=red>
29<p>The responsible person for this module is
30<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
31</font>
32<pre>
33*/
34//End_Html
35// //
36// //
37///////////////////////////////////////////////////////////////////////////////
38
88cb7938 39#include <TVirtualMC.h>
40
41#include "AliConst.h"
fe4da5cc 42#include "AliHALL.h"
94de3818 43#include "AliMagF.h"
88cb7938 44#include "AliRun.h"
fe4da5cc 45
46ClassImp(AliHALL)
47
48//_____________________________________________________________________________
b8032157 49AliHALL::AliHALL()
fe4da5cc 50{
51 //
52 // Default constructor for the experimental Hall
53 //
54}
55
56//_____________________________________________________________________________
57AliHALL::AliHALL(const char *name, const char *title)
b8032157 58 : AliModule(name,title)
fe4da5cc 59{
60 //
61 // Standard constructor for the experimental Hall
62 //
63 SetMarkerColor(7);
64 SetMarkerStyle(2);
65 SetMarkerSize(0.4);
66}
67
fe4da5cc 68//_____________________________________________________________________________
69void AliHALL::CreateGeometry()
70{
71 //
72 // Create the geometry of the exprimental hall
73 //
74 //Begin_Html
75 /*
1439f98e 76 <img src="picts/AliHALLTree.gif">
fe4da5cc 77 */
78 //End_Html
79 //
80 // If ZDC is not present the experimental hall includes a short
81 // section of the accelerator tunnel
82 //
83 //Begin_Html
84 /*
1439f98e 85 <img src="picts/AliHALLSmall.gif">
fe4da5cc 86 */
87 //End_Html
88 //
89 // If ZDC is present the experimental hall includes the accelerator
90 // tunnel beyond the ZDC
91 //
92 //Begin_Html
93 /*
1439f98e 94 <img src="picts/AliHALLLarge.gif">
fe4da5cc 95 */
96 //End_Html
97
98
fe4da5cc 99 Float_t r2;
9c671c0f 100 Float_t phid, phim, pbox[3], h, r, tspar[5];
fe4da5cc 101 Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
102 Int_t idrotm[1999];
103 Float_t trdpar[4], trapar[11], hullen;
60404de7 104 Float_t phi;
fe4da5cc 105
ad51aeb0 106 Int_t *idtmed = fIdtmed->GetArray()-1899;
fe4da5cc 107
fe4da5cc 108 // RB24/26 TUNNEL FLOOR
109
110 r = 220.;
111 h = 140.;
112 phi = TMath::ACos(h / r);
113 xl = r * TMath::Sin(phi);
099f87ce 114 dr = 1600.;
fe4da5cc 115 dh = dr * TMath::Cos(phi);
116 dl = dr * TMath::Sin(phi);
b8032157 117 if (gAlice->GetModule("ZDC") == 0) {
fe4da5cc 118
119 // No ZDC
099f87ce 120 hullen = 370.;
fe4da5cc 121 } else {
122
123 // ZDC is present
099f87ce 124 hullen = 6520.;
fe4da5cc 125 }
126 trdpar[0] = xl + dl;
127 trdpar[1] = xl;
128 trdpar[2] = hullen;
129 trdpar[3] = dh / 2.;
130 AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.);
131 AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.);
cfce8870 132 gMC->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4);
099f87ce 133 r2 = hullen + 1900.;
299e56a5 134 gMC->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY");
fe4da5cc 135
136 // RB24/26 wall
137
138 phid = phi * 57.296;
139 tspar[0] = r;
140 tspar[1] = r + dr;
141 tspar[2] = hullen;
142 tspar[3] = phid - 90.;
143 tspar[4] = 270. - phid;
cfce8870 144 gMC->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5);
099f87ce 145 gMC->Gspos("HUWA", 1, "ALIC", 70., 40., -1900 - hullen , 0, "ONLY");
fe4da5cc 146
fe4da5cc 147 // END WALL
099f87ce 148 //gMC->Gsvolu("HEW1", "BOX ", idtmed[1956], pbox, 0);
149 //pbox[0] = 600.;
150 //pbox[1] = 418.;
151 //pbox[2] = 60.;
152 //gMC->Gsposp("HEW1", 1, "ALIC", 0., -pbox[1]-60., -1960, 0, "ONLY", pbox, 3);
153 //pbox[1] = 822.;
154 //gMC->Gsposp("HEW1", 2, "ALIC", 0., pbox[1]+60., -1960, 0, "ONLY", pbox, 3);
155 //pbox[0] = 270.;
156 //pbox[1] = 60.;
157 //gMC->Gsposp("HEW1", 3, "ALIC", pbox[0]+60., 0. , -1960, 0, "ONLY", pbox, 3);
158 //gMC->Gsposp("HEW1", 4, "ALIC", -pbox[0]-60., 0. , -1960, 0, "ONLY", pbox, 3);
9c671c0f 159
fe4da5cc 160 // hall floor
161
162 phid = 16.197;
163 trdpar[0] = 700.;
164 trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.;
165 trdpar[2] = 550.;
166 trdpar[3] = 95.;
cfce8870 167 gMC->Gsvolu("HHF1", "TRD1", idtmed[1956], trdpar, 4);
168 gMC->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY");
169 gMC->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY");
fe4da5cc 170
171 // hall side walls
172
173 trapar[0] = 550.;
174 trapar[1] = 0.;
175 trapar[2] = 0.;
176 trapar[3] = 1273.78/2;
177 trapar[4] = 235.;
178 trapar[5] = 50.;
179 trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
180 trapar[7] = trapar[3];
181 trapar[8] = trapar[4];
182 trapar[9] = trapar[5];
183 trapar[10] = trapar[6];
184 dx = trapar[4] * 1.5 + 700. - trapar[5] * .5;
cfce8870 185 gMC->Gsvolu("HHW1", "TRAP", idtmed[1956], trapar, 11);
186 gMC->Gspos("HHW1", 1, "ALIC", dx, -896+trapar[3], 1350., 0, "ONLY");
187 gMC->Gspos("HHW1", 2, "ALIC",-dx, -896+trapar[3], 1350., idrotm[1901], "ONLY");
188 gMC->Gspos("HHW1", 3, "ALIC", dx, -896+trapar[3], -1350., 0, "ONLY");
189 gMC->Gspos("HHW1", 4, "ALIC",-dx, -896+trapar[3], -1350., idrotm[1901], "ONLY");
fe4da5cc 190 pbox[0] = 50.;
191 pbox[1] = (500. - (trapar[3] * 2. - 896.)) / 2.;
192 pbox[2] = 1900.;
cfce8870 193 gMC->Gsvolu("HBW1", "BOX ", idtmed[1956], pbox, 3);
194 gMC->Gspos("HBW1", 1, "ALIC", 1120., 500-pbox[1], 0., 0, "ONLY");
195 gMC->Gspos("HBW1", 2, "ALIC", -1120., 500-pbox[1], 0., 0, "ONLY");
fe4da5cc 196
197 // slanted wall close to L3 magnet
198
199 phim = 45.;
200 hm = 790.;
201 //rm = hm / TMath::Cos(phim / 2. * kDegrad);
202 am = hm * TMath::Tan(phim / 2. * kDegrad);
203 bm = (hm + 76.) / hm * am;
204 cm = bm * 2. / TMath::Sqrt(2.);
205 trapar[0] = 800.;
206 trapar[1] = 0.;
207 trapar[2] = 0.;
208 trapar[3] = (1273.78 - cm) / 2.;
209 trapar[4] = 235. - cm * TMath::Tan(phid * kDegrad) / 2.;
210 trapar[5] = 50.;
211 trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
212 trapar[7] = trapar[3];
213 trapar[8] = trapar[4];
214 trapar[9] = trapar[5];
215 trapar[10] = trapar[6];
216 w1 = trapar[4];
217 dx = cm*TMath::Tan(phid * kDegrad) + 700. + trapar[4] * 1.5 - trapar[5] * .5;
cfce8870 218 gMC->Gsvolu("HHW2", "TRAP", idtmed[1956], trapar, 11);
fe4da5cc 219 r2 = cm - 896. + trapar[3];
cfce8870 220 gMC->Gspos("HHW2", 1, "ALIC", dx, r2, 0., 0, "ONLY");
221 gMC->Gspos("HHW2", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
fe4da5cc 222 trapar[3] = cm / 2.;
223 trapar[4] = w1 + cm / 2.;
224 trapar[5] = w1;
225 trapar[6] = TMath::ATan(.5) * kRaddeg;
226 trapar[7] = trapar[3];
227 trapar[8] = trapar[4];
228 trapar[9] = trapar[5];
229 trapar[10] = trapar[6];
230 dx = 1170. - trapar[4] * .5 - trapar[5] * .5;
cfce8870 231 gMC->Gsvolu("HHW3", "TRAP", idtmed[1956], trapar, 11);
fe4da5cc 232 r2 = trapar[3] - 896.;
cfce8870 233 gMC->Gspos("HHW3", 1, "ALIC", dx, r2, 0., 0, "ONLY");
234 gMC->Gspos("HHW3", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
fe4da5cc 235
236
237 tspar[0] = 1070.;
238 tspar[1] = 1170.;
239 tspar[2] = 1900.;
240 tspar[3] = 0.;
241 tspar[4] = 180.;
cfce8870 242 gMC->Gsvolu("HHC1", "TUBS", idtmed[1956], tspar, 5);
243 gMC->Gspos("HHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY");
fe4da5cc 244 trdpar[0] = 1170 - trapar[4] * 2.;
245 trdpar[1] = trdpar[0] + TMath::Tan(phim * kDegrad) * 76.;
246 trdpar[2] = 800.;
247 trdpar[3] = 38.;
cfce8870 248 gMC->Gsvolu("HHF2", "TRD1", idtmed[1956], trdpar, 4);
249 gMC->Gspos("HHF2", 1, "ALIC", 0., -858., 0., idrotm[1900], "ONLY");
fe4da5cc 250
251 // pillars for working platform
252
253 pbox[0] = 40.;
9b21f9d2 254 pbox[1] = 96.;
fe4da5cc 255 pbox[2] = 550.;
cfce8870 256 gMC->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3);
299e56a5 257 gMC->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY");
258 gMC->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY");
fe4da5cc 259
43707c21 260 // simple concrete beam shield
fe4da5cc 261
43707c21 262 Float_t ppgon[10];
263 ppgon[0] = 45.;
264 ppgon[1] = 360.;
265 ppgon[2] = 4.;
266 ppgon[3] = 2.;
299e56a5 267 ppgon[7] = 1800.;
43707c21 268 ppgon[8] = 150.;
269 ppgon[9] = 250.;
299e56a5 270 ppgon[4] = 720.;
271 ppgon[5] = 150.;
272 ppgon[6] = 250.;
43707c21 273
274 gMC->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10);
275 gMC->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY");
fe4da5cc 276}
277
278//_____________________________________________________________________________
279void AliHALL::CreateMaterials()
280{
281 //
282 // Create materials for the experimental hall
283 //
def952f1 284
285 Int_t isxfld = 0;
b43eb0dc 286 Float_t sxmgmx = gAlice->Field()->Max();
fe4da5cc 287
288 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
289 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
290 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
291
002b3738 292 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
293 Float_t zAir[4]={6.,7.,8.,18.};
294 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
295 Float_t dAir = 1.20479E-3;
296
fe4da5cc 297 Float_t epsil, stmin, deemax, tmaxfd, stemax;
298
299 // FOR CONCRETE
300
b60e0f5e 301 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
302 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
303 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
002b3738 304
b60e0f5e 305 AliMixture(15, "AIR$ ", aAir, zAir, dAir, 4, wAir);
306 AliMixture(35, "AIR$ ", aAir, zAir, dAir, 4, wAir);
307 AliMixture(55, "AIR$ ", aAir, zAir, dAir, 4, wAir);
002b3738 308
b60e0f5e 309 AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
310 AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
311 AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
fe4da5cc 312
313 // ****************
314 // Defines tracking media parameters.
315 // Les valeurs sont commentees pour laisser le defaut
316 // a GEANT (version 3-21, page CONS200), f.m.
317 epsil = .001; // Tracking precision,
318 stemax = -1.; // Maximum displacement for multiple scat
319 tmaxfd = -20.; // Maximum angle due to field deflection
320 deemax = -.3; // Maximum fractional energy loss, DLS
321 stmin = -.8;
322 // ***************
323
324 // IRON
325
b43eb0dc 326 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
327 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
328 AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 329
330 // Air
331
b43eb0dc 332 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
333 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
334 AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 335
336 // Concrete
337
b43eb0dc 338 AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
339 AliMedium(37, "CC_C1 ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
340 AliMedium(57, "CC_C2 ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 341}
342
343//_____________________________________________________________________________
344void AliHALL::Init()
345{
346 //
347 // Initialise the HALL after it has been built
348 //
349 Int_t i;
350 //
9e1a0ddb 351 if(fDebug) {
352 printf("\n%s: ",ClassName());
353 for(i=0;i<35;i++) printf("*");
354 printf(" HALL_INIT ");
355 for(i=0;i<35;i++) printf("*");
356 printf("\n%s: ",ClassName());
357 //
358 // Here the HALL initialisation code (if any!)
359 for(i=0;i<80;i++) printf("*");
360 printf("\n");
361 }
fe4da5cc 362}
363
364//_____________________________________________________________________________
eeacf08b 365void AliHALL::DrawModule() const
fe4da5cc 366{
367 //
368 // Draw a shaded view of Experimental Hall
369 //
370
fe4da5cc 371 // Set everything unseen
cfce8870 372 gMC->Gsatt("*", "seen", -1);
fe4da5cc 373 //
374 // Set ALIC mother transparent
cfce8870 375 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 376 //
377 // Set the volumes visible
cfce8870 378 gMC->Gsatt("HUFL","seen",1);
379 gMC->Gsatt("HUWA","seen",1);
380 gMC->Gsatt("HUP2","seen",1);
381 gMC->Gsatt("HEW1","seen",1);
382 gMC->Gsatt("HHF1","seen",1);
383 gMC->Gsatt("HHW1","seen",1);
384 gMC->Gsatt("HBW1","seen",1);
385 gMC->Gsatt("HHW2","seen",1);
386 gMC->Gsatt("HHW3","seen",1);
387 gMC->Gsatt("HHC1","seen",1);
388 gMC->Gsatt("HHF2","seen",1);
389 gMC->Gsatt("HPIL","seen",1);
390 gMC->Gsatt("HMBS","seen",1);
391 gMC->Gsatt("HBBS","seen",1);
392 gMC->Gsatt("HPBS","seen",1);
393 gMC->Gsatt("HXFI","seen",1);
394 gMC->Gsatt("HXII","seen",1);
fe4da5cc 395 //
cfce8870 396 gMC->Gdopt("hide", "on");
397 gMC->Gdopt("shad", "on");
398 gMC->Gsatt("*", "fill", 7);
399 gMC->SetClipBox(".");
b8032157 400 if (gAlice->GetModule("ZDC") == 0) {
fe4da5cc 401 //
402 // ZDC is not present
403 //
cfce8870 404 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
405 gMC->DefaultRange();
406 gMC->Gdraw("alic", 40, 30, 0, 12, 7.5, .005, .005);
fe4da5cc 407 } else {
408 //
409 // ZDC is present
410 //
cfce8870 411 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 16000);
412 gMC->DefaultRange();
413 gMC->Gdraw("alic", 40, 30, 0, 17.5, 10, .0019, .0019);
fe4da5cc 414 }
cfce8870 415 gMC->Gdhead(1111, "Experimental Hall");
416 gMC->Gdman(18, 2, "MAN");
fe4da5cc 417}
418