]>
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 | |
3f6d0c08 | 107 | Int_t GetNumberOfAnalyzedEvents() {return (Int_t)fHistEvents->GetEntries();} |
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); |
2c60f603 | 115 | void SetCorrectionMapForSecondaries(const char* filename); |
116 | TH2D *GetCorrectionMapForSecondaries() { | |
117 | return fHistYPtCorrectionForSecondaries;} | |
24421eb6 | 118 | |
119 | //iStep=0->MC - iStep=1->Acceptance - iStep=2->Reconstruction - iStep=3->PID | |
120 | TH1D *GetUncorrectedProtonYHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(0, iStep);} | |
121 | TH1D *GetUncorrectedProtonPtHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(1, iStep);} | |
122 | TH1D *GetUncorrectedAntiProtonYHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(0, iStep);} | |
123 | TH1D *GetUncorrectedAntiProtonPtHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(1, iStep);} | |
39f2a708 | 124 | |
734d2c12 | 125 | private: |
8b8b0b7a | 126 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
127 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
734d2c12 | 128 | |
0ab648ea | 129 | AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object |
dd3fa486 | 130 | |
0ab648ea | 131 | Int_t fNBinsY; //number of bins in y or eta |
132 | Double_t fMinY, fMaxY; //min & max value of y or eta | |
734d2c12 | 133 | Int_t fNBinsPt; //number of bins in pT |
0ab648ea | 134 | Double_t fMinPt, fMaxPt; //min & max value of pT |
734d2c12 | 135 | |
251e4034 | 136 | //Analysis containers |
137 | AliCFContainer *fProtonContainer; //container for protons | |
138 | AliCFContainer *fAntiProtonContainer; //container for antiprotons | |
3f6d0c08 | 139 | TH1I *fHistEvents; //event counter |
251e4034 | 140 | TH2D *fHistYPtProtons; //Y-Pt of Protons |
141 | TH2D *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
71a67ee1 | 142 | TH2D *fHistYPtProtonsCorrected; //Y-Pt of Protons (corrected) |
143 | TH2D *fHistYPtAntiProtonsCorrected; // Y-Pt of Antiprotons (corrected) | |
52b04cf9 | 144 | TH1F *fHistEventStats;//Event statistics |
ce9d2201 | 145 | TList *fYRatioInPtBinsList;//TList of the eta dependent ratios for each pT bin |
39f2a708 | 146 | |
147 | //Corrections | |
251e4034 | 148 | TList *fEffGridListProtons; //list for the efficiency grid - protons |
cdb3530f | 149 | TList *fCorrectionListProtons2D; //list for the 2d corrections |
150 | TList *fEfficiencyListProtons1D; //list for the 1d efficiencies | |
151 | TList *fCorrectionListProtons1D; //list for the 1d corrections | |
251e4034 | 152 | TList *fEffGridListAntiProtons; //list for the efficiency grid - antiprotons |
cdb3530f | 153 | TList *fCorrectionListAntiProtons2D; //list for the 2d corrections |
154 | TList *fEfficiencyListAntiProtons1D; //list for the 1d efficiencies | |
155 | TList *fCorrectionListAntiProtons1D; //list for the 1d corrections | |
251e4034 | 156 | AliCFDataGrid *fCorrectProtons; //corrected data grid for protons |
157 | AliCFDataGrid *fCorrectAntiProtons; //corrected data grid for antiprotons | |
336ea0ff | 158 | TH2D *fHistEfficiencyYPtProtons;//efficiency 2D for the corrections - protons |
159 | TH2D *fHistEfficiencyYPtAntiProtons;//efficiency 2D for the corrections - antiprotons | |
2c60f603 | 160 | TH2D *fHistYPtCorrectionForSecondaries;//correction factors for the corrections (secondary protons) |
161 | Bool_t fCorrectForSecondariesFlag;//correct for secondaries | |
251e4034 | 162 | |
735cc63d | 163 | //QA lists |
164 | TList *fGlobalQAList; //global list | |
165 | TList *fQA2DList; //QA 2D list | |
166 | TList *fQAProtonsAcceptedList; //accepted protons | |
167 | TList *fQAProtonsRejectedList; //rejected protons | |
168 | TList *fQAAntiProtonsAcceptedList; //accepted antiprotons | |
169 | TList *fQAAntiProtonsRejectedList; //rejected antiprotons | |
170 | Bool_t fInitQAFlag;//Init flag | |
171 | ||
e7df5638 | 172 | ClassDef(AliProtonAnalysis,1); |
734d2c12 | 173 | }; |
174 | ||
175 | #endif |