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