Coverity fixes
[u/mrichter/AliRoot.git] / PWG0 / AliCorrectionMatrix.h
CommitLineData
bf21645b 1#ifndef ALICORRECTIONMATRIX_H
2#define ALICORRECTIONMATRIX_H
3
4/* $Id$ */
5
6// ------------------------------------------------------
7//
8// Class to handle corrections.
9//
10// ------------------------------------------------------
11//
12// TODO:
13//
14// - add options in draw method
15//
16
17#include <TNamed.h>
18
19class TH1;
20
21class AliCorrectionMatrix : public TNamed
22{
1afae8ff 23protected: // do not create this baseclass
bf21645b 24 AliCorrectionMatrix();
25 AliCorrectionMatrix(const Char_t* name, const Char_t* title);
26 AliCorrectionMatrix(const AliCorrectionMatrix& c);
27 virtual ~AliCorrectionMatrix();
61385583 28 AliCorrectionMatrix& operator=(const AliCorrectionMatrix& corrMatrix);
bf21645b 29
1afae8ff 30public:
bf21645b 31 virtual void Copy(TObject& c) const;
32 virtual Long64_t Merge(TCollection* list);
33
34 TH1* GetGeneratedHistogram() { return fhGene; }
35 TH1* GetMeasuredHistogram() { return fhMeas; }
29771dc8 36 TH1* GetCorrectionHistogram() { return fhCorr; }
bf21645b 37
38 void SetGeneratedHistogram(TH1* agene) { fhGene = agene; }
39 void SetMeasuredHistogram(TH1* ameas) { fhMeas = ameas; }
29771dc8 40 void SetCorrectionHistogram(TH1* acorr) { fhCorr = acorr; }
bf21645b 41
42 void Divide();
29771dc8 43 void Multiply();
44 void SetCorrectionToUnity();
610f8b68 45 void ResetErrorsOnCorrections();
dd367a14 46 void Scale(Double_t factor);
bf21645b 47
2e88424e 48 void Add(AliCorrectionMatrix* aMatrixToAdd, Float_t c=1);
49
bf21645b 50 void SetAxisTitles(const Char_t* titleX="", const Char_t* titleY="", const Char_t* titleZ="");
51
29771dc8 52 virtual Bool_t LoadHistograms(const Char_t* dir = 0);
bf21645b 53 virtual void SaveHistograms();
54
29771dc8 55 virtual void DrawHistograms(const Char_t* canvasName = 0);
bf21645b 56
0ab29cfa 57 virtual void ReduceInformation();
58
ef2713c5 59 virtual void Reset(Option_t* option = "");
60
bf21645b 61protected:
62 TH1* fhMeas; // histogram of measured particles (or tracks)
63 TH1* fhGene; // histogram of generated particles
64
65 TH1* fhCorr; // correction histogram (ratio generated/measured)
66
67 ClassDef(AliCorrectionMatrix,1)
68};
69
70#endif
71