]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/AliProtonAnalysis.h
- Protection against too small rk
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliProtonAnalysis.h
CommitLineData
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 19class TF1;
251e4034 20class TH2D;
21class TH1F;
9cd594db 22class TList;
3f6d0c08 23
73aba974 24//#include "AliPID.h"
25class AliPID;
24421eb6 26#include "AliCFContainer.h"
251e4034 27class AliCFDataGrid;
ee4ca40d 28class AliAODEvent;
29class AliAODtrack;
734d2c12 30class AliESDEvent;
31class AliESDtrack;
2b748670 32class AliExternalTrackParam;
e4358d7f 33class AliStack;
6667f3a7 34class AliESDVertex;
0ab648ea 35class AliProtonAnalysisBase;
734d2c12 36
37class AliProtonAnalysis : public TObject {
38 public:
2f1c0f45 39 enum {
40 kStepIdentified = 0,
41 kStepSurvived = 1,
42 kStepInPhaseSpace = 2,
43 kNSteps = 3
44 };
734d2c12 45 AliProtonAnalysis();
46 AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY,
47 Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt);
4acc9d4d 48 AliProtonAnalysis(Int_t nbinsY, Double_t *gY,
49 Int_t nbinsPt, Double_t *gPt);
734d2c12 50 virtual ~AliProtonAnalysis();
2b748670 51
73aba974 52 void SetBaseAnalysis(AliProtonAnalysisBase * const baseAnalysis) {
0ab648ea 53 fProtonAnalysisBase = baseAnalysis;}
73aba974 54 AliProtonAnalysisBase *GetProtonAnalysisBaseObject() const {
0ab648ea 55 return fProtonAnalysisBase;}
dd3fa486 56
ef1a8dbd 57 void InitAnalysisHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY,
58 Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt);
4acc9d4d 59 void InitAnalysisHistograms(Int_t nbinsY, Double_t *gY,
60 Int_t nbinsPt, Double_t *gPt);
2b748670 61 Bool_t ReadFromFile(const char* filename);
6667f3a7 62 void Analyze(AliESDEvent *fESD,
63 const AliESDVertex *vertex);
ef1a8dbd 64 void Analyze(AliAODEvent *fAOD);
3e23254a 65 void Analyze(AliStack *stack, Bool_t iInclusive);
734d2c12 66
735cc63d 67 //QA for real data
68 void InitQA();
69 void FillQA(AliESDEvent *esd,
70 const AliESDVertex *vertex,
71 AliESDtrack* track);
72 TList *GetQAList() {return fGlobalQAList;}
73
9cd594db 74 AliCFContainer *GetProtonContainer() const {return fProtonContainer;}
75 AliCFContainer *GetAntiProtonContainer() const {return fAntiProtonContainer;}
251e4034 76
9cd594db 77 TH2D *GetProtonYPtHistogram() const {return fHistYPtProtons;}
78 TH2D *GetAntiProtonYPtHistogram() const {return fHistYPtAntiProtons;}
734d2c12 79 TH1D *GetProtonYHistogram();
80 TH1D *GetAntiProtonYHistogram();
81 TH1D *GetProtonPtHistogram();
82 TH1D *GetAntiProtonPtHistogram();
251e4034 83 TH1D *GetProtonCorrectedYHistogram();
84 TH1D *GetAntiProtonCorrectedYHistogram();
85 TH1D *GetProtonCorrectedPtHistogram();
86 TH1D *GetAntiProtonCorrectedPtHistogram();
24421eb6 87
52b04cf9 88 TH1F *GetEventStatistics() {return fHistEventStats;}
89
734d2c12 90 TH1D *GetYRatioHistogram();
3e23254a 91 TH1D *GetYRatioCorrectedHistogram(TH2D *gCorrectionMapProtons,
92 TH2D *gCorrectionMapAntiProtons);
734d2c12 93 TH1D *GetPtRatioHistogram();
3e23254a 94 TH1D *GetPtRatioCorrectedHistogram(TH2D *gCorrectionMapProtons,
95 TH2D *gCorrectionMapAntiProtons);
734d2c12 96 TH1D *GetYAsymmetryHistogram();
97 TH1D *GetPtAsymmetryHistogram();
3f6d0c08 98
9cd594db 99 TH1I *GetEventHistogram() const {return fHistEvents;}
41beb956 100
3f6d0c08 101 Int_t GetNumberOfAnalyzedEvents() {return (Int_t)fHistEvents->GetEntries();}
102 Bool_t PrintMean(TH1 *hist, Double_t edge);
103 Bool_t PrintYields(TH1 *hist, Double_t edge);
104
39f2a708 105 //interface to the correction framework
251e4034 106 void Correct(Int_t step);
39f2a708 107 Bool_t ReadCorrectionContainer(const char* filename);
9cd594db 108 TList *GetCorrectionListProtons2D() const {return fCorrectionListProtons2D;}
109 TList *GetEfficiencyListProtons1D() const {return fEfficiencyListProtons1D;}
110 TList *GetCorrectionListProtons1D() const {return fCorrectionListProtons1D;}
111 TList *GetCorrectionListAntiProtons2D() const {return fCorrectionListAntiProtons2D;}
112 TList *GetEfficiencyListAntiProtons1D() const {return fEfficiencyListAntiProtons1D;}
113 TList *GetCorrectionListAntiProtons1D() const {return fCorrectionListAntiProtons1D;}
24421eb6 114
115 //iStep=0->MC - iStep=1->Acceptance - iStep=2->Reconstruction - iStep=3->PID
116 TH1D *GetUncorrectedProtonYHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(0, iStep);}
117 TH1D *GetUncorrectedProtonPtHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(1, iStep);}
118 TH1D *GetUncorrectedAntiProtonYHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(0, iStep);}
119 TH1D *GetUncorrectedAntiProtonPtHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(1, iStep);}
39f2a708 120
734d2c12 121 private:
8b8b0b7a 122 AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented
123 AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented
734d2c12 124
0ab648ea 125 AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object
dd3fa486 126
0ab648ea 127 Int_t fNBinsY; //number of bins in y or eta
128 Double_t fMinY, fMaxY; //min & max value of y or eta
734d2c12 129 Int_t fNBinsPt; //number of bins in pT
0ab648ea 130 Double_t fMinPt, fMaxPt; //min & max value of pT
734d2c12 131
251e4034 132 //Analysis containers
133 AliCFContainer *fProtonContainer; //container for protons
134 AliCFContainer *fAntiProtonContainer; //container for antiprotons
3f6d0c08 135 TH1I *fHistEvents; //event counter
251e4034 136 TH2D *fHistYPtProtons; //Y-Pt of Protons
137 TH2D *fHistYPtAntiProtons; // Y-Pt of Antiprotons
52b04cf9 138 TH1F *fHistEventStats;//Event statistics
39f2a708 139
140 //Corrections
251e4034 141 TList *fEffGridListProtons; //list for the efficiency grid - protons
cdb3530f 142 TList *fCorrectionListProtons2D; //list for the 2d corrections
143 TList *fEfficiencyListProtons1D; //list for the 1d efficiencies
144 TList *fCorrectionListProtons1D; //list for the 1d corrections
251e4034 145 TList *fEffGridListAntiProtons; //list for the efficiency grid - antiprotons
cdb3530f 146 TList *fCorrectionListAntiProtons2D; //list for the 2d corrections
147 TList *fEfficiencyListAntiProtons1D; //list for the 1d efficiencies
148 TList *fCorrectionListAntiProtons1D; //list for the 1d corrections
251e4034 149 AliCFDataGrid *fCorrectProtons; //corrected data grid for protons
150 AliCFDataGrid *fCorrectAntiProtons; //corrected data grid for antiprotons
151
735cc63d 152 //QA lists
153 TList *fGlobalQAList; //global list
154 TList *fQA2DList; //QA 2D list
155 TList *fQAProtonsAcceptedList; //accepted protons
156 TList *fQAProtonsRejectedList; //rejected protons
157 TList *fQAAntiProtonsAcceptedList; //accepted antiprotons
158 TList *fQAAntiProtonsRejectedList; //rejected antiprotons
159 Bool_t fInitQAFlag;//Init flag
160
e7df5638 161 ClassDef(AliProtonAnalysis,1);
734d2c12 162};
163
164#endif