Update
[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:
55e05544 14// - add functionality to set the bin sizes
1afae8ff 15// - update MERge function
45e97e28 16//
55e05544 17
7ca4655f 18#include <TCollection.h>
55e05544 19#include <TNamed.h>
770a1f1d 20#include "AliPWG0Helper.h"
55e05544 21
74fd10b3 22class AliCorrection;
3dfa46a4 23class TH1;
55e05544 24
25class AlidNdEtaCorrection : public TNamed
26{
55e05544 27public:
74fd10b3 28 enum CorrectionType {
0448e811 29 kNone = 0,
74fd10b3 30 kTrack2Particle, // measured events
31 kVertexReco, // MB sample
32 kINEL,
33 kNSD,
81be4ee8 34 kND,
35 kOnePart
74fd10b3 36 };
37
8b3563f4 38 AlidNdEtaCorrection();
a7f69e56 39 AlidNdEtaCorrection(const Char_t* name, const Char_t* title, AliPWG0Helper::AnalysisMode analysis = (AliPWG0Helper::AnalysisMode) (AliPWG0Helper::kTPC | AliPWG0Helper::kFieldOn));
55e05544 40
74fd10b3 41 virtual Long64_t Merge(TCollection* list);
42
38233af1 43 ~AlidNdEtaCorrection();
44
74fd10b3 45 void FillMCParticle(Float_t vtx, Float_t eta, Float_t pt, Bool_t trigger, Bool_t vertex, Int_t processType);
68fa248f 46 void FillTrackedParticle(Float_t vtx, Float_t eta, Float_t pt, Double_t weight=1.);
74fd10b3 47 void FillEvent(Float_t vtx, Float_t n, Bool_t trigger, Bool_t vertex, Int_t processType);
55e05544 48
45e97e28 49 void Finish();
50
74fd10b3 51 AliCorrection* GetTrack2ParticleCorrection() {return fTrack2ParticleCorrection;}
52 AliCorrection* GetVertexRecoCorrection() {return fVertexRecoCorrection;}
53 AliCorrection* GetTriggerBiasCorrectionINEL() {return fTriggerBiasCorrectionMBToINEL;}
54 AliCorrection* GetTriggerBiasCorrectionNSD() {return fTriggerBiasCorrectionMBToNSD;}
55 AliCorrection* GetTriggerBiasCorrectionND() {return fTriggerBiasCorrectionMBToND;}
81be4ee8 56 AliCorrection* GetTriggerBiasCorrectionOnePart() {return fTriggerBiasCorrectionMBToOnePart;}
0448e811 57 AliCorrection* GetCorrection(CorrectionType correctionType);
55e05544 58
2e88424e 59 void Reset(void);
60 void Add(AlidNdEtaCorrection* aCorrectionsToAdd, Float_t c=1);
81be4ee8 61 void Scale(Float_t c);
2e88424e 62
55e05544 63 void SaveHistograms();
74fd10b3 64 Bool_t LoadHistograms(const Char_t* dir = 0);
2e88424e 65 void DrawHistograms();
dd367a14 66 void DrawOverview(const char* canvasName = 0);
847489f7 67
c17301f3 68 Float_t GetMeasuredFraction(CorrectionType correctionType, Float_t ptCutOff, Float_t eta = -100, Int_t vertexBegin = -1, Int_t vertexEnd = -1, Bool_t debug = kFALSE);
3dfa46a4 69 TH1* GetMeasuredEventFraction(CorrectionType correctionType, Int_t multCut);
8b3563f4 70
0fc41645 71 void ReduceInformation();
0ab29cfa 72
45e97e28 73protected:
74fd10b3 74 AliCorrection* fTrack2ParticleCorrection; //-> handles the track-to-particle correction (only track level (vtx_z, eta, pt))
75 AliCorrection* fVertexRecoCorrection; //-> handles the vertex reconstruction efficiency, (n, vtx_z)
76 AliCorrection* fTriggerBiasCorrectionMBToINEL; //-> handles the trigger bias MB->INEL, function of n and vtx_z
77 AliCorrection* fTriggerBiasCorrectionMBToNSD; //-> handles the trigger bias MB->NSD, function of n and vtx_z
78 AliCorrection* fTriggerBiasCorrectionMBToND; //-> handles the trigger bias MB->ND, function of n and vtx_z
81be4ee8 79 AliCorrection* fTriggerBiasCorrectionMBToOnePart; //-> handles the trigger bias MB->OnePart, function of n and vtx_z
55e05544 80
61385583 81private:
82 AlidNdEtaCorrection(const AlidNdEtaCorrection&);
83 AlidNdEtaCorrection& operator=(const AlidNdEtaCorrection&);
84
81be4ee8 85 ClassDef(AlidNdEtaCorrection, 2)
55e05544 86};
87
88#endif