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