]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/dNdEta/dNdEtaAnalysis.h
Added selector for dNdEtaAnalysis, use with testAnalysis2.C
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / dNdEtaAnalysis.h
1 #ifndef DNDETANALYSIS_H
2 #define DNDETANALYSIS_H
3
4 // ------------------------------------------------------
5 //
6 // Class for dn/deta analysis
7 //
8 // ------------------------------------------------------
9 // 
10 // TODO:
11 // - more documentation
12 // - add debug statements
13 // - add more histograms
14 // - add functionality to set the bin sizes
15 // - figure out correct way to treat the errors
16 // - add functionality to make dn/deta for different mult classes?
17
18 #include <TObject.h>
19 #include <TString.h>
20
21 class TH2F;
22 class TH1D;
23
24 class dNdEtaAnalysis : public TObject
25 {
26 public:
27   dNdEtaAnalysis(Char_t* name="dndeta_correction");
28
29   void FillTrack(Float_t vtx, Float_t eta, Float_t weight);
30   void FillEvent(Float_t vtx);
31
32   void Finish();
33
34   void DrawHistograms();
35   void SaveHistograms();
36
37   TH2F* GetEtaVsVtxHistogram() { return hEtaVsVtx; }
38   TH2F* GetEtaVsVtxUncorrectedHistogram() { return hEtaVsVtxUncorrected; }
39   TH1D* GetVtxHistogram() { return hVtx; }
40   TH1D* GetdNdEtaHistogram() { return hdNdEta; }
41
42   void SetEtaVsVtxHistogram(TH2F* aHist) { hEtaVsVtx = aHist; }
43   void SetEtaVsVtxUncorrectedHistogram(TH2F* aHist) { hEtaVsVtxUncorrected = aHist; }
44   void SetVtxHistogram(TH1D* aHist) { hVtx = aHist; }
45   void SetdNdEtaHistogram(TH1D* aHist) { hdNdEta = aHist; }
46
47 protected:
48   TString  fName;
49
50   TH2F* hEtaVsVtx;
51   TH2F* hEtaVsVtxUncorrected;
52   TH1D* hVtx;
53   TH1D* hdNdEta;
54
55   ClassDef(dNdEtaAnalysis,0)
56 };
57
58 #endif