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 // 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 //
27 <img src="picts/AliCRTClass.gif">
29 <p>The responsible person for this module is
30 <a href="mailto:Enrique.Gamez.Flores@cern.ch">Enrique Gamez Flores</a>.
38 ///////////////////////////////////////////////////////////////////////////////
43 #include <TVirtualMC.h>
49 //#include "AliCRThit.h"
50 #include "AliCRTModule.h"
54 //_____________________________________________________________________________
60 // Default constructor
64 //_____________________________________________________________________________
65 AliCRT::AliCRT(const char *name, const char *title)
66 : AliDetector(name, title),
70 // Standard constructor
72 //fHits = new TClonesArray("AliCRThit", 400);
73 //gAlice->GetMCApp()->AddHitList(fHits);
76 //_____________________________________________________________________________
77 AliCRT::AliCRT(const AliCRT& crt)
87 //_____________________________________________________________________________
93 if ( fModule ) { delete fModule; fModule = 0; }
96 //_____________________________________________________________________________
97 AliCRT& AliCRT::operator=(const AliCRT& crt)
100 // Asingment operator.
106 //_____________________________________________________________________________
107 void AliCRT::CreateMaterials()
109 // Magnatic field inside the pit
110 Int_t isxfld = gAlice->Field()->Integ();
111 Float_t sxmgmx = gAlice->Field()->Max();
113 //Magnetic field above the Magnet.
114 Int_t xfield = 0; // no Magnetic field.
116 Float_t xepsil = 0.1; // Tracking precission in cm. obove the pit
118 // --- Define the various materials for GEANT ---
119 Float_t epsil, stmin, tmaxfd, deemax, stemax;
122 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
123 AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
124 AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
127 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
128 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
129 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
132 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
133 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
134 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
135 AliMaterial(75, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
136 AliMaterial(95, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
139 // Scintillator material polystyrene
140 Float_t aP[2] = {12.011, 1.00794};
141 Float_t zP[2] = {6.0, 1.0};
142 Float_t wP[2] = {1.0, 1.0};
144 AliMixture(13, "Polystyrene$", aP, zP, dP, -2, wP);
145 // Subalpine Molasse over the ALICE hall.
146 Float_t aMolasse[10] = { 1., 12.01, 15.994, 22.99, 24.305, 26.98, 28.086, 39.1, 40.08, 55.85 };
147 Float_t zMolasse[10] = {1., 6., 8., 11., 12., 13., 14., 19., 20., 26.};
148 Float_t wMolasse[10] = {0.008, 0.043, 0.485, 0.007, 0.042, 0.037, 0.215, 0.023, 0.1, 0.04};
149 Float_t dMolasse = 2.40;
150 AliMixture(24, "Molasse$", aMolasse, zMolasse, dMolasse, 10, wMolasse);
153 // Defines tracking media parameters.
154 // Les valeurs sont commentees pour laisser le defaut
155 // a GEANT (version 3-21, page CONS200), f.m.
156 epsil = .001; // Tracking precision, Inside the pit
157 stemax = -1.; // Maximum displacement for multiple scattering
158 tmaxfd = -20.; // Maximum angle due to field deflection
159 deemax = -.3; // Maximum fractional energy loss, DLS
163 Float_t atmaxfd = 10.;
164 Float_t adeemax = -0.1;
165 Float_t aepsil = 0.1;
166 Float_t astmin = -10.;
170 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
171 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
172 AliMedium(49, "ALU_C2 ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
175 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
176 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
177 AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
180 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
181 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
182 AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
183 AliMedium(75, "AIR_C4 ", 75, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
184 AliMedium(95, "AIR_C5 ", 95, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
188 // The scintillator of the CPV made of Polystyrene
189 // scintillator -> idtmed[1112]
190 AliMedium(12 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
191 AliMedium(13 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
192 AliMedium(14 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
194 // Molasse -> idtmed[1123]
195 AliMedium(24 , "Molasse ", 24, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
197 // Concrete, in case if we need to put hte shafts by ourselves.
199 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
200 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
201 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
203 AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
205 AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
206 AliMedium(27, "CC_C1 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // MX24
207 AliMedium(37, "CC_C2 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // PM25
208 AliMedium(47, "CC_C3 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // PGC2
212 //_____________________________________________________________________________
213 void AliCRT::SetTreeAddress()
218 sprintf(branchname,"%s",GetName());
219 // Branch address for hit tree
220 TTree *treeH = fLoader->TreeH();
222 branch = treeH->GetBranch(branchname);
223 if (branch) branch->SetAddress(&fHits);
227 //_____________________________________________________________________________
228 void AliCRT::MakeBranch(Option_t* opt)
231 // Initializes the branches of the CRT inside the trees written
234 const char* oH = strstr(opt, "H");
235 if ( fLoader->TreeH() && oH && (fHits == 0x0) ) {
236 fHits = new TClonesArray("AliCRThit", 1000);
239 AliDetector::MakeBranch(opt);