]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/AliCorrection.h
620b4099f61fff82408239137f67a5e6545e6802
[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
18 class AliCorrectionMatrix2D;
19 class AliCorrectionMatrix3D;
20
21 class AliCorrection : public TNamed
22 {
23 public:
24   AliCorrection();
25   AliCorrection(const Char_t* name, const Char_t* title);
26   AliCorrection(const AliCorrection& c);
27
28   virtual ~AliCorrection();
29   AliCorrection& operator=(const AliCorrection& corr);
30   virtual void Copy(TObject& c) const;
31
32   virtual Long64_t Merge(TCollection* list);
33
34   AliCorrectionMatrix2D* GetEventCorrection() { return fEventCorr; }
35   AliCorrectionMatrix3D* GetTrackCorrection() { return fTrackCorr; }
36
37   void SetEventCorrection(AliCorrectionMatrix2D* corr) { fEventCorr = corr; }
38   void SetTrackCorrection(AliCorrectionMatrix3D* corr) { fTrackCorr = corr; }
39
40   void Divide();
41   void Multiply();
42   void SetCorrectionToUnity();
43
44   virtual Bool_t LoadHistograms(const Char_t* dir = 0);
45   virtual void SaveHistograms();
46   virtual void DrawHistograms(const Char_t* name = 0);
47
48   virtual void ReduceInformation();
49
50   virtual void Reset(Option_t* option = "");
51
52 protected:
53   AliCorrectionMatrix2D* fEventCorr; // correction on event level
54   AliCorrectionMatrix3D* fTrackCorr; // correction on track level
55
56   ClassDef(AliCorrection,1)
57 };
58
59 #endif
60