TOF library splitting and conversion of some printout messages in AliLog schema ...
[u/mrichter/AliRoot.git] / TOF / AliTOFReconstructor.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 // class for TOF reconstruction                                              //
21 //                                                                           //
22 ///////////////////////////////////////////////////////////////////////////////
23
24
25 #include "AliTOFReconstructor.h"
26 #include "AliRunLoader.h"
27 #include "AliRun.h"
28 #include "AliTOFtracker.h"
29 #include "AliLog.h"
30 #include <TFile.h>
31
32
33 ClassImp(AliTOFReconstructor)
34
35
36 //_____________________________________________________________________________
37 void AliTOFReconstructor::Reconstruct(AliRunLoader* /*runLoader*/) const
38 {
39 // nothing to be done
40
41 }
42
43 //_____________________________________________________________________________
44 AliTracker* AliTOFReconstructor::CreateTracker(AliRunLoader* runLoader) const
45 {
46 // create a TOF tracker
47
48   AliTOFGeometry* geom = GetTOFGeometry(runLoader);
49   if (!geom) return NULL;
50   Double_t parPID[] = {130., 5.};
51   return new AliTOFtracker(geom, parPID);
52 }
53
54 //_____________________________________________________________________________
55 void AliTOFReconstructor::FillESD(AliRunLoader* /*runLoader*/, 
56                                   AliESD* /*esd*/) const
57 {
58 // nothing to be done
59
60 }
61
62
63 //_____________________________________________________________________________
64 AliTOFGeometry* AliTOFReconstructor::GetTOFGeometry(AliRunLoader* runLoader) const
65 {
66 // get the TOF parameters
67
68   runLoader->CdGAFile();
69   AliTOFGeometry* tofGeom = (AliTOFGeometry*) gFile->Get("TOFGeometry"); 
70   if (!tofGeom) {
71     AliError("no TOF geometry available");
72     return NULL;
73   }
74   return tofGeom;
75 }