]>
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 | // | |
13 | // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch | |
14 | //------------------------------------------------------------------------- | |
15 | ||
251e4034 | 16 | #include "TObject.h" |
3f6d0c08 | 17 | #include "TH1I.h" |
ef1a8dbd | 18 | #include "TList.h" |
3f6d0c08 | 19 | |
ee4ca40d | 20 | #include "AliPID.h" |
734d2c12 | 21 | |
aafecd8b | 22 | class TF1; |
251e4034 | 23 | class TH2D; |
24 | class TH1F; | |
3f6d0c08 | 25 | |
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; |
734d2c12 | 34 | |
35 | class AliProtonAnalysis : public TObject { | |
36 | public: | |
37 | AliProtonAnalysis(); | |
38 | AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
39 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
40 | virtual ~AliProtonAnalysis(); | |
2b748670 | 41 | |
42 | void UseTPCOnly() {fUseTPCOnly = kTRUE;} | |
da169921 | 43 | void UseHybridTPC() {fUseHybridTPC = kTRUE;} |
734d2c12 | 44 | |
ef1a8dbd | 45 | void InitAnalysisHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY, |
46 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
2b748670 | 47 | Bool_t ReadFromFile(const char* filename); |
ef1a8dbd | 48 | void Analyze(AliESDEvent *fESD); |
49 | void Analyze(AliAODEvent *fAOD); | |
50 | void Analyze(AliStack *stack); | |
734d2c12 | 51 | |
251e4034 | 52 | AliCFContainer *GetProtonContainer() {return fProtonContainer;} |
53 | AliCFContainer *GetAntiProtonContainer() {return fAntiProtonContainer;} | |
54 | ||
55 | TH2D *GetProtonYPtHistogram() {return fHistYPtProtons;} | |
56 | TH2D *GetAntiProtonYPtHistogram() {return fHistYPtAntiProtons;} | |
734d2c12 | 57 | TH1D *GetProtonYHistogram(); |
58 | TH1D *GetAntiProtonYHistogram(); | |
59 | TH1D *GetProtonPtHistogram(); | |
60 | TH1D *GetAntiProtonPtHistogram(); | |
251e4034 | 61 | TH1D *GetProtonCorrectedYHistogram(); |
62 | TH1D *GetAntiProtonCorrectedYHistogram(); | |
63 | TH1D *GetProtonCorrectedPtHistogram(); | |
64 | TH1D *GetAntiProtonCorrectedPtHistogram(); | |
24421eb6 | 65 | |
734d2c12 | 66 | TH1D *GetYRatioHistogram(); |
67 | TH1D *GetPtRatioHistogram(); | |
68 | TH1D *GetYAsymmetryHistogram(); | |
69 | TH1D *GetPtAsymmetryHistogram(); | |
3f6d0c08 | 70 | |
251e4034 | 71 | TH1I *GetEventHistogram() {return fHistEvents;} |
41beb956 | 72 | |
3f6d0c08 | 73 | Int_t GetNumberOfAnalyzedEvents() {return (Int_t)fHistEvents->GetEntries();} |
74 | Bool_t PrintMean(TH1 *hist, Double_t edge); | |
75 | Bool_t PrintYields(TH1 *hist, Double_t edge); | |
76 | ||
734d2c12 | 77 | //Cut functions |
0008a5a6 | 78 | void SetPointOnITSLayer1() {fPointOnITSLayer1Flag = kTRUE;} |
79 | void SetPointOnITSLayer2() {fPointOnITSLayer2Flag = kTRUE;} | |
80 | void SetPointOnITSLayer3() {fPointOnITSLayer3Flag = kTRUE;} | |
81 | void SetPointOnITSLayer4() {fPointOnITSLayer4Flag = kTRUE;} | |
82 | void SetPointOnITSLayer5() {fPointOnITSLayer5Flag = kTRUE;} | |
83 | void SetPointOnITSLayer6() {fPointOnITSLayer6Flag = kTRUE;} | |
734d2c12 | 84 | void SetMinITSClusters(Int_t minITSClusters) { |
85 | fMinITSClusters = minITSClusters; | |
86 | fMinITSClustersFlag = kTRUE; | |
87 | } | |
734d2c12 | 88 | void SetMaxChi2PerITSCluster(Double_t maxChi2PerITSCluster) { |
89 | fMaxChi2PerITSCluster = maxChi2PerITSCluster; | |
90 | fMaxChi2PerITSClusterFlag = kTRUE; | |
91 | } | |
f24a70b0 | 92 | void SetMinTPCClusters(Int_t minTPCClusters) { |
93 | fMinTPCClusters = minTPCClusters; | |
94 | fMinTPCClustersFlag = kTRUE; | |
95 | } | |
96 | void SetMaxChi2PerTPCCluster(Double_t maxChi2PerTPCCluster) { | |
97 | fMaxChi2PerTPCCluster = maxChi2PerTPCCluster; | |
98 | fMaxChi2PerTPCClusterFlag = kTRUE; | |
99 | } | |
251e4034 | 100 | void SetMaxCov11(Double_t maxCov11) { |
101 | fMaxCov11 = maxCov11; fMaxCov11Flag = kTRUE;} | |
102 | void SetMaxCov22(Double_t maxCov22) { | |
103 | fMaxCov22 = maxCov22; fMaxCov22Flag = kTRUE;} | |
104 | void SetMaxCov33(Double_t maxCov33) { | |
105 | fMaxCov33 = maxCov33; fMaxCov33Flag = kTRUE;} | |
106 | void SetMaxCov44(Double_t maxCov44) { | |
107 | fMaxCov44 = maxCov44; fMaxCov44Flag = kTRUE;} | |
108 | void SetMaxCov55(Double_t maxCov55) { | |
109 | fMaxCov55 = maxCov55; fMaxCov55Flag = kTRUE;} | |
734d2c12 | 110 | void SetMaxSigmaToVertex(Double_t maxSigmaToVertex) { |
111 | fMaxSigmaToVertex = maxSigmaToVertex; | |
112 | fMaxSigmaToVertexFlag = kTRUE; | |
113 | } | |
f24a70b0 | 114 | void SetMaxSigmaToVertexTPC(Double_t maxSigmaToVertex) { |
115 | fMaxSigmaToVertexTPC = maxSigmaToVertex; | |
116 | fMaxSigmaToVertexTPCFlag = kTRUE; | |
117 | } | |
96f84c25 | 118 | void SetMaxDCAXY(Double_t maxDCAXY) { |
119 | fMaxDCAXY = maxDCAXY; | |
120 | fMaxDCAXYFlag = kTRUE; | |
121 | } | |
122 | void SetMaxDCAXYTPC(Double_t maxDCAXY) { | |
123 | fMaxDCAXYTPC = maxDCAXY; | |
124 | fMaxDCAXYTPCFlag = kTRUE; | |
125 | } | |
126 | void SetMaxDCAZ(Double_t maxDCAZ) { | |
127 | fMaxDCAZ = maxDCAZ; | |
128 | fMaxDCAZFlag = kTRUE; | |
129 | } | |
130 | void SetMaxDCAZTPC(Double_t maxDCAZ) { | |
131 | fMaxDCAZTPC = maxDCAZ; | |
132 | fMaxDCAZTPCFlag = kTRUE; | |
133 | } | |
134 | void SetMaxConstrainChi2(Double_t maxConstrainChi2) { | |
135 | fMaxConstrainChi2 = maxConstrainChi2; | |
136 | fMaxConstrainChi2Flag = kTRUE; | |
137 | } | |
734d2c12 | 138 | void SetITSRefit() {fITSRefitFlag = kTRUE;} |
139 | void SetTPCRefit() {fTPCRefitFlag = kTRUE;} | |
f24a70b0 | 140 | void SetESDpid() {fESDpidFlag = kTRUE;} |
141 | void SetTPCpid() {fTPCpidFlag = kTRUE;} | |
ef1a8dbd | 142 | |
734d2c12 | 143 | //Prior probabilities |
251e4034 | 144 | void SetPriorProbabilities(Double_t *partFrac) { |
145 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) fPartFrac[i] = partFrac[i];} | |
f24a70b0 | 146 | void SetPriorProbabilityFunctions(TF1 *felectron, TF1 *fmuon, TF1 *fpion, TF1 *fkaon, TF1 *fproton) { |
aafecd8b | 147 | fFunctionProbabilityFlag = kTRUE; |
148 | fElectronFunction = felectron; | |
149 | fMuonFunction = fmuon; | |
150 | fPionFunction = fpion; | |
151 | fKaonFunction = fkaon; | |
152 | fProtonFunction = fproton; | |
153 | } | |
154 | Double_t GetParticleFraction(Int_t i, Double_t p); | |
155 | ||
39f2a708 | 156 | //interface to the correction framework |
251e4034 | 157 | void Correct(Int_t step); |
39f2a708 | 158 | Bool_t ReadCorrectionContainer(const char* filename); |
cdb3530f | 159 | TList *GetCorrectionListProtons2D() {return fCorrectionListProtons2D;} |
160 | TList *GetEfficiencyListProtons1D() {return fEfficiencyListProtons1D;} | |
161 | TList *GetCorrectionListProtons1D() {return fCorrectionListProtons1D;} | |
162 | TList *GetCorrectionListAntiProtons2D() {return fCorrectionListAntiProtons2D;} | |
163 | TList *GetEfficiencyListAntiProtons1D() {return fEfficiencyListAntiProtons1D;} | |
164 | TList *GetCorrectionListAntiProtons1D() {return fCorrectionListAntiProtons1D;} | |
24421eb6 | 165 | |
166 | //iStep=0->MC - iStep=1->Acceptance - iStep=2->Reconstruction - iStep=3->PID | |
167 | TH1D *GetUncorrectedProtonYHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(0, iStep);} | |
168 | TH1D *GetUncorrectedProtonPtHistogram(Int_t iStep) {return fProtonContainer->ShowProjection(1, iStep);} | |
169 | TH1D *GetUncorrectedAntiProtonYHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(0, iStep);} | |
170 | TH1D *GetUncorrectedAntiProtonPtHistogram(Int_t iStep) {return fAntiProtonContainer->ShowProjection(1, iStep);} | |
39f2a708 | 171 | |
734d2c12 | 172 | private: |
8b8b0b7a | 173 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
174 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
175 | ||
88c900f2 | 176 | Bool_t IsAccepted(AliESDtrack *track); |
88c900f2 | 177 | Float_t GetSigmaToVertex(AliESDtrack* esdTrack); |
2b748670 | 178 | Double_t Rapidity(Double_t Px, Double_t Py, Double_t Pz); |
734d2c12 | 179 | |
180 | Int_t fNBinsY; //number of bins in y | |
181 | Float_t fMinY, fMaxY; //min & max value of y | |
182 | Int_t fNBinsPt; //number of bins in pT | |
183 | Float_t fMinPt, fMaxPt; //min & max value of pT | |
184 | ||
185 | //cuts | |
186 | Int_t fMinTPCClusters, fMinITSClusters; //min TPC & ITS clusters | |
187 | Double_t fMaxChi2PerTPCCluster, fMaxChi2PerITSCluster; //max chi2 per TPC & ITS cluster | |
188 | Double_t fMaxCov11, fMaxCov22, fMaxCov33, fMaxCov44, fMaxCov55; //max values of cov. matrix | |
189 | Double_t fMaxSigmaToVertex; //max sigma to vertex cut | |
f24a70b0 | 190 | Double_t fMaxSigmaToVertexTPC; //max sigma to vertex cut |
96f84c25 | 191 | Double_t fMaxDCAXY, fMaxDCAXYTPC; //max DCA xy |
192 | Double_t fMaxDCAZ, fMaxDCAZTPC; //max DCA z | |
193 | Double_t fMaxConstrainChi2; //max constrain chi2 - vertex | |
734d2c12 | 194 | Bool_t fMinTPCClustersFlag, fMinITSClustersFlag; //shows if this cut is used or not |
195 | Bool_t fMaxChi2PerTPCClusterFlag, fMaxChi2PerITSClusterFlag; //shows if this cut is used or not | |
196 | Bool_t fMaxCov11Flag, fMaxCov22Flag, fMaxCov33Flag, fMaxCov44Flag, fMaxCov55Flag; //shows if this cut is used or not | |
197 | Bool_t fMaxSigmaToVertexFlag; //shows if this cut is used or not | |
f24a70b0 | 198 | Bool_t fMaxSigmaToVertexTPCFlag; //shows if this cut is used or not |
96f84c25 | 199 | Bool_t fMaxDCAXYFlag, fMaxDCAXYTPCFlag; //shows if this cut is used or not |
200 | Bool_t fMaxDCAZFlag, fMaxDCAZTPCFlag; //shows if this cut is used or not | |
201 | Bool_t fMaxConstrainChi2Flag; //shows if this cut is used or not | |
734d2c12 | 202 | Bool_t fITSRefitFlag, fTPCRefitFlag; //shows if this cut is used or not |
f24a70b0 | 203 | Bool_t fESDpidFlag, fTPCpidFlag; //shows if this cut is used or not |
0008a5a6 | 204 | Bool_t fPointOnITSLayer1Flag, fPointOnITSLayer2Flag; //shows if this cut is used or not |
205 | Bool_t fPointOnITSLayer3Flag, fPointOnITSLayer4Flag; //shows if this cut is used or not | |
206 | Bool_t fPointOnITSLayer5Flag, fPointOnITSLayer6Flag; //shows if this cut is used or not | |
734d2c12 | 207 | |
208 | //pid | |
aafecd8b | 209 | Bool_t fFunctionProbabilityFlag; //flag: kTRUE if functions used |
ee4ca40d | 210 | Double_t fPartFrac[10]; //prior probabilities |
aafecd8b | 211 | TF1 *fElectronFunction; //momentum dependence of the prior probs |
212 | TF1 *fMuonFunction; //momentum dependence of the prior probs | |
213 | TF1 *fPionFunction; //momentum dependence of the prior probs | |
214 | TF1 *fKaonFunction; //momentum dependence of the prior probs | |
215 | TF1 *fProtonFunction; //momentum dependence of the prior probs | |
216 | ||
2b748670 | 217 | //Detectors |
218 | Bool_t fUseTPCOnly; //kTRUE if TPC only information is used | |
da169921 | 219 | Bool_t fUseHybridTPC; //kTRUE if TPC info is used for momentum - PID and ITS for vertex & points |
2b748670 | 220 | |
251e4034 | 221 | //Analysis containers |
222 | AliCFContainer *fProtonContainer; //container for protons | |
223 | AliCFContainer *fAntiProtonContainer; //container for antiprotons | |
3f6d0c08 | 224 | TH1I *fHistEvents; //event counter |
251e4034 | 225 | TH2D *fHistYPtProtons; //Y-Pt of Protons |
226 | TH2D *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
39f2a708 | 227 | |
228 | //Corrections | |
251e4034 | 229 | TList *fEffGridListProtons; //list for the efficiency grid - protons |
cdb3530f | 230 | TList *fCorrectionListProtons2D; //list for the 2d corrections |
231 | TList *fEfficiencyListProtons1D; //list for the 1d efficiencies | |
232 | TList *fCorrectionListProtons1D; //list for the 1d corrections | |
251e4034 | 233 | TList *fEffGridListAntiProtons; //list for the efficiency grid - antiprotons |
cdb3530f | 234 | TList *fCorrectionListAntiProtons2D; //list for the 2d corrections |
235 | TList *fEfficiencyListAntiProtons1D; //list for the 1d efficiencies | |
236 | TList *fCorrectionListAntiProtons1D; //list for the 1d corrections | |
251e4034 | 237 | AliCFDataGrid *fCorrectProtons; //corrected data grid for protons |
238 | AliCFDataGrid *fCorrectAntiProtons; //corrected data grid for antiprotons | |
239 | ||
734d2c12 | 240 | ClassDef(AliProtonAnalysis,0); |
241 | }; | |
242 | ||
243 | #endif |