EffC++ warnings corrected.
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / AlidNdEtaCorrection.h
CommitLineData
55e05544 1/* $Id$ */
2
3#ifndef ALIDNDETACORRECTION_H
4#define ALIDNDETACORRECTION_H
5
6
7// ------------------------------------------------------
8//
9// Class to handle corrections for dN/dEta measurements
10//
11// ------------------------------------------------------
12//
13// TODO:
14// - make the ntrack to npart correction 3D
15// - add documentation
16// - add status: generate or use maps
17// - add functionality to set the bin sizes
1afae8ff 18// - update MERge function
45e97e28 19//
55e05544 20
21#include <TNamed.h>
55e05544 22
45e97e28 23#include <AliCorrectionMatrix2D.h>
24#include <AliCorrectionMatrix3D.h>
55e05544 25
26class AlidNdEtaCorrection : public TNamed
27{
55e05544 28public:
8b3563f4 29 AlidNdEtaCorrection();
30 AlidNdEtaCorrection(const Char_t* name, const Char_t* title);
55e05544 31
38233af1 32 ~AlidNdEtaCorrection();
33
1afae8ff 34 // fVertexRecoCorrection, fTriggerCorrection
35 void FillEvent(Float_t vtx, Float_t n) {fTriggerCorrection->FillGene(vtx, n);}
36 void FillEventWithTrigger(Float_t vtx, Float_t n) {fVertexRecoCorrection->FillGene(vtx, n); fTriggerCorrection->FillMeas(vtx, n);}
37 void FillEventWithTriggerWithReconstructedVertex(Float_t vtx, Float_t n) {fVertexRecoCorrection->FillMeas(vtx, n);}
55e05544 38
45e97e28 39 // fTrack2ParticleCorrection
40 void FillParticle(Float_t vtx, Float_t eta, Float_t pt) {fTrack2ParticleCorrection->FillGene(vtx, eta, pt);}
41 void FillParticleWhenMeasuredTrack(Float_t vtx, Float_t eta, Float_t pt) {fTrack2ParticleCorrection->FillMeas(vtx, eta, pt);}
55e05544 42
45e97e28 43 // fTriggerBiasCorrection
44 void FillParticleAllEvents(Float_t eta, Float_t pt) {fTriggerBiasCorrection->FillGene(eta, pt);}
45 void FillParticleWhenEventTriggered(Float_t eta, Float_t pt) {fTriggerBiasCorrection->FillMeas(eta, pt);}
46
47 void IncreaseEventCount() { fNEvents++; }
48 void IncreaseTriggeredEventCount() { fNTriggeredEvents++; }
49
50 void Finish();
51
52 AliCorrectionMatrix3D* GetTrack2ParticleCorrection() {return fTrack2ParticleCorrection;}
53 AliCorrectionMatrix2D* GetVertexRecoCorrection() {return fVertexRecoCorrection;}
54 AliCorrectionMatrix2D* GetTriggerBiasCorrection() {return fTriggerBiasCorrection;}
55e05544 55
56 virtual Long64_t Merge(TCollection* list);
57
58 void SaveHistograms();
0ab29cfa 59 Bool_t LoadHistograms(const Char_t* fileName, const Char_t* dir = "dndeta_correction");
60 Bool_t LoadCorrection(const Char_t* fileName, const Char_t* dir = "dndeta_correction")
55e05544 61 {return LoadHistograms(fileName, dir);}
62
63 void DrawHistograms();
64
65 // void RemoveEdges(Float_t cut=2, Int_t nBinsVtx=0, Int_t nBinsEta=0);
66
45e97e28 67 Float_t GetTrack2ParticleCorrection(Float_t vtx, Float_t eta, Float_t pt)
68 {return fTrack2ParticleCorrection->GetCorrection(vtx, eta, pt);}
847489f7 69
55e05544 70 Float_t GetVertexRecoCorrection(Float_t vtx, Float_t n) {return fVertexRecoCorrection->GetCorrection(vtx, n);}
71
1afae8ff 72 Float_t GetTriggerCorrection(Float_t vtx, Float_t n) {return fTriggerCorrection->GetCorrection(vtx, n);}
73
55e05544 74 Float_t GetTriggerBiasCorrection(Float_t eta, Float_t pt=0) {return fTriggerBiasCorrection->GetCorrection(eta, pt);}
45e97e28 75
847489f7 76 Float_t GetMeasuredFraction(Float_t ptCutOff, Float_t eta = -1, Bool_t debug = kFALSE);
77
8b3563f4 78 void SetNEvents(Long64_t events) { fNEvents = events; }
79
0ab29cfa 80 void ReduceInformation();
81
45e97e28 82protected:
8b3563f4 83 AliCorrectionMatrix3D* fTrack2ParticleCorrection; //-> handles the track-to-particle correction, function of vtx_z, eta, pt
84 AliCorrectionMatrix2D* fVertexRecoCorrection; //-> handles the vertex reconstruction efficiency, function of n_clustersITS and vtx_z
406eb63e 85 AliCorrectionMatrix2D* fTriggerCorrection; //-> handles the trigger efficiency, function of n_clustersITS and vtx_z
45e97e28 86
8b3563f4 87 AliCorrectionMatrix2D* fTriggerBiasCorrection; //-> MB to desired sample
45e97e28 88
89 Long64_t fNEvents;
90 Long64_t fNTriggeredEvents;
55e05544 91
8b3563f4 92 ClassDef(AlidNdEtaCorrection, 1)
55e05544 93};
94
95#endif