1 /**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-----------------------------------------------------------------
17 // AliProtonAnalysis class
18 // This is the class to deal with the proton analysis
19 // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
21 #include <Riostream.h>
29 #include <TParticle.h>
32 #include <AliExternalTrackParam.h>
33 #include <AliAODEvent.h>
34 #include <AliESDEvent.h>
38 #include <AliCFContainer.h>
39 #include <AliCFEffGrid.h>
40 #include <AliCFDataGrid.h>
41 #include <AliTPCPIDResponse.h>
42 #include <AliESDpid.h>
46 #include "AliProtonAnalysis.h"
47 #include "AliProtonAnalysisBase.h"
49 ClassImp(AliProtonAnalysis)
51 //____________________________________________________________________//
52 AliProtonAnalysis::AliProtonAnalysis() :
53 TObject(), fProtonAnalysisBase(0),
54 fNBinsY(0), fMinY(0), fMaxY(0),
55 fNBinsPt(0), fMinPt(0), fMaxPt(0),
56 fProtonContainer(0), fAntiProtonContainer(0),
57 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0),
58 fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0),
59 fHistEventStats(0), fYRatioInPtBinsList(0),
60 fEffGridListProtons(0), fCorrectionListProtons2D(0),
61 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
62 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
63 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
64 fCorrectProtons(0), fCorrectAntiProtons(0),
65 fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0),
66 fGlobalQAList(0), fQA2DList(0),
67 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
68 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
73 //____________________________________________________________________//
74 AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY,
75 Float_t fLowY, Float_t fHighY,
77 Float_t fLowPt, Float_t fHighPt) :
78 TObject(), fProtonAnalysisBase(0),
79 fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY),
80 fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt),
81 fProtonContainer(0), fAntiProtonContainer(0),
82 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0),
83 fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0),
84 fHistEventStats(0), fYRatioInPtBinsList(0),
85 fEffGridListProtons(0), fCorrectionListProtons2D(0),
86 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
87 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
88 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
89 fCorrectProtons(0), fCorrectAntiProtons(0),
90 fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0),
91 fGlobalQAList(0), fQA2DList(0),
92 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
93 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
96 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
97 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
98 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
100 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
102 fNBinsPt,fMinPt,fMaxPt);
103 fHistYPtProtons->SetStats(kTRUE);
104 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
105 if(fProtonAnalysisBase->GetEtaMode())
106 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
108 fHistYPtProtons->GetXaxis()->SetTitle("y");
109 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
111 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
113 fNBinsPt,fMinPt,fMaxPt);
114 fHistYPtAntiProtons->SetStats(kTRUE);
115 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
116 if(fProtonAnalysisBase->GetEtaMode())
117 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
119 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
120 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
122 fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons",
124 fNBinsPt,fMinPt,fMaxPt);
125 fHistYPtProtonsCorrected->SetStats(kTRUE);
126 fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
127 if(fProtonAnalysisBase->GetEtaMode())
128 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta");
130 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y");
131 fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1);
133 fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected",
136 fNBinsPt,fMinPt,fMaxPt);
137 fHistYPtAntiProtonsCorrected->SetStats(kTRUE);
138 fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
139 if(fProtonAnalysisBase->GetEtaMode())
140 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta");
142 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y");
143 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1);
145 //setting up the containers
149 Double_t *binLimY = new Double_t[nbinsY+1];
150 Double_t *binLimPt = new Double_t[nbinsPt+1];
151 //values for bin lower bounds
152 for(Int_t i = 0; i <= nbinsY; i++)
153 binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i;
154 for(Int_t i = 0; i <= nbinsPt; i++)
155 binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i;
157 fProtonContainer = new AliCFContainer("containerProtons",
158 "container for protons",
160 fProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta
161 fProtonContainer->SetBinLimits(1,binLimPt); //pT
162 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
163 "container for antiprotons",
165 fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta
166 fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT
169 if(!fInitQAFlag) InitQA();
172 //____________________________________________________________________//
173 AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Double_t *gY,
174 Int_t nbinsPt,Double_t *gPt) :
175 TObject(), fProtonAnalysisBase(0),
176 fNBinsY(nbinsY), fMinY(gY[0]), fMaxY(gY[nbinsY]),
177 fNBinsPt(nbinsPt), fMinPt(gPt[0]), fMaxPt(gPt[nbinsPt]),
178 fProtonContainer(0), fAntiProtonContainer(0),
179 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0),
180 fHistYPtProtonsCorrected(0), fHistYPtAntiProtonsCorrected(0),
181 fHistEventStats(0), fYRatioInPtBinsList(0),
182 fEffGridListProtons(0), fCorrectionListProtons2D(0),
183 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
184 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
185 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
186 fCorrectProtons(0), fCorrectAntiProtons(0),
187 fHistEfficiencyYPtProtons(0), fHistEfficiencyYPtAntiProtons(0),
188 fGlobalQAList(0), fQA2DList(0),
189 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
190 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
191 fInitQAFlag(kFALSE) {
192 //Default constructor
193 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
194 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
195 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
197 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
198 fNBinsY,gY,fNBinsPt,gPt);
199 fHistYPtProtons->SetStats(kTRUE);
200 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
201 if(fProtonAnalysisBase->GetEtaMode())
202 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
204 fHistYPtProtons->GetXaxis()->SetTitle("y");
205 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
207 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
208 fNBinsY,gY,fNBinsPt,gPt);
209 fHistYPtAntiProtons->SetStats(kTRUE);
210 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
211 if(fProtonAnalysisBase->GetEtaMode())
212 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
214 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
215 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
217 fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons",
219 fNBinsPt,fMinPt,fMaxPt);
220 fHistYPtProtonsCorrected->SetStats(kTRUE);
221 fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
222 if(fProtonAnalysisBase->GetEtaMode())
223 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta");
225 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y");
226 fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1);
228 fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected",
231 fNBinsPt,fMinPt,fMaxPt);
232 fHistYPtAntiProtonsCorrected->SetStats(kTRUE);
233 fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
234 if(fProtonAnalysisBase->GetEtaMode())
235 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta");
237 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y");
238 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1);
240 //setting up the containers
244 fProtonContainer = new AliCFContainer("containerProtons",
245 "container for protons",
247 fProtonContainer->SetBinLimits(0,gY); //rapidity or eta
248 fProtonContainer->SetBinLimits(1,gPt); //pT
249 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
250 "container for antiprotons",
252 fAntiProtonContainer->SetBinLimits(0,gY); //rapidity or eta
253 fAntiProtonContainer->SetBinLimits(1,gPt); //pT
256 if(!fInitQAFlag) InitQA();
259 //____________________________________________________________________//
260 AliProtonAnalysis::~AliProtonAnalysis() {
262 if(fProtonAnalysisBase) delete fProtonAnalysisBase;
264 if(fHistEvents) delete fHistEvents;
265 if(fHistYPtProtons) delete fHistYPtProtons;
266 if(fHistYPtAntiProtons) delete fHistYPtAntiProtons;
267 if(fHistYPtProtonsCorrected) delete fHistYPtProtonsCorrected;
268 if(fHistYPtAntiProtonsCorrected) delete fHistYPtAntiProtonsCorrected;
269 if(fHistEventStats) delete fHistEventStats;
270 if(fYRatioInPtBinsList) delete fYRatioInPtBinsList;
272 if(fProtonContainer) delete fProtonContainer;
273 if(fAntiProtonContainer) delete fAntiProtonContainer;
275 if(fEffGridListProtons) delete fEffGridListProtons;
276 if(fCorrectionListProtons2D) delete fCorrectionListProtons2D;
277 if(fEfficiencyListProtons1D) delete fEfficiencyListProtons1D;
278 if(fCorrectionListProtons1D) delete fCorrectionListProtons1D;
279 if(fEffGridListAntiProtons) delete fEffGridListAntiProtons;
280 if(fCorrectionListAntiProtons2D) delete fCorrectionListAntiProtons2D;
281 if(fEfficiencyListAntiProtons1D) delete fEfficiencyListAntiProtons1D;
282 if(fCorrectionListAntiProtons1D) delete fCorrectionListAntiProtons1D;
283 if(fCorrectProtons) delete fCorrectProtons;
284 if(fCorrectAntiProtons) delete fCorrectAntiProtons;
285 if(fHistEfficiencyYPtProtons) delete fHistEfficiencyYPtProtons;
286 if(fHistEfficiencyYPtAntiProtons) delete fHistEfficiencyYPtAntiProtons;
289 if(fGlobalQAList) delete fGlobalQAList;
290 if(fQA2DList) delete fQA2DList;
291 if(fQAProtonsAcceptedList) delete fQAProtonsAcceptedList;
292 if(fQAProtonsRejectedList) delete fQAProtonsRejectedList;
293 if(fQAAntiProtonsAcceptedList) delete fQAAntiProtonsAcceptedList;
294 if(fQAAntiProtonsRejectedList) delete fQAAntiProtonsRejectedList;
297 //____________________________________________________________________//
298 void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY,
299 Float_t fLowY, Float_t fHighY,
301 Float_t fLowPt, Float_t fHighPt) {
302 //Initializes the histograms
310 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
311 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
312 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
314 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
316 fNBinsPt,fMinPt,fMaxPt);
317 fHistYPtProtons->SetStats(kTRUE);
318 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
319 if(fProtonAnalysisBase->GetEtaMode())
320 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
322 fHistYPtProtons->GetXaxis()->SetTitle("y");
323 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
325 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
327 fNBinsPt,fMinPt,fMaxPt);
328 fHistYPtAntiProtons->SetStats(kTRUE);
329 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
330 if(fProtonAnalysisBase->GetEtaMode())
331 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
333 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
334 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
336 fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons",
338 fNBinsPt,fMinPt,fMaxPt);
339 fHistYPtProtonsCorrected->SetStats(kTRUE);
340 fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
341 if(fProtonAnalysisBase->GetEtaMode())
342 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta");
344 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y");
345 fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1);
347 fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected",
350 fNBinsPt,fMinPt,fMaxPt);
351 fHistYPtAntiProtonsCorrected->SetStats(kTRUE);
352 fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
353 if(fProtonAnalysisBase->GetEtaMode())
354 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta");
356 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y");
357 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1);
359 //setting up the containers
363 Double_t *binLimY = new Double_t[nbinsY+1];
364 Double_t *binLimPt = new Double_t[nbinsPt+1];
365 //values for bin lower bounds
366 for(Int_t i = 0; i <= nbinsY; i++)
367 binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i;
368 for(Int_t i = 0; i <= nbinsPt; i++)
369 binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i;
371 fProtonContainer = new AliCFContainer("containerProtons",
372 "container for protons",
374 fProtonContainer->SetBinLimits(0,binLimY); //rapidity
375 fProtonContainer->SetBinLimits(1,binLimPt); //pT
376 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
377 "container for antiprotons",
379 fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity
380 fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT
383 if(!fInitQAFlag) InitQA();
386 //____________________________________________________________________//
387 void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Double_t *gY,
388 Int_t nbinsPt, Double_t *gPt) {
389 //Initializes the histograms using asymmetric values - global tracking
395 fMaxPt = gPt[nbinsPt];
397 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
398 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
399 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
401 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
402 fNBinsY,gY,fNBinsPt,gPt);
403 fHistYPtProtons->SetStats(kTRUE);
404 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
405 if(fProtonAnalysisBase->GetEtaMode())
406 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
408 fHistYPtProtons->GetXaxis()->SetTitle("y");
409 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
411 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
412 fNBinsY,gY,fNBinsPt,gPt);
413 fHistYPtAntiProtons->SetStats(kTRUE);
414 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
415 if(fProtonAnalysisBase->GetEtaMode())
416 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
418 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
419 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
421 fHistYPtProtonsCorrected = new TH2D("fHistYPtProtonsCorrected","Protons",
422 fNBinsY,gY,fNBinsPt,gPt);
423 fHistYPtProtonsCorrected->SetStats(kTRUE);
424 fHistYPtProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
425 if(fProtonAnalysisBase->GetEtaMode())
426 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("#eta");
428 fHistYPtProtonsCorrected->GetXaxis()->SetTitle("y");
429 fHistYPtProtonsCorrected->GetXaxis()->SetTitleColor(1);
431 fHistYPtAntiProtonsCorrected = new TH2D("fHistYPtAntiProtonsCorrected",
433 fNBinsY,gY,fNBinsPt,gPt);
434 fHistYPtAntiProtonsCorrected->SetStats(kTRUE);
435 fHistYPtAntiProtonsCorrected->GetYaxis()->SetTitle("P_{T} [GeV/c]");
436 if(fProtonAnalysisBase->GetEtaMode())
437 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("#eta");
439 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitle("y");
440 fHistYPtAntiProtonsCorrected->GetXaxis()->SetTitleColor(1);
442 //setting up the containers
447 fProtonContainer = new AliCFContainer("containerProtons",
448 "container for protons",
450 fProtonContainer->SetBinLimits(0,gY); //rapidity
451 fProtonContainer->SetBinLimits(1,gPt); //pT
452 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
453 "container for antiprotons",
455 fAntiProtonContainer->SetBinLimits(0,gY); //rapidity
456 fAntiProtonContainer->SetBinLimits(1,gPt); //pT
459 if(!fInitQAFlag) InitQA();
462 //____________________________________________________________________//
463 Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) {
464 //Read the containers from the existing file
465 Bool_t status = kTRUE;
467 TFile *file = TFile::Open(filename);
469 cout<<"Could not find the input file "<<filename<<endl;
473 TList *list = (TList *)file->Get("outputList");
475 cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl;
476 fHistYPtProtons = (TH2D *)list->At(0);
477 fHistYPtAntiProtons = (TH2D *)list->At(1);
478 fHistEvents = (TH1I *)list->At(2);
479 fProtonContainer = (AliCFContainer *)list->At(3);
480 fAntiProtonContainer = (AliCFContainer *)list->At(4);
481 fHistEventStats = (TH1F *)list->At(5);
484 cout<<"Retrieving objects from the file... "<<endl;
485 fHistYPtProtons = (TH2D *)file->Get("fHistYPtProtons");
486 fHistYPtAntiProtons = (TH2D *)file->Get("fHistYPtAntiProtons");
487 fHistEvents = (TH1I *)file->Get("fHistEvents");
488 fProtonContainer = (AliCFContainer *)file->Get("containerProtons");
489 fAntiProtonContainer = (AliCFContainer *)file->Get("containerAntiProtons");
490 fHistEventStats = (TH1F *)file->Get("fHistEventStats");
492 if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents)
493 ||(!fProtonContainer)||(!fAntiProtonContainer)||(!fHistEventStats)) {
494 cout<<"Input containers were not found!!!"<<endl;
498 //fHistYPtProtons = fProtonContainer->ShowProjection(0,1,0);
499 //fHistYPtAntiProtons = fAntiProtonContainer->ShowProjection(0,1,0);
500 fHistYPtProtons->Sumw2();
501 fHistYPtAntiProtons->Sumw2();
507 //____________________________________________________________________//
508 TList *AliProtonAnalysis::GetYRatioHistogramsInPtBins() {
509 //Returns a TList obkect with the eta (or y) dependent ratios for each
510 //pT bin taken from the 2D histograms (not from the containers)
511 fYRatioInPtBinsList = new TList();
514 TH1D *gHistYProtons[100];
516 for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) {
517 title = "gHistYProtons_PtBin"; title += iBin;
518 gHistYProtons[iBin] = (TH1D *)fHistYPtProtons->ProjectionX(title.Data(),
521 gHistYProtons[iBin]->Sumw2();
525 TH1D *gHistYAntiProtons[100];
526 for(Int_t iBin = 1; iBin <= fHistYPtAntiProtons->GetNbinsY(); iBin++) {
527 title = "gHistYAntiProtons_PtBin"; title += iBin;
528 gHistYAntiProtons[iBin] = (TH1D *)fHistYPtAntiProtons->ProjectionX(title.Data(),
531 gHistYAntiProtons[iBin]->Sumw2();
534 Double_t pTmin = fHistYPtProtons->GetYaxis()->GetXmin();
535 Double_t pTStep = (fHistYPtProtons->GetYaxis()->GetXmax() - fHistYPtProtons->GetYaxis()->GetXmin())/fHistYPtProtons->GetNbinsY();
536 Double_t pTmax = pTmin + pTStep;
538 TH1D *gHistYRatio[100];
539 for(Int_t iBin = 1; iBin <= fHistYPtProtons->GetNbinsY(); iBin++) {
540 title = "gHistYRatio_PtBin"; title += iBin;
541 gHistYRatio[iBin] = new TH1D(title.Data(),"",
542 fHistYPtProtons->GetNbinsX(),
543 fHistYPtProtons->GetXaxis()->GetXmin(),
544 fHistYPtProtons->GetXaxis()->GetXmax());
545 title = "Pt: "; title += pTmin; title += " - "; title += pTmax;
546 gHistYRatio[iBin]->SetTitle(title.Data());
547 gHistYRatio[iBin]->GetYaxis()->SetTitle("#bar{p}/p");
548 gHistYRatio[iBin]->GetXaxis()->SetTitle(fHistYPtProtons->GetXaxis()->GetTitle());
549 gHistYRatio[iBin]->Divide(gHistYAntiProtons[iBin],
550 gHistYProtons[iBin],1.0,1.0,"b");
551 fYRatioInPtBinsList->Add(gHistYRatio[iBin]);
556 return fYRatioInPtBinsList;
559 //____________________________________________________________________//
560 TH1D *AliProtonAnalysis::GetProtonYHistogram() {
561 //Get the y histogram for protons
562 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
564 //TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),"");
565 TH1D *fYProtons = fProtonContainer->ShowProjection(0,kStepInPhaseSpace); //variable-step
567 fYProtons->SetStats(kFALSE);
568 fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
569 fYProtons->SetTitle("dN/dy protons");
570 fYProtons->SetMarkerStyle(kFullCircle);
571 fYProtons->SetMarkerColor(4);
572 if(nAnalyzedEvents > 0)
573 fYProtons->Scale(1./nAnalyzedEvents);
578 //____________________________________________________________________//
579 TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() {
580 //Get the y histogram for antiprotons
581 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
583 //TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"");
584 TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,kStepInPhaseSpace);//variable-step
586 fYAntiProtons->SetStats(kFALSE);
587 fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
588 fYAntiProtons->SetTitle("dN/dy antiprotons");
589 fYAntiProtons->SetMarkerStyle(kFullCircle);
590 fYAntiProtons->SetMarkerColor(4);
591 if(nAnalyzedEvents > 0)
592 fYAntiProtons->Scale(1./nAnalyzedEvents);
594 return fYAntiProtons;
597 //____________________________________________________________________//
598 TH1D *AliProtonAnalysis::GetProtonPtHistogram() {
599 //Get the Pt histogram for protons
600 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
602 //TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"");
603 TH1D *fPtProtons = fProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step
605 fPtProtons->SetStats(kFALSE);
606 fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
607 fPtProtons->SetTitle("dN/dPt protons");
608 fPtProtons->SetMarkerStyle(kFullCircle);
609 fPtProtons->SetMarkerColor(4);
610 if(nAnalyzedEvents > 0)
611 fPtProtons->Scale(1./nAnalyzedEvents);
616 //____________________________________________________________________//
617 TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() {
618 //Get the Pt histogram for antiprotons
619 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
621 //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"");
622 TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,kStepInPhaseSpace); //variable-step
624 fPtAntiProtons->SetStats(kFALSE);
625 fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
626 fPtAntiProtons->SetTitle("dN/dPt antiprotons");
627 fPtAntiProtons->SetMarkerStyle(kFullCircle);
628 fPtAntiProtons->SetMarkerColor(4);
629 if(nAnalyzedEvents > 0)
630 fPtAntiProtons->Scale(1./nAnalyzedEvents);
632 return fPtAntiProtons;
635 //____________________________________________________________________//
636 TH1D *AliProtonAnalysis::GetProtonCorrectedYHistogram() {
637 //Get the corrected y histogram for protons
638 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
640 TH1D *fYProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionX("fYProtons",1,fHistYPtProtons->GetYaxis()->GetNbins(),"e");
641 //TH1D *fYProtons = fCorrectProtons->Project(0); //0: rapidity
643 fYProtons->SetStats(kFALSE);
644 fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
645 fYProtons->GetXaxis()->SetTitle("y");
646 fYProtons->SetTitle("dN/dy protons");
647 fYProtons->SetMarkerStyle(kFullCircle);
648 fYProtons->SetMarkerColor(4);
649 if(nAnalyzedEvents > 0)
650 fYProtons->Scale(1./nAnalyzedEvents);
655 //____________________________________________________________________//
656 TH1D *AliProtonAnalysis::GetAntiProtonCorrectedYHistogram() {
657 //Get the corrected y histogram for antiprotons
658 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
660 TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionX("fYAntiProtons",1,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"e");
661 //TH1D *fYAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity
663 fYAntiProtons->SetStats(kFALSE);
664 fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
665 fYAntiProtons->GetXaxis()->SetTitle("y");
666 fYAntiProtons->SetTitle("dN/dy protons");
667 fYAntiProtons->SetMarkerStyle(kFullCircle);
668 fYAntiProtons->SetMarkerColor(4);
669 if(nAnalyzedEvents > 0)
670 fYAntiProtons->Scale(1./nAnalyzedEvents);
672 return fYAntiProtons;
675 //____________________________________________________________________//
676 TH1D *AliProtonAnalysis::GetProtonCorrectedPtHistogram() {
677 //Get the corrected Pt histogram for protons
678 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
680 TH1D *fPtProtons = (TH1D *)fHistYPtProtonsCorrected->ProjectionY("fPtProtons",1,fHistYPtProtons->GetXaxis()->GetNbins(),"e");
681 //TH1D *fPtProtons = fCorrectProtons->Project(0); //0: rapidity
683 fPtProtons->SetStats(kFALSE);
684 fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
685 fPtProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]");
686 fPtProtons->SetTitle("dN/dPt protons");
687 fPtProtons->SetMarkerStyle(kFullCircle);
688 fPtProtons->SetMarkerColor(4);
689 if(nAnalyzedEvents > 0)
690 fPtProtons->Scale(1./nAnalyzedEvents);
695 //____________________________________________________________________//
696 TH1D *AliProtonAnalysis::GetAntiProtonCorrectedPtHistogram() {
697 //Get the corrected Pt histogram for antiprotons
698 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
700 TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtonsCorrected->ProjectionY("fPtAntiProtons",1,fHistYPtAntiProtons->GetXaxis()->GetNbins(),"e");
701 //TH1D *fPtAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity
703 fPtAntiProtons->SetStats(kFALSE);
704 fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
705 fPtAntiProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]");
706 fPtAntiProtons->SetTitle("dN/dPt antiprotons");
707 fPtAntiProtons->SetMarkerStyle(kFullCircle);
708 fPtAntiProtons->SetMarkerColor(4);
709 if(nAnalyzedEvents > 0)
710 fPtAntiProtons->Scale(1./nAnalyzedEvents);
712 return fPtAntiProtons;
715 //____________________________________________________________________//
716 TH1D *AliProtonAnalysis::GetYRatioHistogram() {
717 //Returns the rapidity dependence of the ratio (uncorrected)
718 TH1D *fYProtons = GetProtonYHistogram();
719 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
721 TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
722 hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0,"e");
723 hRatioY->SetMarkerStyle(kFullCircle);
724 hRatioY->SetMarkerColor(4);
725 hRatioY->GetYaxis()->SetTitle("#bar{p}/p");
726 hRatioY->GetYaxis()->SetTitleOffset(1.4);
727 hRatioY->GetXaxis()->SetTitle("y");
728 hRatioY->GetXaxis()->SetTitleColor(1);
729 hRatioY->SetStats(kFALSE);
734 //____________________________________________________________________//
735 TH1D *AliProtonAnalysis::GetYRatioCorrectedHistogram() {
736 //TH2D *gCorrectionProtons,
737 //TH2D *gCorrectionAntiProtons) {
738 //Returns the rapidity dependence of the ratio (corrected)
739 //fHistYPtProtons->Multiply(gCorrectionProtons);
740 TH1D *fYProtons = GetProtonCorrectedYHistogram();
741 //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons);
742 TH1D *fYAntiProtons = GetAntiProtonCorrectedYHistogram();
744 TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
745 hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0,"e");
746 hRatioY->SetMarkerStyle(kFullCircle);
747 hRatioY->SetMarkerColor(4);
748 hRatioY->GetYaxis()->SetTitle("#bar{p}/p");
749 hRatioY->GetYaxis()->SetTitleOffset(1.4);
750 hRatioY->GetXaxis()->SetTitle("y");
751 hRatioY->GetXaxis()->SetTitleColor(1);
752 hRatioY->SetStats(kFALSE);
757 //____________________________________________________________________//
758 TH1D *AliProtonAnalysis::GetPtRatioHistogram() {
759 //Returns the pT dependence of the ratio (uncorrected)
760 TH1D *fPtProtons = GetProtonPtHistogram();
761 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
763 TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
764 hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0,"e");
765 hRatioPt->SetMarkerStyle(kFullCircle);
766 hRatioPt->SetMarkerColor(4);
767 hRatioPt->GetYaxis()->SetTitle("#bar{p}/p");
768 hRatioPt->GetYaxis()->SetTitleOffset(1.4);
769 hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
770 hRatioPt->GetXaxis()->SetTitleColor(1);
771 hRatioPt->SetStats(kFALSE);
776 //____________________________________________________________________//
777 TH1D *AliProtonAnalysis::GetPtRatioCorrectedHistogram() {
778 //TH2D *gCorrectionProtons,
779 //TH2D *gCorrectionAntiProtons) {
780 //Returns the Pt dependence of the ratio (corrected)
781 //fHistYPtProtons->Multiply(gCorrectionProtons);
782 TH1D *fPtProtons = GetProtonCorrectedPtHistogram();
783 //fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons);
784 TH1D *fPtAntiProtons = GetAntiProtonCorrectedPtHistogram();
786 TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
787 hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0,"e");
788 hRatioPt->SetMarkerStyle(kFullCircle);
789 hRatioPt->SetMarkerColor(4);
790 hRatioPt->GetYaxis()->SetTitle("#bar{p}/p");
791 hRatioPt->GetYaxis()->SetTitleOffset(1.4);
792 hRatioPt->GetXaxis()->SetTitle("y");
793 hRatioPt->GetXaxis()->SetTitleColor(1);
794 hRatioPt->SetStats(kFALSE);
799 //____________________________________________________________________//
800 TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() {
801 //Returns the rapidity dependence of the asymmetry (uncorrected)
802 TH1D *fYProtons = GetProtonYHistogram();
803 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
805 TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
806 hsum->Add(fYProtons,fYAntiProtons,1.0,1.0);
808 TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
809 hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0);
811 TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
812 hAsymmetryY->Divide(hdiff,hsum,2.0,1.,"e");
813 hAsymmetryY->SetMarkerStyle(kFullCircle);
814 hAsymmetryY->SetMarkerColor(4);
815 hAsymmetryY->GetYaxis()->SetTitle("A_{p}");
816 hAsymmetryY->GetYaxis()->SetTitleOffset(1.4);
817 hAsymmetryY->GetXaxis()->SetTitle("y");
818 hAsymmetryY->GetXaxis()->SetTitleColor(1);
819 hAsymmetryY->SetStats(kFALSE);
824 //____________________________________________________________________//
825 TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() {
826 //Returns the pT dependence of the asymmetry (uncorrected)
827 TH1D *fPtProtons = GetProtonPtHistogram();
828 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
830 TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
831 hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0);
833 TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
834 hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0);
836 TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
837 hAsymmetryPt->Divide(hdiff,hsum,2.0,1.,"e");
838 hAsymmetryPt->SetMarkerStyle(kFullCircle);
839 hAsymmetryPt->SetMarkerColor(4);
840 hAsymmetryPt->GetYaxis()->SetTitle("A_{p}");
841 hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4);
842 hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
843 hAsymmetryPt->GetXaxis()->SetTitleColor(1);
844 hAsymmetryPt->SetStats(kFALSE);
849 //____________________________________________________________________//
850 void AliProtonAnalysis::Analyze(AliESDEvent* esd,
851 const AliESDVertex *vertex) {
852 //Main analysis part - ESD
854 Int_t nIdentifiedProtons = 0, nIdentifiedAntiProtons = 0;
855 Int_t nSurvivedProtons = 0, nSurvivedAntiProtons = 0;
857 //=========================================//
858 //Aleph parametrization
859 Double_t fAlephParameters[5];
860 if(fProtonAnalysisBase->GetMCAnalysisMode()) {
861 fAlephParameters[0] = 2.15898e+00/50.;
862 fAlephParameters[1] = 1.75295e+01;
863 fAlephParameters[2] = 3.40030e-09;
864 fAlephParameters[3] = 1.96178e+00;
865 fAlephParameters[4] = 3.91720e+00;
868 fAlephParameters[0] = 0.0283086;
869 fAlephParameters[1] = 2.63394e+01;
870 fAlephParameters[2] = 5.04114e-11;
871 fAlephParameters[3] = 2.12543e+00;
872 fAlephParameters[4] = 4.88663e+00;
874 AliESDpid *fESDpid = new AliESDpid();
875 AliTPCPIDResponse tpcResponse = fESDpid->GetTPCResponse();
876 tpcResponse.SetBetheBlochParameters(fAlephParameters[0],fAlephParameters[1],fAlephParameters[2],fAlephParameters[3],fAlephParameters[4]);
877 //=========================================//
879 fHistEvents->Fill(1); //number of analyzed events
880 Double_t containerInput[2] ;
881 Double_t gPt = 0.0, gP = 0.0;
882 nTracks = esd->GetNumberOfTracks();
883 for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
884 AliESDtrack* track = esd->GetTrack(iTracks);
885 AliESDtrack trackTPC;
887 //in case it's a TPC only track relate it to the proper vertex
888 /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC) {
890 track->GetImpactParametersTPC(p,cov);
891 if (p[0]==0 && p[1]==0)
892 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
893 if (!track->FillTPCOnlyTrack(trackTPC)) {
900 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
901 Int_t npointsTPCdEdx = track->GetTPCsignalN();
902 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
903 Double_t dca3D = 0.0;
905 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
906 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
907 if(!tpcTrack) continue;
908 gPt = tpcTrack->Pt();
911 tpcTrack->PropagateToDCA(vertex,
912 esd->GetMagneticField(),
914 dca3D = TMath::Sqrt(TMath::Power(dca[0],2) +
915 TMath::Power(dca[1],2));
917 if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) {
918 if(fProtonAnalysisBase->IsAccepted(track)) {
919 ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal());
920 ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton)));
921 ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),
922 tpcTrack->Phi()*180./TMath::Pi(),
924 ((TH3F *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),
925 tpcTrack->Phi()*180./TMath::Pi(),
927 ((TH3F *)(fQA2DList->At(8)))->Fill(gPt,
928 tpcTrack->Phi()*180./TMath::Pi(),
930 ((TH3F *)(fQA2DList->At(10)))->Fill(gPt,
931 tpcTrack->Phi()*180./TMath::Pi(),
936 if(fProtonAnalysisBase->IsProton(track)) {
937 //Step: kStepIdentified
938 if(fProtonAnalysisBase->GetEtaMode())
939 containerInput[0] = tpcTrack->Eta();
941 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
944 containerInput[1] = gPt;
945 if(tpcTrack->Charge() > 0) {
946 nIdentifiedProtons += 1;
947 fProtonContainer->Fill(containerInput,kStepIdentified);
949 else if(tpcTrack->Charge() < 0) {
950 nIdentifiedAntiProtons += 1;
951 fAntiProtonContainer->Fill(containerInput,kStepIdentified);
954 //Step: kStepIsPrimary
955 if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) {
956 if(tpcTrack->Charge() > 0)
957 fProtonContainer->Fill(containerInput,kStepIsPrimary);
958 else if(tpcTrack->Charge() < 0)
959 fAntiProtonContainer->Fill(containerInput,kStepIsPrimary);
961 FillQA(esd,vertex,track);
963 //Step: kStepSurvived
964 if(fProtonAnalysisBase->IsAccepted(track)) {
965 ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal());
966 ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton)));
967 ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),
968 tpcTrack->Phi()*180./TMath::Pi(),
970 ((TH3F *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),
971 tpcTrack->Phi()*180./TMath::Pi(),
973 ((TH3F *)(fQA2DList->At(9)))->Fill(gPt,
974 tpcTrack->Phi()*180./TMath::Pi(),
976 ((TH3F *)(fQA2DList->At(11)))->Fill(gPt,
977 tpcTrack->Phi()*180./TMath::Pi(),
980 if(tpcTrack->Charge() > 0) {
981 fProtonContainer->Fill(containerInput,kStepSurvived);
982 ((TH2F *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(),
983 tpcTrack->Phi()*180./TMath::Pi());
984 ((TH3F *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(),
987 ((TH3F *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(),
990 ((TH3F *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(),
994 else if(tpcTrack->Charge() < 0) {
995 fAntiProtonContainer->Fill(containerInput,kStepSurvived);
996 ((TH2F *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(),
997 tpcTrack->Phi()*180./TMath::Pi());
998 ((TH3F *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(),
1000 TMath::Abs(dca[0]));
1001 ((TH3F *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(),
1003 TMath::Abs(dca[1]));
1004 ((TH3F *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(),
1009 //Step: kStepInPhaseSpace
1010 if(fProtonAnalysisBase->IsInPhaseSpace(track)) {
1011 if(tpcTrack->Charge() > 0) {
1012 nSurvivedProtons += 1;
1013 fHistYPtProtons->Fill(containerInput[0],
1015 fProtonContainer->Fill(containerInput,kStepInPhaseSpace);
1017 else if(tpcTrack->Charge() < 0) {
1018 nSurvivedAntiProtons += 1;
1019 fHistYPtAntiProtons->Fill(containerInput[0],
1021 fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace);
1023 }//Step: kStepInPhaseSpace
1024 }//Step: kStepSurvived
1025 }//Step: kStepIsPrimary
1026 }//Step: kStepIdentified
1028 else if(fProtonAnalysisBase->GetAnalysisMode() == AliProtonAnalysisBase::kGlobal) {
1031 track->PropagateToDCA(vertex,
1032 esd->GetMagneticField(),
1034 dca3D = TMath::Sqrt(TMath::Power(dca[0],2) +
1035 TMath::Power(dca[1],2));
1037 if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) {
1038 if(fProtonAnalysisBase->IsAccepted(track)) {
1039 ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal());
1040 ((TH2F *)(fQA2DList->At(2)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton)));
1041 ((TH3F *)(fQA2DList->At(4)))->Fill(track->Eta(),
1042 track->Phi()*180./TMath::Pi(),
1044 ((TH3F *)(fQA2DList->At(6)))->Fill(track->Eta(),
1045 track->Phi()*180./TMath::Pi(),
1047 ((TH3F *)(fQA2DList->At(8)))->Fill(gPt,
1048 track->Phi()*180./TMath::Pi(),
1050 ((TH3F *)(fQA2DList->At(10)))->Fill(gPt,
1051 track->Phi()*180./TMath::Pi(),
1056 if(fProtonAnalysisBase->IsProton(track)) {
1057 //Step: kStepIdentified
1058 if(fProtonAnalysisBase->GetEtaMode())
1059 containerInput[0] = track->Eta();
1061 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
1064 containerInput[1] = gPt;
1065 if(track->Charge() > 0) {
1066 nIdentifiedProtons += 1;
1067 fProtonContainer->Fill(containerInput,kStepIdentified);
1069 else if(track->Charge() < 0) {
1070 nIdentifiedAntiProtons += 1;
1071 fAntiProtonContainer->Fill(containerInput,kStepIdentified);
1074 //Step: kStepIsPrimary
1075 if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) {
1076 if(track->Charge() > 0)
1077 fProtonContainer->Fill(containerInput,kStepIsPrimary);
1078 else if(track->Charge() < 0)
1079 fAntiProtonContainer->Fill(containerInput,kStepIsPrimary);
1081 FillQA(esd,vertex,track);
1083 //Step: kStepSurvived
1084 if(fProtonAnalysisBase->IsAccepted(track)) {
1085 ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal());
1086 ((TH2F *)(fQA2DList->At(3)))->Fill(gP,TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton)));
1087 ((TH3F *)(fQA2DList->At(5)))->Fill(track->Eta(),
1088 track->Phi()*180./TMath::Pi(),
1090 ((TH3F *)(fQA2DList->At(7)))->Fill(track->Eta(),
1091 track->Phi()*180./TMath::Pi(),
1093 ((TH3F *)(fQA2DList->At(9)))->Fill(gPt,
1094 track->Phi()*180./TMath::Pi(),
1096 ((TH3F *)(fQA2DList->At(11)))->Fill(gPt,
1097 track->Phi()*180./TMath::Pi(),
1100 if(track->Charge() > 0) {
1101 fProtonContainer->Fill(containerInput,kStepSurvived);
1102 ((TH2F *)(fQA2DList->At(12)))->Fill(track->Eta(),
1103 track->Phi()*180./TMath::Pi());
1104 ((TH3F *)(fQA2DList->At(14)))->Fill(track->Eta(),
1106 TMath::Abs(dca[0]));
1107 ((TH3F *)(fQA2DList->At(15)))->Fill(track->Eta(),
1109 TMath::Abs(dca[1]));
1110 ((TH3F *)(fQA2DList->At(18)))->Fill(track->Eta(),
1114 else if(track->Charge() < 0) {
1115 fAntiProtonContainer->Fill(containerInput,kStepSurvived);
1116 ((TH2F *)(fQA2DList->At(13)))->Fill(track->Eta(),
1117 track->Phi()*180./TMath::Pi());
1118 ((TH3F *)(fQA2DList->At(16)))->Fill(track->Eta(),
1120 TMath::Abs(dca[0]));
1121 ((TH3F *)(fQA2DList->At(17)))->Fill(track->Eta(),
1123 TMath::Abs(dca[1]));
1124 ((TH3F *)(fQA2DList->At(19)))->Fill(track->Eta(),
1129 //Step: kStepInPhaseSpace
1130 if(fProtonAnalysisBase->IsInPhaseSpace(track)) {
1131 if(track->Charge() > 0) {
1132 nSurvivedProtons += 1;
1133 fHistYPtProtons->Fill(containerInput[0],
1135 fProtonContainer->Fill(containerInput,kStepInPhaseSpace);
1137 else if(track->Charge() < 0) {
1138 nSurvivedAntiProtons += 1;
1139 fHistYPtAntiProtons->Fill(containerInput[0],
1141 fAntiProtonContainer->Fill(containerInput,kStepInPhaseSpace);
1143 }//Step: kStepInPhaseSpace
1144 }//Step: kStepSurvived
1145 }//Step: kStepIsPrimary
1146 }//Step: kStepIdentified
1150 if((nIdentifiedProtons > 0)||(nIdentifiedAntiProtons > 0))
1151 fHistEvents->Fill(2); //number of analyzed events with at least one (anti)proton
1153 if(fProtonAnalysisBase->GetDebugMode())
1154 Printf("Initial number of tracks: %d | Identified (anti)protons: %d - %d | Survived (anti)protons: %d - %d",nTracks,nIdentifiedProtons,nIdentifiedAntiProtons,nSurvivedProtons,nSurvivedAntiProtons);
1157 //____________________________________________________________________//
1158 void AliProtonAnalysis::Analyze(AliAODEvent* const fAOD) {
1159 //Main analysis part - AOD
1160 fHistEvents->Fill(1); //number of analyzed events
1161 Int_t nTracks = fAOD->GetNumberOfTracks();
1162 for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
1163 AliAODTrack* track = fAOD->GetTrack(iTracks);
1164 Double_t gPt = track->Pt();
1165 Double_t gP = track->P();
1168 Double_t probability[10];
1169 track->GetPID(probability);
1171 for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP);
1172 if(rcc == 0.0) continue;
1174 for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP)/rcc;
1175 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w);
1176 if(fParticleType == 4) {
1177 if(track->Charge() > 0)
1178 fHistYPtProtons->Fill(track->Y(fParticleType),gPt);
1179 else if(track->Charge() < 0)
1180 fHistYPtAntiProtons->Fill(track->Y(fParticleType),gPt);
1185 //____________________________________________________________________//
1186 void AliProtonAnalysis::Analyze(AliStack* const stack,
1187 Bool_t iInclusive) {
1188 //Main analysis part - MC
1189 fHistEvents->Fill(1); //number of analyzed events
1191 Int_t nParticles = 0;
1192 //inclusive protons -
1193 if(iInclusive) nParticles = stack->GetNtrack();
1194 else nParticles = stack->GetNprimary();
1196 for(Int_t i = 0; i < nParticles; i++) {
1197 TParticle *particle = stack->Particle(i);
1198 if(!particle) continue;
1200 //in case of inclusive protons reject the secondaries from hadronic inter.
1201 if(particle->GetUniqueID() == 13) continue;
1203 if(TMath::Abs(particle->Eta()) > 1.0) continue;
1204 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
1205 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
1207 Int_t pdgcode = particle->GetPdgCode();
1208 if(pdgcode == 2212) fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
1212 if(pdgcode == -2212) fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
1219 //____________________________________________________________________//
1220 Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) {
1221 //calculates the mean value of the ratio/asymmetry within \pm edge
1222 Double_t sum = 0.0, sumError = 0.0;
1224 //calculate the mean
1225 for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) {
1226 Double_t x = hist->GetBinCenter(i);
1227 Double_t y = hist->GetBinContent(i);
1228 if(TMath::Abs(x) < edge) {
1230 sumError += TMath::Power(hist->GetBinError(i),2);
1233 //Printf("eta: %lf - sum: %lf - sumError: %lf - counter: %d",
1234 //TMath::Abs(x),sum,sumError,nentries);
1236 Double_t mean = 0.0;
1237 Double_t error = 0.0;
1239 mean = sum/nentries;
1240 error = TMath::Sqrt(sumError)/nentries;
1243 //calculate the error
1244 /*for(Int_t i = 1; i <= hist->GetXaxis()->GetNbins(); i++) {
1245 Double_t x = hist->GetBinCenter(i);
1246 Double_t y = hist->GetBinContent(i);
1247 if(TMath::Abs(x) < edge) {
1248 sum += TMath::Power((mean - y),2);
1254 cout<<"========================================="<<endl;
1255 cout<<"Input distribution: "<<hist->GetName()<<endl;
1256 cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl;
1257 cout<<"Mean value :"<<mean<<endl;
1258 cout<<"Error: "<<error<<endl;
1259 cout<<"========================================="<<endl;
1264 //____________________________________________________________________//
1265 Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) {
1266 //calculates the (anti)proton yields within the \pm edge
1267 Double_t sum = 0.0, sumerror = 0.0;
1268 Double_t error = 0.0;
1269 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1270 Double_t x = hist->GetBinCenter(i+1);
1271 Double_t y = hist->GetBinContent(i+1);
1272 if(TMath::Abs(x) < edge) {
1274 sumerror += TMath::Power(hist->GetBinError(i+1),2);
1278 error = TMath::Sqrt(sumerror);
1280 cout<<"========================================="<<endl;
1281 cout<<"Input distribution: "<<hist->GetName()<<endl;
1282 cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl;
1283 cout<<"Yields :"<<sum<<endl;
1284 cout<<"Error: "<<error<<endl;
1285 cout<<"========================================="<<endl;
1290 //____________________________________________________________________//
1291 void AliProtonAnalysis::Correct() {
1292 //Apply the corrections: Fast & dirty way for the absorption corrections
1293 fHistYPtProtonsCorrected = fProtonContainer->ShowProjection(0,1,kStepInPhaseSpace);
1294 fHistYPtProtonsCorrected->Divide(fHistEfficiencyYPtProtons);
1295 fHistYPtAntiProtonsCorrected = fAntiProtonContainer->ShowProjection(0,1,kStepInPhaseSpace);
1296 fHistYPtAntiProtonsCorrected->Divide(fHistEfficiencyYPtAntiProtons);
1299 //____________________________________________________________________//
1300 void AliProtonAnalysis::Correct(Int_t step) {
1301 //Applies the correction maps to the initial containers
1302 fCorrectProtons = new AliCFDataGrid("correctProtons",
1305 fCorrectProtons->SetMeasured(0);
1306 fCorrectProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListProtons->At(step));
1308 fCorrectAntiProtons = new AliCFDataGrid("correctAntiProtons",
1310 *fAntiProtonContainer);
1311 fCorrectAntiProtons->SetMeasured(0);
1312 fCorrectAntiProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListAntiProtons->At(step));
1315 //____________________________________________________________________//
1316 Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) {
1317 // Reads the outout of the correction framework task
1318 // Creates the correction maps
1319 // Puts the results in the different TList objects
1320 Bool_t status = kTRUE;
1322 TFile *file = TFile::Open(filename);
1324 cout<<"Could not find the input CORRFW file "<<filename<<endl;
1327 TList *list = dynamic_cast<TList *>(file->Get("outputList"));
1328 Int_t iRap = 0, iPt = 1;
1330 //Calculation of efficiency/correction: Protons
1331 AliCFContainer *gProtonContainer = dynamic_cast<AliCFContainer *>(list->At(0));
1332 AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20",
1333 "effProtonsStep0Step2",
1335 effProtonsStep0Step2->CalculateEfficiency(2,0);
1336 fHistEfficiencyYPtProtons = effProtonsStep0Step2->Project(iRap,iPt);
1337 fHistEfficiencyYPtProtons->Sumw2();
1339 //Calculation of efficiency/correction: Protons
1340 AliCFContainer *gAntiProtonContainer = dynamic_cast<AliCFContainer *>(list->At(1));
1341 AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20",
1342 "effAntiProtonsStep0Step2",
1343 *gAntiProtonContainer);
1344 effAntiProtonsStep0Step2->CalculateEfficiency(2,0);
1345 fHistEfficiencyYPtAntiProtons = effAntiProtonsStep0Step2->Project(iRap,iPt);
1346 fHistEfficiencyYPtAntiProtons->Sumw2();
1353 //____________________________________________________________________//
1354 /*Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) {
1355 // Reads the outout of the correction framework task
1356 // Creates the correction maps
1357 // Puts the results in the different TList objects
1358 Bool_t status = kTRUE;
1360 TFile *file = TFile::Open(filename);
1362 cout<<"Could not find the input CORRFW file "<<filename<<endl;
1366 //________________________________________//
1368 fEffGridListProtons = new TList();
1369 fCorrectionListProtons2D = new TList();
1370 fEfficiencyListProtons1D = new TList();
1371 fCorrectionListProtons1D = new TList();
1373 AliCFContainer *corrfwContainerProtons = (AliCFContainer*) (file->Get("containerProtons"));
1374 if(!corrfwContainerProtons) {
1375 cout<<"CORRFW container for protons not found!"<<endl;
1379 Int_t nSteps = corrfwContainerProtons->GetNStep();
1381 //currently the GRID is formed by the y-pT parameters
1382 //Add Vz as a next step
1383 Int_t iRap = 0, iPt = 1;
1384 AliCFEffGrid *effProtonsStep0Step1 = new AliCFEffGrid("eff10",
1385 "effProtonsStep0Step1",
1386 *corrfwContainerProtons);
1387 effProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0
1388 fEffGridListProtons->Add(effProtonsStep0Step1);
1389 gYPt[0] = effProtonsStep0Step1->Project(iRap,iPt);
1390 fCorrectionListProtons2D->Add(gYPt[0]);
1392 AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20",
1393 "effProtonsStep0Step2",
1394 *corrfwContainerProtons);
1395 effProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0
1396 fEffGridListProtons->Add(effProtonsStep0Step2);
1397 gYPt[1] = effProtonsStep0Step2->Project(iRap,iPt);
1398 fCorrectionListProtons2D->Add(gYPt[1]);
1400 AliCFEffGrid *effProtonsStep0Step3 = new AliCFEffGrid("eff30",
1401 "effProtonsStep0Step3",
1402 *corrfwContainerProtons);
1403 effProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0
1404 fEffGridListProtons->Add(effProtonsStep0Step3);
1405 gYPt[2] = effProtonsStep0Step3->Project(iRap,iPt);
1406 fCorrectionListProtons2D->Add(gYPt[2]);
1408 TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws-[2])
1409 TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws-[2])
1411 //Get the projection of the efficiency maps
1412 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1413 gEfficiency[iParameter][0] = effProtonsStep0Step1->Project(iParameter);
1414 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1415 gTitle += "_Step0_Step1";
1416 gEfficiency[iParameter][0]->SetName(gTitle.Data());
1417 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][0]);
1418 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1419 gTitle += "_Step0_Step1";
1420 gCorrection[iParameter][0] = new TH1D(gTitle.Data(),
1422 gEfficiency[iParameter][0]->GetNbinsX(),
1423 gEfficiency[iParameter][0]->GetXaxis()->GetXmin(),
1424 gEfficiency[iParameter][0]->GetXaxis()->GetXmax());
1425 //initialisation of the correction
1426 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++)
1427 gCorrection[iParameter][0]->SetBinContent(iBin,1.0);
1429 gEfficiency[iParameter][1] = effProtonsStep0Step2->Project(iParameter);
1430 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1431 gTitle += "_Step0_Step2";
1432 gEfficiency[iParameter][1]->SetName(gTitle.Data());
1433 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][1]);
1434 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1435 gTitle += "_Step0_Step2";
1436 gCorrection[iParameter][1] = new TH1D(gTitle.Data(),
1438 gEfficiency[iParameter][1]->GetNbinsX(),
1439 gEfficiency[iParameter][1]->GetXaxis()->GetXmin(),
1440 gEfficiency[iParameter][1]->GetXaxis()->GetXmax());
1441 //initialisation of the correction
1442 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++)
1443 gCorrection[iParameter][1]->SetBinContent(iBin,1.0);
1445 gEfficiency[iParameter][2] = effProtonsStep0Step3->Project(iParameter);
1446 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1447 gTitle += "_Step0_Step3";
1448 gEfficiency[iParameter][2]->SetName(gTitle.Data());
1449 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][2]);
1450 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1451 gTitle += "_Step0_Step3";
1452 gCorrection[iParameter][2] = new TH1D(gTitle.Data(),
1454 gEfficiency[iParameter][2]->GetNbinsX(),
1455 gEfficiency[iParameter][2]->GetXaxis()->GetXmin(),
1456 gEfficiency[iParameter][2]->GetXaxis()->GetXmax());
1457 //initialisation of the correction
1458 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++)
1459 gCorrection[iParameter][2]->SetBinContent(iBin,1.0);
1461 //Calculate the 1D correction parameters as a function of y and pT
1462 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1463 for(Int_t iStep = 1; iStep < nSteps; iStep++) {
1464 gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]);
1465 fCorrectionListProtons1D->Add(gCorrection[iParameter][iStep-1]);
1469 //________________________________________//
1471 fEffGridListAntiProtons = new TList();
1472 fCorrectionListAntiProtons2D = new TList();
1473 fEfficiencyListAntiProtons1D = new TList();
1474 fCorrectionListAntiProtons1D = new TList();
1476 AliCFContainer *corrfwContainerAntiProtons = (AliCFContainer*) (file->Get("containerAntiProtons"));
1477 if(!corrfwContainerAntiProtons) {
1478 cout<<"CORRFW container for antiprotons not found!"<<endl;
1482 nSteps = corrfwContainerAntiProtons->GetNStep();
1483 //currently the GRID is formed by the y-pT parameters
1484 //Add Vz as a next step
1485 AliCFEffGrid *effAntiProtonsStep0Step1 = new AliCFEffGrid("eff10",
1486 "effAntiProtonsStep0Step1",
1487 *corrfwContainerAntiProtons);
1488 effAntiProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0
1489 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step1);
1490 gYPt[0] = effAntiProtonsStep0Step1->Project(iRap,iPt);
1491 fCorrectionListAntiProtons2D->Add(gYPt[0]);
1493 AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20",
1494 "effAntiProtonsStep0Step2",
1495 *corrfwContainerAntiProtons);
1496 effAntiProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0
1497 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step2);
1498 gYPt[1] = effAntiProtonsStep0Step2->Project(iRap,iPt);
1499 fCorrectionListAntiProtons2D->Add(gYPt[1]);
1501 AliCFEffGrid *effAntiProtonsStep0Step3 = new AliCFEffGrid("eff30",
1502 "effAntiProtonsStep0Step3",
1503 *corrfwContainerAntiProtons);
1504 effAntiProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0
1505 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step3);
1506 gYPt[2] = effAntiProtonsStep0Step3->Project(iRap,iPt);
1507 fCorrectionListAntiProtons2D->Add(gYPt[2]);
1509 //Get the projection of the efficiency maps
1510 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1511 gEfficiency[iParameter][0] = effAntiProtonsStep0Step1->Project(iParameter);
1512 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1513 gTitle += "_Step0_Step1";
1514 gEfficiency[iParameter][0]->SetName(gTitle.Data());
1515 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][0]);
1516 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1517 gTitle += "_Step0_Step1";
1518 gCorrection[iParameter][0] = new TH1D(gTitle.Data(),
1520 gEfficiency[iParameter][0]->GetNbinsX(),
1521 gEfficiency[iParameter][0]->GetXaxis()->GetXmin(),
1522 gEfficiency[iParameter][0]->GetXaxis()->GetXmax());
1523 //initialisation of the correction
1524 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++)
1525 gCorrection[iParameter][0]->SetBinContent(iBin,1.0);
1527 gEfficiency[iParameter][1] = effAntiProtonsStep0Step2->Project(iParameter);
1528 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1529 gTitle += "_Step0_Step2";
1530 gEfficiency[iParameter][1]->SetName(gTitle.Data());
1531 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][1]);
1532 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1533 gTitle += "_Step0_Step2";
1534 gCorrection[iParameter][1] = new TH1D(gTitle.Data(),
1536 gEfficiency[iParameter][1]->GetNbinsX(),
1537 gEfficiency[iParameter][1]->GetXaxis()->GetXmin(),
1538 gEfficiency[iParameter][1]->GetXaxis()->GetXmax());
1539 //initialisation of the correction
1540 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++)
1541 gCorrection[iParameter][1]->SetBinContent(iBin,1.0);
1543 gEfficiency[iParameter][2] = effAntiProtonsStep0Step3->Project(iParameter);
1544 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1545 gTitle += "_Step0_Step3";
1546 gEfficiency[iParameter][2]->SetName(gTitle.Data());
1547 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][2]);
1548 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1549 gTitle += "_Step0_Step3";
1550 gCorrection[iParameter][2] = new TH1D(gTitle.Data(),
1552 gEfficiency[iParameter][2]->GetNbinsX(),
1553 gEfficiency[iParameter][2]->GetXaxis()->GetXmin(),
1554 gEfficiency[iParameter][2]->GetXaxis()->GetXmax());
1555 //initialisation of the correction
1556 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++)
1557 gCorrection[iParameter][2]->SetBinContent(iBin,1.0);
1559 //Calculate the 1D correction parameters as a function of y and pT
1560 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1561 for(Int_t iStep = 1; iStep < nSteps; iStep++) {
1562 gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]);
1563 fCorrectionListAntiProtons1D->Add(gCorrection[iParameter][iStep-1]);
1570 //____________________________________________________________________//
1571 void AliProtonAnalysis::InitQA() {
1572 //Applies the correction maps to the initial containers
1573 fInitQAFlag = kTRUE;
1574 fGlobalQAList = new TList();
1575 fGlobalQAList->SetName("fGlobalQAList");
1577 //========================================================//
1578 fQA2DList = new TList();
1579 fQA2DList->SetName("fQA2DList");
1580 fGlobalQAList->Add(fQA2DList);
1583 TH2F *gHistdEdxP = new TH2F("gHistdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600);
1584 fQA2DList->Add(gHistdEdxP);
1585 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);
1586 fQA2DList->Add(gHistProtonsdEdxP);
1588 //normalized dEdx plots
1589 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);
1590 fQA2DList->Add(gHistZP);
1591 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);
1592 fQA2DList->Add(gHistProtonsZP);
1594 //eta-phi-Npoints(dEdx)
1595 TH3F *gHistEtaPhiTPCdEdxNPoints = new TH3F("gHistEtaPhiTPCdEdxNPoints",
1596 ";#eta;#phi;N_{points}(TPC)",
1600 gHistEtaPhiTPCdEdxNPoints->SetStats(kTRUE);
1601 fQA2DList->Add(gHistEtaPhiTPCdEdxNPoints);
1602 TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = new TH3F("gHistProtonsEtaPhiTPCdEdxNPoints",
1603 ";#eta;#phi;N_{points}(TPC)",
1607 gHistProtonsEtaPhiTPCdEdxNPoints->SetStats(kTRUE);
1608 fQA2DList->Add(gHistProtonsEtaPhiTPCdEdxNPoints);
1611 TH3F *gHistEtaPhiTPCNPoints = new TH3F("gHistEtaPhiTPCNPoints",
1612 ";#eta;#phi;N_{points}(TPC)",
1616 gHistEtaPhiTPCNPoints->SetStats(kTRUE);
1617 fQA2DList->Add(gHistEtaPhiTPCNPoints);
1618 TH3F *gHistProtonsEtaPhiTPCNPoints = new TH3F("gHistProtonsEtaPhiTPCNPoints",
1619 ";#eta;#phi;N_{points}(TPC)",
1623 gHistProtonsEtaPhiTPCNPoints->SetStats(kTRUE);
1624 fQA2DList->Add(gHistProtonsEtaPhiTPCNPoints);
1626 //pt-phi-Npoints(dEdx)
1627 TH3F *gHistPtPhiTPCdEdxNPoints = new TH3F("gHistPtPhiTPCdEdxNPoints",
1628 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1629 fNBinsPt,fMinPt,fMaxPt,
1632 gHistPtPhiTPCdEdxNPoints->SetStats(kTRUE);
1633 fQA2DList->Add(gHistPtPhiTPCdEdxNPoints);
1634 TH3F *gHistProtonsPtPhiTPCdEdxNPoints = new TH3F("gHistProtonsPtPhiTPCdEdxNPoints",
1635 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1636 fNBinsPt,fMinPt,fMaxPt,
1639 gHistProtonsPtPhiTPCdEdxNPoints->SetStats(kTRUE);
1640 fQA2DList->Add(gHistProtonsPtPhiTPCdEdxNPoints);
1643 TH3F *gHistPtPhiTPCNPoints = new TH3F("gHistPtPhiTPCNPoints",
1644 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1645 fNBinsPt,fMinPt,fMaxPt,
1648 gHistPtPhiTPCNPoints->SetStats(kTRUE);
1649 fQA2DList->Add(gHistPtPhiTPCNPoints);
1650 TH3F *gHistProtonsPtPhiTPCNPoints = new TH3F("gHistProtonsPtPhiTPCNPoints",
1651 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1652 fNBinsPt,fMinPt,fMaxPt,
1655 gHistProtonsPtPhiTPCNPoints->SetStats(kTRUE);
1656 fQA2DList->Add(gHistProtonsPtPhiTPCNPoints);
1658 //eta-phi for protons & antiprotons
1659 TH2F *gHistProtonsEtaPhi = new TH2F("gHistProtonsEtaPhi",
1663 gHistProtonsEtaPhi->SetStats(kTRUE);
1664 fQA2DList->Add(gHistProtonsEtaPhi);
1665 TH2F *gHistAntiProtonsEtaPhi = new TH2F("gHistAntiProtonsEtaPhi",
1669 gHistAntiProtonsEtaPhi->SetStats(kTRUE);
1670 fQA2DList->Add(gHistAntiProtonsEtaPhi);
1672 //dca vs pT for protons & antiprotons
1673 TH3F *gHistProtonsDCAxyEtaPt = new TH3F("gHistProtonsDCAxyEtaPt",
1674 ";P_{T} [GeV/c];dca_{xy} [cm]",
1675 fNBinsY,fMinY,fMaxY,
1676 fNBinsPt,fMinPt,fMaxPt,
1678 if(fProtonAnalysisBase->GetEtaMode())
1679 gHistProtonsDCAxyEtaPt->GetXaxis()->SetTitle("#eta");
1681 gHistProtonsDCAxyEtaPt->GetXaxis()->SetTitle("y");
1682 gHistProtonsDCAxyEtaPt->SetStats(kTRUE);
1683 fQA2DList->Add(gHistProtonsDCAxyEtaPt);
1684 TH3F *gHistProtonsDCAzEtaPt = new TH3F("gHistProtonsDCAzEtaPt",
1685 ";P_{T} [GeV/c];dca_{z} [cm]",
1686 fNBinsY,fMinY,fMaxY,
1687 fNBinsPt,fMinPt,fMaxPt,
1689 if(fProtonAnalysisBase->GetEtaMode())
1690 gHistProtonsDCAzEtaPt->GetXaxis()->SetTitle("#eta");
1692 gHistProtonsDCAzEtaPt->GetXaxis()->SetTitle("y");
1693 gHistProtonsDCAzEtaPt->SetStats(kTRUE);
1694 fQA2DList->Add(gHistProtonsDCAzEtaPt);
1695 TH3F *gHistAntiProtonsDCAxyEtaPt = new TH3F("gHistAntiProtonsDCAxyEtaPt",
1696 ";P_{T} [GeV/c];dca_{xy} [cm]",
1697 fNBinsY,fMinY,fMaxY,
1698 fNBinsPt,fMinPt,fMaxPt,
1700 if(fProtonAnalysisBase->GetEtaMode())
1701 gHistAntiProtonsDCAxyEtaPt->GetXaxis()->SetTitle("#eta");
1703 gHistAntiProtonsDCAxyEtaPt->GetXaxis()->SetTitle("y");
1704 gHistAntiProtonsDCAxyEtaPt->SetStats(kTRUE);
1705 fQA2DList->Add(gHistAntiProtonsDCAxyEtaPt);
1706 TH3F *gHistAntiProtonsDCAzEtaPt = new TH3F("gHistAntiProtonsDCAzEtaPt",
1707 ";P_{T} [GeV/c];dca_{z} [cm]",
1708 fNBinsY,fMinY,fMaxY,
1709 fNBinsPt,fMinPt,fMaxPt,
1711 if(fProtonAnalysisBase->GetEtaMode())
1712 gHistAntiProtonsDCAzEtaPt->GetXaxis()->SetTitle("#eta");
1714 gHistAntiProtonsDCAzEtaPt->GetXaxis()->SetTitle("y");
1715 gHistAntiProtonsDCAzEtaPt->SetStats(kTRUE);
1716 fQA2DList->Add(gHistAntiProtonsDCAzEtaPt);
1718 TH3F *gHistProtonsDCA3DEtaPt = new TH3F("gHistProtonsDCA3DEtaPt",
1719 ";P_{T} [GeV/c];dca [cm]",
1720 fNBinsY,fMinY,fMaxY,
1721 fNBinsPt,fMinPt,fMaxPt,
1723 if(fProtonAnalysisBase->GetEtaMode())
1724 gHistProtonsDCA3DEtaPt->GetXaxis()->SetTitle("#eta");
1726 gHistProtonsDCA3DEtaPt->GetXaxis()->SetTitle("y");
1727 gHistProtonsDCA3DEtaPt->SetStats(kTRUE);
1728 fQA2DList->Add(gHistProtonsDCA3DEtaPt);
1729 TH3F *gHistAntiProtonsDCA3DEtaPt = new TH3F("gHistAntiProtonsDCA3DEtaPt",
1730 ";P_{T} [GeV/c];dca [cm]",
1731 fNBinsY,fMinY,fMaxY,
1732 fNBinsPt,fMinPt,fMaxPt,
1734 if(fProtonAnalysisBase->GetEtaMode())
1735 gHistAntiProtonsDCA3DEtaPt->GetXaxis()->SetTitle("#eta");
1737 gHistAntiProtonsDCA3DEtaPt->GetXaxis()->SetTitle("y");
1738 gHistAntiProtonsDCA3DEtaPt->SetStats(kTRUE);
1739 fQA2DList->Add(gHistAntiProtonsDCA3DEtaPt);
1741 //========================================================//
1742 fQAProtonsAcceptedList = new TList();
1743 fQAProtonsAcceptedList->SetName("fQAProtonsAcceptedList");
1744 fGlobalQAList->Add(fQAProtonsAcceptedList);
1746 TH1F *gProtonsITSClustersPass = new TH1F("gProtonsITSClustersPass",
1747 ";N_{clusters} (ITS);Entries",
1749 fQAProtonsAcceptedList->Add(gProtonsITSClustersPass);
1750 TH1F *gProtonsChi2PerClusterITSPass = new TH1F("gProtonsChi2PerClusterITSPass",
1751 ";x^{2}/N_{clusters} (ITS);Entries",
1753 fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterITSPass);
1754 TH1F *gProtonsTPCClustersPass = new TH1F("gProtonsTPCClustersPass",
1755 ";N_{clusters} (TPC);Entries",
1757 fQAProtonsAcceptedList->Add(gProtonsTPCClustersPass);
1758 TH1F *gProtonsChi2PerClusterTPCPass = new TH1F("gProtonsChi2PerClusterTPCPass",
1759 ";x^{2}/N_{clusters} (TPC);Entries",
1761 fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterTPCPass);
1762 TH1F *gProtonsExtCov11Pass = new TH1F("gProtonsExtCov11Pass",
1763 ";#sigma_{y} [cm];Entries",
1765 fQAProtonsAcceptedList->Add(gProtonsExtCov11Pass);
1766 TH1F *gProtonsExtCov22Pass = new TH1F("gProtonsExtCov22Pass",
1767 ";#sigma_{z} [cm];Entries",
1769 fQAProtonsAcceptedList->Add(gProtonsExtCov22Pass);
1770 TH1F *gProtonsExtCov33Pass = new TH1F("gProtonsExtCov33Pass",
1771 ";#sigma_{sin(#phi)};Entries",
1773 fQAProtonsAcceptedList->Add(gProtonsExtCov33Pass);
1774 TH1F *gProtonsExtCov44Pass = new TH1F("gProtonsExtCov44Pass",
1775 ";#sigma_{tan(#lambda)};Entries",
1777 fQAProtonsAcceptedList->Add(gProtonsExtCov44Pass);
1778 TH1F *gProtonsExtCov55Pass = new TH1F("gProtonsExtCov55Pass",
1779 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1781 fQAProtonsAcceptedList->Add(gProtonsExtCov55Pass);
1782 TH1F *gProtonsSigmaToVertexPass = new TH1F("gProtonsSigmaToVertexPass",
1783 ";#sigma_{Vertex};Entries",
1785 fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexPass);
1786 TH1F *gProtonsSigmaToVertexTPCPass = new TH1F("gProtonsSigmaToVertexTPCPass",
1787 ";#sigma_{Vertex};Entries",
1789 fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexTPCPass);
1790 TH1F *gProtonsDCAXYPass = new TH1F("gProtonsDCAXYPass",
1791 ";DCA_{xy} [cm];Entries",
1793 fQAProtonsAcceptedList->Add(gProtonsDCAXYPass);
1794 TH1F *gProtonsDCAXYTPCPass = new TH1F("gProtonsDCAXYTPCPass",
1795 ";DCA_{xy} [cm];Entries",
1797 fQAProtonsAcceptedList->Add(gProtonsDCAXYTPCPass);
1798 TH1F *gProtonsDCAZPass = new TH1F("gProtonsDCAZPass",
1799 ";DCA_{z} [cm];Entries",
1801 fQAProtonsAcceptedList->Add(gProtonsDCAZPass);
1802 TH1F *gProtonsDCAZTPCPass = new TH1F("gProtonsDCAZTPCPass",
1803 ";DCA_{z} [cm];Entries",
1805 fQAProtonsAcceptedList->Add(gProtonsDCAZTPCPass);
1806 TH1F *gProtonsConstrainChi2Pass = new TH1F("gProtonsConstrainChi2Pass",
1807 ";Log_{10}(#chi^{2});Entries",
1809 fQAProtonsAcceptedList->Add(gProtonsConstrainChi2Pass);
1810 TH1F *gProtonsITSRefitPass = new TH1F("gProtonsITSRefitPass",
1812 fQAProtonsAcceptedList->Add(gProtonsITSRefitPass);
1813 TH1F *gProtonsTPCRefitPass = new TH1F("gProtonsTPCRefitPass",
1815 fQAProtonsAcceptedList->Add(gProtonsTPCRefitPass);
1816 TH1F *gProtonsESDpidPass = new TH1F("gProtonsESDpidPass",
1818 fQAProtonsAcceptedList->Add(gProtonsESDpidPass);
1819 TH1F *gProtonsTPCpidPass = new TH1F("gProtonsTPCpidPass",
1821 fQAProtonsAcceptedList->Add(gProtonsTPCpidPass);
1822 TH1F *gProtonsPointOnITSLayer1Pass = new TH1F("gProtonsPointOnITSLayer1Pass",
1824 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer1Pass);
1825 TH1F *gProtonsPointOnITSLayer2Pass = new TH1F("gProtonsPointOnITSLayer2Pass",
1827 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer2Pass);
1828 TH1F *gProtonsPointOnITSLayer3Pass = new TH1F("gProtonsPointOnITSLayer3Pass",
1830 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer3Pass);
1831 TH1F *gProtonsPointOnITSLayer4Pass = new TH1F("gProtonsPointOnITSLayer4Pass",
1833 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer4Pass);
1834 TH1F *gProtonsPointOnITSLayer5Pass = new TH1F("gProtonsPointOnITSLayer5Pass",
1836 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer5Pass);
1837 TH1F *gProtonsPointOnITSLayer6Pass = new TH1F("gProtonsPointOnITSLayer6Pass",
1839 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer6Pass);
1840 TH1F *gProtonsNumberOfTPCdEdxPointsPass = new TH1F("gProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
1841 fQAProtonsAcceptedList->Add(gProtonsNumberOfTPCdEdxPointsPass);
1842 TH1F *gProtonsITSClusterMapPass = new TH1F("gProtonsITSClusterMapPass",";ITS Layer;Entries",6,0.5,6.5);
1843 fQAProtonsAcceptedList->Add(gProtonsITSClusterMapPass);
1844 TH1F *gProtonsDCA3DPass = new TH1F("gProtonsDCA3DPass",
1845 ";dca [cm];Entries",
1847 fQAProtonsAcceptedList->Add(gProtonsDCA3DPass);
1849 //========================================================//
1850 fQAProtonsRejectedList = new TList();
1851 fQAProtonsRejectedList->SetName("fQAProtonsRejectedList");
1852 fGlobalQAList->Add(fQAProtonsRejectedList);
1854 TH1F *gProtonsITSClustersReject = new TH1F("gProtonsITSClustersReject",
1855 ";N_{clusters} (ITS);Entries",
1857 gProtonsITSClustersReject->SetFillColor(kRed-2);
1858 fQAProtonsRejectedList->Add(gProtonsITSClustersReject);
1859 TH1F *gProtonsChi2PerClusterITSReject = new TH1F("gProtonsChi2PerClusterITSReject",
1860 ";x^{2}/N_{clusters} (ITS);Entries",
1862 gProtonsChi2PerClusterITSReject->SetFillColor(kRed-2);
1863 fQAProtonsRejectedList->Add(gProtonsChi2PerClusterITSReject);
1864 TH1F *gProtonsTPCClustersReject = new TH1F("gProtonsTPCClustersReject",
1865 ";N_{clusters} (TPC);Entries",
1867 gProtonsTPCClustersReject->SetFillColor(kRed-2);
1868 fQAProtonsRejectedList->Add(gProtonsTPCClustersReject);
1869 TH1F *gProtonsChi2PerClusterTPCReject = new TH1F("gProtonsChi2PerClusterTPCReject",
1870 ";x^{2}/N_{clusters} (TPC);Entries",
1872 gProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2);
1873 fQAProtonsRejectedList->Add(gProtonsChi2PerClusterTPCReject);
1874 TH1F *gProtonsExtCov11Reject = new TH1F("gProtonsExtCov11Reject",
1875 ";#sigma_{y} [cm];Entries",
1877 gProtonsExtCov11Reject->SetFillColor(kRed-2);
1878 fQAProtonsRejectedList->Add(gProtonsExtCov11Reject);
1879 TH1F *gProtonsExtCov22Reject = new TH1F("gProtonsExtCov22Reject",
1880 ";#sigma_{z} [cm];Entries",
1882 gProtonsExtCov22Reject->SetFillColor(kRed-2);
1883 fQAProtonsRejectedList->Add(gProtonsExtCov22Reject);
1884 TH1F *gProtonsExtCov33Reject = new TH1F("gProtonsExtCov33Reject",
1885 ";#sigma_{sin(#phi)};Entries",
1887 gProtonsExtCov33Reject->SetFillColor(kRed-2);
1888 fQAProtonsRejectedList->Add(gProtonsExtCov33Reject);
1889 TH1F *gProtonsExtCov44Reject = new TH1F("gProtonsExtCov44Reject",
1890 ";#sigma_{tan(#lambda)};Entries",
1892 gProtonsExtCov44Reject->SetFillColor(kRed-2);
1893 fQAProtonsRejectedList->Add(gProtonsExtCov44Reject);
1894 TH1F *gProtonsExtCov55Reject = new TH1F("gProtonsExtCov55Reject",
1895 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1897 gProtonsExtCov55Reject->SetFillColor(kRed-2);
1898 fQAProtonsRejectedList->Add(gProtonsExtCov55Reject);
1899 TH1F *gProtonsSigmaToVertexReject = new TH1F("gProtonsSigmaToVertexReject",
1900 ";#sigma_{Vertex};Entries",
1902 gProtonsSigmaToVertexReject->SetFillColor(kRed-2);
1903 fQAProtonsRejectedList->Add(gProtonsSigmaToVertexReject);
1904 TH1F *gProtonsSigmaToVertexTPCReject = new TH1F("gProtonsSigmaToVertexTPCReject",
1905 ";#sigma_{Vertex};Entries",
1907 gProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2);
1908 fQAProtonsRejectedList->Add(gProtonsSigmaToVertexTPCReject);
1909 TH1F *gProtonsDCAXYReject = new TH1F("gProtonsDCAXYReject",
1910 ";DCA_{xy} [cm];Entries",
1912 gProtonsDCAXYReject->SetFillColor(kRed-2);
1913 fQAProtonsRejectedList->Add(gProtonsDCAXYReject);
1914 TH1F *gProtonsDCAXYTPCReject = new TH1F("gProtonsDCAXYTPCReject",
1915 ";DCA_{xy} [cm];Entries",
1917 gProtonsDCAXYTPCReject->SetFillColor(kRed-2);
1918 fQAProtonsRejectedList->Add(gProtonsDCAXYTPCReject);
1919 TH1F *gProtonsDCAZReject = new TH1F("gProtonsDCAZReject",
1920 ";DCA_{z} [cm];Entries",
1922 gProtonsDCAZReject->SetFillColor(kRed-2);
1923 fQAProtonsRejectedList->Add(gProtonsDCAZReject);
1924 TH1F *gProtonsDCAZTPCReject = new TH1F("gProtonsDCAZTPCReject",
1925 ";DCA_{z} [cm];Entries",
1927 gProtonsDCAZTPCReject->SetFillColor(kRed-2);
1928 fQAProtonsRejectedList->Add(gProtonsDCAZTPCReject);
1929 TH1F *gProtonsConstrainChi2Reject = new TH1F("gProtonsConstrainChi2Reject",
1930 ";Log_{10}(#chi^{2});Entries",
1932 gProtonsConstrainChi2Reject->SetFillColor(kRed-2);
1933 fQAProtonsRejectedList->Add(gProtonsConstrainChi2Reject);
1934 TH1F *gProtonsITSRefitReject = new TH1F("gProtonsITSRefitReject",
1936 gProtonsITSRefitReject->SetFillColor(kRed-2);
1937 fQAProtonsRejectedList->Add(gProtonsITSRefitReject);
1938 TH1F *gProtonsTPCRefitReject = new TH1F("gProtonsTPCRefitReject",
1940 gProtonsTPCRefitReject->SetFillColor(kRed-2);
1941 fQAProtonsRejectedList->Add(gProtonsTPCRefitReject);
1942 TH1F *gProtonsESDpidReject = new TH1F("gProtonsESDpidReject",
1944 gProtonsESDpidReject->SetFillColor(kRed-2);
1945 fQAProtonsRejectedList->Add(gProtonsESDpidReject);
1946 TH1F *gProtonsTPCpidReject = new TH1F("gProtonsTPCpidReject",
1948 gProtonsTPCpidReject->SetFillColor(kRed-2);
1949 fQAProtonsRejectedList->Add(gProtonsTPCpidReject);
1950 TH1F *gProtonsPointOnITSLayer1Reject = new TH1F("gProtonsPointOnITSLayer1Reject",
1952 gProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2);
1953 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer1Reject);
1954 TH1F *gProtonsPointOnITSLayer2Reject = new TH1F("gProtonsPointOnITSLayer2Reject",
1956 gProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2);
1957 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer2Reject);
1958 TH1F *gProtonsPointOnITSLayer3Reject = new TH1F("gProtonsPointOnITSLayer3Reject",
1960 gProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2);
1961 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer3Reject);
1962 TH1F *gProtonsPointOnITSLayer4Reject = new TH1F("gProtonsPointOnITSLayer4Reject",
1964 gProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2);
1965 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer4Reject);
1966 TH1F *gProtonsPointOnITSLayer5Reject = new TH1F("gProtonsPointOnITSLayer5Reject",
1968 gProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2);
1969 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer5Reject);
1970 TH1F *gProtonsPointOnITSLayer6Reject = new TH1F("gProtonsPointOnITSLayer6Reject",
1972 gProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2);
1973 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer6Reject);
1974 TH1F *gProtonsNumberOfTPCdEdxPointsReject = new TH1F("gProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
1975 gProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2);
1976 fQAProtonsRejectedList->Add(gProtonsNumberOfTPCdEdxPointsReject);
1977 TH1F *gProtonsITSClusterMapReject = new TH1F("gProtonsITSClusterMapReject",";ITS Layer;Entries",6,0.5,6.5);
1978 gProtonsITSClusterMapReject->SetFillColor(kRed-2);
1979 fQAProtonsRejectedList->Add(gProtonsITSClusterMapReject);
1980 TH1F *gProtonsDCA3DReject = new TH1F("gProtonsDCA3DReject",
1981 ";dca [cm];Entries",
1983 gProtonsDCA3DReject->SetFillColor(kRed-2);
1984 fQAProtonsRejectedList->Add(gProtonsDCA3DReject);
1986 //========================================================//
1987 fQAAntiProtonsAcceptedList = new TList();
1988 fQAAntiProtonsAcceptedList->SetName("fQAAntiProtonsAcceptedList");
1989 fGlobalQAList->Add(fQAAntiProtonsAcceptedList);
1990 //Accepted antiprotons
1991 TH1F *gAntiProtonsITSClustersPass = new TH1F("gAntiProtonsITSClustersPass",
1992 ";N_{clusters} (ITS);Entries",
1994 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClustersPass);
1995 TH1F *gAntiProtonsChi2PerClusterITSPass = new TH1F("gAntiProtonsChi2PerClusterITSPass",
1996 ";x^{2}/N_{clusters} (ITS);Entries",
1998 fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterITSPass);
1999 TH1F *gAntiProtonsTPCClustersPass = new TH1F("gAntiProtonsTPCClustersPass",
2000 ";N_{clusters} (TPC);Entries",
2002 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCClustersPass);
2003 TH1F *gAntiProtonsChi2PerClusterTPCPass = new TH1F("gAntiProtonsChi2PerClusterTPCPass",
2004 ";x^{2}/N_{clusters} (TPC);Entries",
2006 fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterTPCPass);
2007 TH1F *gAntiProtonsExtCov11Pass = new TH1F("gAntiProtonsExtCov11Pass",
2008 ";#sigma_{y} [cm];Entries",
2010 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov11Pass);
2011 TH1F *gAntiProtonsExtCov22Pass = new TH1F("gAntiProtonsExtCov22Pass",
2012 ";#sigma_{z} [cm];Entries",
2014 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov22Pass);
2015 TH1F *gAntiProtonsExtCov33Pass = new TH1F("gAntiProtonsExtCov33Pass",
2016 ";#sigma_{sin(#phi)};Entries",
2018 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov33Pass);
2019 TH1F *gAntiProtonsExtCov44Pass = new TH1F("gAntiProtonsExtCov44Pass",
2020 ";#sigma_{tan(#lambda)};Entries",
2022 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov44Pass);
2023 TH1F *gAntiProtonsExtCov55Pass = new TH1F("gAntiProtonsExtCov55Pass",
2024 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2026 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov55Pass);
2027 TH1F *gAntiProtonsSigmaToVertexPass = new TH1F("gAntiProtonsSigmaToVertexPass",
2028 ";#sigma_{Vertex};Entries",
2030 fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexPass);
2031 TH1F *gAntiProtonsSigmaToVertexTPCPass = new TH1F("gAntiProtonsSigmaToVertexTPCPass",
2032 ";#sigma_{Vertex};Entries",
2034 fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexTPCPass);
2035 TH1F *gAntiProtonsDCAXYPass = new TH1F("gAntiProtonsDCAXYPass",
2036 ";DCA_{xy} [cm];Entries",
2038 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYPass);
2039 TH1F *gAntiProtonsDCAXYTPCPass = new TH1F("gAntiProtonsDCAXYTPCPass",
2040 ";DCA_{xy} [cm];Entries",
2042 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYTPCPass);
2043 TH1F *gAntiProtonsDCAZPass = new TH1F("gAntiProtonsDCAZPass",
2044 ";DCA_{z} [cm];Entries",
2046 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZPass);
2047 TH1F *gAntiProtonsDCAZTPCPass = new TH1F("gAntiProtonsDCAZTPCPass",
2048 ";DCA_{z} [cm];Entries",
2050 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZTPCPass);
2051 TH1F *gAntiProtonsConstrainChi2Pass = new TH1F("gAntiProtonsConstrainChi2Pass",
2052 ";Log_{10}(#chi^{2});Entries",
2054 fQAAntiProtonsAcceptedList->Add(gAntiProtonsConstrainChi2Pass);
2055 TH1F *gAntiProtonsITSRefitPass = new TH1F("gAntiProtonsITSRefitPass",
2057 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSRefitPass);
2058 TH1F *gAntiProtonsTPCRefitPass = new TH1F("gAntiProtonsTPCRefitPass",
2060 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCRefitPass);
2061 TH1F *gAntiProtonsESDpidPass = new TH1F("gAntiProtonsESDpidPass",
2063 fQAAntiProtonsAcceptedList->Add(gAntiProtonsESDpidPass);
2064 TH1F *gAntiProtonsTPCpidPass = new TH1F("gAntiProtonsTPCpidPass",
2066 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCpidPass);
2067 TH1F *gAntiProtonsPointOnITSLayer1Pass = new TH1F("gAntiProtonsPointOnITSLayer1Pass",
2069 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer1Pass);
2070 TH1F *gAntiProtonsPointOnITSLayer2Pass = new TH1F("gAntiProtonsPointOnITSLayer2Pass",
2072 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer2Pass);
2073 TH1F *gAntiProtonsPointOnITSLayer3Pass = new TH1F("gAntiProtonsPointOnITSLayer3Pass",
2075 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer3Pass);
2076 TH1F *gAntiProtonsPointOnITSLayer4Pass = new TH1F("gAntiProtonsPointOnITSLayer4Pass",
2078 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer4Pass);
2079 TH1F *gAntiProtonsPointOnITSLayer5Pass = new TH1F("gAntiProtonsPointOnITSLayer5Pass",
2081 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer5Pass);
2082 TH1F *gAntiProtonsPointOnITSLayer6Pass = new TH1F("gAntiProtonsPointOnITSLayer6Pass",
2084 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer6Pass);
2085 TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2086 fQAAntiProtonsAcceptedList->Add(gAntiProtonsNumberOfTPCdEdxPointsPass);
2087 TH1F *gAntiProtonsITSClusterMapPass = new TH1F("gAntiProtonsITSClusterMapPass",";ITS Layer;Entries",6,0.5,6.5);
2088 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClusterMapPass);
2089 TH1F *gAntiProtonsDCA3DPass = new TH1F("gAntiProtonsDCA3DPass",
2090 ";dca [cm];Entries",
2092 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCA3DPass);
2094 //========================================================//
2095 fQAAntiProtonsRejectedList = new TList();
2096 fQAAntiProtonsRejectedList->SetName("fQAAntiProtonsRejectedList");
2097 fGlobalQAList->Add(fQAAntiProtonsRejectedList);
2098 //Rejected antiprotons
2099 TH1F *gAntiProtonsITSClustersReject = new TH1F("gAntiProtonsITSClustersReject",
2100 ";N_{clusters} (ITS);Entries",
2102 gAntiProtonsITSClustersReject->SetFillColor(kRed-2);
2103 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClustersReject);
2104 TH1F *gAntiProtonsChi2PerClusterITSReject = new TH1F("gAntiProtonsChi2PerClusterITSReject",
2105 ";x^{2}/N_{clusters} (ITS);Entries",
2107 gAntiProtonsChi2PerClusterITSReject->SetFillColor(kRed-2);
2108 fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterITSReject);
2109 TH1F *gAntiProtonsTPCClustersReject = new TH1F("gAntiProtonsTPCClustersReject",
2110 ";N_{clusters} (TPC);Entries",
2112 gAntiProtonsTPCClustersReject->SetFillColor(kRed-2);
2113 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCClustersReject);
2114 TH1F *gAntiProtonsChi2PerClusterTPCReject = new TH1F("gAntiProtonsChi2PerClusterTPCReject",
2115 ";x^{2}/N_{clusters} (TPC);Entries",
2117 gAntiProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2);
2118 fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterTPCReject);
2119 TH1F *gAntiProtonsExtCov11Reject = new TH1F("gAntiProtonsExtCov11Reject",
2120 ";#sigma_{y} [cm];Entries",
2122 gAntiProtonsExtCov11Reject->SetFillColor(kRed-2);
2123 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov11Reject);
2124 TH1F *gAntiProtonsExtCov22Reject = new TH1F("gAntiProtonsExtCov22Reject",
2125 ";#sigma_{z} [cm];Entries",
2127 gAntiProtonsExtCov22Reject->SetFillColor(kRed-2);
2128 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov22Reject);
2129 TH1F *gAntiProtonsExtCov33Reject = new TH1F("gAntiProtonsExtCov33Reject",
2130 ";#sigma_{sin(#phi)};Entries",
2132 gAntiProtonsExtCov33Reject->SetFillColor(kRed-2);
2133 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov33Reject);
2134 TH1F *gAntiProtonsExtCov44Reject = new TH1F("gAntiProtonsExtCov44Reject",
2135 ";#sigma_{tan(#lambda)};Entries",
2137 gAntiProtonsExtCov44Reject->SetFillColor(kRed-2);
2138 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov44Reject);
2139 TH1F *gAntiProtonsExtCov55Reject = new TH1F("gAntiProtonsExtCov55Reject",
2140 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2142 gAntiProtonsExtCov55Reject->SetFillColor(kRed-2);
2143 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov55Reject);
2144 TH1F *gAntiProtonsSigmaToVertexReject = new TH1F("gAntiProtonsSigmaToVertexReject",
2145 ";#sigma_{Vertex};Entries",
2147 gAntiProtonsSigmaToVertexReject->SetFillColor(kRed-2);
2148 fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexReject);
2149 TH1F *gAntiProtonsSigmaToVertexTPCReject = new TH1F("gAntiProtonsSigmaToVertexTPCReject",
2150 ";#sigma_{Vertex};Entries",
2152 gAntiProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2);
2153 fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexTPCReject);
2154 TH1F *gAntiProtonsDCAXYReject = new TH1F("gAntiProtonsDCAXYReject",
2155 ";DCA_{xy} [cm];Entries",
2157 gAntiProtonsDCAXYReject->SetFillColor(kRed-2);
2158 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYReject);
2159 TH1F *gAntiProtonsDCAXYTPCReject = new TH1F("gAntiProtonsDCAXYTPCReject",
2160 ";DCA_{xy} [cm];Entries",
2162 gAntiProtonsDCAXYTPCReject->SetFillColor(kRed-2);
2163 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYTPCReject);
2164 TH1F *gAntiProtonsDCAZReject = new TH1F("gAntiProtonsDCAZReject",
2165 ";DCA_{z} [cm];Entries",
2167 gAntiProtonsDCAZReject->SetFillColor(kRed-2);
2168 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZReject);
2169 TH1F *gAntiProtonsDCAZTPCReject = new TH1F("gAntiProtonsDCAZTPCReject",
2170 ";DCA_{z} [cm];Entries",
2172 gAntiProtonsDCAZTPCReject->SetFillColor(kRed-2);
2173 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZTPCReject);
2174 TH1F *gAntiProtonsConstrainChi2Reject = new TH1F("gAntiProtonsConstrainChi2Reject",
2175 ";Log_{10}(#chi^{2});Entries",
2177 gAntiProtonsConstrainChi2Reject->SetFillColor(kRed-2);
2178 fQAAntiProtonsRejectedList->Add(gAntiProtonsConstrainChi2Reject);
2179 TH1F *gAntiProtonsITSRefitReject = new TH1F("gAntiProtonsITSRefitReject",
2181 gAntiProtonsITSRefitReject->SetFillColor(kRed-2);
2182 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSRefitReject);
2183 TH1F *gAntiProtonsTPCRefitReject = new TH1F("gAntiProtonsTPCRefitReject",
2185 gAntiProtonsTPCRefitReject->SetFillColor(kRed-2);
2186 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCRefitReject);
2187 TH1F *gAntiProtonsESDpidReject = new TH1F("gAntiProtonsESDpidReject",
2189 gAntiProtonsESDpidReject->SetFillColor(kRed-2);
2190 fQAAntiProtonsRejectedList->Add(gAntiProtonsESDpidReject);
2191 TH1F *gAntiProtonsTPCpidReject = new TH1F("gAntiProtonsTPCpidReject",
2193 gAntiProtonsTPCpidReject->SetFillColor(kRed-2);
2194 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCpidReject);
2195 TH1F *gAntiProtonsPointOnITSLayer1Reject = new TH1F("gAntiProtonsPointOnITSLayer1Reject",
2197 gAntiProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2);
2198 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer1Reject);
2199 TH1F *gAntiProtonsPointOnITSLayer2Reject = new TH1F("gAntiProtonsPointOnITSLayer2Reject",
2201 gAntiProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2);
2202 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer2Reject);
2203 TH1F *gAntiProtonsPointOnITSLayer3Reject = new TH1F("gAntiProtonsPointOnITSLayer3Reject",
2205 gAntiProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2);
2206 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer3Reject);
2207 TH1F *gAntiProtonsPointOnITSLayer4Reject = new TH1F("gAntiProtonsPointOnITSLayer4Reject",
2209 gAntiProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2);
2210 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer4Reject);
2211 TH1F *gAntiProtonsPointOnITSLayer5Reject = new TH1F("gAntiProtonsPointOnITSLayer5Reject",
2213 gAntiProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2);
2214 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer5Reject);
2215 TH1F *gAntiProtonsPointOnITSLayer6Reject = new TH1F("gAntiProtonsPointOnITSLayer6Reject",
2217 gAntiProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2);
2218 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer6Reject);
2219 TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
2220 gAntiProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2);
2221 fQAAntiProtonsRejectedList->Add(gAntiProtonsNumberOfTPCdEdxPointsReject);
2222 TH1F *gAntiProtonsITSClusterMapReject = new TH1F("gAntiProtonsITSClusterMapReject",";ITS Layer;Entries",6,0.5,6.5);
2223 gAntiProtonsITSClusterMapReject->SetFillColor(kRed-2);
2224 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClusterMapReject);
2225 TH1F *gAntiProtonsDCA3DReject = new TH1F("gAntiProtonsDCA3DReject",
2226 ";dca [cm];Entries",
2228 gAntiProtonsDCA3DReject->SetFillColor(kRed-2);
2229 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCA3DReject);
2232 //____________________________________________________________________//
2233 void AliProtonAnalysis::FillQA(AliESDEvent *esd,
2234 const AliESDVertex *vertex,
2235 AliESDtrack* track) {
2236 //Fills the QA histograms
2237 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
2238 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
2239 Double_t dca3D = 0.0;
2241 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
2242 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2244 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
2245 dca[0] = -100.; dca[1] = -100.;
2246 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
2249 gPt = tpcTrack->Pt();
2250 gPx = tpcTrack->Px();
2251 gPy = tpcTrack->Py();
2252 gPz = tpcTrack->Pz();
2253 tpcTrack->PropagateToDCA(vertex,
2254 esd->GetMagneticField(),
2263 track->PropagateToDCA(vertex,
2264 esd->GetMagneticField(),
2268 dca3D = TMath::Sqrt(TMath::Power(dca[0],2) +
2269 TMath::Power(dca[1],2));
2272 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
2273 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
2275 Float_t chi2PerClusterITS = -1;
2276 if (nClustersITS!=0)
2277 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
2278 Float_t chi2PerClusterTPC = -1;
2279 if (nClustersTPC!=0)
2280 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
2282 Double_t extCov[15];
2283 track->GetExternalCovariance(extCov);
2286 if(track->Charge() > 0) {
2287 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
2288 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
2289 ((TH1F *)(fQAProtonsRejectedList->At(0)))->Fill(nClustersITS);
2291 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
2292 ((TH1F *)(fQAProtonsAcceptedList->At(0)))->Fill(nClustersITS);
2294 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
2295 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
2296 ((TH1F *)(fQAProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
2298 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
2299 ((TH1F *)(fQAProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
2300 }//chi2 per ITS cluster
2301 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
2302 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
2303 ((TH1F *)(fQAProtonsRejectedList->At(2)))->Fill(nClustersTPC);
2305 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
2306 ((TH1F *)(fQAProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
2309 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
2310 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
2311 ((TH1F *)(fQAProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
2313 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
2314 ((TH1F *)(fQAProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
2315 }//chi2 per TPC cluster
2316 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
2317 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
2318 ((TH1F *)(fQAProtonsRejectedList->At(4)))->Fill(extCov[0]);
2320 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
2321 ((TH1F *)(fQAProtonsAcceptedList->At(4)))->Fill(extCov[0]);
2323 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
2324 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
2325 ((TH1F *)(fQAProtonsRejectedList->At(5)))->Fill(extCov[2]);
2327 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
2328 ((TH1F *)(fQAProtonsAcceptedList->At(5)))->Fill(extCov[2]);
2330 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
2331 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
2332 ((TH1F *)(fQAProtonsRejectedList->At(6)))->Fill(extCov[5]);
2334 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
2335 ((TH1F *)(fQAProtonsAcceptedList->At(6)))->Fill(extCov[5]);
2337 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
2338 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
2339 ((TH1F *)(fQAProtonsRejectedList->At(7)))->Fill(extCov[9]);
2341 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
2342 ((TH1F *)(fQAProtonsAcceptedList->At(7)))->Fill(extCov[9]);
2344 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
2345 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
2346 ((TH1F *)(fQAProtonsRejectedList->At(8)))->Fill(extCov[14]);
2348 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
2349 ((TH1F *)(fQAProtonsAcceptedList->At(8)))->Fill(extCov[14]);
2351 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
2352 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
2353 ((TH1F *)(fQAProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2355 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
2356 ((TH1F *)(fQAProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2358 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
2359 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
2360 ((TH1F *)(fQAProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2362 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
2363 ((TH1F *)(fQAProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2364 }//sigma to vertex TPC
2365 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
2366 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
2367 ((TH1F *)(fQAProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
2369 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
2370 ((TH1F *)(fQAProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
2371 }//DCA xy global tracking
2372 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
2373 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
2374 ((TH1F *)(fQAProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
2376 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
2377 ((TH1F *)(fQAProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
2378 }//DCA xy TPC tracking
2379 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
2380 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
2381 ((TH1F *)(fQAProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
2383 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
2384 ((TH1F *)(fQAProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
2385 }//DCA z global tracking
2386 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
2387 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
2388 ((TH1F *)(fQAProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
2390 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
2391 ((TH1F *)(fQAProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
2392 }//DCA z TPC tracking
2393 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
2394 if(track->GetConstrainedChi2() > 0) {
2395 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
2396 ((TH1F *)(fQAProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2398 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
2399 ((TH1F *)(fQAProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2401 }//constrain chi2 - vertex
2402 if(fProtonAnalysisBase->IsUsedITSRefit()) {
2403 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
2404 ((TH1F *)(fQAProtonsRejectedList->At(16)))->Fill(0);
2406 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
2407 ((TH1F *)(fQAProtonsAcceptedList->At(16)))->Fill(0);
2409 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
2410 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
2411 ((TH1F *)(fQAProtonsRejectedList->At(17)))->Fill(0);
2413 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
2414 ((TH1F *)(fQAProtonsAcceptedList->At(17)))->Fill(0);
2416 if(fProtonAnalysisBase->IsUsedESDpid()) {
2417 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
2418 ((TH1F *)(fQAProtonsRejectedList->At(18)))->Fill(0);
2420 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
2421 ((TH1F *)(fQAProtonsAcceptedList->At(18)))->Fill(0);
2423 if(fProtonAnalysisBase->IsUsedTPCpid()) {
2424 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
2425 ((TH1F *)(fQAProtonsRejectedList->At(19)))->Fill(0);
2427 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
2428 ((TH1F *)(fQAProtonsAcceptedList->At(19)))->Fill(0);
2430 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
2431 if(!track->HasPointOnITSLayer(0)) {
2432 ((TH1F *)(fQAProtonsRejectedList->At(20)))->Fill(0);
2434 else if(track->HasPointOnITSLayer(0))
2435 ((TH1F *)(fQAProtonsAcceptedList->At(20)))->Fill(0);
2437 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
2438 if(!track->HasPointOnITSLayer(1)) {
2439 ((TH1F *)(fQAProtonsRejectedList->At(21)))->Fill(0);
2441 else if(track->HasPointOnITSLayer(1))
2442 ((TH1F *)(fQAProtonsAcceptedList->At(21)))->Fill(0);
2444 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
2445 if(!track->HasPointOnITSLayer(2)) {
2446 ((TH1F *)(fQAProtonsRejectedList->At(22)))->Fill(0);
2448 else if(track->HasPointOnITSLayer(2))
2449 ((TH1F *)(fQAProtonsAcceptedList->At(22)))->Fill(0);
2451 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
2452 if(!track->HasPointOnITSLayer(3)) {
2453 ((TH1F *)(fQAProtonsRejectedList->At(23)))->Fill(0);
2455 else if(track->HasPointOnITSLayer(3))
2456 ((TH1F *)(fQAProtonsAcceptedList->At(23)))->Fill(0);
2458 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
2459 if(!track->HasPointOnITSLayer(4)) {
2460 ((TH1F *)(fQAProtonsRejectedList->At(24)))->Fill(0);
2462 else if(track->HasPointOnITSLayer(4))
2463 ((TH1F *)(fQAProtonsAcceptedList->At(24)))->Fill(0);
2465 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
2466 if(!track->HasPointOnITSLayer(5)) {
2467 ((TH1F *)(fQAProtonsRejectedList->At(25)))->Fill(0);
2469 else if(track->HasPointOnITSLayer(5))
2470 ((TH1F *)(fQAProtonsAcceptedList->At(25)))->Fill(0);
2472 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
2473 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
2474 ((TH1F *)(fQAProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
2476 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
2477 ((TH1F *)(fQAProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
2478 }//number of TPC points for the dE/dx
2479 if(fProtonAnalysisBase->IsUsedPointOnSPDLayer()) {
2480 if((!track->HasPointOnITSLayer(0))&&(!track->HasPointOnITSLayer(1))) {
2481 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2482 if(track->HasPointOnITSLayer(iLayer))
2483 ((TH1F *)(fQAProtonsRejectedList->At(27)))->Fill(iLayer+1);
2486 else if((track->HasPointOnITSLayer(0))||(track->HasPointOnITSLayer(1))) {
2487 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2488 if(track->HasPointOnITSLayer(iLayer))
2489 ((TH1F *)(fQAProtonsAcceptedList->At(27)))->Fill(iLayer+1);
2492 }//point on either SPD layers
2493 if(fProtonAnalysisBase->IsUsedMaxDCA3D()) {
2494 if(dca3D > fProtonAnalysisBase->GetMaxDCA3D()) {
2495 ((TH1F *)(fQAProtonsRejectedList->At(28)))->Fill(dca3D);
2497 if(dca3D < fProtonAnalysisBase->GetMaxDCA3D())
2498 ((TH1F *)(fQAProtonsAcceptedList->At(28)))->Fill(dca3D);
2503 if(track->Charge() < 0) {
2504 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
2505 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
2506 ((TH1F *)(fQAAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
2508 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
2509 ((TH1F *)(fQAAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
2511 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
2512 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
2513 ((TH1F *)(fQAAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
2515 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
2516 ((TH1F *)(fQAAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
2517 }//chi2 per ITS cluster
2518 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
2519 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
2520 ((TH1F *)(fQAAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
2522 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
2523 ((TH1F *)(fQAAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
2526 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
2527 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
2528 ((TH1F *)(fQAAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
2530 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
2531 ((TH1F *)(fQAAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
2532 }//chi2 per TPC cluster
2533 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
2534 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
2535 ((TH1F *)(fQAAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
2537 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
2538 ((TH1F *)(fQAAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
2540 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
2541 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
2542 ((TH1F *)(fQAAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
2544 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
2545 ((TH1F *)(fQAAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
2547 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
2548 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
2549 ((TH1F *)(fQAAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
2551 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
2552 ((TH1F *)(fQAAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
2554 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
2555 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
2556 ((TH1F *)(fQAAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
2558 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
2559 ((TH1F *)(fQAAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
2561 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
2562 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
2563 ((TH1F *)(fQAAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
2565 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
2566 ((TH1F *)(fQAAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
2568 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
2569 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
2570 ((TH1F *)(fQAAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2572 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
2573 ((TH1F *)(fQAAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2575 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
2576 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
2577 ((TH1F *)(fQAAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2579 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
2580 ((TH1F *)(fQAAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2581 }//sigma to vertex TPC
2582 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
2583 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
2584 ((TH1F *)(fQAAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
2586 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
2587 ((TH1F *)(fQAAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
2588 }//DCA xy global tracking
2589 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
2590 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
2591 ((TH1F *)(fQAAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
2593 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
2594 ((TH1F *)(fQAAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
2595 }//DCA xy TPC tracking
2596 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
2597 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
2598 ((TH1F *)(fQAAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
2600 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
2601 ((TH1F *)(fQAAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
2602 }//DCA z global tracking
2603 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
2604 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
2605 ((TH1F *)(fQAAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
2607 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
2608 ((TH1F *)(fQAAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
2609 }//DCA z TPC tracking
2610 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
2611 if(track->GetConstrainedChi2() > 0) {
2612 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
2613 ((TH1F *)(fQAAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2615 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
2616 ((TH1F *)(fQAAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2618 }//constrain chi2 - vertex
2619 if(fProtonAnalysisBase->IsUsedITSRefit()) {
2620 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
2621 ((TH1F *)(fQAAntiProtonsRejectedList->At(16)))->Fill(0);
2623 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
2624 ((TH1F *)(fQAAntiProtonsAcceptedList->At(16)))->Fill(0);
2626 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
2627 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
2628 ((TH1F *)(fQAAntiProtonsRejectedList->At(17)))->Fill(0);
2630 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
2631 ((TH1F *)(fQAAntiProtonsAcceptedList->At(17)))->Fill(0);
2633 if(fProtonAnalysisBase->IsUsedESDpid()) {
2634 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
2635 ((TH1F *)(fQAAntiProtonsRejectedList->At(18)))->Fill(0);
2637 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
2638 ((TH1F *)(fQAAntiProtonsAcceptedList->At(18)))->Fill(0);
2640 if(fProtonAnalysisBase->IsUsedTPCpid()) {
2641 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
2642 ((TH1F *)(fQAAntiProtonsRejectedList->At(19)))->Fill(0);
2644 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
2645 ((TH1F *)(fQAAntiProtonsAcceptedList->At(19)))->Fill(0);
2647 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
2648 if(!track->HasPointOnITSLayer(0)) {
2649 ((TH1F *)(fQAAntiProtonsRejectedList->At(20)))->Fill(0);
2651 else if(track->HasPointOnITSLayer(0))
2652 ((TH1F *)(fQAAntiProtonsAcceptedList->At(20)))->Fill(0);
2654 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
2655 if(!track->HasPointOnITSLayer(1)) {
2656 ((TH1F *)(fQAAntiProtonsRejectedList->At(21)))->Fill(0);
2658 else if(track->HasPointOnITSLayer(1))
2659 ((TH1F *)(fQAAntiProtonsAcceptedList->At(21)))->Fill(0);
2661 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
2662 if(!track->HasPointOnITSLayer(2)) {
2663 ((TH1F *)(fQAAntiProtonsRejectedList->At(22)))->Fill(0);
2665 else if(track->HasPointOnITSLayer(2))
2666 ((TH1F *)(fQAAntiProtonsAcceptedList->At(22)))->Fill(0);
2668 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
2669 if(!track->HasPointOnITSLayer(3)) {
2670 ((TH1F *)(fQAAntiProtonsRejectedList->At(23)))->Fill(0);
2672 else if(track->HasPointOnITSLayer(3))
2673 ((TH1F *)(fQAAntiProtonsAcceptedList->At(23)))->Fill(0);
2675 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
2676 if(!track->HasPointOnITSLayer(4)) {
2677 ((TH1F *)(fQAAntiProtonsRejectedList->At(24)))->Fill(0);
2679 else if(track->HasPointOnITSLayer(4))
2680 ((TH1F *)(fQAAntiProtonsAcceptedList->At(24)))->Fill(0);
2682 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
2683 if(!track->HasPointOnITSLayer(5)) {
2684 ((TH1F *)(fQAAntiProtonsRejectedList->At(25)))->Fill(0);
2686 else if(track->HasPointOnITSLayer(5))
2687 ((TH1F *)(fQAAntiProtonsAcceptedList->At(25)))->Fill(0);
2689 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
2690 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
2691 ((TH1F *)(fQAAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
2693 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
2694 ((TH1F *)(fQAAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
2695 }//number of TPC points for the dE/dx
2696 if(fProtonAnalysisBase->IsUsedPointOnSPDLayer()) {
2697 if((!track->HasPointOnITSLayer(0))&&(!track->HasPointOnITSLayer(1))) {
2698 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2699 if(track->HasPointOnITSLayer(iLayer))
2700 ((TH1F *)(fQAAntiProtonsRejectedList->At(27)))->Fill(iLayer+1);
2703 else if((track->HasPointOnITSLayer(0))||(track->HasPointOnITSLayer(1))) {
2704 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2705 if(track->HasPointOnITSLayer(iLayer))
2706 ((TH1F *)(fQAAntiProtonsAcceptedList->At(27)))->Fill(iLayer+1);
2709 }//point on either SPD layers
2710 if(fProtonAnalysisBase->IsUsedMaxDCA3D()) {
2711 if(dca3D > fProtonAnalysisBase->GetMaxDCA3D()) {
2712 ((TH1F *)(fQAAntiProtonsRejectedList->At(28)))->Fill(dca3D);
2714 if(dca3D < fProtonAnalysisBase->GetMaxDCA3D())
2715 ((TH1F *)(fQAAntiProtonsAcceptedList->At(28)))->Fill(dca3D);