]>
Commit | Line | Data |
---|---|---|
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 | 24 | class AliReconstructor; |
596a855f | 25 | class AliRunLoader; |
b649205a | 26 | class AliRawReader; |
596a855f | 27 | class AliLoader; |
28 | class AliTracker; | |
c84a5e9e | 29 | class AliVertexer; |
596a855f | 30 | class AliESD; |
e583c30d | 31 | class TFile; |
596a855f | 32 | |
f3a97c86 | 33 | class AliRunTag; |
34 | class AliLHCTag; | |
35 | class AliDetectorTag; | |
36 | class AliEventTag; | |
37 | ||
596a855f | 38 | |
39 | class AliReconstruction: public TNamed { | |
40 | public: | |
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 | |
80 | private: | |
59697224 | 81 | Bool_t RunLocalReconstruction(const TString& detectors); |
b26c3770 | 82 | Bool_t RunLocalEventReconstruction(const TString& detectors); |
2257f27e | 83 | Bool_t RunVertexFinder(AliESD*& esd); |
1f46a9ae | 84 | Bool_t RunHLTTracking(AliESD*& esd); |
24f7a148 | 85 | Bool_t RunTracking(AliESD*& esd); |
86 | Bool_t FillESD(AliESD*& esd, const TString& detectors); | |
596a855f | 87 | |
e583c30d | 88 | Bool_t IsSelected(TString detName, TString& detectors) const; |
f08fc9f5 | 89 | Bool_t InitRunLoader(); |
b8cd5251 | 90 | AliReconstructor* GetReconstructor(Int_t iDet); |
2257f27e | 91 | Bool_t CreateVertexer(); |
b8cd5251 | 92 | Bool_t CreateTrackers(const TString& detectors); |
b26c3770 | 93 | void CleanUp(TFile* file = NULL, TFile* fileOld = NULL); |
e583c30d | 94 | |
24f7a148 | 95 | Bool_t ReadESD(AliESD*& esd, const char* recStep) const; |
96 | void WriteESD(AliESD* esd, const char* recStep) const; | |
97 | ||
f3a97c86 | 98 | |
99 | //===========================================// | |
100 | void CreateTag(TFile* file); | |
101 | //==========================================// | |
102 | ||
103 | ||
104 | ||
105 | ||
59697224 | 106 | TString fRunLocalReconstruction; // run the local reconstruction for these detectors |
c84a5e9e | 107 | Bool_t fUniformField; // uniform field tracking flag |
2257f27e | 108 | Bool_t fRunVertexFinder; // run the vertex finder |
1f46a9ae | 109 | Bool_t fRunHLTTracking; // run the HLT tracking |
b8cd5251 | 110 | TString fRunTracking; // run the tracking for these detectors |
596a855f | 111 | TString fFillESD; // fill ESD for these detectors |
596a855f | 112 | TString fGAliceFileName; // name of the galice file |
b649205a | 113 | TString fInput; // name of input file or directory |
b26c3770 | 114 | Int_t fFirstEvent; // index of first event to be reconstr. |
115 | Int_t fLastEvent; // index of last event to be reconstr. | |
e583c30d | 116 | Bool_t fStopOnError; // stop or continue on errors |
24f7a148 | 117 | Int_t fCheckPointLevel; // level of ESD check points |
b8cd5251 | 118 | TObjArray fOptions; // options for reconstructor objects |
596a855f | 119 | |
120 | AliRunLoader* fRunLoader; //! current run loader object | |
b649205a | 121 | AliRawReader* fRawReader; //! current raw data reader |
596a855f | 122 | |
482070f2 | 123 | static const Int_t fgkNDetectors = 15; //! number of detectors |
c757bafd | 124 | static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors |
b8cd5251 | 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 | |
59697224 | 129 | |
c84a5e9e | 130 | ClassDef(AliReconstruction, 5) // class for running the reconstruction |
596a855f | 131 | }; |
132 | ||
133 | #endif |