1) Added "Makefile support": LinkDef + pkg file, made header files compliant
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / dNdEtaCorrection.h
CommitLineData
539b6cb4 1#ifndef DNDETACORRECTION_H
2#define DNDETACORRECTION_H
3
75ec0f41 4// ------------------------------------------------------
5//
6// Class to handle corrections for dN/dEta measurements
7//
8// ------------------------------------------------------
9//
10// TODO:
11// - add documentation
12// - add status: generate or use maps
13// - add functionality to set the bin sizes
14// - add histograms with errors (for error visualization)
15//
16
17#ifndef ROOT_TObject
18#include "TObject.h"
19#endif
20#ifndef ROOT_TFile
21#include "TFile.h"
22#endif
23#ifndef ROOT_TH2
24#include "TH2.h"
25#endif
26
27
539b6cb4 28class dNdEtaCorrection : public TObject
75ec0f41 29{
30protected:
31
32 TString fName;
33
34 TH2F* hEtaVsVtx_meas;
35 TH2F* hEtaVsVtx_gene;
36
37 TH2F* hEtaVsVtx_corr;
38 TH2F* hEtaVsVtx_ratio;
39
40public:
41 dNdEtaCorrection(Char_t* name="dndeta_correction");
42
43 void FillMeas(Float_t vtx, Float_t eta) {hEtaVsVtx_meas->Fill(vtx, eta);}
44 void FillGene(Float_t vtx, Float_t eta) {hEtaVsVtx_gene->Fill(vtx, eta);}
45
46 void Finish();
47
48 void SaveHistograms();
49 Bool_t LoadHistograms(Char_t* fileName, Char_t* dir = "dndeta_correction");
50 Bool_t LoadCorrection(Char_t* fileName, Char_t* dir = "dndeta_correction")
51 {return LoadHistograms(fileName, dir);}
52
53 void DrawHistograms();
54
55 void RemoveEdges(Float_t cut=2, Int_t nBinsVtx=0, Int_t nBinsEta=0);
56
57 Float_t GetCorrection(Float_t vtx, Float_t eta)
58 {return hEtaVsVtx_corr->GetBinContent(hEtaVsVtx_corr->FindBin(vtx,eta));}
59
60 ClassDef(dNdEtaCorrection,0)
61};
62
539b6cb4 63#endif