ITS raw-data and clusters macro fixed in order to be used by the online display....
[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;
3dfa46a4 26class TH1;
55e05544 27
28class AlidNdEtaCorrection : public TNamed
29{
55e05544 30public:
74fd10b3 31 enum CorrectionType {
0448e811 32 kNone = 0,
74fd10b3 33 kTrack2Particle, // measured events
34 kVertexReco, // MB sample
35 kINEL,
36 kNSD,
37 kND
38 };
39
8b3563f4 40 AlidNdEtaCorrection();
770a1f1d 41 AlidNdEtaCorrection(const Char_t* name, const Char_t* title, AliPWG0Helper::AnalysisMode analysis = AliPWG0Helper::kTPC);
55e05544 42
74fd10b3 43 virtual Long64_t Merge(TCollection* list);
44
38233af1 45 ~AlidNdEtaCorrection();
46
74fd10b3 47 void FillMCParticle(Float_t vtx, Float_t eta, Float_t pt, Bool_t trigger, Bool_t vertex, Int_t processType);
48 void FillTrackedParticle(Float_t vtx, Float_t eta, Float_t pt);
49 void FillEvent(Float_t vtx, Float_t n, Bool_t trigger, Bool_t vertex, Int_t processType);
55e05544 50
45e97e28 51 void Finish();
52
74fd10b3 53 AliCorrection* GetTrack2ParticleCorrection() {return fTrack2ParticleCorrection;}
54 AliCorrection* GetVertexRecoCorrection() {return fVertexRecoCorrection;}
55 AliCorrection* GetTriggerBiasCorrectionINEL() {return fTriggerBiasCorrectionMBToINEL;}
56 AliCorrection* GetTriggerBiasCorrectionNSD() {return fTriggerBiasCorrectionMBToNSD;}
57 AliCorrection* GetTriggerBiasCorrectionND() {return fTriggerBiasCorrectionMBToND;}
0448e811 58 AliCorrection* GetCorrection(CorrectionType correctionType);
55e05544 59
2e88424e 60 void Reset(void);
61 void Add(AlidNdEtaCorrection* aCorrectionsToAdd, Float_t c=1);
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
74fd10b3 68 Float_t GetMeasuredFraction(CorrectionType correctionType, Float_t ptCutOff, Float_t eta = -100, Bool_t debug = kFALSE);
3dfa46a4 69 TH1* GetMeasuredEventFraction(CorrectionType correctionType, Int_t multCut);
8b3563f4 70
0ab29cfa 71 void ReduceInformation();
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
55e05544 79
61385583 80private:
81 AlidNdEtaCorrection(const AlidNdEtaCorrection&);
82 AlidNdEtaCorrection& operator=(const AlidNdEtaCorrection&);
83
8b3563f4 84 ClassDef(AlidNdEtaCorrection, 1)
55e05544 85};
86
87#endif