]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/dNdEta/dNdEtaAnalysis.h
Using the new ZDC-related methods
[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
20 #include <TNamed.h>
21 #include "AlidNdEtaCorrection.h"
22
23 class TH1F;
24 class TCollection;
25
26 class AlidNdEtaCorrection;
27 class AliCorrection;
28
29 class dNdEtaAnalysis : public TNamed
30 {
31 public:
32   enum { kVertexBinning = 1+2 }; // the first is for the whole vertex range, the others divide the vertex range
33
34   dNdEtaAnalysis();
35   dNdEtaAnalysis(Char_t* name, Char_t* title);
36   virtual ~dNdEtaAnalysis();
37
38   dNdEtaAnalysis(const dNdEtaAnalysis &c);
39   dNdEtaAnalysis &operator=(const dNdEtaAnalysis &c);
40   virtual void Copy(TObject &c) const;
41
42   void FillTrack(Float_t vtx, Float_t eta, Float_t pt);
43   void FillEvent(Float_t vtx, Float_t n);
44
45   void Finish(AlidNdEtaCorrection* correction, Float_t ptCut, AlidNdEtaCorrection::CorrectionType correctionType);
46
47   void DrawHistograms(Bool_t simple = kFALSE);
48   void LoadHistograms(const Char_t* dir = 0);
49   void SaveHistograms();
50
51   virtual Long64_t Merge(TCollection* list);
52
53   AliCorrection* GetData() { return fData; }
54
55   TH1F* GetPtHistogram() { return fPtDist; }
56
57   TH1F* GetdNdEtaHistogram(Int_t i = 0) { return fdNdEta[i]; }
58   TH1F* GetdNdEtaPtCutOffCorrectedHistogram(Int_t i = 0) { return fdNdEtaPtCutOffCorrected[i]; }
59
60 protected:
61   AliCorrection* fData;     // we store the data in an AliCorrection
62
63   TH1F* fPtDist; // pt distribution
64
65   TH1F* fdNdEta[kVertexBinning]; // dndeta results for different vertex bins (0 = full range)
66   TH1F* fdNdEtaPtCutOffCorrected[kVertexBinning];  // dndeta results for different vertex bins (0 = full range), pt cut off corrected
67
68   ClassDef(dNdEtaAnalysis, 1)
69 };
70
71 #endif