]>
Commit | Line | Data |
---|---|---|
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" | |
c7245604 | 12 | #include "TString.h" |
a75aacd6 | 13 | |
14 | class AliCFContainer; | |
15 | class TH1; | |
144bd037 | 16 | class TH1F; |
a75aacd6 | 17 | class TH3; |
b591fb9c | 18 | class TH3F; |
a75aacd6 | 19 | class TH1D; |
2a910c25 | 20 | class TH2; |
a75aacd6 | 21 | class TH2D; |
22 | class TCollection; | |
23 | class AliCFGridSparse; | |
c32a0ca9 | 24 | class THnSparse; |
d4b3dbfc | 25 | class THnBase; |
a75aacd6 | 26 | |
27 | class AliUEHist : public TObject | |
28 | { | |
29 | public: | |
30 | AliUEHist(const char* reqHist = ""); | |
31 | virtual ~AliUEHist(); | |
32 | ||
ff458f69 | 33 | const UInt_t fkRegions; |
a75aacd6 | 34 | enum Region { kToward = 0, kAway, kMin, kMax }; |
35 | ||
36 | static const Int_t fgkCFSteps; | |
37 | enum CFStep { kCFStepAll = 0, kCFStepTriggered, kCFStepVertex, kCFStepAnaTopology, kCFStepTrackedOnlyPrim, kCFStepTracked, kCFStepReconstructed, kCFStepRealLeading, kCFStepBiasStudy, kCFStepBiasStudy2 }; | |
38 | ||
39 | const char* GetRegionTitle(Region region); | |
40 | const char* GetStepTitle(CFStep step); | |
41 | ||
42 | AliCFContainer* GetTrackHist(Region region) { return fTrackHist[region]; } | |
43 | AliCFContainer* GetEventHist() { return fEventHist; } | |
b1831bcb | 44 | AliCFContainer* GetTrackHistEfficiency() { return fTrackHistEfficiency; } |
b591fb9c | 45 | TH3F* GetMCRecoPtCorrelation() { return fFakePt; } |
46 | ||
a75aacd6 | 47 | void SetTrackHist(Region region, AliCFContainer* hist) { fTrackHist[region] = hist; } |
48 | void SetEventHist(AliCFContainer* hist) { fEventHist = hist; } | |
ada1a03f | 49 | void SetTrackHistEfficiency(AliCFContainer* hist) { fTrackHistEfficiency = hist; } |
a75aacd6 | 50 | |
b1831bcb | 51 | void CopyReconstructedData(AliUEHist* from); |
0ffdaf17 | 52 | void DeepCopy(AliUEHist* from); |
b1831bcb | 53 | |
44af28f9 | 54 | TH1* GetUEHist(CFStep step, Region region, Float_t ptLeadMin = -1, Float_t ptLeadMax = -1, Int_t multBinBegin = 0, Int_t multBinEnd = -1, Int_t twoD = 0, Bool_t etaNorm = kTRUE, Int_t* normEvents = 0); |
c7245604 | 55 | TH1* GetPtHist(CFStep step, Region region, Float_t ptLeadMin, Float_t ptLeadMax, Int_t multBinBegin, Int_t multBinEnd, Float_t phiMin, Float_t phiMax, Float_t etaMin, Float_t etaMax, Bool_t skipPhiNormalization = kFALSE); |
44af28f9 | 56 | TH2* GetSumOfRatios(AliUEHist* mixed, CFStep step, Region region, Float_t ptLeadMin, Float_t ptLeadMax, Int_t multBinBegin, Int_t multBinEnd, Bool_t etaNorm = kTRUE, Bool_t useVertexBins = kFALSE); |
52c83678 | 57 | |
58 | void GetHistsZVtx(AliUEHist::CFStep step, AliUEHist::Region region, Float_t ptLeadMin, Float_t ptLeadMax, Int_t multBinBegin, Int_t multBinEnd, TH3** trackHist, TH1** eventHist); | |
d4b3dbfc | 59 | void GetHistsZVtxMult(AliUEHist::CFStep step, AliUEHist::Region region, Float_t ptLeadMin, Float_t ptLeadMax, THnBase** trackHist, TH2** eventHist); |
60 | ||
52c83678 | 61 | TH2* GetSumOfRatios2(AliUEHist* mixed, AliUEHist::CFStep step, AliUEHist::Region region, Float_t ptLeadMin, Float_t ptLeadMax, Int_t multBinBegin, Int_t multBinEnd); |
44af28f9 | 62 | |
2a910c25 | 63 | TH1* GetTrackEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Int_t source = 1, Int_t axis3 = -1); |
a75aacd6 | 64 | TH1* GetEventEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Float_t ptLeadMin = -1, Float_t ptLeadMax = -1); |
c7245604 | 65 | TH1* GetBias(CFStep step1, CFStep step2, Int_t region, const char* axis, Float_t leadPtMin = 0, Float_t leadPtMax = -1, Int_t weighting = 0); |
a75aacd6 | 66 | |
67 | TH1D* GetTrackingEfficiency(Int_t axis); | |
68 | TH2D* GetTrackingEfficiency(); | |
2a910c25 | 69 | TH2D* GetTrackingEfficiencyCentrality(); |
a75aacd6 | 70 | |
b591fb9c | 71 | TH2D* GetFakeRate(); |
46848f0b | 72 | TH1D* GetFakeRate(Int_t axis); |
b591fb9c | 73 | |
a75aacd6 | 74 | TH1D* GetTrackingContamination(Int_t axis); |
75 | TH2D* GetTrackingContamination(); | |
2a910c25 | 76 | TH2D* GetTrackingContaminationCentrality(); |
a75aacd6 | 77 | |
78 | TH1D* GetTrackingCorrection(Int_t axis); | |
79 | TH2D* GetTrackingCorrection(); | |
80 | ||
144bd037 | 81 | TH1D* GetTrackingEfficiencyCorrection(Int_t axis); |
82 | TH2D* GetTrackingEfficiencyCorrection(); | |
2a910c25 | 83 | TH2D* GetTrackingEfficiencyCorrectionCentrality(); |
84 | ||
85 | TH2* GetCorrelatedContamination(); | |
6f803f6c | 86 | |
df269636 | 87 | void ExtendTrackingEfficiency(Bool_t verbose = kFALSE); |
144bd037 | 88 | |
a75aacd6 | 89 | void Correct(AliUEHist* corrections); |
90 | void CorrectTracks(CFStep step1, CFStep step2, TH1* trackCorrection, Int_t var1, Int_t var2 = -1); | |
144bd037 | 91 | void CorrectTracks(CFStep step1, CFStep step2, Int_t region, TH1* trackCorrection, Int_t var1, Int_t var2 = -1); |
2a910c25 | 92 | void CorrectEvents(CFStep step1, CFStep step2, TH1* eventCorrection, Int_t var1, Int_t var2 = -1); |
93 | void CorrectCorrelatedContamination(CFStep step1, Int_t region, TH1* trackCorrection); | |
a75aacd6 | 94 | |
a5d12d24 | 95 | void CondenseBin(THnSparse* grid, THnSparse* target, Int_t axis, Float_t targetValue); |
96 | void CondenseBin(CFStep step, Int_t trackAxis, Int_t eventAxis, Float_t targetValue, CFStep tmpStep = AliUEHist::kCFStepBiasStudy2); | |
97 | ||
a75aacd6 | 98 | void SetCombineMinMax(Bool_t flag) { fCombineMinMax = flag; } |
99 | ||
100 | void SetEtaRange(Float_t etaMin, Float_t etaMax) { fEtaMin = etaMin; fEtaMax = etaMax; } | |
101 | void SetPtRange(Float_t ptMin, Float_t ptMax) { fPtMin = ptMin; fPtMax = ptMax; } | |
2a910c25 | 102 | void SetCentralityRange(Float_t min, Float_t max) { fCentralityMin = min; fCentralityMax = max; } |
85bfac17 | 103 | void SetZVtxRange(Float_t min, Float_t max) { fZVtxMin = min; fZVtxMax = max; } |
a75aacd6 | 104 | |
144bd037 | 105 | void SetContaminationEnhancement(TH1F* hist) { fContaminationEnhancement = hist; } |
106 | ||
2a910c25 | 107 | void SetHistogramType(const char* histogramType) { fHistogramType = histogramType; } |
108 | ||
144bd037 | 109 | void CountEmptyBins(AliUEHist::CFStep step, Float_t ptLeadMin, Float_t ptLeadMax); |
110 | ||
e741fadd | 111 | void AdditionalDPhiCorrection(Int_t step); |
112 | ||
ada1a03f | 113 | void SetBinLimits(AliCFGridSparse* grid); |
d4b3dbfc | 114 | void SetBinLimits(THnBase* grid); |
115 | ||
ada1a03f | 116 | void ResetBinLimits(AliCFGridSparse* grid); |
d4b3dbfc | 117 | void ResetBinLimits(THnBase* grid); |
118 | ||
119 | void SetGetMultCache(Bool_t flag = kTRUE) { fGetMultCacheOn = flag; } | |
ada1a03f | 120 | |
d1c75d06 | 121 | AliUEHist(const AliUEHist &c); |
a75aacd6 | 122 | AliUEHist& operator=(const AliUEHist& corr); |
123 | virtual void Copy(TObject& c) const; | |
124 | ||
125 | virtual Long64_t Merge(TCollection* list); | |
c7245604 | 126 | void Scale(Double_t factor); |
127 | void Reset(); | |
d4b3dbfc | 128 | THnBase* ChangeToThn(THnBase* sparse); |
a75aacd6 | 129 | |
130 | protected: | |
131 | void SetStepNames(AliCFContainer* container); | |
132 | void WeightHistogram(TH3* hist1, TH1* hist2); | |
c32a0ca9 | 133 | void MultiplyHistograms(THnSparse* grid, THnSparse* target, TH1* histogram, Int_t var1, Int_t var2); |
a75aacd6 | 134 | |
135 | AliCFContainer* fTrackHist[4]; // container for track level distributions in four regions (toward, away, min, max) and at four analysis steps | |
136 | AliCFContainer* fEventHist; // container for event level distribution at four analysis steps | |
b1831bcb | 137 | AliCFContainer* fTrackHistEfficiency; // container for tracking efficiency and contamination (all particles filled including leading one): axes: eta, pT, particle species |
b591fb9c | 138 | TH3F* fFakePt; |
139 | ||
a75aacd6 | 140 | Float_t fEtaMin; // eta min for projections |
141 | Float_t fEtaMax; // eta max for projections | |
142 | Float_t fPtMin; // pT min for projections (for track pT, not pT,lead) | |
143 | Float_t fPtMax; // pT max for projections (for track pT, not pT,lead) | |
2a910c25 | 144 | Float_t fCentralityMin; // centrality min for projections |
145 | Float_t fCentralityMax; // centrality max for projections | |
85bfac17 | 146 | Float_t fZVtxMin; // z vtx min for projections |
147 | Float_t fZVtxMax; // z vtx max for projections | |
a75aacd6 | 148 | |
144bd037 | 149 | TH1F* fContaminationEnhancement; // histogram that contains the underestimation of secondaries in the MC as function of pT |
150 | ||
a75aacd6 | 151 | Bool_t fCombineMinMax; // flag to combine min and max to a general towards region |
152 | ||
153 | AliCFContainer* fCache; //! cache variable for GetTrackEfficiency | |
154 | ||
d4b3dbfc | 155 | Bool_t fGetMultCacheOn; //! cache for GetHistsZVtxMult function active |
156 | THnBase* fGetMultCache; //! cache for GetHistsZVtxMult function | |
157 | ||
c7245604 | 158 | TString fHistogramType; // what is stored in this histogram |
159 | ||
4f9c584f | 160 | ClassDef(AliUEHist, 10) // underlying event histogram container |
a75aacd6 | 161 | }; |
162 | ||
163 | #endif |