]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/dNdEta/dNdEtaAnalysis.h
3ac557357fd3808f3220e6f862962a9299e6cd6e
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / dNdEtaAnalysis.h
1 /* $Id$ */
2
3 #ifndef DNDETANALYSIS_H
4 #define DNDETANALYSIS_H
5
6 // ------------------------------------------------------
7 //
8 // Class for dn/deta analysis
9 //
10 // ------------------------------------------------------
11 // 
12 // TODO:
13 // - more documentation
14 // - add debug statements
15 // - add more histograms
16 // - add functionality to set the bin sizes
17 // - figure out correct way to treat the errors
18 // - add functionality to make dn/deta for different mult classes?
19 // - implement destructor
20
21 #include <TNamed.h>
22
23 class TH2F;
24 class TH1D;
25 class TCollection;
26 class dNdEtaCorrection;
27
28 class dNdEtaAnalysis : public TNamed
29 {
30 public:
31   enum { kVertexBinning = 1+4 }; // the first is for the whole vertex range, the others divide the vertex range
32
33   dNdEtaAnalysis(Char_t* name, Char_t* title);
34   virtual ~dNdEtaAnalysis();
35
36   dNdEtaAnalysis(const dNdEtaAnalysis &c);
37   dNdEtaAnalysis &operator=(const dNdEtaAnalysis &c);
38   virtual void Copy(TObject &c) const;
39
40   void FillTrack(Float_t vtx, Float_t eta);
41   void FillEvent(Float_t vtx);
42
43   void Finish(dNdEtaCorrection* correction);
44
45   void DrawHistograms();
46   void LoadHistograms();
47   void SaveHistograms();
48
49   virtual Long64_t Merge(TCollection* list);
50
51   TH2F* GetEtaVsVtxHistogram() { return fEtaVsVtx; }
52   TH2F* GetEtaVsVtxUncorrectedHistogram() { return fEtaVsVtxUncorrected; }
53   TH1D* GetVtxHistogram() { return fVtx; }
54   TH1D* GetdNdEtaHistogram(Int_t i = 0) { return fdNdEta[i]; }
55
56 protected:
57   TH2F* fEtaVsVtx;              // histogram Eta vs vtx (track count)
58   TH2F* fEtaVsVtxUncorrected;   // uncorrected histograms Eta vs vtx (track count)
59   TH1D* fVtx;                   // vtx histogram (event count)
60   TH1D* fdNdEta[kVertexBinning];// dndeta results for different vertex bins (0 = full range)
61
62   ClassDef(dNdEtaAnalysis, 0)
63 };
64
65 #endif