adding class AliCorrection that comprises a correction on the event-level and on...
[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>
7584d357 25#include <AliLog.h>
55e05544 26
27class AlidNdEtaCorrection : public TNamed
28{
55e05544 29public:
8b3563f4 30 AlidNdEtaCorrection();
31 AlidNdEtaCorrection(const Char_t* name, const Char_t* title);
55e05544 32
38233af1 33 ~AlidNdEtaCorrection();
34
45e97e28 35 // fTrack2ParticleCorrection
36 void FillParticle(Float_t vtx, Float_t eta, Float_t pt) {fTrack2ParticleCorrection->FillGene(vtx, eta, pt);}
37 void FillParticleWhenMeasuredTrack(Float_t vtx, Float_t eta, Float_t pt) {fTrack2ParticleCorrection->FillMeas(vtx, eta, pt);}
55e05544 38
7584d357 39 // fVertexRecoCorrection & fTriggerBiasCorrection
40 void FillEventWithTriggerWithReconstructedVertex(Float_t vtx, Float_t n) {fVertexRecoCorrection->FillMeas(vtx, n);}
41 void FillEventWithTrigger(Float_t vtx, Float_t n);
42 void FillEventAll(Float_t vtx, Float_t n, Char_t* opt="INEL");
43
45e97e28 44 void Finish();
45
7584d357 46 AliCorrectionMatrix3D* GetTrack2ParticleCorrection() {return fTrack2ParticleCorrection;}
47 AliCorrectionMatrix2D* GetVertexRecoCorrection() {return fVertexRecoCorrection;}
48 AliCorrectionMatrix2D* GetTriggerBiasCorrectionINEL() {return fTriggerBiasCorrectionMBToINEL;}
49 AliCorrectionMatrix2D* GetTriggerBiasCorrectionNSD() {return fTriggerBiasCorrectionMBToNSD;}
50 AliCorrectionMatrix2D* GetTriggerBiasCorrectionND() {return fTriggerBiasCorrectionMBToND;}
51 AliCorrectionMatrix2D* GetTriggerBiasCorrection(Char_t* opt="INEL");
55e05544 52
53 virtual Long64_t Merge(TCollection* list);
54
55 void SaveHistograms();
0ab29cfa 56 Bool_t LoadHistograms(const Char_t* fileName, const Char_t* dir = "dndeta_correction");
7584d357 57 Bool_t LoadCorrection(const Char_t* fileName, const Char_t* dir = "dndeta_correction") {return LoadHistograms(fileName, dir);}
55e05544 58
59 void DrawHistograms();
60
61 // void RemoveEdges(Float_t cut=2, Int_t nBinsVtx=0, Int_t nBinsEta=0);
62
7af955da 63 Float_t GetTrack2ParticleCorrection(Float_t vtx, Float_t eta, Float_t pt)
45e97e28 64 {return fTrack2ParticleCorrection->GetCorrection(vtx, eta, pt);}
7584d357 65
66 Float_t GetVertexRecoCorrection (Float_t vtx, Float_t n) {return fVertexRecoCorrection->GetCorrection(vtx, n);}
67 Float_t GetTriggerBiasCorrectionINEL(Float_t vtx, Float_t n) {return fTriggerBiasCorrectionMBToINEL->GetCorrection(vtx, n);}
68 Float_t GetTriggerBiasCorrectionNSD (Float_t vtx, Float_t n) {return fTriggerBiasCorrectionMBToNSD->GetCorrection(vtx, n);}
69 Float_t GetTriggerBiasCorrectionND (Float_t vtx, Float_t n) {return fTriggerBiasCorrectionMBToND->GetCorrection(vtx, n);}
70 Float_t GetTriggerBiasCorrection (Float_t vtx, Float_t n, Char_t* opt="INEL");
45e97e28 71
72e597d7 72 Float_t GetMeasuredFraction(Float_t ptCutOff, Float_t eta = -100, Bool_t debug = kFALSE);
847489f7 73
8b3563f4 74
0ab29cfa 75 void ReduceInformation();
76
45e97e28 77protected:
7584d357 78 AliCorrectionMatrix3D* fTrack2ParticleCorrection; //-> handles the track-to-particle correction, function of vtx_z, eta, pt
79 AliCorrectionMatrix2D* fVertexRecoCorrection; //-> handles the vertex reconstruction efficiency, function of n_clustersITS and vtx_z
80 AliCorrectionMatrix2D* fTriggerBiasCorrectionMBToINEL; //-> handles the trigger bias MB->INEL, function of n and vtx_z
81 AliCorrectionMatrix2D* fTriggerBiasCorrectionMBToNSD; //-> handles the trigger bias MB->NSD, function of n and vtx_z
82 AliCorrectionMatrix2D* fTriggerBiasCorrectionMBToND; //-> handles the trigger bias MB->ND, function of n and vtx_z
45e97e28 83
7af955da 84 //Long64_t fNEvents;
85 //Long64_t fNTriggeredEvents;
55e05544 86
61385583 87private:
88 AlidNdEtaCorrection(const AlidNdEtaCorrection&);
89 AlidNdEtaCorrection& operator=(const AlidNdEtaCorrection&);
90
8b3563f4 91 ClassDef(AlidNdEtaCorrection, 1)
55e05544 92};
93
94#endif