]>
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 { |
40 | kStepIdentified = 0, | |
e56f08ed | 41 | kStepIsPrimary = 1, |
42 | kStepSurvived = 2, | |
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); |
437dd627 | 115 | void SetCorrectionMapForFeedDown(const char* filename); |
116 | TH2D *GetCorrectionMapForFeedDownProtons() { | |
117 | return fHistYPtCorrectionForFeedDownProtons;} | |
118 | TH2D *GetCorrectionMapForFeedDownAntiProtons() { | |
119 | return fHistYPtCorrectionForFeedDownAntiProtons;} | |
120 | void SetCorrectionMapForCuts(const char* filename); | |
121 | TH2D *GetCorrectionMapForCutsProtons() { | |
122 | return fHistYPtCorrectionForCutsProtons;} | |
123 | TH2D *GetCorrectionMapForCutsAntiProtons() { | |
124 | return fHistYPtCorrectionForCutsAntiProtons;} | |
2c60f603 | 125 | void SetCorrectionMapForSecondaries(const char* filename); |
126 | TH2D *GetCorrectionMapForSecondaries() { | |
127 | return fHistYPtCorrectionForSecondaries;} | |
7deb716b | 128 | void SetCorrectionMapForCrossSection(const char* filename); |
129 | TH2D *GetProtonsCorrectionMapForCrossSection() { | |
130 | return fHistCorrectionForCrossSectionYPtProtons;} | |
131 | TH2D *GetAntiProtonsCorrectionMapForCrossSection() { | |
132 | return fHistCorrectionForCrossSectionYPtAntiProtons;} | |
133 | ||
24421eb6 | 134 | //iStep=0->MC - iStep=1->Acceptance - iStep=2->Reconstruction - iStep=3->PID |
135 | TH1D *GetUncorrectedProtonYHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(0, iStep);} | |
136 | TH1D *GetUncorrectedProtonPtHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(1, iStep);} | |
137 | TH1D *GetUncorrectedAntiProtonYHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(0, iStep);} | |
138 | TH1D *GetUncorrectedAntiProtonPtHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(1, iStep);} | |
39f2a708 | 139 | |
734d2c12 | 140 | private: |
8b8b0b7a | 141 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
142 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
734d2c12 | 143 | |
0ab648ea | 144 | AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object |
dd3fa486 | 145 | |
0ab648ea | 146 | Int_t fNBinsY; //number of bins in y or eta |
147 | Double_t fMinY, fMaxY; //min & max value of y or eta | |
734d2c12 | 148 | Int_t fNBinsPt; //number of bins in pT |
0ab648ea | 149 | Double_t fMinPt, fMaxPt; //min & max value of pT |
734d2c12 | 150 | |
251e4034 | 151 | //Analysis containers |
152 | AliCFContainer *fProtonContainer; //container for protons | |
153 | AliCFContainer *fAntiProtonContainer; //container for antiprotons | |
3f6d0c08 | 154 | TH1I *fHistEvents; //event counter |
251e4034 | 155 | TH2D *fHistYPtProtons; //Y-Pt of Protons |
156 | TH2D *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
71a67ee1 | 157 | TH2D *fHistYPtProtonsCorrected; //Y-Pt of Protons (corrected) |
158 | TH2D *fHistYPtAntiProtonsCorrected; // Y-Pt of Antiprotons (corrected) | |
52b04cf9 | 159 | TH1F *fHistEventStats;//Event statistics |
ce9d2201 | 160 | TList *fYRatioInPtBinsList;//TList of the eta dependent ratios for each pT bin |
39f2a708 | 161 | |
162 | //Corrections | |
251e4034 | 163 | TList *fEffGridListProtons; //list for the efficiency grid - protons |
cdb3530f | 164 | TList *fCorrectionListProtons2D; //list for the 2d corrections |
165 | TList *fEfficiencyListProtons1D; //list for the 1d efficiencies | |
166 | TList *fCorrectionListProtons1D; //list for the 1d corrections | |
251e4034 | 167 | TList *fEffGridListAntiProtons; //list for the efficiency grid - antiprotons |
cdb3530f | 168 | TList *fCorrectionListAntiProtons2D; //list for the 2d corrections |
169 | TList *fEfficiencyListAntiProtons1D; //list for the 1d efficiencies | |
170 | TList *fCorrectionListAntiProtons1D; //list for the 1d corrections | |
251e4034 | 171 | AliCFDataGrid *fCorrectProtons; //corrected data grid for protons |
172 | AliCFDataGrid *fCorrectAntiProtons; //corrected data grid for antiprotons | |
336ea0ff | 173 | TH2D *fHistEfficiencyYPtProtons;//efficiency 2D for the corrections - protons |
174 | TH2D *fHistEfficiencyYPtAntiProtons;//efficiency 2D for the corrections - antiprotons | |
7deb716b | 175 | TH2D *fHistCorrectionForCrossSectionYPtProtons;//correction for the proper cross-section - 2D protons |
176 | TH2D *fHistCorrectionForCrossSectionYPtAntiProtons;//correction for the proper cross-section - 2D antiprotons | |
177 | Bool_t fHistCorrectionForCrossSectionFlag;//correct for cross-section | |
437dd627 | 178 | TH2D *fHistYPtCorrectionForCutsProtons;//correction factors for the cut efficiency (protons) |
179 | TH2D *fHistYPtCorrectionForCutsAntiProtons;//correction factors for the cut efficiency (antiprotons) | |
180 | Bool_t fCorrectForCutsFlag;//correct for the cut efficiency | |
181 | TH2D *fHistYPtCorrectionForFeedDownProtons;//correction factors for the feed-down contamination (protons) | |
182 | TH2D *fHistYPtCorrectionForFeedDownAntiProtons;//correction factors for the feed-down contamination (antiprotons) | |
183 | Bool_t fCorrectForFeedDownFlag;//correct for cut efficiency | |
184 | TH2D *fHistYPtCorrectionForSecondaries;//correction factors for the background protons | |
2c60f603 | 185 | Bool_t fCorrectForSecondariesFlag;//correct for secondaries |
251e4034 | 186 | |
735cc63d | 187 | //QA lists |
188 | TList *fGlobalQAList; //global list | |
189 | TList *fQA2DList; //QA 2D list | |
190 | TList *fQAProtonsAcceptedList; //accepted protons | |
191 | TList *fQAProtonsRejectedList; //rejected protons | |
192 | TList *fQAAntiProtonsAcceptedList; //accepted antiprotons | |
193 | TList *fQAAntiProtonsRejectedList; //rejected antiprotons | |
194 | Bool_t fInitQAFlag;//Init flag | |
195 | ||
e7df5638 | 196 | ClassDef(AliProtonAnalysis,1); |
734d2c12 | 197 | }; |
198 | ||
199 | #endif |