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();
46 void Add(AliCorrectionMatrix* aMatrixToAdd, Float_t c=1);
48 void SetAxisTitles(const Char_t* titleX="", const Char_t* titleY="", const Char_t* titleZ="");
50 virtual Bool_t LoadHistograms(const Char_t* dir = 0);
51 virtual void SaveHistograms();
53 virtual void DrawHistograms(const Char_t* canvasName = 0);
55 virtual void ReduceInformation();
57 virtual void Reset(Option_t* option = "");
60 TH1* fhMeas; // histogram of measured particles (or tracks)
61 TH1* fhGene; // histogram of generated particles
63 TH1* fhCorr; // correction histogram (ratio generated/measured)
65 ClassDef(AliCorrectionMatrix,1)