class with static analysis helper functions
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / dNdEtaAnalysis.h
CommitLineData
dc740de4 1/* $Id$ */
2
539b6cb4 3#ifndef DNDETANALYSIS_H
4#define DNDETANALYSIS_H
5
75ec0f41 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?
4dd2ad81 19// - implement destructor
75ec0f41 20
7029240a 21#include <TNamed.h>
75ec0f41 22
ceb5d1b5 23class TH2F;
24class TH1D;
7029240a 25class TCollection;
fcf2fb36 26class dNdEtaCorrection;
75ec0f41 27
7029240a 28class dNdEtaAnalysis : public TNamed
ceb5d1b5 29{
75ec0f41 30public:
5af55649 31 enum { kVertexBinning = 1+4 }; // the first is for the whole vertex range, the others divide the vertex range
7029240a 32
33 dNdEtaAnalysis(Char_t* name, Char_t* title);
16e24ca3 34 virtual ~dNdEtaAnalysis();
35
36 dNdEtaAnalysis(const dNdEtaAnalysis &c);
37 dNdEtaAnalysis &operator=(const dNdEtaAnalysis &c);
38 virtual void Copy(TObject &c) const;
75ec0f41 39
5fbd0b17 40 void FillTrack(Float_t vtx, Float_t eta);
75ec0f41 41 void FillEvent(Float_t vtx);
ceb5d1b5 42
fcf2fb36 43 void Finish(dNdEtaCorrection* correction);
ceb5d1b5 44
45 void DrawHistograms();
5fbd0b17 46 void LoadHistograms();
75ec0f41 47 void SaveHistograms();
ceb5d1b5 48
7029240a 49 virtual Long64_t Merge(TCollection* list);
50
6bf0714d 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]; }
ceb5d1b5 55
56protected:
6bf0714d 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)
ceb5d1b5 61
6bf0714d 62 ClassDef(dNdEtaAnalysis, 0)
75ec0f41 63};
64
539b6cb4 65#endif