]>
Commit | Line | Data |
---|---|---|
734d2c12 | 1 | /************************************************************************** |
2 | * Author: Panos Christakoglou. * | |
3 | * Contributors are mentioned in the code where appropriate. * | |
4 | * * | |
5 | * Permission to use, copy, modify and distribute this software and its * | |
6 | * documentation strictly for non-commercial purposes is hereby granted * | |
7 | * without fee, provided that the above copyright notice appears in all * | |
8 | * copies and that both the copyright notice and this permission notice * | |
9 | * appear in the supporting documentation. The authors make no claims * | |
10 | * about the suitability of this software for any purpose. It is * | |
11 | * provided "as is" without express or implied warranty. * | |
12 | **************************************************************************/ | |
13 | ||
14 | /* $Id$ */ | |
15 | ||
16 | //----------------------------------------------------------------- | |
17 | // AliProtonAnalysis class | |
18 | // This is the class to deal with the proton analysis | |
dd3fa486 | 19 | // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch |
734d2c12 | 20 | //----------------------------------------------------------------- |
21 | #include <Riostream.h> | |
22 | #include <TFile.h> | |
23 | #include <TSystem.h> | |
aafecd8b | 24 | #include <TF1.h> |
37cb8683 | 25 | #include <TH3F.h> |
251e4034 | 26 | #include <TH2D.h> |
734d2c12 | 27 | #include <TH1D.h> |
3f6d0c08 | 28 | #include <TH1I.h> |
e4358d7f | 29 | #include <TParticle.h> |
735cc63d | 30 | #include <TList.h> |
734d2c12 | 31 | |
2b748670 | 32 | #include <AliExternalTrackParam.h> |
ee4ca40d | 33 | #include <AliAODEvent.h> |
734d2c12 | 34 | #include <AliESDEvent.h> |
73aba974 | 35 | //#include <AliLog.h> |
ee4ca40d | 36 | #include <AliPID.h> |
e4358d7f | 37 | #include <AliStack.h> |
39f2a708 | 38 | #include <AliCFContainer.h> |
39 | #include <AliCFEffGrid.h> | |
251e4034 | 40 | #include <AliCFDataGrid.h> |
ff672838 | 41 | #include <AliTPCPIDResponse.h> |
42 | #include <AliESDpid.h> | |
73aba974 | 43 | class AliLog; |
44 | class AliESDVertex; | |
45 | ||
46 | #include "AliProtonAnalysis.h" | |
47 | #include "AliProtonAnalysisBase.h" | |
e4358d7f | 48 | |
734d2c12 | 49 | ClassImp(AliProtonAnalysis) |
50 | ||
51 | //____________________________________________________________________// | |
52 | AliProtonAnalysis::AliProtonAnalysis() : | |
0ab648ea | 53 | TObject(), fProtonAnalysisBase(0), |
734d2c12 | 54 | fNBinsY(0), fMinY(0), fMaxY(0), |
55 | fNBinsPt(0), fMinPt(0), fMaxPt(0), | |
251e4034 | 56 | fProtonContainer(0), fAntiProtonContainer(0), |
71a67ee1 | 57 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
58 | fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0), | |
ce9d2201 | 59 | fHistEventStats(0), fYRatioInPtBinsList(0), |
251e4034 | 60 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
61 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
62 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
63 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 64 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 65 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
7deb716b | 66 | fHistCorrectionForCrossSectionYPtProtons(0), |
67 | fHistCorrectionForCrossSectionYPtAntiProtons(0), | |
68 | fHistCorrectionForCrossSectionFlag(kFALSE), | |
437dd627 | 69 | fHistYPtCorrectionForCutsProtons(0), fHistYPtCorrectionForCutsAntiProtons(0), |
70 | fCorrectForCutsFlag(kFALSE), | |
71 | fHistYPtCorrectionForFeedDownProtons(0), | |
72 | fHistYPtCorrectionForFeedDownAntiProtons(0), | |
73 | fCorrectForFeedDownFlag(kFALSE), | |
2c60f603 | 74 | fHistYPtCorrectionForSecondaries(0), fCorrectForSecondariesFlag(kFALSE), |
735cc63d | 75 | fGlobalQAList(0), fQA2DList(0), |
76 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
77 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
78 | fInitQAFlag(kFALSE) { | |
734d2c12 | 79 | //Default constructor |
734d2c12 | 80 | } |
81 | ||
82 | //____________________________________________________________________// | |
0ab648ea | 83 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, |
84 | Float_t fLowY, Float_t fHighY, | |
85 | Int_t nbinsPt, | |
86 | Float_t fLowPt, Float_t fHighPt) : | |
87 | TObject(), fProtonAnalysisBase(0), | |
734d2c12 | 88 | fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY), |
89 | fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt), | |
251e4034 | 90 | fProtonContainer(0), fAntiProtonContainer(0), |
ce9d2201 | 91 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
71a67ee1 | 92 | fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0), |
ce9d2201 | 93 | fHistEventStats(0), fYRatioInPtBinsList(0), |
251e4034 | 94 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
95 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
96 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
97 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 98 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 99 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
7deb716b | 100 | fHistCorrectionForCrossSectionYPtProtons(0), |
101 | fHistCorrectionForCrossSectionYPtAntiProtons(0), | |
102 | fHistCorrectionForCrossSectionFlag(kFALSE), | |
437dd627 | 103 | fHistYPtCorrectionForCutsProtons(0), fHistYPtCorrectionForCutsAntiProtons(0), |
104 | fCorrectForCutsFlag(kFALSE), | |
105 | fHistYPtCorrectionForFeedDownProtons(0), | |
106 | fHistYPtCorrectionForFeedDownAntiProtons(0), | |
107 | fCorrectForFeedDownFlag(kFALSE), | |
2c60f603 | 108 | fHistYPtCorrectionForSecondaries(0), fCorrectForSecondariesFlag(kFALSE), |
735cc63d | 109 | fGlobalQAList(0), fQA2DList(0), |
110 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
111 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
112 | fInitQAFlag(kFALSE) { | |
734d2c12 | 113 | //Default constructor |
f203beb9 | 114 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
115 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
116 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
3f6d0c08 | 117 | |
0ab648ea | 118 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", |
119 | fNBinsY,fMinY,fMaxY, | |
120 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 121 | fHistYPtProtons->SetStats(kTRUE); |
0ab648ea | 122 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
123 | if(fProtonAnalysisBase->GetEtaMode()) | |
124 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
125 | else | |
126 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 127 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); |
128 | ||
0ab648ea | 129 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", |
130 | fNBinsY,fMinY,fMaxY, | |
131 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 132 | fHistYPtAntiProtons->SetStats(kTRUE); |
0ab648ea | 133 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
134 | if(fProtonAnalysisBase->GetEtaMode()) | |
135 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
136 | else | |
137 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 138 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); |
251e4034 | 139 | |
71a67ee1 | 140 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
141 | fNBinsY,fMinY,fMaxY, | |
142 | fNBinsPt,fMinPt,fMaxPt); | |
143 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
144 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
145 | if(fProtonAnalysisBase->GetEtaMode()) | |
146 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
147 | else | |
148 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
149 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
150 | ||
151 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
152 | "Antiprotons", | |
153 | fNBinsY,fMinY,fMaxY, | |
154 | fNBinsPt,fMinPt,fMaxPt); | |
155 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
156 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
157 | if(fProtonAnalysisBase->GetEtaMode()) | |
158 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
159 | else | |
160 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
161 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
162 | ||
251e4034 | 163 | //setting up the containers |
164 | Int_t iBin[2]; | |
165 | iBin[0] = nbinsY; | |
166 | iBin[1] = nbinsPt; | |
167 | Double_t *binLimY = new Double_t[nbinsY+1]; | |
168 | Double_t *binLimPt = new Double_t[nbinsPt+1]; | |
169 | //values for bin lower bounds | |
170 | for(Int_t i = 0; i <= nbinsY; i++) | |
171 | binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i; | |
172 | for(Int_t i = 0; i <= nbinsPt; i++) | |
173 | binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i; | |
174 | ||
175 | fProtonContainer = new AliCFContainer("containerProtons", | |
176 | "container for protons", | |
2f1c0f45 | 177 | kNSteps,2,iBin); |
0ab648ea | 178 | fProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta |
251e4034 | 179 | fProtonContainer->SetBinLimits(1,binLimPt); //pT |
180 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
181 | "container for antiprotons", | |
2f1c0f45 | 182 | kNSteps,2,iBin); |
0ab648ea | 183 | fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta |
251e4034 | 184 | fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT |
e56f08ed | 185 | |
186 | //Initialize the QA | |
187 | if(!fInitQAFlag) InitQA(); | |
734d2c12 | 188 | } |
189 | ||
4acc9d4d | 190 | //____________________________________________________________________// |
191 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Double_t *gY, | |
192 | Int_t nbinsPt,Double_t *gPt) : | |
193 | TObject(), fProtonAnalysisBase(0), | |
194 | fNBinsY(nbinsY), fMinY(gY[0]), fMaxY(gY[nbinsY]), | |
195 | fNBinsPt(nbinsPt), fMinPt(gPt[0]), fMaxPt(gPt[nbinsPt]), | |
196 | fProtonContainer(0), fAntiProtonContainer(0), | |
ce9d2201 | 197 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
71a67ee1 | 198 | fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0), |
ce9d2201 | 199 | fHistEventStats(0), fYRatioInPtBinsList(0), |
4acc9d4d | 200 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
201 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
202 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
203 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 204 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 205 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
7deb716b | 206 | fHistCorrectionForCrossSectionYPtProtons(0), |
207 | fHistCorrectionForCrossSectionYPtAntiProtons(0), | |
208 | fHistCorrectionForCrossSectionFlag(kFALSE), | |
437dd627 | 209 | fHistYPtCorrectionForCutsProtons(0), fHistYPtCorrectionForCutsAntiProtons(0), |
210 | fCorrectForCutsFlag(kFALSE), | |
211 | fHistYPtCorrectionForFeedDownProtons(0), | |
212 | fHistYPtCorrectionForFeedDownAntiProtons(0), | |
213 | fCorrectForFeedDownFlag(kFALSE), | |
2c60f603 | 214 | fHistYPtCorrectionForSecondaries(0), fCorrectForSecondariesFlag(kFALSE), |
735cc63d | 215 | fGlobalQAList(0), fQA2DList(0), |
216 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
217 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
218 | fInitQAFlag(kFALSE) { | |
4acc9d4d | 219 | //Default constructor |
f203beb9 | 220 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
221 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
222 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
4acc9d4d | 223 | |
224 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", | |
225 | fNBinsY,gY,fNBinsPt,gPt); | |
226 | fHistYPtProtons->SetStats(kTRUE); | |
227 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
228 | if(fProtonAnalysisBase->GetEtaMode()) | |
229 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
230 | else | |
231 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
232 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
233 | ||
234 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", | |
235 | fNBinsY,gY,fNBinsPt,gPt); | |
236 | fHistYPtAntiProtons->SetStats(kTRUE); | |
237 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
238 | if(fProtonAnalysisBase->GetEtaMode()) | |
239 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
240 | else | |
241 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
242 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
243 | ||
71a67ee1 | 244 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
245 | fNBinsY,fMinY,fMaxY, | |
246 | fNBinsPt,fMinPt,fMaxPt); | |
247 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
248 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
249 | if(fProtonAnalysisBase->GetEtaMode()) | |
250 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
251 | else | |
252 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
253 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
254 | ||
255 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
256 | "Antiprotons", | |
257 | fNBinsY,fMinY,fMaxY, | |
258 | fNBinsPt,fMinPt,fMaxPt); | |
259 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
260 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
261 | if(fProtonAnalysisBase->GetEtaMode()) | |
262 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
263 | else | |
264 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
265 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
266 | ||
4acc9d4d | 267 | //setting up the containers |
268 | Int_t iBin[2]; | |
269 | iBin[0] = nbinsY; | |
270 | iBin[1] = nbinsPt; | |
271 | fProtonContainer = new AliCFContainer("containerProtons", | |
272 | "container for protons", | |
2f1c0f45 | 273 | kNSteps,2,iBin); |
4acc9d4d | 274 | fProtonContainer->SetBinLimits(0,gY); //rapidity or eta |
275 | fProtonContainer->SetBinLimits(1,gPt); //pT | |
276 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
277 | "container for antiprotons", | |
2f1c0f45 | 278 | kNSteps,2,iBin); |
4acc9d4d | 279 | fAntiProtonContainer->SetBinLimits(0,gY); //rapidity or eta |
280 | fAntiProtonContainer->SetBinLimits(1,gPt); //pT | |
e56f08ed | 281 | |
282 | //Initialize the QA | |
283 | if(!fInitQAFlag) InitQA(); | |
4acc9d4d | 284 | } |
285 | ||
734d2c12 | 286 | //____________________________________________________________________// |
287 | AliProtonAnalysis::~AliProtonAnalysis() { | |
288 | //Default destructor | |
0ab648ea | 289 | if(fProtonAnalysisBase) delete fProtonAnalysisBase; |
290 | ||
39f2a708 | 291 | if(fHistEvents) delete fHistEvents; |
292 | if(fHistYPtProtons) delete fHistYPtProtons; | |
293 | if(fHistYPtAntiProtons) delete fHistYPtAntiProtons; | |
71a67ee1 | 294 | if(fHistYPtProtonsCorrected) delete fHistYPtProtonsCorrected; |
295 | if(fHistYPtAntiProtonsCorrected) delete fHistYPtAntiProtonsCorrected; | |
52b04cf9 | 296 | if(fHistEventStats) delete fHistEventStats; |
ce9d2201 | 297 | if(fYRatioInPtBinsList) delete fYRatioInPtBinsList; |
298 | ||
251e4034 | 299 | if(fProtonContainer) delete fProtonContainer; |
300 | if(fAntiProtonContainer) delete fAntiProtonContainer; | |
301 | ||
251e4034 | 302 | if(fEffGridListProtons) delete fEffGridListProtons; |
cdb3530f | 303 | if(fCorrectionListProtons2D) delete fCorrectionListProtons2D; |
304 | if(fEfficiencyListProtons1D) delete fEfficiencyListProtons1D; | |
305 | if(fCorrectionListProtons1D) delete fCorrectionListProtons1D; | |
251e4034 | 306 | if(fEffGridListAntiProtons) delete fEffGridListAntiProtons; |
cdb3530f | 307 | if(fCorrectionListAntiProtons2D) delete fCorrectionListAntiProtons2D; |
308 | if(fEfficiencyListAntiProtons1D) delete fEfficiencyListAntiProtons1D; | |
309 | if(fCorrectionListAntiProtons1D) delete fCorrectionListAntiProtons1D; | |
251e4034 | 310 | if(fCorrectProtons) delete fCorrectProtons; |
311 | if(fCorrectAntiProtons) delete fCorrectAntiProtons; | |
336ea0ff | 312 | if(fHistEfficiencyYPtProtons) delete fHistEfficiencyYPtProtons; |
313 | if(fHistEfficiencyYPtAntiProtons) delete fHistEfficiencyYPtAntiProtons; | |
7deb716b | 314 | if(fHistCorrectionForCrossSectionYPtProtons) delete fHistCorrectionForCrossSectionYPtProtons; |
315 | if(fHistCorrectionForCrossSectionYPtAntiProtons) delete fHistCorrectionForCrossSectionYPtAntiProtons; | |
437dd627 | 316 | if(fHistYPtCorrectionForCutsProtons) delete fHistYPtCorrectionForCutsProtons; |
317 | if(fHistYPtCorrectionForCutsAntiProtons) delete fHistYPtCorrectionForCutsAntiProtons; | |
318 | if(fHistYPtCorrectionForFeedDownProtons) delete fHistYPtCorrectionForFeedDownProtons; | |
319 | if(fHistYPtCorrectionForFeedDownAntiProtons) delete fHistYPtCorrectionForFeedDownAntiProtons; | |
2c60f603 | 320 | if(fHistYPtCorrectionForSecondaries) delete fHistYPtCorrectionForSecondaries; |
735cc63d | 321 | |
322 | //QA lists | |
323 | if(fGlobalQAList) delete fGlobalQAList; | |
324 | if(fQA2DList) delete fQA2DList; | |
325 | if(fQAProtonsAcceptedList) delete fQAProtonsAcceptedList; | |
326 | if(fQAProtonsRejectedList) delete fQAProtonsRejectedList; | |
327 | if(fQAAntiProtonsAcceptedList) delete fQAAntiProtonsAcceptedList; | |
328 | if(fQAAntiProtonsRejectedList) delete fQAAntiProtonsRejectedList; | |
734d2c12 | 329 | } |
330 | ||
331 | //____________________________________________________________________// | |
251e4034 | 332 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, |
333 | Float_t fLowY, Float_t fHighY, | |
334 | Int_t nbinsPt, | |
335 | Float_t fLowPt, Float_t fHighPt) { | |
9cd594db | 336 | //Initializes the histograms |
734d2c12 | 337 | fNBinsY = nbinsY; |
338 | fMinY = fLowY; | |
339 | fMaxY = fHighY; | |
340 | fNBinsPt = nbinsPt; | |
341 | fMinPt = fLowPt; | |
342 | fMaxPt = fHighPt; | |
343 | ||
f203beb9 | 344 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
345 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
346 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
3f6d0c08 | 347 | |
0ab648ea | 348 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", |
349 | fNBinsY,fMinY,fMaxY, | |
350 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 351 | fHistYPtProtons->SetStats(kTRUE); |
0ab648ea | 352 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
353 | if(fProtonAnalysisBase->GetEtaMode()) | |
354 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
355 | else | |
356 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 357 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); |
358 | ||
0ab648ea | 359 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", |
360 | fNBinsY,fMinY,fMaxY, | |
361 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 362 | fHistYPtAntiProtons->SetStats(kTRUE); |
0ab648ea | 363 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
364 | if(fProtonAnalysisBase->GetEtaMode()) | |
365 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
366 | else | |
367 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 368 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); |
251e4034 | 369 | |
71a67ee1 | 370 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
371 | fNBinsY,fMinY,fMaxY, | |
372 | fNBinsPt,fMinPt,fMaxPt); | |
373 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
374 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
375 | if(fProtonAnalysisBase->GetEtaMode()) | |
376 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
377 | else | |
378 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
379 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
380 | ||
381 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
382 | "Antiprotons", | |
383 | fNBinsY,fMinY,fMaxY, | |
384 | fNBinsPt,fMinPt,fMaxPt); | |
385 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
386 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
387 | if(fProtonAnalysisBase->GetEtaMode()) | |
388 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
389 | else | |
390 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
391 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
392 | ||
251e4034 | 393 | //setting up the containers |
394 | Int_t iBin[2]; | |
395 | iBin[0] = nbinsY; | |
396 | iBin[1] = nbinsPt; | |
397 | Double_t *binLimY = new Double_t[nbinsY+1]; | |
398 | Double_t *binLimPt = new Double_t[nbinsPt+1]; | |
399 | //values for bin lower bounds | |
400 | for(Int_t i = 0; i <= nbinsY; i++) | |
401 | binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i; | |
402 | for(Int_t i = 0; i <= nbinsPt; i++) | |
403 | binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i; | |
404 | ||
405 | fProtonContainer = new AliCFContainer("containerProtons", | |
406 | "container for protons", | |
2f1c0f45 | 407 | kNSteps,2,iBin); |
251e4034 | 408 | fProtonContainer->SetBinLimits(0,binLimY); //rapidity |
409 | fProtonContainer->SetBinLimits(1,binLimPt); //pT | |
410 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
411 | "container for antiprotons", | |
2f1c0f45 | 412 | kNSteps,2,iBin); |
251e4034 | 413 | fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity |
414 | fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT | |
e56f08ed | 415 | |
416 | //Initialize the QA | |
417 | if(!fInitQAFlag) InitQA(); | |
734d2c12 | 418 | } |
419 | ||
4acc9d4d | 420 | //____________________________________________________________________// |
421 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Double_t *gY, | |
422 | Int_t nbinsPt, Double_t *gPt) { | |
423 | //Initializes the histograms using asymmetric values - global tracking | |
424 | fNBinsY = nbinsY; | |
425 | fMinY = gY[0]; | |
426 | fMaxY = gY[nbinsY]; | |
427 | fNBinsPt = nbinsPt; | |
428 | fMinPt = gPt[0]; | |
429 | fMaxPt = gPt[nbinsPt]; | |
430 | ||
f203beb9 | 431 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
432 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
433 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
4acc9d4d | 434 | |
435 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", | |
436 | fNBinsY,gY,fNBinsPt,gPt); | |
437 | fHistYPtProtons->SetStats(kTRUE); | |
438 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
439 | if(fProtonAnalysisBase->GetEtaMode()) | |
440 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
441 | else | |
442 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
443 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
444 | ||
445 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", | |
446 | fNBinsY,gY,fNBinsPt,gPt); | |
447 | fHistYPtAntiProtons->SetStats(kTRUE); | |
448 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
449 | if(fProtonAnalysisBase->GetEtaMode()) | |
450 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
451 | else | |
452 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
453 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
454 | ||
71a67ee1 | 455 | fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons", |
456 | fNBinsY,gY,fNBinsPt,gPt); | |
457 | fHistYPtProtonsCorrected->SetStats(kTRUE); | |
458 | fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
459 | if(fProtonAnalysisBase->GetEtaMode()) | |
460 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
461 | else | |
462 | fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y"); | |
463 | fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
464 | ||
465 | fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected", | |
466 | "Antiprotons", | |
467 | fNBinsY,gY,fNBinsPt,gPt); | |
468 | fHistYPtAntiProtonsCorrected->SetStats(kTRUE); | |
469 | fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
470 | if(fProtonAnalysisBase->GetEtaMode()) | |
471 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta"); | |
472 | else | |
473 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y"); | |
474 | fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1); | |
475 | ||
4acc9d4d | 476 | //setting up the containers |
477 | Int_t iBin[2]; | |
478 | iBin[0] = nbinsY; | |
479 | iBin[1] = nbinsPt; | |
480 | ||
481 | fProtonContainer = new AliCFContainer("containerProtons", | |
482 | "container for protons", | |
2f1c0f45 | 483 | kNSteps,2,iBin); |
4acc9d4d | 484 | fProtonContainer->SetBinLimits(0,gY); //rapidity |
485 | fProtonContainer->SetBinLimits(1,gPt); //pT | |
486 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
487 | "container for antiprotons", | |
2f1c0f45 | 488 | kNSteps,2,iBin); |
4acc9d4d | 489 | fAntiProtonContainer->SetBinLimits(0,gY); //rapidity |
490 | fAntiProtonContainer->SetBinLimits(1,gPt); //pT | |
e56f08ed | 491 | |
492 | //Initialize the QA | |
493 | if(!fInitQAFlag) InitQA(); | |
4acc9d4d | 494 | } |
495 | ||
734d2c12 | 496 | //____________________________________________________________________// |
2b748670 | 497 | Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) { |
9cd594db | 498 | //Read the containers from the existing file |
2b748670 | 499 | Bool_t status = kTRUE; |
500 | ||
734d2c12 | 501 | TFile *file = TFile::Open(filename); |
2b748670 | 502 | if(!file) { |
503 | cout<<"Could not find the input file "<<filename<<endl; | |
504 | status = kFALSE; | |
505 | } | |
506 | ||
0ab648ea | 507 | TList *list = (TList *)file->Get("outputList"); |
2b748670 | 508 | if(list) { |
509 | cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl; | |
251e4034 | 510 | fHistYPtProtons = (TH2D *)list->At(0); |
511 | fHistYPtAntiProtons = (TH2D *)list->At(1); | |
3f6d0c08 | 512 | fHistEvents = (TH1I *)list->At(2); |
251e4034 | 513 | fProtonContainer = (AliCFContainer *)list->At(3); |
514 | fAntiProtonContainer = (AliCFContainer *)list->At(4); | |
52b04cf9 | 515 | fHistEventStats = (TH1F *)list->At(5); |
2b748670 | 516 | } |
517 | else if(!list) { | |
518 | cout<<"Retrieving objects from the file... "<<endl; | |
251e4034 | 519 | fHistYPtProtons = (TH2D *)file->Get("fHistYPtProtons"); |
520 | fHistYPtAntiProtons = (TH2D *)file->Get("fHistYPtAntiProtons"); | |
3f6d0c08 | 521 | fHistEvents = (TH1I *)file->Get("fHistEvents"); |
251e4034 | 522 | fProtonContainer = (AliCFContainer *)file->Get("containerProtons"); |
523 | fAntiProtonContainer = (AliCFContainer *)file->Get("containerAntiProtons"); | |
52b04cf9 | 524 | fHistEventStats = (TH1F *)file->Get("fHistEventStats"); |
2b748670 | 525 | } |
251e4034 | 526 | if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents) |
52b04cf9 | 527 | ||(!fProtonContainer)||(!fAntiProtonContainer)||(!fHistEventStats)) { |
2b748670 | 528 | cout<<"Input containers were not found!!!"<<endl; |
529 | status = kFALSE; | |
530 | } | |
531 | else { | |
3e23254a | 532 | //fHistYPtProtons = fProtonContainer->ShowProjection(0,1,0); |
533 | //fHistYPtAntiProtons = fAntiProtonContainer->ShowProjection(0,1,0); | |
534 | fHistYPtProtons->Sumw2(); | |
535 | fHistYPtAntiProtons->Sumw2(); | |
2b748670 | 536 | } |
537 | ||
538 | return status; | |
734d2c12 | 539 | } |
540 | ||
ce9d2201 | 541 | //____________________________________________________________________// |
542 | TList *AliProtonAnalysis::GetYRatioHistogramsInPtBins() { | |
543 | //Returns a TList obkect with the eta (or y) dependent ratios for each | |
544 | //pT bin taken from the 2D histograms (not from the containers) | |
545 | fYRatioInPtBinsList = new TList(); | |
546 | ||
547 | //Protons | |
548 | TH1D *gHistYProtons[100]; | |
549 | TString title; | |
550 | for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) { | |
551 | title = "gHistYProtons_PtBin"; title += iBin; | |
552 | gHistYProtons[iBin] = (TH1D *)fHistYPtProtons->ProjectionX(title.Data(), | |
553 | iBin, | |
71a67ee1 | 554 | iBin,"b"); |
ce9d2201 | 555 | gHistYProtons[iBin]->Sumw2(); |
556 | } | |
557 | ||
558 | //Antiprotons | |
559 | TH1D *gHistYAntiProtons[100]; | |
560 | for(Int_t iBin = 1; iBin <= fHistYPtAntiProtons->GetNbinsY(); iBin++) { | |
561 | title = "gHistYAntiProtons_PtBin"; title += iBin; | |
562 | gHistYAntiProtons[iBin] = (TH1D *)fHistYPtAntiProtons->ProjectionX(title.Data(), | |
563 | iBin, | |
71a67ee1 | 564 | iBin,"b"); |
ce9d2201 | 565 | gHistYAntiProtons[iBin]->Sumw2(); |
566 | } | |
567 | ||
568 | Double_t pTmin = fHistYPtProtons->GetYaxis()->GetXmin(); | |
569 | Double_t pTStep = (fHistYPtProtons->GetYaxis()->GetXmax() - fHistYPtProtons->GetYaxis()->GetXmin())/fHistYPtProtons->GetNbinsY(); | |
570 | Double_t pTmax = pTmin + pTStep; | |
571 | //Ratio | |
572 | TH1D *gHistYRatio[100]; | |
573 | for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) { | |
574 | title = "gHistYRatio_PtBin"; title += iBin; | |
575 | gHistYRatio[iBin] = new TH1D(title.Data(),"", | |
576 | fHistYPtProtons->GetNbinsX(), | |
577 | fHistYPtProtons->GetXaxis()->GetXmin(), | |
578 | fHistYPtProtons->GetXaxis()->GetXmax()); | |
579 | title = "Pt: "; title += pTmin; title += " - "; title += pTmax; | |
580 | gHistYRatio[iBin]->SetTitle(title.Data()); | |
581 | gHistYRatio[iBin]->GetYaxis()->SetTitle("#bar{p}/p"); | |
582 | gHistYRatio[iBin]->GetXaxis()->SetTitle(fHistYPtProtons->GetXaxis()->GetTitle()); | |
583 | gHistYRatio[iBin]->Divide(gHistYAntiProtons[iBin], | |
71a67ee1 | 584 | gHistYProtons[iBin],1.0,1.0,"b"); |
ce9d2201 | 585 | fYRatioInPtBinsList->Add(gHistYRatio[iBin]); |
586 | pTmin += pTStep; | |
587 | pTmax += pTStep; | |
588 | } | |
589 | ||
590 | return fYRatioInPtBinsList; | |
591 | } | |
592 | ||
734d2c12 | 593 | //____________________________________________________________________// |
594 | TH1D *AliProtonAnalysis::GetProtonYHistogram() { | |
9cd594db | 595 | //Get the y histogram for protons |
3f6d0c08 | 596 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
251e4034 | 597 | |
f203beb9 | 598 | //TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),""); |
8d64ac62 | 599 | TH1D *fYProtons = fProtonContainer->ShowProjection(0,kStepInPhaseSpace); //variable-step |
251e4034 | 600 | |
734d2c12 | 601 | fYProtons->SetStats(kFALSE); |
3f6d0c08 | 602 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 603 | fYProtons->SetTitle("dN/dy protons"); |
604 | fYProtons->SetMarkerStyle(kFullCircle); | |
605 | fYProtons->SetMarkerColor(4); | |
3f6d0c08 | 606 | if(nAnalyzedEvents > 0) |
251e4034 | 607 | fYProtons->Scale(1./nAnalyzedEvents); |
608 | ||
734d2c12 | 609 | return fYProtons; |
610 | } | |
611 | ||
612 | //____________________________________________________________________// | |
613 | TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() { | |
9cd594db | 614 | //Get the y histogram for antiprotons |
3f6d0c08 | 615 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 616 | |
f203beb9 | 617 | //TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),""); |
8d64ac62 | 618 | TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,kStepInPhaseSpace);//variable-step |
251e4034 | 619 | |
734d2c12 | 620 | fYAntiProtons->SetStats(kFALSE); |
3f6d0c08 | 621 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 622 | fYAntiProtons->SetTitle("dN/dy antiprotons"); |
623 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
624 | fYAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 625 | if(nAnalyzedEvents > 0) |
626 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 627 | |
628 | return fYAntiProtons; | |
629 | } | |
630 | ||
631 | //____________________________________________________________________// | |
632 | TH1D *AliProtonAnalysis::GetProtonPtHistogram() { | |
9cd594db | 633 | //Get the Pt histogram for protons |
3f6d0c08 | 634 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 635 | |
f203beb9 | 636 | //TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); |
8d64ac62 | 637 | TH1D *fPtProtons = fProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step |
251e4034 | 638 | |
734d2c12 | 639 | fPtProtons->SetStats(kFALSE); |
3f6d0c08 | 640 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 641 | fPtProtons->SetTitle("dN/dPt protons"); |
642 | fPtProtons->SetMarkerStyle(kFullCircle); | |
643 | fPtProtons->SetMarkerColor(4); | |
3f6d0c08 | 644 | if(nAnalyzedEvents > 0) |
645 | fPtProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 646 | |
647 | return fPtProtons; | |
648 | } | |
649 | ||
650 | //____________________________________________________________________// | |
651 | TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() { | |
9cd594db | 652 | //Get the Pt histogram for antiprotons |
3f6d0c08 | 653 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 654 | |
f203beb9 | 655 | //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); |
8d64ac62 | 656 | TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step |
251e4034 | 657 | |
734d2c12 | 658 | fPtAntiProtons->SetStats(kFALSE); |
3f6d0c08 | 659 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 660 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); |
661 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
662 | fPtAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 663 | if(nAnalyzedEvents > 0) |
664 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 665 | |
666 | return fPtAntiProtons; | |
667 | } | |
668 | ||
251e4034 | 669 | //____________________________________________________________________// |
670 | TH1D *AliProtonAnalysis::GetProtonCorrectedYHistogram() { | |
9cd594db | 671 | //Get the corrected y histogram for protons |
251e4034 | 672 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
673 | ||
71a67ee1 | 674 | TH1D *fYProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionX("fYProtons",1,fHistYPtProtons->GetYaxis()->GetNbins(),"e"); |
336ea0ff | 675 | //TH1D *fYProtons = fCorrectProtons->Project(0); //0: rapidity |
251e4034 | 676 | |
677 | fYProtons->SetStats(kFALSE); | |
678 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); | |
679 | fYProtons->GetXaxis()->SetTitle("y"); | |
680 | fYProtons->SetTitle("dN/dy protons"); | |
681 | fYProtons->SetMarkerStyle(kFullCircle); | |
682 | fYProtons->SetMarkerColor(4); | |
683 | if(nAnalyzedEvents > 0) | |
684 | fYProtons->Scale(1./nAnalyzedEvents); | |
685 | ||
686 | return fYProtons; | |
687 | } | |
688 | ||
689 | //____________________________________________________________________// | |
690 | TH1D *AliProtonAnalysis::GetAntiProtonCorrectedYHistogram() { | |
9cd594db | 691 | //Get the corrected y histogram for antiprotons |
251e4034 | 692 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
336ea0ff | 693 | |
71a67ee1 | 694 | TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionX("fYAntiProtons",1,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"e"); |
336ea0ff | 695 | //TH1D *fYAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity |
251e4034 | 696 | |
697 | fYAntiProtons->SetStats(kFALSE); | |
698 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); | |
699 | fYAntiProtons->GetXaxis()->SetTitle("y"); | |
700 | fYAntiProtons->SetTitle("dN/dy protons"); | |
701 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
702 | fYAntiProtons->SetMarkerColor(4); | |
703 | if(nAnalyzedEvents > 0) | |
704 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
705 | ||
706 | return fYAntiProtons; | |
707 | } | |
708 | ||
709 | //____________________________________________________________________// | |
710 | TH1D *AliProtonAnalysis::GetProtonCorrectedPtHistogram() { | |
9cd594db | 711 | //Get the corrected Pt histogram for protons |
251e4034 | 712 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
713 | ||
37567742 | 714 | //TH1D *fPtProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionY("fPtProtons",2,fHistYPtProtons->GetXaxis()->GetNbins()-1,"e"); |
715 | TH1D *fPtProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionY("fPtProtons",3,7,"e"); //3,7: |y| < 0.5 | |
336ea0ff | 716 | //TH1D *fPtProtons = fCorrectProtons->Project(0); //0: rapidity |
251e4034 | 717 | |
718 | fPtProtons->SetStats(kFALSE); | |
719 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); | |
720 | fPtProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
721 | fPtProtons->SetTitle("dN/dPt protons"); | |
722 | fPtProtons->SetMarkerStyle(kFullCircle); | |
723 | fPtProtons->SetMarkerColor(4); | |
724 | if(nAnalyzedEvents > 0) | |
725 | fPtProtons->Scale(1./nAnalyzedEvents); | |
726 | ||
727 | return fPtProtons; | |
728 | } | |
729 | ||
730 | //____________________________________________________________________// | |
731 | TH1D *AliProtonAnalysis::GetAntiProtonCorrectedPtHistogram() { | |
9cd594db | 732 | //Get the corrected Pt histogram for antiprotons |
251e4034 | 733 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
734 | ||
37567742 | 735 | //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionY("fPtAntiProtons",2,fHistYPtAntiProtons->GetXaxis()->GetNbins()-1,"e"); |
736 | TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionY("fPtAntiProtons",3,7,"e"); //3,7: |y| < 0.5 | |
336ea0ff | 737 | //TH1D *fPtAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity |
251e4034 | 738 | |
739 | fPtAntiProtons->SetStats(kFALSE); | |
740 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); | |
741 | fPtAntiProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
742 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); | |
743 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
744 | fPtAntiProtons->SetMarkerColor(4); | |
745 | if(nAnalyzedEvents > 0) | |
746 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
747 | ||
748 | return fPtAntiProtons; | |
749 | } | |
750 | ||
734d2c12 | 751 | //____________________________________________________________________// |
752 | TH1D *AliProtonAnalysis::GetYRatioHistogram() { | |
3e23254a | 753 | //Returns the rapidity dependence of the ratio (uncorrected) |
734d2c12 | 754 | TH1D *fYProtons = GetProtonYHistogram(); |
755 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
756 | ||
757 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 758 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0,"e"); |
734d2c12 | 759 | hRatioY->SetMarkerStyle(kFullCircle); |
760 | hRatioY->SetMarkerColor(4); | |
761 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
762 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
763 | hRatioY->GetXaxis()->SetTitle("y"); | |
764 | hRatioY->GetXaxis()->SetTitleColor(1); | |
765 | hRatioY->SetStats(kFALSE); | |
766 | ||
767 | return hRatioY; | |
768 | } | |
769 | ||
3e23254a | 770 | //____________________________________________________________________// |
336ea0ff | 771 | TH1D *AliProtonAnalysis::GetYRatioCorrectedHistogram() { |
772 | //TH2D *gCorrectionProtons, | |
773 | //TH2D *gCorrectionAntiProtons) { | |
3e23254a | 774 | //Returns the rapidity dependence of the ratio (corrected) |
336ea0ff | 775 | //fHistYPtProtons->Multiply(gCorrectionProtons); |
776 | TH1D *fYProtons = GetProtonCorrectedYHistogram(); | |
777 | //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons); | |
778 | TH1D *fYAntiProtons = GetAntiProtonCorrectedYHistogram(); | |
3e23254a | 779 | |
780 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 781 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0,"e"); |
3e23254a | 782 | hRatioY->SetMarkerStyle(kFullCircle); |
783 | hRatioY->SetMarkerColor(4); | |
784 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
785 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
786 | hRatioY->GetXaxis()->SetTitle("y"); | |
787 | hRatioY->GetXaxis()->SetTitleColor(1); | |
788 | hRatioY->SetStats(kFALSE); | |
789 | ||
790 | return hRatioY; | |
791 | } | |
792 | ||
734d2c12 | 793 | //____________________________________________________________________// |
794 | TH1D *AliProtonAnalysis::GetPtRatioHistogram() { | |
3e23254a | 795 | //Returns the pT dependence of the ratio (uncorrected) |
734d2c12 | 796 | TH1D *fPtProtons = GetProtonPtHistogram(); |
797 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
798 | ||
799 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 800 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0,"e"); |
734d2c12 | 801 | hRatioPt->SetMarkerStyle(kFullCircle); |
802 | hRatioPt->SetMarkerColor(4); | |
803 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
804 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
805 | hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
806 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
807 | hRatioPt->SetStats(kFALSE); | |
808 | ||
809 | return hRatioPt; | |
810 | } | |
811 | ||
3e23254a | 812 | //____________________________________________________________________// |
336ea0ff | 813 | TH1D *AliProtonAnalysis::GetPtRatioCorrectedHistogram() { |
814 | //TH2D *gCorrectionProtons, | |
815 | //TH2D *gCorrectionAntiProtons) { | |
3e23254a | 816 | //Returns the Pt dependence of the ratio (corrected) |
336ea0ff | 817 | //fHistYPtProtons->Multiply(gCorrectionProtons); |
818 | TH1D *fPtProtons = GetProtonCorrectedPtHistogram(); | |
819 | //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons); | |
820 | TH1D *fPtAntiProtons = GetAntiProtonCorrectedPtHistogram(); | |
3e23254a | 821 | |
822 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 823 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0,"e"); |
3e23254a | 824 | hRatioPt->SetMarkerStyle(kFullCircle); |
825 | hRatioPt->SetMarkerColor(4); | |
826 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
827 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
828 | hRatioPt->GetXaxis()->SetTitle("y"); | |
829 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
830 | hRatioPt->SetStats(kFALSE); | |
831 | ||
832 | return hRatioPt; | |
833 | } | |
834 | ||
734d2c12 | 835 | //____________________________________________________________________// |
836 | TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() { | |
3e23254a | 837 | //Returns the rapidity dependence of the asymmetry (uncorrected) |
734d2c12 | 838 | TH1D *fYProtons = GetProtonYHistogram(); |
839 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
840 | ||
841 | TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
842 | hsum->Add(fYProtons,fYAntiProtons,1.0,1.0); | |
843 | ||
844 | TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
845 | hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0); | |
846 | ||
847 | TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 848 | hAsymmetryY->Divide(hdiff,hsum,2.0,1.,"e"); |
734d2c12 | 849 | hAsymmetryY->SetMarkerStyle(kFullCircle); |
850 | hAsymmetryY->SetMarkerColor(4); | |
851 | hAsymmetryY->GetYaxis()->SetTitle("A_{p}"); | |
852 | hAsymmetryY->GetYaxis()->SetTitleOffset(1.4); | |
853 | hAsymmetryY->GetXaxis()->SetTitle("y"); | |
854 | hAsymmetryY->GetXaxis()->SetTitleColor(1); | |
855 | hAsymmetryY->SetStats(kFALSE); | |
856 | ||
857 | return hAsymmetryY; | |
858 | } | |
859 | ||
860 | //____________________________________________________________________// | |
861 | TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() { | |
3e23254a | 862 | //Returns the pT dependence of the asymmetry (uncorrected) |
734d2c12 | 863 | TH1D *fPtProtons = GetProtonPtHistogram(); |
864 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
865 | ||
866 | TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
867 | hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0); | |
868 | ||
869 | TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
870 | hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0); | |
871 | ||
872 | TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
71a67ee1 | 873 | hAsymmetryPt->Divide(hdiff,hsum,2.0,1.,"e"); |
734d2c12 | 874 | hAsymmetryPt->SetMarkerStyle(kFullCircle); |
875 | hAsymmetryPt->SetMarkerColor(4); | |
876 | hAsymmetryPt->GetYaxis()->SetTitle("A_{p}"); | |
877 | hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4); | |
878 | hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
879 | hAsymmetryPt->GetXaxis()->SetTitleColor(1); | |
880 | hAsymmetryPt->SetStats(kFALSE); | |
881 | ||
882 | return hAsymmetryPt; | |
883 | } | |
884 | ||
885 | //____________________________________________________________________// | |
6667f3a7 | 886 | void AliProtonAnalysis::Analyze(AliESDEvent* esd, |
887 | const AliESDVertex *vertex) { | |
e4358d7f | 888 | //Main analysis part - ESD |
0ab648ea | 889 | Int_t nTracks = 0; |
890 | Int_t nIdentifiedProtons = 0, nIdentifiedAntiProtons = 0; | |
891 | Int_t nSurvivedProtons = 0, nSurvivedAntiProtons = 0; | |
ff672838 | 892 | |
893 | //=========================================// | |
894 | //Aleph parametrization | |
895 | Double_t fAlephParameters[5]; | |
896 | if(fProtonAnalysisBase->GetMCAnalysisMode()) { | |
897 | fAlephParameters[0] = 2.15898e+00/50.; | |
898 | fAlephParameters[1] = 1.75295e+01; | |
899 | fAlephParameters[2] = 3.40030e-09; | |
900 | fAlephParameters[3] = 1.96178e+00; | |
901 | fAlephParameters[4] = 3.91720e+00; | |
902 | } | |
903 | else { | |
904 | fAlephParameters[0] = 0.0283086; | |
905 | fAlephParameters[1] = 2.63394e+01; | |
906 | fAlephParameters[2] = 5.04114e-11; | |
907 | fAlephParameters[3] = 2.12543e+00; | |
908 | fAlephParameters[4] = 4.88663e+00; | |
909 | } | |
910 | AliESDpid *fESDpid = new AliESDpid(); | |
911 | AliTPCPIDResponse tpcResponse = fESDpid->GetTPCResponse(); | |
912 | tpcResponse.SetBetheBlochParameters(fAlephParameters[0],fAlephParameters[1],fAlephParameters[2],fAlephParameters[3],fAlephParameters[4]); | |
913 | //=========================================// | |
0ab648ea | 914 | |
f203beb9 | 915 | fHistEvents->Fill(1); //number of analyzed events |
251e4034 | 916 | Double_t containerInput[2] ; |
9cd594db | 917 | Double_t gPt = 0.0, gP = 0.0; |
afc2ac17 | 918 | Float_t dcaXY = 0.0, dcaZ = 0.0; |
919 | ||
0ab648ea | 920 | nTracks = esd->GetNumberOfTracks(); |
921 | for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) { | |
6667f3a7 | 922 | AliESDtrack* track = esd->GetTrack(iTracks); |
df1e8a78 | 923 | AliESDtrack trackTPC; |
2b748670 | 924 | |
32a2ebb6 | 925 | //in case it's a TPC only track relate it to the proper vertex |
0ab648ea | 926 | /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC) { |
df1e8a78 | 927 | Float_t p[2],cov[3]; |
928 | track->GetImpactParametersTPC(p,cov); | |
929 | if (p[0]==0 && p[1]==0) | |
6667f3a7 | 930 | track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig); |
df1e8a78 | 931 | if (!track->FillTPCOnlyTrack(trackTPC)) { |
32a2ebb6 | 932 | continue; |
df1e8a78 | 933 | } |
934 | track = &trackTPC ; | |
0ab648ea | 935 | }*/ |
df1e8a78 | 936 | |
37cb8683 | 937 | Int_t fIdxInt[200]; |
938 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
939 | Int_t npointsTPCdEdx = track->GetTPCsignalN(); | |
4de4661f | 940 | Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance. |
71a67ee1 | 941 | Double_t dca3D = 0.0; |
37cb8683 | 942 | |
0ab648ea | 943 | if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) { |
944 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
945 | if(!tpcTrack) continue; | |
946 | gPt = tpcTrack->Pt(); | |
b8cca027 | 947 | //gP = tpcTrack->P(); |
948 | gP = track->GetInnerParam()->P(); | |
4de4661f | 949 | tpcTrack->PropagateToDCA(vertex, |
950 | esd->GetMagneticField(), | |
951 | 100.,dca,cov); | |
71a67ee1 | 952 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + |
953 | TMath::Power(dca[1],2)); | |
4de4661f | 954 | |
e56f08ed | 955 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { |
30f87a5b | 956 | if(fProtonAnalysisBase->IsAccepted(track)) { |
4de4661f | 957 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 958 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
959 | ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(), | |
4de4661f | 960 | tpcTrack->Phi()*180./TMath::Pi(), |
961 | npointsTPCdEdx); | |
ff672838 | 962 | ((TH3F *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(), |
4de4661f | 963 | tpcTrack->Phi()*180./TMath::Pi(), |
964 | nClustersTPC); | |
ff672838 | 965 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, |
4de4661f | 966 | tpcTrack->Phi()*180./TMath::Pi(), |
967 | npointsTPCdEdx); | |
ff672838 | 968 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, |
4de4661f | 969 | tpcTrack->Phi()*180./TMath::Pi(), |
970 | nClustersTPC); | |
f0e42d04 | 971 | if(track->Charge() > 0) |
972 | ((TH2F *)(fQA2DList->At(20)))->Fill(gP,track->GetTPCsignal()); | |
973 | if(track->Charge() < 0) | |
974 | ((TH2F *)(fQA2DList->At(21)))->Fill(gP,track->GetTPCsignal()); | |
e56f08ed | 975 | }//quality cuts |
976 | }//primary cuts | |
4de4661f | 977 | |
978 | if(fProtonAnalysisBase->IsProton(track)) { | |
979 | //Step: kStepIdentified | |
980 | if(fProtonAnalysisBase->GetEtaMode()) | |
981 | containerInput[0] = tpcTrack->Eta(); | |
982 | else | |
983 | containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(), | |
984 | tpcTrack->Py(), | |
985 | tpcTrack->Pz()); | |
986 | containerInput[1] = gPt; | |
987 | if(tpcTrack->Charge() > 0) { | |
735cc63d | 988 | nIdentifiedProtons += 1; |
4de4661f | 989 | fProtonContainer->Fill(containerInput,kStepIdentified); |
990 | }//protons | |
991 | else if(tpcTrack->Charge() < 0) { | |
735cc63d | 992 | nIdentifiedAntiProtons += 1; |
4de4661f | 993 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); |
994 | }//protons | |
995 | ||
996 | //Step: kStepIsPrimary | |
997 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
998 | if(tpcTrack->Charge() > 0) | |
999 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1000 | else if(tpcTrack->Charge() < 0) | |
e56f08ed | 1001 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); |
4de4661f | 1002 | |
1003 | FillQA(esd,vertex,track); | |
1004 | ||
1005 | //Step: kStepSurvived | |
30f87a5b | 1006 | if(fProtonAnalysisBase->IsAccepted(track)) { |
e56f08ed | 1007 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 1008 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
1009 | ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(), | |
e56f08ed | 1010 | tpcTrack->Phi()*180./TMath::Pi(), |
1011 | npointsTPCdEdx); | |
ff672838 | 1012 | ((TH3F *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(), |
e56f08ed | 1013 | tpcTrack->Phi()*180./TMath::Pi(), |
1014 | nClustersTPC); | |
ff672838 | 1015 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, |
e56f08ed | 1016 | tpcTrack->Phi()*180./TMath::Pi(), |
1017 | npointsTPCdEdx); | |
ff672838 | 1018 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, |
e56f08ed | 1019 | tpcTrack->Phi()*180./TMath::Pi(), |
1020 | nClustersTPC); | |
e56f08ed | 1021 | |
4de4661f | 1022 | if(tpcTrack->Charge() > 0) { |
1023 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1024 | ((TH2F *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(), |
4de4661f | 1025 | tpcTrack->Phi()*180./TMath::Pi()); |
7deb716b | 1026 | if(fProtonAnalysisBase->GetEtaMode()) { |
1027 | ((TH3F *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(), | |
1028 | tpcTrack->Pt(), | |
3770a478 | 1029 | dca[0]); |
7deb716b | 1030 | ((TH3F *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(), |
1031 | tpcTrack->Pt(), | |
3770a478 | 1032 | dca[1]); |
7deb716b | 1033 | ((TH3F *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(), |
1034 | tpcTrack->Pt(), | |
1035 | TMath::Abs(dca3D)); | |
1036 | } | |
1037 | else { | |
1038 | ((TH3F *)(fQA2DList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1039 | tpcTrack->Pt(), | |
3770a478 | 1040 | dca[0]); |
7deb716b | 1041 | ((TH3F *)(fQA2DList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1042 | tpcTrack->Pt(), | |
3770a478 | 1043 | dca[1]); |
7deb716b | 1044 | ((TH3F *)(fQA2DList->At(18)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1045 | tpcTrack->Pt(), | |
1046 | TMath::Abs(dca3D)); | |
1047 | } | |
4de4661f | 1048 | }//protons |
1049 | else if(tpcTrack->Charge() < 0) { | |
1050 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1051 | ((TH2F *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(), |
4de4661f | 1052 | tpcTrack->Phi()*180./TMath::Pi()); |
7deb716b | 1053 | if(fProtonAnalysisBase->GetEtaMode()) { |
1054 | ((TH3F *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(), | |
1055 | tpcTrack->Pt(), | |
3770a478 | 1056 | dca[0]); |
7deb716b | 1057 | ((TH3F *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(), |
1058 | tpcTrack->Pt(), | |
3770a478 | 1059 | dca[1]); |
7deb716b | 1060 | ((TH3F *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(), |
1061 | tpcTrack->Pt(), | |
1062 | TMath::Abs(dca3D)); | |
1063 | } | |
1064 | else { | |
1065 | ((TH3F *)(fQA2DList->At(16)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1066 | tpcTrack->Pt(), | |
3770a478 | 1067 | dca[0]); |
7deb716b | 1068 | ((TH3F *)(fQA2DList->At(17)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1069 | tpcTrack->Pt(), | |
3770a478 | 1070 | dca[1]); |
7deb716b | 1071 | ((TH3F *)(fQA2DList->At(19)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1072 | tpcTrack->Pt(), | |
1073 | TMath::Abs(dca3D)); | |
1074 | } | |
4de4661f | 1075 | }//antiprotons |
1076 | ||
1077 | //Step: kStepInPhaseSpace | |
1078 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1079 | if(tpcTrack->Charge() > 0) { | |
1080 | nSurvivedProtons += 1; | |
1081 | fHistYPtProtons->Fill(containerInput[0], | |
1082 | containerInput[1]); | |
1083 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1084 | }//protons | |
1085 | else if(tpcTrack->Charge() < 0) { | |
1086 | nSurvivedAntiProtons += 1; | |
1087 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1088 | containerInput[1]); | |
1089 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1090 | }//antiprotons | |
1091 | }//Step: kStepInPhaseSpace | |
1092 | }//Step: kStepSurvived | |
1093 | }//Step: kStepIsPrimary | |
1094 | }//Step: kStepIdentified | |
0ab648ea | 1095 | }//TPC only tracks |
afc2ac17 | 1096 | if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kFullHybrid) { |
1097 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
1098 | if(!tpcTrack) continue; | |
1099 | ||
1100 | AliExternalTrackParam cParam; | |
1101 | /*Double_t phi = tpcTrack->Phi(); | |
1102 | Double_t eta = tpcTrack->Eta(); | |
1103 | Double_t gPx = tpcTrack->Px(); | |
1104 | Double_t gPy = tpcTrack->Py(); | |
1105 | Double_t gPz = tpcTrack->Pz();*/ | |
1106 | gPt = tpcTrack->Pt(); | |
1107 | //gP = tpcTrack->P(); | |
1108 | gP = track->GetInnerParam()->P(); | |
1109 | track->RelateToVertex(vertex, | |
1110 | esd->GetMagneticField(), | |
1111 | 100.,&cParam); | |
1112 | track->GetImpactParameters(dcaXY,dcaZ); | |
1113 | dca[0] = dcaXY; dca[1] = dcaZ; | |
1114 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + | |
1115 | TMath::Power(dca[1],2)); | |
1116 | ||
1117 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1118 | if(fProtonAnalysisBase->IsAccepted(track)) { | |
1119 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); | |
1120 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); | |
1121 | ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(), | |
1122 | tpcTrack->Phi()*180./TMath::Pi(), | |
1123 | npointsTPCdEdx); | |
1124 | ((TH3F *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(), | |
1125 | tpcTrack->Phi()*180./TMath::Pi(), | |
1126 | nClustersTPC); | |
1127 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, | |
1128 | tpcTrack->Phi()*180./TMath::Pi(), | |
1129 | npointsTPCdEdx); | |
1130 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, | |
1131 | tpcTrack->Phi()*180./TMath::Pi(), | |
1132 | nClustersTPC); | |
f0e42d04 | 1133 | if(track->Charge() > 0) |
1134 | ((TH2F *)(fQA2DList->At(20)))->Fill(gP,track->GetTPCsignal()); | |
1135 | if(track->Charge() < 0) | |
1136 | ((TH2F *)(fQA2DList->At(21)))->Fill(gP,track->GetTPCsignal()); | |
afc2ac17 | 1137 | }//quality cuts |
1138 | }//primary cuts | |
1139 | ||
1140 | if(fProtonAnalysisBase->IsProton(track)) { | |
1141 | //Step: kStepIdentified | |
1142 | if(fProtonAnalysisBase->GetEtaMode()) | |
1143 | containerInput[0] = tpcTrack->Eta(); | |
1144 | else | |
1145 | containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(), | |
1146 | tpcTrack->Py(), | |
1147 | tpcTrack->Pz()); | |
1148 | containerInput[1] = gPt; | |
1149 | if(tpcTrack->Charge() > 0) { | |
1150 | nIdentifiedProtons += 1; | |
1151 | fProtonContainer->Fill(containerInput,kStepIdentified); | |
1152 | }//protons | |
1153 | else if(tpcTrack->Charge() < 0) { | |
1154 | nIdentifiedAntiProtons += 1; | |
1155 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); | |
1156 | }//protons | |
1157 | ||
1158 | //Step: kStepIsPrimary | |
1159 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1160 | if(tpcTrack->Charge() > 0) | |
1161 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1162 | else if(tpcTrack->Charge() < 0) | |
1163 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1164 | ||
1165 | FillQA(esd,vertex,track); | |
1166 | ||
1167 | //Step: kStepSurvived | |
1168 | if(fProtonAnalysisBase->IsAccepted(track)) { | |
1169 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); | |
1170 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); | |
1171 | ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(), | |
1172 | tpcTrack->Phi()*180./TMath::Pi(), | |
1173 | npointsTPCdEdx); | |
1174 | ((TH3F *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(), | |
1175 | tpcTrack->Phi()*180./TMath::Pi(), | |
1176 | nClustersTPC); | |
1177 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, | |
1178 | tpcTrack->Phi()*180./TMath::Pi(), | |
1179 | npointsTPCdEdx); | |
1180 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, | |
1181 | tpcTrack->Phi()*180./TMath::Pi(), | |
1182 | nClustersTPC); | |
1183 | ||
1184 | if(tpcTrack->Charge() > 0) { | |
1185 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
1186 | ((TH2F *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(), | |
1187 | tpcTrack->Phi()*180./TMath::Pi()); | |
1188 | if(fProtonAnalysisBase->GetEtaMode()) { | |
1189 | ((TH3F *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(), | |
1190 | tpcTrack->Pt(), | |
3770a478 | 1191 | dca[0]); |
afc2ac17 | 1192 | ((TH3F *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(), |
1193 | tpcTrack->Pt(), | |
3770a478 | 1194 | dca[1]); |
afc2ac17 | 1195 | ((TH3F *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(), |
1196 | tpcTrack->Pt(), | |
1197 | TMath::Abs(dca3D)); | |
1198 | } | |
1199 | else { | |
1200 | ((TH3F *)(fQA2DList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1201 | tpcTrack->Pt(), | |
3770a478 | 1202 | dca[0]); |
afc2ac17 | 1203 | ((TH3F *)(fQA2DList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1204 | tpcTrack->Pt(), | |
3770a478 | 1205 | dca[1]); |
afc2ac17 | 1206 | ((TH3F *)(fQA2DList->At(18)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1207 | tpcTrack->Pt(), | |
1208 | TMath::Abs(dca3D)); | |
1209 | } | |
1210 | }//protons | |
1211 | else if(tpcTrack->Charge() < 0) { | |
1212 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
1213 | ((TH2F *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(), | |
1214 | tpcTrack->Phi()*180./TMath::Pi()); | |
1215 | if(fProtonAnalysisBase->GetEtaMode()) { | |
1216 | ((TH3F *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(), | |
1217 | tpcTrack->Pt(), | |
3770a478 | 1218 | dca[0]); |
afc2ac17 | 1219 | ((TH3F *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(), |
1220 | tpcTrack->Pt(), | |
3770a478 | 1221 | dca[1]); |
afc2ac17 | 1222 | ((TH3F *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(), |
1223 | tpcTrack->Pt(), | |
1224 | TMath::Abs(dca3D)); | |
1225 | } | |
1226 | else { | |
1227 | ((TH3F *)(fQA2DList->At(16)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), | |
1228 | tpcTrack->Pt(), | |
3770a478 | 1229 | dca[0]); |
afc2ac17 | 1230 | ((TH3F *)(fQA2DList->At(17)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1231 | tpcTrack->Pt(), | |
3770a478 | 1232 | dca[1]); |
afc2ac17 | 1233 | ((TH3F *)(fQA2DList->At(19)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()), |
1234 | tpcTrack->Pt(), | |
1235 | TMath::Abs(dca3D)); | |
1236 | } | |
1237 | }//antiprotons | |
1238 | ||
1239 | //Step: kStepInPhaseSpace | |
1240 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1241 | if(tpcTrack->Charge() > 0) { | |
1242 | nSurvivedProtons += 1; | |
1243 | fHistYPtProtons->Fill(containerInput[0], | |
1244 | containerInput[1]); | |
1245 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1246 | }//protons | |
1247 | else if(tpcTrack->Charge() < 0) { | |
1248 | nSurvivedAntiProtons += 1; | |
1249 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1250 | containerInput[1]); | |
1251 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1252 | }//antiprotons | |
1253 | }//Step: kStepInPhaseSpace | |
1254 | }//Step: kStepSurvived | |
1255 | }//Step: kStepIsPrimary | |
1256 | }//Step: kStepIdentified | |
1257 | }//Full hybrid | |
0ab648ea | 1258 | else if(fProtonAnalysisBase->GetAnalysisMode() == AliProtonAnalysisBase::kGlobal) { |
1259 | gPt = track->Pt(); | |
b8cca027 | 1260 | //gP = track->P(); |
1261 | gP = track->GetInnerParam()->P(); | |
1262 | ||
4de4661f | 1263 | track->PropagateToDCA(vertex, |
1264 | esd->GetMagneticField(), | |
1265 | 100.,dca,cov); | |
71a67ee1 | 1266 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + |
1267 | TMath::Power(dca[1],2)); | |
1268 | ||
4de4661f | 1269 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { |
30f87a5b | 1270 | if(fProtonAnalysisBase->IsAccepted(track)) { |
4de4661f | 1271 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 1272 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
1273 | ((TH3F *)(fQA2DList->At(4)))->Fill(track->Eta(), | |
4de4661f | 1274 | track->Phi()*180./TMath::Pi(), |
1275 | npointsTPCdEdx); | |
ff672838 | 1276 | ((TH3F *)(fQA2DList->At(6)))->Fill(track->Eta(), |
4de4661f | 1277 | track->Phi()*180./TMath::Pi(), |
1278 | nClustersTPC); | |
ff672838 | 1279 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, |
4de4661f | 1280 | track->Phi()*180./TMath::Pi(), |
1281 | npointsTPCdEdx); | |
ff672838 | 1282 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, |
4de4661f | 1283 | track->Phi()*180./TMath::Pi(), |
1284 | nClustersTPC); | |
f0e42d04 | 1285 | if(track->Charge() > 0) |
1286 | ((TH2F *)(fQA2DList->At(20)))->Fill(gP,track->GetTPCsignal()); | |
1287 | if(track->Charge() < 0) | |
1288 | ((TH2F *)(fQA2DList->At(21)))->Fill(gP,track->GetTPCsignal()); | |
e56f08ed | 1289 | }//quality cuts |
1290 | }//primary cuts | |
4de4661f | 1291 | |
1292 | if(fProtonAnalysisBase->IsProton(track)) { | |
1293 | //Step: kStepIdentified | |
1294 | if(fProtonAnalysisBase->GetEtaMode()) | |
1295 | containerInput[0] = track->Eta(); | |
1296 | else | |
1297 | containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(), | |
1298 | track->Py(), | |
1299 | track->Pz()); | |
1300 | containerInput[1] = gPt; | |
1301 | if(track->Charge() > 0) { | |
0ab648ea | 1302 | nIdentifiedProtons += 1; |
4de4661f | 1303 | fProtonContainer->Fill(containerInput,kStepIdentified); |
1304 | }//protons | |
1305 | else if(track->Charge() < 0) { | |
0ab648ea | 1306 | nIdentifiedAntiProtons += 1; |
4de4661f | 1307 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); |
1308 | }//protons | |
1309 | ||
1310 | //Step: kStepIsPrimary | |
1311 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
1312 | if(track->Charge() > 0) | |
1313 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
1314 | else if(track->Charge() < 0) | |
e56f08ed | 1315 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); |
4de4661f | 1316 | |
1317 | FillQA(esd,vertex,track); | |
1318 | ||
1319 | //Step: kStepSurvived | |
30f87a5b | 1320 | if(fProtonAnalysisBase->IsAccepted(track)) { |
e56f08ed | 1321 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 1322 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
1323 | ((TH3F *)(fQA2DList->At(5)))->Fill(track->Eta(), | |
e56f08ed | 1324 | track->Phi()*180./TMath::Pi(), |
1325 | npointsTPCdEdx); | |
ff672838 | 1326 | ((TH3F *)(fQA2DList->At(7)))->Fill(track->Eta(), |
e56f08ed | 1327 | track->Phi()*180./TMath::Pi(), |
1328 | nClustersTPC); | |
ff672838 | 1329 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, |
e56f08ed | 1330 | track->Phi()*180./TMath::Pi(), |
1331 | npointsTPCdEdx); | |
ff672838 | 1332 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, |
e56f08ed | 1333 | track->Phi()*180./TMath::Pi(), |
1334 | nClustersTPC); | |
e56f08ed | 1335 | |
4de4661f | 1336 | if(track->Charge() > 0) { |
1337 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1338 | ((TH2F *)(fQA2DList->At(12)))->Fill(track->Eta(), |
4de4661f | 1339 | track->Phi()*180./TMath::Pi()); |
7deb716b | 1340 | if(fProtonAnalysisBase->GetEtaMode()) { |
1341 | ((TH3F *)(fQA2DList->At(14)))->Fill(track->Eta(), | |
1342 | track->Pt(), | |
3770a478 | 1343 | dca[0]); |
7deb716b | 1344 | ((TH3F *)(fQA2DList->At(15)))->Fill(track->Eta(), |
1345 | track->Pt(), | |
3770a478 | 1346 | dca[1]); |
7deb716b | 1347 | ((TH3F *)(fQA2DList->At(18)))->Fill(track->Eta(), |
1348 | track->Pt(), | |
1349 | TMath::Abs(dca3D)); | |
1350 | ||
1351 | } | |
1352 | else { | |
1353 | ((TH3F *)(fQA2DList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), | |
1354 | track->Pt(), | |
3770a478 | 1355 | dca[0]); |
7deb716b | 1356 | ((TH3F *)(fQA2DList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1357 | track->Pt(), | |
3770a478 | 1358 | dca[1]); |
7deb716b | 1359 | ((TH3F *)(fQA2DList->At(18)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1360 | track->Pt(), | |
1361 | TMath::Abs(dca3D)); | |
1362 | } | |
4de4661f | 1363 | }//protons |
1364 | else if(track->Charge() < 0) { | |
1365 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1366 | ((TH2F *)(fQA2DList->At(13)))->Fill(track->Eta(), |
4de4661f | 1367 | track->Phi()*180./TMath::Pi()); |
7deb716b | 1368 | if(fProtonAnalysisBase->GetEtaMode()) { |
1369 | ((TH3F *)(fQA2DList->At(16)))->Fill(track->Eta(), | |
1370 | track->Pt(), | |
3770a478 | 1371 | dca[0]); |
7deb716b | 1372 | ((TH3F *)(fQA2DList->At(17)))->Fill(track->Eta(), |
1373 | track->Pt(), | |
3770a478 | 1374 | dca[1]); |
7deb716b | 1375 | ((TH3F *)(fQA2DList->At(19)))->Fill(track->Eta(), |
1376 | track->Pt(), | |
1377 | TMath::Abs(dca3D)); | |
1378 | } | |
1379 | else { | |
1380 | ((TH3F *)(fQA2DList->At(16)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), | |
1381 | track->Pt(), | |
3770a478 | 1382 | dca[0]); |
7deb716b | 1383 | ((TH3F *)(fQA2DList->At(17)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1384 | track->Pt(), | |
3770a478 | 1385 | dca[1]); |
7deb716b | 1386 | ((TH3F *)(fQA2DList->At(19)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),track->Py(),track->Pz()), |
1387 | track->Pt(), | |
1388 | TMath::Abs(dca3D)); | |
1389 | } | |
4de4661f | 1390 | }//antiprotons |
1391 | ||
1392 | //Step: kStepInPhaseSpace | |
1393 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1394 | if(track->Charge() > 0) { | |
1395 | nSurvivedProtons += 1; | |
1396 | fHistYPtProtons->Fill(containerInput[0], | |
1397 | containerInput[1]); | |
1398 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1399 | }//protons | |
1400 | else if(track->Charge() < 0) { | |
1401 | nSurvivedAntiProtons += 1; | |
1402 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1403 | containerInput[1]); | |
1404 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1405 | }//antiprotons | |
1406 | }//Step: kStepInPhaseSpace | |
1407 | }//Step: kStepSurvived | |
1408 | }//Step: kStepIsPrimary | |
1409 | }//Step: kStepIdentified | |
1410 | }//Global tracking | |
734d2c12 | 1411 | }//track loop |
0ab648ea | 1412 | |
f203beb9 | 1413 | if((nIdentifiedProtons > 0)||(nIdentifiedAntiProtons > 0)) |
1414 | fHistEvents->Fill(2); //number of analyzed events with at least one (anti)proton | |
1415 | ||
0ab648ea | 1416 | if(fProtonAnalysisBase->GetDebugMode()) |
1417 | Printf("Initial number of tracks: %d | Identified (anti)protons: %d - %d | Survived (anti)protons: %d - %d",nTracks,nIdentifiedProtons,nIdentifiedAntiProtons,nSurvivedProtons,nSurvivedAntiProtons); | |
734d2c12 | 1418 | } |
1419 | ||
ee4ca40d | 1420 | //____________________________________________________________________// |
9cd594db | 1421 | void AliProtonAnalysis::Analyze(AliAODEvent* const fAOD) { |
e4358d7f | 1422 | //Main analysis part - AOD |
f203beb9 | 1423 | fHistEvents->Fill(1); //number of analyzed events |
0ab648ea | 1424 | Int_t nTracks = fAOD->GetNumberOfTracks(); |
1425 | for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) { | |
ee4ca40d | 1426 | AliAODTrack* track = fAOD->GetTrack(iTracks); |
9cd594db | 1427 | Double_t gPt = track->Pt(); |
1428 | Double_t gP = track->P(); | |
ee4ca40d | 1429 | |
1430 | //pid | |
1431 | Double_t probability[10]; | |
1432 | track->GetPID(probability); | |
1433 | Double_t rcc = 0.0; | |
0ab648ea | 1434 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP); |
ee4ca40d | 1435 | if(rcc == 0.0) continue; |
738619fd | 1436 | Double_t w[10]; |
0ab648ea | 1437 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP)/rcc; |
ee4ca40d | 1438 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w); |
1439 | if(fParticleType == 4) { | |
251e4034 | 1440 | if(track->Charge() > 0) |
9cd594db | 1441 | fHistYPtProtons->Fill(track->Y(fParticleType),gPt); |
251e4034 | 1442 | else if(track->Charge() < 0) |
9cd594db | 1443 | fHistYPtAntiProtons->Fill(track->Y(fParticleType),gPt); |
ee4ca40d | 1444 | }//proton check |
1445 | }//track loop | |
1446 | } | |
1447 | ||
e4358d7f | 1448 | //____________________________________________________________________// |
9cd594db | 1449 | void AliProtonAnalysis::Analyze(AliStack* const stack, |
da8c4c1c | 1450 | Bool_t iInclusive) { |
e4358d7f | 1451 | //Main analysis part - MC |
f203beb9 | 1452 | fHistEvents->Fill(1); //number of analyzed events |
3e23254a | 1453 | |
1454 | Int_t nParticles = 0; | |
1455 | //inclusive protons - | |
1456 | if(iInclusive) nParticles = stack->GetNtrack(); | |
1457 | else nParticles = stack->GetNprimary(); | |
1458 | ||
1459 | for(Int_t i = 0; i < nParticles; i++) { | |
e4358d7f | 1460 | TParticle *particle = stack->Particle(i); |
55f9a666 | 1461 | if(!particle) continue; |
537afcc3 | 1462 | |
da8c4c1c | 1463 | //in case of inclusive protons reject the secondaries from hadronic inter. |
1464 | if(particle->GetUniqueID() == 13) continue; | |
1465 | ||
537afcc3 | 1466 | if(TMath::Abs(particle->Eta()) > 1.0) continue; |
1467 | if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue; | |
0ab648ea | 1468 | if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue; |
537afcc3 | 1469 | |
e4358d7f | 1470 | Int_t pdgcode = particle->GetPdgCode(); |
0ab648ea | 1471 | if(pdgcode == 2212) fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(), |
1472 | particle->Py(), | |
1473 | particle->Pz()), | |
e4358d7f | 1474 | particle->Pt()); |
0ab648ea | 1475 | if(pdgcode == -2212) fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(), |
1476 | particle->Py(), | |
1477 | particle->Pz()), | |
e4358d7f | 1478 | particle->Pt()); |
251e4034 | 1479 | }//particle loop |
e4358d7f | 1480 | } |
1481 | ||
3f6d0c08 | 1482 | //____________________________________________________________________// |
1483 | Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) { | |
1484 | //calculates the mean value of the ratio/asymmetry within \pm edge | |
336ea0ff | 1485 | Double_t sum = 0.0, sumError = 0.0; |
3f6d0c08 | 1486 | Int_t nentries = 0; |
1487 | //calculate the mean | |
336ea0ff | 1488 | for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) { |
1489 | Double_t x = hist->GetBinCenter(i); | |
1490 | Double_t y = hist->GetBinContent(i); | |
3f6d0c08 | 1491 | if(TMath::Abs(x) < edge) { |
1492 | sum += y; | |
336ea0ff | 1493 | sumError += TMath::Power(hist->GetBinError(i),2); |
3f6d0c08 | 1494 | nentries += 1; |
1495 | } | |
a3bc43fb | 1496 | //Printf("eta: %lf - sum: %lf - sumError: %lf - counter: %d", |
1497 | //TMath::Abs(x),sum,sumError,nentries); | |
3f6d0c08 | 1498 | } |
1499 | Double_t mean = 0.0; | |
336ea0ff | 1500 | Double_t error = 0.0; |
1501 | if(nentries != 0) { | |
3f6d0c08 | 1502 | mean = sum/nentries; |
336ea0ff | 1503 | error = TMath::Sqrt(sumError)/nentries; |
1504 | } | |
3f6d0c08 | 1505 | |
1506 | //calculate the error | |
336ea0ff | 1507 | /*for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) { |
1508 | Double_t x = hist->GetBinCenter(i); | |
1509 | Double_t y = hist->GetBinContent(i); | |
3f6d0c08 | 1510 | if(TMath::Abs(x) < edge) { |
1511 | sum += TMath::Power((mean - y),2); | |
1512 | nentries += 1; | |
1513 | } | |
336ea0ff | 1514 | }*/ |
3f6d0c08 | 1515 | |
3f6d0c08 | 1516 | |
1517 | cout<<"========================================="<<endl; | |
1518 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
1519 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
1520 | cout<<"Mean value :"<<mean<<endl; | |
1521 | cout<<"Error: "<<error<<endl; | |
1522 | cout<<"========================================="<<endl; | |
1523 | ||
1524 | return 0; | |
1525 | } | |
1526 | ||
1527 | //____________________________________________________________________// | |
1528 | Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) { | |
1529 | //calculates the (anti)proton yields within the \pm edge | |
1530 | Double_t sum = 0.0, sumerror = 0.0; | |
1531 | Double_t error = 0.0; | |
1532 | for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) { | |
1533 | Double_t x = hist->GetBinCenter(i+1); | |
1534 | Double_t y = hist->GetBinContent(i+1); | |
1535 | if(TMath::Abs(x) < edge) { | |
1536 | sum += y; | |
1537 | sumerror += TMath::Power(hist->GetBinError(i+1),2); | |
1538 | } | |
1539 | } | |
1540 | ||
1541 | error = TMath::Sqrt(sumerror); | |
1542 | ||
1543 | cout<<"========================================="<<endl; | |
1544 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
1545 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
1546 | cout<<"Yields :"<<sum<<endl; | |
1547 | cout<<"Error: "<<error<<endl; | |
1548 | cout<<"========================================="<<endl; | |
1549 | ||
1550 | return 0; | |
1551 | } | |
1552 | ||
437dd627 | 1553 | //____________________________________________________________________// |
1554 | void AliProtonAnalysis::SetCorrectionMapForCuts(const char* filename) { | |
1555 | //Reads the file with the correction maps for the cut efficiency | |
1556 | TFile *gCorrectionForCuts = TFile::Open(filename); | |
1557 | if(!gCorrectionForCuts) { | |
1558 | Printf("The TFile object is not valid!!!"); | |
1559 | return; | |
1560 | } | |
1561 | if(!gCorrectionForCuts->IsOpen()) { | |
1562 | Printf("The file is not found!!!"); | |
1563 | return; | |
1564 | } | |
1565 | fHistYPtCorrectionForCutsProtons = dynamic_cast<TH2D *>(gCorrectionForCuts->Get("gHistCorrectionForCutsProtons")); | |
1566 | fHistYPtCorrectionForCutsAntiProtons = dynamic_cast<TH2D *>(gCorrectionForCuts->Get("gHistCorrectionForCutsAntiProtons")); | |
1567 | fCorrectForCutsFlag = kTRUE; | |
1568 | } | |
1569 | ||
1570 | //____________________________________________________________________// | |
1571 | void AliProtonAnalysis::SetCorrectionMapForFeedDown(const char* filename) { | |
1572 | //Reads the file with the correction maps for the feed-down contamination | |
1573 | TFile *gCorrectionForFeedDown = TFile::Open(filename); | |
1574 | if(!gCorrectionForFeedDown) { | |
1575 | Printf("The TFile object is not valid!!!"); | |
1576 | return; | |
1577 | } | |
1578 | if(!gCorrectionForFeedDown->IsOpen()) { | |
1579 | Printf("The file is not found!!!"); | |
1580 | return; | |
1581 | } | |
1582 | fHistYPtCorrectionForFeedDownProtons = dynamic_cast<TH2D *>(gCorrectionForFeedDown->Get("gHistCorrectionForFeedDownProtons")); | |
1583 | fHistYPtCorrectionForFeedDownAntiProtons = dynamic_cast<TH2D *>(gCorrectionForFeedDown->Get("gHistCorrectionForFeedDownAntiProtons")); | |
1584 | fCorrectForFeedDownFlag = kTRUE; | |
1585 | } | |
1586 | ||
2c60f603 | 1587 | //____________________________________________________________________// |
1588 | void AliProtonAnalysis::SetCorrectionMapForSecondaries(const char* filename) { | |
1589 | //Reads the file with the correction maps for the secondaries | |
1590 | TFile *gCorrectionForSecondaries = TFile::Open(filename); | |
1591 | if(!gCorrectionForSecondaries) { | |
1592 | Printf("The TFile object is not valid!!!"); | |
1593 | return; | |
1594 | } | |
1595 | if(!gCorrectionForSecondaries->IsOpen()) { | |
1596 | Printf("The file is not found!!!"); | |
1597 | return; | |
1598 | } | |
1599 | ||
1600 | fHistYPtCorrectionForSecondaries = dynamic_cast<TH2D *>(gCorrectionForSecondaries->Get("gHistCorrectionForSecondaries")); | |
1601 | fCorrectForSecondariesFlag = kTRUE; | |
1602 | } | |
1603 | ||
7deb716b | 1604 | //____________________________________________________________________// |
1605 | void AliProtonAnalysis::SetCorrectionMapForCrossSection(const char* filename) { | |
1606 | //Reads the file with the correction maps for the proper x-section | |
1607 | TFile *gCorrectionForXSection = TFile::Open(filename); | |
1608 | if(!gCorrectionForXSection) { | |
1609 | Printf("The TFile object is not valid!!!"); | |
1610 | return; | |
1611 | } | |
1612 | if(!gCorrectionForXSection->IsOpen()) { | |
1613 | Printf("The file is not found!!!"); | |
1614 | return; | |
1615 | } | |
1616 | ||
1617 | fHistCorrectionForCrossSectionYPtProtons = dynamic_cast<TH2D *>(gCorrectionForXSection->Get("gHistCorrectionForCrossSectionProtons")); | |
1618 | fHistCorrectionForCrossSectionYPtAntiProtons = dynamic_cast<TH2D *>(gCorrectionForXSection->Get("gHistCorrectionForCrossSectionAntiProtons")); | |
1619 | fHistCorrectionForCrossSectionFlag = kTRUE; | |
1620 | } | |
1621 | ||
336ea0ff | 1622 | //____________________________________________________________________// |
1623 | void AliProtonAnalysis::Correct() { | |
a3bc43fb | 1624 | //Apply the corrections: Fast & dirty way for the absorption corrections |
2c60f603 | 1625 | //Correct the protons for the efficiency |
71a67ee1 | 1626 | fHistYPtProtonsCorrected = fProtonContainer->ShowProjection(0,1,kStepInPhaseSpace); |
1627 | fHistYPtProtonsCorrected->Divide(fHistEfficiencyYPtProtons); | |
7deb716b | 1628 | //Correct the protons for proper cross-section |
1629 | if(fHistCorrectionForCrossSectionFlag) | |
2f7be6f2 | 1630 | fHistYPtProtonsCorrected->Multiply(fHistCorrectionForCrossSectionYPtProtons); |
7deb716b | 1631 | //Correct the protons for secondaries |
2c60f603 | 1632 | if(fCorrectForSecondariesFlag) |
1633 | fHistYPtProtonsCorrected->Divide(fHistYPtCorrectionForSecondaries); | |
437dd627 | 1634 | //Correct the protons for feed-down |
1635 | if(fCorrectForFeedDownFlag) | |
1636 | fHistYPtProtonsCorrected->Divide(fHistYPtCorrectionForFeedDownProtons); | |
1637 | //Correct the protons for the cut efficiency | |
1638 | if(fCorrectForCutsFlag) | |
1639 | fHistYPtProtonsCorrected->Multiply(fHistYPtCorrectionForCutsProtons); | |
1640 | ||
2c60f603 | 1641 | //Correct the antiprotons for the efficiency |
71a67ee1 | 1642 | fHistYPtAntiProtonsCorrected = fAntiProtonContainer->ShowProjection(0,1,kStepInPhaseSpace); |
1643 | fHistYPtAntiProtonsCorrected->Divide(fHistEfficiencyYPtAntiProtons); | |
7deb716b | 1644 | //Correct the antiprotons for proper cross-section |
1645 | if(fHistCorrectionForCrossSectionFlag) | |
2f7be6f2 | 1646 | fHistYPtAntiProtonsCorrected->Multiply(fHistCorrectionForCrossSectionYPtAntiProtons); |
437dd627 | 1647 | //Correct the antiprotons for feed-down |
1648 | if(fCorrectForFeedDownFlag) | |
1649 | fHistYPtAntiProtonsCorrected->Divide(fHistYPtCorrectionForFeedDownAntiProtons); | |
1650 | //Correct the antiprotons for the cut efficiency | |
1651 | if(fCorrectForCutsFlag) | |
1652 | fHistYPtAntiProtonsCorrected->Multiply(fHistYPtCorrectionForCutsAntiProtons); | |
336ea0ff | 1653 | } |
1654 | ||
251e4034 | 1655 | //____________________________________________________________________// |
1656 | void AliProtonAnalysis::Correct(Int_t step) { | |
1657 | //Applies the correction maps to the initial containers | |
1658 | fCorrectProtons = new AliCFDataGrid("correctProtons", | |
1659 | "corrected data", | |
1660 | *fProtonContainer); | |
0ab648ea | 1661 | fCorrectProtons->SetMeasured(0); |
251e4034 | 1662 | fCorrectProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListProtons->At(step)); |
1663 | ||
1664 | fCorrectAntiProtons = new AliCFDataGrid("correctAntiProtons", | |
1665 | "corrected data", | |
1666 | *fAntiProtonContainer); | |
0ab648ea | 1667 | fCorrectAntiProtons->SetMeasured(0); |
251e4034 | 1668 | fCorrectAntiProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListAntiProtons->At(step)); |
1669 | } | |
1670 | ||
39f2a708 | 1671 | //____________________________________________________________________// |
1672 | Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
1673 | // Reads the outout of the correction framework task | |
1674 | // Creates the correction maps | |
1675 | // Puts the results in the different TList objects | |
1676 | Bool_t status = kTRUE; | |
1677 | ||
336ea0ff | 1678 | TFile *file = TFile::Open(filename); |
1679 | if(!file) { | |
1680 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
1681 | status = kFALSE; | |
1682 | } | |
1683 | TList *list = dynamic_cast<TList *>(file->Get("outputList")); | |
1684 | Int_t iRap = 0, iPt = 1; | |
1685 | ||
1686 | //Calculation of efficiency/correction: Protons | |
1687 | AliCFContainer *gProtonContainer = dynamic_cast<AliCFContainer *>(list->At(0)); | |
1688 | AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1689 | "effProtonsStep0Step2", | |
1690 | *gProtonContainer); | |
1691 | effProtonsStep0Step2->CalculateEfficiency(2,0); | |
1692 | fHistEfficiencyYPtProtons = effProtonsStep0Step2->Project(iRap,iPt); | |
1693 | fHistEfficiencyYPtProtons->Sumw2(); | |
1694 | ||
1695 | //Calculation of efficiency/correction: Protons | |
1696 | AliCFContainer *gAntiProtonContainer = dynamic_cast<AliCFContainer *>(list->At(1)); | |
1697 | AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1698 | "effAntiProtonsStep0Step2", | |
1699 | *gAntiProtonContainer); | |
1700 | effAntiProtonsStep0Step2->CalculateEfficiency(2,0); | |
1701 | fHistEfficiencyYPtAntiProtons = effAntiProtonsStep0Step2->Project(iRap,iPt); | |
1702 | fHistEfficiencyYPtAntiProtons->Sumw2(); | |
1703 | ||
1704 | Correct(); | |
1705 | ||
1706 | return status; | |
1707 | } | |
1708 | ||
1709 | //____________________________________________________________________// | |
1710 | /*Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
1711 | // Reads the outout of the correction framework task | |
1712 | // Creates the correction maps | |
1713 | // Puts the results in the different TList objects | |
1714 | Bool_t status = kTRUE; | |
1715 | ||
39f2a708 | 1716 | TFile *file = TFile::Open(filename); |
1717 | if(!file) { | |
1718 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
1719 | status = kFALSE; | |
1720 | } | |
1721 | ||
cdb3530f | 1722 | //________________________________________// |
1723 | //Protons | |
251e4034 | 1724 | fEffGridListProtons = new TList(); |
cdb3530f | 1725 | fCorrectionListProtons2D = new TList(); |
1726 | fEfficiencyListProtons1D = new TList(); | |
1727 | fCorrectionListProtons1D = new TList(); | |
1728 | ||
1729 | AliCFContainer *corrfwContainerProtons = (AliCFContainer*) (file->Get("containerProtons")); | |
1730 | if(!corrfwContainerProtons) { | |
1731 | cout<<"CORRFW container for protons not found!"<<endl; | |
39f2a708 | 1732 | status = kFALSE; |
1733 | } | |
1734 | ||
cdb3530f | 1735 | Int_t nSteps = corrfwContainerProtons->GetNStep(); |
39f2a708 | 1736 | TH2D *gYPt[4]; |
1737 | //currently the GRID is formed by the y-pT parameters | |
1738 | //Add Vz as a next step | |
1739 | Int_t iRap = 0, iPt = 1; | |
9b168f47 | 1740 | AliCFEffGrid *effProtonsStep0Step1 = new AliCFEffGrid("eff10", |
1741 | "effProtonsStep0Step1", | |
1742 | *corrfwContainerProtons); | |
1743 | effProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0 | |
251e4034 | 1744 | fEffGridListProtons->Add(effProtonsStep0Step1); |
9b168f47 | 1745 | gYPt[0] = effProtonsStep0Step1->Project(iRap,iPt); |
1746 | fCorrectionListProtons2D->Add(gYPt[0]); | |
1747 | ||
1748 | AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1749 | "effProtonsStep0Step2", | |
1750 | *corrfwContainerProtons); | |
1751 | effProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0 | |
251e4034 | 1752 | fEffGridListProtons->Add(effProtonsStep0Step2); |
9b168f47 | 1753 | gYPt[1] = effProtonsStep0Step2->Project(iRap,iPt); |
1754 | fCorrectionListProtons2D->Add(gYPt[1]); | |
1755 | ||
1756 | AliCFEffGrid *effProtonsStep0Step3 = new AliCFEffGrid("eff30", | |
1757 | "effProtonsStep0Step3", | |
1758 | *corrfwContainerProtons); | |
1759 | effProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0 | |
251e4034 | 1760 | fEffGridListProtons->Add(effProtonsStep0Step3); |
9b168f47 | 1761 | gYPt[2] = effProtonsStep0Step3->Project(iRap,iPt); |
1762 | fCorrectionListProtons2D->Add(gYPt[2]); | |
1763 | ||
1764 | TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws-[2]) | |
1765 | TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws-[2]) | |
9b4aee57 | 1766 | TString gTitle; |
cdb3530f | 1767 | //Get the projection of the efficiency maps |
9b168f47 | 1768 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { |
1769 | gEfficiency[iParameter][0] = effProtonsStep0Step1->Project(iParameter); | |
1770 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1771 | gTitle += "_Step0_Step1"; | |
1772 | gEfficiency[iParameter][0]->SetName(gTitle.Data()); | |
1773 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][0]); | |
1774 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1775 | gTitle += "_Step0_Step1"; | |
1776 | gCorrection[iParameter][0] = new TH1D(gTitle.Data(), | |
1777 | gTitle.Data(), | |
1778 | gEfficiency[iParameter][0]->GetNbinsX(), | |
1779 | gEfficiency[iParameter][0]->GetXaxis()->GetXmin(), | |
1780 | gEfficiency[iParameter][0]->GetXaxis()->GetXmax()); | |
1781 | //initialisation of the correction | |
1782 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++) | |
1783 | gCorrection[iParameter][0]->SetBinContent(iBin,1.0); | |
1784 | ||
1785 | gEfficiency[iParameter][1] = effProtonsStep0Step2->Project(iParameter); | |
1786 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1787 | gTitle += "_Step0_Step2"; | |
1788 | gEfficiency[iParameter][1]->SetName(gTitle.Data()); | |
1789 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][1]); | |
1790 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1791 | gTitle += "_Step0_Step2"; | |
1792 | gCorrection[iParameter][1] = new TH1D(gTitle.Data(), | |
1793 | gTitle.Data(), | |
1794 | gEfficiency[iParameter][1]->GetNbinsX(), | |
1795 | gEfficiency[iParameter][1]->GetXaxis()->GetXmin(), | |
1796 | gEfficiency[iParameter][1]->GetXaxis()->GetXmax()); | |
1797 | //initialisation of the correction | |
1798 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++) | |
1799 | gCorrection[iParameter][1]->SetBinContent(iBin,1.0); | |
1800 | ||
1801 | gEfficiency[iParameter][2] = effProtonsStep0Step3->Project(iParameter); | |
1802 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1803 | gTitle += "_Step0_Step3"; | |
1804 | gEfficiency[iParameter][2]->SetName(gTitle.Data()); | |
1805 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][2]); | |
1806 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1807 | gTitle += "_Step0_Step3"; | |
1808 | gCorrection[iParameter][2] = new TH1D(gTitle.Data(), | |
1809 | gTitle.Data(), | |
1810 | gEfficiency[iParameter][2]->GetNbinsX(), | |
1811 | gEfficiency[iParameter][2]->GetXaxis()->GetXmin(), | |
1812 | gEfficiency[iParameter][2]->GetXaxis()->GetXmax()); | |
1813 | //initialisation of the correction | |
1814 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++) | |
1815 | gCorrection[iParameter][2]->SetBinContent(iBin,1.0); | |
cdb3530f | 1816 | }//parameter loop |
1817 | //Calculate the 1D correction parameters as a function of y and pT | |
1818 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
1819 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
1820 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
1821 | fCorrectionListProtons1D->Add(gCorrection[iParameter][iStep-1]); | |
1822 | } | |
1823 | } | |
1824 | ||
1825 | //________________________________________// | |
1826 | //AntiProtons | |
251e4034 | 1827 | fEffGridListAntiProtons = new TList(); |
cdb3530f | 1828 | fCorrectionListAntiProtons2D = new TList(); |
1829 | fEfficiencyListAntiProtons1D = new TList(); | |
1830 | fCorrectionListAntiProtons1D = new TList(); | |
1831 | ||
1832 | AliCFContainer *corrfwContainerAntiProtons = (AliCFContainer*) (file->Get("containerAntiProtons")); | |
1833 | if(!corrfwContainerAntiProtons) { | |
1834 | cout<<"CORRFW container for antiprotons not found!"<<endl; | |
1835 | status = kFALSE; | |
1836 | } | |
1837 | ||
1838 | nSteps = corrfwContainerAntiProtons->GetNStep(); | |
1839 | //currently the GRID is formed by the y-pT parameters | |
1840 | //Add Vz as a next step | |
9b168f47 | 1841 | AliCFEffGrid *effAntiProtonsStep0Step1 = new AliCFEffGrid("eff10", |
1842 | "effAntiProtonsStep0Step1", | |
1843 | *corrfwContainerAntiProtons); | |
1844 | effAntiProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0 | |
251e4034 | 1845 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step1); |
9b168f47 | 1846 | gYPt[0] = effAntiProtonsStep0Step1->Project(iRap,iPt); |
1847 | fCorrectionListAntiProtons2D->Add(gYPt[0]); | |
1848 | ||
1849 | AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1850 | "effAntiProtonsStep0Step2", | |
1851 | *corrfwContainerAntiProtons); | |
1852 | effAntiProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0 | |
251e4034 | 1853 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step2); |
9b168f47 | 1854 | gYPt[1] = effAntiProtonsStep0Step2->Project(iRap,iPt); |
1855 | fCorrectionListAntiProtons2D->Add(gYPt[1]); | |
1856 | ||
1857 | AliCFEffGrid *effAntiProtonsStep0Step3 = new AliCFEffGrid("eff30", | |
1858 | "effAntiProtonsStep0Step3", | |
1859 | *corrfwContainerAntiProtons); | |
1860 | effAntiProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0 | |
251e4034 | 1861 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step3); |
9b168f47 | 1862 | gYPt[2] = effAntiProtonsStep0Step3->Project(iRap,iPt); |
1863 | fCorrectionListAntiProtons2D->Add(gYPt[2]); | |
cdb3530f | 1864 | |
39f2a708 | 1865 | //Get the projection of the efficiency maps |
9b168f47 | 1866 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { |
1867 | gEfficiency[iParameter][0] = effAntiProtonsStep0Step1->Project(iParameter); | |
1868 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1869 | gTitle += "_Step0_Step1"; | |
1870 | gEfficiency[iParameter][0]->SetName(gTitle.Data()); | |
1871 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][0]); | |
1872 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1873 | gTitle += "_Step0_Step1"; | |
1874 | gCorrection[iParameter][0] = new TH1D(gTitle.Data(), | |
1875 | gTitle.Data(), | |
1876 | gEfficiency[iParameter][0]->GetNbinsX(), | |
1877 | gEfficiency[iParameter][0]->GetXaxis()->GetXmin(), | |
1878 | gEfficiency[iParameter][0]->GetXaxis()->GetXmax()); | |
1879 | //initialisation of the correction | |
1880 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++) | |
1881 | gCorrection[iParameter][0]->SetBinContent(iBin,1.0); | |
1882 | ||
1883 | gEfficiency[iParameter][1] = effAntiProtonsStep0Step2->Project(iParameter); | |
1884 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1885 | gTitle += "_Step0_Step2"; | |
1886 | gEfficiency[iParameter][1]->SetName(gTitle.Data()); | |
1887 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][1]); | |
1888 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1889 | gTitle += "_Step0_Step2"; | |
1890 | gCorrection[iParameter][1] = new TH1D(gTitle.Data(), | |
1891 | gTitle.Data(), | |
1892 | gEfficiency[iParameter][1]->GetNbinsX(), | |
1893 | gEfficiency[iParameter][1]->GetXaxis()->GetXmin(), | |
1894 | gEfficiency[iParameter][1]->GetXaxis()->GetXmax()); | |
1895 | //initialisation of the correction | |
1896 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++) | |
1897 | gCorrection[iParameter][1]->SetBinContent(iBin,1.0); | |
1898 | ||
1899 | gEfficiency[iParameter][2] = effAntiProtonsStep0Step3->Project(iParameter); | |
1900 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1901 | gTitle += "_Step0_Step3"; | |
1902 | gEfficiency[iParameter][2]->SetName(gTitle.Data()); | |
1903 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][2]); | |
1904 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1905 | gTitle += "_Step0_Step3"; | |
1906 | gCorrection[iParameter][2] = new TH1D(gTitle.Data(), | |
1907 | gTitle.Data(), | |
1908 | gEfficiency[iParameter][2]->GetNbinsX(), | |
1909 | gEfficiency[iParameter][2]->GetXaxis()->GetXmin(), | |
1910 | gEfficiency[iParameter][2]->GetXaxis()->GetXmax()); | |
1911 | //initialisation of the correction | |
1912 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++) | |
1913 | gCorrection[iParameter][2]->SetBinContent(iBin,1.0); | |
39f2a708 | 1914 | }//parameter loop |
1915 | //Calculate the 1D correction parameters as a function of y and pT | |
1916 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
1917 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
1918 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
cdb3530f | 1919 | fCorrectionListAntiProtons1D->Add(gCorrection[iParameter][iStep-1]); |
39f2a708 | 1920 | } |
1921 | } | |
ef1a8dbd | 1922 | |
1923 | return status; | |
336ea0ff | 1924 | }*/ |
24421eb6 | 1925 | |
735cc63d | 1926 | //____________________________________________________________________// |
1927 | void AliProtonAnalysis::InitQA() { | |
1928 | //Applies the correction maps to the initial containers | |
1929 | fInitQAFlag = kTRUE; | |
1930 | fGlobalQAList = new TList(); | |
1931 | fGlobalQAList->SetName("fGlobalQAList"); | |
1932 | ||
1933 | //========================================================// | |
1934 | fQA2DList = new TList(); | |
1935 | fQA2DList->SetName("fQA2DList"); | |
1936 | fGlobalQAList->Add(fQA2DList); | |
37cb8683 | 1937 | |
790140ac | 1938 | //dEdx plots |
37cb8683 | 1939 | TH2F *gHistdEdxP = new TH2F("gHistdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
790140ac | 1940 | fQA2DList->Add(gHistdEdxP); |
37cb8683 | 1941 | TH2F *gHistProtonsdEdxP = new TH2F("gHistProtonsdEdxP","Accepted protons dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
790140ac | 1942 | fQA2DList->Add(gHistProtonsdEdxP); |
37cb8683 | 1943 | |
ff672838 | 1944 | //normalized dEdx plots |
1945 | TH2F *gHistZP = new TH2F("gHistZP","Normalized dE/dx (TPC); P [GeV/c]; ln[(dE/dx)_{exp.}/(dE/dx)_{BB}] ",1000,0.05,20.05,100,-2.0,2.0); | |
1946 | fQA2DList->Add(gHistZP); | |
1947 | TH2F *gHistProtonsZP = new TH2F("gHistProtonsZP","Normalized dE/dx (TPC); P [GeV/c]; ln[(dE/dx)_{exp.}/(dE/dx)_{BB}] ",1000,0.05,20.05,100,-2.0,2.0); | |
1948 | fQA2DList->Add(gHistProtonsZP); | |
1949 | ||
37cb8683 | 1950 | //eta-phi-Npoints(dEdx) |
1951 | TH3F *gHistEtaPhiTPCdEdxNPoints = new TH3F("gHistEtaPhiTPCdEdxNPoints", | |
1952 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1953 | 18,-0.9,0.9, |
1954 | 180,0,360, | |
37cb8683 | 1955 | 100,0,200); |
1956 | gHistEtaPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1957 | fQA2DList->Add(gHistEtaPhiTPCdEdxNPoints); | |
1958 | TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = new TH3F("gHistProtonsEtaPhiTPCdEdxNPoints", | |
1959 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1960 | 18,-0.9,0.9, |
1961 | 180,0,360, | |
37cb8683 | 1962 | 100,0,200); |
1963 | gHistProtonsEtaPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1964 | fQA2DList->Add(gHistProtonsEtaPhiTPCdEdxNPoints); | |
1965 | ||
1966 | //eta-phi-Npoints | |
1967 | TH3F *gHistEtaPhiTPCNPoints = new TH3F("gHistEtaPhiTPCNPoints", | |
1968 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1969 | 18,-0.9,0.9, |
1970 | 180,0,360, | |
37cb8683 | 1971 | 100,0,200); |
1972 | gHistEtaPhiTPCNPoints->SetStats(kTRUE); | |
1973 | fQA2DList->Add(gHistEtaPhiTPCNPoints); | |
1974 | TH3F *gHistProtonsEtaPhiTPCNPoints = new TH3F("gHistProtonsEtaPhiTPCNPoints", | |
1975 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1976 | 18,-0.9,0.9, |
1977 | 180,0,360, | |
37cb8683 | 1978 | 100,0,200); |
1979 | gHistProtonsEtaPhiTPCNPoints->SetStats(kTRUE); | |
1980 | fQA2DList->Add(gHistProtonsEtaPhiTPCNPoints); | |
1981 | ||
1982 | //pt-phi-Npoints(dEdx) | |
1983 | TH3F *gHistPtPhiTPCdEdxNPoints = new TH3F("gHistPtPhiTPCdEdxNPoints", | |
1984 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
1985 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 1986 | 180,0,360, |
37cb8683 | 1987 | 100,0,200); |
1988 | gHistPtPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1989 | fQA2DList->Add(gHistPtPhiTPCdEdxNPoints); | |
1990 | TH3F *gHistProtonsPtPhiTPCdEdxNPoints = new TH3F("gHistProtonsPtPhiTPCdEdxNPoints", | |
1991 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
1992 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 1993 | 180,0,360, |
37cb8683 | 1994 | 100,0,200); |
1995 | gHistProtonsPtPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1996 | fQA2DList->Add(gHistProtonsPtPhiTPCdEdxNPoints); | |
1997 | ||
1998 | //pt-phi-Npoints | |
1999 | TH3F *gHistPtPhiTPCNPoints = new TH3F("gHistPtPhiTPCNPoints", | |
2000 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
2001 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 2002 | 180,0,360, |
37cb8683 | 2003 | 100,0,200); |
2004 | gHistPtPhiTPCNPoints->SetStats(kTRUE); | |
2005 | fQA2DList->Add(gHistPtPhiTPCNPoints); | |
2006 | TH3F *gHistProtonsPtPhiTPCNPoints = new TH3F("gHistProtonsPtPhiTPCNPoints", | |
2007 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
2008 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 2009 | 180,0,360, |
37cb8683 | 2010 | 100,0,200); |
2011 | gHistProtonsPtPhiTPCNPoints->SetStats(kTRUE); | |
2012 | fQA2DList->Add(gHistProtonsPtPhiTPCNPoints); | |
2013 | ||
e56f08ed | 2014 | //eta-phi for protons & antiprotons |
2015 | TH2F *gHistProtonsEtaPhi = new TH2F("gHistProtonsEtaPhi", | |
2016 | ";#eta;#phi", | |
2017 | 18,-0.9,0.9, | |
2018 | 180,0,360); | |
2019 | gHistProtonsEtaPhi->SetStats(kTRUE); | |
2020 | fQA2DList->Add(gHistProtonsEtaPhi); | |
2021 | TH2F *gHistAntiProtonsEtaPhi = new TH2F("gHistAntiProtonsEtaPhi", | |
2022 | ";#eta;#phi", | |
2023 | 18,-0.9,0.9, | |
2024 | 180,0,360); | |
2025 | gHistAntiProtonsEtaPhi->SetStats(kTRUE); | |
2026 | fQA2DList->Add(gHistAntiProtonsEtaPhi); | |
2027 | ||
f0e42d04 | 2028 | const Int_t nBinsdca = 1000; |
437dd627 | 2029 | Double_t dcaBins[nBinsdca+1]; |
f0e42d04 | 2030 | Double_t dcamin = -5., dcamax = 5.; |
2031 | Double_t dca = -5.; | |
437dd627 | 2032 | Double_t dcaStepSmall = 0.01; |
2033 | Int_t iCounter = 0; | |
f0e42d04 | 2034 | while(dca <= 5.) { |
437dd627 | 2035 | dcaBins[iCounter] = dcamin; |
2036 | dcamax = dcamin + dcaStepSmall; | |
2037 | dca = dcamax; | |
2038 | dcamin = dcamax; | |
2039 | iCounter += 1; | |
2040 | } | |
f0e42d04 | 2041 | |
437dd627 | 2042 | const Int_t nBinsY = 9; |
2043 | const Int_t nBinsPt = 6; | |
2044 | Double_t gY[nBinsY+1] = {-0.9,-0.7,-0.5,-0.3,-0.1,0.1,0.3,0.5,0.7,0.9}; | |
2045 | Double_t gPt[nBinsPt+1] = {0.45,0.55,0.65,0.75,0.85,0.95,1.05}; | |
2046 | ||
4de4661f | 2047 | //dca vs pT for protons & antiprotons |
3322c804 | 2048 | TH3F *gHistProtonsDCAxyEtaPt = new TH3F("gHistProtonsDCAxyEtaPt", |
2049 | ";P_{T} [GeV/c];dca_{xy} [cm]", | |
437dd627 | 2050 | nBinsY,gY,nBinsPt,gPt, |
2051 | nBinsdca,dcaBins); | |
3322c804 | 2052 | if(fProtonAnalysisBase->GetEtaMode()) |
2053 | gHistProtonsDCAxyEtaPt->GetXaxis()->SetTitle("#eta"); | |
2054 | else | |
2055 | gHistProtonsDCAxyEtaPt->GetXaxis()->SetTitle("y"); | |
2056 | gHistProtonsDCAxyEtaPt->SetStats(kTRUE); | |
2057 | fQA2DList->Add(gHistProtonsDCAxyEtaPt); | |
2058 | TH3F *gHistProtonsDCAzEtaPt = new TH3F("gHistProtonsDCAzEtaPt", | |
2059 | ";P_{T} [GeV/c];dca_{z} [cm]", | |
437dd627 | 2060 | nBinsY,gY,nBinsPt,gPt, |
2061 | nBinsdca,dcaBins); | |
3322c804 | 2062 | if(fProtonAnalysisBase->GetEtaMode()) |
2063 | gHistProtonsDCAzEtaPt->GetXaxis()->SetTitle("#eta"); | |
2064 | else | |
2065 | gHistProtonsDCAzEtaPt->GetXaxis()->SetTitle("y"); | |
2066 | gHistProtonsDCAzEtaPt->SetStats(kTRUE); | |
2067 | fQA2DList->Add(gHistProtonsDCAzEtaPt); | |
2068 | TH3F *gHistAntiProtonsDCAxyEtaPt = new TH3F("gHistAntiProtonsDCAxyEtaPt", | |
2069 | ";P_{T} [GeV/c];dca_{xy} [cm]", | |
437dd627 | 2070 | nBinsY,gY,nBinsPt,gPt, |
2071 | nBinsdca,dcaBins); | |
3322c804 | 2072 | if(fProtonAnalysisBase->GetEtaMode()) |
2073 | gHistAntiProtonsDCAxyEtaPt->GetXaxis()->SetTitle("#eta"); | |
2074 | else | |
2075 | gHistAntiProtonsDCAxyEtaPt->GetXaxis()->SetTitle("y"); | |
2076 | gHistAntiProtonsDCAxyEtaPt->SetStats(kTRUE); | |
2077 | fQA2DList->Add(gHistAntiProtonsDCAxyEtaPt); | |
2078 | TH3F *gHistAntiProtonsDCAzEtaPt = new TH3F("gHistAntiProtonsDCAzEtaPt", | |
2079 | ";P_{T} [GeV/c];dca_{z} [cm]", | |
437dd627 | 2080 | nBinsY,gY,nBinsPt,gPt, |
2081 | nBinsdca,dcaBins); | |
3322c804 | 2082 | if(fProtonAnalysisBase->GetEtaMode()) |
2083 | gHistAntiProtonsDCAzEtaPt->GetXaxis()->SetTitle("#eta"); | |
2084 | else | |
2085 | gHistAntiProtonsDCAzEtaPt->GetXaxis()->SetTitle("y"); | |
2086 | gHistAntiProtonsDCAzEtaPt->SetStats(kTRUE); | |
2087 | fQA2DList->Add(gHistAntiProtonsDCAzEtaPt); | |
4de4661f | 2088 | |
71a67ee1 | 2089 | TH3F *gHistProtonsDCA3DEtaPt = new TH3F("gHistProtonsDCA3DEtaPt", |
2090 | ";P_{T} [GeV/c];dca [cm]", | |
2091 | fNBinsY,fMinY,fMaxY, | |
2092 | fNBinsPt,fMinPt,fMaxPt, | |
2093 | 100,0,20); | |
2094 | if(fProtonAnalysisBase->GetEtaMode()) | |
2095 | gHistProtonsDCA3DEtaPt->GetXaxis()->SetTitle("#eta"); | |
2096 | else | |
2097 | gHistProtonsDCA3DEtaPt->GetXaxis()->SetTitle("y"); | |
2098 | gHistProtonsDCA3DEtaPt->SetStats(kTRUE); | |
2099 | fQA2DList->Add(gHistProtonsDCA3DEtaPt); | |
2100 | TH3F *gHistAntiProtonsDCA3DEtaPt = new TH3F("gHistAntiProtonsDCA3DEtaPt", | |
2101 | ";P_{T} [GeV/c];dca [cm]", | |
2102 | fNBinsY,fMinY,fMaxY, | |
2103 | fNBinsPt,fMinPt,fMaxPt, | |
2104 | 100,0,20); | |
2105 | if(fProtonAnalysisBase->GetEtaMode()) | |
2106 | gHistAntiProtonsDCA3DEtaPt->GetXaxis()->SetTitle("#eta"); | |
2107 | else | |
2108 | gHistAntiProtonsDCA3DEtaPt->GetXaxis()->SetTitle("y"); | |
2109 | gHistAntiProtonsDCA3DEtaPt->SetStats(kTRUE); | |
2110 | fQA2DList->Add(gHistAntiProtonsDCA3DEtaPt); | |
2111 | ||
f0e42d04 | 2112 | TH2F *gHistPosdEdxP = new TH2F("gHistPosdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
2113 | fQA2DList->Add(gHistPosdEdxP); | |
2114 | TH2F *gHistNegdEdxP = new TH2F("gHistNegdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); | |
2115 | fQA2DList->Add(gHistNegdEdxP); | |
2116 | ||
735cc63d | 2117 | //========================================================// |
2118 | fQAProtonsAcceptedList = new TList(); | |
2119 | fQAProtonsAcceptedList->SetName("fQAProtonsAcceptedList"); | |
2120 | fGlobalQAList->Add(fQAProtonsAcceptedList); | |
2121 | //Accepted protons | |
2122 | TH1F *gProtonsITSClustersPass = new TH1F("gProtonsITSClustersPass", | |
2123 | ";N_{clusters} (ITS);Entries", | |
2124 | 7,0,7); | |
2125 | fQAProtonsAcceptedList->Add(gProtonsITSClustersPass); | |
2126 | TH1F *gProtonsChi2PerClusterITSPass = new TH1F("gProtonsChi2PerClusterITSPass", | |
2127 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2128 | 100,0,4); | |
2129 | fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterITSPass); | |
2130 | TH1F *gProtonsTPCClustersPass = new TH1F("gProtonsTPCClustersPass", | |
2131 | ";N_{clusters} (TPC);Entries", | |
2132 | 100,0,200); | |
2133 | fQAProtonsAcceptedList->Add(gProtonsTPCClustersPass); | |
2134 | TH1F *gProtonsChi2PerClusterTPCPass = new TH1F("gProtonsChi2PerClusterTPCPass", | |
2135 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2136 | 100,0,4); | |
2137 | fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterTPCPass); | |
2138 | TH1F *gProtonsExtCov11Pass = new TH1F("gProtonsExtCov11Pass", | |
2139 | ";#sigma_{y} [cm];Entries", | |
2140 | 100,0,4); | |
2141 | fQAProtonsAcceptedList->Add(gProtonsExtCov11Pass); | |
2142 | TH1F *gProtonsExtCov22Pass = new TH1F("gProtonsExtCov22Pass", | |
2143 | ";#sigma_{z} [cm];Entries", | |
2144 | 100,0,4); | |
2145 | fQAProtonsAcceptedList->Add(gProtonsExtCov22Pass); | |
2146 | TH1F *gProtonsExtCov33Pass = new TH1F("gProtonsExtCov33Pass", | |
2147 | ";#sigma_{sin(#phi)};Entries", | |
2148 | 100,0,4); | |
2149 | fQAProtonsAcceptedList->Add(gProtonsExtCov33Pass); | |
2150 | TH1F *gProtonsExtCov44Pass = new TH1F("gProtonsExtCov44Pass", | |
2151 | ";#sigma_{tan(#lambda)};Entries", | |
2152 | 100,0,4); | |
2153 | fQAProtonsAcceptedList->Add(gProtonsExtCov44Pass); | |
2154 | TH1F *gProtonsExtCov55Pass = new TH1F("gProtonsExtCov55Pass", | |
2155 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2156 | 100,0,4); | |
2157 | fQAProtonsAcceptedList->Add(gProtonsExtCov55Pass); | |
2158 | TH1F *gProtonsSigmaToVertexPass = new TH1F("gProtonsSigmaToVertexPass", | |
2159 | ";#sigma_{Vertex};Entries", | |
3770a478 | 2160 | 100,0.,10.); |
735cc63d | 2161 | fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexPass); |
2162 | TH1F *gProtonsSigmaToVertexTPCPass = new TH1F("gProtonsSigmaToVertexTPCPass", | |
2163 | ";#sigma_{Vertex};Entries", | |
3770a478 | 2164 | 100,0.,10.); |
735cc63d | 2165 | fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexTPCPass); |
2166 | TH1F *gProtonsDCAXYPass = new TH1F("gProtonsDCAXYPass", | |
2167 | ";DCA_{xy} [cm];Entries", | |
2168 | 100,0,20); | |
2169 | fQAProtonsAcceptedList->Add(gProtonsDCAXYPass); | |
2170 | TH1F *gProtonsDCAXYTPCPass = new TH1F("gProtonsDCAXYTPCPass", | |
2171 | ";DCA_{xy} [cm];Entries", | |
2172 | 100,0,20); | |
2173 | fQAProtonsAcceptedList->Add(gProtonsDCAXYTPCPass); | |
2174 | TH1F *gProtonsDCAZPass = new TH1F("gProtonsDCAZPass", | |
2175 | ";DCA_{z} [cm];Entries", | |
2176 | 100,0,20); | |
2177 | fQAProtonsAcceptedList->Add(gProtonsDCAZPass); | |
2178 | TH1F *gProtonsDCAZTPCPass = new TH1F("gProtonsDCAZTPCPass", | |
2179 | ";DCA_{z} [cm];Entries", | |
2180 | 100,0,20); | |
2181 | fQAProtonsAcceptedList->Add(gProtonsDCAZTPCPass); | |
2182 | TH1F *gProtonsConstrainChi2Pass = new TH1F("gProtonsConstrainChi2Pass", | |
2183 | ";Log_{10}(#chi^{2});Entries", | |
2184 | 100,-10,10); | |
2185 | fQAProtonsAcceptedList->Add(gProtonsConstrainChi2Pass); | |
2186 | TH1F *gProtonsITSRefitPass = new TH1F("gProtonsITSRefitPass", | |
2187 | "",10,-1,1); | |
2188 | fQAProtonsAcceptedList->Add(gProtonsITSRefitPass); | |
2189 | TH1F *gProtonsTPCRefitPass = new TH1F("gProtonsTPCRefitPass", | |
2190 | "",10,-1,1); | |
2191 | fQAProtonsAcceptedList->Add(gProtonsTPCRefitPass); | |
2192 | TH1F *gProtonsESDpidPass = new TH1F("gProtonsESDpidPass", | |
2193 | "",10,-1,1); | |
2194 | fQAProtonsAcceptedList->Add(gProtonsESDpidPass); | |
2195 | TH1F *gProtonsTPCpidPass = new TH1F("gProtonsTPCpidPass", | |
2196 | "",10,-1,1); | |
2197 | fQAProtonsAcceptedList->Add(gProtonsTPCpidPass); | |
2198 | TH1F *gProtonsPointOnITSLayer1Pass = new TH1F("gProtonsPointOnITSLayer1Pass", | |
2199 | "",10,-1,1); | |
2200 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer1Pass); | |
2201 | TH1F *gProtonsPointOnITSLayer2Pass = new TH1F("gProtonsPointOnITSLayer2Pass", | |
2202 | "",10,-1,1); | |
2203 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer2Pass); | |
2204 | TH1F *gProtonsPointOnITSLayer3Pass = new TH1F("gProtonsPointOnITSLayer3Pass", | |
2205 | "",10,-1,1); | |
2206 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer3Pass); | |
2207 | TH1F *gProtonsPointOnITSLayer4Pass = new TH1F("gProtonsPointOnITSLayer4Pass", | |
2208 | "",10,-1,1); | |
2209 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer4Pass); | |
2210 | TH1F *gProtonsPointOnITSLayer5Pass = new TH1F("gProtonsPointOnITSLayer5Pass", | |
2211 | "",10,-1,1); | |
2212 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer5Pass); | |
2213 | TH1F *gProtonsPointOnITSLayer6Pass = new TH1F("gProtonsPointOnITSLayer6Pass", | |
2214 | "",10,-1,1); | |
2215 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer6Pass); | |
2216 | TH1F *gProtonsNumberOfTPCdEdxPointsPass = new TH1F("gProtonsNumberOfTPCdEdxPointsPass","",100,0,200); | |
2217 | fQAProtonsAcceptedList->Add(gProtonsNumberOfTPCdEdxPointsPass); | |
71a67ee1 | 2218 | TH1F *gProtonsITSClusterMapPass = new TH1F("gProtonsITSClusterMapPass",";ITS Layer;Entries",6,0.5,6.5); |
2219 | fQAProtonsAcceptedList->Add(gProtonsITSClusterMapPass); | |
2220 | TH1F *gProtonsDCA3DPass = new TH1F("gProtonsDCA3DPass", | |
2221 | ";dca [cm];Entries", | |
2222 | 100,0,20); | |
2223 | fQAProtonsAcceptedList->Add(gProtonsDCA3DPass); | |
735cc63d | 2224 | |
2225 | //========================================================// | |
2226 | fQAProtonsRejectedList = new TList(); | |
2227 | fQAProtonsRejectedList->SetName("fQAProtonsRejectedList"); | |
2228 | fGlobalQAList->Add(fQAProtonsRejectedList); | |
2229 | //Rejected protons | |
2230 | TH1F *gProtonsITSClustersReject = new TH1F("gProtonsITSClustersReject", | |
2231 | ";N_{clusters} (ITS);Entries", | |
2232 | 7,0,7); | |
2233 | gProtonsITSClustersReject->SetFillColor(kRed-2); | |
2234 | fQAProtonsRejectedList->Add(gProtonsITSClustersReject); | |
2235 | TH1F *gProtonsChi2PerClusterITSReject = new TH1F("gProtonsChi2PerClusterITSReject", | |
2236 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2237 | 100,0,4); | |
2238 | gProtonsChi2PerClusterITSReject->SetFillColor(kRed-2); | |
2239 | fQAProtonsRejectedList->Add(gProtonsChi2PerClusterITSReject); | |
2240 | TH1F *gProtonsTPCClustersReject = new TH1F("gProtonsTPCClustersReject", | |
2241 | ";N_{clusters} (TPC);Entries", | |
2242 | 100,0,200); | |
2243 | gProtonsTPCClustersReject->SetFillColor(kRed-2); | |
2244 | fQAProtonsRejectedList->Add(gProtonsTPCClustersReject); | |
2245 | TH1F *gProtonsChi2PerClusterTPCReject = new TH1F("gProtonsChi2PerClusterTPCReject", | |
2246 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2247 | 100,0,4); | |
2248 | gProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2); | |
2249 | fQAProtonsRejectedList->Add(gProtonsChi2PerClusterTPCReject); | |
2250 | TH1F *gProtonsExtCov11Reject = new TH1F("gProtonsExtCov11Reject", | |
2251 | ";#sigma_{y} [cm];Entries", | |
2252 | 100,0,4); | |
2253 | gProtonsExtCov11Reject->SetFillColor(kRed-2); | |
2254 | fQAProtonsRejectedList->Add(gProtonsExtCov11Reject); | |
2255 | TH1F *gProtonsExtCov22Reject = new TH1F("gProtonsExtCov22Reject", | |
2256 | ";#sigma_{z} [cm];Entries", | |
2257 | 100,0,4); | |
2258 | gProtonsExtCov22Reject->SetFillColor(kRed-2); | |
2259 | fQAProtonsRejectedList->Add(gProtonsExtCov22Reject); | |
2260 | TH1F *gProtonsExtCov33Reject = new TH1F("gProtonsExtCov33Reject", | |
2261 | ";#sigma_{sin(#phi)};Entries", | |
2262 | 100,0,4); | |
2263 | gProtonsExtCov33Reject->SetFillColor(kRed-2); | |
2264 | fQAProtonsRejectedList->Add(gProtonsExtCov33Reject); | |
2265 | TH1F *gProtonsExtCov44Reject = new TH1F("gProtonsExtCov44Reject", | |
2266 | ";#sigma_{tan(#lambda)};Entries", | |
2267 | 100,0,4); | |
2268 | gProtonsExtCov44Reject->SetFillColor(kRed-2); | |
2269 | fQAProtonsRejectedList->Add(gProtonsExtCov44Reject); | |
2270 | TH1F *gProtonsExtCov55Reject = new TH1F("gProtonsExtCov55Reject", | |
2271 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2272 | 100,0,4); | |
2273 | gProtonsExtCov55Reject->SetFillColor(kRed-2); | |
2274 | fQAProtonsRejectedList->Add(gProtonsExtCov55Reject); | |
2275 | TH1F *gProtonsSigmaToVertexReject = new TH1F("gProtonsSigmaToVertexReject", | |
2276 | ";#sigma_{Vertex};Entries", | |
2277 | 100,0,10); | |
2278 | gProtonsSigmaToVertexReject->SetFillColor(kRed-2); | |
2279 | fQAProtonsRejectedList->Add(gProtonsSigmaToVertexReject); | |
2280 | TH1F *gProtonsSigmaToVertexTPCReject = new TH1F("gProtonsSigmaToVertexTPCReject", | |
2281 | ";#sigma_{Vertex};Entries", | |
2282 | 100,0,10); | |
2283 | gProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2); | |
2284 | fQAProtonsRejectedList->Add(gProtonsSigmaToVertexTPCReject); | |
2285 | TH1F *gProtonsDCAXYReject = new TH1F("gProtonsDCAXYReject", | |
2286 | ";DCA_{xy} [cm];Entries", | |
2287 | 100,0,20); | |
2288 | gProtonsDCAXYReject->SetFillColor(kRed-2); | |
2289 | fQAProtonsRejectedList->Add(gProtonsDCAXYReject); | |
2290 | TH1F *gProtonsDCAXYTPCReject = new TH1F("gProtonsDCAXYTPCReject", | |
2291 | ";DCA_{xy} [cm];Entries", | |
2292 | 100,0,20); | |
2293 | gProtonsDCAXYTPCReject->SetFillColor(kRed-2); | |
2294 | fQAProtonsRejectedList->Add(gProtonsDCAXYTPCReject); | |
2295 | TH1F *gProtonsDCAZReject = new TH1F("gProtonsDCAZReject", | |
2296 | ";DCA_{z} [cm];Entries", | |
2297 | 100,0,20); | |
2298 | gProtonsDCAZReject->SetFillColor(kRed-2); | |
2299 | fQAProtonsRejectedList->Add(gProtonsDCAZReject); | |
2300 | TH1F *gProtonsDCAZTPCReject = new TH1F("gProtonsDCAZTPCReject", | |
2301 | ";DCA_{z} [cm];Entries", | |
2302 | 100,0,20); | |
2303 | gProtonsDCAZTPCReject->SetFillColor(kRed-2); | |
2304 | fQAProtonsRejectedList->Add(gProtonsDCAZTPCReject); | |
2305 | TH1F *gProtonsConstrainChi2Reject = new TH1F("gProtonsConstrainChi2Reject", | |
2306 | ";Log_{10}(#chi^{2});Entries", | |
2307 | 100,-10,10); | |
2308 | gProtonsConstrainChi2Reject->SetFillColor(kRed-2); | |
2309 | fQAProtonsRejectedList->Add(gProtonsConstrainChi2Reject); | |
2310 | TH1F *gProtonsITSRefitReject = new TH1F("gProtonsITSRefitReject", | |
2311 | "",10,-1,1); | |
2312 | gProtonsITSRefitReject->SetFillColor(kRed-2); | |
2313 | fQAProtonsRejectedList->Add(gProtonsITSRefitReject); | |
2314 | TH1F *gProtonsTPCRefitReject = new TH1F("gProtonsTPCRefitReject", | |
2315 | "",10,-1,1); | |
2316 | gProtonsTPCRefitReject->SetFillColor(kRed-2); | |
2317 | fQAProtonsRejectedList->Add(gProtonsTPCRefitReject); | |
2318 | TH1F *gProtonsESDpidReject = new TH1F("gProtonsESDpidReject", | |
2319 | "",10,-1,1); | |
2320 | gProtonsESDpidReject->SetFillColor(kRed-2); | |
2321 | fQAProtonsRejectedList->Add(gProtonsESDpidReject); | |
2322 | TH1F *gProtonsTPCpidReject = new TH1F("gProtonsTPCpidReject", | |
2323 | "",10,-1,1); | |
2324 | gProtonsTPCpidReject->SetFillColor(kRed-2); | |
2325 | fQAProtonsRejectedList->Add(gProtonsTPCpidReject); | |
2326 | TH1F *gProtonsPointOnITSLayer1Reject = new TH1F("gProtonsPointOnITSLayer1Reject", | |
2327 | "",10,-1,1); | |
2328 | gProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2); | |
2329 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer1Reject); | |
2330 | TH1F *gProtonsPointOnITSLayer2Reject = new TH1F("gProtonsPointOnITSLayer2Reject", | |
2331 | "",10,-1,1); | |
2332 | gProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2); | |
2333 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer2Reject); | |
2334 | TH1F *gProtonsPointOnITSLayer3Reject = new TH1F("gProtonsPointOnITSLayer3Reject", | |
2335 | "",10,-1,1); | |
2336 | gProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2); | |
2337 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer3Reject); | |
2338 | TH1F *gProtonsPointOnITSLayer4Reject = new TH1F("gProtonsPointOnITSLayer4Reject", | |
2339 | "",10,-1,1); | |
2340 | gProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2); | |
2341 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer4Reject); | |
2342 | TH1F *gProtonsPointOnITSLayer5Reject = new TH1F("gProtonsPointOnITSLayer5Reject", | |
2343 | "",10,-1,1); | |
2344 | gProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2); | |
2345 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer5Reject); | |
2346 | TH1F *gProtonsPointOnITSLayer6Reject = new TH1F("gProtonsPointOnITSLayer6Reject", | |
2347 | "",10,-1,1); | |
2348 | gProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2); | |
2349 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer6Reject); | |
2350 | TH1F *gProtonsNumberOfTPCdEdxPointsReject = new TH1F("gProtonsNumberOfTPCdEdxPointsReject","",100,0,200); | |
2351 | gProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2); | |
2352 | fQAProtonsRejectedList->Add(gProtonsNumberOfTPCdEdxPointsReject); | |
71a67ee1 | 2353 | TH1F *gProtonsITSClusterMapReject = new TH1F("gProtonsITSClusterMapReject",";ITS Layer;Entries",6,0.5,6.5); |
2354 | gProtonsITSClusterMapReject->SetFillColor(kRed-2); | |
2355 | fQAProtonsRejectedList->Add(gProtonsITSClusterMapReject); | |
2356 | TH1F *gProtonsDCA3DReject = new TH1F("gProtonsDCA3DReject", | |
2357 | ";dca [cm];Entries", | |
2358 | 100,0,20); | |
2359 | gProtonsDCA3DReject->SetFillColor(kRed-2); | |
2360 | fQAProtonsRejectedList->Add(gProtonsDCA3DReject); | |
735cc63d | 2361 | |
2362 | //========================================================// | |
2363 | fQAAntiProtonsAcceptedList = new TList(); | |
2364 | fQAAntiProtonsAcceptedList->SetName("fQAAntiProtonsAcceptedList"); | |
2365 | fGlobalQAList->Add(fQAAntiProtonsAcceptedList); | |
2366 | //Accepted antiprotons | |
2367 | TH1F *gAntiProtonsITSClustersPass = new TH1F("gAntiProtonsITSClustersPass", | |
2368 | ";N_{clusters} (ITS);Entries", | |
2369 | 7,0,7); | |
2370 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClustersPass); | |
2371 | TH1F *gAntiProtonsChi2PerClusterITSPass = new TH1F("gAntiProtonsChi2PerClusterITSPass", | |
2372 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2373 | 100,0,4); | |
2374 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterITSPass); | |
2375 | TH1F *gAntiProtonsTPCClustersPass = new TH1F("gAntiProtonsTPCClustersPass", | |
2376 | ";N_{clusters} (TPC);Entries", | |
2377 | 100,0,200); | |
2378 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCClustersPass); | |
2379 | TH1F *gAntiProtonsChi2PerClusterTPCPass = new TH1F("gAntiProtonsChi2PerClusterTPCPass", | |
2380 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2381 | 100,0,4); | |
2382 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterTPCPass); | |
2383 | TH1F *gAntiProtonsExtCov11Pass = new TH1F("gAntiProtonsExtCov11Pass", | |
2384 | ";#sigma_{y} [cm];Entries", | |
2385 | 100,0,4); | |
2386 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov11Pass); | |
2387 | TH1F *gAntiProtonsExtCov22Pass = new TH1F("gAntiProtonsExtCov22Pass", | |
2388 | ";#sigma_{z} [cm];Entries", | |
2389 | 100,0,4); | |
2390 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov22Pass); | |
2391 | TH1F *gAntiProtonsExtCov33Pass = new TH1F("gAntiProtonsExtCov33Pass", | |
2392 | ";#sigma_{sin(#phi)};Entries", | |
2393 | 100,0,4); | |
2394 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov33Pass); | |
2395 | TH1F *gAntiProtonsExtCov44Pass = new TH1F("gAntiProtonsExtCov44Pass", | |
2396 | ";#sigma_{tan(#lambda)};Entries", | |
2397 | 100,0,4); | |
2398 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov44Pass); | |
2399 | TH1F *gAntiProtonsExtCov55Pass = new TH1F("gAntiProtonsExtCov55Pass", | |
2400 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2401 | 100,0,4); | |
2402 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov55Pass); | |
2403 | TH1F *gAntiProtonsSigmaToVertexPass = new TH1F("gAntiProtonsSigmaToVertexPass", | |
2404 | ";#sigma_{Vertex};Entries", | |
2405 | 100,0,10); | |
2406 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexPass); | |
2407 | TH1F *gAntiProtonsSigmaToVertexTPCPass = new TH1F("gAntiProtonsSigmaToVertexTPCPass", | |
2408 | ";#sigma_{Vertex};Entries", | |
2409 | 100,0,10); | |
2410 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexTPCPass); | |
2411 | TH1F *gAntiProtonsDCAXYPass = new TH1F("gAntiProtonsDCAXYPass", | |
2412 | ";DCA_{xy} [cm];Entries", | |
2413 | 100,0,20); | |
2414 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYPass); | |
2415 | TH1F *gAntiProtonsDCAXYTPCPass = new TH1F("gAntiProtonsDCAXYTPCPass", | |
2416 | ";DCA_{xy} [cm];Entries", | |
2417 | 100,0,20); | |
2418 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYTPCPass); | |
2419 | TH1F *gAntiProtonsDCAZPass = new TH1F("gAntiProtonsDCAZPass", | |
2420 | ";DCA_{z} [cm];Entries", | |
2421 | 100,0,20); | |
2422 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZPass); | |
2423 | TH1F *gAntiProtonsDCAZTPCPass = new TH1F("gAntiProtonsDCAZTPCPass", | |
2424 | ";DCA_{z} [cm];Entries", | |
2425 | 100,0,20); | |
2426 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZTPCPass); | |
2427 | TH1F *gAntiProtonsConstrainChi2Pass = new TH1F("gAntiProtonsConstrainChi2Pass", | |
2428 | ";Log_{10}(#chi^{2});Entries", | |
2429 | 100,-10,10); | |
2430 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsConstrainChi2Pass); | |
2431 | TH1F *gAntiProtonsITSRefitPass = new TH1F("gAntiProtonsITSRefitPass", | |
2432 | "",10,-1,1); | |
2433 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSRefitPass); | |
2434 | TH1F *gAntiProtonsTPCRefitPass = new TH1F("gAntiProtonsTPCRefitPass", | |
2435 | "",10,-1,1); | |
2436 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCRefitPass); | |
2437 | TH1F *gAntiProtonsESDpidPass = new TH1F("gAntiProtonsESDpidPass", | |
2438 | "",10,-1,1); | |
2439 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsESDpidPass); | |
2440 | TH1F *gAntiProtonsTPCpidPass = new TH1F("gAntiProtonsTPCpidPass", | |
2441 | "",10,-1,1); | |
2442 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCpidPass); | |
2443 | TH1F *gAntiProtonsPointOnITSLayer1Pass = new TH1F("gAntiProtonsPointOnITSLayer1Pass", | |
2444 | "",10,-1,1); | |
2445 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer1Pass); | |
2446 | TH1F *gAntiProtonsPointOnITSLayer2Pass = new TH1F("gAntiProtonsPointOnITSLayer2Pass", | |
2447 | "",10,-1,1); | |
2448 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer2Pass); | |
2449 | TH1F *gAntiProtonsPointOnITSLayer3Pass = new TH1F("gAntiProtonsPointOnITSLayer3Pass", | |
2450 | "",10,-1,1); | |
2451 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer3Pass); | |
2452 | TH1F *gAntiProtonsPointOnITSLayer4Pass = new TH1F("gAntiProtonsPointOnITSLayer4Pass", | |
2453 | "",10,-1,1); | |
2454 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer4Pass); | |
2455 | TH1F *gAntiProtonsPointOnITSLayer5Pass = new TH1F("gAntiProtonsPointOnITSLayer5Pass", | |
2456 | "",10,-1,1); | |
2457 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer5Pass); | |
2458 | TH1F *gAntiProtonsPointOnITSLayer6Pass = new TH1F("gAntiProtonsPointOnITSLayer6Pass", | |
2459 | "",10,-1,1); | |
2460 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer6Pass); | |
2461 | TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200); | |
2462 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsNumberOfTPCdEdxPointsPass); | |
71a67ee1 | 2463 | TH1F *gAntiProtonsITSClusterMapPass = new TH1F("gAntiProtonsITSClusterMapPass",";ITS Layer;Entries",6,0.5,6.5); |
2464 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClusterMapPass); | |
2465 | TH1F *gAntiProtonsDCA3DPass = new TH1F("gAntiProtonsDCA3DPass", | |
2466 | ";dca [cm];Entries", | |
2467 | 100,0,20); | |
2468 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCA3DPass); | |
2469 | ||
735cc63d | 2470 | //========================================================// |
2471 | fQAAntiProtonsRejectedList = new TList(); | |
2472 | fQAAntiProtonsRejectedList->SetName("fQAAntiProtonsRejectedList"); | |
2473 | fGlobalQAList->Add(fQAAntiProtonsRejectedList); | |
2474 | //Rejected antiprotons | |
2475 | TH1F *gAntiProtonsITSClustersReject = new TH1F("gAntiProtonsITSClustersReject", | |
2476 | ";N_{clusters} (ITS);Entries", | |
2477 | 7,0,7); | |
2478 | gAntiProtonsITSClustersReject->SetFillColor(kRed-2); | |
2479 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClustersReject); | |
2480 | TH1F *gAntiProtonsChi2PerClusterITSReject = new TH1F("gAntiProtonsChi2PerClusterITSReject", | |
2481 | ";x^{2}/N_{clusters} (ITS);Entries", | |
2482 | 100,0,4); | |
2483 | gAntiProtonsChi2PerClusterITSReject->SetFillColor(kRed-2); | |
2484 | fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterITSReject); | |
2485 | TH1F *gAntiProtonsTPCClustersReject = new TH1F("gAntiProtonsTPCClustersReject", | |
2486 | ";N_{clusters} (TPC);Entries", | |
2487 | 100,0,200); | |
2488 | gAntiProtonsTPCClustersReject->SetFillColor(kRed-2); | |
2489 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCClustersReject); | |
2490 | TH1F *gAntiProtonsChi2PerClusterTPCReject = new TH1F("gAntiProtonsChi2PerClusterTPCReject", | |
2491 | ";x^{2}/N_{clusters} (TPC);Entries", | |
2492 | 100,0,4); | |
2493 | gAntiProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2); | |
2494 | fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterTPCReject); | |
2495 | TH1F *gAntiProtonsExtCov11Reject = new TH1F("gAntiProtonsExtCov11Reject", | |
2496 | ";#sigma_{y} [cm];Entries", | |
2497 | 100,0,4); | |
2498 | gAntiProtonsExtCov11Reject->SetFillColor(kRed-2); | |
2499 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov11Reject); | |
2500 | TH1F *gAntiProtonsExtCov22Reject = new TH1F("gAntiProtonsExtCov22Reject", | |
2501 | ";#sigma_{z} [cm];Entries", | |
2502 | 100,0,4); | |
2503 | gAntiProtonsExtCov22Reject->SetFillColor(kRed-2); | |
2504 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov22Reject); | |
2505 | TH1F *gAntiProtonsExtCov33Reject = new TH1F("gAntiProtonsExtCov33Reject", | |
2506 | ";#sigma_{sin(#phi)};Entries", | |
2507 | 100,0,4); | |
2508 | gAntiProtonsExtCov33Reject->SetFillColor(kRed-2); | |
2509 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov33Reject); | |
2510 | TH1F *gAntiProtonsExtCov44Reject = new TH1F("gAntiProtonsExtCov44Reject", | |
2511 | ";#sigma_{tan(#lambda)};Entries", | |
2512 | 100,0,4); | |
2513 | gAntiProtonsExtCov44Reject->SetFillColor(kRed-2); | |
2514 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov44Reject); | |
2515 | TH1F *gAntiProtonsExtCov55Reject = new TH1F("gAntiProtonsExtCov55Reject", | |
2516 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
2517 | 100,0,4); | |
2518 | gAntiProtonsExtCov55Reject->SetFillColor(kRed-2); | |
2519 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov55Reject); | |
2520 | TH1F *gAntiProtonsSigmaToVertexReject = new TH1F("gAntiProtonsSigmaToVertexReject", | |
2521 | ";#sigma_{Vertex};Entries", | |
2522 | 100,0,10); | |
2523 | gAntiProtonsSigmaToVertexReject->SetFillColor(kRed-2); | |
2524 | fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexReject); | |
2525 | TH1F *gAntiProtonsSigmaToVertexTPCReject = new TH1F("gAntiProtonsSigmaToVertexTPCReject", | |
2526 | ";#sigma_{Vertex};Entries", | |
2527 | 100,0,10); | |
2528 | gAntiProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2); | |
2529 | fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexTPCReject); | |
2530 | TH1F *gAntiProtonsDCAXYReject = new TH1F("gAntiProtonsDCAXYReject", | |
2531 | ";DCA_{xy} [cm];Entries", | |
2532 | 100,0,20); | |
2533 | gAntiProtonsDCAXYReject->SetFillColor(kRed-2); | |
2534 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYReject); | |
2535 | TH1F *gAntiProtonsDCAXYTPCReject = new TH1F("gAntiProtonsDCAXYTPCReject", | |
2536 | ";DCA_{xy} [cm];Entries", | |
2537 | 100,0,20); | |
2538 | gAntiProtonsDCAXYTPCReject->SetFillColor(kRed-2); | |
2539 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYTPCReject); | |
2540 | TH1F *gAntiProtonsDCAZReject = new TH1F("gAntiProtonsDCAZReject", | |
2541 | ";DCA_{z} [cm];Entries", | |
2542 | 100,0,20); | |
2543 | gAntiProtonsDCAZReject->SetFillColor(kRed-2); | |
2544 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZReject); | |
2545 | TH1F *gAntiProtonsDCAZTPCReject = new TH1F("gAntiProtonsDCAZTPCReject", | |
2546 | ";DCA_{z} [cm];Entries", | |
2547 | 100,0,20); | |
2548 | gAntiProtonsDCAZTPCReject->SetFillColor(kRed-2); | |
2549 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZTPCReject); | |
2550 | TH1F *gAntiProtonsConstrainChi2Reject = new TH1F("gAntiProtonsConstrainChi2Reject", | |
2551 | ";Log_{10}(#chi^{2});Entries", | |
2552 | 100,-10,10); | |
2553 | gAntiProtonsConstrainChi2Reject->SetFillColor(kRed-2); | |
2554 | fQAAntiProtonsRejectedList->Add(gAntiProtonsConstrainChi2Reject); | |
2555 | TH1F *gAntiProtonsITSRefitReject = new TH1F("gAntiProtonsITSRefitReject", | |
2556 | "",10,-1,1); | |
2557 | gAntiProtonsITSRefitReject->SetFillColor(kRed-2); | |
2558 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSRefitReject); | |
2559 | TH1F *gAntiProtonsTPCRefitReject = new TH1F("gAntiProtonsTPCRefitReject", | |
2560 | "",10,-1,1); | |
2561 | gAntiProtonsTPCRefitReject->SetFillColor(kRed-2); | |
2562 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCRefitReject); | |
2563 | TH1F *gAntiProtonsESDpidReject = new TH1F("gAntiProtonsESDpidReject", | |
2564 | "",10,-1,1); | |
2565 | gAntiProtonsESDpidReject->SetFillColor(kRed-2); | |
2566 | fQAAntiProtonsRejectedList->Add(gAntiProtonsESDpidReject); | |
2567 | TH1F *gAntiProtonsTPCpidReject = new TH1F("gAntiProtonsTPCpidReject", | |
2568 | "",10,-1,1); | |
2569 | gAntiProtonsTPCpidReject->SetFillColor(kRed-2); | |
2570 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCpidReject); | |
2571 | TH1F *gAntiProtonsPointOnITSLayer1Reject = new TH1F("gAntiProtonsPointOnITSLayer1Reject", | |
2572 | "",10,-1,1); | |
2573 | gAntiProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2); | |
2574 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer1Reject); | |
2575 | TH1F *gAntiProtonsPointOnITSLayer2Reject = new TH1F("gAntiProtonsPointOnITSLayer2Reject", | |
2576 | "",10,-1,1); | |
2577 | gAntiProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2); | |
2578 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer2Reject); | |
2579 | TH1F *gAntiProtonsPointOnITSLayer3Reject = new TH1F("gAntiProtonsPointOnITSLayer3Reject", | |
2580 | "",10,-1,1); | |
2581 | gAntiProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2); | |
2582 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer3Reject); | |
2583 | TH1F *gAntiProtonsPointOnITSLayer4Reject = new TH1F("gAntiProtonsPointOnITSLayer4Reject", | |
2584 | "",10,-1,1); | |
2585 | gAntiProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2); | |
2586 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer4Reject); | |
2587 | TH1F *gAntiProtonsPointOnITSLayer5Reject = new TH1F("gAntiProtonsPointOnITSLayer5Reject", | |
2588 | "",10,-1,1); | |
2589 | gAntiProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2); | |
2590 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer5Reject); | |
2591 | TH1F *gAntiProtonsPointOnITSLayer6Reject = new TH1F("gAntiProtonsPointOnITSLayer6Reject", | |
2592 | "",10,-1,1); | |
2593 | gAntiProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2); | |
2594 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer6Reject); | |
2595 | TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200); | |
2596 | gAntiProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2); | |
2597 | fQAAntiProtonsRejectedList->Add(gAntiProtonsNumberOfTPCdEdxPointsReject); | |
71a67ee1 | 2598 | TH1F *gAntiProtonsITSClusterMapReject = new TH1F("gAntiProtonsITSClusterMapReject",";ITS Layer;Entries",6,0.5,6.5); |
2599 | gAntiProtonsITSClusterMapReject->SetFillColor(kRed-2); | |
2600 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClusterMapReject); | |
2601 | TH1F *gAntiProtonsDCA3DReject = new TH1F("gAntiProtonsDCA3DReject", | |
2602 | ";dca [cm];Entries", | |
2603 | 100,0,20); | |
2604 | gAntiProtonsDCA3DReject->SetFillColor(kRed-2); | |
2605 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCA3DReject); | |
735cc63d | 2606 | } |
39f2a708 | 2607 | |
735cc63d | 2608 | //____________________________________________________________________// |
2609 | void AliProtonAnalysis::FillQA(AliESDEvent *esd, | |
2610 | const AliESDVertex *vertex, | |
2611 | AliESDtrack* track) { | |
2612 | //Fills the QA histograms | |
2613 | Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0; | |
2614 | Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance. | |
71a67ee1 | 2615 | Double_t dca3D = 0.0; |
3770a478 | 2616 | Float_t dcaXY = 0.0, dcaZ = 0.0; |
735cc63d | 2617 | |
2618 | if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) { | |
2619 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
2620 | if(!tpcTrack) { | |
2621 | gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; | |
2622 | dca[0] = -100.; dca[1] = -100.; | |
2623 | cov[0] = -100.; cov[1] = -100.; cov[2] = -100.; | |
2624 | } | |
2625 | else { | |
2626 | gPt = tpcTrack->Pt(); | |
2627 | gPx = tpcTrack->Px(); | |
2628 | gPy = tpcTrack->Py(); | |
2629 | gPz = tpcTrack->Pz(); | |
2630 | tpcTrack->PropagateToDCA(vertex, | |
2631 | esd->GetMagneticField(), | |
2632 | 100.,dca,cov); | |
2633 | } | |
2634 | } | |
3770a478 | 2635 | if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kFullHybrid) { |
2636 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
2637 | AliExternalTrackParam cParam; | |
2638 | if(!tpcTrack) { | |
2639 | gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; | |
2640 | dca[0] = -100.; dca[1] = -100.; | |
2641 | cov[0] = -100.; cov[1] = -100.; cov[2] = -100.; | |
2642 | } | |
2643 | else { | |
2644 | gPt = tpcTrack->Pt(); | |
2645 | gPx = tpcTrack->Px(); | |
2646 | gPy = tpcTrack->Py(); | |
2647 | gPz = tpcTrack->Pz(); | |
2648 | track->RelateToVertex(vertex, | |
2649 | esd->GetMagneticField(), | |
2650 | 100.,&cParam); | |
2651 | track->GetImpactParameters(dcaXY,dcaZ); | |
2652 | dca[0] = dcaXY; dca[1] = dcaZ; | |
2653 | } | |
2654 | } | |
735cc63d | 2655 | else{ |
2656 | gPt = track->Pt(); | |
2657 | gPx = track->Px(); | |
2658 | gPy = track->Py(); | |
2659 | gPz = track->Pz(); | |
2660 | track->PropagateToDCA(vertex, | |
2661 | esd->GetMagneticField(), | |
2662 | 100.,dca,cov); | |
2663 | } | |
39f2a708 | 2664 | |
71a67ee1 | 2665 | dca3D = TMath::Sqrt(TMath::Power(dca[0],2) + |
2666 | TMath::Power(dca[1],2)); | |
2667 | ||
735cc63d | 2668 | Int_t fIdxInt[200]; |
2669 | Int_t nClustersITS = track->GetITSclusters(fIdxInt); | |
2670 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
39f2a708 | 2671 | |
735cc63d | 2672 | Float_t chi2PerClusterITS = -1; |
2673 | if (nClustersITS!=0) | |
2674 | chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS); | |
2675 | Float_t chi2PerClusterTPC = -1; | |
2676 | if (nClustersTPC!=0) | |
2677 | chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC); | |
39f2a708 | 2678 | |
735cc63d | 2679 | Double_t extCov[15]; |
2680 | track->GetExternalCovariance(extCov); | |
2681 | ||
2682 | //protons | |
2683 | if(track->Charge() > 0) { | |
2684 | if(fProtonAnalysisBase->IsUsedMinITSClusters()) { | |
2685 | if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) { | |
2686 | ((TH1F *)(fQAProtonsRejectedList->At(0)))->Fill(nClustersITS); | |
2687 | } | |
2688 | else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters()) | |
2689 | ((TH1F *)(fQAProtonsAcceptedList->At(0)))->Fill(nClustersITS); | |
2690 | }//ITS clusters | |
2691 | if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) { | |
2692 | if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) { | |
2693 | ((TH1F *)(fQAProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS); | |
2694 | } | |
2695 | else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster()) | |
2696 | ((TH1F *)(fQAProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS); | |
2697 | }//chi2 per ITS cluster | |
2698 | if(fProtonAnalysisBase->IsUsedMinTPCClusters()) { | |
2699 | if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) { | |
2700 | ((TH1F *)(fQAProtonsRejectedList->At(2)))->Fill(nClustersTPC); | |
2701 | } | |
2702 | else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) { | |
2703 | ((TH1F *)(fQAProtonsAcceptedList->At(2)))->Fill(nClustersTPC); | |
2704 | } | |
2705 | }//TPC clusters | |
2706 | if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) { | |
2707 | if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) { | |
2708 | ((TH1F *)(fQAProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC); | |
2709 | } | |
2710 | else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) | |
2711 | ((TH1F *)(fQAProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC); | |
2712 | }//chi2 per TPC cluster | |
2713 | if(fProtonAnalysisBase->IsUsedMaxCov11()) { | |
2714 | if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) { | |
2715 | ((TH1F *)(fQAProtonsRejectedList->At(4)))->Fill(extCov[0]); | |
2716 | } | |
2717 | else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11()) | |
2718 | ((TH1F *)(fQAProtonsAcceptedList->At(4)))->Fill(extCov[0]); | |
2719 | }//cov11 | |
2720 | if(fProtonAnalysisBase->IsUsedMaxCov22()) { | |
2721 | if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) { | |
2722 | ((TH1F *)(fQAProtonsRejectedList->At(5)))->Fill(extCov[2]); | |
2723 | } | |
2724 | else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22()) | |
2725 | ((TH1F *)(fQAProtonsAcceptedList->At(5)))->Fill(extCov[2]); | |
2726 | }//cov11 | |
2727 | if(fProtonAnalysisBase->IsUsedMaxCov33()) { | |
2728 | if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) { | |
2729 | ((TH1F *)(fQAProtonsRejectedList->At(6)))->Fill(extCov[5]); | |
2730 | } | |
2731 | else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33()) | |
2732 | ((TH1F *)(fQAProtonsAcceptedList->At(6)))->Fill(extCov[5]); | |
2733 | }//cov11 | |
2734 | if(fProtonAnalysisBase->IsUsedMaxCov44()) { | |
2735 | if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) { | |
2736 | ((TH1F *)(fQAProtonsRejectedList->At(7)))->Fill(extCov[9]); | |
2737 | } | |
2738 | else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44()) | |
2739 | ((TH1F *)(fQAProtonsAcceptedList->At(7)))->Fill(extCov[9]); | |
2740 | }//cov11 | |
2741 | if(fProtonAnalysisBase->IsUsedMaxCov55()) { | |
2742 | if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) { | |
2743 | ((TH1F *)(fQAProtonsRejectedList->At(8)))->Fill(extCov[14]); | |
2744 | } | |
2745 | else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55()) | |
2746 | ((TH1F *)(fQAProtonsAcceptedList->At(8)))->Fill(extCov[14]); | |
2747 | }//cov55 | |
2748 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) { | |
2749 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) { | |
2750 | ((TH1F *)(fQAProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2751 | } | |
2752 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex()) | |
2753 | ((TH1F *)(fQAProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2754 | }//sigma to vertex | |
2755 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) { | |
2756 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) { | |
2757 | ((TH1F *)(fQAProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2758 | } | |
2759 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) | |
2760 | ((TH1F *)(fQAProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2761 | }//sigma to vertex TPC | |
2762 | if(fProtonAnalysisBase->IsUsedMaxDCAXY()) { | |
2763 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) { | |
2764 | ((TH1F *)(fQAProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2765 | } | |
2766 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) | |
2767 | ((TH1F *)(fQAProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2768 | }//DCA xy global tracking | |
2769 | if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) { | |
2770 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) { | |
2771 | ((TH1F *)(fQAProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2772 | } | |
2773 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC()) | |
2774 | ((TH1F *)(fQAProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2775 | }//DCA xy TPC tracking | |
2776 | if(fProtonAnalysisBase->IsUsedMaxDCAZ()) { | |
2777 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) { | |
2778 | ((TH1F *)(fQAProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2779 | } | |
2780 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) | |
2781 | ((TH1F *)(fQAProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2782 | }//DCA z global tracking | |
2783 | if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) { | |
2784 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) { | |
2785 | ((TH1F *)(fQAProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2786 | } | |
2787 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC()) | |
2788 | ((TH1F *)(fQAProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2789 | }//DCA z TPC tracking | |
2790 | if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) { | |
2791 | if(track->GetConstrainedChi2() > 0) { | |
2792 | if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) { | |
2793 | ((TH1F *)(fQAProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2794 | } | |
2795 | else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2()) | |
2796 | ((TH1F *)(fQAProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2797 | } | |
2798 | }//constrain chi2 - vertex | |
2799 | if(fProtonAnalysisBase->IsUsedITSRefit()) { | |
2800 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) { | |
2801 | ((TH1F *)(fQAProtonsRejectedList->At(16)))->Fill(0); | |
2802 | } | |
2803 | else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0) | |
2804 | ((TH1F *)(fQAProtonsAcceptedList->At(16)))->Fill(0); | |
2805 | }//ITS refit | |
2806 | if(fProtonAnalysisBase->IsUsedTPCRefit()) { | |
2807 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) { | |
2808 | ((TH1F *)(fQAProtonsRejectedList->At(17)))->Fill(0); | |
2809 | } | |
2810 | else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0) | |
2811 | ((TH1F *)(fQAProtonsAcceptedList->At(17)))->Fill(0); | |
2812 | }//TPC refit | |
2813 | if(fProtonAnalysisBase->IsUsedESDpid()) { | |
2814 | if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) { | |
2815 | ((TH1F *)(fQAProtonsRejectedList->At(18)))->Fill(0); | |
2816 | } | |
2817 | else if((track->GetStatus() & AliESDtrack::kESDpid) != 0) | |
2818 | ((TH1F *)(fQAProtonsAcceptedList->At(18)))->Fill(0); | |
2819 | }//ESD pid | |
2820 | if(fProtonAnalysisBase->IsUsedTPCpid()) { | |
2821 | if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) { | |
2822 | ((TH1F *)(fQAProtonsRejectedList->At(19)))->Fill(0); | |
2823 | } | |
2824 | else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0) | |
2825 | ((TH1F *)(fQAProtonsAcceptedList->At(19)))->Fill(0); | |
2826 | }//TPC pid | |
2827 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) { | |
2828 | if(!track->HasPointOnITSLayer(0)) { | |
2829 | ((TH1F *)(fQAProtonsRejectedList->At(20)))->Fill(0); | |
2830 | } | |
2831 | else if(track->HasPointOnITSLayer(0)) | |
2832 | ((TH1F *)(fQAProtonsAcceptedList->At(20)))->Fill(0); | |
2833 | }//point on SPD1 | |
2834 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) { | |
2835 | if(!track->HasPointOnITSLayer(1)) { | |
2836 | ((TH1F *)(fQAProtonsRejectedList->At(21)))->Fill(0); | |
2837 | } | |
2838 | else if(track->HasPointOnITSLayer(1)) | |
2839 | ((TH1F *)(fQAProtonsAcceptedList->At(21)))->Fill(0); | |
2840 | }//point on SPD2 | |
2841 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) { | |
2842 | if(!track->HasPointOnITSLayer(2)) { | |
2843 | ((TH1F *)(fQAProtonsRejectedList->At(22)))->Fill(0); | |
2844 | } | |
2845 | else if(track->HasPointOnITSLayer(2)) | |
2846 | ((TH1F *)(fQAProtonsAcceptedList->At(22)))->Fill(0); | |
2847 | }//point on SDD1 | |
2848 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) { | |
2849 | if(!track->HasPointOnITSLayer(3)) { | |
2850 | ((TH1F *)(fQAProtonsRejectedList->At(23)))->Fill(0); | |
2851 | } | |
2852 | else if(track->HasPointOnITSLayer(3)) | |
2853 | ((TH1F *)(fQAProtonsAcceptedList->At(23)))->Fill(0); | |
2854 | }//point on SDD2 | |
2855 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) { | |
2856 | if(!track->HasPointOnITSLayer(4)) { | |
2857 | ((TH1F *)(fQAProtonsRejectedList->At(24)))->Fill(0); | |
2858 | } | |
2859 | else if(track->HasPointOnITSLayer(4)) | |
2860 | ((TH1F *)(fQAProtonsAcceptedList->At(24)))->Fill(0); | |
2861 | }//point on SSD1 | |
2862 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) { | |
2863 | if(!track->HasPointOnITSLayer(5)) { | |
2864 | ((TH1F *)(fQAProtonsRejectedList->At(25)))->Fill(0); | |
2865 | } | |
2866 | else if(track->HasPointOnITSLayer(5)) | |
2867 | ((TH1F *)(fQAProtonsAcceptedList->At(25)))->Fill(0); | |
2868 | }//point on SSD2 | |
2869 | if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) { | |
2870 | if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) { | |
2871 | ((TH1F *)(fQAProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2872 | } | |
2873 | if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints()) | |
2874 | ((TH1F *)(fQAProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2875 | }//number of TPC points for the dE/dx | |
71a67ee1 | 2876 | if(fProtonAnalysisBase->IsUsedPointOnSPDLayer()) { |
2877 | if((!track->HasPointOnITSLayer(0))&&(!track->HasPointOnITSLayer(1))) { | |
2878 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
2879 | if(track->HasPointOnITSLayer(iLayer)) | |
2880 | ((TH1F *)(fQAProtonsRejectedList->At(27)))->Fill(iLayer+1); | |
2881 | } | |
2882 | } | |
2883 | else if((track->HasPointOnITSLayer(0))||(track->HasPointOnITSLayer(1))) { | |
2884 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
2885 | if(track->HasPointOnITSLayer(iLayer)) | |
2886 | ((TH1F *)(fQAProtonsAcceptedList->At(27)))->Fill(iLayer+1); | |
2887 | } | |
2888 | } | |
2889 | }//point on either SPD layers | |
2890 | if(fProtonAnalysisBase->IsUsedMaxDCA3D()) { | |
2891 | if(dca3D > fProtonAnalysisBase->GetMaxDCA3D()) { | |
2892 | ((TH1F *)(fQAProtonsRejectedList->At(28)))->Fill(dca3D); | |
2893 | } | |
2894 | if(dca3D < fProtonAnalysisBase->GetMaxDCA3D()) | |
2895 | ((TH1F *)(fQAProtonsAcceptedList->At(28)))->Fill(dca3D); | |
2896 | }//dca3D | |
735cc63d | 2897 | }//protons |
2898 | ||
2899 | //antiprotons | |
2900 | if(track->Charge() < 0) { | |
2901 | if(fProtonAnalysisBase->IsUsedMinITSClusters()) { | |
2902 | if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) { | |
2903 | ((TH1F *)(fQAAntiProtonsRejectedList->At(0)))->Fill(nClustersITS); | |
2904 | } | |
2905 | else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters()) | |
2906 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS); | |
2907 | }//ITS clusters | |
2908 | if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) { | |
2909 | if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) { | |
2910 | ((TH1F *)(fQAAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS); | |
2911 | } | |
2912 | else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster()) | |
2913 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS); | |
2914 | }//chi2 per ITS cluster | |
2915 | if(fProtonAnalysisBase->IsUsedMinTPCClusters()) { | |
2916 | if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) { | |
2917 | ((TH1F *)(fQAAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC); | |
2918 | } | |
2919 | else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) { | |
2920 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC); | |
2921 | } | |
2922 | }//TPC clusters | |
2923 | if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) { | |
2924 | if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) { | |
2925 | ((TH1F *)(fQAAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC); | |
2926 | } | |
2927 | else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) | |
2928 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC); | |
2929 | }//chi2 per TPC cluster | |
2930 | if(fProtonAnalysisBase->IsUsedMaxCov11()) { | |
2931 | if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) { | |
2932 | ((TH1F *)(fQAAntiProtonsRejectedList->At(4)))->Fill(extCov[0]); | |
2933 | } | |
2934 | else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11()) | |
2935 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]); | |
2936 | }//cov11 | |
2937 | if(fProtonAnalysisBase->IsUsedMaxCov22()) { | |
2938 | if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) { | |
2939 | ((TH1F *)(fQAAntiProtonsRejectedList->At(5)))->Fill(extCov[2]); | |
2940 | } | |
2941 | else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22()) | |
2942 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]); | |
2943 | }//cov11 | |
2944 | if(fProtonAnalysisBase->IsUsedMaxCov33()) { | |
2945 | if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) { | |
2946 | ((TH1F *)(fQAAntiProtonsRejectedList->At(6)))->Fill(extCov[5]); | |
2947 | } | |
2948 | else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33()) | |
2949 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]); | |
2950 | }//cov11 | |
2951 | if(fProtonAnalysisBase->IsUsedMaxCov44()) { | |
2952 | if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) { | |
2953 | ((TH1F *)(fQAAntiProtonsRejectedList->At(7)))->Fill(extCov[9]); | |
2954 | } | |
2955 | else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44()) | |
2956 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]); | |
2957 | }//cov11 | |
2958 | if(fProtonAnalysisBase->IsUsedMaxCov55()) { | |
2959 | if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) { | |
2960 | ((TH1F *)(fQAAntiProtonsRejectedList->At(8)))->Fill(extCov[14]); | |
2961 | } | |
2962 | else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55()) | |
2963 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]); | |
2964 | }//cov55 | |
2965 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) { | |
2966 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) { | |
2967 | ((TH1F *)(fQAAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2968 | } | |
2969 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex()) | |
2970 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2971 | }//sigma to vertex | |
2972 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) { | |
2973 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) { | |
2974 | ((TH1F *)(fQAAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2975 | } | |
2976 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) | |
2977 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2978 | }//sigma to vertex TPC | |
2979 | if(fProtonAnalysisBase->IsUsedMaxDCAXY()) { | |
2980 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) { | |
2981 | ((TH1F *)(fQAAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2982 | } | |
2983 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) | |
2984 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2985 | }//DCA xy global tracking | |
2986 | if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) { | |
2987 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) { | |
2988 | ((TH1F *)(fQAAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2989 | } | |
2990 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC()) | |
2991 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2992 | }//DCA xy TPC tracking | |
2993 | if(fProtonAnalysisBase->IsUsedMaxDCAZ()) { | |
2994 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) { | |
2995 | ((TH1F *)(fQAAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2996 | } | |
2997 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) | |
2998 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2999 | }//DCA z global tracking | |
3000 | if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) { | |
3001 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) { | |
3002 | ((TH1F *)(fQAAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
3003 | } | |
3004 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC()) | |
3005 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
3006 | }//DCA z TPC tracking | |
3007 | if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) { | |
3008 | if(track->GetConstrainedChi2() > 0) { | |
3009 | if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) { | |
3010 | ((TH1F *)(fQAAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
3011 | } | |
3012 | else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2()) | |
3013 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
3014 | } | |
3015 | }//constrain chi2 - vertex | |
3016 | if(fProtonAnalysisBase->IsUsedITSRefit()) { | |
3017 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) { | |
3018 | ((TH1F *)(fQAAntiProtonsRejectedList->At(16)))->Fill(0); | |
3019 | } | |
3020 | else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0) | |
3021 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(16)))->Fill(0); | |
3022 | }//ITS refit | |
3023 | if(fProtonAnalysisBase->IsUsedTPCRefit()) { | |
3024 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) { | |
3025 | ((TH1F *)(fQAAntiProtonsRejectedList->At(17)))->Fill(0); | |
3026 | } | |
3027 | else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0) | |
3028 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(17)))->Fill(0); | |
3029 | }//TPC refit | |
3030 | if(fProtonAnalysisBase->IsUsedESDpid()) { | |
3031 | if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) { | |
3032 | ((TH1F *)(fQAAntiProtonsRejectedList->At(18)))->Fill(0); | |
3033 | } | |
3034 | else if((track->GetStatus() & AliESDtrack::kESDpid) != 0) | |
3035 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(18)))->Fill(0); | |
3036 | }//ESD pid | |
3037 | if(fProtonAnalysisBase->IsUsedTPCpid()) { | |
3038 | if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) { | |
3039 | ((TH1F *)(fQAAntiProtonsRejectedList->At(19)))->Fill(0); | |
3040 | } | |
3041 | else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0) | |
3042 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(19)))->Fill(0); | |
3043 | }//TPC pid | |
3044 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) { | |
3045 | if(!track->HasPointOnITSLayer(0)) { | |
3046 | ((TH1F *)(fQAAntiProtonsRejectedList->At(20)))->Fill(0); | |
3047 | } | |
3048 | else if(track->HasPointOnITSLayer(0)) | |
3049 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(20)))->Fill(0); | |
3050 | }//point on SPD1 | |
3051 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) { | |
3052 | if(!track->HasPointOnITSLayer(1)) { | |
3053 | ((TH1F *)(fQAAntiProtonsRejectedList->At(21)))->Fill(0); | |
3054 | } | |
3055 | else if(track->HasPointOnITSLayer(1)) | |
3056 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(21)))->Fill(0); | |
3057 | }//point on SPD2 | |
3058 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) { | |
3059 | if(!track->HasPointOnITSLayer(2)) { | |
3060 | ((TH1F *)(fQAAntiProtonsRejectedList->At(22)))->Fill(0); | |
3061 | } | |
3062 | else if(track->HasPointOnITSLayer(2)) | |
3063 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(22)))->Fill(0); | |
3064 | }//point on SDD1 | |
3065 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) { | |
3066 | if(!track->HasPointOnITSLayer(3)) { | |
3067 | ((TH1F *)(fQAAntiProtonsRejectedList->At(23)))->Fill(0); | |
3068 | } | |
3069 | else if(track->HasPointOnITSLayer(3)) | |
3070 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(23)))->Fill(0); | |
3071 | }//point on SDD2 | |
3072 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) { | |
3073 | if(!track->HasPointOnITSLayer(4)) { | |
3074 | ((TH1F *)(fQAAntiProtonsRejectedList->At(24)))->Fill(0); | |
3075 | } | |
3076 | else if(track->HasPointOnITSLayer(4)) | |
3077 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(24)))->Fill(0); | |
3078 | }//point on SSD1 | |
3079 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) { | |
3080 | if(!track->HasPointOnITSLayer(5)) { | |
3081 | ((TH1F *)(fQAAntiProtonsRejectedList->At(25)))->Fill(0); | |
3082 | } | |
3083 | else if(track->HasPointOnITSLayer(5)) | |
3084 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(25)))->Fill(0); | |
3085 | }//point on SSD2 | |
3086 | if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) { | |
3087 | if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) { | |
3088 | ((TH1F *)(fQAAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN()); | |
3089 | } | |
3090 | if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints()) | |
3091 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN()); | |
3092 | }//number of TPC points for the dE/dx | |
71a67ee1 | 3093 | if(fProtonAnalysisBase->IsUsedPointOnSPDLayer()) { |
3094 | if((!track->HasPointOnITSLayer(0))&&(!track->HasPointOnITSLayer(1))) { | |
3095 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
3096 | if(track->HasPointOnITSLayer(iLayer)) | |
3097 | ((TH1F *)(fQAAntiProtonsRejectedList->At(27)))->Fill(iLayer+1); | |
3098 | } | |
3099 | } | |
3100 | else if((track->HasPointOnITSLayer(0))||(track->HasPointOnITSLayer(1))) { | |
3101 | for(Int_t iLayer = 0; iLayer < 6; iLayer++) { | |
3102 | if(track->HasPointOnITSLayer(iLayer)) | |
3103 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(27)))->Fill(iLayer+1); | |
3104 | } | |
3105 | } | |
3106 | }//point on either SPD layers | |
3107 | if(fProtonAnalysisBase->IsUsedMaxDCA3D()) { | |
3108 | if(dca3D > fProtonAnalysisBase->GetMaxDCA3D()) { | |
3109 | ((TH1F *)(fQAAntiProtonsRejectedList->At(28)))->Fill(dca3D); | |
3110 | } | |
3111 | if(dca3D < fProtonAnalysisBase->GetMaxDCA3D()) | |
3112 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(28)))->Fill(dca3D); | |
3113 | }//dca3D | |
735cc63d | 3114 | }//antiprotons |
3115 | } |