]>
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: | |
3f3f12d9 | 30 | AliUEHist(const char* reqHist = "", const char* binning = 0); |
a75aacd6 | 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; | |
408d1ac9 | 37 | enum CFStep { kCFStepAll = 0, kCFStepTriggered, kCFStepVertex, kCFStepAnaTopology, kCFStepTrackedOnlyPrim, kCFStepTracked, kCFStepReconstructed, kCFStepRealLeading, kCFStepBiasStudy, kCFStepBiasStudy2, kCFStepCorrected }; |
a75aacd6 | 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 | |
3f3f12d9 | 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, Long64_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 | ||
b4263273 | 61 | TH2* GetSumOfRatios2(AliUEHist* mixed, AliUEHist::CFStep step, AliUEHist::Region region, Float_t ptLeadMin, Float_t ptLeadMax, Int_t multBinBegin, Int_t multBinEnd, Bool_t normalizePerTrigger = kTRUE); |
62 | ||
63 | TH1* GetTriggersAsFunctionOfMultiplicity(AliUEHist::CFStep step, Float_t ptLeadMin, Float_t ptLeadMax); | |
44af28f9 | 64 | |
2a910c25 | 65 | TH1* GetTrackEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Int_t source = 1, Int_t axis3 = -1); |
408d1ac9 | 66 | THnBase* GetTrackEfficiencyND(CFStep step1, CFStep step2); |
a75aacd6 | 67 | TH1* GetEventEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Float_t ptLeadMin = -1, Float_t ptLeadMax = -1); |
c7245604 | 68 | 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 | 69 | |
70 | TH1D* GetTrackingEfficiency(Int_t axis); | |
71 | TH2D* GetTrackingEfficiency(); | |
2a910c25 | 72 | TH2D* GetTrackingEfficiencyCentrality(); |
a75aacd6 | 73 | |
b591fb9c | 74 | TH2D* GetFakeRate(); |
46848f0b | 75 | TH1D* GetFakeRate(Int_t axis); |
b591fb9c | 76 | |
a75aacd6 | 77 | TH1D* GetTrackingContamination(Int_t axis); |
78 | TH2D* GetTrackingContamination(); | |
2a910c25 | 79 | TH2D* GetTrackingContaminationCentrality(); |
a75aacd6 | 80 | |
81 | TH1D* GetTrackingCorrection(Int_t axis); | |
82 | TH2D* GetTrackingCorrection(); | |
83 | ||
144bd037 | 84 | TH1D* GetTrackingEfficiencyCorrection(Int_t axis); |
85 | TH2D* GetTrackingEfficiencyCorrection(); | |
2a910c25 | 86 | TH2D* GetTrackingEfficiencyCorrectionCentrality(); |
87 | ||
88 | TH2* GetCorrelatedContamination(); | |
6f803f6c | 89 | |
df269636 | 90 | void ExtendTrackingEfficiency(Bool_t verbose = kFALSE); |
144bd037 | 91 | |
a75aacd6 | 92 | void Correct(AliUEHist* corrections); |
93 | void CorrectTracks(CFStep step1, CFStep step2, TH1* trackCorrection, Int_t var1, Int_t var2 = -1); | |
144bd037 | 94 | void CorrectTracks(CFStep step1, CFStep step2, Int_t region, TH1* trackCorrection, Int_t var1, Int_t var2 = -1); |
2a910c25 | 95 | void CorrectEvents(CFStep step1, CFStep step2, TH1* eventCorrection, Int_t var1, Int_t var2 = -1); |
96 | void CorrectCorrelatedContamination(CFStep step1, Int_t region, TH1* trackCorrection); | |
a75aacd6 | 97 | |
9894bedd | 98 | void CondenseBin(THnSparse* grid, THnSparse* target, Int_t axis, Float_t targetValue, Float_t from, Float_t to); |
99 | void CondenseBin(CFStep step, Int_t trackAxis, Int_t eventAxis, Float_t targetValue, Float_t from = 0, Float_t to = -1, CFStep tmpStep = AliUEHist::kCFStepBiasStudy2); | |
4da05e3e | 100 | void SymmetrizepTBins(); |
a5d12d24 | 101 | |
a75aacd6 | 102 | void SetCombineMinMax(Bool_t flag) { fCombineMinMax = flag; } |
103 | ||
104 | void SetEtaRange(Float_t etaMin, Float_t etaMax) { fEtaMin = etaMin; fEtaMax = etaMax; } | |
105 | void SetPtRange(Float_t ptMin, Float_t ptMax) { fPtMin = ptMin; fPtMax = ptMax; } | |
c824c30e | 106 | void SetPartSpecies(Int_t species) { fPartSpecies = species;} |
2a910c25 | 107 | void SetCentralityRange(Float_t min, Float_t max) { fCentralityMin = min; fCentralityMax = max; } |
85bfac17 | 108 | void SetZVtxRange(Float_t min, Float_t max) { fZVtxMin = min; fZVtxMax = max; } |
a75aacd6 | 109 | |
b4263273 | 110 | Float_t GetTrackEtaCut() { return fTrackEtaCut; } |
defad170 | 111 | void SetTrackEtaCut(Float_t value) { fTrackEtaCut = value; } |
20b7a005 | 112 | void SetWeightPerEvent(Bool_t flag) { fWeightPerEvent = flag; } |
7e9608f2 | 113 | void SetSkipScaleMixedEvent(Bool_t flag) { fSkipScaleMixedEvent = flag; } |
defad170 | 114 | |
144bd037 | 115 | void SetContaminationEnhancement(TH1F* hist) { fContaminationEnhancement = hist; } |
116 | ||
2a910c25 | 117 | void SetHistogramType(const char* histogramType) { fHistogramType = histogramType; } |
118 | ||
144bd037 | 119 | void CountEmptyBins(AliUEHist::CFStep step, Float_t ptLeadMin, Float_t ptLeadMax); |
120 | ||
e741fadd | 121 | void AdditionalDPhiCorrection(Int_t step); |
122 | ||
ada1a03f | 123 | void SetBinLimits(AliCFGridSparse* grid); |
d4b3dbfc | 124 | void SetBinLimits(THnBase* grid); |
125 | ||
ada1a03f | 126 | void ResetBinLimits(AliCFGridSparse* grid); |
d4b3dbfc | 127 | void ResetBinLimits(THnBase* grid); |
128 | ||
129 | void SetGetMultCache(Bool_t flag = kTRUE) { fGetMultCacheOn = flag; } | |
ada1a03f | 130 | |
d1c75d06 | 131 | AliUEHist(const AliUEHist &c); |
a75aacd6 | 132 | AliUEHist& operator=(const AliUEHist& corr); |
133 | virtual void Copy(TObject& c) const; | |
134 | ||
135 | virtual Long64_t Merge(TCollection* list); | |
c7245604 | 136 | void Scale(Double_t factor); |
137 | void Reset(); | |
d4b3dbfc | 138 | THnBase* ChangeToThn(THnBase* sparse); |
a75aacd6 | 139 | |
140 | protected: | |
3f3f12d9 | 141 | Double_t* GetBinning(const char* configuration, const char* tag, Int_t& nBins); |
a75aacd6 | 142 | void SetStepNames(AliCFContainer* container); |
143 | void WeightHistogram(TH3* hist1, TH1* hist2); | |
c32a0ca9 | 144 | void MultiplyHistograms(THnSparse* grid, THnSparse* target, TH1* histogram, Int_t var1, Int_t var2); |
a75aacd6 | 145 | |
e93687b1 JFGO |
146 | AliCFContainer* fTrackHist[4]; // container for track level distributions in four regions (toward, away, min, max) and at all analysis steps |
147 | AliCFContainer* fEventHist; // container for event level distribution at all analysis steps | |
b1831bcb | 148 | AliCFContainer* fTrackHistEfficiency; // container for tracking efficiency and contamination (all particles filled including leading one): axes: eta, pT, particle species |
b591fb9c | 149 | TH3F* fFakePt; |
150 | ||
a75aacd6 | 151 | Float_t fEtaMin; // eta min for projections |
152 | Float_t fEtaMax; // eta max for projections | |
153 | Float_t fPtMin; // pT min for projections (for track pT, not pT,lead) | |
154 | Float_t fPtMax; // pT max for projections (for track pT, not pT,lead) | |
c824c30e | 155 | Int_t fPartSpecies; // Particle species for projections |
2a910c25 | 156 | Float_t fCentralityMin; // centrality min for projections |
157 | Float_t fCentralityMax; // centrality max for projections | |
85bfac17 | 158 | Float_t fZVtxMin; // z vtx min for projections |
159 | Float_t fZVtxMax; // z vtx max for projections | |
a75aacd6 | 160 | |
144bd037 | 161 | TH1F* fContaminationEnhancement; // histogram that contains the underestimation of secondaries in the MC as function of pT |
162 | ||
a75aacd6 | 163 | Bool_t fCombineMinMax; // flag to combine min and max to a general towards region |
defad170 | 164 | Float_t fTrackEtaCut; // cut used during production of histograms (needed for finite bin correction in GetSumOfRatios) |
7e9608f2 | 165 | Bool_t fWeightPerEvent; // weight with the number of trigger particles per event |
166 | Bool_t fSkipScaleMixedEvent; // scale the mixed event with (0, 0) plus finite bin correction (default: kTRUE) | |
a75aacd6 | 167 | |
168 | AliCFContainer* fCache; //! cache variable for GetTrackEfficiency | |
169 | ||
d4b3dbfc | 170 | Bool_t fGetMultCacheOn; //! cache for GetHistsZVtxMult function active |
171 | THnBase* fGetMultCache; //! cache for GetHistsZVtxMult function | |
172 | ||
c7245604 | 173 | TString fHistogramType; // what is stored in this histogram |
174 | ||
7e9608f2 | 175 | ClassDef(AliUEHist, 14) // underlying event histogram container |
a75aacd6 | 176 | }; |
177 | ||
178 | #endif |