]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/AliCorrection.h
update to comply with new GetLabel function
[u/mrichter/AliRoot.git] / PWG0 / AliCorrection.h
1 #ifndef ALICORRECTION_H
2 #define ALICORRECTION_H
3
4 /* $Id$ */
5
6 // ------------------------------------------------------
7 //
8 // This class is used to store the correction for one effect. 
9 //
10 // Most effects have to be correction on track and event level, this class combines
11 // two correction matrices. One of the type AliCorrectionMatrix2D and one of
12 // the type AliCorrectionMatrix3D
13 //
14 // ------------------------------------------------------
15
16 #include <TNamed.h>
17 #include "AliPWG0Helper.h"
18
19 class AliCorrectionMatrix2D;
20 class AliCorrectionMatrix3D;
21
22 class AliCorrection : public TNamed
23 {
24 public:
25   AliCorrection();
26   AliCorrection(const Char_t* name, const Char_t* title, AliPWG0Helper::AnalysisMode analysisMode = AliPWG0Helper::kTPC);
27   AliCorrection(const AliCorrection& c);
28
29   virtual ~AliCorrection();
30   AliCorrection& operator=(const AliCorrection& corr);
31   virtual void Copy(TObject& c) const;
32
33   virtual Long64_t Merge(TCollection* list);
34
35   AliCorrectionMatrix2D* GetEventCorrection() { return fEventCorr; }
36   AliCorrectionMatrix3D* GetTrackCorrection() { return fTrackCorr; }
37
38   void SetEventCorrection(AliCorrectionMatrix2D* corr) { fEventCorr = corr; }
39   void SetTrackCorrection(AliCorrectionMatrix3D* corr) { fTrackCorr = corr; }
40
41   void Divide();
42   void Multiply();
43   void SetCorrectionToUnity();
44   void Scale(Double_t factor);
45
46   void Add(AliCorrection* aCorrectionToAdd, Float_t c=1);
47
48   virtual Bool_t LoadHistograms(const Char_t* dir = 0);
49   virtual void SaveHistograms();
50   virtual void DrawHistograms(const Char_t* name = 0);
51   virtual void DrawOverview(const char* canvasName = 0);
52
53   virtual void ReduceInformation();
54
55   virtual void Reset(Option_t* option = "");
56   void PrintInfo(Float_t ptCut);
57
58 protected:
59   AliCorrectionMatrix2D* fEventCorr; // correction on event level
60   AliCorrectionMatrix3D* fTrackCorr; // correction on track level
61
62   ClassDef(AliCorrection,1)
63 };
64
65 #endif
66