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