Introducing Copyright include file
[u/mrichter/AliRoot.git] / STRUCT / AliHALL.cxx
CommitLineData
fe4da5cc 1///////////////////////////////////////////////////////////////////////////////
2// //
3// Experimental Hall //
4// This class contains the description of the experimental hall //
5// //
6//Begin_Html
7/*
1439f98e 8<img src="picts/AliHALLClass.gif">
fe4da5cc 9</pre>
10<br clear=left>
11<font size=+2 color=red>
12<p>The responsible person for this module is
13<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
14</font>
15<pre>
16*/
17//End_Html
18// //
19// //
20///////////////////////////////////////////////////////////////////////////////
21
22#include "AliHALL.h"
23#include "AliRun.h"
fe4da5cc 24#include "AliConst.h"
25
26ClassImp(AliHALL)
27
28//_____________________________________________________________________________
b8032157 29AliHALL::AliHALL()
fe4da5cc 30{
31 //
32 // Default constructor for the experimental Hall
33 //
34}
35
36//_____________________________________________________________________________
37AliHALL::AliHALL(const char *name, const char *title)
b8032157 38 : AliModule(name,title)
fe4da5cc 39{
40 //
41 // Standard constructor for the experimental Hall
42 //
43 SetMarkerColor(7);
44 SetMarkerStyle(2);
45 SetMarkerSize(0.4);
46}
47
fe4da5cc 48//_____________________________________________________________________________
49void AliHALL::CreateGeometry()
50{
51 //
52 // Create the geometry of the exprimental hall
53 //
54 //Begin_Html
55 /*
1439f98e 56 <img src="picts/AliHALLTree.gif">
fe4da5cc 57 */
58 //End_Html
59 //
60 // If ZDC is not present the experimental hall includes a short
61 // section of the accelerator tunnel
62 //
63 //Begin_Html
64 /*
1439f98e 65 <img src="picts/AliHALLSmall.gif">
fe4da5cc 66 */
67 //End_Html
68 //
69 // If ZDC is present the experimental hall includes the accelerator
70 // tunnel beyond the ZDC
71 //
72 //Begin_Html
73 /*
1439f98e 74 <img src="picts/AliHALLLarge.gif">
fe4da5cc 75 */
76 //End_Html
77
78
fe4da5cc 79 Float_t r2;
80 Float_t phid, phim, tpar[3], pbox[3], zfil_out, h, r, tspar[5];
81 Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
82 Int_t idrotm[1999];
83 Float_t trdpar[4], trapar[11], hullen;
84 Float_t dz, phi, par[3], zfil_in;
85
ad51aeb0 86 Int_t *idtmed = fIdtmed->GetArray()-1899;
fe4da5cc 87
88 //abs_d = 90.; // DEFINES DRIFT LENGTH
89 //z_nose = 102.;
90 //z_cone = 285.;
91 //theta1 = 24.; // 1. angle defining the front absorber
92 //theta2 = 5.; // 2. angle defining the front absorbe
93 //acc_max = 9.; // ANGLE POLAIRE MAXIMUM
94 //acc_min = 2.; // ANGLE POLAIRE MINIMUM DE DETECTION
95 //abs_l = 503.;
96 //d_steel = 1.; // THICKNESS OF STEEL SUPPORT
97 //d_poly = 7.5;
98 //d_pb = 2.5;
99 //abs_cc = 315.; // DEFINES LENGTH OF CARBON
100 //abs_c = 358.;
101 //abs_s = 150.; // DEFINES W-SHIELD LENGTH
102 //abs_n = 80.; // START OF NOSE
103 //r_abs = 4.;
104 //r_pb = .1;
105 //epsilon = .01;
106 //theta_r = 3.;
107 //d_rear = 35.;
108 //theta_open = .75;
109
110 //z_l3 = 700.;
111 //zmag_in = 725.;
112 //zmag_out = 1225.;
113 zfil_in = 1471.;
114 zfil_out = 1591.;
115 //zcon_in = 1900.;
116 //zcon_out = 2e3;
117 //zcone_e = 859.0875;
118 //spec_l = 1800.;
119 //zplug_in = 1780.;
120 //zplug_out= 1900.;
121
122 // Chamber position
123 // CZ1=515.5
124 //cz1 = 511.;
125 //cz2 = 686.;
126 //cz3 = 971.;
127 //cz4 = 1245.;
128 //cz5 = 1445.;
129 //cz6 = 1610.;
130 //cz7 = 1710.;
131
132
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
288 // concrete beam shield
289
290 pbox[0] = 402.5;
291 pbox[1] = 260.;
292 pbox[2] = 120.;
cfce8870 293 gMC->Gsvolu("HMBS", "BOX ", idtmed[1956], pbox, 3);
fe4da5cc 294 pbox[0] = 85.;
295 pbox[1] = 100.;
cfce8870 296 gMC->Gsvolu("HBBS", "BOX ", idtmed[1956], pbox, 3);
297 gMC->Gspos("HBBS", 1, "HMBS", -157.5, 0., 0., 0, "ONLY");
fe4da5cc 298 pbox[0] = 40.;
299 pbox[1] = 130.;
cfce8870 300 gMC->Gsvolu("HPBS", "BOX ", idtmed[1956], pbox, 3);
301 gMC->Gspos("HPBS", 1, "HMBS", 202.5, 30., 0., 0, "ONLY");
302 gMC->Gspos("HMBS", 1, "ALIC", 157.5, -50., -820., 0, "ONLY");
fe4da5cc 303
304 // MUON FILTER
305 par[0] = 30.;
306 par[1] = 310.;
307 par[2] = (zfil_out - zfil_in) / 2.;
cfce8870 308 gMC->Gsvolu("HXFI", "TUBE", idtmed[1949], par, 3);
fe4da5cc 309 dz = (zfil_in + zfil_out) / 2.;
310 par[2] -= 10.;
cfce8870 311 gMC->Gsvolu("HXII", "TUBE", idtmed[1909], par, 3);
312 gMC->Gspos("HXII", 1, "HXFI", 0., 0., 0., 0, "ONLY");
313 gMC->Gspos("HXFI", 1, "ALIC", 0., 0., dz, 0, "ONLY");
fe4da5cc 314}
315
316//_____________________________________________________________________________
317void AliHALL::CreateMaterials()
318{
319 //
320 // Create materials for the experimental hall
321 //
322
323
324 Int_t ISXFLD = gAlice->Field()->Integ();
325 Float_t SXMGMX = gAlice->Field()->Max();
326
327 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
328 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
329 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
330
331 Float_t epsil, stmin, deemax, tmaxfd, stemax;
332
333 // FOR CONCRETE
334
335 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
336 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
337 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
338 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
339 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
340 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
341 AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
342 AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
343 AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
344
345 // ****************
346 // Defines tracking media parameters.
347 // Les valeurs sont commentees pour laisser le defaut
348 // a GEANT (version 3-21, page CONS200), f.m.
349 epsil = .001; // Tracking precision,
350 stemax = -1.; // Maximum displacement for multiple scat
351 tmaxfd = -20.; // Maximum angle due to field deflection
352 deemax = -.3; // Maximum fractional energy loss, DLS
353 stmin = -.8;
354 // ***************
355
356 // IRON
357
ad51aeb0 358 AliMedium(10, "FE_C0 ", 10, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
359 AliMedium(30, "FE_C1 ", 30, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
360 AliMedium(50, "FE_C2 ", 50, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 361
362 // Air
363
ad51aeb0 364 AliMedium(15, "AIR_C0 ", 15, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
365 AliMedium(35, "AIR_C1 ", 35, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
366 AliMedium(55, "AIR_C2 ", 55, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 367
368 // Concrete
369
ad51aeb0 370 AliMedium(17, "CC_C0 ", 17, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
371 AliMedium(37, "CC_C1 ", 37, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
372 AliMedium(57, "CC_C2 ", 57, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 373}
374
375//_____________________________________________________________________________
376void AliHALL::Init()
377{
378 //
379 // Initialise the HALL after it has been built
380 //
381 Int_t i;
382 //
383 printf("\n");
384 for(i=0;i<35;i++) printf("*");
385 printf(" HALL_INIT ");
386 for(i=0;i<35;i++) printf("*");
387 printf("\n");
388 //
389 // Here the HALL initialisation code (if any!)
390 for(i=0;i<80;i++) printf("*");
391 printf("\n");
392}
393
394//_____________________________________________________________________________
b8032157 395void AliHALL::DrawModule()
fe4da5cc 396{
397 //
398 // Draw a shaded view of Experimental Hall
399 //
400
fe4da5cc 401 // Set everything unseen
cfce8870 402 gMC->Gsatt("*", "seen", -1);
fe4da5cc 403 //
404 // Set ALIC mother transparent
cfce8870 405 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 406 //
407 // Set the volumes visible
cfce8870 408 gMC->Gsatt("HUFL","seen",1);
409 gMC->Gsatt("HUWA","seen",1);
410 gMC->Gsatt("HUP2","seen",1);
411 gMC->Gsatt("HEW1","seen",1);
412 gMC->Gsatt("HHF1","seen",1);
413 gMC->Gsatt("HHW1","seen",1);
414 gMC->Gsatt("HBW1","seen",1);
415 gMC->Gsatt("HHW2","seen",1);
416 gMC->Gsatt("HHW3","seen",1);
417 gMC->Gsatt("HHC1","seen",1);
418 gMC->Gsatt("HHF2","seen",1);
419 gMC->Gsatt("HPIL","seen",1);
420 gMC->Gsatt("HMBS","seen",1);
421 gMC->Gsatt("HBBS","seen",1);
422 gMC->Gsatt("HPBS","seen",1);
423 gMC->Gsatt("HXFI","seen",1);
424 gMC->Gsatt("HXII","seen",1);
fe4da5cc 425 //
cfce8870 426 gMC->Gdopt("hide", "on");
427 gMC->Gdopt("shad", "on");
428 gMC->Gsatt("*", "fill", 7);
429 gMC->SetClipBox(".");
b8032157 430 if (gAlice->GetModule("ZDC") == 0) {
fe4da5cc 431 //
432 // ZDC is not present
433 //
cfce8870 434 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
435 gMC->DefaultRange();
436 gMC->Gdraw("alic", 40, 30, 0, 12, 7.5, .005, .005);
fe4da5cc 437 } else {
438 //
439 // ZDC is present
440 //
cfce8870 441 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 16000);
442 gMC->DefaultRange();
443 gMC->Gdraw("alic", 40, 30, 0, 17.5, 10, .0019, .0019);
fe4da5cc 444 }
cfce8870 445 gMC->Gdhead(1111, "Experimental Hall");
446 gMC->Gdman(18, 2, "MAN");
fe4da5cc 447}
448