]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliReconstruction.h
Including TFile.h
[u/mrichter/AliRoot.git] / STEER / AliReconstruction.h
CommitLineData
596a855f 1#ifndef ALIRECONSTRUCTION_H
2#define ALIRECONSTRUCTION_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
af7ba10c 8///////////////////////////////////////////////////////////////////////////////
9// //
10// class for running the reconstruction //
11// Clusters and tracks are created for all detectors and all events by //
12// typing: //
13// //
14// AliReconstruction rec; //
15// rec.Run(); //
16// //
17///////////////////////////////////////////////////////////////////////////////
18
19
596a855f 20#include <TNamed.h>
21#include <TString.h>
59697224 22#include <TObjArray.h>
596a855f 23
b8cd5251 24class AliReconstructor;
596a855f 25class AliRunLoader;
b649205a 26class AliRawReader;
596a855f 27class AliLoader;
28class AliTracker;
c84a5e9e 29class AliVertexer;
596a855f 30class AliESD;
e583c30d 31class TFile;
596a855f 32
f3a97c86 33class AliRunTag;
34class AliLHCTag;
35class AliDetectorTag;
36class AliEventTag;
37
596a855f 38
39class AliReconstruction: public TNamed {
40public:
e583c30d 41 AliReconstruction(const char* gAliceFilename = "galice.root",
42 const char* name = "AliReconstruction",
596a855f 43 const char* title = "reconstruction");
44 AliReconstruction(const AliReconstruction& rec);
45 AliReconstruction& operator = (const AliReconstruction& rec);
46 virtual ~AliReconstruction();
47
48 void SetGAliceFile(const char* fileName);
b649205a 49 void SetInput(const char* input) {fInput = input;};
b26c3770 50 void SetEventRange(Int_t firstEvent = 0, Int_t lastEvent = -1)
51 {fFirstEvent = firstEvent; fLastEvent = lastEvent;};
efd2085e 52 void SetOption(const char* detector, const char* option);
596a855f 53
59697224 54 void SetRunLocalReconstruction(const char* detectors) {
55 fRunLocalReconstruction = detectors;};
2257f27e 56 void SetRunVertexFinder(Bool_t run) {fRunVertexFinder = run;};
b8cd5251 57 void SetRunTracking(const char* detectors) {
58 fRunTracking = detectors;};
596a855f 59 void SetFillESD(const char* detectors) {fFillESD = detectors;};
b8cd5251 60 void SetRunReconstruction(const char* detectors) {
61 SetRunLocalReconstruction(detectors);
62 SetRunTracking(detectors);
63 SetFillESD(detectors);};
596a855f 64
c84a5e9e 65 void SetUniformFieldTracking(){fUniformField=kTRUE;}
66 void SetNonuniformFieldTracking(){fUniformField=kFALSE;}
67
24f7a148 68 void SetStopOnError(Bool_t stopOnError)
69 {fStopOnError = stopOnError;}
70 void SetCheckPointLevel(Int_t checkPointLevel)
71 {fCheckPointLevel = checkPointLevel;}
72
b26c3770 73 virtual Bool_t Run(const char* input,
74 Int_t firstEvent, Int_t lastEvent = -1);
75 Bool_t Run(const char* input = NULL)
76 {return Run(input, fFirstEvent, fLastEvent);};
77 Bool_t Run(Int_t firstEvent, Int_t lastEvent = -1)
78 {return Run(NULL, firstEvent, lastEvent);};
596a855f 79
98937d93 80 void SetWriteAlignmentData(){fWriteAlignmentData=kTRUE;}
81
596a855f 82private:
59697224 83 Bool_t RunLocalReconstruction(const TString& detectors);
b26c3770 84 Bool_t RunLocalEventReconstruction(const TString& detectors);
2257f27e 85 Bool_t RunVertexFinder(AliESD*& esd);
1f46a9ae 86 Bool_t RunHLTTracking(AliESD*& esd);
24f7a148 87 Bool_t RunTracking(AliESD*& esd);
88 Bool_t FillESD(AliESD*& esd, const TString& detectors);
596a855f 89
e583c30d 90 Bool_t IsSelected(TString detName, TString& detectors) const;
f08fc9f5 91 Bool_t InitRunLoader();
b8cd5251 92 AliReconstructor* GetReconstructor(Int_t iDet);
2257f27e 93 Bool_t CreateVertexer();
b8cd5251 94 Bool_t CreateTrackers(const TString& detectors);
b26c3770 95 void CleanUp(TFile* file = NULL, TFile* fileOld = NULL);
e583c30d 96
24f7a148 97 Bool_t ReadESD(AliESD*& esd, const char* recStep) const;
98 void WriteESD(AliESD* esd, const char* recStep) const;
99
f3a97c86 100
101 //===========================================//
102 void CreateTag(TFile* file);
103 //==========================================//
104
98937d93 105 void WriteAlignmentData(AliESD* esd);
f3a97c86 106
107
108
59697224 109 TString fRunLocalReconstruction; // run the local reconstruction for these detectors
c84a5e9e 110 Bool_t fUniformField; // uniform field tracking flag
2257f27e 111 Bool_t fRunVertexFinder; // run the vertex finder
1f46a9ae 112 Bool_t fRunHLTTracking; // run the HLT tracking
b8cd5251 113 TString fRunTracking; // run the tracking for these detectors
596a855f 114 TString fFillESD; // fill ESD for these detectors
596a855f 115 TString fGAliceFileName; // name of the galice file
b649205a 116 TString fInput; // name of input file or directory
b26c3770 117 Int_t fFirstEvent; // index of first event to be reconstr.
118 Int_t fLastEvent; // index of last event to be reconstr.
e583c30d 119 Bool_t fStopOnError; // stop or continue on errors
24f7a148 120 Int_t fCheckPointLevel; // level of ESD check points
b8cd5251 121 TObjArray fOptions; // options for reconstructor objects
596a855f 122
123 AliRunLoader* fRunLoader; //! current run loader object
b649205a 124 AliRawReader* fRawReader; //! current raw data reader
596a855f 125
482070f2 126 static const Int_t fgkNDetectors = 15; //! number of detectors
c757bafd 127 static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors
b8cd5251 128 AliReconstructor* fReconstructor[fgkNDetectors]; //! array of reconstructor objects
129 AliLoader* fLoader[fgkNDetectors]; //! detector loaders
130 AliVertexer* fVertexer; //! vertexer for ITS
131 AliTracker* fTracker[fgkNDetectors]; //! trackers
59697224 132
98937d93 133 Bool_t fWriteAlignmentData; // write track space-points flag
134
135 ClassDef(AliReconstruction, 6) // class for running the reconstruction
596a855f 136};
137
138#endif