1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // Experimental Hall //
21 // This class contains the description of the experimental hall //
25 <img src="picts/AliHALLClass.gif">
28 <font size=+2 color=red>
29 <p>The responsible person for this module is
30 <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
37 ///////////////////////////////////////////////////////////////////////////////
39 #include <TVirtualMC.h>
48 //_____________________________________________________________________________
52 // Default constructor for the experimental Hall
56 //_____________________________________________________________________________
57 AliHALL::AliHALL(const char *name, const char *title)
58 : AliModule(name,title)
61 // Standard constructor for the experimental Hall
68 //_____________________________________________________________________________
69 void AliHALL::CreateGeometry()
72 // Create the geometry of the exprimental hall
76 <img src="picts/AliHALLTree.gif">
80 // If ZDC is not present the experimental hall includes a short
81 // section of the accelerator tunnel
85 <img src="picts/AliHALLSmall.gif">
89 // If ZDC is present the experimental hall includes the accelerator
90 // tunnel beyond the ZDC
94 <img src="picts/AliHALLLarge.gif">
100 Float_t phid, phim, pbox[3], h, r, tspar[5];
101 Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
103 Float_t trdpar[4], trapar[11], hullen;
106 Int_t *idtmed = fIdtmed->GetArray()-1899;
108 // RB24/26 TUNNEL FLOOR
112 phi = TMath::ACos(h / r);
113 xl = r * TMath::Sin(phi);
115 dh = dr * TMath::Cos(phi);
116 dl = dr * TMath::Sin(phi);
117 if (gAlice->GetModule("ZDC") == 0) {
130 AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.);
131 AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.);
132 gMC->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4);
134 gMC->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY");
142 tspar[3] = phid - 90.;
143 tspar[4] = 270. - phid;
144 gMC->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5);
145 gMC->Gspos("HUWA", 1, "ALIC", 70., 40., -2020 - hullen , 0, "ONLY");
148 gMC->Gsvolu("HEW1", "BOX ", idtmed[1956], pbox, 0);
152 gMC->Gsposp("HEW1", 1, "ALIC", 0., -pbox[1]-60., -1960, 0, "ONLY", pbox, 3);
154 gMC->Gsposp("HEW1", 2, "ALIC", 0., pbox[1]+60., -1960, 0, "ONLY", pbox, 3);
157 gMC->Gsposp("HEW1", 3, "ALIC", pbox[0]+60., 0. , -1960, 0, "ONLY", pbox, 3);
158 gMC->Gsposp("HEW1", 4, "ALIC", -pbox[0]-60., 0. , -1960, 0, "ONLY", pbox, 3);
164 trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.;
167 gMC->Gsvolu("HHF1", "TRD1", idtmed[1956], trdpar, 4);
168 gMC->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY");
169 gMC->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY");
176 trapar[3] = 1273.78/2;
179 trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
180 trapar[7] = trapar[3];
181 trapar[8] = trapar[4];
182 trapar[9] = trapar[5];
183 trapar[10] = trapar[6];
184 dx = trapar[4] * 1.5 + 700. - trapar[5] * .5;
185 gMC->Gsvolu("HHW1", "TRAP", idtmed[1956], trapar, 11);
186 gMC->Gspos("HHW1", 1, "ALIC", dx, -896+trapar[3], 1350., 0, "ONLY");
187 gMC->Gspos("HHW1", 2, "ALIC",-dx, -896+trapar[3], 1350., idrotm[1901], "ONLY");
188 gMC->Gspos("HHW1", 3, "ALIC", dx, -896+trapar[3], -1350., 0, "ONLY");
189 gMC->Gspos("HHW1", 4, "ALIC",-dx, -896+trapar[3], -1350., idrotm[1901], "ONLY");
191 pbox[1] = (500. - (trapar[3] * 2. - 896.)) / 2.;
193 gMC->Gsvolu("HBW1", "BOX ", idtmed[1956], pbox, 3);
194 gMC->Gspos("HBW1", 1, "ALIC", 1120., 500-pbox[1], 0., 0, "ONLY");
195 gMC->Gspos("HBW1", 2, "ALIC", -1120., 500-pbox[1], 0., 0, "ONLY");
197 // slanted wall close to L3 magnet
201 //rm = hm / TMath::Cos(phim / 2. * kDegrad);
202 am = hm * TMath::Tan(phim / 2. * kDegrad);
203 bm = (hm + 76.) / hm * am;
204 cm = bm * 2. / TMath::Sqrt(2.);
208 trapar[3] = (1273.78 - cm) / 2.;
209 trapar[4] = 235. - cm * TMath::Tan(phid * kDegrad) / 2.;
211 trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
212 trapar[7] = trapar[3];
213 trapar[8] = trapar[4];
214 trapar[9] = trapar[5];
215 trapar[10] = trapar[6];
217 dx = cm*TMath::Tan(phid * kDegrad) + 700. + trapar[4] * 1.5 - trapar[5] * .5;
218 gMC->Gsvolu("HHW2", "TRAP", idtmed[1956], trapar, 11);
219 r2 = cm - 896. + trapar[3];
220 gMC->Gspos("HHW2", 1, "ALIC", dx, r2, 0., 0, "ONLY");
221 gMC->Gspos("HHW2", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
223 trapar[4] = w1 + cm / 2.;
225 trapar[6] = TMath::ATan(.5) * kRaddeg;
226 trapar[7] = trapar[3];
227 trapar[8] = trapar[4];
228 trapar[9] = trapar[5];
229 trapar[10] = trapar[6];
230 dx = 1170. - trapar[4] * .5 - trapar[5] * .5;
231 gMC->Gsvolu("HHW3", "TRAP", idtmed[1956], trapar, 11);
232 r2 = trapar[3] - 896.;
233 gMC->Gspos("HHW3", 1, "ALIC", dx, r2, 0., 0, "ONLY");
234 gMC->Gspos("HHW3", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
242 gMC->Gsvolu("HHC1", "TUBS", idtmed[1956], tspar, 5);
243 gMC->Gspos("HHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY");
244 trdpar[0] = 1170 - trapar[4] * 2.;
245 trdpar[1] = trdpar[0] + TMath::Tan(phim * kDegrad) * 76.;
248 gMC->Gsvolu("HHF2", "TRD1", idtmed[1956], trdpar, 4);
249 gMC->Gspos("HHF2", 1, "ALIC", 0., -858., 0., idrotm[1900], "ONLY");
251 // pillars for working platform
256 gMC->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3);
257 gMC->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY");
258 gMC->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY");
260 // simple concrete beam shield
274 gMC->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10);
275 gMC->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY");
278 //_____________________________________________________________________________
279 void AliHALL::CreateMaterials()
282 // Create materials for the experimental hall
286 Int_t isxfld = gAlice->Field()->Integ();
287 Float_t sxmgmx = gAlice->Field()->Max();
289 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
290 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
291 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
293 Float_t epsil, stmin, deemax, tmaxfd, stemax;
297 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
298 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
299 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
300 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
301 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
302 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
303 AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
304 AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
305 AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
308 // Defines tracking media parameters.
309 // Les valeurs sont commentees pour laisser le defaut
310 // a GEANT (version 3-21, page CONS200), f.m.
311 epsil = .001; // Tracking precision,
312 stemax = -1.; // Maximum displacement for multiple scat
313 tmaxfd = -20.; // Maximum angle due to field deflection
314 deemax = -.3; // Maximum fractional energy loss, DLS
320 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
321 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
322 AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
326 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
327 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
328 AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
332 AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
333 AliMedium(37, "CC_C1 ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
334 AliMedium(57, "CC_C2 ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
337 //_____________________________________________________________________________
341 // Initialise the HALL after it has been built
346 printf("\n%s: ",ClassName());
347 for(i=0;i<35;i++) printf("*");
348 printf(" HALL_INIT ");
349 for(i=0;i<35;i++) printf("*");
350 printf("\n%s: ",ClassName());
352 // Here the HALL initialisation code (if any!)
353 for(i=0;i<80;i++) printf("*");
358 //_____________________________________________________________________________
359 void AliHALL::DrawModule() const
362 // Draw a shaded view of Experimental Hall
365 // Set everything unseen
366 gMC->Gsatt("*", "seen", -1);
368 // Set ALIC mother transparent
369 gMC->Gsatt("ALIC","SEEN",0);
371 // Set the volumes visible
372 gMC->Gsatt("HUFL","seen",1);
373 gMC->Gsatt("HUWA","seen",1);
374 gMC->Gsatt("HUP2","seen",1);
375 gMC->Gsatt("HEW1","seen",1);
376 gMC->Gsatt("HHF1","seen",1);
377 gMC->Gsatt("HHW1","seen",1);
378 gMC->Gsatt("HBW1","seen",1);
379 gMC->Gsatt("HHW2","seen",1);
380 gMC->Gsatt("HHW3","seen",1);
381 gMC->Gsatt("HHC1","seen",1);
382 gMC->Gsatt("HHF2","seen",1);
383 gMC->Gsatt("HPIL","seen",1);
384 gMC->Gsatt("HMBS","seen",1);
385 gMC->Gsatt("HBBS","seen",1);
386 gMC->Gsatt("HPBS","seen",1);
387 gMC->Gsatt("HXFI","seen",1);
388 gMC->Gsatt("HXII","seen",1);
390 gMC->Gdopt("hide", "on");
391 gMC->Gdopt("shad", "on");
392 gMC->Gsatt("*", "fill", 7);
393 gMC->SetClipBox(".");
394 if (gAlice->GetModule("ZDC") == 0) {
396 // ZDC is not present
398 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
400 gMC->Gdraw("alic", 40, 30, 0, 12, 7.5, .005, .005);
405 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 16000);
407 gMC->Gdraw("alic", 40, 30, 0, 17.5, 10, .0019, .0019);
409 gMC->Gdhead(1111, "Experimental Hall");
410 gMC->Gdman(18, 2, "MAN");