prepare PID LQ ref maker for production
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDrecoTask.h
CommitLineData
1ee39b3a 1#ifndef ALITRDRECOTASK_H
2#define ALITRDRECOTASK_H
3
4///////////////////////////////////////////////////////
5//
6// Basic class for Performance/Calibration TRD tasks
7//
8// Author: Alexandru Bercuci, 10/09/2008
9//
10//////////////////////////////////////////////////
11
12#ifndef ALIANALYSISTASK_H
13#include "AliAnalysisTask.h"
14#endif
15
16#ifndef ALITRDTRACKINFO_H
17#include "info/AliTRDtrackInfo.h"
18#endif
19
20class TH1;
21class TF1;
22class TList;
23class TObjArray;
24class TTreeSRedirector;
25class AliTRDtrackV1;
26class AliTRDtrackInfo;
27class AliTRDrecoTask : public AliAnalysisTask
28{
29public:
30 enum AliTRDrecoSteeringBits{
31 kMCdata = BIT(20)
32 ,kFriends = BIT(21)
33 ,kPostProcess = BIT(22)
34 };
35 AliTRDrecoTask(const char *name, const char *title);
36 virtual ~AliTRDrecoTask();
37
38
39 void ConnectInputData(Option_t *);
40 virtual void CreateOutputObjects() = 0;
b91fdd71 41 virtual void Exec(Option_t *opt);
1ee39b3a 42
43 Int_t GetNRefFigures() const { return fNRefFigures; }
44 TList* GetPlotFunctors() const { return fPlotFuncList;}
45 virtual Bool_t GetRefFigure(Int_t ifig);
46
47 Bool_t HasFriends() const { return TestBit(kFriends);};
48 Bool_t HasMCdata() const { return TestBit(kMCdata);};
49 Bool_t HasPostProcess() const { return TestBit(kPostProcess);};
50 virtual TObjArray* Histos() { return fContainer;}
51
52 virtual Bool_t Load(const Char_t *filename = "TRD.Performance.root");
53 virtual Bool_t Save(TObjArray * const res);
54 virtual Bool_t PostProcess();
55 virtual Bool_t PutTrendValue(const Char_t *name, Double_t val);
56 virtual void SetDebugLevel(Int_t level);
57 virtual void SetFriends(Bool_t fr = kTRUE) {SetBit(kFriends, fr);}
58 virtual void SetMCdata(Bool_t mc = kTRUE) {SetBit(kMCdata, mc);}
59 virtual void SetPostProcess(Bool_t pp = kTRUE) {SetBit(kPostProcess, pp);}
60 virtual void Terminate(Option_t *);
61
62protected:
63 Int_t DebugLevel() const { return fDebugLevel;}
64 static TTreeSRedirector* DebugStream() { return fgDebugStream;}
65 void InitFunctorList();
66 void Adjust(TF1 *f, TH1 * const h);
67
68 UChar_t fNRefFigures; //! no of reference figures reported by task
69 TObjArray *fContainer; //! container to store results
70 TObjArray *fTracks; //! Array of tracks
71 const AliTRDtrackV1 *fkTrack; //! current track
72 const AliTRDtrackInfo::AliMCinfo *fkMC; //! MC info
73 const AliTRDtrackInfo::AliESDinfo *fkESD;//! ESD info
74
75private:
76 AliTRDrecoTask(const AliTRDrecoTask&);
77 AliTRDrecoTask& operator=(const AliTRDrecoTask&);
78
79 UChar_t fDebugLevel; //! Debug level
80 TList *fPlotFuncList;//! plot functors list
81 static TList *fgTrendPoint; //! trend point
82 static TTreeSRedirector *fgDebugStream; //! Debug stream
83
84 ClassDef(AliTRDrecoTask, 1) // base TRD reconstruction task
85};
86
87#endif
88