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