updating makefile to build all PWG0libs
[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
45e97e28 23class TH3F;
ceb5d1b5 24class TH1D;
7029240a 25class TCollection;
45e97e28 26class AlidNdEtaCorrection;
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
45e97e28 40 void FillTrack(Float_t vtx, Float_t eta, Float_t pt, Float_t weight);
41 void FillEvent(Float_t vtx, Float_t weight);
ceb5d1b5 42
847489f7 43 void Finish(AlidNdEtaCorrection* correction, Float_t ptCut);
ceb5d1b5 44
45 void DrawHistograms();
5fbd0b17 46 void LoadHistograms();
75ec0f41 47 void SaveHistograms();
ceb5d1b5 48
7029240a 49 virtual Long64_t Merge(TCollection* list);
50
45e97e28 51 TH3F* GetHistogram() { return fData; }
52 TH3F* GetUncorrectedHistogram() { return fDataUncorrected; }
6bf0714d 53 TH1D* GetVtxHistogram() { return fVtx; }
54 TH1D* GetdNdEtaHistogram(Int_t i = 0) { return fdNdEta[i]; }
ceb5d1b5 55
56protected:
45e97e28 57 TH3F* fData; // histogram Eta vs vtx (track count)
58 TH3F* fDataUncorrected; // uncorrected histograms Eta vs vtx (track count)
59
60 Float_t fNEvents; // number of events (float because corrected by weight)
61
6bf0714d 62 TH1D* fVtx; // vtx histogram (event count)
63 TH1D* fdNdEta[kVertexBinning];// dndeta results for different vertex bins (0 = full range)
ceb5d1b5 64
6bf0714d 65 ClassDef(dNdEtaAnalysis, 0)
75ec0f41 66};
67
539b6cb4 68#endif