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 */
8 ///////////////////////////////////////////////////////////////////////////////
10 // class for running the reconstruction //
11 // Clusters and tracks are created for all detectors and all events by //
14 // AliReconstruction rec; //
17 ///////////////////////////////////////////////////////////////////////////////
22 #include <TObjArray.h>
24 class AliReconstructor;
39 class AliReconstruction: public TNamed {
41 AliReconstruction(const char* gAliceFilename = "galice.root",
42 const char* name = "AliReconstruction",
43 const char* title = "reconstruction");
44 AliReconstruction(const AliReconstruction& rec);
45 AliReconstruction& operator = (const AliReconstruction& rec);
46 virtual ~AliReconstruction();
48 void SetGAliceFile(const char* fileName);
49 void SetInput(const char* input) {fInput = input;};
50 void SetEventRange(Int_t firstEvent = 0, Int_t lastEvent = -1)
51 {fFirstEvent = firstEvent; fLastEvent = lastEvent;};
52 void SetOption(const char* detector, const char* option);
54 void SetRunLocalReconstruction(const char* detectors) {
55 fRunLocalReconstruction = detectors;};
56 void SetRunVertexFinder(Bool_t run) {fRunVertexFinder = run;};
57 void SetRunTracking(const char* detectors) {
58 fRunTracking = detectors;};
59 void SetFillESD(const char* detectors) {fFillESD = detectors;};
60 void SetRunReconstruction(const char* detectors) {
61 SetRunLocalReconstruction(detectors);
62 SetRunTracking(detectors);
63 SetFillESD(detectors);};
65 void SetUniformFieldTracking(){fUniformField=kTRUE;}
66 void SetNonuniformFieldTracking(){fUniformField=kFALSE;}
68 void SetStopOnError(Bool_t stopOnError)
69 {fStopOnError = stopOnError;}
70 void SetCheckPointLevel(Int_t checkPointLevel)
71 {fCheckPointLevel = checkPointLevel;}
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);};
81 Bool_t RunLocalReconstruction(const TString& detectors);
82 Bool_t RunLocalEventReconstruction(const TString& detectors);
83 Bool_t RunVertexFinder(AliESD*& esd);
84 Bool_t RunHLTTracking(AliESD*& esd);
85 Bool_t RunTracking(AliESD*& esd);
86 Bool_t FillESD(AliESD*& esd, const TString& detectors);
88 Bool_t IsSelected(TString detName, TString& detectors) const;
89 Bool_t InitRunLoader();
90 AliReconstructor* GetReconstructor(Int_t iDet);
91 Bool_t CreateVertexer();
92 Bool_t CreateTrackers(const TString& detectors);
93 void CleanUp(TFile* file = NULL, TFile* fileOld = NULL);
95 Bool_t ReadESD(AliESD*& esd, const char* recStep) const;
96 void WriteESD(AliESD* esd, const char* recStep) const;
99 //===========================================//
100 void CreateTag(TFile* file);
101 //==========================================//
106 TString fRunLocalReconstruction; // run the local reconstruction for these detectors
107 Bool_t fUniformField; // uniform field tracking flag
108 Bool_t fRunVertexFinder; // run the vertex finder
109 Bool_t fRunHLTTracking; // run the HLT tracking
110 TString fRunTracking; // run the tracking for these detectors
111 TString fFillESD; // fill ESD for these detectors
112 TString fGAliceFileName; // name of the galice file
113 TString fInput; // name of input file or directory
114 Int_t fFirstEvent; // index of first event to be reconstr.
115 Int_t fLastEvent; // index of last event to be reconstr.
116 Bool_t fStopOnError; // stop or continue on errors
117 Int_t fCheckPointLevel; // level of ESD check points
118 TObjArray fOptions; // options for reconstructor objects
120 AliRunLoader* fRunLoader; //! current run loader object
121 AliRawReader* fRawReader; //! current raw data reader
123 static const Int_t fgkNDetectors = 15; //! number of detectors
124 static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors
125 AliReconstructor* fReconstructor[fgkNDetectors]; //! array of reconstructor objects
126 AliLoader* fLoader[fgkNDetectors]; //! detector loaders
127 AliVertexer* fVertexer; //! vertexer for ITS
128 AliTracker* fTracker[fgkNDetectors]; //! trackers
130 ClassDef(AliReconstruction, 5) // class for running the reconstruction