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* cdbUri = "local://$ALICE_ROOT",
43 const char* name = "AliReconstruction",
44 const char* title = "reconstruction");
45 AliReconstruction(const AliReconstruction& rec);
46 AliReconstruction& operator = (const AliReconstruction& rec);
47 virtual ~AliReconstruction();
49 void SetGAliceFile(const char* fileName);
50 void SetInput(const char* input) {fInput = input;};
51 void SetEventRange(Int_t firstEvent = 0, Int_t lastEvent = -1)
52 {fFirstEvent = firstEvent; fLastEvent = lastEvent;};
53 void SetOption(const char* detector, const char* option);
55 void SetRunLocalReconstruction(const char* detectors) {
56 fRunLocalReconstruction = detectors;};
57 void SetRunVertexFinder(Bool_t run) {fRunVertexFinder = run;};
58 void SetRunTracking(const char* detectors) {
59 fRunTracking = detectors;};
60 void SetFillESD(const char* detectors) {fFillESD = detectors;};
61 void SetRunReconstruction(const char* detectors) {
62 SetRunLocalReconstruction(detectors);
63 SetRunTracking(detectors);
64 SetFillESD(detectors);};
66 void SetUniformFieldTracking(){fUniformField=kTRUE;}
67 void SetNonuniformFieldTracking(){fUniformField=kFALSE;}
69 void SetStopOnError(Bool_t stopOnError)
70 {fStopOnError = stopOnError;}
71 void SetCheckPointLevel(Int_t checkPointLevel)
72 {fCheckPointLevel = checkPointLevel;}
74 // CDB storage activation
75 void InitCDBStorage();
76 void SetDefaultStorage(const char* uri);
77 void SetSpecificStorage(const char* detName, const char* uri);
79 virtual Bool_t Run(const char* input,
80 Int_t firstEvent, Int_t lastEvent = -1);
81 Bool_t Run(const char* input = NULL)
82 {return Run(input, fFirstEvent, fLastEvent);};
83 Bool_t Run(Int_t firstEvent, Int_t lastEvent = -1)
84 {return Run(NULL, firstEvent, lastEvent);};
86 void SetWriteAlignmentData(){fWriteAlignmentData=kTRUE;}
89 Bool_t RunLocalReconstruction(const TString& detectors);
90 Bool_t RunLocalEventReconstruction(const TString& detectors);
91 Bool_t RunVertexFinder(AliESD*& esd);
92 Bool_t RunHLTTracking(AliESD*& esd);
93 Bool_t RunTracking(AliESD*& esd);
94 Bool_t FillESD(AliESD*& esd, const TString& detectors);
96 Bool_t IsSelected(TString detName, TString& detectors) const;
97 Bool_t InitRunLoader();
98 AliReconstructor* GetReconstructor(Int_t iDet);
99 Bool_t CreateVertexer();
100 Bool_t CreateTrackers(const TString& detectors);
101 void CleanUp(TFile* file = NULL, TFile* fileOld = NULL);
103 Bool_t ReadESD(AliESD*& esd, const char* recStep) const;
104 void WriteESD(AliESD* esd, const char* recStep) const;
107 //===========================================//
108 void CreateTag(TFile* file);
109 //==========================================//
111 void WriteAlignmentData(AliESD* esd);
115 TString fRunLocalReconstruction; // run the local reconstruction for these detectors
116 Bool_t fUniformField; // uniform field tracking flag
117 Bool_t fRunVertexFinder; // run the vertex finder
118 Bool_t fRunHLTTracking; // run the HLT tracking
119 TString fRunTracking; // run the tracking for these detectors
120 TString fFillESD; // fill ESD for these detectors
121 TString fGAliceFileName; // name of the galice file
122 TString fInput; // name of input file or directory
123 Int_t fFirstEvent; // index of first event to be reconstr.
124 Int_t fLastEvent; // index of last event to be reconstr.
125 Bool_t fStopOnError; // stop or continue on errors
126 Int_t fCheckPointLevel; // level of ESD check points
127 TObjArray fOptions; // options for reconstructor objects
129 AliRunLoader* fRunLoader; //! current run loader object
130 AliRawReader* fRawReader; //! current raw data reader
132 static const Int_t fgkNDetectors = 15; //! number of detectors
133 static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors
134 AliReconstructor* fReconstructor[fgkNDetectors]; //! array of reconstructor objects
135 AliLoader* fLoader[fgkNDetectors]; //! detector loaders
136 AliVertexer* fVertexer; //! vertexer for ITS
137 AliTracker* fTracker[fgkNDetectors]; //! trackers
139 Bool_t fWriteAlignmentData; // write track space-points flag
141 TString fCDBUri; // Uri of the default CDB storage
143 ClassDef(AliReconstruction, 6) // class for running the reconstruction