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