1 #ifndef ALICORRECTIONMATRIX_H
2 #define ALICORRECTIONMATRIX_H
6 // ------------------------------------------------------
8 // Class to handle corrections.
10 // ------------------------------------------------------
14 // - add options in draw method
21 class AliCorrectionMatrix : public TNamed
23 protected: // do not create this baseclass
24 AliCorrectionMatrix();
25 AliCorrectionMatrix(const Char_t* name, const Char_t* title);
26 AliCorrectionMatrix(const AliCorrectionMatrix& c);
27 virtual ~AliCorrectionMatrix();
28 AliCorrectionMatrix& operator=(const AliCorrectionMatrix& corrMatrix);
31 virtual void Copy(TObject& c) const;
32 virtual Long64_t Merge(TCollection* list);
34 TH1* GetGeneratedHistogram() { return fhGene; }
35 TH1* GetMeasuredHistogram() { return fhMeas; }
36 TH1* GetCorrectionHistogram() { return fhCorr; }
38 void SetGeneratedHistogram(TH1* agene) { fhGene = agene; }
39 void SetMeasuredHistogram(TH1* ameas) { fhMeas = ameas; }
40 void SetCorrectionHistogram(TH1* acorr) { fhCorr = acorr; }
44 void SetCorrectionToUnity();
45 void ResetErrorsOnCorrections();
46 void Scale(Double_t factor);
48 void Add(AliCorrectionMatrix* aMatrixToAdd, Float_t c=1);
50 void SetAxisTitles(const Char_t* titleX="", const Char_t* titleY="", const Char_t* titleZ="");
52 virtual Bool_t LoadHistograms(const Char_t* dir = 0);
53 virtual void SaveHistograms();
55 virtual void DrawHistograms(const Char_t* canvasName = 0);
57 virtual void ReduceInformation();
59 virtual void Reset(Option_t* option = "");
62 TH1* fhMeas; // histogram of measured particles (or tracks)
63 TH1* fhGene; // histogram of generated particles
65 TH1* fhCorr; // correction histogram (ratio generated/measured)
67 ClassDef(AliCorrectionMatrix,1)