]>
Commit | Line | Data |
---|---|---|
734d2c12 | 1 | #ifndef ALIPROTONANALYSIS_H |
2 | #define ALIPROTONANALYSIS_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | //------------------------------------------------------------------------- | |
10 | // Class AliProtonAnalysis | |
11 | // This is the class for the baryon (proton) analysis | |
12 | // | |
dd3fa486 | 13 | // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch |
734d2c12 | 14 | //------------------------------------------------------------------------- |
15 | ||
251e4034 | 16 | #include "TObject.h" |
3f6d0c08 | 17 | #include "TH1I.h" |
734d2c12 | 18 | |
aafecd8b | 19 | class TF1; |
251e4034 | 20 | class TH2D; |
21 | class TH1F; | |
9cd594db | 22 | class TList; |
3f6d0c08 | 23 | |
73aba974 | 24 | //#include "AliPID.h" |
25 | class AliPID; | |
24421eb6 | 26 | #include "AliCFContainer.h" |
251e4034 | 27 | class AliCFDataGrid; |
ee4ca40d | 28 | class AliAODEvent; |
29 | class AliAODtrack; | |
734d2c12 | 30 | class AliESDEvent; |
31 | class AliESDtrack; | |
2b748670 | 32 | class AliExternalTrackParam; |
e4358d7f | 33 | class AliStack; |
6667f3a7 | 34 | class AliESDVertex; |
0ab648ea | 35 | class AliProtonAnalysisBase; |
734d2c12 | 36 | |
37 | class AliProtonAnalysis : public TObject { | |
38 | public: | |
2f1c0f45 | 39 | enum { |
2f6dae44 | 40 | kStepSurvived = 0, |
e56f08ed | 41 | kStepIsPrimary = 1, |
2f6dae44 | 42 | kStepIdentified = 2, |
e56f08ed | 43 | kStepInPhaseSpace = 3, |
44 | kNSteps = 4 | |
2f1c0f45 | 45 | }; |
734d2c12 | 46 | AliProtonAnalysis(); |
47 | AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
48 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
4acc9d4d | 49 | AliProtonAnalysis(Int_t nbinsY, Double_t *gY, |
50 | Int_t nbinsPt, Double_t *gPt); | |
734d2c12 | 51 | virtual ~AliProtonAnalysis(); |
2b748670 | 52 | |
73aba974 | 53 | void SetBaseAnalysis(AliProtonAnalysisBase * const baseAnalysis) { |
0ab648ea | 54 | fProtonAnalysisBase = baseAnalysis;} |
73aba974 | 55 | AliProtonAnalysisBase *GetProtonAnalysisBaseObject() const { |
0ab648ea | 56 | return fProtonAnalysisBase;} |
dd3fa486 | 57 | |
ef1a8dbd | 58 | void InitAnalysisHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY, |
59 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
4acc9d4d | 60 | void InitAnalysisHistograms(Int_t nbinsY, Double_t *gY, |
61 | Int_t nbinsPt, Double_t *gPt); | |
2b748670 | 62 | Bool_t ReadFromFile(const char* filename); |
6667f3a7 | 63 | void Analyze(AliESDEvent *fESD, |
64 | const AliESDVertex *vertex); | |
ef1a8dbd | 65 | void Analyze(AliAODEvent *fAOD); |
3e23254a | 66 | void Analyze(AliStack *stack, Bool_t iInclusive); |
734d2c12 | 67 | |
735cc63d | 68 | //QA for real data |
69 | void InitQA(); | |
70 | void FillQA(AliESDEvent *esd, | |
71 | const AliESDVertex *vertex, | |
72 | AliESDtrack* track); | |
73 | TList *GetQAList() {return fGlobalQAList;} | |
74 | ||
9cd594db | 75 | AliCFContainer *GetProtonContainer() const {return fProtonContainer;} |
76 | AliCFContainer *GetAntiProtonContainer() const {return fAntiProtonContainer;} | |
251e4034 | 77 | |
71a67ee1 | 78 | TH2D *GetProtonYPtHistogram() const {return fHistYPtProtons;} |
79 | TH2D *GetAntiProtonYPtHistogram() const {return fHistYPtAntiProtons;} | |
80 | TH2D *GetProtonYPtCorrectedHistogram() const { | |
81 | return fHistYPtProtonsCorrected;} | |
82 | TH2D *GetAntiProtonCorrectedYPtHistogram() const { | |
83 | return fHistYPtAntiProtonsCorrected;} | |
734d2c12 | 84 | TH1D *GetProtonYHistogram(); |
85 | TH1D *GetAntiProtonYHistogram(); | |
86 | TH1D *GetProtonPtHistogram(); | |
87 | TH1D *GetAntiProtonPtHistogram(); | |
251e4034 | 88 | TH1D *GetProtonCorrectedYHistogram(); |
89 | TH1D *GetAntiProtonCorrectedYHistogram(); | |
90 | TH1D *GetProtonCorrectedPtHistogram(); | |
91 | TH1D *GetAntiProtonCorrectedPtHistogram(); | |
71a67ee1 | 92 | |
52b04cf9 | 93 | TH1F *GetEventStatistics() {return fHistEventStats;} |
94 | ||
ce9d2201 | 95 | TList *GetYRatioHistogramsInPtBins(); |
734d2c12 | 96 | TH1D *GetYRatioHistogram(); |
336ea0ff | 97 | TH1D *GetYRatioCorrectedHistogram(); |
734d2c12 | 98 | TH1D *GetPtRatioHistogram(); |
336ea0ff | 99 | TH1D *GetPtRatioCorrectedHistogram(); |
734d2c12 | 100 | TH1D *GetYAsymmetryHistogram(); |
101 | TH1D *GetPtAsymmetryHistogram(); | |
71a67ee1 | 102 | TH2D *GetProtonsAbsorptionMaps() {return fHistEfficiencyYPtProtons;} |
103 | TH2D *GetAntiProtonsAbsorptionMaps() {return fHistEfficiencyYPtAntiProtons;} | |
3f6d0c08 | 104 | |
9cd594db | 105 | TH1I *GetEventHistogram() const {return fHistEvents;} |
41beb956 | 106 | |
289b09aa | 107 | Int_t GetNumberOfAnalyzedEvents() {return (Int_t)fHistEventStats->GetBinContent(5);} |
3f6d0c08 | 108 | Bool_t PrintMean(TH1 *hist, Double_t edge); |
109 | Bool_t PrintYields(TH1 *hist, Double_t edge); | |
110 | ||
39f2a708 | 111 | //interface to the correction framework |
336ea0ff | 112 | void Correct(); |
251e4034 | 113 | void Correct(Int_t step); |
39f2a708 | 114 | Bool_t ReadCorrectionContainer(const char* filename); |
207a5280 | 115 | |
437dd627 | 116 | void SetCorrectionMapForFeedDown(const char* filename); |
117 | TH2D *GetCorrectionMapForFeedDownProtons() { | |
118 | return fHistYPtCorrectionForFeedDownProtons;} | |
119 | TH2D *GetCorrectionMapForFeedDownAntiProtons() { | |
120 | return fHistYPtCorrectionForFeedDownAntiProtons;} | |
207a5280 | 121 | |
437dd627 | 122 | void SetCorrectionMapForCuts(const char* filename); |
123 | TH2D *GetCorrectionMapForCutsProtons() { | |
124 | return fHistYPtCorrectionForCutsProtons;} | |
125 | TH2D *GetCorrectionMapForCutsAntiProtons() { | |
126 | return fHistYPtCorrectionForCutsAntiProtons;} | |
207a5280 | 127 | |
128 | void SetCorrectionMapForTracking(const char* filename); | |
129 | TH2D *GetCorrectionMapForTrackingProtons() { | |
130 | return fHistYPtCorrectionForTrackingProtons;} | |
131 | TH2D *GetCorrectionMapForTrackingAntiProtons() { | |
132 | return fHistYPtCorrectionForTrackingAntiProtons;} | |
133 | ||
134 | ||
2c60f603 | 135 | void SetCorrectionMapForSecondaries(const char* filename); |
136 | TH2D *GetCorrectionMapForSecondaries() { | |
137 | return fHistYPtCorrectionForSecondaries;} | |
207a5280 | 138 | |
7deb716b | 139 | void SetCorrectionMapForCrossSection(const char* filename); |
140 | TH2D *GetProtonsCorrectionMapForCrossSection() { | |
141 | return fHistCorrectionForCrossSectionYPtProtons;} | |
142 | TH2D *GetAntiProtonsCorrectionMapForCrossSection() { | |
143 | return fHistCorrectionForCrossSectionYPtAntiProtons;} | |
144 | ||
24421eb6 | 145 | //iStep=0->MC - iStep=1->Acceptance - iStep=2->Reconstruction - iStep=3->PID |
146 | TH1D *GetUncorrectedProtonYHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(0, iStep);} | |
147 | TH1D *GetUncorrectedProtonPtHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(1, iStep);} | |
148 | TH1D *GetUncorrectedAntiProtonYHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(0, iStep);} | |
149 | TH1D *GetUncorrectedAntiProtonPtHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(1, iStep);} | |
39f2a708 | 150 | |
734d2c12 | 151 | private: |
8b8b0b7a | 152 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
153 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
734d2c12 | 154 | |
0ab648ea | 155 | AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object |
dd3fa486 | 156 | |
0ab648ea | 157 | Int_t fNBinsY; //number of bins in y or eta |
158 | Double_t fMinY, fMaxY; //min & max value of y or eta | |
734d2c12 | 159 | Int_t fNBinsPt; //number of bins in pT |
0ab648ea | 160 | Double_t fMinPt, fMaxPt; //min & max value of pT |
734d2c12 | 161 | |
251e4034 | 162 | //Analysis containers |
163 | AliCFContainer *fProtonContainer; //container for protons | |
164 | AliCFContainer *fAntiProtonContainer; //container for antiprotons | |
3f6d0c08 | 165 | TH1I *fHistEvents; //event counter |
251e4034 | 166 | TH2D *fHistYPtProtons; //Y-Pt of Protons |
167 | TH2D *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
71a67ee1 | 168 | TH2D *fHistYPtProtonsCorrected; //Y-Pt of Protons (corrected) |
169 | TH2D *fHistYPtAntiProtonsCorrected; // Y-Pt of Antiprotons (corrected) | |
52b04cf9 | 170 | TH1F *fHistEventStats;//Event statistics |
ce9d2201 | 171 | TList *fYRatioInPtBinsList;//TList of the eta dependent ratios for each pT bin |
39f2a708 | 172 | |
173 | //Corrections | |
251e4034 | 174 | TList *fEffGridListProtons; //list for the efficiency grid - protons |
cdb3530f | 175 | TList *fCorrectionListProtons2D; //list for the 2d corrections |
176 | TList *fEfficiencyListProtons1D; //list for the 1d efficiencies | |
177 | TList *fCorrectionListProtons1D; //list for the 1d corrections | |
251e4034 | 178 | TList *fEffGridListAntiProtons; //list for the efficiency grid - antiprotons |
cdb3530f | 179 | TList *fCorrectionListAntiProtons2D; //list for the 2d corrections |
180 | TList *fEfficiencyListAntiProtons1D; //list for the 1d efficiencies | |
181 | TList *fCorrectionListAntiProtons1D; //list for the 1d corrections | |
251e4034 | 182 | AliCFDataGrid *fCorrectProtons; //corrected data grid for protons |
183 | AliCFDataGrid *fCorrectAntiProtons; //corrected data grid for antiprotons | |
336ea0ff | 184 | TH2D *fHistEfficiencyYPtProtons;//efficiency 2D for the corrections - protons |
185 | TH2D *fHistEfficiencyYPtAntiProtons;//efficiency 2D for the corrections - antiprotons | |
7deb716b | 186 | TH2D *fHistCorrectionForCrossSectionYPtProtons;//correction for the proper cross-section - 2D protons |
187 | TH2D *fHistCorrectionForCrossSectionYPtAntiProtons;//correction for the proper cross-section - 2D antiprotons | |
188 | Bool_t fHistCorrectionForCrossSectionFlag;//correct for cross-section | |
437dd627 | 189 | TH2D *fHistYPtCorrectionForCutsProtons;//correction factors for the cut efficiency (protons) |
190 | TH2D *fHistYPtCorrectionForCutsAntiProtons;//correction factors for the cut efficiency (antiprotons) | |
191 | Bool_t fCorrectForCutsFlag;//correct for the cut efficiency | |
207a5280 | 192 | TH2D *fHistYPtCorrectionForTrackingProtons;//correction factors for the tracking efficiency (protons) |
193 | TH2D *fHistYPtCorrectionForTrackingAntiProtons;//correction factors for the tracking efficiency (antiprotons) | |
194 | Bool_t fCorrectForTrackingFlag;//correct for the tracking efficiency | |
437dd627 | 195 | TH2D *fHistYPtCorrectionForFeedDownProtons;//correction factors for the feed-down contamination (protons) |
196 | TH2D *fHistYPtCorrectionForFeedDownAntiProtons;//correction factors for the feed-down contamination (antiprotons) | |
197 | Bool_t fCorrectForFeedDownFlag;//correct for cut efficiency | |
198 | TH2D *fHistYPtCorrectionForSecondaries;//correction factors for the background protons | |
2c60f603 | 199 | Bool_t fCorrectForSecondariesFlag;//correct for secondaries |
251e4034 | 200 | |
735cc63d | 201 | //QA lists |
202 | TList *fGlobalQAList; //global list | |
203 | TList *fQA2DList; //QA 2D list | |
204 | TList *fQAProtonsAcceptedList; //accepted protons | |
205 | TList *fQAProtonsRejectedList; //rejected protons | |
206 | TList *fQAAntiProtonsAcceptedList; //accepted antiprotons | |
207 | TList *fQAAntiProtonsRejectedList; //rejected antiprotons | |
735cc63d | 208 | |
e7df5638 | 209 | ClassDef(AliProtonAnalysis,1); |
734d2c12 | 210 | }; |
211 | ||
212 | #endif |