]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFReconstructor.cxx
Reducing logs for FDR
[u/mrichter/AliRoot.git] / TOF / AliTOFReconstructor.cxx
CommitLineData
121a60bd 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
5c7c93fa 24//#include "TFile.h"
6b025efd 25#include "TObjArray.h"
26#include "TString.h"
d08a92dd 27
28#include "AliLog.h"
0e46b9ae 29#include "AliRawReader.h"
d08a92dd 30
0e46b9ae 31#include "AliTOFClusterFinder.h"
a98acac1 32#include "AliTOFcalib.h"
d88fbf15 33#include "AliTOFtrackerMI.h"
0e46b9ae 34#include "AliTOFtracker.h"
eeef0c5d 35#include "AliTOFtrackerV1.h"
d08a92dd 36#include "AliTOFReconstructor.h"
121a60bd 37
0e46b9ae 38class TTree;
5c7c93fa 39//class TFile;
40//class TDirectory;
0e46b9ae 41
af885e0f 42class AliESDEvent;
0e46b9ae 43
5c7c93fa 44//extern TDirectory *gDirectory;
45//extern TFile *gFile;
0e46b9ae 46
121a60bd 47ClassImp(AliTOFReconstructor)
48
a98acac1 49 //____________________________________________________________________
50AliTOFReconstructor::AliTOFReconstructor()
51 : AliReconstructor(),
a98acac1 52 fTOFcalib(0)
53{
54//
55// ctor
56//
6b025efd 57
a98acac1 58 //Retrieving the TOF calibration info
ba66add8 59 fTOFcalib = new AliTOFcalib();
60 fTOFcalib->CreateCalArrays();
61 if(!fTOFcalib->ReadParOnlineFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
62 if(!fTOFcalib->ReadParOfflineFromCDB("TOF/Calib",-1)) {AliFatal("Exiting, no CDB object found!!!");exit(0);}
a98acac1 63}
64
65//------------------------------------------------------------------------
66AliTOFReconstructor::AliTOFReconstructor(const AliTOFReconstructor &source)
67 : AliReconstructor(),
a98acac1 68 fTOFcalib(0)
69{
70//
71// copy ctor
72//
a98acac1 73 this->fTOFcalib=source.fTOFcalib;
74}
75
76//------------------------------------------------------------------------
77AliTOFReconstructor & AliTOFReconstructor::operator=(const AliTOFReconstructor &source)
78{
79//
80// assignment op.
81//
a98acac1 82 this->fTOFcalib=source.fTOFcalib;
83 return *this;
84}
85//_____________________________________________________________________________
86AliTOFReconstructor::~AliTOFReconstructor()
87{
88//
89// dtor
90//
a98acac1 91 delete fTOFcalib;
92}
93
d08a92dd 94//_____________________________________________________________________________
95void AliTOFReconstructor::Reconstruct(AliRawReader *rawReader,
96 TTree *clustersTree) const
97{
98// reconstruct clusters from Raw Data
99
a98acac1 100 AliTOFClusterFinder tofClus(fTOFcalib);
d08a92dd 101 tofClus.Digits2RecPoints(rawReader, clustersTree);
121a60bd 102
103}
104
a98acac1 105//_____________________________________________________________________________
106void AliTOFReconstructor::Reconstruct(TTree *digitsTree,
107 TTree *clustersTree) const
108{
109// reconstruct clusters from Raw Data
110
111 AliDebug(2,Form("Global Event loop mode: Creating Recpoints from Digits Tree"));
112 AliTOFClusterFinder tofClus(fTOFcalib);
113 tofClus.Digits2RecPoints(digitsTree, clustersTree);
114
115}
116//_____________________________________________________________________________
117 void AliTOFReconstructor::ConvertDigits(AliRawReader* reader, TTree* digitsTree) const
118{
119// reconstruct clusters from digits
120
121 AliDebug(2,Form("Global Event loop mode: Converting Raw Data to a Digits Tree"));
122 AliTOFClusterFinder tofClus(fTOFcalib);
123 tofClus.Raw2Digits(reader, digitsTree);
124
125}
126
121a60bd 127//_____________________________________________________________________________
d76c31f4 128AliTracker* AliTOFReconstructor::CreateTracker() const
121a60bd 129{
130// create a TOF tracker
131
d88fbf15 132 TString selectedTracker = GetOption();
133 // use MI tracker if selected
bc9f08da 134 if (selectedTracker.Contains("MI")) return new AliTOFtrackerMI();
eeef0c5d 135 if (selectedTracker.Contains("V1")) return new AliTOFtrackerV1();
bc9f08da 136 return new AliTOFtracker();
121a60bd 137}
138