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