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