]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliHALL.cxx
- fixed a bug that didn't allow the overlaid histograms to be plotted because of...
[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
eeacf08b 16/* $Id$ */
4c039060 17
fe4da5cc 18///////////////////////////////////////////////////////////////////////////////
19// //
20// Experimental Hall //
21// This class contains the description of the experimental hall //
22// //
23//Begin_Html
24/*
1439f98e 25<img src="picts/AliHALLClass.gif">
fe4da5cc 26</pre>
27<br clear=left>
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>.
31</font>
32<pre>
33*/
34//End_Html
35// //
36// //
37///////////////////////////////////////////////////////////////////////////////
38
f7a1cc68 39#include <TGeoGlobalMagField.h>
88cb7938 40#include <TVirtualMC.h>
41
42#include "AliConst.h"
fe4da5cc 43#include "AliHALL.h"
94de3818 44#include "AliMagF.h"
88cb7938 45#include "AliRun.h"
4951e003 46#include "AliLog.h"
fe4da5cc 47
48ClassImp(AliHALL)
49
50//_____________________________________________________________________________
b8032157 51AliHALL::AliHALL()
fe4da5cc 52{
53 //
54 // Default constructor for the experimental Hall
55 //
56}
57
58//_____________________________________________________________________________
59AliHALL::AliHALL(const char *name, const char *title)
b8032157 60 : AliModule(name,title)
fe4da5cc 61{
62 //
63 // Standard constructor for the experimental Hall
64 //
e939a978 65 //PH SetMarkerColor(7);
66 //PH SetMarkerStyle(2);
67 //PH SetMarkerSize(0.4);
fe4da5cc 68}
69
fe4da5cc 70//_____________________________________________________________________________
71void AliHALL::CreateGeometry()
72{
73 //
74 // Create the geometry of the exprimental hall
75 //
76 //Begin_Html
77 /*
1439f98e 78 <img src="picts/AliHALLTree.gif">
fe4da5cc 79 */
80 //End_Html
81 //
82 // If ZDC is not present the experimental hall includes a short
83 // section of the accelerator tunnel
84 //
85 //Begin_Html
86 /*
1439f98e 87 <img src="picts/AliHALLSmall.gif">
fe4da5cc 88 */
89 //End_Html
90 //
91 // If ZDC is present the experimental hall includes the accelerator
92 // tunnel beyond the ZDC
93 //
94 //Begin_Html
95 /*
1439f98e 96 <img src="picts/AliHALLLarge.gif">
fe4da5cc 97 */
98 //End_Html
99
100
fe4da5cc 101 Float_t r2;
9c671c0f 102 Float_t phid, phim, pbox[3], h, r, tspar[5];
fe4da5cc 103 Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
104 Int_t idrotm[1999];
105 Float_t trdpar[4], trapar[11], hullen;
60404de7 106 Float_t phi;
fe4da5cc 107
ad51aeb0 108 Int_t *idtmed = fIdtmed->GetArray()-1899;
fe4da5cc 109
fe4da5cc 110 // RB24/26 TUNNEL FLOOR
111
112 r = 220.;
113 h = 140.;
114 phi = TMath::ACos(h / r);
115 xl = r * TMath::Sin(phi);
099f87ce 116 dr = 1600.;
fe4da5cc 117 dh = dr * TMath::Cos(phi);
118 dl = dr * TMath::Sin(phi);
b8032157 119 if (gAlice->GetModule("ZDC") == 0) {
fe4da5cc 120
121 // No ZDC
099f87ce 122 hullen = 370.;
fe4da5cc 123 } else {
124
125 // ZDC is present
099f87ce 126 hullen = 6520.;
fe4da5cc 127 }
128 trdpar[0] = xl + dl;
129 trdpar[1] = xl;
130 trdpar[2] = hullen;
131 trdpar[3] = dh / 2.;
132 AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.);
133 AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.);
cfce8870 134 gMC->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4);
099f87ce 135 r2 = hullen + 1900.;
299e56a5 136 gMC->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY");
fe4da5cc 137
138 // RB24/26 wall
139
140 phid = phi * 57.296;
141 tspar[0] = r;
142 tspar[1] = r + dr;
143 tspar[2] = hullen;
144 tspar[3] = phid - 90.;
145 tspar[4] = 270. - phid;
cfce8870 146 gMC->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5);
099f87ce 147 gMC->Gspos("HUWA", 1, "ALIC", 70., 40., -1900 - hullen , 0, "ONLY");
fe4da5cc 148
9c671c0f 149
2d4282ac 150 // Hall floor
fe4da5cc 151
152 phid = 16.197;
153 trdpar[0] = 700.;
154 trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.;
155 trdpar[2] = 550.;
156 trdpar[3] = 95.;
cfce8870 157 gMC->Gsvolu("HHF1", "TRD1", idtmed[1956], trdpar, 4);
158 gMC->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY");
159 gMC->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY");
fe4da5cc 160
2d4282ac 161 // Hall side walls
fe4da5cc 162
163 trapar[0] = 550.;
164 trapar[1] = 0.;
165 trapar[2] = 0.;
166 trapar[3] = 1273.78/2;
167 trapar[4] = 235.;
168 trapar[5] = 50.;
169 trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
170 trapar[7] = trapar[3];
171 trapar[8] = trapar[4];
172 trapar[9] = trapar[5];
173 trapar[10] = trapar[6];
174 dx = trapar[4] * 1.5 + 700. - trapar[5] * .5;
cfce8870 175 gMC->Gsvolu("HHW1", "TRAP", idtmed[1956], trapar, 11);
176 gMC->Gspos("HHW1", 1, "ALIC", dx, -896+trapar[3], 1350., 0, "ONLY");
177 gMC->Gspos("HHW1", 2, "ALIC",-dx, -896+trapar[3], 1350., idrotm[1901], "ONLY");
178 gMC->Gspos("HHW1", 3, "ALIC", dx, -896+trapar[3], -1350., 0, "ONLY");
179 gMC->Gspos("HHW1", 4, "ALIC",-dx, -896+trapar[3], -1350., idrotm[1901], "ONLY");
fe4da5cc 180 pbox[0] = 50.;
181 pbox[1] = (500. - (trapar[3] * 2. - 896.)) / 2.;
182 pbox[2] = 1900.;
cfce8870 183 gMC->Gsvolu("HBW1", "BOX ", idtmed[1956], pbox, 3);
184 gMC->Gspos("HBW1", 1, "ALIC", 1120., 500-pbox[1], 0., 0, "ONLY");
185 gMC->Gspos("HBW1", 2, "ALIC", -1120., 500-pbox[1], 0., 0, "ONLY");
fe4da5cc 186
187 // slanted wall close to L3 magnet
188
189 phim = 45.;
190 hm = 790.;
191 //rm = hm / TMath::Cos(phim / 2. * kDegrad);
192 am = hm * TMath::Tan(phim / 2. * kDegrad);
193 bm = (hm + 76.) / hm * am;
194 cm = bm * 2. / TMath::Sqrt(2.);
195 trapar[0] = 800.;
196 trapar[1] = 0.;
197 trapar[2] = 0.;
198 trapar[3] = (1273.78 - cm) / 2.;
199 trapar[4] = 235. - cm * TMath::Tan(phid * kDegrad) / 2.;
200 trapar[5] = 50.;
201 trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
202 trapar[7] = trapar[3];
203 trapar[8] = trapar[4];
204 trapar[9] = trapar[5];
205 trapar[10] = trapar[6];
206 w1 = trapar[4];
207 dx = cm*TMath::Tan(phid * kDegrad) + 700. + trapar[4] * 1.5 - trapar[5] * .5;
cfce8870 208 gMC->Gsvolu("HHW2", "TRAP", idtmed[1956], trapar, 11);
fe4da5cc 209 r2 = cm - 896. + trapar[3];
cfce8870 210 gMC->Gspos("HHW2", 1, "ALIC", dx, r2, 0., 0, "ONLY");
211 gMC->Gspos("HHW2", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
fe4da5cc 212 trapar[3] = cm / 2.;
213 trapar[4] = w1 + cm / 2.;
214 trapar[5] = w1;
215 trapar[6] = TMath::ATan(.5) * kRaddeg;
216 trapar[7] = trapar[3];
217 trapar[8] = trapar[4];
218 trapar[9] = trapar[5];
219 trapar[10] = trapar[6];
220 dx = 1170. - trapar[4] * .5 - trapar[5] * .5;
cfce8870 221 gMC->Gsvolu("HHW3", "TRAP", idtmed[1956], trapar, 11);
fe4da5cc 222 r2 = trapar[3] - 896.;
cfce8870 223 gMC->Gspos("HHW3", 1, "ALIC", dx, r2, 0., 0, "ONLY");
224 gMC->Gspos("HHW3", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
fe4da5cc 225
226
227 tspar[0] = 1070.;
228 tspar[1] = 1170.;
229 tspar[2] = 1900.;
230 tspar[3] = 0.;
231 tspar[4] = 180.;
cfce8870 232 gMC->Gsvolu("HHC1", "TUBS", idtmed[1956], tspar, 5);
233 gMC->Gspos("HHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY");
fe4da5cc 234 trdpar[0] = 1170 - trapar[4] * 2.;
235 trdpar[1] = trdpar[0] + TMath::Tan(phim * kDegrad) * 76.;
236 trdpar[2] = 800.;
237 trdpar[3] = 38.;
cfce8870 238 gMC->Gsvolu("HHF2", "TRD1", idtmed[1956], trdpar, 4);
239 gMC->Gspos("HHF2", 1, "ALIC", 0., -858., 0., idrotm[1900], "ONLY");
fe4da5cc 240
241 // pillars for working platform
242
243 pbox[0] = 40.;
9b21f9d2 244 pbox[1] = 96.;
fe4da5cc 245 pbox[2] = 550.;
cfce8870 246 gMC->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3);
299e56a5 247 gMC->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY");
248 gMC->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY");
fe4da5cc 249
43707c21 250 // simple concrete beam shield
fe4da5cc 251
43707c21 252 Float_t ppgon[10];
253 ppgon[0] = 45.;
254 ppgon[1] = 360.;
255 ppgon[2] = 4.;
256 ppgon[3] = 2.;
299e56a5 257 ppgon[7] = 1800.;
43707c21 258 ppgon[8] = 150.;
259 ppgon[9] = 250.;
299e56a5 260 ppgon[4] = 720.;
261 ppgon[5] = 150.;
262 ppgon[6] = 250.;
43707c21 263
264 gMC->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10);
265 gMC->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY");
fe4da5cc 266}
267
268//_____________________________________________________________________________
269void AliHALL::CreateMaterials()
270{
271 //
272 // Create materials for the experimental hall
273 //
def952f1 274
275 Int_t isxfld = 0;
f7a1cc68 276 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
fe4da5cc 277
278 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
279 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
280 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
281
002b3738 282 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
283 Float_t zAir[4]={6.,7.,8.,18.};
284 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
285 Float_t dAir = 1.20479E-3;
286
2d4282ac 287// Steel
288 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
289 Float_t zsteel[4] = { 26.,24.,28.,14. };
290 Float_t wsteel[4] = { .715,.18,.1,.005 };
291
fe4da5cc 292 Float_t epsil, stmin, deemax, tmaxfd, stemax;
293
fe4da5cc 294
4a9de4af 295 AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir);
296 AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir);
297 AliMixture(55, "AIR2$ ", aAir, zAir, dAir, 4, wAir);
002b3738 298
4a9de4af 299 AliMixture(17, "CONCRETE0$", aconc, zconc, 2.35, 10, wconc);
300 AliMixture(37, "CONCRETE1$", aconc, zconc, 2.35, 10, wconc);
301 AliMixture(57, "CONCRETE2$", aconc, zconc, 2.35, 10, wconc);
2d4282ac 302
303 // Stainless Steel
304 AliMixture(10, "STAINLESS STEEL1", asteel, zsteel, 7.88, 4, wsteel);
305 AliMixture(30, "STAINLESS STEEL2", asteel, zsteel, 7.88, 4, wsteel);
306 AliMixture(50, "STAINLESS STEEL3", asteel, zsteel, 7.88, 4, wsteel);
fe4da5cc 307
308 // ****************
309 // Defines tracking media parameters.
310 // Les valeurs sont commentees pour laisser le defaut
311 // a GEANT (version 3-21, page CONS200), f.m.
312 epsil = .001; // Tracking precision,
313 stemax = -1.; // Maximum displacement for multiple scat
314 tmaxfd = -20.; // Maximum angle due to field deflection
315 deemax = -.3; // Maximum fractional energy loss, DLS
316 stmin = -.8;
317 // ***************
318
2d4282ac 319 // Stainless Steel
320 AliMedium(10, "STST_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
321 AliMedium(30, "STST_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
322 AliMedium(50, "STST_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
fe4da5cc 323
324 // Air
325
b43eb0dc 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);
fe4da5cc 329
330 // Concrete
331
b43eb0dc 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);
fe4da5cc 335}
336
337//_____________________________________________________________________________
338void AliHALL::Init()
339{
340 //
341 // Initialise the HALL after it has been built
342 //
343 Int_t i;
344 //
4951e003 345 if(AliLog::GetGlobalDebugLevel()>0) {
9e1a0ddb 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());
351 //
352 // Here the HALL initialisation code (if any!)
353 for(i=0;i<80;i++) printf("*");
354 printf("\n");
355 }
fe4da5cc 356}
357