]>
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), |
f203beb9 | 57 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
ce9d2201 | 58 | fHistEventStats(0), fYRatioInPtBinsList(0), |
251e4034 | 59 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
60 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
61 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
62 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 63 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 64 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
735cc63d | 65 | fGlobalQAList(0), fQA2DList(0), |
66 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
67 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
68 | fInitQAFlag(kFALSE) { | |
734d2c12 | 69 | //Default constructor |
734d2c12 | 70 | } |
71 | ||
72 | //____________________________________________________________________// | |
0ab648ea | 73 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, |
74 | Float_t fLowY, Float_t fHighY, | |
75 | Int_t nbinsPt, | |
76 | Float_t fLowPt, Float_t fHighPt) : | |
77 | TObject(), fProtonAnalysisBase(0), | |
734d2c12 | 78 | fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY), |
79 | fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt), | |
251e4034 | 80 | fProtonContainer(0), fAntiProtonContainer(0), |
ce9d2201 | 81 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
82 | fHistEventStats(0), fYRatioInPtBinsList(0), | |
251e4034 | 83 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
84 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
85 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
86 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 87 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 88 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
735cc63d | 89 | fGlobalQAList(0), fQA2DList(0), |
90 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
91 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
92 | fInitQAFlag(kFALSE) { | |
734d2c12 | 93 | //Default constructor |
f203beb9 | 94 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
95 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
96 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
3f6d0c08 | 97 | |
0ab648ea | 98 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", |
99 | fNBinsY,fMinY,fMaxY, | |
100 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 101 | fHistYPtProtons->SetStats(kTRUE); |
0ab648ea | 102 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
103 | if(fProtonAnalysisBase->GetEtaMode()) | |
104 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
105 | else | |
106 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 107 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); |
108 | ||
0ab648ea | 109 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", |
110 | fNBinsY,fMinY,fMaxY, | |
111 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 112 | fHistYPtAntiProtons->SetStats(kTRUE); |
0ab648ea | 113 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
114 | if(fProtonAnalysisBase->GetEtaMode()) | |
115 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
116 | else | |
117 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 118 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); |
251e4034 | 119 | |
120 | //setting up the containers | |
121 | Int_t iBin[2]; | |
122 | iBin[0] = nbinsY; | |
123 | iBin[1] = nbinsPt; | |
124 | Double_t *binLimY = new Double_t[nbinsY+1]; | |
125 | Double_t *binLimPt = new Double_t[nbinsPt+1]; | |
126 | //values for bin lower bounds | |
127 | for(Int_t i = 0; i <= nbinsY; i++) | |
128 | binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i; | |
129 | for(Int_t i = 0; i <= nbinsPt; i++) | |
130 | binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i; | |
131 | ||
132 | fProtonContainer = new AliCFContainer("containerProtons", | |
133 | "container for protons", | |
2f1c0f45 | 134 | kNSteps,2,iBin); |
0ab648ea | 135 | fProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta |
251e4034 | 136 | fProtonContainer->SetBinLimits(1,binLimPt); //pT |
137 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
138 | "container for antiprotons", | |
2f1c0f45 | 139 | kNSteps,2,iBin); |
0ab648ea | 140 | fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta |
251e4034 | 141 | fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT |
e56f08ed | 142 | |
143 | //Initialize the QA | |
144 | if(!fInitQAFlag) InitQA(); | |
734d2c12 | 145 | } |
146 | ||
4acc9d4d | 147 | //____________________________________________________________________// |
148 | AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Double_t *gY, | |
149 | Int_t nbinsPt,Double_t *gPt) : | |
150 | TObject(), fProtonAnalysisBase(0), | |
151 | fNBinsY(nbinsY), fMinY(gY[0]), fMaxY(gY[nbinsY]), | |
152 | fNBinsPt(nbinsPt), fMinPt(gPt[0]), fMaxPt(gPt[nbinsPt]), | |
153 | fProtonContainer(0), fAntiProtonContainer(0), | |
ce9d2201 | 154 | fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), |
155 | fHistEventStats(0), fYRatioInPtBinsList(0), | |
4acc9d4d | 156 | fEffGridListProtons(0), fCorrectionListProtons2D(0), |
157 | fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0), | |
158 | fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0), | |
159 | fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0), | |
735cc63d | 160 | fCorrectProtons(0), fCorrectAntiProtons(0), |
336ea0ff | 161 | fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0), |
735cc63d | 162 | fGlobalQAList(0), fQA2DList(0), |
163 | fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0), | |
164 | fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0), | |
165 | fInitQAFlag(kFALSE) { | |
4acc9d4d | 166 | //Default constructor |
f203beb9 | 167 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
168 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
169 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
4acc9d4d | 170 | |
171 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", | |
172 | fNBinsY,gY,fNBinsPt,gPt); | |
173 | fHistYPtProtons->SetStats(kTRUE); | |
174 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
175 | if(fProtonAnalysisBase->GetEtaMode()) | |
176 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
177 | else | |
178 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
179 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
180 | ||
181 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", | |
182 | fNBinsY,gY,fNBinsPt,gPt); | |
183 | fHistYPtAntiProtons->SetStats(kTRUE); | |
184 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
185 | if(fProtonAnalysisBase->GetEtaMode()) | |
186 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
187 | else | |
188 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
189 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
190 | ||
191 | //setting up the containers | |
192 | Int_t iBin[2]; | |
193 | iBin[0] = nbinsY; | |
194 | iBin[1] = nbinsPt; | |
195 | fProtonContainer = new AliCFContainer("containerProtons", | |
196 | "container for protons", | |
2f1c0f45 | 197 | kNSteps,2,iBin); |
4acc9d4d | 198 | fProtonContainer->SetBinLimits(0,gY); //rapidity or eta |
199 | fProtonContainer->SetBinLimits(1,gPt); //pT | |
200 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
201 | "container for antiprotons", | |
2f1c0f45 | 202 | kNSteps,2,iBin); |
4acc9d4d | 203 | fAntiProtonContainer->SetBinLimits(0,gY); //rapidity or eta |
204 | fAntiProtonContainer->SetBinLimits(1,gPt); //pT | |
e56f08ed | 205 | |
206 | //Initialize the QA | |
207 | if(!fInitQAFlag) InitQA(); | |
4acc9d4d | 208 | } |
209 | ||
734d2c12 | 210 | //____________________________________________________________________// |
211 | AliProtonAnalysis::~AliProtonAnalysis() { | |
212 | //Default destructor | |
0ab648ea | 213 | if(fProtonAnalysisBase) delete fProtonAnalysisBase; |
214 | ||
39f2a708 | 215 | if(fHistEvents) delete fHistEvents; |
216 | if(fHistYPtProtons) delete fHistYPtProtons; | |
217 | if(fHistYPtAntiProtons) delete fHistYPtAntiProtons; | |
52b04cf9 | 218 | if(fHistEventStats) delete fHistEventStats; |
ce9d2201 | 219 | if(fYRatioInPtBinsList) delete fYRatioInPtBinsList; |
220 | ||
251e4034 | 221 | if(fProtonContainer) delete fProtonContainer; |
222 | if(fAntiProtonContainer) delete fAntiProtonContainer; | |
223 | ||
251e4034 | 224 | if(fEffGridListProtons) delete fEffGridListProtons; |
cdb3530f | 225 | if(fCorrectionListProtons2D) delete fCorrectionListProtons2D; |
226 | if(fEfficiencyListProtons1D) delete fEfficiencyListProtons1D; | |
227 | if(fCorrectionListProtons1D) delete fCorrectionListProtons1D; | |
251e4034 | 228 | if(fEffGridListAntiProtons) delete fEffGridListAntiProtons; |
cdb3530f | 229 | if(fCorrectionListAntiProtons2D) delete fCorrectionListAntiProtons2D; |
230 | if(fEfficiencyListAntiProtons1D) delete fEfficiencyListAntiProtons1D; | |
231 | if(fCorrectionListAntiProtons1D) delete fCorrectionListAntiProtons1D; | |
251e4034 | 232 | if(fCorrectProtons) delete fCorrectProtons; |
233 | if(fCorrectAntiProtons) delete fCorrectAntiProtons; | |
336ea0ff | 234 | if(fHistEfficiencyYPtProtons) delete fHistEfficiencyYPtProtons; |
235 | if(fHistEfficiencyYPtAntiProtons) delete fHistEfficiencyYPtAntiProtons; | |
735cc63d | 236 | |
237 | //QA lists | |
238 | if(fGlobalQAList) delete fGlobalQAList; | |
239 | if(fQA2DList) delete fQA2DList; | |
240 | if(fQAProtonsAcceptedList) delete fQAProtonsAcceptedList; | |
241 | if(fQAProtonsRejectedList) delete fQAProtonsRejectedList; | |
242 | if(fQAAntiProtonsAcceptedList) delete fQAAntiProtonsAcceptedList; | |
243 | if(fQAAntiProtonsRejectedList) delete fQAAntiProtonsRejectedList; | |
734d2c12 | 244 | } |
245 | ||
246 | //____________________________________________________________________// | |
251e4034 | 247 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, |
248 | Float_t fLowY, Float_t fHighY, | |
249 | Int_t nbinsPt, | |
250 | Float_t fLowPt, Float_t fHighPt) { | |
9cd594db | 251 | //Initializes the histograms |
734d2c12 | 252 | fNBinsY = nbinsY; |
253 | fMinY = fLowY; | |
254 | fMaxY = fHighY; | |
255 | fNBinsPt = nbinsPt; | |
256 | fMinPt = fLowPt; | |
257 | fMaxPt = fHighPt; | |
258 | ||
f203beb9 | 259 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
260 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
261 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
3f6d0c08 | 262 | |
0ab648ea | 263 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", |
264 | fNBinsY,fMinY,fMaxY, | |
265 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 266 | fHistYPtProtons->SetStats(kTRUE); |
0ab648ea | 267 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
268 | if(fProtonAnalysisBase->GetEtaMode()) | |
269 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
270 | else | |
271 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 272 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); |
273 | ||
0ab648ea | 274 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", |
275 | fNBinsY,fMinY,fMaxY, | |
276 | fNBinsPt,fMinPt,fMaxPt); | |
734d2c12 | 277 | fHistYPtAntiProtons->SetStats(kTRUE); |
0ab648ea | 278 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); |
279 | if(fProtonAnalysisBase->GetEtaMode()) | |
280 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
281 | else | |
282 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
734d2c12 | 283 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); |
251e4034 | 284 | |
285 | //setting up the containers | |
286 | Int_t iBin[2]; | |
287 | iBin[0] = nbinsY; | |
288 | iBin[1] = nbinsPt; | |
289 | Double_t *binLimY = new Double_t[nbinsY+1]; | |
290 | Double_t *binLimPt = new Double_t[nbinsPt+1]; | |
291 | //values for bin lower bounds | |
292 | for(Int_t i = 0; i <= nbinsY; i++) | |
293 | binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i; | |
294 | for(Int_t i = 0; i <= nbinsPt; i++) | |
295 | binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i; | |
296 | ||
297 | fProtonContainer = new AliCFContainer("containerProtons", | |
298 | "container for protons", | |
2f1c0f45 | 299 | kNSteps,2,iBin); |
251e4034 | 300 | fProtonContainer->SetBinLimits(0,binLimY); //rapidity |
301 | fProtonContainer->SetBinLimits(1,binLimPt); //pT | |
302 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
303 | "container for antiprotons", | |
2f1c0f45 | 304 | kNSteps,2,iBin); |
251e4034 | 305 | fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity |
306 | fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT | |
e56f08ed | 307 | |
308 | //Initialize the QA | |
309 | if(!fInitQAFlag) InitQA(); | |
734d2c12 | 310 | } |
311 | ||
4acc9d4d | 312 | //____________________________________________________________________// |
313 | void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Double_t *gY, | |
314 | Int_t nbinsPt, Double_t *gPt) { | |
315 | //Initializes the histograms using asymmetric values - global tracking | |
316 | fNBinsY = nbinsY; | |
317 | fMinY = gY[0]; | |
318 | fMaxY = gY[nbinsY]; | |
319 | fNBinsPt = nbinsPt; | |
320 | fMinPt = gPt[0]; | |
321 | fMaxPt = gPt[nbinsPt]; | |
322 | ||
f203beb9 | 323 | fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5); |
324 | fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events"); | |
325 | fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons"); | |
4acc9d4d | 326 | |
327 | fHistYPtProtons = new TH2D("fHistYPtProtons","Protons", | |
328 | fNBinsY,gY,fNBinsPt,gPt); | |
329 | fHistYPtProtons->SetStats(kTRUE); | |
330 | fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
331 | if(fProtonAnalysisBase->GetEtaMode()) | |
332 | fHistYPtProtons->GetXaxis()->SetTitle("#eta"); | |
333 | else | |
334 | fHistYPtProtons->GetXaxis()->SetTitle("y"); | |
335 | fHistYPtProtons->GetXaxis()->SetTitleColor(1); | |
336 | ||
337 | fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons", | |
338 | fNBinsY,gY,fNBinsPt,gPt); | |
339 | fHistYPtAntiProtons->SetStats(kTRUE); | |
340 | fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]"); | |
341 | if(fProtonAnalysisBase->GetEtaMode()) | |
342 | fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta"); | |
343 | else | |
344 | fHistYPtAntiProtons->GetXaxis()->SetTitle("y"); | |
345 | fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1); | |
346 | ||
347 | //setting up the containers | |
348 | Int_t iBin[2]; | |
349 | iBin[0] = nbinsY; | |
350 | iBin[1] = nbinsPt; | |
351 | ||
352 | fProtonContainer = new AliCFContainer("containerProtons", | |
353 | "container for protons", | |
2f1c0f45 | 354 | kNSteps,2,iBin); |
4acc9d4d | 355 | fProtonContainer->SetBinLimits(0,gY); //rapidity |
356 | fProtonContainer->SetBinLimits(1,gPt); //pT | |
357 | fAntiProtonContainer = new AliCFContainer("containerAntiProtons", | |
358 | "container for antiprotons", | |
2f1c0f45 | 359 | kNSteps,2,iBin); |
4acc9d4d | 360 | fAntiProtonContainer->SetBinLimits(0,gY); //rapidity |
361 | fAntiProtonContainer->SetBinLimits(1,gPt); //pT | |
e56f08ed | 362 | |
363 | //Initialize the QA | |
364 | if(!fInitQAFlag) InitQA(); | |
4acc9d4d | 365 | } |
366 | ||
734d2c12 | 367 | //____________________________________________________________________// |
2b748670 | 368 | Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) { |
9cd594db | 369 | //Read the containers from the existing file |
2b748670 | 370 | Bool_t status = kTRUE; |
371 | ||
734d2c12 | 372 | TFile *file = TFile::Open(filename); |
2b748670 | 373 | if(!file) { |
374 | cout<<"Could not find the input file "<<filename<<endl; | |
375 | status = kFALSE; | |
376 | } | |
377 | ||
0ab648ea | 378 | TList *list = (TList *)file->Get("outputList"); |
2b748670 | 379 | if(list) { |
380 | cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl; | |
251e4034 | 381 | fHistYPtProtons = (TH2D *)list->At(0); |
382 | fHistYPtAntiProtons = (TH2D *)list->At(1); | |
3f6d0c08 | 383 | fHistEvents = (TH1I *)list->At(2); |
251e4034 | 384 | fProtonContainer = (AliCFContainer *)list->At(3); |
385 | fAntiProtonContainer = (AliCFContainer *)list->At(4); | |
52b04cf9 | 386 | fHistEventStats = (TH1F *)list->At(5); |
2b748670 | 387 | } |
388 | else if(!list) { | |
389 | cout<<"Retrieving objects from the file... "<<endl; | |
251e4034 | 390 | fHistYPtProtons = (TH2D *)file->Get("fHistYPtProtons"); |
391 | fHistYPtAntiProtons = (TH2D *)file->Get("fHistYPtAntiProtons"); | |
3f6d0c08 | 392 | fHistEvents = (TH1I *)file->Get("fHistEvents"); |
251e4034 | 393 | fProtonContainer = (AliCFContainer *)file->Get("containerProtons"); |
394 | fAntiProtonContainer = (AliCFContainer *)file->Get("containerAntiProtons"); | |
52b04cf9 | 395 | fHistEventStats = (TH1F *)file->Get("fHistEventStats"); |
2b748670 | 396 | } |
251e4034 | 397 | if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents) |
52b04cf9 | 398 | ||(!fProtonContainer)||(!fAntiProtonContainer)||(!fHistEventStats)) { |
2b748670 | 399 | cout<<"Input containers were not found!!!"<<endl; |
400 | status = kFALSE; | |
401 | } | |
402 | else { | |
3e23254a | 403 | //fHistYPtProtons = fProtonContainer->ShowProjection(0,1,0); |
404 | //fHistYPtAntiProtons = fAntiProtonContainer->ShowProjection(0,1,0); | |
405 | fHistYPtProtons->Sumw2(); | |
406 | fHistYPtAntiProtons->Sumw2(); | |
2b748670 | 407 | } |
408 | ||
409 | return status; | |
734d2c12 | 410 | } |
411 | ||
ce9d2201 | 412 | //____________________________________________________________________// |
413 | TList *AliProtonAnalysis::GetYRatioHistogramsInPtBins() { | |
414 | //Returns a TList obkect with the eta (or y) dependent ratios for each | |
415 | //pT bin taken from the 2D histograms (not from the containers) | |
416 | fYRatioInPtBinsList = new TList(); | |
417 | ||
418 | //Protons | |
419 | TH1D *gHistYProtons[100]; | |
420 | TString title; | |
421 | for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) { | |
422 | title = "gHistYProtons_PtBin"; title += iBin; | |
423 | gHistYProtons[iBin] = (TH1D *)fHistYPtProtons->ProjectionX(title.Data(), | |
424 | iBin, | |
425 | iBin,"e"); | |
426 | gHistYProtons[iBin]->Sumw2(); | |
427 | } | |
428 | ||
429 | //Antiprotons | |
430 | TH1D *gHistYAntiProtons[100]; | |
431 | for(Int_t iBin = 1; iBin <= fHistYPtAntiProtons->GetNbinsY(); iBin++) { | |
432 | title = "gHistYAntiProtons_PtBin"; title += iBin; | |
433 | gHistYAntiProtons[iBin] = (TH1D *)fHistYPtAntiProtons->ProjectionX(title.Data(), | |
434 | iBin, | |
435 | iBin,"e"); | |
436 | gHistYAntiProtons[iBin]->Sumw2(); | |
437 | } | |
438 | ||
439 | Double_t pTmin = fHistYPtProtons->GetYaxis()->GetXmin(); | |
440 | Double_t pTStep = (fHistYPtProtons->GetYaxis()->GetXmax() - fHistYPtProtons->GetYaxis()->GetXmin())/fHistYPtProtons->GetNbinsY(); | |
441 | Double_t pTmax = pTmin + pTStep; | |
442 | //Ratio | |
443 | TH1D *gHistYRatio[100]; | |
444 | for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) { | |
445 | title = "gHistYRatio_PtBin"; title += iBin; | |
446 | gHistYRatio[iBin] = new TH1D(title.Data(),"", | |
447 | fHistYPtProtons->GetNbinsX(), | |
448 | fHistYPtProtons->GetXaxis()->GetXmin(), | |
449 | fHistYPtProtons->GetXaxis()->GetXmax()); | |
450 | title = "Pt: "; title += pTmin; title += " - "; title += pTmax; | |
451 | gHistYRatio[iBin]->SetTitle(title.Data()); | |
452 | gHistYRatio[iBin]->GetYaxis()->SetTitle("#bar{p}/p"); | |
453 | gHistYRatio[iBin]->GetXaxis()->SetTitle(fHistYPtProtons->GetXaxis()->GetTitle()); | |
454 | gHistYRatio[iBin]->Divide(gHistYAntiProtons[iBin], | |
455 | gHistYProtons[iBin],1.0,1.0); | |
456 | fYRatioInPtBinsList->Add(gHistYRatio[iBin]); | |
457 | pTmin += pTStep; | |
458 | pTmax += pTStep; | |
459 | } | |
460 | ||
461 | return fYRatioInPtBinsList; | |
462 | } | |
463 | ||
734d2c12 | 464 | //____________________________________________________________________// |
465 | TH1D *AliProtonAnalysis::GetProtonYHistogram() { | |
9cd594db | 466 | //Get the y histogram for protons |
3f6d0c08 | 467 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
251e4034 | 468 | |
f203beb9 | 469 | //TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),""); |
8d64ac62 | 470 | TH1D *fYProtons = fProtonContainer->ShowProjection(0,kStepInPhaseSpace); //variable-step |
251e4034 | 471 | |
734d2c12 | 472 | fYProtons->SetStats(kFALSE); |
3f6d0c08 | 473 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 474 | fYProtons->SetTitle("dN/dy protons"); |
475 | fYProtons->SetMarkerStyle(kFullCircle); | |
476 | fYProtons->SetMarkerColor(4); | |
3f6d0c08 | 477 | if(nAnalyzedEvents > 0) |
251e4034 | 478 | fYProtons->Scale(1./nAnalyzedEvents); |
479 | ||
734d2c12 | 480 | return fYProtons; |
481 | } | |
482 | ||
483 | //____________________________________________________________________// | |
484 | TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() { | |
9cd594db | 485 | //Get the y histogram for antiprotons |
3f6d0c08 | 486 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 487 | |
f203beb9 | 488 | //TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),""); |
8d64ac62 | 489 | TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,kStepInPhaseSpace);//variable-step |
251e4034 | 490 | |
734d2c12 | 491 | fYAntiProtons->SetStats(kFALSE); |
3f6d0c08 | 492 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); |
734d2c12 | 493 | fYAntiProtons->SetTitle("dN/dy antiprotons"); |
494 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
495 | fYAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 496 | if(nAnalyzedEvents > 0) |
497 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 498 | |
499 | return fYAntiProtons; | |
500 | } | |
501 | ||
502 | //____________________________________________________________________// | |
503 | TH1D *AliProtonAnalysis::GetProtonPtHistogram() { | |
9cd594db | 504 | //Get the Pt histogram for protons |
3f6d0c08 | 505 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 506 | |
f203beb9 | 507 | //TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); |
8d64ac62 | 508 | TH1D *fPtProtons = fProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step |
251e4034 | 509 | |
734d2c12 | 510 | fPtProtons->SetStats(kFALSE); |
3f6d0c08 | 511 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 512 | fPtProtons->SetTitle("dN/dPt protons"); |
513 | fPtProtons->SetMarkerStyle(kFullCircle); | |
514 | fPtProtons->SetMarkerColor(4); | |
3f6d0c08 | 515 | if(nAnalyzedEvents > 0) |
516 | fPtProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 517 | |
518 | return fPtProtons; | |
519 | } | |
520 | ||
521 | //____________________________________________________________________// | |
522 | TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() { | |
9cd594db | 523 | //Get the Pt histogram for antiprotons |
3f6d0c08 | 524 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
3e23254a | 525 | |
f203beb9 | 526 | //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),""); |
8d64ac62 | 527 | TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step |
251e4034 | 528 | |
734d2c12 | 529 | fPtAntiProtons->SetStats(kFALSE); |
3f6d0c08 | 530 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); |
734d2c12 | 531 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); |
532 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
533 | fPtAntiProtons->SetMarkerColor(4); | |
3f6d0c08 | 534 | if(nAnalyzedEvents > 0) |
535 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
734d2c12 | 536 | |
537 | return fPtAntiProtons; | |
538 | } | |
539 | ||
251e4034 | 540 | //____________________________________________________________________// |
541 | TH1D *AliProtonAnalysis::GetProtonCorrectedYHistogram() { | |
9cd594db | 542 | //Get the corrected y histogram for protons |
251e4034 | 543 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
544 | ||
336ea0ff | 545 | TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",1,fHistYPtProtons->GetYaxis()->GetNbins(),"e"); |
546 | //TH1D *fYProtons = fCorrectProtons->Project(0); //0: rapidity | |
251e4034 | 547 | |
548 | fYProtons->SetStats(kFALSE); | |
549 | fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); | |
550 | fYProtons->GetXaxis()->SetTitle("y"); | |
551 | fYProtons->SetTitle("dN/dy protons"); | |
552 | fYProtons->SetMarkerStyle(kFullCircle); | |
553 | fYProtons->SetMarkerColor(4); | |
554 | if(nAnalyzedEvents > 0) | |
555 | fYProtons->Scale(1./nAnalyzedEvents); | |
556 | ||
557 | return fYProtons; | |
558 | } | |
559 | ||
560 | //____________________________________________________________________// | |
561 | TH1D *AliProtonAnalysis::GetAntiProtonCorrectedYHistogram() { | |
9cd594db | 562 | //Get the corrected y histogram for antiprotons |
251e4034 | 563 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
336ea0ff | 564 | |
565 | TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",1,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"e"); | |
566 | //TH1D *fYAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity | |
251e4034 | 567 | |
568 | fYAntiProtons->SetStats(kFALSE); | |
569 | fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)"); | |
570 | fYAntiProtons->GetXaxis()->SetTitle("y"); | |
571 | fYAntiProtons->SetTitle("dN/dy protons"); | |
572 | fYAntiProtons->SetMarkerStyle(kFullCircle); | |
573 | fYAntiProtons->SetMarkerColor(4); | |
574 | if(nAnalyzedEvents > 0) | |
575 | fYAntiProtons->Scale(1./nAnalyzedEvents); | |
576 | ||
577 | return fYAntiProtons; | |
578 | } | |
579 | ||
580 | //____________________________________________________________________// | |
581 | TH1D *AliProtonAnalysis::GetProtonCorrectedPtHistogram() { | |
9cd594db | 582 | //Get the corrected Pt histogram for protons |
251e4034 | 583 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
584 | ||
336ea0ff | 585 | TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",1,fHistYPtProtons->GetXaxis()->GetNbins(),"e"); |
586 | //TH1D *fPtProtons = fCorrectProtons->Project(0); //0: rapidity | |
251e4034 | 587 | |
588 | fPtProtons->SetStats(kFALSE); | |
589 | fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); | |
590 | fPtProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
591 | fPtProtons->SetTitle("dN/dPt protons"); | |
592 | fPtProtons->SetMarkerStyle(kFullCircle); | |
593 | fPtProtons->SetMarkerColor(4); | |
594 | if(nAnalyzedEvents > 0) | |
595 | fPtProtons->Scale(1./nAnalyzedEvents); | |
596 | ||
597 | return fPtProtons; | |
598 | } | |
599 | ||
600 | //____________________________________________________________________// | |
601 | TH1D *AliProtonAnalysis::GetAntiProtonCorrectedPtHistogram() { | |
9cd594db | 602 | //Get the corrected Pt histogram for antiprotons |
251e4034 | 603 | Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents(); |
604 | ||
336ea0ff | 605 | TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",1,fHistYPtAntiProtons->GetXaxis()->GetNbins(),"e"); |
606 | //TH1D *fPtAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity | |
251e4034 | 607 | |
608 | fPtAntiProtons->SetStats(kFALSE); | |
609 | fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})"); | |
610 | fPtAntiProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
611 | fPtAntiProtons->SetTitle("dN/dPt antiprotons"); | |
612 | fPtAntiProtons->SetMarkerStyle(kFullCircle); | |
613 | fPtAntiProtons->SetMarkerColor(4); | |
614 | if(nAnalyzedEvents > 0) | |
615 | fPtAntiProtons->Scale(1./nAnalyzedEvents); | |
616 | ||
617 | return fPtAntiProtons; | |
618 | } | |
619 | ||
734d2c12 | 620 | //____________________________________________________________________// |
621 | TH1D *AliProtonAnalysis::GetYRatioHistogram() { | |
3e23254a | 622 | //Returns the rapidity dependence of the ratio (uncorrected) |
734d2c12 | 623 | TH1D *fYProtons = GetProtonYHistogram(); |
624 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
625 | ||
626 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
627 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0); | |
628 | hRatioY->SetMarkerStyle(kFullCircle); | |
629 | hRatioY->SetMarkerColor(4); | |
630 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
631 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
632 | hRatioY->GetXaxis()->SetTitle("y"); | |
633 | hRatioY->GetXaxis()->SetTitleColor(1); | |
634 | hRatioY->SetStats(kFALSE); | |
635 | ||
636 | return hRatioY; | |
637 | } | |
638 | ||
3e23254a | 639 | //____________________________________________________________________// |
336ea0ff | 640 | TH1D *AliProtonAnalysis::GetYRatioCorrectedHistogram() { |
641 | //TH2D *gCorrectionProtons, | |
642 | //TH2D *gCorrectionAntiProtons) { | |
3e23254a | 643 | //Returns the rapidity dependence of the ratio (corrected) |
336ea0ff | 644 | //fHistYPtProtons->Multiply(gCorrectionProtons); |
645 | TH1D *fYProtons = GetProtonCorrectedYHistogram(); | |
646 | //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons); | |
647 | TH1D *fYAntiProtons = GetAntiProtonCorrectedYHistogram(); | |
3e23254a | 648 | |
649 | TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
650 | hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0); | |
651 | hRatioY->SetMarkerStyle(kFullCircle); | |
652 | hRatioY->SetMarkerColor(4); | |
653 | hRatioY->GetYaxis()->SetTitle("#bar{p}/p"); | |
654 | hRatioY->GetYaxis()->SetTitleOffset(1.4); | |
655 | hRatioY->GetXaxis()->SetTitle("y"); | |
656 | hRatioY->GetXaxis()->SetTitleColor(1); | |
657 | hRatioY->SetStats(kFALSE); | |
658 | ||
659 | return hRatioY; | |
660 | } | |
661 | ||
734d2c12 | 662 | //____________________________________________________________________// |
663 | TH1D *AliProtonAnalysis::GetPtRatioHistogram() { | |
3e23254a | 664 | //Returns the pT dependence of the ratio (uncorrected) |
734d2c12 | 665 | TH1D *fPtProtons = GetProtonPtHistogram(); |
666 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
667 | ||
668 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
669 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0); | |
670 | hRatioPt->SetMarkerStyle(kFullCircle); | |
671 | hRatioPt->SetMarkerColor(4); | |
672 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
673 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
674 | hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
675 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
676 | hRatioPt->SetStats(kFALSE); | |
677 | ||
678 | return hRatioPt; | |
679 | } | |
680 | ||
3e23254a | 681 | //____________________________________________________________________// |
336ea0ff | 682 | TH1D *AliProtonAnalysis::GetPtRatioCorrectedHistogram() { |
683 | //TH2D *gCorrectionProtons, | |
684 | //TH2D *gCorrectionAntiProtons) { | |
3e23254a | 685 | //Returns the Pt dependence of the ratio (corrected) |
336ea0ff | 686 | //fHistYPtProtons->Multiply(gCorrectionProtons); |
687 | TH1D *fPtProtons = GetProtonCorrectedPtHistogram(); | |
688 | //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons); | |
689 | TH1D *fPtAntiProtons = GetAntiProtonCorrectedPtHistogram(); | |
3e23254a | 690 | |
691 | TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
692 | hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0); | |
693 | hRatioPt->SetMarkerStyle(kFullCircle); | |
694 | hRatioPt->SetMarkerColor(4); | |
695 | hRatioPt->GetYaxis()->SetTitle("#bar{p}/p"); | |
696 | hRatioPt->GetYaxis()->SetTitleOffset(1.4); | |
697 | hRatioPt->GetXaxis()->SetTitle("y"); | |
698 | hRatioPt->GetXaxis()->SetTitleColor(1); | |
699 | hRatioPt->SetStats(kFALSE); | |
700 | ||
701 | return hRatioPt; | |
702 | } | |
703 | ||
734d2c12 | 704 | //____________________________________________________________________// |
705 | TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() { | |
3e23254a | 706 | //Returns the rapidity dependence of the asymmetry (uncorrected) |
734d2c12 | 707 | TH1D *fYProtons = GetProtonYHistogram(); |
708 | TH1D *fYAntiProtons = GetAntiProtonYHistogram(); | |
709 | ||
710 | TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
711 | hsum->Add(fYProtons,fYAntiProtons,1.0,1.0); | |
712 | ||
713 | TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
714 | hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0); | |
715 | ||
716 | TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax()); | |
717 | hAsymmetryY->Divide(hdiff,hsum,2.0,1.); | |
718 | hAsymmetryY->SetMarkerStyle(kFullCircle); | |
719 | hAsymmetryY->SetMarkerColor(4); | |
720 | hAsymmetryY->GetYaxis()->SetTitle("A_{p}"); | |
721 | hAsymmetryY->GetYaxis()->SetTitleOffset(1.4); | |
722 | hAsymmetryY->GetXaxis()->SetTitle("y"); | |
723 | hAsymmetryY->GetXaxis()->SetTitleColor(1); | |
724 | hAsymmetryY->SetStats(kFALSE); | |
725 | ||
726 | return hAsymmetryY; | |
727 | } | |
728 | ||
729 | //____________________________________________________________________// | |
730 | TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() { | |
3e23254a | 731 | //Returns the pT dependence of the asymmetry (uncorrected) |
734d2c12 | 732 | TH1D *fPtProtons = GetProtonPtHistogram(); |
733 | TH1D *fPtAntiProtons = GetAntiProtonPtHistogram(); | |
734 | ||
735 | TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
736 | hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0); | |
737 | ||
738 | TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
739 | hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0); | |
740 | ||
741 | TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax()); | |
742 | hAsymmetryPt->Divide(hdiff,hsum,2.0,1.); | |
743 | hAsymmetryPt->SetMarkerStyle(kFullCircle); | |
744 | hAsymmetryPt->SetMarkerColor(4); | |
745 | hAsymmetryPt->GetYaxis()->SetTitle("A_{p}"); | |
746 | hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4); | |
747 | hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]"); | |
748 | hAsymmetryPt->GetXaxis()->SetTitleColor(1); | |
749 | hAsymmetryPt->SetStats(kFALSE); | |
750 | ||
751 | return hAsymmetryPt; | |
752 | } | |
753 | ||
754 | //____________________________________________________________________// | |
6667f3a7 | 755 | void AliProtonAnalysis::Analyze(AliESDEvent* esd, |
756 | const AliESDVertex *vertex) { | |
e4358d7f | 757 | //Main analysis part - ESD |
0ab648ea | 758 | Int_t nTracks = 0; |
759 | Int_t nIdentifiedProtons = 0, nIdentifiedAntiProtons = 0; | |
760 | Int_t nSurvivedProtons = 0, nSurvivedAntiProtons = 0; | |
ff672838 | 761 | |
762 | //=========================================// | |
763 | //Aleph parametrization | |
764 | Double_t fAlephParameters[5]; | |
765 | if(fProtonAnalysisBase->GetMCAnalysisMode()) { | |
766 | fAlephParameters[0] = 2.15898e+00/50.; | |
767 | fAlephParameters[1] = 1.75295e+01; | |
768 | fAlephParameters[2] = 3.40030e-09; | |
769 | fAlephParameters[3] = 1.96178e+00; | |
770 | fAlephParameters[4] = 3.91720e+00; | |
771 | } | |
772 | else { | |
773 | fAlephParameters[0] = 0.0283086; | |
774 | fAlephParameters[1] = 2.63394e+01; | |
775 | fAlephParameters[2] = 5.04114e-11; | |
776 | fAlephParameters[3] = 2.12543e+00; | |
777 | fAlephParameters[4] = 4.88663e+00; | |
778 | } | |
779 | AliESDpid *fESDpid = new AliESDpid(); | |
780 | AliTPCPIDResponse tpcResponse = fESDpid->GetTPCResponse(); | |
781 | tpcResponse.SetBetheBlochParameters(fAlephParameters[0],fAlephParameters[1],fAlephParameters[2],fAlephParameters[3],fAlephParameters[4]); | |
782 | //=========================================// | |
0ab648ea | 783 | |
f203beb9 | 784 | fHistEvents->Fill(1); //number of analyzed events |
251e4034 | 785 | Double_t containerInput[2] ; |
9cd594db | 786 | Double_t gPt = 0.0, gP = 0.0; |
0ab648ea | 787 | nTracks = esd->GetNumberOfTracks(); |
788 | for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) { | |
6667f3a7 | 789 | AliESDtrack* track = esd->GetTrack(iTracks); |
df1e8a78 | 790 | AliESDtrack trackTPC; |
2b748670 | 791 | |
32a2ebb6 | 792 | //in case it's a TPC only track relate it to the proper vertex |
0ab648ea | 793 | /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC) { |
df1e8a78 | 794 | Float_t p[2],cov[3]; |
795 | track->GetImpactParametersTPC(p,cov); | |
796 | if (p[0]==0 && p[1]==0) | |
6667f3a7 | 797 | track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig); |
df1e8a78 | 798 | if (!track->FillTPCOnlyTrack(trackTPC)) { |
32a2ebb6 | 799 | continue; |
df1e8a78 | 800 | } |
801 | track = &trackTPC ; | |
0ab648ea | 802 | }*/ |
df1e8a78 | 803 | |
37cb8683 | 804 | Int_t fIdxInt[200]; |
805 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
806 | Int_t npointsTPCdEdx = track->GetTPCsignalN(); | |
4de4661f | 807 | Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance. |
37cb8683 | 808 | |
0ab648ea | 809 | if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) { |
810 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
811 | if(!tpcTrack) continue; | |
812 | gPt = tpcTrack->Pt(); | |
813 | gP = tpcTrack->P(); | |
4de4661f | 814 | |
815 | tpcTrack->PropagateToDCA(vertex, | |
816 | esd->GetMagneticField(), | |
817 | 100.,dca,cov); | |
818 | ||
e56f08ed | 819 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { |
30f87a5b | 820 | if(fProtonAnalysisBase->IsAccepted(track)) { |
4de4661f | 821 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 822 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
823 | ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(), | |
4de4661f | 824 | tpcTrack->Phi()*180./TMath::Pi(), |
825 | npointsTPCdEdx); | |
ff672838 | 826 | ((TH3F *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(), |
4de4661f | 827 | tpcTrack->Phi()*180./TMath::Pi(), |
828 | nClustersTPC); | |
ff672838 | 829 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, |
4de4661f | 830 | tpcTrack->Phi()*180./TMath::Pi(), |
831 | npointsTPCdEdx); | |
ff672838 | 832 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, |
4de4661f | 833 | tpcTrack->Phi()*180./TMath::Pi(), |
834 | nClustersTPC); | |
e56f08ed | 835 | }//quality cuts |
836 | }//primary cuts | |
4de4661f | 837 | |
838 | if(fProtonAnalysisBase->IsProton(track)) { | |
839 | //Step: kStepIdentified | |
840 | if(fProtonAnalysisBase->GetEtaMode()) | |
841 | containerInput[0] = tpcTrack->Eta(); | |
842 | else | |
843 | containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(), | |
844 | tpcTrack->Py(), | |
845 | tpcTrack->Pz()); | |
846 | containerInput[1] = gPt; | |
847 | if(tpcTrack->Charge() > 0) { | |
735cc63d | 848 | nIdentifiedProtons += 1; |
4de4661f | 849 | fProtonContainer->Fill(containerInput,kStepIdentified); |
850 | }//protons | |
851 | else if(tpcTrack->Charge() < 0) { | |
735cc63d | 852 | nIdentifiedAntiProtons += 1; |
4de4661f | 853 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); |
854 | }//protons | |
855 | ||
856 | //Step: kStepIsPrimary | |
857 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
858 | if(tpcTrack->Charge() > 0) | |
859 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
860 | else if(tpcTrack->Charge() < 0) | |
e56f08ed | 861 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); |
4de4661f | 862 | |
863 | FillQA(esd,vertex,track); | |
864 | ||
865 | //Step: kStepSurvived | |
30f87a5b | 866 | if(fProtonAnalysisBase->IsAccepted(track)) { |
e56f08ed | 867 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 868 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
869 | ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(), | |
e56f08ed | 870 | tpcTrack->Phi()*180./TMath::Pi(), |
871 | npointsTPCdEdx); | |
ff672838 | 872 | ((TH3F *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(), |
e56f08ed | 873 | tpcTrack->Phi()*180./TMath::Pi(), |
874 | nClustersTPC); | |
ff672838 | 875 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, |
e56f08ed | 876 | tpcTrack->Phi()*180./TMath::Pi(), |
877 | npointsTPCdEdx); | |
ff672838 | 878 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, |
e56f08ed | 879 | tpcTrack->Phi()*180./TMath::Pi(), |
880 | nClustersTPC); | |
e56f08ed | 881 | |
4de4661f | 882 | if(tpcTrack->Charge() > 0) { |
883 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 884 | ((TH2F *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(), |
4de4661f | 885 | tpcTrack->Phi()*180./TMath::Pi()); |
ff672838 | 886 | ((TH2F *)(fQA2DList->At(14)))->Fill(tpcTrack->Pt(), |
4de4661f | 887 | TMath::Abs(dca[0])); |
ff672838 | 888 | ((TH2F *)(fQA2DList->At(15)))->Fill(tpcTrack->Pt(), |
4de4661f | 889 | TMath::Abs(dca[1])); |
890 | }//protons | |
891 | else if(tpcTrack->Charge() < 0) { | |
892 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 893 | ((TH2F *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(), |
4de4661f | 894 | tpcTrack->Phi()*180./TMath::Pi()); |
ff672838 | 895 | ((TH2F *)(fQA2DList->At(16)))->Fill(tpcTrack->Pt(), |
4de4661f | 896 | TMath::Abs(dca[0])); |
ff672838 | 897 | ((TH2F *)(fQA2DList->At(17)))->Fill(tpcTrack->Pt(), |
4de4661f | 898 | TMath::Abs(dca[1])); |
899 | }//antiprotons | |
900 | ||
901 | //Step: kStepInPhaseSpace | |
902 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
903 | if(tpcTrack->Charge() > 0) { | |
904 | nSurvivedProtons += 1; | |
905 | fHistYPtProtons->Fill(containerInput[0], | |
906 | containerInput[1]); | |
907 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
908 | }//protons | |
909 | else if(tpcTrack->Charge() < 0) { | |
910 | nSurvivedAntiProtons += 1; | |
911 | fHistYPtAntiProtons->Fill(containerInput[0], | |
912 | containerInput[1]); | |
913 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
914 | }//antiprotons | |
915 | }//Step: kStepInPhaseSpace | |
916 | }//Step: kStepSurvived | |
917 | }//Step: kStepIsPrimary | |
918 | }//Step: kStepIdentified | |
0ab648ea | 919 | }//TPC only tracks |
920 | else if(fProtonAnalysisBase->GetAnalysisMode() == AliProtonAnalysisBase::kGlobal) { | |
921 | gPt = track->Pt(); | |
922 | gP = track->P(); | |
4de4661f | 923 | track->PropagateToDCA(vertex, |
924 | esd->GetMagneticField(), | |
925 | 100.,dca,cov); | |
926 | ||
927 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
30f87a5b | 928 | if(fProtonAnalysisBase->IsAccepted(track)) { |
4de4661f | 929 | ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 930 | ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
931 | ((TH3F *)(fQA2DList->At(4)))->Fill(track->Eta(), | |
4de4661f | 932 | track->Phi()*180./TMath::Pi(), |
933 | npointsTPCdEdx); | |
ff672838 | 934 | ((TH3F *)(fQA2DList->At(6)))->Fill(track->Eta(), |
4de4661f | 935 | track->Phi()*180./TMath::Pi(), |
936 | nClustersTPC); | |
ff672838 | 937 | ((TH3F *)(fQA2DList->At(8)))->Fill(gPt, |
4de4661f | 938 | track->Phi()*180./TMath::Pi(), |
939 | npointsTPCdEdx); | |
ff672838 | 940 | ((TH3F *)(fQA2DList->At(10)))->Fill(gPt, |
4de4661f | 941 | track->Phi()*180./TMath::Pi(), |
942 | nClustersTPC); | |
e56f08ed | 943 | }//quality cuts |
944 | }//primary cuts | |
4de4661f | 945 | |
946 | if(fProtonAnalysisBase->IsProton(track)) { | |
947 | //Step: kStepIdentified | |
948 | if(fProtonAnalysisBase->GetEtaMode()) | |
949 | containerInput[0] = track->Eta(); | |
950 | else | |
951 | containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(), | |
952 | track->Py(), | |
953 | track->Pz()); | |
954 | containerInput[1] = gPt; | |
955 | if(track->Charge() > 0) { | |
0ab648ea | 956 | nIdentifiedProtons += 1; |
4de4661f | 957 | fProtonContainer->Fill(containerInput,kStepIdentified); |
958 | }//protons | |
959 | else if(track->Charge() < 0) { | |
0ab648ea | 960 | nIdentifiedAntiProtons += 1; |
4de4661f | 961 | fAntiProtonContainer->Fill(containerInput,kStepIdentified); |
962 | }//protons | |
963 | ||
964 | //Step: kStepIsPrimary | |
965 | if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) { | |
966 | if(track->Charge() > 0) | |
967 | fProtonContainer->Fill(containerInput,kStepIsPrimary); | |
968 | else if(track->Charge() < 0) | |
e56f08ed | 969 | fAntiProtonContainer->Fill(containerInput,kStepIsPrimary); |
4de4661f | 970 | |
971 | FillQA(esd,vertex,track); | |
972 | ||
973 | //Step: kStepSurvived | |
30f87a5b | 974 | if(fProtonAnalysisBase->IsAccepted(track)) { |
e56f08ed | 975 | ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal()); |
ff672838 | 976 | ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton))); |
977 | ((TH3F *)(fQA2DList->At(5)))->Fill(track->Eta(), | |
e56f08ed | 978 | track->Phi()*180./TMath::Pi(), |
979 | npointsTPCdEdx); | |
ff672838 | 980 | ((TH3F *)(fQA2DList->At(7)))->Fill(track->Eta(), |
e56f08ed | 981 | track->Phi()*180./TMath::Pi(), |
982 | nClustersTPC); | |
ff672838 | 983 | ((TH3F *)(fQA2DList->At(9)))->Fill(gPt, |
e56f08ed | 984 | track->Phi()*180./TMath::Pi(), |
985 | npointsTPCdEdx); | |
ff672838 | 986 | ((TH3F *)(fQA2DList->At(11)))->Fill(gPt, |
e56f08ed | 987 | track->Phi()*180./TMath::Pi(), |
988 | nClustersTPC); | |
e56f08ed | 989 | |
4de4661f | 990 | if(track->Charge() > 0) { |
991 | fProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 992 | ((TH2F *)(fQA2DList->At(12)))->Fill(track->Eta(), |
4de4661f | 993 | track->Phi()*180./TMath::Pi()); |
ff672838 | 994 | ((TH2F *)(fQA2DList->At(14)))->Fill(track->Pt(), |
4de4661f | 995 | TMath::Abs(dca[0])); |
ff672838 | 996 | ((TH2F *)(fQA2DList->At(15)))->Fill(track->Pt(), |
4de4661f | 997 | TMath::Abs(dca[1])); |
998 | }//protons | |
999 | else if(track->Charge() < 0) { | |
1000 | fAntiProtonContainer->Fill(containerInput,kStepSurvived); | |
ff672838 | 1001 | ((TH2F *)(fQA2DList->At(13)))->Fill(track->Eta(), |
4de4661f | 1002 | track->Phi()*180./TMath::Pi()); |
ff672838 | 1003 | ((TH2F *)(fQA2DList->At(16)))->Fill(track->Pt(), |
4de4661f | 1004 | TMath::Abs(dca[0])); |
ff672838 | 1005 | ((TH2F *)(fQA2DList->At(17)))->Fill(track->Pt(), |
4de4661f | 1006 | TMath::Abs(dca[1])); |
1007 | }//antiprotons | |
1008 | ||
1009 | //Step: kStepInPhaseSpace | |
1010 | if(fProtonAnalysisBase->IsInPhaseSpace(track)) { | |
1011 | if(track->Charge() > 0) { | |
1012 | nSurvivedProtons += 1; | |
1013 | fHistYPtProtons->Fill(containerInput[0], | |
1014 | containerInput[1]); | |
1015 | fProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1016 | }//protons | |
1017 | else if(track->Charge() < 0) { | |
1018 | nSurvivedAntiProtons += 1; | |
1019 | fHistYPtAntiProtons->Fill(containerInput[0], | |
1020 | containerInput[1]); | |
1021 | fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace); | |
1022 | }//antiprotons | |
1023 | }//Step: kStepInPhaseSpace | |
1024 | }//Step: kStepSurvived | |
1025 | }//Step: kStepIsPrimary | |
1026 | }//Step: kStepIdentified | |
1027 | }//Global tracking | |
734d2c12 | 1028 | }//track loop |
0ab648ea | 1029 | |
f203beb9 | 1030 | if((nIdentifiedProtons > 0)||(nIdentifiedAntiProtons > 0)) |
1031 | fHistEvents->Fill(2); //number of analyzed events with at least one (anti)proton | |
1032 | ||
0ab648ea | 1033 | if(fProtonAnalysisBase->GetDebugMode()) |
1034 | Printf("Initial number of tracks: %d | Identified (anti)protons: %d - %d | Survived (anti)protons: %d - %d",nTracks,nIdentifiedProtons,nIdentifiedAntiProtons,nSurvivedProtons,nSurvivedAntiProtons); | |
734d2c12 | 1035 | } |
1036 | ||
ee4ca40d | 1037 | //____________________________________________________________________// |
9cd594db | 1038 | void AliProtonAnalysis::Analyze(AliAODEvent* const fAOD) { |
e4358d7f | 1039 | //Main analysis part - AOD |
f203beb9 | 1040 | fHistEvents->Fill(1); //number of analyzed events |
0ab648ea | 1041 | Int_t nTracks = fAOD->GetNumberOfTracks(); |
1042 | for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) { | |
ee4ca40d | 1043 | AliAODTrack* track = fAOD->GetTrack(iTracks); |
9cd594db | 1044 | Double_t gPt = track->Pt(); |
1045 | Double_t gP = track->P(); | |
ee4ca40d | 1046 | |
1047 | //pid | |
1048 | Double_t probability[10]; | |
1049 | track->GetPID(probability); | |
1050 | Double_t rcc = 0.0; | |
0ab648ea | 1051 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP); |
ee4ca40d | 1052 | if(rcc == 0.0) continue; |
738619fd | 1053 | Double_t w[10]; |
0ab648ea | 1054 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP)/rcc; |
ee4ca40d | 1055 | Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w); |
1056 | if(fParticleType == 4) { | |
251e4034 | 1057 | if(track->Charge() > 0) |
9cd594db | 1058 | fHistYPtProtons->Fill(track->Y(fParticleType),gPt); |
251e4034 | 1059 | else if(track->Charge() < 0) |
9cd594db | 1060 | fHistYPtAntiProtons->Fill(track->Y(fParticleType),gPt); |
ee4ca40d | 1061 | }//proton check |
1062 | }//track loop | |
1063 | } | |
1064 | ||
e4358d7f | 1065 | //____________________________________________________________________// |
9cd594db | 1066 | void AliProtonAnalysis::Analyze(AliStack* const stack, |
da8c4c1c | 1067 | Bool_t iInclusive) { |
e4358d7f | 1068 | //Main analysis part - MC |
f203beb9 | 1069 | fHistEvents->Fill(1); //number of analyzed events |
3e23254a | 1070 | |
1071 | Int_t nParticles = 0; | |
1072 | //inclusive protons - | |
1073 | if(iInclusive) nParticles = stack->GetNtrack(); | |
1074 | else nParticles = stack->GetNprimary(); | |
1075 | ||
1076 | for(Int_t i = 0; i < nParticles; i++) { | |
e4358d7f | 1077 | TParticle *particle = stack->Particle(i); |
55f9a666 | 1078 | if(!particle) continue; |
537afcc3 | 1079 | |
da8c4c1c | 1080 | //in case of inclusive protons reject the secondaries from hadronic inter. |
1081 | if(particle->GetUniqueID() == 13) continue; | |
1082 | ||
537afcc3 | 1083 | if(TMath::Abs(particle->Eta()) > 1.0) continue; |
1084 | if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue; | |
0ab648ea | 1085 | if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue; |
537afcc3 | 1086 | |
e4358d7f | 1087 | Int_t pdgcode = particle->GetPdgCode(); |
0ab648ea | 1088 | if(pdgcode == 2212) fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(), |
1089 | particle->Py(), | |
1090 | particle->Pz()), | |
e4358d7f | 1091 | particle->Pt()); |
0ab648ea | 1092 | if(pdgcode == -2212) fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(), |
1093 | particle->Py(), | |
1094 | particle->Pz()), | |
e4358d7f | 1095 | particle->Pt()); |
251e4034 | 1096 | }//particle loop |
e4358d7f | 1097 | } |
1098 | ||
3f6d0c08 | 1099 | //____________________________________________________________________// |
1100 | Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) { | |
1101 | //calculates the mean value of the ratio/asymmetry within \pm edge | |
336ea0ff | 1102 | Double_t sum = 0.0, sumError = 0.0; |
3f6d0c08 | 1103 | Int_t nentries = 0; |
1104 | //calculate the mean | |
336ea0ff | 1105 | for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) { |
1106 | Double_t x = hist->GetBinCenter(i); | |
1107 | Double_t y = hist->GetBinContent(i); | |
3f6d0c08 | 1108 | if(TMath::Abs(x) < edge) { |
1109 | sum += y; | |
336ea0ff | 1110 | sumError += TMath::Power(hist->GetBinError(i),2); |
3f6d0c08 | 1111 | nentries += 1; |
1112 | } | |
336ea0ff | 1113 | Printf("eta: %lf - sum: %lf - sumError: %lf - counter: %d", |
1114 | TMath::Abs(x),sum,sumError,nentries); | |
3f6d0c08 | 1115 | } |
1116 | Double_t mean = 0.0; | |
336ea0ff | 1117 | Double_t error = 0.0; |
1118 | if(nentries != 0) { | |
3f6d0c08 | 1119 | mean = sum/nentries; |
336ea0ff | 1120 | error = TMath::Sqrt(sumError)/nentries; |
1121 | } | |
3f6d0c08 | 1122 | |
1123 | //calculate the error | |
336ea0ff | 1124 | /*for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) { |
1125 | Double_t x = hist->GetBinCenter(i); | |
1126 | Double_t y = hist->GetBinContent(i); | |
3f6d0c08 | 1127 | if(TMath::Abs(x) < edge) { |
1128 | sum += TMath::Power((mean - y),2); | |
1129 | nentries += 1; | |
1130 | } | |
336ea0ff | 1131 | }*/ |
3f6d0c08 | 1132 | |
3f6d0c08 | 1133 | |
1134 | cout<<"========================================="<<endl; | |
1135 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
1136 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
1137 | cout<<"Mean value :"<<mean<<endl; | |
1138 | cout<<"Error: "<<error<<endl; | |
1139 | cout<<"========================================="<<endl; | |
1140 | ||
1141 | return 0; | |
1142 | } | |
1143 | ||
1144 | //____________________________________________________________________// | |
1145 | Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) { | |
1146 | //calculates the (anti)proton yields within the \pm edge | |
1147 | Double_t sum = 0.0, sumerror = 0.0; | |
1148 | Double_t error = 0.0; | |
1149 | for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) { | |
1150 | Double_t x = hist->GetBinCenter(i+1); | |
1151 | Double_t y = hist->GetBinContent(i+1); | |
1152 | if(TMath::Abs(x) < edge) { | |
1153 | sum += y; | |
1154 | sumerror += TMath::Power(hist->GetBinError(i+1),2); | |
1155 | } | |
1156 | } | |
1157 | ||
1158 | error = TMath::Sqrt(sumerror); | |
1159 | ||
1160 | cout<<"========================================="<<endl; | |
1161 | cout<<"Input distribution: "<<hist->GetName()<<endl; | |
1162 | cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl; | |
1163 | cout<<"Yields :"<<sum<<endl; | |
1164 | cout<<"Error: "<<error<<endl; | |
1165 | cout<<"========================================="<<endl; | |
1166 | ||
1167 | return 0; | |
1168 | } | |
1169 | ||
336ea0ff | 1170 | //____________________________________________________________________// |
1171 | void AliProtonAnalysis::Correct() { | |
1172 | fHistYPtProtons->Divide(fHistEfficiencyYPtProtons); | |
1173 | fHistYPtAntiProtons->Divide(fHistEfficiencyYPtAntiProtons); | |
1174 | } | |
1175 | ||
251e4034 | 1176 | //____________________________________________________________________// |
1177 | void AliProtonAnalysis::Correct(Int_t step) { | |
1178 | //Applies the correction maps to the initial containers | |
1179 | fCorrectProtons = new AliCFDataGrid("correctProtons", | |
1180 | "corrected data", | |
1181 | *fProtonContainer); | |
0ab648ea | 1182 | fCorrectProtons->SetMeasured(0); |
251e4034 | 1183 | fCorrectProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListProtons->At(step)); |
1184 | ||
1185 | fCorrectAntiProtons = new AliCFDataGrid("correctAntiProtons", | |
1186 | "corrected data", | |
1187 | *fAntiProtonContainer); | |
0ab648ea | 1188 | fCorrectAntiProtons->SetMeasured(0); |
251e4034 | 1189 | fCorrectAntiProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListAntiProtons->At(step)); |
1190 | } | |
1191 | ||
39f2a708 | 1192 | //____________________________________________________________________// |
1193 | Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
1194 | // Reads the outout of the correction framework task | |
1195 | // Creates the correction maps | |
1196 | // Puts the results in the different TList objects | |
1197 | Bool_t status = kTRUE; | |
1198 | ||
336ea0ff | 1199 | TFile *file = TFile::Open(filename); |
1200 | if(!file) { | |
1201 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
1202 | status = kFALSE; | |
1203 | } | |
1204 | TList *list = dynamic_cast<TList *>(file->Get("outputList")); | |
1205 | Int_t iRap = 0, iPt = 1; | |
1206 | ||
1207 | //Calculation of efficiency/correction: Protons | |
1208 | AliCFContainer *gProtonContainer = dynamic_cast<AliCFContainer *>(list->At(0)); | |
1209 | AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1210 | "effProtonsStep0Step2", | |
1211 | *gProtonContainer); | |
1212 | effProtonsStep0Step2->CalculateEfficiency(2,0); | |
1213 | fHistEfficiencyYPtProtons = effProtonsStep0Step2->Project(iRap,iPt); | |
1214 | fHistEfficiencyYPtProtons->Sumw2(); | |
1215 | ||
1216 | //Calculation of efficiency/correction: Protons | |
1217 | AliCFContainer *gAntiProtonContainer = dynamic_cast<AliCFContainer *>(list->At(1)); | |
1218 | AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1219 | "effAntiProtonsStep0Step2", | |
1220 | *gAntiProtonContainer); | |
1221 | effAntiProtonsStep0Step2->CalculateEfficiency(2,0); | |
1222 | fHistEfficiencyYPtAntiProtons = effAntiProtonsStep0Step2->Project(iRap,iPt); | |
1223 | fHistEfficiencyYPtAntiProtons->Sumw2(); | |
1224 | ||
1225 | Correct(); | |
1226 | ||
1227 | return status; | |
1228 | } | |
1229 | ||
1230 | //____________________________________________________________________// | |
1231 | /*Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) { | |
1232 | // Reads the outout of the correction framework task | |
1233 | // Creates the correction maps | |
1234 | // Puts the results in the different TList objects | |
1235 | Bool_t status = kTRUE; | |
1236 | ||
39f2a708 | 1237 | TFile *file = TFile::Open(filename); |
1238 | if(!file) { | |
1239 | cout<<"Could not find the input CORRFW file "<<filename<<endl; | |
1240 | status = kFALSE; | |
1241 | } | |
1242 | ||
cdb3530f | 1243 | //________________________________________// |
1244 | //Protons | |
251e4034 | 1245 | fEffGridListProtons = new TList(); |
cdb3530f | 1246 | fCorrectionListProtons2D = new TList(); |
1247 | fEfficiencyListProtons1D = new TList(); | |
1248 | fCorrectionListProtons1D = new TList(); | |
1249 | ||
1250 | AliCFContainer *corrfwContainerProtons = (AliCFContainer*) (file->Get("containerProtons")); | |
1251 | if(!corrfwContainerProtons) { | |
1252 | cout<<"CORRFW container for protons not found!"<<endl; | |
39f2a708 | 1253 | status = kFALSE; |
1254 | } | |
1255 | ||
cdb3530f | 1256 | Int_t nSteps = corrfwContainerProtons->GetNStep(); |
39f2a708 | 1257 | TH2D *gYPt[4]; |
1258 | //currently the GRID is formed by the y-pT parameters | |
1259 | //Add Vz as a next step | |
1260 | Int_t iRap = 0, iPt = 1; | |
9b168f47 | 1261 | AliCFEffGrid *effProtonsStep0Step1 = new AliCFEffGrid("eff10", |
1262 | "effProtonsStep0Step1", | |
1263 | *corrfwContainerProtons); | |
1264 | effProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0 | |
251e4034 | 1265 | fEffGridListProtons->Add(effProtonsStep0Step1); |
9b168f47 | 1266 | gYPt[0] = effProtonsStep0Step1->Project(iRap,iPt); |
1267 | fCorrectionListProtons2D->Add(gYPt[0]); | |
1268 | ||
1269 | AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1270 | "effProtonsStep0Step2", | |
1271 | *corrfwContainerProtons); | |
1272 | effProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0 | |
251e4034 | 1273 | fEffGridListProtons->Add(effProtonsStep0Step2); |
9b168f47 | 1274 | gYPt[1] = effProtonsStep0Step2->Project(iRap,iPt); |
1275 | fCorrectionListProtons2D->Add(gYPt[1]); | |
1276 | ||
1277 | AliCFEffGrid *effProtonsStep0Step3 = new AliCFEffGrid("eff30", | |
1278 | "effProtonsStep0Step3", | |
1279 | *corrfwContainerProtons); | |
1280 | effProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0 | |
251e4034 | 1281 | fEffGridListProtons->Add(effProtonsStep0Step3); |
9b168f47 | 1282 | gYPt[2] = effProtonsStep0Step3->Project(iRap,iPt); |
1283 | fCorrectionListProtons2D->Add(gYPt[2]); | |
1284 | ||
1285 | TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws-[2]) | |
1286 | TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws-[2]) | |
9b4aee57 | 1287 | TString gTitle; |
cdb3530f | 1288 | //Get the projection of the efficiency maps |
9b168f47 | 1289 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { |
1290 | gEfficiency[iParameter][0] = effProtonsStep0Step1->Project(iParameter); | |
1291 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1292 | gTitle += "_Step0_Step1"; | |
1293 | gEfficiency[iParameter][0]->SetName(gTitle.Data()); | |
1294 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][0]); | |
1295 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1296 | gTitle += "_Step0_Step1"; | |
1297 | gCorrection[iParameter][0] = new TH1D(gTitle.Data(), | |
1298 | gTitle.Data(), | |
1299 | gEfficiency[iParameter][0]->GetNbinsX(), | |
1300 | gEfficiency[iParameter][0]->GetXaxis()->GetXmin(), | |
1301 | gEfficiency[iParameter][0]->GetXaxis()->GetXmax()); | |
1302 | //initialisation of the correction | |
1303 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++) | |
1304 | gCorrection[iParameter][0]->SetBinContent(iBin,1.0); | |
1305 | ||
1306 | gEfficiency[iParameter][1] = effProtonsStep0Step2->Project(iParameter); | |
1307 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1308 | gTitle += "_Step0_Step2"; | |
1309 | gEfficiency[iParameter][1]->SetName(gTitle.Data()); | |
1310 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][1]); | |
1311 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1312 | gTitle += "_Step0_Step2"; | |
1313 | gCorrection[iParameter][1] = new TH1D(gTitle.Data(), | |
1314 | gTitle.Data(), | |
1315 | gEfficiency[iParameter][1]->GetNbinsX(), | |
1316 | gEfficiency[iParameter][1]->GetXaxis()->GetXmin(), | |
1317 | gEfficiency[iParameter][1]->GetXaxis()->GetXmax()); | |
1318 | //initialisation of the correction | |
1319 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++) | |
1320 | gCorrection[iParameter][1]->SetBinContent(iBin,1.0); | |
1321 | ||
1322 | gEfficiency[iParameter][2] = effProtonsStep0Step3->Project(iParameter); | |
1323 | gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1324 | gTitle += "_Step0_Step3"; | |
1325 | gEfficiency[iParameter][2]->SetName(gTitle.Data()); | |
1326 | fEfficiencyListProtons1D->Add(gEfficiency[iParameter][2]); | |
1327 | gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1328 | gTitle += "_Step0_Step3"; | |
1329 | gCorrection[iParameter][2] = new TH1D(gTitle.Data(), | |
1330 | gTitle.Data(), | |
1331 | gEfficiency[iParameter][2]->GetNbinsX(), | |
1332 | gEfficiency[iParameter][2]->GetXaxis()->GetXmin(), | |
1333 | gEfficiency[iParameter][2]->GetXaxis()->GetXmax()); | |
1334 | //initialisation of the correction | |
1335 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++) | |
1336 | gCorrection[iParameter][2]->SetBinContent(iBin,1.0); | |
cdb3530f | 1337 | }//parameter loop |
1338 | //Calculate the 1D correction parameters as a function of y and pT | |
1339 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
1340 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
1341 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
1342 | fCorrectionListProtons1D->Add(gCorrection[iParameter][iStep-1]); | |
1343 | } | |
1344 | } | |
1345 | ||
1346 | //________________________________________// | |
1347 | //AntiProtons | |
251e4034 | 1348 | fEffGridListAntiProtons = new TList(); |
cdb3530f | 1349 | fCorrectionListAntiProtons2D = new TList(); |
1350 | fEfficiencyListAntiProtons1D = new TList(); | |
1351 | fCorrectionListAntiProtons1D = new TList(); | |
1352 | ||
1353 | AliCFContainer *corrfwContainerAntiProtons = (AliCFContainer*) (file->Get("containerAntiProtons")); | |
1354 | if(!corrfwContainerAntiProtons) { | |
1355 | cout<<"CORRFW container for antiprotons not found!"<<endl; | |
1356 | status = kFALSE; | |
1357 | } | |
1358 | ||
1359 | nSteps = corrfwContainerAntiProtons->GetNStep(); | |
1360 | //currently the GRID is formed by the y-pT parameters | |
1361 | //Add Vz as a next step | |
9b168f47 | 1362 | AliCFEffGrid *effAntiProtonsStep0Step1 = new AliCFEffGrid("eff10", |
1363 | "effAntiProtonsStep0Step1", | |
1364 | *corrfwContainerAntiProtons); | |
1365 | effAntiProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0 | |
251e4034 | 1366 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step1); |
9b168f47 | 1367 | gYPt[0] = effAntiProtonsStep0Step1->Project(iRap,iPt); |
1368 | fCorrectionListAntiProtons2D->Add(gYPt[0]); | |
1369 | ||
1370 | AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20", | |
1371 | "effAntiProtonsStep0Step2", | |
1372 | *corrfwContainerAntiProtons); | |
1373 | effAntiProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0 | |
251e4034 | 1374 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step2); |
9b168f47 | 1375 | gYPt[1] = effAntiProtonsStep0Step2->Project(iRap,iPt); |
1376 | fCorrectionListAntiProtons2D->Add(gYPt[1]); | |
1377 | ||
1378 | AliCFEffGrid *effAntiProtonsStep0Step3 = new AliCFEffGrid("eff30", | |
1379 | "effAntiProtonsStep0Step3", | |
1380 | *corrfwContainerAntiProtons); | |
1381 | effAntiProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0 | |
251e4034 | 1382 | fEffGridListAntiProtons->Add(effAntiProtonsStep0Step3); |
9b168f47 | 1383 | gYPt[2] = effAntiProtonsStep0Step3->Project(iRap,iPt); |
1384 | fCorrectionListAntiProtons2D->Add(gYPt[2]); | |
cdb3530f | 1385 | |
39f2a708 | 1386 | //Get the projection of the efficiency maps |
9b168f47 | 1387 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { |
1388 | gEfficiency[iParameter][0] = effAntiProtonsStep0Step1->Project(iParameter); | |
1389 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1390 | gTitle += "_Step0_Step1"; | |
1391 | gEfficiency[iParameter][0]->SetName(gTitle.Data()); | |
1392 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][0]); | |
1393 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1394 | gTitle += "_Step0_Step1"; | |
1395 | gCorrection[iParameter][0] = new TH1D(gTitle.Data(), | |
1396 | gTitle.Data(), | |
1397 | gEfficiency[iParameter][0]->GetNbinsX(), | |
1398 | gEfficiency[iParameter][0]->GetXaxis()->GetXmin(), | |
1399 | gEfficiency[iParameter][0]->GetXaxis()->GetXmax()); | |
1400 | //initialisation of the correction | |
1401 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++) | |
1402 | gCorrection[iParameter][0]->SetBinContent(iBin,1.0); | |
1403 | ||
1404 | gEfficiency[iParameter][1] = effAntiProtonsStep0Step2->Project(iParameter); | |
1405 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1406 | gTitle += "_Step0_Step2"; | |
1407 | gEfficiency[iParameter][1]->SetName(gTitle.Data()); | |
1408 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][1]); | |
1409 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1410 | gTitle += "_Step0_Step2"; | |
1411 | gCorrection[iParameter][1] = new TH1D(gTitle.Data(), | |
1412 | gTitle.Data(), | |
1413 | gEfficiency[iParameter][1]->GetNbinsX(), | |
1414 | gEfficiency[iParameter][1]->GetXaxis()->GetXmin(), | |
1415 | gEfficiency[iParameter][1]->GetXaxis()->GetXmax()); | |
1416 | //initialisation of the correction | |
1417 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++) | |
1418 | gCorrection[iParameter][1]->SetBinContent(iBin,1.0); | |
1419 | ||
1420 | gEfficiency[iParameter][2] = effAntiProtonsStep0Step3->Project(iParameter); | |
1421 | gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1; | |
1422 | gTitle += "_Step0_Step3"; | |
1423 | gEfficiency[iParameter][2]->SetName(gTitle.Data()); | |
1424 | fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][2]); | |
1425 | gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1; | |
1426 | gTitle += "_Step0_Step3"; | |
1427 | gCorrection[iParameter][2] = new TH1D(gTitle.Data(), | |
1428 | gTitle.Data(), | |
1429 | gEfficiency[iParameter][2]->GetNbinsX(), | |
1430 | gEfficiency[iParameter][2]->GetXaxis()->GetXmin(), | |
1431 | gEfficiency[iParameter][2]->GetXaxis()->GetXmax()); | |
1432 | //initialisation of the correction | |
1433 | for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++) | |
1434 | gCorrection[iParameter][2]->SetBinContent(iBin,1.0); | |
39f2a708 | 1435 | }//parameter loop |
1436 | //Calculate the 1D correction parameters as a function of y and pT | |
1437 | for(Int_t iParameter = 0; iParameter < 2; iParameter++) { | |
1438 | for(Int_t iStep = 1; iStep < nSteps; iStep++) { | |
1439 | gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]); | |
cdb3530f | 1440 | fCorrectionListAntiProtons1D->Add(gCorrection[iParameter][iStep-1]); |
39f2a708 | 1441 | } |
1442 | } | |
ef1a8dbd | 1443 | |
1444 | return status; | |
336ea0ff | 1445 | }*/ |
24421eb6 | 1446 | |
735cc63d | 1447 | //____________________________________________________________________// |
1448 | void AliProtonAnalysis::InitQA() { | |
1449 | //Applies the correction maps to the initial containers | |
1450 | fInitQAFlag = kTRUE; | |
1451 | fGlobalQAList = new TList(); | |
1452 | fGlobalQAList->SetName("fGlobalQAList"); | |
1453 | ||
1454 | //========================================================// | |
1455 | fQA2DList = new TList(); | |
1456 | fQA2DList->SetName("fQA2DList"); | |
1457 | fGlobalQAList->Add(fQA2DList); | |
37cb8683 | 1458 | |
790140ac | 1459 | //dEdx plots |
37cb8683 | 1460 | TH2F *gHistdEdxP = new TH2F("gHistdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600); |
790140ac | 1461 | fQA2DList->Add(gHistdEdxP); |
37cb8683 | 1462 | 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 | 1463 | fQA2DList->Add(gHistProtonsdEdxP); |
37cb8683 | 1464 | |
ff672838 | 1465 | //normalized dEdx plots |
1466 | 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); | |
1467 | fQA2DList->Add(gHistZP); | |
1468 | 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); | |
1469 | fQA2DList->Add(gHistProtonsZP); | |
1470 | ||
37cb8683 | 1471 | //eta-phi-Npoints(dEdx) |
1472 | TH3F *gHistEtaPhiTPCdEdxNPoints = new TH3F("gHistEtaPhiTPCdEdxNPoints", | |
1473 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1474 | 18,-0.9,0.9, |
1475 | 180,0,360, | |
37cb8683 | 1476 | 100,0,200); |
1477 | gHistEtaPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1478 | fQA2DList->Add(gHistEtaPhiTPCdEdxNPoints); | |
1479 | TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = new TH3F("gHistProtonsEtaPhiTPCdEdxNPoints", | |
1480 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1481 | 18,-0.9,0.9, |
1482 | 180,0,360, | |
37cb8683 | 1483 | 100,0,200); |
1484 | gHistProtonsEtaPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1485 | fQA2DList->Add(gHistProtonsEtaPhiTPCdEdxNPoints); | |
1486 | ||
1487 | //eta-phi-Npoints | |
1488 | TH3F *gHistEtaPhiTPCNPoints = new TH3F("gHistEtaPhiTPCNPoints", | |
1489 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1490 | 18,-0.9,0.9, |
1491 | 180,0,360, | |
37cb8683 | 1492 | 100,0,200); |
1493 | gHistEtaPhiTPCNPoints->SetStats(kTRUE); | |
1494 | fQA2DList->Add(gHistEtaPhiTPCNPoints); | |
1495 | TH3F *gHistProtonsEtaPhiTPCNPoints = new TH3F("gHistProtonsEtaPhiTPCNPoints", | |
1496 | ";#eta;#phi;N_{points}(TPC)", | |
e56f08ed | 1497 | 18,-0.9,0.9, |
1498 | 180,0,360, | |
37cb8683 | 1499 | 100,0,200); |
1500 | gHistProtonsEtaPhiTPCNPoints->SetStats(kTRUE); | |
1501 | fQA2DList->Add(gHistProtonsEtaPhiTPCNPoints); | |
1502 | ||
1503 | //pt-phi-Npoints(dEdx) | |
1504 | TH3F *gHistPtPhiTPCdEdxNPoints = new TH3F("gHistPtPhiTPCdEdxNPoints", | |
1505 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
1506 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 1507 | 180,0,360, |
37cb8683 | 1508 | 100,0,200); |
1509 | gHistPtPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1510 | fQA2DList->Add(gHistPtPhiTPCdEdxNPoints); | |
1511 | TH3F *gHistProtonsPtPhiTPCdEdxNPoints = new TH3F("gHistProtonsPtPhiTPCdEdxNPoints", | |
1512 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
1513 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 1514 | 180,0,360, |
37cb8683 | 1515 | 100,0,200); |
1516 | gHistProtonsPtPhiTPCdEdxNPoints->SetStats(kTRUE); | |
1517 | fQA2DList->Add(gHistProtonsPtPhiTPCdEdxNPoints); | |
1518 | ||
1519 | //pt-phi-Npoints | |
1520 | TH3F *gHistPtPhiTPCNPoints = new TH3F("gHistPtPhiTPCNPoints", | |
1521 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
1522 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 1523 | 180,0,360, |
37cb8683 | 1524 | 100,0,200); |
1525 | gHistPtPhiTPCNPoints->SetStats(kTRUE); | |
1526 | fQA2DList->Add(gHistPtPhiTPCNPoints); | |
1527 | TH3F *gHistProtonsPtPhiTPCNPoints = new TH3F("gHistProtonsPtPhiTPCNPoints", | |
1528 | ";P_{T} [GeV/c];#phi;N_{points}(TPC)", | |
1529 | fNBinsPt,fMinPt,fMaxPt, | |
e56f08ed | 1530 | 180,0,360, |
37cb8683 | 1531 | 100,0,200); |
1532 | gHistProtonsPtPhiTPCNPoints->SetStats(kTRUE); | |
1533 | fQA2DList->Add(gHistProtonsPtPhiTPCNPoints); | |
1534 | ||
e56f08ed | 1535 | //eta-phi for protons & antiprotons |
1536 | TH2F *gHistProtonsEtaPhi = new TH2F("gHistProtonsEtaPhi", | |
1537 | ";#eta;#phi", | |
1538 | 18,-0.9,0.9, | |
1539 | 180,0,360); | |
1540 | gHistProtonsEtaPhi->SetStats(kTRUE); | |
1541 | fQA2DList->Add(gHistProtonsEtaPhi); | |
1542 | TH2F *gHistAntiProtonsEtaPhi = new TH2F("gHistAntiProtonsEtaPhi", | |
1543 | ";#eta;#phi", | |
1544 | 18,-0.9,0.9, | |
1545 | 180,0,360); | |
1546 | gHistAntiProtonsEtaPhi->SetStats(kTRUE); | |
1547 | fQA2DList->Add(gHistAntiProtonsEtaPhi); | |
1548 | ||
4de4661f | 1549 | //dca vs pT for protons & antiprotons |
1550 | TH2F *gHistProtonsDCAxyPt = new TH2F("gHistProtonsDCAxyPt", | |
1551 | ";P_{T} [GeV/c];dca_{xy} [cm]", | |
1552 | 16,0.3,1.1, | |
1553 | 1000,0,10); | |
1554 | gHistProtonsDCAxyPt->SetStats(kTRUE); | |
1555 | fQA2DList->Add(gHistProtonsDCAxyPt); | |
1556 | TH2F *gHistProtonsDCAzPt = new TH2F("gHistProtonsDCAzPt", | |
1557 | ";P_{T} [GeV/c];dca_{z} [cm]", | |
1558 | 16,0.3,1.1, | |
1559 | 1000,0,10); | |
1560 | gHistProtonsDCAzPt->SetStats(kTRUE); | |
1561 | fQA2DList->Add(gHistProtonsDCAzPt); | |
1562 | TH2F *gHistAntiProtonsDCAxyPt = new TH2F("gHistAntiProtonsDCAxyPt", | |
1563 | ";P_{T} [GeV/c];dca_{xy} [cm]", | |
1564 | 16,0.3,1.1, | |
1565 | 1000,0,10); | |
1566 | gHistAntiProtonsDCAxyPt->SetStats(kTRUE); | |
1567 | fQA2DList->Add(gHistAntiProtonsDCAxyPt); | |
1568 | TH2F *gHistAntiProtonsDCAzPt = new TH2F("gHistAntiProtonsDCAzPt", | |
1569 | ";P_{T} [GeV/c];dca_{z} [cm]", | |
1570 | 16,0.3,1.1, | |
1571 | 1000,0,10); | |
1572 | gHistAntiProtonsDCAzPt->SetStats(kTRUE); | |
1573 | fQA2DList->Add(gHistAntiProtonsDCAzPt); | |
1574 | ||
735cc63d | 1575 | //========================================================// |
1576 | fQAProtonsAcceptedList = new TList(); | |
1577 | fQAProtonsAcceptedList->SetName("fQAProtonsAcceptedList"); | |
1578 | fGlobalQAList->Add(fQAProtonsAcceptedList); | |
1579 | //Accepted protons | |
1580 | TH1F *gProtonsITSClustersPass = new TH1F("gProtonsITSClustersPass", | |
1581 | ";N_{clusters} (ITS);Entries", | |
1582 | 7,0,7); | |
1583 | fQAProtonsAcceptedList->Add(gProtonsITSClustersPass); | |
1584 | TH1F *gProtonsChi2PerClusterITSPass = new TH1F("gProtonsChi2PerClusterITSPass", | |
1585 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1586 | 100,0,4); | |
1587 | fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterITSPass); | |
1588 | TH1F *gProtonsTPCClustersPass = new TH1F("gProtonsTPCClustersPass", | |
1589 | ";N_{clusters} (TPC);Entries", | |
1590 | 100,0,200); | |
1591 | fQAProtonsAcceptedList->Add(gProtonsTPCClustersPass); | |
1592 | TH1F *gProtonsChi2PerClusterTPCPass = new TH1F("gProtonsChi2PerClusterTPCPass", | |
1593 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1594 | 100,0,4); | |
1595 | fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterTPCPass); | |
1596 | TH1F *gProtonsExtCov11Pass = new TH1F("gProtonsExtCov11Pass", | |
1597 | ";#sigma_{y} [cm];Entries", | |
1598 | 100,0,4); | |
1599 | fQAProtonsAcceptedList->Add(gProtonsExtCov11Pass); | |
1600 | TH1F *gProtonsExtCov22Pass = new TH1F("gProtonsExtCov22Pass", | |
1601 | ";#sigma_{z} [cm];Entries", | |
1602 | 100,0,4); | |
1603 | fQAProtonsAcceptedList->Add(gProtonsExtCov22Pass); | |
1604 | TH1F *gProtonsExtCov33Pass = new TH1F("gProtonsExtCov33Pass", | |
1605 | ";#sigma_{sin(#phi)};Entries", | |
1606 | 100,0,4); | |
1607 | fQAProtonsAcceptedList->Add(gProtonsExtCov33Pass); | |
1608 | TH1F *gProtonsExtCov44Pass = new TH1F("gProtonsExtCov44Pass", | |
1609 | ";#sigma_{tan(#lambda)};Entries", | |
1610 | 100,0,4); | |
1611 | fQAProtonsAcceptedList->Add(gProtonsExtCov44Pass); | |
1612 | TH1F *gProtonsExtCov55Pass = new TH1F("gProtonsExtCov55Pass", | |
1613 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1614 | 100,0,4); | |
1615 | fQAProtonsAcceptedList->Add(gProtonsExtCov55Pass); | |
1616 | TH1F *gProtonsSigmaToVertexPass = new TH1F("gProtonsSigmaToVertexPass", | |
1617 | ";#sigma_{Vertex};Entries", | |
1618 | 100,0,10); | |
1619 | fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexPass); | |
1620 | TH1F *gProtonsSigmaToVertexTPCPass = new TH1F("gProtonsSigmaToVertexTPCPass", | |
1621 | ";#sigma_{Vertex};Entries", | |
1622 | 100,0,10); | |
1623 | fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexTPCPass); | |
1624 | TH1F *gProtonsDCAXYPass = new TH1F("gProtonsDCAXYPass", | |
1625 | ";DCA_{xy} [cm];Entries", | |
1626 | 100,0,20); | |
1627 | fQAProtonsAcceptedList->Add(gProtonsDCAXYPass); | |
1628 | TH1F *gProtonsDCAXYTPCPass = new TH1F("gProtonsDCAXYTPCPass", | |
1629 | ";DCA_{xy} [cm];Entries", | |
1630 | 100,0,20); | |
1631 | fQAProtonsAcceptedList->Add(gProtonsDCAXYTPCPass); | |
1632 | TH1F *gProtonsDCAZPass = new TH1F("gProtonsDCAZPass", | |
1633 | ";DCA_{z} [cm];Entries", | |
1634 | 100,0,20); | |
1635 | fQAProtonsAcceptedList->Add(gProtonsDCAZPass); | |
1636 | TH1F *gProtonsDCAZTPCPass = new TH1F("gProtonsDCAZTPCPass", | |
1637 | ";DCA_{z} [cm];Entries", | |
1638 | 100,0,20); | |
1639 | fQAProtonsAcceptedList->Add(gProtonsDCAZTPCPass); | |
1640 | TH1F *gProtonsConstrainChi2Pass = new TH1F("gProtonsConstrainChi2Pass", | |
1641 | ";Log_{10}(#chi^{2});Entries", | |
1642 | 100,-10,10); | |
1643 | fQAProtonsAcceptedList->Add(gProtonsConstrainChi2Pass); | |
1644 | TH1F *gProtonsITSRefitPass = new TH1F("gProtonsITSRefitPass", | |
1645 | "",10,-1,1); | |
1646 | fQAProtonsAcceptedList->Add(gProtonsITSRefitPass); | |
1647 | TH1F *gProtonsTPCRefitPass = new TH1F("gProtonsTPCRefitPass", | |
1648 | "",10,-1,1); | |
1649 | fQAProtonsAcceptedList->Add(gProtonsTPCRefitPass); | |
1650 | TH1F *gProtonsESDpidPass = new TH1F("gProtonsESDpidPass", | |
1651 | "",10,-1,1); | |
1652 | fQAProtonsAcceptedList->Add(gProtonsESDpidPass); | |
1653 | TH1F *gProtonsTPCpidPass = new TH1F("gProtonsTPCpidPass", | |
1654 | "",10,-1,1); | |
1655 | fQAProtonsAcceptedList->Add(gProtonsTPCpidPass); | |
1656 | TH1F *gProtonsPointOnITSLayer1Pass = new TH1F("gProtonsPointOnITSLayer1Pass", | |
1657 | "",10,-1,1); | |
1658 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer1Pass); | |
1659 | TH1F *gProtonsPointOnITSLayer2Pass = new TH1F("gProtonsPointOnITSLayer2Pass", | |
1660 | "",10,-1,1); | |
1661 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer2Pass); | |
1662 | TH1F *gProtonsPointOnITSLayer3Pass = new TH1F("gProtonsPointOnITSLayer3Pass", | |
1663 | "",10,-1,1); | |
1664 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer3Pass); | |
1665 | TH1F *gProtonsPointOnITSLayer4Pass = new TH1F("gProtonsPointOnITSLayer4Pass", | |
1666 | "",10,-1,1); | |
1667 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer4Pass); | |
1668 | TH1F *gProtonsPointOnITSLayer5Pass = new TH1F("gProtonsPointOnITSLayer5Pass", | |
1669 | "",10,-1,1); | |
1670 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer5Pass); | |
1671 | TH1F *gProtonsPointOnITSLayer6Pass = new TH1F("gProtonsPointOnITSLayer6Pass", | |
1672 | "",10,-1,1); | |
1673 | fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer6Pass); | |
1674 | TH1F *gProtonsNumberOfTPCdEdxPointsPass = new TH1F("gProtonsNumberOfTPCdEdxPointsPass","",100,0,200); | |
1675 | fQAProtonsAcceptedList->Add(gProtonsNumberOfTPCdEdxPointsPass); | |
1676 | ||
1677 | //========================================================// | |
1678 | fQAProtonsRejectedList = new TList(); | |
1679 | fQAProtonsRejectedList->SetName("fQAProtonsRejectedList"); | |
1680 | fGlobalQAList->Add(fQAProtonsRejectedList); | |
1681 | //Rejected protons | |
1682 | TH1F *gProtonsITSClustersReject = new TH1F("gProtonsITSClustersReject", | |
1683 | ";N_{clusters} (ITS);Entries", | |
1684 | 7,0,7); | |
1685 | gProtonsITSClustersReject->SetFillColor(kRed-2); | |
1686 | fQAProtonsRejectedList->Add(gProtonsITSClustersReject); | |
1687 | TH1F *gProtonsChi2PerClusterITSReject = new TH1F("gProtonsChi2PerClusterITSReject", | |
1688 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1689 | 100,0,4); | |
1690 | gProtonsChi2PerClusterITSReject->SetFillColor(kRed-2); | |
1691 | fQAProtonsRejectedList->Add(gProtonsChi2PerClusterITSReject); | |
1692 | TH1F *gProtonsTPCClustersReject = new TH1F("gProtonsTPCClustersReject", | |
1693 | ";N_{clusters} (TPC);Entries", | |
1694 | 100,0,200); | |
1695 | gProtonsTPCClustersReject->SetFillColor(kRed-2); | |
1696 | fQAProtonsRejectedList->Add(gProtonsTPCClustersReject); | |
1697 | TH1F *gProtonsChi2PerClusterTPCReject = new TH1F("gProtonsChi2PerClusterTPCReject", | |
1698 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1699 | 100,0,4); | |
1700 | gProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2); | |
1701 | fQAProtonsRejectedList->Add(gProtonsChi2PerClusterTPCReject); | |
1702 | TH1F *gProtonsExtCov11Reject = new TH1F("gProtonsExtCov11Reject", | |
1703 | ";#sigma_{y} [cm];Entries", | |
1704 | 100,0,4); | |
1705 | gProtonsExtCov11Reject->SetFillColor(kRed-2); | |
1706 | fQAProtonsRejectedList->Add(gProtonsExtCov11Reject); | |
1707 | TH1F *gProtonsExtCov22Reject = new TH1F("gProtonsExtCov22Reject", | |
1708 | ";#sigma_{z} [cm];Entries", | |
1709 | 100,0,4); | |
1710 | gProtonsExtCov22Reject->SetFillColor(kRed-2); | |
1711 | fQAProtonsRejectedList->Add(gProtonsExtCov22Reject); | |
1712 | TH1F *gProtonsExtCov33Reject = new TH1F("gProtonsExtCov33Reject", | |
1713 | ";#sigma_{sin(#phi)};Entries", | |
1714 | 100,0,4); | |
1715 | gProtonsExtCov33Reject->SetFillColor(kRed-2); | |
1716 | fQAProtonsRejectedList->Add(gProtonsExtCov33Reject); | |
1717 | TH1F *gProtonsExtCov44Reject = new TH1F("gProtonsExtCov44Reject", | |
1718 | ";#sigma_{tan(#lambda)};Entries", | |
1719 | 100,0,4); | |
1720 | gProtonsExtCov44Reject->SetFillColor(kRed-2); | |
1721 | fQAProtonsRejectedList->Add(gProtonsExtCov44Reject); | |
1722 | TH1F *gProtonsExtCov55Reject = new TH1F("gProtonsExtCov55Reject", | |
1723 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1724 | 100,0,4); | |
1725 | gProtonsExtCov55Reject->SetFillColor(kRed-2); | |
1726 | fQAProtonsRejectedList->Add(gProtonsExtCov55Reject); | |
1727 | TH1F *gProtonsSigmaToVertexReject = new TH1F("gProtonsSigmaToVertexReject", | |
1728 | ";#sigma_{Vertex};Entries", | |
1729 | 100,0,10); | |
1730 | gProtonsSigmaToVertexReject->SetFillColor(kRed-2); | |
1731 | fQAProtonsRejectedList->Add(gProtonsSigmaToVertexReject); | |
1732 | TH1F *gProtonsSigmaToVertexTPCReject = new TH1F("gProtonsSigmaToVertexTPCReject", | |
1733 | ";#sigma_{Vertex};Entries", | |
1734 | 100,0,10); | |
1735 | gProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2); | |
1736 | fQAProtonsRejectedList->Add(gProtonsSigmaToVertexTPCReject); | |
1737 | TH1F *gProtonsDCAXYReject = new TH1F("gProtonsDCAXYReject", | |
1738 | ";DCA_{xy} [cm];Entries", | |
1739 | 100,0,20); | |
1740 | gProtonsDCAXYReject->SetFillColor(kRed-2); | |
1741 | fQAProtonsRejectedList->Add(gProtonsDCAXYReject); | |
1742 | TH1F *gProtonsDCAXYTPCReject = new TH1F("gProtonsDCAXYTPCReject", | |
1743 | ";DCA_{xy} [cm];Entries", | |
1744 | 100,0,20); | |
1745 | gProtonsDCAXYTPCReject->SetFillColor(kRed-2); | |
1746 | fQAProtonsRejectedList->Add(gProtonsDCAXYTPCReject); | |
1747 | TH1F *gProtonsDCAZReject = new TH1F("gProtonsDCAZReject", | |
1748 | ";DCA_{z} [cm];Entries", | |
1749 | 100,0,20); | |
1750 | gProtonsDCAZReject->SetFillColor(kRed-2); | |
1751 | fQAProtonsRejectedList->Add(gProtonsDCAZReject); | |
1752 | TH1F *gProtonsDCAZTPCReject = new TH1F("gProtonsDCAZTPCReject", | |
1753 | ";DCA_{z} [cm];Entries", | |
1754 | 100,0,20); | |
1755 | gProtonsDCAZTPCReject->SetFillColor(kRed-2); | |
1756 | fQAProtonsRejectedList->Add(gProtonsDCAZTPCReject); | |
1757 | TH1F *gProtonsConstrainChi2Reject = new TH1F("gProtonsConstrainChi2Reject", | |
1758 | ";Log_{10}(#chi^{2});Entries", | |
1759 | 100,-10,10); | |
1760 | gProtonsConstrainChi2Reject->SetFillColor(kRed-2); | |
1761 | fQAProtonsRejectedList->Add(gProtonsConstrainChi2Reject); | |
1762 | TH1F *gProtonsITSRefitReject = new TH1F("gProtonsITSRefitReject", | |
1763 | "",10,-1,1); | |
1764 | gProtonsITSRefitReject->SetFillColor(kRed-2); | |
1765 | fQAProtonsRejectedList->Add(gProtonsITSRefitReject); | |
1766 | TH1F *gProtonsTPCRefitReject = new TH1F("gProtonsTPCRefitReject", | |
1767 | "",10,-1,1); | |
1768 | gProtonsTPCRefitReject->SetFillColor(kRed-2); | |
1769 | fQAProtonsRejectedList->Add(gProtonsTPCRefitReject); | |
1770 | TH1F *gProtonsESDpidReject = new TH1F("gProtonsESDpidReject", | |
1771 | "",10,-1,1); | |
1772 | gProtonsESDpidReject->SetFillColor(kRed-2); | |
1773 | fQAProtonsRejectedList->Add(gProtonsESDpidReject); | |
1774 | TH1F *gProtonsTPCpidReject = new TH1F("gProtonsTPCpidReject", | |
1775 | "",10,-1,1); | |
1776 | gProtonsTPCpidReject->SetFillColor(kRed-2); | |
1777 | fQAProtonsRejectedList->Add(gProtonsTPCpidReject); | |
1778 | TH1F *gProtonsPointOnITSLayer1Reject = new TH1F("gProtonsPointOnITSLayer1Reject", | |
1779 | "",10,-1,1); | |
1780 | gProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2); | |
1781 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer1Reject); | |
1782 | TH1F *gProtonsPointOnITSLayer2Reject = new TH1F("gProtonsPointOnITSLayer2Reject", | |
1783 | "",10,-1,1); | |
1784 | gProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2); | |
1785 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer2Reject); | |
1786 | TH1F *gProtonsPointOnITSLayer3Reject = new TH1F("gProtonsPointOnITSLayer3Reject", | |
1787 | "",10,-1,1); | |
1788 | gProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2); | |
1789 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer3Reject); | |
1790 | TH1F *gProtonsPointOnITSLayer4Reject = new TH1F("gProtonsPointOnITSLayer4Reject", | |
1791 | "",10,-1,1); | |
1792 | gProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2); | |
1793 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer4Reject); | |
1794 | TH1F *gProtonsPointOnITSLayer5Reject = new TH1F("gProtonsPointOnITSLayer5Reject", | |
1795 | "",10,-1,1); | |
1796 | gProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2); | |
1797 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer5Reject); | |
1798 | TH1F *gProtonsPointOnITSLayer6Reject = new TH1F("gProtonsPointOnITSLayer6Reject", | |
1799 | "",10,-1,1); | |
1800 | gProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2); | |
1801 | fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer6Reject); | |
1802 | TH1F *gProtonsNumberOfTPCdEdxPointsReject = new TH1F("gProtonsNumberOfTPCdEdxPointsReject","",100,0,200); | |
1803 | gProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2); | |
1804 | fQAProtonsRejectedList->Add(gProtonsNumberOfTPCdEdxPointsReject); | |
1805 | ||
1806 | //========================================================// | |
1807 | fQAAntiProtonsAcceptedList = new TList(); | |
1808 | fQAAntiProtonsAcceptedList->SetName("fQAAntiProtonsAcceptedList"); | |
1809 | fGlobalQAList->Add(fQAAntiProtonsAcceptedList); | |
1810 | //Accepted antiprotons | |
1811 | TH1F *gAntiProtonsITSClustersPass = new TH1F("gAntiProtonsITSClustersPass", | |
1812 | ";N_{clusters} (ITS);Entries", | |
1813 | 7,0,7); | |
1814 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClustersPass); | |
1815 | TH1F *gAntiProtonsChi2PerClusterITSPass = new TH1F("gAntiProtonsChi2PerClusterITSPass", | |
1816 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1817 | 100,0,4); | |
1818 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterITSPass); | |
1819 | TH1F *gAntiProtonsTPCClustersPass = new TH1F("gAntiProtonsTPCClustersPass", | |
1820 | ";N_{clusters} (TPC);Entries", | |
1821 | 100,0,200); | |
1822 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCClustersPass); | |
1823 | TH1F *gAntiProtonsChi2PerClusterTPCPass = new TH1F("gAntiProtonsChi2PerClusterTPCPass", | |
1824 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1825 | 100,0,4); | |
1826 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterTPCPass); | |
1827 | TH1F *gAntiProtonsExtCov11Pass = new TH1F("gAntiProtonsExtCov11Pass", | |
1828 | ";#sigma_{y} [cm];Entries", | |
1829 | 100,0,4); | |
1830 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov11Pass); | |
1831 | TH1F *gAntiProtonsExtCov22Pass = new TH1F("gAntiProtonsExtCov22Pass", | |
1832 | ";#sigma_{z} [cm];Entries", | |
1833 | 100,0,4); | |
1834 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov22Pass); | |
1835 | TH1F *gAntiProtonsExtCov33Pass = new TH1F("gAntiProtonsExtCov33Pass", | |
1836 | ";#sigma_{sin(#phi)};Entries", | |
1837 | 100,0,4); | |
1838 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov33Pass); | |
1839 | TH1F *gAntiProtonsExtCov44Pass = new TH1F("gAntiProtonsExtCov44Pass", | |
1840 | ";#sigma_{tan(#lambda)};Entries", | |
1841 | 100,0,4); | |
1842 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov44Pass); | |
1843 | TH1F *gAntiProtonsExtCov55Pass = new TH1F("gAntiProtonsExtCov55Pass", | |
1844 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1845 | 100,0,4); | |
1846 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov55Pass); | |
1847 | TH1F *gAntiProtonsSigmaToVertexPass = new TH1F("gAntiProtonsSigmaToVertexPass", | |
1848 | ";#sigma_{Vertex};Entries", | |
1849 | 100,0,10); | |
1850 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexPass); | |
1851 | TH1F *gAntiProtonsSigmaToVertexTPCPass = new TH1F("gAntiProtonsSigmaToVertexTPCPass", | |
1852 | ";#sigma_{Vertex};Entries", | |
1853 | 100,0,10); | |
1854 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexTPCPass); | |
1855 | TH1F *gAntiProtonsDCAXYPass = new TH1F("gAntiProtonsDCAXYPass", | |
1856 | ";DCA_{xy} [cm];Entries", | |
1857 | 100,0,20); | |
1858 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYPass); | |
1859 | TH1F *gAntiProtonsDCAXYTPCPass = new TH1F("gAntiProtonsDCAXYTPCPass", | |
1860 | ";DCA_{xy} [cm];Entries", | |
1861 | 100,0,20); | |
1862 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYTPCPass); | |
1863 | TH1F *gAntiProtonsDCAZPass = new TH1F("gAntiProtonsDCAZPass", | |
1864 | ";DCA_{z} [cm];Entries", | |
1865 | 100,0,20); | |
1866 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZPass); | |
1867 | TH1F *gAntiProtonsDCAZTPCPass = new TH1F("gAntiProtonsDCAZTPCPass", | |
1868 | ";DCA_{z} [cm];Entries", | |
1869 | 100,0,20); | |
1870 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZTPCPass); | |
1871 | TH1F *gAntiProtonsConstrainChi2Pass = new TH1F("gAntiProtonsConstrainChi2Pass", | |
1872 | ";Log_{10}(#chi^{2});Entries", | |
1873 | 100,-10,10); | |
1874 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsConstrainChi2Pass); | |
1875 | TH1F *gAntiProtonsITSRefitPass = new TH1F("gAntiProtonsITSRefitPass", | |
1876 | "",10,-1,1); | |
1877 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSRefitPass); | |
1878 | TH1F *gAntiProtonsTPCRefitPass = new TH1F("gAntiProtonsTPCRefitPass", | |
1879 | "",10,-1,1); | |
1880 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCRefitPass); | |
1881 | TH1F *gAntiProtonsESDpidPass = new TH1F("gAntiProtonsESDpidPass", | |
1882 | "",10,-1,1); | |
1883 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsESDpidPass); | |
1884 | TH1F *gAntiProtonsTPCpidPass = new TH1F("gAntiProtonsTPCpidPass", | |
1885 | "",10,-1,1); | |
1886 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCpidPass); | |
1887 | TH1F *gAntiProtonsPointOnITSLayer1Pass = new TH1F("gAntiProtonsPointOnITSLayer1Pass", | |
1888 | "",10,-1,1); | |
1889 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer1Pass); | |
1890 | TH1F *gAntiProtonsPointOnITSLayer2Pass = new TH1F("gAntiProtonsPointOnITSLayer2Pass", | |
1891 | "",10,-1,1); | |
1892 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer2Pass); | |
1893 | TH1F *gAntiProtonsPointOnITSLayer3Pass = new TH1F("gAntiProtonsPointOnITSLayer3Pass", | |
1894 | "",10,-1,1); | |
1895 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer3Pass); | |
1896 | TH1F *gAntiProtonsPointOnITSLayer4Pass = new TH1F("gAntiProtonsPointOnITSLayer4Pass", | |
1897 | "",10,-1,1); | |
1898 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer4Pass); | |
1899 | TH1F *gAntiProtonsPointOnITSLayer5Pass = new TH1F("gAntiProtonsPointOnITSLayer5Pass", | |
1900 | "",10,-1,1); | |
1901 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer5Pass); | |
1902 | TH1F *gAntiProtonsPointOnITSLayer6Pass = new TH1F("gAntiProtonsPointOnITSLayer6Pass", | |
1903 | "",10,-1,1); | |
1904 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer6Pass); | |
1905 | TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200); | |
1906 | fQAAntiProtonsAcceptedList->Add(gAntiProtonsNumberOfTPCdEdxPointsPass); | |
1907 | ||
1908 | //========================================================// | |
1909 | fQAAntiProtonsRejectedList = new TList(); | |
1910 | fQAAntiProtonsRejectedList->SetName("fQAAntiProtonsRejectedList"); | |
1911 | fGlobalQAList->Add(fQAAntiProtonsRejectedList); | |
1912 | //Rejected antiprotons | |
1913 | TH1F *gAntiProtonsITSClustersReject = new TH1F("gAntiProtonsITSClustersReject", | |
1914 | ";N_{clusters} (ITS);Entries", | |
1915 | 7,0,7); | |
1916 | gAntiProtonsITSClustersReject->SetFillColor(kRed-2); | |
1917 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClustersReject); | |
1918 | TH1F *gAntiProtonsChi2PerClusterITSReject = new TH1F("gAntiProtonsChi2PerClusterITSReject", | |
1919 | ";x^{2}/N_{clusters} (ITS);Entries", | |
1920 | 100,0,4); | |
1921 | gAntiProtonsChi2PerClusterITSReject->SetFillColor(kRed-2); | |
1922 | fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterITSReject); | |
1923 | TH1F *gAntiProtonsTPCClustersReject = new TH1F("gAntiProtonsTPCClustersReject", | |
1924 | ";N_{clusters} (TPC);Entries", | |
1925 | 100,0,200); | |
1926 | gAntiProtonsTPCClustersReject->SetFillColor(kRed-2); | |
1927 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCClustersReject); | |
1928 | TH1F *gAntiProtonsChi2PerClusterTPCReject = new TH1F("gAntiProtonsChi2PerClusterTPCReject", | |
1929 | ";x^{2}/N_{clusters} (TPC);Entries", | |
1930 | 100,0,4); | |
1931 | gAntiProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2); | |
1932 | fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterTPCReject); | |
1933 | TH1F *gAntiProtonsExtCov11Reject = new TH1F("gAntiProtonsExtCov11Reject", | |
1934 | ";#sigma_{y} [cm];Entries", | |
1935 | 100,0,4); | |
1936 | gAntiProtonsExtCov11Reject->SetFillColor(kRed-2); | |
1937 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov11Reject); | |
1938 | TH1F *gAntiProtonsExtCov22Reject = new TH1F("gAntiProtonsExtCov22Reject", | |
1939 | ";#sigma_{z} [cm];Entries", | |
1940 | 100,0,4); | |
1941 | gAntiProtonsExtCov22Reject->SetFillColor(kRed-2); | |
1942 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov22Reject); | |
1943 | TH1F *gAntiProtonsExtCov33Reject = new TH1F("gAntiProtonsExtCov33Reject", | |
1944 | ";#sigma_{sin(#phi)};Entries", | |
1945 | 100,0,4); | |
1946 | gAntiProtonsExtCov33Reject->SetFillColor(kRed-2); | |
1947 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov33Reject); | |
1948 | TH1F *gAntiProtonsExtCov44Reject = new TH1F("gAntiProtonsExtCov44Reject", | |
1949 | ";#sigma_{tan(#lambda)};Entries", | |
1950 | 100,0,4); | |
1951 | gAntiProtonsExtCov44Reject->SetFillColor(kRed-2); | |
1952 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov44Reject); | |
1953 | TH1F *gAntiProtonsExtCov55Reject = new TH1F("gAntiProtonsExtCov55Reject", | |
1954 | ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries", | |
1955 | 100,0,4); | |
1956 | gAntiProtonsExtCov55Reject->SetFillColor(kRed-2); | |
1957 | fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov55Reject); | |
1958 | TH1F *gAntiProtonsSigmaToVertexReject = new TH1F("gAntiProtonsSigmaToVertexReject", | |
1959 | ";#sigma_{Vertex};Entries", | |
1960 | 100,0,10); | |
1961 | gAntiProtonsSigmaToVertexReject->SetFillColor(kRed-2); | |
1962 | fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexReject); | |
1963 | TH1F *gAntiProtonsSigmaToVertexTPCReject = new TH1F("gAntiProtonsSigmaToVertexTPCReject", | |
1964 | ";#sigma_{Vertex};Entries", | |
1965 | 100,0,10); | |
1966 | gAntiProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2); | |
1967 | fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexTPCReject); | |
1968 | TH1F *gAntiProtonsDCAXYReject = new TH1F("gAntiProtonsDCAXYReject", | |
1969 | ";DCA_{xy} [cm];Entries", | |
1970 | 100,0,20); | |
1971 | gAntiProtonsDCAXYReject->SetFillColor(kRed-2); | |
1972 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYReject); | |
1973 | TH1F *gAntiProtonsDCAXYTPCReject = new TH1F("gAntiProtonsDCAXYTPCReject", | |
1974 | ";DCA_{xy} [cm];Entries", | |
1975 | 100,0,20); | |
1976 | gAntiProtonsDCAXYTPCReject->SetFillColor(kRed-2); | |
1977 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYTPCReject); | |
1978 | TH1F *gAntiProtonsDCAZReject = new TH1F("gAntiProtonsDCAZReject", | |
1979 | ";DCA_{z} [cm];Entries", | |
1980 | 100,0,20); | |
1981 | gAntiProtonsDCAZReject->SetFillColor(kRed-2); | |
1982 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZReject); | |
1983 | TH1F *gAntiProtonsDCAZTPCReject = new TH1F("gAntiProtonsDCAZTPCReject", | |
1984 | ";DCA_{z} [cm];Entries", | |
1985 | 100,0,20); | |
1986 | gAntiProtonsDCAZTPCReject->SetFillColor(kRed-2); | |
1987 | fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZTPCReject); | |
1988 | TH1F *gAntiProtonsConstrainChi2Reject = new TH1F("gAntiProtonsConstrainChi2Reject", | |
1989 | ";Log_{10}(#chi^{2});Entries", | |
1990 | 100,-10,10); | |
1991 | gAntiProtonsConstrainChi2Reject->SetFillColor(kRed-2); | |
1992 | fQAAntiProtonsRejectedList->Add(gAntiProtonsConstrainChi2Reject); | |
1993 | TH1F *gAntiProtonsITSRefitReject = new TH1F("gAntiProtonsITSRefitReject", | |
1994 | "",10,-1,1); | |
1995 | gAntiProtonsITSRefitReject->SetFillColor(kRed-2); | |
1996 | fQAAntiProtonsRejectedList->Add(gAntiProtonsITSRefitReject); | |
1997 | TH1F *gAntiProtonsTPCRefitReject = new TH1F("gAntiProtonsTPCRefitReject", | |
1998 | "",10,-1,1); | |
1999 | gAntiProtonsTPCRefitReject->SetFillColor(kRed-2); | |
2000 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCRefitReject); | |
2001 | TH1F *gAntiProtonsESDpidReject = new TH1F("gAntiProtonsESDpidReject", | |
2002 | "",10,-1,1); | |
2003 | gAntiProtonsESDpidReject->SetFillColor(kRed-2); | |
2004 | fQAAntiProtonsRejectedList->Add(gAntiProtonsESDpidReject); | |
2005 | TH1F *gAntiProtonsTPCpidReject = new TH1F("gAntiProtonsTPCpidReject", | |
2006 | "",10,-1,1); | |
2007 | gAntiProtonsTPCpidReject->SetFillColor(kRed-2); | |
2008 | fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCpidReject); | |
2009 | TH1F *gAntiProtonsPointOnITSLayer1Reject = new TH1F("gAntiProtonsPointOnITSLayer1Reject", | |
2010 | "",10,-1,1); | |
2011 | gAntiProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2); | |
2012 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer1Reject); | |
2013 | TH1F *gAntiProtonsPointOnITSLayer2Reject = new TH1F("gAntiProtonsPointOnITSLayer2Reject", | |
2014 | "",10,-1,1); | |
2015 | gAntiProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2); | |
2016 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer2Reject); | |
2017 | TH1F *gAntiProtonsPointOnITSLayer3Reject = new TH1F("gAntiProtonsPointOnITSLayer3Reject", | |
2018 | "",10,-1,1); | |
2019 | gAntiProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2); | |
2020 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer3Reject); | |
2021 | TH1F *gAntiProtonsPointOnITSLayer4Reject = new TH1F("gAntiProtonsPointOnITSLayer4Reject", | |
2022 | "",10,-1,1); | |
2023 | gAntiProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2); | |
2024 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer4Reject); | |
2025 | TH1F *gAntiProtonsPointOnITSLayer5Reject = new TH1F("gAntiProtonsPointOnITSLayer5Reject", | |
2026 | "",10,-1,1); | |
2027 | gAntiProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2); | |
2028 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer5Reject); | |
2029 | TH1F *gAntiProtonsPointOnITSLayer6Reject = new TH1F("gAntiProtonsPointOnITSLayer6Reject", | |
2030 | "",10,-1,1); | |
2031 | gAntiProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2); | |
2032 | fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer6Reject); | |
2033 | TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200); | |
2034 | gAntiProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2); | |
2035 | fQAAntiProtonsRejectedList->Add(gAntiProtonsNumberOfTPCdEdxPointsReject); | |
2036 | } | |
39f2a708 | 2037 | |
735cc63d | 2038 | //____________________________________________________________________// |
2039 | void AliProtonAnalysis::FillQA(AliESDEvent *esd, | |
2040 | const AliESDVertex *vertex, | |
2041 | AliESDtrack* track) { | |
2042 | //Fills the QA histograms | |
2043 | Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0; | |
2044 | Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance. | |
2045 | ||
2046 | if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) { | |
2047 | AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam(); | |
2048 | if(!tpcTrack) { | |
2049 | gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; | |
2050 | dca[0] = -100.; dca[1] = -100.; | |
2051 | cov[0] = -100.; cov[1] = -100.; cov[2] = -100.; | |
2052 | } | |
2053 | else { | |
2054 | gPt = tpcTrack->Pt(); | |
2055 | gPx = tpcTrack->Px(); | |
2056 | gPy = tpcTrack->Py(); | |
2057 | gPz = tpcTrack->Pz(); | |
2058 | tpcTrack->PropagateToDCA(vertex, | |
2059 | esd->GetMagneticField(), | |
2060 | 100.,dca,cov); | |
2061 | } | |
2062 | } | |
2063 | else{ | |
2064 | gPt = track->Pt(); | |
2065 | gPx = track->Px(); | |
2066 | gPy = track->Py(); | |
2067 | gPz = track->Pz(); | |
2068 | track->PropagateToDCA(vertex, | |
2069 | esd->GetMagneticField(), | |
2070 | 100.,dca,cov); | |
2071 | } | |
39f2a708 | 2072 | |
735cc63d | 2073 | Int_t fIdxInt[200]; |
2074 | Int_t nClustersITS = track->GetITSclusters(fIdxInt); | |
2075 | Int_t nClustersTPC = track->GetTPCclusters(fIdxInt); | |
39f2a708 | 2076 | |
735cc63d | 2077 | Float_t chi2PerClusterITS = -1; |
2078 | if (nClustersITS!=0) | |
2079 | chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS); | |
2080 | Float_t chi2PerClusterTPC = -1; | |
2081 | if (nClustersTPC!=0) | |
2082 | chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC); | |
39f2a708 | 2083 | |
735cc63d | 2084 | Double_t extCov[15]; |
2085 | track->GetExternalCovariance(extCov); | |
2086 | ||
2087 | //protons | |
2088 | if(track->Charge() > 0) { | |
2089 | if(fProtonAnalysisBase->IsUsedMinITSClusters()) { | |
2090 | if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) { | |
2091 | ((TH1F *)(fQAProtonsRejectedList->At(0)))->Fill(nClustersITS); | |
2092 | } | |
2093 | else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters()) | |
2094 | ((TH1F *)(fQAProtonsAcceptedList->At(0)))->Fill(nClustersITS); | |
2095 | }//ITS clusters | |
2096 | if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) { | |
2097 | if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) { | |
2098 | ((TH1F *)(fQAProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS); | |
2099 | } | |
2100 | else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster()) | |
2101 | ((TH1F *)(fQAProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS); | |
2102 | }//chi2 per ITS cluster | |
2103 | if(fProtonAnalysisBase->IsUsedMinTPCClusters()) { | |
2104 | if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) { | |
2105 | ((TH1F *)(fQAProtonsRejectedList->At(2)))->Fill(nClustersTPC); | |
2106 | } | |
2107 | else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) { | |
2108 | ((TH1F *)(fQAProtonsAcceptedList->At(2)))->Fill(nClustersTPC); | |
2109 | } | |
2110 | }//TPC clusters | |
2111 | if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) { | |
2112 | if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) { | |
2113 | ((TH1F *)(fQAProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC); | |
2114 | } | |
2115 | else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) | |
2116 | ((TH1F *)(fQAProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC); | |
2117 | }//chi2 per TPC cluster | |
2118 | if(fProtonAnalysisBase->IsUsedMaxCov11()) { | |
2119 | if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) { | |
2120 | ((TH1F *)(fQAProtonsRejectedList->At(4)))->Fill(extCov[0]); | |
2121 | } | |
2122 | else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11()) | |
2123 | ((TH1F *)(fQAProtonsAcceptedList->At(4)))->Fill(extCov[0]); | |
2124 | }//cov11 | |
2125 | if(fProtonAnalysisBase->IsUsedMaxCov22()) { | |
2126 | if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) { | |
2127 | ((TH1F *)(fQAProtonsRejectedList->At(5)))->Fill(extCov[2]); | |
2128 | } | |
2129 | else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22()) | |
2130 | ((TH1F *)(fQAProtonsAcceptedList->At(5)))->Fill(extCov[2]); | |
2131 | }//cov11 | |
2132 | if(fProtonAnalysisBase->IsUsedMaxCov33()) { | |
2133 | if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) { | |
2134 | ((TH1F *)(fQAProtonsRejectedList->At(6)))->Fill(extCov[5]); | |
2135 | } | |
2136 | else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33()) | |
2137 | ((TH1F *)(fQAProtonsAcceptedList->At(6)))->Fill(extCov[5]); | |
2138 | }//cov11 | |
2139 | if(fProtonAnalysisBase->IsUsedMaxCov44()) { | |
2140 | if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) { | |
2141 | ((TH1F *)(fQAProtonsRejectedList->At(7)))->Fill(extCov[9]); | |
2142 | } | |
2143 | else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44()) | |
2144 | ((TH1F *)(fQAProtonsAcceptedList->At(7)))->Fill(extCov[9]); | |
2145 | }//cov11 | |
2146 | if(fProtonAnalysisBase->IsUsedMaxCov55()) { | |
2147 | if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) { | |
2148 | ((TH1F *)(fQAProtonsRejectedList->At(8)))->Fill(extCov[14]); | |
2149 | } | |
2150 | else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55()) | |
2151 | ((TH1F *)(fQAProtonsAcceptedList->At(8)))->Fill(extCov[14]); | |
2152 | }//cov55 | |
2153 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) { | |
2154 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) { | |
2155 | ((TH1F *)(fQAProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2156 | } | |
2157 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex()) | |
2158 | ((TH1F *)(fQAProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2159 | }//sigma to vertex | |
2160 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) { | |
2161 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) { | |
2162 | ((TH1F *)(fQAProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2163 | } | |
2164 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) | |
2165 | ((TH1F *)(fQAProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2166 | }//sigma to vertex TPC | |
2167 | if(fProtonAnalysisBase->IsUsedMaxDCAXY()) { | |
2168 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) { | |
2169 | ((TH1F *)(fQAProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2170 | } | |
2171 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) | |
2172 | ((TH1F *)(fQAProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2173 | }//DCA xy global tracking | |
2174 | if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) { | |
2175 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) { | |
2176 | ((TH1F *)(fQAProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2177 | } | |
2178 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC()) | |
2179 | ((TH1F *)(fQAProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2180 | }//DCA xy TPC tracking | |
2181 | if(fProtonAnalysisBase->IsUsedMaxDCAZ()) { | |
2182 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) { | |
2183 | ((TH1F *)(fQAProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2184 | } | |
2185 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) | |
2186 | ((TH1F *)(fQAProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2187 | }//DCA z global tracking | |
2188 | if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) { | |
2189 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) { | |
2190 | ((TH1F *)(fQAProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2191 | } | |
2192 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC()) | |
2193 | ((TH1F *)(fQAProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2194 | }//DCA z TPC tracking | |
2195 | if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) { | |
2196 | if(track->GetConstrainedChi2() > 0) { | |
2197 | if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) { | |
2198 | ((TH1F *)(fQAProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2199 | } | |
2200 | else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2()) | |
2201 | ((TH1F *)(fQAProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2202 | } | |
2203 | }//constrain chi2 - vertex | |
2204 | if(fProtonAnalysisBase->IsUsedITSRefit()) { | |
2205 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) { | |
2206 | ((TH1F *)(fQAProtonsRejectedList->At(16)))->Fill(0); | |
2207 | } | |
2208 | else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0) | |
2209 | ((TH1F *)(fQAProtonsAcceptedList->At(16)))->Fill(0); | |
2210 | }//ITS refit | |
2211 | if(fProtonAnalysisBase->IsUsedTPCRefit()) { | |
2212 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) { | |
2213 | ((TH1F *)(fQAProtonsRejectedList->At(17)))->Fill(0); | |
2214 | } | |
2215 | else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0) | |
2216 | ((TH1F *)(fQAProtonsAcceptedList->At(17)))->Fill(0); | |
2217 | }//TPC refit | |
2218 | if(fProtonAnalysisBase->IsUsedESDpid()) { | |
2219 | if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) { | |
2220 | ((TH1F *)(fQAProtonsRejectedList->At(18)))->Fill(0); | |
2221 | } | |
2222 | else if((track->GetStatus() & AliESDtrack::kESDpid) != 0) | |
2223 | ((TH1F *)(fQAProtonsAcceptedList->At(18)))->Fill(0); | |
2224 | }//ESD pid | |
2225 | if(fProtonAnalysisBase->IsUsedTPCpid()) { | |
2226 | if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) { | |
2227 | ((TH1F *)(fQAProtonsRejectedList->At(19)))->Fill(0); | |
2228 | } | |
2229 | else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0) | |
2230 | ((TH1F *)(fQAProtonsAcceptedList->At(19)))->Fill(0); | |
2231 | }//TPC pid | |
2232 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) { | |
2233 | if(!track->HasPointOnITSLayer(0)) { | |
2234 | ((TH1F *)(fQAProtonsRejectedList->At(20)))->Fill(0); | |
2235 | } | |
2236 | else if(track->HasPointOnITSLayer(0)) | |
2237 | ((TH1F *)(fQAProtonsAcceptedList->At(20)))->Fill(0); | |
2238 | }//point on SPD1 | |
2239 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) { | |
2240 | if(!track->HasPointOnITSLayer(1)) { | |
2241 | ((TH1F *)(fQAProtonsRejectedList->At(21)))->Fill(0); | |
2242 | } | |
2243 | else if(track->HasPointOnITSLayer(1)) | |
2244 | ((TH1F *)(fQAProtonsAcceptedList->At(21)))->Fill(0); | |
2245 | }//point on SPD2 | |
2246 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) { | |
2247 | if(!track->HasPointOnITSLayer(2)) { | |
2248 | ((TH1F *)(fQAProtonsRejectedList->At(22)))->Fill(0); | |
2249 | } | |
2250 | else if(track->HasPointOnITSLayer(2)) | |
2251 | ((TH1F *)(fQAProtonsAcceptedList->At(22)))->Fill(0); | |
2252 | }//point on SDD1 | |
2253 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) { | |
2254 | if(!track->HasPointOnITSLayer(3)) { | |
2255 | ((TH1F *)(fQAProtonsRejectedList->At(23)))->Fill(0); | |
2256 | } | |
2257 | else if(track->HasPointOnITSLayer(3)) | |
2258 | ((TH1F *)(fQAProtonsAcceptedList->At(23)))->Fill(0); | |
2259 | }//point on SDD2 | |
2260 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) { | |
2261 | if(!track->HasPointOnITSLayer(4)) { | |
2262 | ((TH1F *)(fQAProtonsRejectedList->At(24)))->Fill(0); | |
2263 | } | |
2264 | else if(track->HasPointOnITSLayer(4)) | |
2265 | ((TH1F *)(fQAProtonsAcceptedList->At(24)))->Fill(0); | |
2266 | }//point on SSD1 | |
2267 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) { | |
2268 | if(!track->HasPointOnITSLayer(5)) { | |
2269 | ((TH1F *)(fQAProtonsRejectedList->At(25)))->Fill(0); | |
2270 | } | |
2271 | else if(track->HasPointOnITSLayer(5)) | |
2272 | ((TH1F *)(fQAProtonsAcceptedList->At(25)))->Fill(0); | |
2273 | }//point on SSD2 | |
2274 | if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) { | |
2275 | if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) { | |
2276 | ((TH1F *)(fQAProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2277 | } | |
2278 | if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints()) | |
2279 | ((TH1F *)(fQAProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2280 | }//number of TPC points for the dE/dx | |
2281 | }//protons | |
2282 | ||
2283 | //antiprotons | |
2284 | if(track->Charge() < 0) { | |
2285 | if(fProtonAnalysisBase->IsUsedMinITSClusters()) { | |
2286 | if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) { | |
2287 | ((TH1F *)(fQAAntiProtonsRejectedList->At(0)))->Fill(nClustersITS); | |
2288 | } | |
2289 | else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters()) | |
2290 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS); | |
2291 | }//ITS clusters | |
2292 | if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) { | |
2293 | if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) { | |
2294 | ((TH1F *)(fQAAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS); | |
2295 | } | |
2296 | else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster()) | |
2297 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS); | |
2298 | }//chi2 per ITS cluster | |
2299 | if(fProtonAnalysisBase->IsUsedMinTPCClusters()) { | |
2300 | if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) { | |
2301 | ((TH1F *)(fQAAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC); | |
2302 | } | |
2303 | else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) { | |
2304 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC); | |
2305 | } | |
2306 | }//TPC clusters | |
2307 | if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) { | |
2308 | if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) { | |
2309 | ((TH1F *)(fQAAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC); | |
2310 | } | |
2311 | else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) | |
2312 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC); | |
2313 | }//chi2 per TPC cluster | |
2314 | if(fProtonAnalysisBase->IsUsedMaxCov11()) { | |
2315 | if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) { | |
2316 | ((TH1F *)(fQAAntiProtonsRejectedList->At(4)))->Fill(extCov[0]); | |
2317 | } | |
2318 | else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11()) | |
2319 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]); | |
2320 | }//cov11 | |
2321 | if(fProtonAnalysisBase->IsUsedMaxCov22()) { | |
2322 | if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) { | |
2323 | ((TH1F *)(fQAAntiProtonsRejectedList->At(5)))->Fill(extCov[2]); | |
2324 | } | |
2325 | else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22()) | |
2326 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]); | |
2327 | }//cov11 | |
2328 | if(fProtonAnalysisBase->IsUsedMaxCov33()) { | |
2329 | if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) { | |
2330 | ((TH1F *)(fQAAntiProtonsRejectedList->At(6)))->Fill(extCov[5]); | |
2331 | } | |
2332 | else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33()) | |
2333 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]); | |
2334 | }//cov11 | |
2335 | if(fProtonAnalysisBase->IsUsedMaxCov44()) { | |
2336 | if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) { | |
2337 | ((TH1F *)(fQAAntiProtonsRejectedList->At(7)))->Fill(extCov[9]); | |
2338 | } | |
2339 | else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44()) | |
2340 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]); | |
2341 | }//cov11 | |
2342 | if(fProtonAnalysisBase->IsUsedMaxCov55()) { | |
2343 | if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) { | |
2344 | ((TH1F *)(fQAAntiProtonsRejectedList->At(8)))->Fill(extCov[14]); | |
2345 | } | |
2346 | else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55()) | |
2347 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]); | |
2348 | }//cov55 | |
2349 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) { | |
2350 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) { | |
2351 | ((TH1F *)(fQAAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2352 | } | |
2353 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex()) | |
2354 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2355 | }//sigma to vertex | |
2356 | if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) { | |
2357 | if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) { | |
2358 | ((TH1F *)(fQAAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2359 | } | |
2360 | else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) | |
2361 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track)); | |
2362 | }//sigma to vertex TPC | |
2363 | if(fProtonAnalysisBase->IsUsedMaxDCAXY()) { | |
2364 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) { | |
2365 | ((TH1F *)(fQAAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2366 | } | |
2367 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) | |
2368 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0])); | |
2369 | }//DCA xy global tracking | |
2370 | if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) { | |
2371 | if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) { | |
2372 | ((TH1F *)(fQAAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2373 | } | |
2374 | else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC()) | |
2375 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0])); | |
2376 | }//DCA xy TPC tracking | |
2377 | if(fProtonAnalysisBase->IsUsedMaxDCAZ()) { | |
2378 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) { | |
2379 | ((TH1F *)(fQAAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2380 | } | |
2381 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) | |
2382 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1])); | |
2383 | }//DCA z global tracking | |
2384 | if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) { | |
2385 | if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) { | |
2386 | ((TH1F *)(fQAAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2387 | } | |
2388 | else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC()) | |
2389 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1])); | |
2390 | }//DCA z TPC tracking | |
2391 | if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) { | |
2392 | if(track->GetConstrainedChi2() > 0) { | |
2393 | if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) { | |
2394 | ((TH1F *)(fQAAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2395 | } | |
2396 | else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2()) | |
2397 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2())); | |
2398 | } | |
2399 | }//constrain chi2 - vertex | |
2400 | if(fProtonAnalysisBase->IsUsedITSRefit()) { | |
2401 | if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) { | |
2402 | ((TH1F *)(fQAAntiProtonsRejectedList->At(16)))->Fill(0); | |
2403 | } | |
2404 | else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0) | |
2405 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(16)))->Fill(0); | |
2406 | }//ITS refit | |
2407 | if(fProtonAnalysisBase->IsUsedTPCRefit()) { | |
2408 | if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) { | |
2409 | ((TH1F *)(fQAAntiProtonsRejectedList->At(17)))->Fill(0); | |
2410 | } | |
2411 | else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0) | |
2412 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(17)))->Fill(0); | |
2413 | }//TPC refit | |
2414 | if(fProtonAnalysisBase->IsUsedESDpid()) { | |
2415 | if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) { | |
2416 | ((TH1F *)(fQAAntiProtonsRejectedList->At(18)))->Fill(0); | |
2417 | } | |
2418 | else if((track->GetStatus() & AliESDtrack::kESDpid) != 0) | |
2419 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(18)))->Fill(0); | |
2420 | }//ESD pid | |
2421 | if(fProtonAnalysisBase->IsUsedTPCpid()) { | |
2422 | if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) { | |
2423 | ((TH1F *)(fQAAntiProtonsRejectedList->At(19)))->Fill(0); | |
2424 | } | |
2425 | else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0) | |
2426 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(19)))->Fill(0); | |
2427 | }//TPC pid | |
2428 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) { | |
2429 | if(!track->HasPointOnITSLayer(0)) { | |
2430 | ((TH1F *)(fQAAntiProtonsRejectedList->At(20)))->Fill(0); | |
2431 | } | |
2432 | else if(track->HasPointOnITSLayer(0)) | |
2433 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(20)))->Fill(0); | |
2434 | }//point on SPD1 | |
2435 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) { | |
2436 | if(!track->HasPointOnITSLayer(1)) { | |
2437 | ((TH1F *)(fQAAntiProtonsRejectedList->At(21)))->Fill(0); | |
2438 | } | |
2439 | else if(track->HasPointOnITSLayer(1)) | |
2440 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(21)))->Fill(0); | |
2441 | }//point on SPD2 | |
2442 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) { | |
2443 | if(!track->HasPointOnITSLayer(2)) { | |
2444 | ((TH1F *)(fQAAntiProtonsRejectedList->At(22)))->Fill(0); | |
2445 | } | |
2446 | else if(track->HasPointOnITSLayer(2)) | |
2447 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(22)))->Fill(0); | |
2448 | }//point on SDD1 | |
2449 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) { | |
2450 | if(!track->HasPointOnITSLayer(3)) { | |
2451 | ((TH1F *)(fQAAntiProtonsRejectedList->At(23)))->Fill(0); | |
2452 | } | |
2453 | else if(track->HasPointOnITSLayer(3)) | |
2454 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(23)))->Fill(0); | |
2455 | }//point on SDD2 | |
2456 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) { | |
2457 | if(!track->HasPointOnITSLayer(4)) { | |
2458 | ((TH1F *)(fQAAntiProtonsRejectedList->At(24)))->Fill(0); | |
2459 | } | |
2460 | else if(track->HasPointOnITSLayer(4)) | |
2461 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(24)))->Fill(0); | |
2462 | }//point on SSD1 | |
2463 | if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) { | |
2464 | if(!track->HasPointOnITSLayer(5)) { | |
2465 | ((TH1F *)(fQAAntiProtonsRejectedList->At(25)))->Fill(0); | |
2466 | } | |
2467 | else if(track->HasPointOnITSLayer(5)) | |
2468 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(25)))->Fill(0); | |
2469 | }//point on SSD2 | |
2470 | if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) { | |
2471 | if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) { | |
2472 | ((TH1F *)(fQAAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2473 | } | |
2474 | if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints()) | |
2475 | ((TH1F *)(fQAAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN()); | |
2476 | }//number of TPC points for the dE/dx | |
2477 | }//antiprotons | |
2478 | } |