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