]>
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; |
18 | class TH1D; | |
2a910c25 | 19 | class TH2; |
a75aacd6 | 20 | class TH2D; |
21 | class TCollection; | |
22 | class AliCFGridSparse; | |
23 | ||
24 | class AliUEHist : public TObject | |
25 | { | |
26 | public: | |
27 | AliUEHist(const char* reqHist = ""); | |
28 | virtual ~AliUEHist(); | |
29 | ||
ff458f69 | 30 | const UInt_t fkRegions; |
a75aacd6 | 31 | enum Region { kToward = 0, kAway, kMin, kMax }; |
32 | ||
33 | static const Int_t fgkCFSteps; | |
34 | enum CFStep { kCFStepAll = 0, kCFStepTriggered, kCFStepVertex, kCFStepAnaTopology, kCFStepTrackedOnlyPrim, kCFStepTracked, kCFStepReconstructed, kCFStepRealLeading, kCFStepBiasStudy, kCFStepBiasStudy2 }; | |
35 | ||
36 | const char* GetRegionTitle(Region region); | |
37 | const char* GetStepTitle(CFStep step); | |
38 | ||
39 | AliCFContainer* GetTrackHist(Region region) { return fTrackHist[region]; } | |
40 | AliCFContainer* GetEventHist() { return fEventHist; } | |
b1831bcb | 41 | AliCFContainer* GetTrackHistEfficiency() { return fTrackHistEfficiency; } |
a75aacd6 | 42 | |
43 | void SetTrackHist(Region region, AliCFContainer* hist) { fTrackHist[region] = hist; } | |
44 | void SetEventHist(AliCFContainer* hist) { fEventHist = hist; } | |
ada1a03f | 45 | void SetTrackHistEfficiency(AliCFContainer* hist) { fTrackHistEfficiency = hist; } |
a75aacd6 | 46 | |
b1831bcb | 47 | void CopyReconstructedData(AliUEHist* from); |
48 | ||
85bfac17 | 49 | 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); |
c7245604 | 50 | 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); |
a75aacd6 | 51 | |
2a910c25 | 52 | TH1* GetTrackEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Int_t source = 1, Int_t axis3 = -1); |
a75aacd6 | 53 | TH1* GetEventEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_t axis2 = -1, Float_t ptLeadMin = -1, Float_t ptLeadMax = -1); |
c7245604 | 54 | 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 | 55 | |
56 | TH1D* GetTrackingEfficiency(Int_t axis); | |
57 | TH2D* GetTrackingEfficiency(); | |
2a910c25 | 58 | TH2D* GetTrackingEfficiencyCentrality(); |
a75aacd6 | 59 | |
60 | TH1D* GetTrackingContamination(Int_t axis); | |
61 | TH2D* GetTrackingContamination(); | |
2a910c25 | 62 | TH2D* GetTrackingContaminationCentrality(); |
a75aacd6 | 63 | |
64 | TH1D* GetTrackingCorrection(Int_t axis); | |
65 | TH2D* GetTrackingCorrection(); | |
66 | ||
144bd037 | 67 | TH1D* GetTrackingEfficiencyCorrection(Int_t axis); |
68 | TH2D* GetTrackingEfficiencyCorrection(); | |
2a910c25 | 69 | TH2D* GetTrackingEfficiencyCorrectionCentrality(); |
70 | ||
71 | TH2* GetCorrelatedContamination(); | |
6f803f6c | 72 | |
df269636 | 73 | void ExtendTrackingEfficiency(Bool_t verbose = kFALSE); |
144bd037 | 74 | |
a75aacd6 | 75 | void Correct(AliUEHist* corrections); |
76 | void CorrectTracks(CFStep step1, CFStep step2, TH1* trackCorrection, Int_t var1, Int_t var2 = -1); | |
144bd037 | 77 | void CorrectTracks(CFStep step1, CFStep step2, Int_t region, TH1* trackCorrection, Int_t var1, Int_t var2 = -1); |
2a910c25 | 78 | void CorrectEvents(CFStep step1, CFStep step2, TH1* eventCorrection, Int_t var1, Int_t var2 = -1); |
79 | void CorrectCorrelatedContamination(CFStep step1, Int_t region, TH1* trackCorrection); | |
a75aacd6 | 80 | |
81 | void SetCombineMinMax(Bool_t flag) { fCombineMinMax = flag; } | |
82 | ||
83 | void SetEtaRange(Float_t etaMin, Float_t etaMax) { fEtaMin = etaMin; fEtaMax = etaMax; } | |
84 | void SetPtRange(Float_t ptMin, Float_t ptMax) { fPtMin = ptMin; fPtMax = ptMax; } | |
2a910c25 | 85 | void SetCentralityRange(Float_t min, Float_t max) { fCentralityMin = min; fCentralityMax = max; } |
85bfac17 | 86 | void SetZVtxRange(Float_t min, Float_t max) { fZVtxMin = min; fZVtxMax = max; } |
a75aacd6 | 87 | |
144bd037 | 88 | void SetContaminationEnhancement(TH1F* hist) { fContaminationEnhancement = hist; } |
89 | ||
2a910c25 | 90 | void SetHistogramType(const char* histogramType) { fHistogramType = histogramType; } |
91 | ||
144bd037 | 92 | void CountEmptyBins(AliUEHist::CFStep step, Float_t ptLeadMin, Float_t ptLeadMax); |
93 | ||
e741fadd | 94 | void AdditionalDPhiCorrection(Int_t step); |
95 | ||
ada1a03f | 96 | void SetBinLimits(AliCFGridSparse* grid); |
97 | void ResetBinLimits(AliCFGridSparse* grid); | |
98 | ||
d1c75d06 | 99 | AliUEHist(const AliUEHist &c); |
a75aacd6 | 100 | AliUEHist& operator=(const AliUEHist& corr); |
101 | virtual void Copy(TObject& c) const; | |
102 | ||
103 | virtual Long64_t Merge(TCollection* list); | |
c7245604 | 104 | void Scale(Double_t factor); |
105 | void Reset(); | |
a75aacd6 | 106 | |
107 | protected: | |
108 | void SetStepNames(AliCFContainer* container); | |
109 | void WeightHistogram(TH3* hist1, TH1* hist2); | |
a75aacd6 | 110 | |
111 | AliCFContainer* fTrackHist[4]; // container for track level distributions in four regions (toward, away, min, max) and at four analysis steps | |
112 | AliCFContainer* fEventHist; // container for event level distribution at four analysis steps | |
b1831bcb | 113 | AliCFContainer* fTrackHistEfficiency; // container for tracking efficiency and contamination (all particles filled including leading one): axes: eta, pT, particle species |
a75aacd6 | 114 | |
115 | Float_t fEtaMin; // eta min for projections | |
116 | Float_t fEtaMax; // eta max for projections | |
117 | Float_t fPtMin; // pT min for projections (for track pT, not pT,lead) | |
118 | Float_t fPtMax; // pT max for projections (for track pT, not pT,lead) | |
2a910c25 | 119 | Float_t fCentralityMin; // centrality min for projections |
120 | Float_t fCentralityMax; // centrality max for projections | |
85bfac17 | 121 | Float_t fZVtxMin; // z vtx min for projections |
122 | Float_t fZVtxMax; // z vtx max for projections | |
a75aacd6 | 123 | |
144bd037 | 124 | TH1F* fContaminationEnhancement; // histogram that contains the underestimation of secondaries in the MC as function of pT |
125 | ||
a75aacd6 | 126 | Bool_t fCombineMinMax; // flag to combine min and max to a general towards region |
127 | ||
128 | AliCFContainer* fCache; //! cache variable for GetTrackEfficiency | |
129 | ||
c7245604 | 130 | TString fHistogramType; // what is stored in this histogram |
131 | ||
85bfac17 | 132 | ClassDef(AliUEHist, 8) // underlying event histogram container |
a75aacd6 | 133 | }; |
134 | ||
135 | #endif |