]>
Commit | Line | Data |
---|---|---|
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 | ||
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 | ||
20 | #include <TNamed.h> | |
21 | #include <TString.h> | |
22 | #include <TObjArray.h> | |
23 | ||
24 | class AliReconstructor; | |
25 | class AliRunLoader; | |
26 | class AliRawReader; | |
27 | class AliLoader; | |
28 | class AliTracker; | |
29 | class AliVertexer; | |
30 | class AliESD; | |
31 | class TFile; | |
32 | ||
33 | class AliRunTag; | |
34 | class AliLHCTag; | |
35 | class AliDetectorTag; | |
36 | class AliEventTag; | |
37 | ||
38 | ||
39 | class AliReconstruction: public TNamed { | |
40 | public: | |
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(); | |
48 | ||
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); | |
54 | ||
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);}; | |
65 | void SetLoadAlignFromCDB(Bool_t load) {fLoadAlignFromCDB = load;}; | |
66 | void SetLoadAlignData(const char* detectors) | |
67 | {fLoadAlignData = detectors;}; | |
68 | ||
69 | void SetUniformFieldTracking(){fUniformField=kTRUE;} | |
70 | void SetNonuniformFieldTracking(){fUniformField=kFALSE;} | |
71 | ||
72 | void SetStopOnError(Bool_t stopOnError) | |
73 | {fStopOnError = stopOnError;} | |
74 | void SetCheckPointLevel(Int_t checkPointLevel) | |
75 | {fCheckPointLevel = checkPointLevel;} | |
76 | ||
77 | // CDB storage activation | |
78 | void InitCDBStorage(); | |
79 | void SetDefaultStorage(const char* uri); | |
80 | void SetSpecificStorage(const char* detName, const char* uri); | |
81 | ||
82 | Bool_t SetRunNumber(); | |
83 | ||
84 | Bool_t SetAlignObjArraySingleDet(const char* detName); | |
85 | Bool_t MisalignGeometry(const TString& detectors); | |
86 | ||
87 | void SetAlignObjArray(TObjArray *array) | |
88 | {fAlignObjArray = array; | |
89 | fLoadAlignFromCDB = kFALSE;} | |
90 | Bool_t ApplyAlignObjsToGeom(TObjArray* alObjArray); | |
91 | ||
92 | virtual Bool_t Run(const char* input, | |
93 | Int_t firstEvent, Int_t lastEvent = -1); | |
94 | Bool_t Run(const char* input = NULL) | |
95 | {return Run(input, fFirstEvent, fLastEvent);}; | |
96 | Bool_t Run(Int_t firstEvent, Int_t lastEvent = -1) | |
97 | {return Run(NULL, firstEvent, lastEvent);}; | |
98 | ||
99 | void SetWriteAlignmentData(){fWriteAlignmentData=kTRUE;} | |
100 | ||
101 | private: | |
102 | Bool_t RunLocalReconstruction(const TString& detectors); | |
103 | Bool_t RunLocalEventReconstruction(const TString& detectors); | |
104 | Bool_t RunVertexFinder(AliESD*& esd); | |
105 | Bool_t RunHLTTracking(AliESD*& esd); | |
106 | Bool_t RunTracking(AliESD*& esd); | |
107 | Bool_t FillESD(AliESD*& esd, const TString& detectors); | |
108 | ||
109 | Bool_t IsSelected(TString detName, TString& detectors) const; | |
110 | Bool_t InitRunLoader(); | |
111 | AliReconstructor* GetReconstructor(Int_t iDet); | |
112 | Bool_t CreateVertexer(); | |
113 | Bool_t CreateTrackers(const TString& detectors); | |
114 | void CleanUp(TFile* file = NULL, TFile* fileOld = NULL); | |
115 | ||
116 | Bool_t ReadESD(AliESD*& esd, const char* recStep) const; | |
117 | void WriteESD(AliESD* esd, const char* recStep) const; | |
118 | ||
119 | ||
120 | //===========================================// | |
121 | void CreateTag(TFile* file); | |
122 | //==========================================// | |
123 | ||
124 | void WriteAlignmentData(AliESD* esd); | |
125 | ||
126 | ||
127 | ||
128 | TString fRunLocalReconstruction; // run the local reconstruction for these detectors | |
129 | Bool_t fUniformField; // uniform field tracking flag | |
130 | Bool_t fRunVertexFinder; // run the vertex finder | |
131 | Bool_t fRunHLTTracking; // run the HLT tracking | |
132 | TString fRunTracking; // run the tracking for these detectors | |
133 | TString fFillESD; // fill ESD for these detectors | |
134 | TString fGAliceFileName; // name of the galice file | |
135 | TString fInput; // name of input file or directory | |
136 | Int_t fFirstEvent; // index of first event to be reconstr. | |
137 | Int_t fLastEvent; // index of last event to be reconstr. | |
138 | Bool_t fStopOnError; // stop or continue on errors | |
139 | Int_t fCheckPointLevel; // level of ESD check points | |
140 | TObjArray fOptions; // options for reconstructor objects | |
141 | Bool_t fLoadAlignFromCDB; // Load alignment data from CDB and apply it to geometry or not | |
142 | TString fLoadAlignData; // Load alignment data from CDB for these detectors | |
143 | ||
144 | AliRunLoader* fRunLoader; //! current run loader object | |
145 | AliRawReader* fRawReader; //! current raw data reader | |
146 | ||
147 | static const Int_t fgkNDetectors = 15; //! number of detectors | |
148 | static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors | |
149 | AliReconstructor* fReconstructor[fgkNDetectors]; //! array of reconstructor objects | |
150 | AliLoader* fLoader[fgkNDetectors]; //! detector loaders | |
151 | AliVertexer* fVertexer; //! vertexer for ITS | |
152 | AliTracker* fTracker[fgkNDetectors]; //! trackers | |
153 | ||
154 | TObjArray* fAlignObjArray; // array with the alignment objects to be applied to the geometry | |
155 | Bool_t fWriteAlignmentData; // write track space-points flag | |
156 | ||
157 | TString fCDBUri; // Uri of the default CDB storage | |
158 | ||
159 | ClassDef(AliReconstruction, 6) // class for running the reconstruction | |
160 | }; | |
161 | ||
162 | #endif |