]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CRT/AliCRT.cxx
AliHBTParticle::fgDebug --> AliHBTParticle::GetDebug()
[u/mrichter/AliRoot.git] / CRT / AliCRT.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 /* $Id$ */
17
18 ///////////////////////////////////////////////////////////////////////////////
19 //                                                                           //
20 //  Cosmic Rays ALICE Trigger                                                //
21 //  This class contains the basic functions for the Cosmic Ray ALICE         //
22 //  detector. Functions specific to one particular geometry are              //
23 //  contained in the derived classes                                         //
24 //
25 // Begin_Html
26 /*
27 <img src="picts/AliCRTClass.gif">
28 </pre>
29 <p>The responsible person for this module is
30 <a href="mailto:Enrique.Gamez.Flores@cern.ch">Enrique Gamez Flores</a>.
31 </font>
32 <pre>
33 */
34 //End_Html
35 //             
36 //
37 //                                                                           //
38 ///////////////////////////////////////////////////////////////////////////////
39
40 #include "AliCRT.h"
41
42 #include <TTree.h>
43
44 #include "AliRun.h"
45 #include "AliMagF.h"
46
47 #include "AliCRTModule.h"
48
49 ClassImp(AliCRT)
50
51 //_____________________________________________________________________________
52 AliCRT::AliCRT()
53   : AliDetector(),
54     fModule(0)
55 {
56   //
57   // Default constructor
58   //
59 }
60  
61 //_____________________________________________________________________________
62 AliCRT::AliCRT(const char *name, const char *title)
63   : AliDetector(name, title),
64     fModule(0)
65 {
66   //
67   // Standard constructor
68   //
69 }
70
71 //_____________________________________________________________________________
72 AliCRT::AliCRT(const AliCRT& crt)
73   : AliDetector(crt),
74     fModule(crt.fModule)
75 {
76   //
77   // Copy constructor
78   //
79   crt.Copy(*this);
80 }
81
82 //_____________________________________________________________________________
83 AliCRT::~AliCRT()
84 {
85   //
86   // Default destructor
87   //
88   if ( fModule ) { delete fModule; fModule = 0; }
89 }
90
91 //_____________________________________________________________________________
92 AliCRT& AliCRT::operator=(const AliCRT& crt)
93 {
94   //
95   // Asingment operator.
96   //
97   crt.Copy(*this);
98   return *this;
99 }
100
101 //_____________________________________________________________________________
102 void AliCRT::CreateMaterials()
103 {
104   // Magnatic field inside the pit
105   Int_t   isxfld = gAlice->Field()->Integ();
106   Float_t sxmgmx = gAlice->Field()->Max();
107
108   //Magnetic field above the Magnet.
109   Int_t xfield = 0;   // no Magnetic field.
110   Float_t xfieldm = 0;
111   Float_t xepsil = 0.1; // Tracking precission in cm. obove the pit
112
113   // --- Define the various materials for GEANT --- 
114   Float_t epsil, stmin, tmaxfd, deemax, stemax;
115   //
116   //     Aluminum 
117   AliMaterial(9,  "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
118   AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
119   AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
120   //
121   //     Iron 
122   AliMaterial(10, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
123   AliMaterial(30, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
124   AliMaterial(50, "IRON$     ", 55.85, 26., 7.87, 1.76, 17.1);
125   //
126   //     Air 
127   AliMaterial(15, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500.);
128   AliMaterial(35, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500.);
129   AliMaterial(55, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500.);
130   AliMaterial(75, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500.);
131   AliMaterial(95, "AIR$      ", 14.61, 7.3, .001205, 30423.24, 67500.);
132
133
134   // Scintillator material polystyrene 
135   Float_t aP[2] = {12.011, 1.00794};
136   Float_t zP[2] = {6.0, 1.0};
137   Float_t wP[2] = {1.0, 1.0};
138   Float_t dP = 1.032;
139   AliMixture(13, "Polystyrene$", aP, zP, dP, -2, wP);
140   // Subalpine Molasse over the ALICE hall. 
141   Float_t aMolasse[10] = { 1., 12.01, 15.994, 22.99, 24.305, 26.98, 28.086, 39.1, 40.08, 55.85 };
142   Float_t zMolasse[10] = {1., 6., 8., 11., 12., 13., 14., 19., 20., 26.};
143   Float_t wMolasse[10] = {0.008, 0.043, 0.485, 0.007, 0.042, 0.037, 0.215, 0.023, 0.1, 0.04};
144   Float_t dMolasse = 2.40;
145   AliMixture(24, "Molasse$", aMolasse, zMolasse, dMolasse, 10, wMolasse);
146
147   // **************** 
148   //     Defines tracking media parameters. 
149   //     Les valeurs sont commentees pour laisser le defaut 
150   //     a GEANT (version 3-21, page CONS200), f.m. 
151   epsil  = .001;  // Tracking precision, Inside the pit
152   stemax = -1.;   // Maximum displacement for multiple scattering 
153   tmaxfd = -20.;  // Maximum angle due to field deflection 
154   deemax = -.3;   // Maximum fractional energy loss, DLS 
155   stmin  = -.8;
156   // *************** 
157
158   Float_t atmaxfd = 10.;
159   Float_t adeemax = -0.1;
160   Float_t aepsil = 0.1;
161   Float_t astmin = -10.;
162
163   //
164   //    Aluminum 
165   AliMedium(9,  "ALU_C0          ",  9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
166   AliMedium(29, "ALU_C1          ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
167   AliMedium(49, "ALU_C2          ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
168   //
169   //    Iron 
170   AliMedium(10, "FE_C0           ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
171   AliMedium(30, "FE_C1           ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
172   AliMedium(50, "FE_C2           ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
173   //
174   //    Air 
175   AliMedium(15, "AIR_C0          ", 15, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
176   AliMedium(35, "AIR_C1          ", 35, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
177   AliMedium(55, "AIR_C2          ", 55, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
178   AliMedium(75, "AIR_C4          ", 75, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
179   AliMedium(95, "AIR_C5          ", 95, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
180
181
182
183   // The scintillator of the CPV made of Polystyrene 
184   // scintillator -> idtmed[1112]
185   AliMedium(12 , "CPV scint.      ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
186   AliMedium(13 , "CPV scint.      ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
187   AliMedium(14 , "CPV scint.      ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
188
189   //     Molasse -> idtmed[1123]
190   AliMedium(24 , "Molasse         ", 24, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
191
192   // Concrete, in case if we need to put hte shafts by ourselves.
193
194   Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
195   Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
196   Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
197
198   AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
199   //    Concrete 
200   AliMedium(17, "CC_C0            ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
201   AliMedium(27, "CC_C1            ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // MX24
202   AliMedium(37, "CC_C2            ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // PM25
203   AliMedium(47, "CC_C3            ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // PGC2
204
205 }
206
207 //_____________________________________________________________________________
208 void AliCRT::SetTreeAddress()
209 {
210
211   TBranch *branch;
212   char branchname[20];
213   sprintf(branchname,"%s",GetName());
214
215   // Branch address for hit tree
216   TTree *treeH = fLoader->TreeH();
217   if (treeH && fHits) {
218     branch = treeH->GetBranch(branchname);
219     if (branch) branch->SetAddress(&fHits);
220   }
221 }