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