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);};
80 void SetWriteAlignmentData(){fWriteAlignmentData=kTRUE;}
83 Bool_t RunLocalReconstruction(const TString& detectors);
84 Bool_t RunLocalEventReconstruction(const TString& detectors);
85 Bool_t RunVertexFinder(AliESD*& esd);
86 Bool_t RunHLTTracking(AliESD*& esd);
87 Bool_t RunTracking(AliESD*& esd);
88 Bool_t FillESD(AliESD*& esd, const TString& detectors);
90 Bool_t IsSelected(TString detName, TString& detectors) const;
91 Bool_t InitRunLoader();
92 AliReconstructor* GetReconstructor(Int_t iDet);
93 Bool_t CreateVertexer();
94 Bool_t CreateTrackers(const TString& detectors);
95 void CleanUp(TFile* file = NULL, TFile* fileOld = NULL);
97 Bool_t ReadESD(AliESD*& esd, const char* recStep) const;
98 void WriteESD(AliESD* esd, const char* recStep) const;
101 //===========================================//
102 void CreateTag(TFile* file);
103 //==========================================//
105 void WriteAlignmentData(AliESD* esd);
109 TString fRunLocalReconstruction; // run the local reconstruction for these detectors
110 Bool_t fUniformField; // uniform field tracking flag
111 Bool_t fRunVertexFinder; // run the vertex finder
112 Bool_t fRunHLTTracking; // run the HLT tracking
113 TString fRunTracking; // run the tracking for these detectors
114 TString fFillESD; // fill ESD for these detectors
115 TString fGAliceFileName; // name of the galice file
116 TString fInput; // name of input file or directory
117 Int_t fFirstEvent; // index of first event to be reconstr.
118 Int_t fLastEvent; // index of last event to be reconstr.
119 Bool_t fStopOnError; // stop or continue on errors
120 Int_t fCheckPointLevel; // level of ESD check points
121 TObjArray fOptions; // options for reconstructor objects
123 AliRunLoader* fRunLoader; //! current run loader object
124 AliRawReader* fRawReader; //! current raw data reader
126 static const Int_t fgkNDetectors = 15; //! number of detectors
127 static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors
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
133 Bool_t fWriteAlignmentData; // write track space-points flag
135 ClassDef(AliReconstruction, 6) // class for running the reconstruction