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 **************************************************************************/
21 ///////////////////////////////////////////////////////////////////////////////
23 // Cosmic Rays ALICE Trigger //
24 // This class contains the basic functions for the Cosmic Ray ALICE //
25 // detector. Functions specific to one particular geometry are //
26 // contained in the derived classes //
30 <img src="picts/AliCRTClass.gif">
32 <p>The responsible person for this module is
33 <a href="mailto:Enrique.Gamez.Flores@cern.ch">Enrique Gamez Flores</a>.
41 ///////////////////////////////////////////////////////////////////////////////
55 #include "AliCRTConstants.h"
56 #include "AliCRTdigit.h"
57 #include "AliCRThit.h"
63 static AliCRTdigit *digits;
65 //_____________________________________________________________________________
69 // Default constructor for L3 magnet
77 //_____________________________________________________________________________
78 AliCRT::AliCRT(const char *name, const char *title)
79 : AliDetector(name,title)
82 // Standard constructor for the CRT module
85 fIshunt = 1; // All hits are associated with primary particles
87 fHits = new TClonesArray("AliCRThit",400) ;
88 fDigits = new TClonesArray("AliCRTdigit",400) ;
90 gAlice->AddHitList(fHits);
98 //_____________________________________________________________________________
102 // Standar destructor.
110 //_____________________________________________________________________________
111 void AliCRT::AddHit(Int_t track, Int_t *vol, Float_t *hits)
116 TClonesArray &lhits = *fHits;
117 new(lhits[fNhits++]) AliCRThit(fIshunt,track,vol,hits);
120 //_____________________________________________________________________________
121 void AliCRT::AddDigit(Int_t *tracks,Int_t *digits)
124 // Add a CRT digit to the list. Dummy function.
128 //_____________________________________________________________________________
129 void AliCRT::Init() const
138 printf("\n%s: ",ClassName());
139 for(i=0;i<35;i++) printf("*");
140 printf(" CRT_INIT ");
141 for(i=0;i<35;i++) printf("*");
142 printf("\n%s: ",ClassName());
144 // Here the CRT initialisation code (if any!)
145 for(i=0;i<80;i++) printf("*");
150 //_____________________________________________________________________________
151 void AliCRT::ResetHits ()
153 // Reset number of clusters and the cluster array for this detector
154 AliDetector::ResetHits ();
157 //_____________________________________________________________________________
158 void AliCRT::ResetDigits ()
161 // Reset number of digits and the digits array for this detector
162 AliDetector::ResetDigits ();
166 //____________________________________________________________________________
167 void AliCRT::FinishEvent()
172 //_____________________________________________________________________________
173 void AliCRT::BuildGeometry()
176 // Build simple ROOT TNode geometry for event display
180 //_____________________________________________________________________________
181 void AliCRT::CreateGeometry()
184 // Build simple ROOT TNode geometry for GEANT simulations
188 //_____________________________________________________________________________
189 void AliCRT::CreateMaterials()
191 // Magnatic field inside the pit
192 Int_t isxfld = gAlice->Field()->Integ();
193 Float_t sxmgmx = gAlice->Field()->Max();
195 //Magnetic field above the Magnet.
196 Int_t xfield = 0; // no Magnetic field.
198 Float_t xepsil = 0.1; // Tracking precission in cm. obove the pit
200 // --- Define the various materials for GEANT ---
201 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
202 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
203 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
205 Float_t epsil, stmin, tmaxfd, deemax, stemax;
208 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
209 AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
210 AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
213 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
214 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
215 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
218 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
219 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
220 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
223 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
224 AliMaterial(36, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
225 AliMaterial(56, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
228 AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
229 AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
230 AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
233 // Scintillator material polystyrene
234 Float_t aP[2] = {12.011, 1.00794};
235 Float_t zP[2] = {6.0, 1.0};
236 Float_t wP[2] = {1.0, 1.0};
238 AliMixture(3, "Polystyrene$", aP, zP, dP, -2, wP);
239 // Standard ROCK, ROCK1 and molasse.
240 Float_t aRock[1] = {22.};
241 Float_t zRock[1] = {11.};
242 Float_t wRock[1] = {1.};
243 Float_t dRock = 2.65;
244 AliMixture(4, "Standard Rock$", aRock, zRock, dRock, 1, wRock);
245 Float_t dRock1 = 2.2;
246 AliMixture(5, "Rock1$", aRock, zRock, dRock1, 1, wRock);
247 Float_t dMolasse = 2.50;
248 AliMixture(6, "Molasse$", aRock, zRock, dMolasse, 1, wRock);
251 // Defines tracking media parameters.
252 // Les valeurs sont commentees pour laisser le defaut
253 // a GEANT (version 3-21, page CONS200), f.m.
254 epsil = .001; // Tracking precision, Inside the pit
255 stemax = -1.; // Maximum displacement for multiple scattering
256 tmaxfd = -20.; // Maximum angle due to field deflection
257 deemax = -.3; // Maximum fractional energy loss, DLS
263 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
264 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
265 AliMedium(49, "ALU_C2 ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
268 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
269 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
270 AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
273 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
274 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
275 AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
278 AliMedium(16, "VA_C0 ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
279 AliMedium(36, "VA_C1 ", 36, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
280 AliMedium(56, "VA_C2 ", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
283 AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
284 AliMedium(37, "CC_C1 ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
285 AliMedium(57, "CC_C2 ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
288 // The scintillator of the CPV made of Polystyrene
289 // scintillator -> idtmed[1102]
290 AliMedium(3, "CPV scint. ", 3, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
292 // Standard ROCK -> idtmed[1103]
293 AliMedium(4, "Standard Rock ", 4, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
295 // ROCK1 -> idtmed[1104]
296 AliMedium(5, "Rock 1 ", 5, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
299 // Molasse -> idtmed[1105]
300 AliMedium(6, "Molasse ", 6, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
305 //_____________________________________________________________________________
306 void AliCRT::MakeBranch(Option_t* option, const char *file)
309 // Specific CRT branches
311 // Create Tree branches for the CRT.
312 Int_t buffersize = 400;
314 sprintf(branchname,"%s",GetName());
316 AliDetector::MakeBranch(option,file);
318 const char *cD = strstr(option,"D");
321 digits = new AliCRTdigit();
322 MakeBranchInTree(gAlice->TreeD(), branchname, "AliCRTdigit",
323 digits, buffersize, 1, file);
327 //_____________________________________________________________________________