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