]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/AliCorrection.h
enable branches of new esd
[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   void Add(AliCorrection* aCorrectionToAdd, Float_t c=1);
45
46   virtual Bool_t LoadHistograms(const Char_t* dir = 0);
47   virtual void SaveHistograms();
48   virtual void DrawHistograms(const Char_t* name = 0);
49
50   virtual void ReduceInformation();
51
52   virtual void Reset(Option_t* option = "");
53
54 protected:
55   AliCorrectionMatrix2D* fEventCorr; // correction on event level
56   AliCorrectionMatrix3D* fTrackCorr; // correction on track level
57
58   ClassDef(AliCorrection,1)
59 };
60
61 #endif
62