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 Revision 1.1 2002/06/16 17:08:19 hristov
24 ///////////////////////////////////////////////////////////////////////////////
26 // Cosmic Rays ALICE Trigger //
27 // This class contains the basic functions for the Cosmic Ray ALICE //
28 // detector. Functions specific to one particular geometry are //
29 // contained in the derived classes //
33 <img src="picts/AliCRTClass.gif">
35 <p>The responsible person for this module is
36 <a href="mailto:Enrique.Gamez.Flores@cern.ch">Enrique Gamez Flores</a>.
44 ///////////////////////////////////////////////////////////////////////////////
58 #include "AliCRTConstants.h"
59 #include "AliCRTdigit.h"
60 #include "AliCRThit.h"
66 static AliCRTdigit *digits;
68 //_____________________________________________________________________________
72 // Default constructor for L3 magnet
80 //_____________________________________________________________________________
81 AliCRT::AliCRT(const char *name, const char *title)
82 : AliDetector(name,title)
85 // Standard constructor for the CRT module
88 fIshunt = 1; // All hits are associated with primary particles
90 fHits = new TClonesArray("AliCRThit",400) ;
91 fDigits = new TClonesArray("AliCRTdigit",400) ;
93 gAlice->AddHitList(fHits);
101 //_____________________________________________________________________________
105 // Standar destructor.
113 //_____________________________________________________________________________
114 void AliCRT::AddHit(Int_t track, Int_t *vol, Float_t *hits)
119 TClonesArray &lhits = *fHits;
120 new(lhits[fNhits++]) AliCRThit(fIshunt,track,vol,hits);
123 //_____________________________________________________________________________
124 void AliCRT::AddDigit(Int_t *tracks,Int_t *digits)
127 // Add a CRT digit to the list. Dummy function.
131 //_____________________________________________________________________________
132 void AliCRT::Init() const
141 printf("\n%s: ",ClassName());
142 for(i=0;i<35;i++) printf("*");
143 printf(" CRT_INIT ");
144 for(i=0;i<35;i++) printf("*");
145 printf("\n%s: ",ClassName());
147 // Here the CRT initialisation code (if any!)
148 for(i=0;i<80;i++) printf("*");
153 //_____________________________________________________________________________
154 void AliCRT::ResetHits ()
156 // Reset number of clusters and the cluster array for this detector
157 AliDetector::ResetHits ();
160 //_____________________________________________________________________________
161 void AliCRT::ResetDigits ()
164 // Reset number of digits and the digits array for this detector
165 AliDetector::ResetDigits ();
169 //____________________________________________________________________________
170 void AliCRT::FinishEvent()
175 //_____________________________________________________________________________
176 void AliCRT::BuildGeometry()
179 // Build simple ROOT TNode geometry for event display
183 //_____________________________________________________________________________
184 void AliCRT::CreateGeometry()
187 // Build simple ROOT TNode geometry for GEANT simulations
191 //_____________________________________________________________________________
192 void AliCRT::CreateMaterials()
194 // Magnatic field inside the pit
195 Int_t isxfld = gAlice->Field()->Integ();
196 Float_t sxmgmx = gAlice->Field()->Max();
198 //Magnetic field above the Magnet.
199 Int_t xfield = 0; // no Magnetic field.
201 Float_t xepsil = 0.1; // Tracking precission in cm. obove the pit
203 // --- Define the various materials for GEANT ---
204 Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
205 Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
206 Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
208 Float_t epsil, stmin, tmaxfd, deemax, stemax;
211 AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
212 AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
213 AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
216 AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
217 AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
218 AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1);
221 AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
222 AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
223 AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.);
226 AliMaterial(16, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
227 AliMaterial(36, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
228 AliMaterial(56, "VACUUM$ ", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
231 AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
232 AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
233 AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
236 // Scintillator material polystyrene
237 Float_t aP[2] = {12.011, 1.00794};
238 Float_t zP[2] = {6.0, 1.0};
239 Float_t wP[2] = {1.0, 1.0};
241 AliMixture(3, "Polystyrene$", aP, zP, dP, -2, wP);
242 // Standard ROCK, ROCK1 and molasse.
243 Float_t aRock[1] = {22.};
244 Float_t zRock[1] = {11.};
245 Float_t wRock[1] = {1.};
246 Float_t dRock = 2.65;
247 AliMixture(4, "Standard Rock$", aRock, zRock, dRock, 1, wRock);
248 Float_t dRock1 = 2.2;
249 AliMixture(5, "Rock1$", aRock, zRock, dRock1, 1, wRock);
250 Float_t dMolasse = 2.50;
251 AliMixture(6, "Molasse$", aRock, zRock, dMolasse, 1, wRock);
254 // Defines tracking media parameters.
255 // Les valeurs sont commentees pour laisser le defaut
256 // a GEANT (version 3-21, page CONS200), f.m.
257 epsil = .001; // Tracking precision, Inside the pit
258 stemax = -1.; // Maximum displacement for multiple scattering
259 tmaxfd = -20.; // Maximum angle due to field deflection
260 deemax = -.3; // Maximum fractional energy loss, DLS
266 AliMedium(9, "ALU_C0 ", 9, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
267 AliMedium(29, "ALU_C1 ", 29, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
268 AliMedium(49, "ALU_C2 ", 49, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
271 AliMedium(10, "FE_C0 ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
272 AliMedium(30, "FE_C1 ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
273 AliMedium(50, "FE_C2 ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
276 AliMedium(15, "AIR_C0 ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
277 AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
278 AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
281 AliMedium(16, "VA_C0 ", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
282 AliMedium(36, "VA_C1 ", 36, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
283 AliMedium(56, "VA_C2 ", 56, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
286 AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
287 AliMedium(37, "CC_C1 ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
288 AliMedium(57, "CC_C2 ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
291 // The scintillator of the CPV made of Polystyrene
292 // scintillator -> idtmed[1102]
293 AliMedium(3, "CPV scint. ", 3, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
295 // Standard ROCK -> idtmed[1103]
296 AliMedium(4, "Standard Rock ", 4, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
298 // ROCK1 -> idtmed[1104]
299 AliMedium(5, "Rock 1 ", 5, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
302 // Molasse -> idtmed[1105]
303 AliMedium(6, "Molasse ", 6, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
308 //_____________________________________________________________________________
309 void AliCRT::MakeBranch(Option_t* option, const char *file)
312 // Specific CRT branches
314 // Create Tree branches for the CRT.
315 Int_t buffersize = 400;
317 sprintf(branchname,"%s",GetName());
319 AliDetector::MakeBranch(option,file);
321 const char *cD = strstr(option,"D");
324 digits = new AliCRTdigit();
325 MakeBranchInTree(gAlice->TreeD(), branchname, "AliCRTdigit",
326 digits, buffersize, 1, file);
330 //_____________________________________________________________________________