]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/AliCorrection.h
small corrections
[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::AnalysisMode) (AliPWG0Helper::kTPC | AliPWG0Helper::kFieldOn));
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() const { return fEventCorr; }
36   AliCorrectionMatrix3D* GetTrackCorrection() const { 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 ResetErrorsOnCorrections();
45   void Scale(Double_t factor);
46
47   void Add(AliCorrection* aCorrectionToAdd, Float_t c=1);
48
49   virtual Bool_t LoadHistograms(const Char_t* dir = 0);
50   virtual void SaveHistograms();
51   virtual void DrawHistograms(const Char_t* name = 0);
52   virtual void DrawOverview(const char* canvasName = 0);
53
54   virtual void ReduceInformation();
55
56   virtual void Reset(Option_t* option = "");
57   void PrintStats(Float_t zRange, Float_t etaRange, Float_t ptCut);
58   void PrintInfo(Float_t ptCut);
59
60 protected:
61   AliCorrectionMatrix2D* fEventCorr; // correction on event level
62   AliCorrectionMatrix3D* fTrackCorr; // correction on track level
63
64   ClassDef(AliCorrection,1)
65 };
66
67 #endif
68