]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliUEHist.h
added corrections for delta phi UE event distribution
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliUEHist.h
CommitLineData
a75aacd6 1#ifndef AliUEHist_H
2#define AliUEHist_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: AliUEHist.h 20164 2007-08-14 15:31:50Z morsch $ */
8
9// encapsulate histogram and corrections for one underlying event histogram
10
11#include "TObject.h"
12
13class AliCFContainer;
14class TH1;
144bd037 15class TH1F;
a75aacd6 16class TH3;
17class TH1D;
18class TH2D;
19class TCollection;
20class AliCFGridSparse;
21
22class AliUEHist : public TObject
23{
24 public:
25 AliUEHist(const char* reqHist = "");
26 virtual ~AliUEHist();
27
28 const Int_t fkRegions;
29 enum Region { kToward = 0, kAway, kMin, kMax };
30
31 static const Int_t fgkCFSteps;
32 enum CFStep { kCFStepAll = 0, kCFStepTriggered, kCFStepVertex, kCFStepAnaTopology, kCFStepTrackedOnlyPrim, kCFStepTracked, kCFStepReconstructed, kCFStepRealLeading, kCFStepBiasStudy, kCFStepBiasStudy2 };
33
34 const char* GetRegionTitle(Region region);
35 const char* GetStepTitle(CFStep step);
36
37 AliCFContainer* GetTrackHist(Region region) { return fTrackHist[region]; }
38 AliCFContainer* GetEventHist() { return fEventHist; }
b1831bcb 39 AliCFContainer* GetTrackHistEfficiency() { return fTrackHistEfficiency; }
a75aacd6 40
41 void SetTrackHist(Region region, AliCFContainer* hist) { fTrackHist[region] = hist; }
42 void SetEventHist(AliCFContainer* hist) { fEventHist = hist; }
ada1a03f 43 void SetTrackHistEfficiency(AliCFContainer* hist) { fTrackHistEfficiency = hist; }
a75aacd6 44
b1831bcb 45 void CopyReconstructedData(AliUEHist* from);
46
a75aacd6 47 TH1D* GetUEHist(CFStep step, Region region, Float_t ptLeadMin = -1, Float_t ptLeadMax = -1);
48
b1831bcb 49 TH1* GetTrackEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Int_t source = 1);
a75aacd6 50 TH1* GetEventEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Float_t ptLeadMin = -1, Float_t ptLeadMax = -1);
ada1a03f 51 TH1* GetBias(CFStep step1, CFStep step2, Int_t region, const char* axis, Float_t leadPtMin = 0, Float_t leadPtMax = -1);
a75aacd6 52
53 TH1D* GetTrackingEfficiency(Int_t axis);
54 TH2D* GetTrackingEfficiency();
55
56 TH1D* GetTrackingContamination(Int_t axis);
57 TH2D* GetTrackingContamination();
58
59 TH1D* GetTrackingCorrection(Int_t axis);
60 TH2D* GetTrackingCorrection();
61
144bd037 62 TH1D* GetTrackingEfficiencyCorrection(Int_t axis);
63 TH2D* GetTrackingEfficiencyCorrection();
64
a75aacd6 65 void Correct(AliUEHist* corrections);
66 void CorrectTracks(CFStep step1, CFStep step2, TH1* trackCorrection, Int_t var1, Int_t var2 = -1);
144bd037 67 void CorrectTracks(CFStep step1, CFStep step2, Int_t region, TH1* trackCorrection, Int_t var1, Int_t var2 = -1);
a75aacd6 68 void CorrectEvents(CFStep step1, CFStep step2, TH1D* eventCorrection, Int_t var);
69
70 void SetCombineMinMax(Bool_t flag) { fCombineMinMax = flag; }
71
72 void SetEtaRange(Float_t etaMin, Float_t etaMax) { fEtaMin = etaMin; fEtaMax = etaMax; }
73 void SetPtRange(Float_t ptMin, Float_t ptMax) { fPtMin = ptMin; fPtMax = ptMax; }
74
144bd037 75 void SetContaminationEnhancement(TH1F* hist) { fContaminationEnhancement = hist; }
76
77 void CountEmptyBins(AliUEHist::CFStep step, Float_t ptLeadMin, Float_t ptLeadMax);
78
ada1a03f 79 void SetBinLimits(AliCFGridSparse* grid);
80 void ResetBinLimits(AliCFGridSparse* grid);
81
d1c75d06 82 AliUEHist(const AliUEHist &c);
a75aacd6 83 AliUEHist& operator=(const AliUEHist& corr);
84 virtual void Copy(TObject& c) const;
85
86 virtual Long64_t Merge(TCollection* list);
87
88protected:
89 void SetStepNames(AliCFContainer* container);
90 void WeightHistogram(TH3* hist1, TH1* hist2);
a75aacd6 91
92 AliCFContainer* fTrackHist[4]; // container for track level distributions in four regions (toward, away, min, max) and at four analysis steps
93 AliCFContainer* fEventHist; // container for event level distribution at four analysis steps
b1831bcb 94 AliCFContainer* fTrackHistEfficiency; // container for tracking efficiency and contamination (all particles filled including leading one): axes: eta, pT, particle species
a75aacd6 95
96 Float_t fEtaMin; // eta min for projections
97 Float_t fEtaMax; // eta max for projections
98 Float_t fPtMin; // pT min for projections (for track pT, not pT,lead)
99 Float_t fPtMax; // pT max for projections (for track pT, not pT,lead)
100
144bd037 101 TH1F* fContaminationEnhancement; // histogram that contains the underestimation of secondaries in the MC as function of pT
102
a75aacd6 103 Bool_t fCombineMinMax; // flag to combine min and max to a general towards region
104
105 AliCFContainer* fCache; //! cache variable for GetTrackEfficiency
106
b1831bcb 107 ClassDef(AliUEHist, 3) // underlying event histogram container
a75aacd6 108};
109
110#endif