Update for Ds
[u/mrichter/AliRoot.git] / PWG0 / AliCorrection.h
CommitLineData
29771dc8 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>
770a1f1d 17#include "AliPWG0Helper.h"
29771dc8 18
19class AliCorrectionMatrix2D;
20class AliCorrectionMatrix3D;
21
22class AliCorrection : public TNamed
23{
24public:
25 AliCorrection();
a7f69e56 26 AliCorrection(const Char_t* name, const Char_t* title, AliPWG0Helper::AnalysisMode analysisMode = (AliPWG0Helper::AnalysisMode) (AliPWG0Helper::kTPC | AliPWG0Helper::kFieldOn));
29771dc8 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
a6e0ebfe 35 AliCorrectionMatrix2D* GetEventCorrection() const { return fEventCorr; }
36 AliCorrectionMatrix3D* GetTrackCorrection() const { return fTrackCorr; }
29771dc8 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();
610f8b68 44 void ResetErrorsOnCorrections();
dd367a14 45 void Scale(Double_t factor);
29771dc8 46
2e88424e 47 void Add(AliCorrection* aCorrectionToAdd, Float_t c=1);
48
29771dc8 49 virtual Bool_t LoadHistograms(const Char_t* dir = 0);
50 virtual void SaveHistograms();
51 virtual void DrawHistograms(const Char_t* name = 0);
dd367a14 52 virtual void DrawOverview(const char* canvasName = 0);
29771dc8 53
54 virtual void ReduceInformation();
55
56 virtual void Reset(Option_t* option = "");
1c15d51a 57 void PrintStats(Float_t zRange, Float_t etaRange, Float_t ptCut);
dd367a14 58 void PrintInfo(Float_t ptCut);
29771dc8 59
60protected:
61 AliCorrectionMatrix2D* fEventCorr; // correction on event level
62 AliCorrectionMatrix3D* fTrackCorr; // correction on track level
63
64 ClassDef(AliCorrection,1)
65};
66
67#endif
68