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 <AliESDVertex.h>
45 #include "AliProtonAnalysis.h"
46 #include "AliProtonAnalysisBase.h"
48 ClassImp(AliProtonAnalysis)
50 //____________________________________________________________________//
51 AliProtonAnalysis::AliProtonAnalysis() :
52 TObject(), fProtonAnalysisBase(0),
53 fNBinsY(0), fMinY(0), fMaxY(0),
54 fNBinsPt(0), fMinPt(0), fMaxPt(0),
55 fProtonContainer(0), fAntiProtonContainer(0),
56 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), fHistEventStats(0),
57 fEffGridListProtons(0), fCorrectionListProtons2D(0),
58 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
59 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
60 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
61 fCorrectProtons(0), fCorrectAntiProtons(0),
62 fGlobalQAList(0), fQA2DList(0),
63 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
64 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
69 //____________________________________________________________________//
70 AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY,
71 Float_t fLowY, Float_t fHighY,
73 Float_t fLowPt, Float_t fHighPt) :
74 TObject(), fProtonAnalysisBase(0),
75 fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY),
76 fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt),
77 fProtonContainer(0), fAntiProtonContainer(0),
78 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), fHistEventStats(0),
79 fEffGridListProtons(0), fCorrectionListProtons2D(0),
80 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
81 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
82 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
83 fCorrectProtons(0), fCorrectAntiProtons(0),
84 fGlobalQAList(0), fQA2DList(0),
85 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
86 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
89 if(!fInitQAFlag) InitQA();
90 fHistEvents = new TH1I("fHistEvents","Analyzed events",1,0,1);
92 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
94 fNBinsPt,fMinPt,fMaxPt);
95 fHistYPtProtons->SetStats(kTRUE);
96 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
97 if(fProtonAnalysisBase->GetEtaMode())
98 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
100 fHistYPtProtons->GetXaxis()->SetTitle("y");
101 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
103 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
105 fNBinsPt,fMinPt,fMaxPt);
106 fHistYPtAntiProtons->SetStats(kTRUE);
107 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
108 if(fProtonAnalysisBase->GetEtaMode())
109 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
111 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
112 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
114 //setting up the containers
118 Double_t *binLimY = new Double_t[nbinsY+1];
119 Double_t *binLimPt = new Double_t[nbinsPt+1];
120 //values for bin lower bounds
121 for(Int_t i = 0; i <= nbinsY; i++)
122 binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i;
123 for(Int_t i = 0; i <= nbinsPt; i++)
124 binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i;
126 fProtonContainer = new AliCFContainer("containerProtons",
127 "container for protons",
129 fProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta
130 fProtonContainer->SetBinLimits(1,binLimPt); //pT
131 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
132 "container for antiprotons",
134 fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta
135 fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT
138 //____________________________________________________________________//
139 AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Double_t *gY,
140 Int_t nbinsPt,Double_t *gPt) :
141 TObject(), fProtonAnalysisBase(0),
142 fNBinsY(nbinsY), fMinY(gY[0]), fMaxY(gY[nbinsY]),
143 fNBinsPt(nbinsPt), fMinPt(gPt[0]), fMaxPt(gPt[nbinsPt]),
144 fProtonContainer(0), fAntiProtonContainer(0),
145 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), fHistEventStats(0),
146 fEffGridListProtons(0), fCorrectionListProtons2D(0),
147 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
148 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
149 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
150 fCorrectProtons(0), fCorrectAntiProtons(0),
151 fGlobalQAList(0), fQA2DList(0),
152 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
153 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
154 fInitQAFlag(kFALSE) {
155 //Default constructor
156 if(!fInitQAFlag) InitQA();
157 fHistEvents = new TH1I("fHistEvents","Analyzed events",1,0,1);
159 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
160 fNBinsY,gY,fNBinsPt,gPt);
161 fHistYPtProtons->SetStats(kTRUE);
162 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
163 if(fProtonAnalysisBase->GetEtaMode())
164 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
166 fHistYPtProtons->GetXaxis()->SetTitle("y");
167 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
169 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
170 fNBinsY,gY,fNBinsPt,gPt);
171 fHistYPtAntiProtons->SetStats(kTRUE);
172 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
173 if(fProtonAnalysisBase->GetEtaMode())
174 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
176 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
177 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
179 //setting up the containers
183 fProtonContainer = new AliCFContainer("containerProtons",
184 "container for protons",
186 fProtonContainer->SetBinLimits(0,gY); //rapidity or eta
187 fProtonContainer->SetBinLimits(1,gPt); //pT
188 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
189 "container for antiprotons",
191 fAntiProtonContainer->SetBinLimits(0,gY); //rapidity or eta
192 fAntiProtonContainer->SetBinLimits(1,gPt); //pT
195 //____________________________________________________________________//
196 AliProtonAnalysis::~AliProtonAnalysis() {
198 if(fProtonAnalysisBase) delete fProtonAnalysisBase;
200 if(fHistEvents) delete fHistEvents;
201 if(fHistYPtProtons) delete fHistYPtProtons;
202 if(fHistYPtAntiProtons) delete fHistYPtAntiProtons;
203 if(fHistEventStats) delete fHistEventStats;
204 if(fProtonContainer) delete fProtonContainer;
205 if(fAntiProtonContainer) delete fAntiProtonContainer;
207 if(fEffGridListProtons) delete fEffGridListProtons;
208 if(fCorrectionListProtons2D) delete fCorrectionListProtons2D;
209 if(fEfficiencyListProtons1D) delete fEfficiencyListProtons1D;
210 if(fCorrectionListProtons1D) delete fCorrectionListProtons1D;
211 if(fEffGridListAntiProtons) delete fEffGridListAntiProtons;
212 if(fCorrectionListAntiProtons2D) delete fCorrectionListAntiProtons2D;
213 if(fEfficiencyListAntiProtons1D) delete fEfficiencyListAntiProtons1D;
214 if(fCorrectionListAntiProtons1D) delete fCorrectionListAntiProtons1D;
215 if(fCorrectProtons) delete fCorrectProtons;
216 if(fCorrectAntiProtons) delete fCorrectAntiProtons;
219 if(fGlobalQAList) delete fGlobalQAList;
220 if(fQA2DList) delete fQA2DList;
221 if(fQAProtonsAcceptedList) delete fQAProtonsAcceptedList;
222 if(fQAProtonsRejectedList) delete fQAProtonsRejectedList;
223 if(fQAAntiProtonsAcceptedList) delete fQAAntiProtonsAcceptedList;
224 if(fQAAntiProtonsRejectedList) delete fQAAntiProtonsRejectedList;
227 //____________________________________________________________________//
228 void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY,
229 Float_t fLowY, Float_t fHighY,
231 Float_t fLowPt, Float_t fHighPt) {
232 //Initializes the histograms
233 if(!fInitQAFlag) InitQA();
241 fHistEvents = new TH1I("fHistEvents","Analyzed events",1,0,1);
243 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
245 fNBinsPt,fMinPt,fMaxPt);
246 fHistYPtProtons->SetStats(kTRUE);
247 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
248 if(fProtonAnalysisBase->GetEtaMode())
249 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
251 fHistYPtProtons->GetXaxis()->SetTitle("y");
252 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
254 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
256 fNBinsPt,fMinPt,fMaxPt);
257 fHistYPtAntiProtons->SetStats(kTRUE);
258 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
259 if(fProtonAnalysisBase->GetEtaMode())
260 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
262 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
263 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
265 //setting up the containers
269 Double_t *binLimY = new Double_t[nbinsY+1];
270 Double_t *binLimPt = new Double_t[nbinsPt+1];
271 //values for bin lower bounds
272 for(Int_t i = 0; i <= nbinsY; i++)
273 binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i;
274 for(Int_t i = 0; i <= nbinsPt; i++)
275 binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i;
277 fProtonContainer = new AliCFContainer("containerProtons",
278 "container for protons",
280 fProtonContainer->SetBinLimits(0,binLimY); //rapidity
281 fProtonContainer->SetBinLimits(1,binLimPt); //pT
282 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
283 "container for antiprotons",
285 fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity
286 fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT
289 //____________________________________________________________________//
290 void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Double_t *gY,
291 Int_t nbinsPt, Double_t *gPt) {
292 //Initializes the histograms using asymmetric values - global tracking
293 if(!fInitQAFlag) InitQA();
299 fMaxPt = gPt[nbinsPt];
301 fHistEvents = new TH1I("fHistEvents","Analyzed events",1,0,1);
303 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
304 fNBinsY,gY,fNBinsPt,gPt);
305 fHistYPtProtons->SetStats(kTRUE);
306 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
307 if(fProtonAnalysisBase->GetEtaMode())
308 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
310 fHistYPtProtons->GetXaxis()->SetTitle("y");
311 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
313 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
314 fNBinsY,gY,fNBinsPt,gPt);
315 fHistYPtAntiProtons->SetStats(kTRUE);
316 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
317 if(fProtonAnalysisBase->GetEtaMode())
318 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
320 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
321 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
323 //setting up the containers
328 fProtonContainer = new AliCFContainer("containerProtons",
329 "container for protons",
331 fProtonContainer->SetBinLimits(0,gY); //rapidity
332 fProtonContainer->SetBinLimits(1,gPt); //pT
333 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
334 "container for antiprotons",
336 fAntiProtonContainer->SetBinLimits(0,gY); //rapidity
337 fAntiProtonContainer->SetBinLimits(1,gPt); //pT
340 //____________________________________________________________________//
341 Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) {
342 //Read the containers from the existing file
343 Bool_t status = kTRUE;
345 TFile *file = TFile::Open(filename);
347 cout<<"Could not find the input file "<<filename<<endl;
351 TList *list = (TList *)file->Get("outputList");
353 cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl;
354 fHistYPtProtons = (TH2D *)list->At(0);
355 fHistYPtAntiProtons = (TH2D *)list->At(1);
356 fHistEvents = (TH1I *)list->At(2);
357 fProtonContainer = (AliCFContainer *)list->At(3);
358 fAntiProtonContainer = (AliCFContainer *)list->At(4);
359 fHistEventStats = (TH1F *)list->At(5);
362 cout<<"Retrieving objects from the file... "<<endl;
363 fHistYPtProtons = (TH2D *)file->Get("fHistYPtProtons");
364 fHistYPtAntiProtons = (TH2D *)file->Get("fHistYPtAntiProtons");
365 fHistEvents = (TH1I *)file->Get("fHistEvents");
366 fProtonContainer = (AliCFContainer *)file->Get("containerProtons");
367 fAntiProtonContainer = (AliCFContainer *)file->Get("containerAntiProtons");
368 fHistEventStats = (TH1F *)file->Get("fHistEventStats");
370 if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents)
371 ||(!fProtonContainer)||(!fAntiProtonContainer)||(!fHistEventStats)) {
372 cout<<"Input containers were not found!!!"<<endl;
376 //fHistYPtProtons = fProtonContainer->ShowProjection(0,1,0);
377 //fHistYPtAntiProtons = fAntiProtonContainer->ShowProjection(0,1,0);
378 fHistYPtProtons->Sumw2();
379 fHistYPtAntiProtons->Sumw2();
385 //____________________________________________________________________//
386 TH1D *AliProtonAnalysis::GetProtonYHistogram() {
387 //Get the y histogram for protons
388 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
390 TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),"");
391 //TH1D *fYProtons = fProtonContainer->ShowProjection(0,0); //variable-step
393 fYProtons->SetStats(kFALSE);
394 fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
395 fYProtons->SetTitle("dN/dy protons");
396 fYProtons->SetMarkerStyle(kFullCircle);
397 fYProtons->SetMarkerColor(4);
398 if(nAnalyzedEvents > 0)
399 fYProtons->Scale(1./nAnalyzedEvents);
404 //____________________________________________________________________//
405 TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() {
406 //Get the y histogram for antiprotons
407 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
409 TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"");
410 //TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,0);//variable-step
412 fYAntiProtons->SetStats(kFALSE);
413 fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
414 fYAntiProtons->SetTitle("dN/dy antiprotons");
415 fYAntiProtons->SetMarkerStyle(kFullCircle);
416 fYAntiProtons->SetMarkerColor(4);
417 if(nAnalyzedEvents > 0)
418 fYAntiProtons->Scale(1./nAnalyzedEvents);
420 return fYAntiProtons;
423 //____________________________________________________________________//
424 TH1D *AliProtonAnalysis::GetProtonPtHistogram() {
425 //Get the Pt histogram for protons
426 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
428 TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"");
429 //TH1D *fPtProtons = fProtonContainer->ShowProjection(1,0); //variable-step
431 fPtProtons->SetStats(kFALSE);
432 fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
433 fPtProtons->SetTitle("dN/dPt protons");
434 fPtProtons->SetMarkerStyle(kFullCircle);
435 fPtProtons->SetMarkerColor(4);
436 if(nAnalyzedEvents > 0)
437 fPtProtons->Scale(1./nAnalyzedEvents);
442 //____________________________________________________________________//
443 TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() {
444 //Get the Pt histogram for antiprotons
445 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
447 TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"");
448 //TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,0); //variable-step
450 fPtAntiProtons->SetStats(kFALSE);
451 fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
452 fPtAntiProtons->SetTitle("dN/dPt antiprotons");
453 fPtAntiProtons->SetMarkerStyle(kFullCircle);
454 fPtAntiProtons->SetMarkerColor(4);
455 if(nAnalyzedEvents > 0)
456 fPtAntiProtons->Scale(1./nAnalyzedEvents);
458 return fPtAntiProtons;
461 //____________________________________________________________________//
462 TH1D *AliProtonAnalysis::GetProtonCorrectedYHistogram() {
463 //Get the corrected y histogram for protons
464 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
466 TH1D *fYProtons = fCorrectProtons->Project(0); //0: rapidity
468 fYProtons->SetStats(kFALSE);
469 fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
470 fYProtons->GetXaxis()->SetTitle("y");
471 fYProtons->SetTitle("dN/dy protons");
472 fYProtons->SetMarkerStyle(kFullCircle);
473 fYProtons->SetMarkerColor(4);
474 if(nAnalyzedEvents > 0)
475 fYProtons->Scale(1./nAnalyzedEvents);
480 //____________________________________________________________________//
481 TH1D *AliProtonAnalysis::GetAntiProtonCorrectedYHistogram() {
482 //Get the corrected y histogram for antiprotons
483 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
485 TH1D *fYAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity
487 fYAntiProtons->SetStats(kFALSE);
488 fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
489 fYAntiProtons->GetXaxis()->SetTitle("y");
490 fYAntiProtons->SetTitle("dN/dy protons");
491 fYAntiProtons->SetMarkerStyle(kFullCircle);
492 fYAntiProtons->SetMarkerColor(4);
493 if(nAnalyzedEvents > 0)
494 fYAntiProtons->Scale(1./nAnalyzedEvents);
496 return fYAntiProtons;
499 //____________________________________________________________________//
500 TH1D *AliProtonAnalysis::GetProtonCorrectedPtHistogram() {
501 //Get the corrected Pt histogram for protons
502 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
504 TH1D *fPtProtons = fCorrectProtons->Project(0); //0: rapidity
506 fPtProtons->SetStats(kFALSE);
507 fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
508 fPtProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]");
509 fPtProtons->SetTitle("dN/dPt protons");
510 fPtProtons->SetMarkerStyle(kFullCircle);
511 fPtProtons->SetMarkerColor(4);
512 if(nAnalyzedEvents > 0)
513 fPtProtons->Scale(1./nAnalyzedEvents);
518 //____________________________________________________________________//
519 TH1D *AliProtonAnalysis::GetAntiProtonCorrectedPtHistogram() {
520 //Get the corrected Pt histogram for antiprotons
521 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
523 TH1D *fPtAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity
525 fPtAntiProtons->SetStats(kFALSE);
526 fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
527 fPtAntiProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]");
528 fPtAntiProtons->SetTitle("dN/dPt antiprotons");
529 fPtAntiProtons->SetMarkerStyle(kFullCircle);
530 fPtAntiProtons->SetMarkerColor(4);
531 if(nAnalyzedEvents > 0)
532 fPtAntiProtons->Scale(1./nAnalyzedEvents);
534 return fPtAntiProtons;
537 //____________________________________________________________________//
538 TH1D *AliProtonAnalysis::GetYRatioHistogram() {
539 //Returns the rapidity dependence of the ratio (uncorrected)
540 TH1D *fYProtons = GetProtonYHistogram();
541 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
543 TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
544 hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0);
545 hRatioY->SetMarkerStyle(kFullCircle);
546 hRatioY->SetMarkerColor(4);
547 hRatioY->GetYaxis()->SetTitle("#bar{p}/p");
548 hRatioY->GetYaxis()->SetTitleOffset(1.4);
549 hRatioY->GetXaxis()->SetTitle("y");
550 hRatioY->GetXaxis()->SetTitleColor(1);
551 hRatioY->SetStats(kFALSE);
556 //____________________________________________________________________//
557 TH1D *AliProtonAnalysis::GetYRatioCorrectedHistogram(TH2D *gCorrectionProtons,
558 TH2D *gCorrectionAntiProtons) {
559 //Returns the rapidity dependence of the ratio (corrected)
560 fHistYPtProtons->Multiply(gCorrectionProtons);
561 TH1D *fYProtons = GetProtonYHistogram();
562 fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons);
563 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
565 TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
566 hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0);
567 hRatioY->SetMarkerStyle(kFullCircle);
568 hRatioY->SetMarkerColor(4);
569 hRatioY->GetYaxis()->SetTitle("#bar{p}/p");
570 hRatioY->GetYaxis()->SetTitleOffset(1.4);
571 hRatioY->GetXaxis()->SetTitle("y");
572 hRatioY->GetXaxis()->SetTitleColor(1);
573 hRatioY->SetStats(kFALSE);
578 //____________________________________________________________________//
579 TH1D *AliProtonAnalysis::GetPtRatioHistogram() {
580 //Returns the pT dependence of the ratio (uncorrected)
581 TH1D *fPtProtons = GetProtonPtHistogram();
582 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
584 TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
585 hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0);
586 hRatioPt->SetMarkerStyle(kFullCircle);
587 hRatioPt->SetMarkerColor(4);
588 hRatioPt->GetYaxis()->SetTitle("#bar{p}/p");
589 hRatioPt->GetYaxis()->SetTitleOffset(1.4);
590 hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
591 hRatioPt->GetXaxis()->SetTitleColor(1);
592 hRatioPt->SetStats(kFALSE);
597 //____________________________________________________________________//
598 TH1D *AliProtonAnalysis::GetPtRatioCorrectedHistogram(TH2D *gCorrectionProtons,
599 TH2D *gCorrectionAntiProtons) {
600 //Returns the Pt dependence of the ratio (corrected)
601 fHistYPtProtons->Multiply(gCorrectionProtons);
602 TH1D *fPtProtons = GetProtonPtHistogram();
603 fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons);
604 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
606 TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
607 hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0);
608 hRatioPt->SetMarkerStyle(kFullCircle);
609 hRatioPt->SetMarkerColor(4);
610 hRatioPt->GetYaxis()->SetTitle("#bar{p}/p");
611 hRatioPt->GetYaxis()->SetTitleOffset(1.4);
612 hRatioPt->GetXaxis()->SetTitle("y");
613 hRatioPt->GetXaxis()->SetTitleColor(1);
614 hRatioPt->SetStats(kFALSE);
619 //____________________________________________________________________//
620 TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() {
621 //Returns the rapidity dependence of the asymmetry (uncorrected)
622 TH1D *fYProtons = GetProtonYHistogram();
623 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
625 TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
626 hsum->Add(fYProtons,fYAntiProtons,1.0,1.0);
628 TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
629 hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0);
631 TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
632 hAsymmetryY->Divide(hdiff,hsum,2.0,1.);
633 hAsymmetryY->SetMarkerStyle(kFullCircle);
634 hAsymmetryY->SetMarkerColor(4);
635 hAsymmetryY->GetYaxis()->SetTitle("A_{p}");
636 hAsymmetryY->GetYaxis()->SetTitleOffset(1.4);
637 hAsymmetryY->GetXaxis()->SetTitle("y");
638 hAsymmetryY->GetXaxis()->SetTitleColor(1);
639 hAsymmetryY->SetStats(kFALSE);
644 //____________________________________________________________________//
645 TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() {
646 //Returns the pT dependence of the asymmetry (uncorrected)
647 TH1D *fPtProtons = GetProtonPtHistogram();
648 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
650 TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
651 hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0);
653 TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
654 hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0);
656 TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
657 hAsymmetryPt->Divide(hdiff,hsum,2.0,1.);
658 hAsymmetryPt->SetMarkerStyle(kFullCircle);
659 hAsymmetryPt->SetMarkerColor(4);
660 hAsymmetryPt->GetYaxis()->SetTitle("A_{p}");
661 hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4);
662 hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
663 hAsymmetryPt->GetXaxis()->SetTitleColor(1);
664 hAsymmetryPt->SetStats(kFALSE);
669 //____________________________________________________________________//
670 void AliProtonAnalysis::Analyze(AliESDEvent* esd,
671 const AliESDVertex *vertex) {
672 //Main analysis part - ESD
674 Int_t nIdentifiedProtons = 0, nIdentifiedAntiProtons = 0;
675 Int_t nSurvivedProtons = 0, nSurvivedAntiProtons = 0;
677 fHistEvents->Fill(0); //number of analyzed events
678 Double_t containerInput[2] ;
679 Double_t gPt = 0.0, gP = 0.0;
680 nTracks = esd->GetNumberOfTracks();
681 for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
682 AliESDtrack* track = esd->GetTrack(iTracks);
683 AliESDtrack trackTPC;
685 //in case it's a TPC only track relate it to the proper vertex
686 /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC) {
688 track->GetImpactParametersTPC(p,cov);
689 if (p[0]==0 && p[1]==0)
690 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
691 if (!track->FillTPCOnlyTrack(trackTPC)) {
698 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
699 Int_t npointsTPCdEdx = track->GetTPCsignalN();
701 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
702 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
703 if(!tpcTrack) continue;
704 gPt = tpcTrack->Pt();
707 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
708 ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal());
709 ((TH3F *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),
710 tpcTrack->Phi()*180./TMath::Pi(),
712 ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),
713 tpcTrack->Phi()*180./TMath::Pi(),
715 ((TH3F *)(fQA2DList->At(6)))->Fill(gPt,
716 tpcTrack->Phi()*180./TMath::Pi(),
718 ((TH3F *)(fQA2DList->At(8)))->Fill(gPt,
719 tpcTrack->Phi()*180./TMath::Pi(),
722 if(fProtonAnalysisBase->IsProton(track)) {
723 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
724 ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal());
725 ((TH3F *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),
726 tpcTrack->Phi()*180./TMath::Pi(),
728 ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),
729 tpcTrack->Phi()*180./TMath::Pi(),
731 ((TH3F *)(fQA2DList->At(7)))->Fill(gPt,
732 tpcTrack->Phi()*180./TMath::Pi(),
734 ((TH3F *)(fQA2DList->At(9)))->Fill(gPt,
735 tpcTrack->Phi()*180./TMath::Pi(),
738 FillQA(esd,vertex,track);
739 if(tpcTrack->Charge() > 0) {
740 nIdentifiedProtons += 1;
741 if(fProtonAnalysisBase->GetEtaMode())
742 containerInput[0] = tpcTrack->Eta();
744 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
747 containerInput[1] = gPt;
748 fProtonContainer->Fill(containerInput,0);
750 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
751 if(fProtonAnalysisBase->GetEtaMode())
752 containerInput[0] = tpcTrack->Eta();
754 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
757 containerInput[1] = gPt;
758 fProtonContainer->Fill(containerInput,1);
760 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
761 nSurvivedProtons += 1;
762 if(fProtonAnalysisBase->GetEtaMode()) {
763 fHistYPtProtons->Fill(tpcTrack->Eta(),
765 containerInput[0] = tpcTrack->Eta();
768 fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
773 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
777 containerInput[1] = gPt;
778 fProtonContainer->Fill(containerInput,2);
780 else if(tpcTrack->Charge() < 0) {
781 nIdentifiedAntiProtons += 1;
782 if(fProtonAnalysisBase->GetEtaMode())
783 containerInput[0] = tpcTrack->Eta();
785 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
788 containerInput[1] = gPt;
789 fAntiProtonContainer->Fill(containerInput,0);
791 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
792 if(fProtonAnalysisBase->GetEtaMode())
793 containerInput[0] = tpcTrack->Eta();
795 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
798 containerInput[1] = gPt;
799 fAntiProtonContainer->Fill(containerInput,1);
801 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
802 nSurvivedAntiProtons += 1;
803 if(fProtonAnalysisBase->GetEtaMode()) {
804 fHistYPtAntiProtons->Fill(tpcTrack->Eta(),
806 containerInput[0] = tpcTrack->Eta();
809 fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
814 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
818 containerInput[1] = gPt;
819 fAntiProtonContainer->Fill(containerInput,2);
823 else if(fProtonAnalysisBase->GetAnalysisMode() == AliProtonAnalysisBase::kGlobal) {
827 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
828 ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal());
829 ((TH3F *)(fQA2DList->At(2)))->Fill(track->Eta(),
830 track->Phi()*180./TMath::Pi(),
832 ((TH3F *)(fQA2DList->At(4)))->Fill(track->Eta(),
833 track->Phi()*180./TMath::Pi(),
835 ((TH3F *)(fQA2DList->At(6)))->Fill(gPt,
836 track->Phi()*180./TMath::Pi(),
838 ((TH3F *)(fQA2DList->At(8)))->Fill(gPt,
839 track->Phi()*180./TMath::Pi(),
842 if(fProtonAnalysisBase->IsProton(track)) {
843 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
844 ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal());
845 ((TH3F *)(fQA2DList->At(3)))->Fill(track->Eta(),
846 track->Phi()*180./TMath::Pi(),
848 ((TH3F *)(fQA2DList->At(5)))->Fill(track->Eta(),
849 track->Phi()*180./TMath::Pi(),
851 ((TH3F *)(fQA2DList->At(7)))->Fill(gPt,
852 track->Phi()*180./TMath::Pi(),
854 ((TH3F *)(fQA2DList->At(9)))->Fill(gPt,
855 track->Phi()*180./TMath::Pi(),
858 FillQA(esd,vertex,track);
859 if(track->Charge() > 0) {
860 nIdentifiedProtons += 1;
861 if(fProtonAnalysisBase->GetEtaMode())
862 containerInput[0] = track->Eta();
864 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
867 containerInput[1] = gPt;
868 fProtonContainer->Fill(containerInput,0);
870 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
871 if(fProtonAnalysisBase->GetEtaMode())
872 containerInput[0] = track->Eta();
874 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
877 containerInput[1] = gPt;
878 fProtonContainer->Fill(containerInput,1);
880 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
881 nSurvivedProtons += 1;
882 if(fProtonAnalysisBase->GetEtaMode()) {
883 fHistYPtProtons->Fill(track->Eta(),
885 containerInput[0] = track->Eta();
888 fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
893 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
897 containerInput[1] = gPt;
898 fProtonContainer->Fill(containerInput,2);
900 else if(track->Charge() < 0) {
901 nIdentifiedAntiProtons += 1;
902 if(fProtonAnalysisBase->GetEtaMode())
903 containerInput[0] = track->Eta();
905 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
908 containerInput[1] = gPt;
909 fAntiProtonContainer->Fill(containerInput,0);
911 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
912 if(fProtonAnalysisBase->GetEtaMode())
913 containerInput[0] = track->Eta();
915 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
918 containerInput[1] = gPt;
919 fAntiProtonContainer->Fill(containerInput,1);
921 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
922 nSurvivedAntiProtons += 1;
923 if(fProtonAnalysisBase->GetEtaMode()) {
924 fHistYPtAntiProtons->Fill(track->Eta(),
926 containerInput[0] = track->Eta();
929 fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
934 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
938 containerInput[1] = gPt;
939 fAntiProtonContainer->Fill(containerInput,2);
945 if(fProtonAnalysisBase->GetDebugMode())
946 Printf("Initial number of tracks: %d | Identified (anti)protons: %d - %d | Survived (anti)protons: %d - %d",nTracks,nIdentifiedProtons,nIdentifiedAntiProtons,nSurvivedProtons,nSurvivedAntiProtons);
949 //____________________________________________________________________//
950 void AliProtonAnalysis::Analyze(AliAODEvent* const fAOD) {
951 //Main analysis part - AOD
952 fHistEvents->Fill(0); //number of analyzed events
953 Int_t nTracks = fAOD->GetNumberOfTracks();
954 for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
955 AliAODTrack* track = fAOD->GetTrack(iTracks);
956 Double_t gPt = track->Pt();
957 Double_t gP = track->P();
960 Double_t probability[10];
961 track->GetPID(probability);
963 for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP);
964 if(rcc == 0.0) continue;
966 for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP)/rcc;
967 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w);
968 if(fParticleType == 4) {
969 if(track->Charge() > 0)
970 fHistYPtProtons->Fill(track->Y(fParticleType),gPt);
971 else if(track->Charge() < 0)
972 fHistYPtAntiProtons->Fill(track->Y(fParticleType),gPt);
977 //____________________________________________________________________//
978 void AliProtonAnalysis::Analyze(AliStack* const stack,
980 //Main analysis part - MC
981 fHistEvents->Fill(0); //number of analyzed events
983 Int_t nParticles = 0;
984 //inclusive protons -
985 if(iInclusive) nParticles = stack->GetNtrack();
986 else nParticles = stack->GetNprimary();
988 for(Int_t i = 0; i < nParticles; i++) {
989 TParticle *particle = stack->Particle(i);
990 if(!particle) continue;
992 //in case of inclusive protons reject the secondaries from hadronic inter.
993 if(particle->GetUniqueID() == 13) continue;
995 if(TMath::Abs(particle->Eta()) > 1.0) continue;
996 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
997 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
999 Int_t pdgcode = particle->GetPdgCode();
1000 if(pdgcode == 2212) fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
1004 if(pdgcode == -2212) fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
1011 //____________________________________________________________________//
1012 Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) {
1013 //calculates the mean value of the ratio/asymmetry within \pm edge
1016 //calculate the mean
1017 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1018 Double_t x = hist->GetBinCenter(i+1);
1019 Double_t y = hist->GetBinContent(i+1);
1020 if(TMath::Abs(x) < edge) {
1025 Double_t mean = 0.0;
1027 mean = sum/nentries;
1029 //calculate the error
1030 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1031 Double_t x = hist->GetBinCenter(i+1);
1032 Double_t y = hist->GetBinContent(i+1);
1033 if(TMath::Abs(x) < edge) {
1034 sum += TMath::Power((mean - y),2);
1039 Double_t error = 0.0;
1041 error = TMath::Sqrt(sum)/nentries;
1043 cout<<"========================================="<<endl;
1044 cout<<"Input distribution: "<<hist->GetName()<<endl;
1045 cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl;
1046 cout<<"Mean value :"<<mean<<endl;
1047 cout<<"Error: "<<error<<endl;
1048 cout<<"========================================="<<endl;
1053 //____________________________________________________________________//
1054 Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) {
1055 //calculates the (anti)proton yields within the \pm edge
1056 Double_t sum = 0.0, sumerror = 0.0;
1057 Double_t error = 0.0;
1058 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1059 Double_t x = hist->GetBinCenter(i+1);
1060 Double_t y = hist->GetBinContent(i+1);
1061 if(TMath::Abs(x) < edge) {
1063 sumerror += TMath::Power(hist->GetBinError(i+1),2);
1067 error = TMath::Sqrt(sumerror);
1069 cout<<"========================================="<<endl;
1070 cout<<"Input distribution: "<<hist->GetName()<<endl;
1071 cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl;
1072 cout<<"Yields :"<<sum<<endl;
1073 cout<<"Error: "<<error<<endl;
1074 cout<<"========================================="<<endl;
1079 //____________________________________________________________________//
1080 void AliProtonAnalysis::Correct(Int_t step) {
1081 //Applies the correction maps to the initial containers
1082 fCorrectProtons = new AliCFDataGrid("correctProtons",
1085 fCorrectProtons->SetMeasured(0);
1086 fCorrectProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListProtons->At(step));
1088 fCorrectAntiProtons = new AliCFDataGrid("correctAntiProtons",
1090 *fAntiProtonContainer);
1091 fCorrectAntiProtons->SetMeasured(0);
1092 fCorrectAntiProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListAntiProtons->At(step));
1095 //____________________________________________________________________//
1096 Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) {
1097 // Reads the outout of the correction framework task
1098 // Creates the correction maps
1099 // Puts the results in the different TList objects
1100 Bool_t status = kTRUE;
1102 TFile *file = TFile::Open(filename);
1104 cout<<"Could not find the input CORRFW file "<<filename<<endl;
1108 //________________________________________//
1110 fEffGridListProtons = new TList();
1111 fCorrectionListProtons2D = new TList();
1112 fEfficiencyListProtons1D = new TList();
1113 fCorrectionListProtons1D = new TList();
1115 AliCFContainer *corrfwContainerProtons = (AliCFContainer*) (file->Get("containerProtons"));
1116 if(!corrfwContainerProtons) {
1117 cout<<"CORRFW container for protons not found!"<<endl;
1121 Int_t nSteps = corrfwContainerProtons->GetNStep();
1123 //currently the GRID is formed by the y-pT parameters
1124 //Add Vz as a next step
1125 Int_t iRap = 0, iPt = 1;
1126 AliCFEffGrid *effProtonsStep0Step1 = new AliCFEffGrid("eff10",
1127 "effProtonsStep0Step1",
1128 *corrfwContainerProtons);
1129 effProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0
1130 fEffGridListProtons->Add(effProtonsStep0Step1);
1131 gYPt[0] = effProtonsStep0Step1->Project(iRap,iPt);
1132 fCorrectionListProtons2D->Add(gYPt[0]);
1134 AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20",
1135 "effProtonsStep0Step2",
1136 *corrfwContainerProtons);
1137 effProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0
1138 fEffGridListProtons->Add(effProtonsStep0Step2);
1139 gYPt[1] = effProtonsStep0Step2->Project(iRap,iPt);
1140 fCorrectionListProtons2D->Add(gYPt[1]);
1142 AliCFEffGrid *effProtonsStep0Step3 = new AliCFEffGrid("eff30",
1143 "effProtonsStep0Step3",
1144 *corrfwContainerProtons);
1145 effProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0
1146 fEffGridListProtons->Add(effProtonsStep0Step3);
1147 gYPt[2] = effProtonsStep0Step3->Project(iRap,iPt);
1148 fCorrectionListProtons2D->Add(gYPt[2]);
1150 TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws-[2])
1151 TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws-[2])
1153 //Get the projection of the efficiency maps
1154 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1155 gEfficiency[iParameter][0] = effProtonsStep0Step1->Project(iParameter);
1156 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1157 gTitle += "_Step0_Step1";
1158 gEfficiency[iParameter][0]->SetName(gTitle.Data());
1159 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][0]);
1160 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1161 gTitle += "_Step0_Step1";
1162 gCorrection[iParameter][0] = new TH1D(gTitle.Data(),
1164 gEfficiency[iParameter][0]->GetNbinsX(),
1165 gEfficiency[iParameter][0]->GetXaxis()->GetXmin(),
1166 gEfficiency[iParameter][0]->GetXaxis()->GetXmax());
1167 //initialisation of the correction
1168 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++)
1169 gCorrection[iParameter][0]->SetBinContent(iBin,1.0);
1171 gEfficiency[iParameter][1] = effProtonsStep0Step2->Project(iParameter);
1172 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1173 gTitle += "_Step0_Step2";
1174 gEfficiency[iParameter][1]->SetName(gTitle.Data());
1175 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][1]);
1176 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1177 gTitle += "_Step0_Step2";
1178 gCorrection[iParameter][1] = new TH1D(gTitle.Data(),
1180 gEfficiency[iParameter][1]->GetNbinsX(),
1181 gEfficiency[iParameter][1]->GetXaxis()->GetXmin(),
1182 gEfficiency[iParameter][1]->GetXaxis()->GetXmax());
1183 //initialisation of the correction
1184 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++)
1185 gCorrection[iParameter][1]->SetBinContent(iBin,1.0);
1187 gEfficiency[iParameter][2] = effProtonsStep0Step3->Project(iParameter);
1188 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1189 gTitle += "_Step0_Step3";
1190 gEfficiency[iParameter][2]->SetName(gTitle.Data());
1191 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][2]);
1192 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1193 gTitle += "_Step0_Step3";
1194 gCorrection[iParameter][2] = new TH1D(gTitle.Data(),
1196 gEfficiency[iParameter][2]->GetNbinsX(),
1197 gEfficiency[iParameter][2]->GetXaxis()->GetXmin(),
1198 gEfficiency[iParameter][2]->GetXaxis()->GetXmax());
1199 //initialisation of the correction
1200 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++)
1201 gCorrection[iParameter][2]->SetBinContent(iBin,1.0);
1203 //Calculate the 1D correction parameters as a function of y and pT
1204 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1205 for(Int_t iStep = 1; iStep < nSteps; iStep++) {
1206 gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]);
1207 fCorrectionListProtons1D->Add(gCorrection[iParameter][iStep-1]);
1211 //________________________________________//
1213 fEffGridListAntiProtons = new TList();
1214 fCorrectionListAntiProtons2D = new TList();
1215 fEfficiencyListAntiProtons1D = new TList();
1216 fCorrectionListAntiProtons1D = new TList();
1218 AliCFContainer *corrfwContainerAntiProtons = (AliCFContainer*) (file->Get("containerAntiProtons"));
1219 if(!corrfwContainerAntiProtons) {
1220 cout<<"CORRFW container for antiprotons not found!"<<endl;
1224 nSteps = corrfwContainerAntiProtons->GetNStep();
1225 //currently the GRID is formed by the y-pT parameters
1226 //Add Vz as a next step
1227 AliCFEffGrid *effAntiProtonsStep0Step1 = new AliCFEffGrid("eff10",
1228 "effAntiProtonsStep0Step1",
1229 *corrfwContainerAntiProtons);
1230 effAntiProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0
1231 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step1);
1232 gYPt[0] = effAntiProtonsStep0Step1->Project(iRap,iPt);
1233 fCorrectionListAntiProtons2D->Add(gYPt[0]);
1235 AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20",
1236 "effAntiProtonsStep0Step2",
1237 *corrfwContainerAntiProtons);
1238 effAntiProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0
1239 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step2);
1240 gYPt[1] = effAntiProtonsStep0Step2->Project(iRap,iPt);
1241 fCorrectionListAntiProtons2D->Add(gYPt[1]);
1243 AliCFEffGrid *effAntiProtonsStep0Step3 = new AliCFEffGrid("eff30",
1244 "effAntiProtonsStep0Step3",
1245 *corrfwContainerAntiProtons);
1246 effAntiProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0
1247 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step3);
1248 gYPt[2] = effAntiProtonsStep0Step3->Project(iRap,iPt);
1249 fCorrectionListAntiProtons2D->Add(gYPt[2]);
1251 //Get the projection of the efficiency maps
1252 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1253 gEfficiency[iParameter][0] = effAntiProtonsStep0Step1->Project(iParameter);
1254 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1255 gTitle += "_Step0_Step1";
1256 gEfficiency[iParameter][0]->SetName(gTitle.Data());
1257 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][0]);
1258 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1259 gTitle += "_Step0_Step1";
1260 gCorrection[iParameter][0] = new TH1D(gTitle.Data(),
1262 gEfficiency[iParameter][0]->GetNbinsX(),
1263 gEfficiency[iParameter][0]->GetXaxis()->GetXmin(),
1264 gEfficiency[iParameter][0]->GetXaxis()->GetXmax());
1265 //initialisation of the correction
1266 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++)
1267 gCorrection[iParameter][0]->SetBinContent(iBin,1.0);
1269 gEfficiency[iParameter][1] = effAntiProtonsStep0Step2->Project(iParameter);
1270 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1271 gTitle += "_Step0_Step2";
1272 gEfficiency[iParameter][1]->SetName(gTitle.Data());
1273 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][1]);
1274 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1275 gTitle += "_Step0_Step2";
1276 gCorrection[iParameter][1] = new TH1D(gTitle.Data(),
1278 gEfficiency[iParameter][1]->GetNbinsX(),
1279 gEfficiency[iParameter][1]->GetXaxis()->GetXmin(),
1280 gEfficiency[iParameter][1]->GetXaxis()->GetXmax());
1281 //initialisation of the correction
1282 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++)
1283 gCorrection[iParameter][1]->SetBinContent(iBin,1.0);
1285 gEfficiency[iParameter][2] = effAntiProtonsStep0Step3->Project(iParameter);
1286 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1287 gTitle += "_Step0_Step3";
1288 gEfficiency[iParameter][2]->SetName(gTitle.Data());
1289 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][2]);
1290 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1291 gTitle += "_Step0_Step3";
1292 gCorrection[iParameter][2] = new TH1D(gTitle.Data(),
1294 gEfficiency[iParameter][2]->GetNbinsX(),
1295 gEfficiency[iParameter][2]->GetXaxis()->GetXmin(),
1296 gEfficiency[iParameter][2]->GetXaxis()->GetXmax());
1297 //initialisation of the correction
1298 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++)
1299 gCorrection[iParameter][2]->SetBinContent(iBin,1.0);
1301 //Calculate the 1D correction parameters as a function of y and pT
1302 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1303 for(Int_t iStep = 1; iStep < nSteps; iStep++) {
1304 gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]);
1305 fCorrectionListAntiProtons1D->Add(gCorrection[iParameter][iStep-1]);
1312 //____________________________________________________________________//
1313 void AliProtonAnalysis::InitQA() {
1314 //Applies the correction maps to the initial containers
1315 fInitQAFlag = kTRUE;
1316 fGlobalQAList = new TList();
1317 fGlobalQAList->SetName("fGlobalQAList");
1319 //========================================================//
1320 fQA2DList = new TList();
1321 fQA2DList->SetName("fQA2DList");
1322 fGlobalQAList->Add(fQA2DList);
1325 TH2F *gHistdEdxP = new TH2F("gHistdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600);
1326 fQA2DList->Add(gHistdEdxP);
1327 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);
1328 fQA2DList->Add(gHistProtonsdEdxP);
1330 //eta-phi-Npoints(dEdx)
1331 TH3F *gHistEtaPhiTPCdEdxNPoints = new TH3F("gHistEtaPhiTPCdEdxNPoints",
1332 ";#eta;#phi;N_{points}(TPC)",
1333 fNBinsY,fMinY,fMaxY,
1336 gHistEtaPhiTPCdEdxNPoints->SetStats(kTRUE);
1337 fQA2DList->Add(gHistEtaPhiTPCdEdxNPoints);
1338 TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = new TH3F("gHistProtonsEtaPhiTPCdEdxNPoints",
1339 ";#eta;#phi;N_{points}(TPC)",
1340 fNBinsY,fMinY,fMaxY,
1343 gHistProtonsEtaPhiTPCdEdxNPoints->SetStats(kTRUE);
1344 fQA2DList->Add(gHistProtonsEtaPhiTPCdEdxNPoints);
1347 TH3F *gHistEtaPhiTPCNPoints = new TH3F("gHistEtaPhiTPCNPoints",
1348 ";#eta;#phi;N_{points}(TPC)",
1349 fNBinsY,fMinY,fMaxY,
1352 gHistEtaPhiTPCNPoints->SetStats(kTRUE);
1353 fQA2DList->Add(gHistEtaPhiTPCNPoints);
1354 TH3F *gHistProtonsEtaPhiTPCNPoints = new TH3F("gHistProtonsEtaPhiTPCNPoints",
1355 ";#eta;#phi;N_{points}(TPC)",
1356 fNBinsY,fMinY,fMaxY,
1359 gHistProtonsEtaPhiTPCNPoints->SetStats(kTRUE);
1360 fQA2DList->Add(gHistProtonsEtaPhiTPCNPoints);
1362 //pt-phi-Npoints(dEdx)
1363 TH3F *gHistPtPhiTPCdEdxNPoints = new TH3F("gHistPtPhiTPCdEdxNPoints",
1364 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1365 fNBinsPt,fMinPt,fMaxPt,
1368 gHistPtPhiTPCdEdxNPoints->SetStats(kTRUE);
1369 fQA2DList->Add(gHistPtPhiTPCdEdxNPoints);
1370 TH3F *gHistProtonsPtPhiTPCdEdxNPoints = new TH3F("gHistProtonsPtPhiTPCdEdxNPoints",
1371 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1372 fNBinsPt,fMinPt,fMaxPt,
1375 gHistProtonsPtPhiTPCdEdxNPoints->SetStats(kTRUE);
1376 fQA2DList->Add(gHistProtonsPtPhiTPCdEdxNPoints);
1379 TH3F *gHistPtPhiTPCNPoints = new TH3F("gHistPtPhiTPCNPoints",
1380 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1381 fNBinsPt,fMinPt,fMaxPt,
1384 gHistPtPhiTPCNPoints->SetStats(kTRUE);
1385 fQA2DList->Add(gHistPtPhiTPCNPoints);
1386 TH3F *gHistProtonsPtPhiTPCNPoints = new TH3F("gHistProtonsPtPhiTPCNPoints",
1387 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1388 fNBinsPt,fMinPt,fMaxPt,
1391 gHistProtonsPtPhiTPCNPoints->SetStats(kTRUE);
1392 fQA2DList->Add(gHistProtonsPtPhiTPCNPoints);
1394 //========================================================//
1395 fQAProtonsAcceptedList = new TList();
1396 fQAProtonsAcceptedList->SetName("fQAProtonsAcceptedList");
1397 fGlobalQAList->Add(fQAProtonsAcceptedList);
1399 TH1F *gProtonsITSClustersPass = new TH1F("gProtonsITSClustersPass",
1400 ";N_{clusters} (ITS);Entries",
1402 fQAProtonsAcceptedList->Add(gProtonsITSClustersPass);
1403 TH1F *gProtonsChi2PerClusterITSPass = new TH1F("gProtonsChi2PerClusterITSPass",
1404 ";x^{2}/N_{clusters} (ITS);Entries",
1406 fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterITSPass);
1407 TH1F *gProtonsTPCClustersPass = new TH1F("gProtonsTPCClustersPass",
1408 ";N_{clusters} (TPC);Entries",
1410 fQAProtonsAcceptedList->Add(gProtonsTPCClustersPass);
1411 TH1F *gProtonsChi2PerClusterTPCPass = new TH1F("gProtonsChi2PerClusterTPCPass",
1412 ";x^{2}/N_{clusters} (TPC);Entries",
1414 fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterTPCPass);
1415 TH1F *gProtonsExtCov11Pass = new TH1F("gProtonsExtCov11Pass",
1416 ";#sigma_{y} [cm];Entries",
1418 fQAProtonsAcceptedList->Add(gProtonsExtCov11Pass);
1419 TH1F *gProtonsExtCov22Pass = new TH1F("gProtonsExtCov22Pass",
1420 ";#sigma_{z} [cm];Entries",
1422 fQAProtonsAcceptedList->Add(gProtonsExtCov22Pass);
1423 TH1F *gProtonsExtCov33Pass = new TH1F("gProtonsExtCov33Pass",
1424 ";#sigma_{sin(#phi)};Entries",
1426 fQAProtonsAcceptedList->Add(gProtonsExtCov33Pass);
1427 TH1F *gProtonsExtCov44Pass = new TH1F("gProtonsExtCov44Pass",
1428 ";#sigma_{tan(#lambda)};Entries",
1430 fQAProtonsAcceptedList->Add(gProtonsExtCov44Pass);
1431 TH1F *gProtonsExtCov55Pass = new TH1F("gProtonsExtCov55Pass",
1432 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1434 fQAProtonsAcceptedList->Add(gProtonsExtCov55Pass);
1435 TH1F *gProtonsSigmaToVertexPass = new TH1F("gProtonsSigmaToVertexPass",
1436 ";#sigma_{Vertex};Entries",
1438 fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexPass);
1439 TH1F *gProtonsSigmaToVertexTPCPass = new TH1F("gProtonsSigmaToVertexTPCPass",
1440 ";#sigma_{Vertex};Entries",
1442 fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexTPCPass);
1443 TH1F *gProtonsDCAXYPass = new TH1F("gProtonsDCAXYPass",
1444 ";DCA_{xy} [cm];Entries",
1446 fQAProtonsAcceptedList->Add(gProtonsDCAXYPass);
1447 TH1F *gProtonsDCAXYTPCPass = new TH1F("gProtonsDCAXYTPCPass",
1448 ";DCA_{xy} [cm];Entries",
1450 fQAProtonsAcceptedList->Add(gProtonsDCAXYTPCPass);
1451 TH1F *gProtonsDCAZPass = new TH1F("gProtonsDCAZPass",
1452 ";DCA_{z} [cm];Entries",
1454 fQAProtonsAcceptedList->Add(gProtonsDCAZPass);
1455 TH1F *gProtonsDCAZTPCPass = new TH1F("gProtonsDCAZTPCPass",
1456 ";DCA_{z} [cm];Entries",
1458 fQAProtonsAcceptedList->Add(gProtonsDCAZTPCPass);
1459 TH1F *gProtonsConstrainChi2Pass = new TH1F("gProtonsConstrainChi2Pass",
1460 ";Log_{10}(#chi^{2});Entries",
1462 fQAProtonsAcceptedList->Add(gProtonsConstrainChi2Pass);
1463 TH1F *gProtonsITSRefitPass = new TH1F("gProtonsITSRefitPass",
1465 fQAProtonsAcceptedList->Add(gProtonsITSRefitPass);
1466 TH1F *gProtonsTPCRefitPass = new TH1F("gProtonsTPCRefitPass",
1468 fQAProtonsAcceptedList->Add(gProtonsTPCRefitPass);
1469 TH1F *gProtonsESDpidPass = new TH1F("gProtonsESDpidPass",
1471 fQAProtonsAcceptedList->Add(gProtonsESDpidPass);
1472 TH1F *gProtonsTPCpidPass = new TH1F("gProtonsTPCpidPass",
1474 fQAProtonsAcceptedList->Add(gProtonsTPCpidPass);
1475 TH1F *gProtonsPointOnITSLayer1Pass = new TH1F("gProtonsPointOnITSLayer1Pass",
1477 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer1Pass);
1478 TH1F *gProtonsPointOnITSLayer2Pass = new TH1F("gProtonsPointOnITSLayer2Pass",
1480 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer2Pass);
1481 TH1F *gProtonsPointOnITSLayer3Pass = new TH1F("gProtonsPointOnITSLayer3Pass",
1483 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer3Pass);
1484 TH1F *gProtonsPointOnITSLayer4Pass = new TH1F("gProtonsPointOnITSLayer4Pass",
1486 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer4Pass);
1487 TH1F *gProtonsPointOnITSLayer5Pass = new TH1F("gProtonsPointOnITSLayer5Pass",
1489 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer5Pass);
1490 TH1F *gProtonsPointOnITSLayer6Pass = new TH1F("gProtonsPointOnITSLayer6Pass",
1492 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer6Pass);
1493 TH1F *gProtonsNumberOfTPCdEdxPointsPass = new TH1F("gProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
1494 fQAProtonsAcceptedList->Add(gProtonsNumberOfTPCdEdxPointsPass);
1496 //========================================================//
1497 fQAProtonsRejectedList = new TList();
1498 fQAProtonsRejectedList->SetName("fQAProtonsRejectedList");
1499 fGlobalQAList->Add(fQAProtonsRejectedList);
1501 TH1F *gProtonsITSClustersReject = new TH1F("gProtonsITSClustersReject",
1502 ";N_{clusters} (ITS);Entries",
1504 gProtonsITSClustersReject->SetFillColor(kRed-2);
1505 fQAProtonsRejectedList->Add(gProtonsITSClustersReject);
1506 TH1F *gProtonsChi2PerClusterITSReject = new TH1F("gProtonsChi2PerClusterITSReject",
1507 ";x^{2}/N_{clusters} (ITS);Entries",
1509 gProtonsChi2PerClusterITSReject->SetFillColor(kRed-2);
1510 fQAProtonsRejectedList->Add(gProtonsChi2PerClusterITSReject);
1511 TH1F *gProtonsTPCClustersReject = new TH1F("gProtonsTPCClustersReject",
1512 ";N_{clusters} (TPC);Entries",
1514 gProtonsTPCClustersReject->SetFillColor(kRed-2);
1515 fQAProtonsRejectedList->Add(gProtonsTPCClustersReject);
1516 TH1F *gProtonsChi2PerClusterTPCReject = new TH1F("gProtonsChi2PerClusterTPCReject",
1517 ";x^{2}/N_{clusters} (TPC);Entries",
1519 gProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2);
1520 fQAProtonsRejectedList->Add(gProtonsChi2PerClusterTPCReject);
1521 TH1F *gProtonsExtCov11Reject = new TH1F("gProtonsExtCov11Reject",
1522 ";#sigma_{y} [cm];Entries",
1524 gProtonsExtCov11Reject->SetFillColor(kRed-2);
1525 fQAProtonsRejectedList->Add(gProtonsExtCov11Reject);
1526 TH1F *gProtonsExtCov22Reject = new TH1F("gProtonsExtCov22Reject",
1527 ";#sigma_{z} [cm];Entries",
1529 gProtonsExtCov22Reject->SetFillColor(kRed-2);
1530 fQAProtonsRejectedList->Add(gProtonsExtCov22Reject);
1531 TH1F *gProtonsExtCov33Reject = new TH1F("gProtonsExtCov33Reject",
1532 ";#sigma_{sin(#phi)};Entries",
1534 gProtonsExtCov33Reject->SetFillColor(kRed-2);
1535 fQAProtonsRejectedList->Add(gProtonsExtCov33Reject);
1536 TH1F *gProtonsExtCov44Reject = new TH1F("gProtonsExtCov44Reject",
1537 ";#sigma_{tan(#lambda)};Entries",
1539 gProtonsExtCov44Reject->SetFillColor(kRed-2);
1540 fQAProtonsRejectedList->Add(gProtonsExtCov44Reject);
1541 TH1F *gProtonsExtCov55Reject = new TH1F("gProtonsExtCov55Reject",
1542 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1544 gProtonsExtCov55Reject->SetFillColor(kRed-2);
1545 fQAProtonsRejectedList->Add(gProtonsExtCov55Reject);
1546 TH1F *gProtonsSigmaToVertexReject = new TH1F("gProtonsSigmaToVertexReject",
1547 ";#sigma_{Vertex};Entries",
1549 gProtonsSigmaToVertexReject->SetFillColor(kRed-2);
1550 fQAProtonsRejectedList->Add(gProtonsSigmaToVertexReject);
1551 TH1F *gProtonsSigmaToVertexTPCReject = new TH1F("gProtonsSigmaToVertexTPCReject",
1552 ";#sigma_{Vertex};Entries",
1554 gProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2);
1555 fQAProtonsRejectedList->Add(gProtonsSigmaToVertexTPCReject);
1556 TH1F *gProtonsDCAXYReject = new TH1F("gProtonsDCAXYReject",
1557 ";DCA_{xy} [cm];Entries",
1559 gProtonsDCAXYReject->SetFillColor(kRed-2);
1560 fQAProtonsRejectedList->Add(gProtonsDCAXYReject);
1561 TH1F *gProtonsDCAXYTPCReject = new TH1F("gProtonsDCAXYTPCReject",
1562 ";DCA_{xy} [cm];Entries",
1564 gProtonsDCAXYTPCReject->SetFillColor(kRed-2);
1565 fQAProtonsRejectedList->Add(gProtonsDCAXYTPCReject);
1566 TH1F *gProtonsDCAZReject = new TH1F("gProtonsDCAZReject",
1567 ";DCA_{z} [cm];Entries",
1569 gProtonsDCAZReject->SetFillColor(kRed-2);
1570 fQAProtonsRejectedList->Add(gProtonsDCAZReject);
1571 TH1F *gProtonsDCAZTPCReject = new TH1F("gProtonsDCAZTPCReject",
1572 ";DCA_{z} [cm];Entries",
1574 gProtonsDCAZTPCReject->SetFillColor(kRed-2);
1575 fQAProtonsRejectedList->Add(gProtonsDCAZTPCReject);
1576 TH1F *gProtonsConstrainChi2Reject = new TH1F("gProtonsConstrainChi2Reject",
1577 ";Log_{10}(#chi^{2});Entries",
1579 gProtonsConstrainChi2Reject->SetFillColor(kRed-2);
1580 fQAProtonsRejectedList->Add(gProtonsConstrainChi2Reject);
1581 TH1F *gProtonsITSRefitReject = new TH1F("gProtonsITSRefitReject",
1583 gProtonsITSRefitReject->SetFillColor(kRed-2);
1584 fQAProtonsRejectedList->Add(gProtonsITSRefitReject);
1585 TH1F *gProtonsTPCRefitReject = new TH1F("gProtonsTPCRefitReject",
1587 gProtonsTPCRefitReject->SetFillColor(kRed-2);
1588 fQAProtonsRejectedList->Add(gProtonsTPCRefitReject);
1589 TH1F *gProtonsESDpidReject = new TH1F("gProtonsESDpidReject",
1591 gProtonsESDpidReject->SetFillColor(kRed-2);
1592 fQAProtonsRejectedList->Add(gProtonsESDpidReject);
1593 TH1F *gProtonsTPCpidReject = new TH1F("gProtonsTPCpidReject",
1595 gProtonsTPCpidReject->SetFillColor(kRed-2);
1596 fQAProtonsRejectedList->Add(gProtonsTPCpidReject);
1597 TH1F *gProtonsPointOnITSLayer1Reject = new TH1F("gProtonsPointOnITSLayer1Reject",
1599 gProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2);
1600 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer1Reject);
1601 TH1F *gProtonsPointOnITSLayer2Reject = new TH1F("gProtonsPointOnITSLayer2Reject",
1603 gProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2);
1604 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer2Reject);
1605 TH1F *gProtonsPointOnITSLayer3Reject = new TH1F("gProtonsPointOnITSLayer3Reject",
1607 gProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2);
1608 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer3Reject);
1609 TH1F *gProtonsPointOnITSLayer4Reject = new TH1F("gProtonsPointOnITSLayer4Reject",
1611 gProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2);
1612 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer4Reject);
1613 TH1F *gProtonsPointOnITSLayer5Reject = new TH1F("gProtonsPointOnITSLayer5Reject",
1615 gProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2);
1616 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer5Reject);
1617 TH1F *gProtonsPointOnITSLayer6Reject = new TH1F("gProtonsPointOnITSLayer6Reject",
1619 gProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2);
1620 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer6Reject);
1621 TH1F *gProtonsNumberOfTPCdEdxPointsReject = new TH1F("gProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
1622 gProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2);
1623 fQAProtonsRejectedList->Add(gProtonsNumberOfTPCdEdxPointsReject);
1625 //========================================================//
1626 fQAAntiProtonsAcceptedList = new TList();
1627 fQAAntiProtonsAcceptedList->SetName("fQAAntiProtonsAcceptedList");
1628 fGlobalQAList->Add(fQAAntiProtonsAcceptedList);
1629 //Accepted antiprotons
1630 TH1F *gAntiProtonsITSClustersPass = new TH1F("gAntiProtonsITSClustersPass",
1631 ";N_{clusters} (ITS);Entries",
1633 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClustersPass);
1634 TH1F *gAntiProtonsChi2PerClusterITSPass = new TH1F("gAntiProtonsChi2PerClusterITSPass",
1635 ";x^{2}/N_{clusters} (ITS);Entries",
1637 fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterITSPass);
1638 TH1F *gAntiProtonsTPCClustersPass = new TH1F("gAntiProtonsTPCClustersPass",
1639 ";N_{clusters} (TPC);Entries",
1641 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCClustersPass);
1642 TH1F *gAntiProtonsChi2PerClusterTPCPass = new TH1F("gAntiProtonsChi2PerClusterTPCPass",
1643 ";x^{2}/N_{clusters} (TPC);Entries",
1645 fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterTPCPass);
1646 TH1F *gAntiProtonsExtCov11Pass = new TH1F("gAntiProtonsExtCov11Pass",
1647 ";#sigma_{y} [cm];Entries",
1649 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov11Pass);
1650 TH1F *gAntiProtonsExtCov22Pass = new TH1F("gAntiProtonsExtCov22Pass",
1651 ";#sigma_{z} [cm];Entries",
1653 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov22Pass);
1654 TH1F *gAntiProtonsExtCov33Pass = new TH1F("gAntiProtonsExtCov33Pass",
1655 ";#sigma_{sin(#phi)};Entries",
1657 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov33Pass);
1658 TH1F *gAntiProtonsExtCov44Pass = new TH1F("gAntiProtonsExtCov44Pass",
1659 ";#sigma_{tan(#lambda)};Entries",
1661 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov44Pass);
1662 TH1F *gAntiProtonsExtCov55Pass = new TH1F("gAntiProtonsExtCov55Pass",
1663 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1665 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov55Pass);
1666 TH1F *gAntiProtonsSigmaToVertexPass = new TH1F("gAntiProtonsSigmaToVertexPass",
1667 ";#sigma_{Vertex};Entries",
1669 fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexPass);
1670 TH1F *gAntiProtonsSigmaToVertexTPCPass = new TH1F("gAntiProtonsSigmaToVertexTPCPass",
1671 ";#sigma_{Vertex};Entries",
1673 fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexTPCPass);
1674 TH1F *gAntiProtonsDCAXYPass = new TH1F("gAntiProtonsDCAXYPass",
1675 ";DCA_{xy} [cm];Entries",
1677 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYPass);
1678 TH1F *gAntiProtonsDCAXYTPCPass = new TH1F("gAntiProtonsDCAXYTPCPass",
1679 ";DCA_{xy} [cm];Entries",
1681 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYTPCPass);
1682 TH1F *gAntiProtonsDCAZPass = new TH1F("gAntiProtonsDCAZPass",
1683 ";DCA_{z} [cm];Entries",
1685 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZPass);
1686 TH1F *gAntiProtonsDCAZTPCPass = new TH1F("gAntiProtonsDCAZTPCPass",
1687 ";DCA_{z} [cm];Entries",
1689 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZTPCPass);
1690 TH1F *gAntiProtonsConstrainChi2Pass = new TH1F("gAntiProtonsConstrainChi2Pass",
1691 ";Log_{10}(#chi^{2});Entries",
1693 fQAAntiProtonsAcceptedList->Add(gAntiProtonsConstrainChi2Pass);
1694 TH1F *gAntiProtonsITSRefitPass = new TH1F("gAntiProtonsITSRefitPass",
1696 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSRefitPass);
1697 TH1F *gAntiProtonsTPCRefitPass = new TH1F("gAntiProtonsTPCRefitPass",
1699 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCRefitPass);
1700 TH1F *gAntiProtonsESDpidPass = new TH1F("gAntiProtonsESDpidPass",
1702 fQAAntiProtonsAcceptedList->Add(gAntiProtonsESDpidPass);
1703 TH1F *gAntiProtonsTPCpidPass = new TH1F("gAntiProtonsTPCpidPass",
1705 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCpidPass);
1706 TH1F *gAntiProtonsPointOnITSLayer1Pass = new TH1F("gAntiProtonsPointOnITSLayer1Pass",
1708 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer1Pass);
1709 TH1F *gAntiProtonsPointOnITSLayer2Pass = new TH1F("gAntiProtonsPointOnITSLayer2Pass",
1711 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer2Pass);
1712 TH1F *gAntiProtonsPointOnITSLayer3Pass = new TH1F("gAntiProtonsPointOnITSLayer3Pass",
1714 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer3Pass);
1715 TH1F *gAntiProtonsPointOnITSLayer4Pass = new TH1F("gAntiProtonsPointOnITSLayer4Pass",
1717 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer4Pass);
1718 TH1F *gAntiProtonsPointOnITSLayer5Pass = new TH1F("gAntiProtonsPointOnITSLayer5Pass",
1720 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer5Pass);
1721 TH1F *gAntiProtonsPointOnITSLayer6Pass = new TH1F("gAntiProtonsPointOnITSLayer6Pass",
1723 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer6Pass);
1724 TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
1725 fQAAntiProtonsAcceptedList->Add(gAntiProtonsNumberOfTPCdEdxPointsPass);
1727 //========================================================//
1728 fQAAntiProtonsRejectedList = new TList();
1729 fQAAntiProtonsRejectedList->SetName("fQAAntiProtonsRejectedList");
1730 fGlobalQAList->Add(fQAAntiProtonsRejectedList);
1731 //Rejected antiprotons
1732 TH1F *gAntiProtonsITSClustersReject = new TH1F("gAntiProtonsITSClustersReject",
1733 ";N_{clusters} (ITS);Entries",
1735 gAntiProtonsITSClustersReject->SetFillColor(kRed-2);
1736 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClustersReject);
1737 TH1F *gAntiProtonsChi2PerClusterITSReject = new TH1F("gAntiProtonsChi2PerClusterITSReject",
1738 ";x^{2}/N_{clusters} (ITS);Entries",
1740 gAntiProtonsChi2PerClusterITSReject->SetFillColor(kRed-2);
1741 fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterITSReject);
1742 TH1F *gAntiProtonsTPCClustersReject = new TH1F("gAntiProtonsTPCClustersReject",
1743 ";N_{clusters} (TPC);Entries",
1745 gAntiProtonsTPCClustersReject->SetFillColor(kRed-2);
1746 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCClustersReject);
1747 TH1F *gAntiProtonsChi2PerClusterTPCReject = new TH1F("gAntiProtonsChi2PerClusterTPCReject",
1748 ";x^{2}/N_{clusters} (TPC);Entries",
1750 gAntiProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2);
1751 fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterTPCReject);
1752 TH1F *gAntiProtonsExtCov11Reject = new TH1F("gAntiProtonsExtCov11Reject",
1753 ";#sigma_{y} [cm];Entries",
1755 gAntiProtonsExtCov11Reject->SetFillColor(kRed-2);
1756 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov11Reject);
1757 TH1F *gAntiProtonsExtCov22Reject = new TH1F("gAntiProtonsExtCov22Reject",
1758 ";#sigma_{z} [cm];Entries",
1760 gAntiProtonsExtCov22Reject->SetFillColor(kRed-2);
1761 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov22Reject);
1762 TH1F *gAntiProtonsExtCov33Reject = new TH1F("gAntiProtonsExtCov33Reject",
1763 ";#sigma_{sin(#phi)};Entries",
1765 gAntiProtonsExtCov33Reject->SetFillColor(kRed-2);
1766 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov33Reject);
1767 TH1F *gAntiProtonsExtCov44Reject = new TH1F("gAntiProtonsExtCov44Reject",
1768 ";#sigma_{tan(#lambda)};Entries",
1770 gAntiProtonsExtCov44Reject->SetFillColor(kRed-2);
1771 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov44Reject);
1772 TH1F *gAntiProtonsExtCov55Reject = new TH1F("gAntiProtonsExtCov55Reject",
1773 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1775 gAntiProtonsExtCov55Reject->SetFillColor(kRed-2);
1776 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov55Reject);
1777 TH1F *gAntiProtonsSigmaToVertexReject = new TH1F("gAntiProtonsSigmaToVertexReject",
1778 ";#sigma_{Vertex};Entries",
1780 gAntiProtonsSigmaToVertexReject->SetFillColor(kRed-2);
1781 fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexReject);
1782 TH1F *gAntiProtonsSigmaToVertexTPCReject = new TH1F("gAntiProtonsSigmaToVertexTPCReject",
1783 ";#sigma_{Vertex};Entries",
1785 gAntiProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2);
1786 fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexTPCReject);
1787 TH1F *gAntiProtonsDCAXYReject = new TH1F("gAntiProtonsDCAXYReject",
1788 ";DCA_{xy} [cm];Entries",
1790 gAntiProtonsDCAXYReject->SetFillColor(kRed-2);
1791 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYReject);
1792 TH1F *gAntiProtonsDCAXYTPCReject = new TH1F("gAntiProtonsDCAXYTPCReject",
1793 ";DCA_{xy} [cm];Entries",
1795 gAntiProtonsDCAXYTPCReject->SetFillColor(kRed-2);
1796 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYTPCReject);
1797 TH1F *gAntiProtonsDCAZReject = new TH1F("gAntiProtonsDCAZReject",
1798 ";DCA_{z} [cm];Entries",
1800 gAntiProtonsDCAZReject->SetFillColor(kRed-2);
1801 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZReject);
1802 TH1F *gAntiProtonsDCAZTPCReject = new TH1F("gAntiProtonsDCAZTPCReject",
1803 ";DCA_{z} [cm];Entries",
1805 gAntiProtonsDCAZTPCReject->SetFillColor(kRed-2);
1806 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZTPCReject);
1807 TH1F *gAntiProtonsConstrainChi2Reject = new TH1F("gAntiProtonsConstrainChi2Reject",
1808 ";Log_{10}(#chi^{2});Entries",
1810 gAntiProtonsConstrainChi2Reject->SetFillColor(kRed-2);
1811 fQAAntiProtonsRejectedList->Add(gAntiProtonsConstrainChi2Reject);
1812 TH1F *gAntiProtonsITSRefitReject = new TH1F("gAntiProtonsITSRefitReject",
1814 gAntiProtonsITSRefitReject->SetFillColor(kRed-2);
1815 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSRefitReject);
1816 TH1F *gAntiProtonsTPCRefitReject = new TH1F("gAntiProtonsTPCRefitReject",
1818 gAntiProtonsTPCRefitReject->SetFillColor(kRed-2);
1819 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCRefitReject);
1820 TH1F *gAntiProtonsESDpidReject = new TH1F("gAntiProtonsESDpidReject",
1822 gAntiProtonsESDpidReject->SetFillColor(kRed-2);
1823 fQAAntiProtonsRejectedList->Add(gAntiProtonsESDpidReject);
1824 TH1F *gAntiProtonsTPCpidReject = new TH1F("gAntiProtonsTPCpidReject",
1826 gAntiProtonsTPCpidReject->SetFillColor(kRed-2);
1827 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCpidReject);
1828 TH1F *gAntiProtonsPointOnITSLayer1Reject = new TH1F("gAntiProtonsPointOnITSLayer1Reject",
1830 gAntiProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2);
1831 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer1Reject);
1832 TH1F *gAntiProtonsPointOnITSLayer2Reject = new TH1F("gAntiProtonsPointOnITSLayer2Reject",
1834 gAntiProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2);
1835 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer2Reject);
1836 TH1F *gAntiProtonsPointOnITSLayer3Reject = new TH1F("gAntiProtonsPointOnITSLayer3Reject",
1838 gAntiProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2);
1839 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer3Reject);
1840 TH1F *gAntiProtonsPointOnITSLayer4Reject = new TH1F("gAntiProtonsPointOnITSLayer4Reject",
1842 gAntiProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2);
1843 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer4Reject);
1844 TH1F *gAntiProtonsPointOnITSLayer5Reject = new TH1F("gAntiProtonsPointOnITSLayer5Reject",
1846 gAntiProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2);
1847 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer5Reject);
1848 TH1F *gAntiProtonsPointOnITSLayer6Reject = new TH1F("gAntiProtonsPointOnITSLayer6Reject",
1850 gAntiProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2);
1851 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer6Reject);
1852 TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
1853 gAntiProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2);
1854 fQAAntiProtonsRejectedList->Add(gAntiProtonsNumberOfTPCdEdxPointsReject);
1857 //____________________________________________________________________//
1858 void AliProtonAnalysis::FillQA(AliESDEvent *esd,
1859 const AliESDVertex *vertex,
1860 AliESDtrack* track) {
1861 //Fills the QA histograms
1862 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
1863 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
1865 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
1866 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
1868 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
1869 dca[0] = -100.; dca[1] = -100.;
1870 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
1873 gPt = tpcTrack->Pt();
1874 gPx = tpcTrack->Px();
1875 gPy = tpcTrack->Py();
1876 gPz = tpcTrack->Pz();
1877 tpcTrack->PropagateToDCA(vertex,
1878 esd->GetMagneticField(),
1887 track->PropagateToDCA(vertex,
1888 esd->GetMagneticField(),
1893 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
1894 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
1896 Float_t chi2PerClusterITS = -1;
1897 if (nClustersITS!=0)
1898 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
1899 Float_t chi2PerClusterTPC = -1;
1900 if (nClustersTPC!=0)
1901 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
1903 Double_t extCov[15];
1904 track->GetExternalCovariance(extCov);
1907 if(track->Charge() > 0) {
1908 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
1909 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
1910 ((TH1F *)(fQAProtonsRejectedList->At(0)))->Fill(nClustersITS);
1912 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
1913 ((TH1F *)(fQAProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1915 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
1916 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
1917 ((TH1F *)(fQAProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1919 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
1920 ((TH1F *)(fQAProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1921 }//chi2 per ITS cluster
1922 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
1923 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
1924 ((TH1F *)(fQAProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1926 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
1927 ((TH1F *)(fQAProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1930 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
1931 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
1932 ((TH1F *)(fQAProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1934 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
1935 ((TH1F *)(fQAProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1936 }//chi2 per TPC cluster
1937 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
1938 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
1939 ((TH1F *)(fQAProtonsRejectedList->At(4)))->Fill(extCov[0]);
1941 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
1942 ((TH1F *)(fQAProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1944 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
1945 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
1946 ((TH1F *)(fQAProtonsRejectedList->At(5)))->Fill(extCov[2]);
1948 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
1949 ((TH1F *)(fQAProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1951 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
1952 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
1953 ((TH1F *)(fQAProtonsRejectedList->At(6)))->Fill(extCov[5]);
1955 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
1956 ((TH1F *)(fQAProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1958 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
1959 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
1960 ((TH1F *)(fQAProtonsRejectedList->At(7)))->Fill(extCov[9]);
1962 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
1963 ((TH1F *)(fQAProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1965 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
1966 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
1967 ((TH1F *)(fQAProtonsRejectedList->At(8)))->Fill(extCov[14]);
1969 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
1970 ((TH1F *)(fQAProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1972 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
1973 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
1974 ((TH1F *)(fQAProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1976 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
1977 ((TH1F *)(fQAProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1979 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
1980 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
1981 ((TH1F *)(fQAProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1983 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
1984 ((TH1F *)(fQAProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1985 }//sigma to vertex TPC
1986 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
1987 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
1988 ((TH1F *)(fQAProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
1990 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
1991 ((TH1F *)(fQAProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
1992 }//DCA xy global tracking
1993 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
1994 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
1995 ((TH1F *)(fQAProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
1997 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
1998 ((TH1F *)(fQAProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
1999 }//DCA xy TPC tracking
2000 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
2001 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
2002 ((TH1F *)(fQAProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
2004 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
2005 ((TH1F *)(fQAProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
2006 }//DCA z global tracking
2007 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
2008 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
2009 ((TH1F *)(fQAProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
2011 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
2012 ((TH1F *)(fQAProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
2013 }//DCA z TPC tracking
2014 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
2015 if(track->GetConstrainedChi2() > 0) {
2016 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
2017 ((TH1F *)(fQAProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2019 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
2020 ((TH1F *)(fQAProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2022 }//constrain chi2 - vertex
2023 if(fProtonAnalysisBase->IsUsedITSRefit()) {
2024 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
2025 ((TH1F *)(fQAProtonsRejectedList->At(16)))->Fill(0);
2027 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
2028 ((TH1F *)(fQAProtonsAcceptedList->At(16)))->Fill(0);
2030 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
2031 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
2032 ((TH1F *)(fQAProtonsRejectedList->At(17)))->Fill(0);
2034 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
2035 ((TH1F *)(fQAProtonsAcceptedList->At(17)))->Fill(0);
2037 if(fProtonAnalysisBase->IsUsedESDpid()) {
2038 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
2039 ((TH1F *)(fQAProtonsRejectedList->At(18)))->Fill(0);
2041 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
2042 ((TH1F *)(fQAProtonsAcceptedList->At(18)))->Fill(0);
2044 if(fProtonAnalysisBase->IsUsedTPCpid()) {
2045 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
2046 ((TH1F *)(fQAProtonsRejectedList->At(19)))->Fill(0);
2048 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
2049 ((TH1F *)(fQAProtonsAcceptedList->At(19)))->Fill(0);
2051 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
2052 if(!track->HasPointOnITSLayer(0)) {
2053 ((TH1F *)(fQAProtonsRejectedList->At(20)))->Fill(0);
2055 else if(track->HasPointOnITSLayer(0))
2056 ((TH1F *)(fQAProtonsAcceptedList->At(20)))->Fill(0);
2058 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
2059 if(!track->HasPointOnITSLayer(1)) {
2060 ((TH1F *)(fQAProtonsRejectedList->At(21)))->Fill(0);
2062 else if(track->HasPointOnITSLayer(1))
2063 ((TH1F *)(fQAProtonsAcceptedList->At(21)))->Fill(0);
2065 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
2066 if(!track->HasPointOnITSLayer(2)) {
2067 ((TH1F *)(fQAProtonsRejectedList->At(22)))->Fill(0);
2069 else if(track->HasPointOnITSLayer(2))
2070 ((TH1F *)(fQAProtonsAcceptedList->At(22)))->Fill(0);
2072 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
2073 if(!track->HasPointOnITSLayer(3)) {
2074 ((TH1F *)(fQAProtonsRejectedList->At(23)))->Fill(0);
2076 else if(track->HasPointOnITSLayer(3))
2077 ((TH1F *)(fQAProtonsAcceptedList->At(23)))->Fill(0);
2079 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
2080 if(!track->HasPointOnITSLayer(4)) {
2081 ((TH1F *)(fQAProtonsRejectedList->At(24)))->Fill(0);
2083 else if(track->HasPointOnITSLayer(4))
2084 ((TH1F *)(fQAProtonsAcceptedList->At(24)))->Fill(0);
2086 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
2087 if(!track->HasPointOnITSLayer(5)) {
2088 ((TH1F *)(fQAProtonsRejectedList->At(25)))->Fill(0);
2090 else if(track->HasPointOnITSLayer(5))
2091 ((TH1F *)(fQAProtonsAcceptedList->At(25)))->Fill(0);
2093 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
2094 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
2095 ((TH1F *)(fQAProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
2097 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
2098 ((TH1F *)(fQAProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
2099 }//number of TPC points for the dE/dx
2103 if(track->Charge() < 0) {
2104 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
2105 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
2106 ((TH1F *)(fQAAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
2108 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
2109 ((TH1F *)(fQAAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
2111 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
2112 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
2113 ((TH1F *)(fQAAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
2115 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
2116 ((TH1F *)(fQAAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
2117 }//chi2 per ITS cluster
2118 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
2119 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
2120 ((TH1F *)(fQAAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
2122 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
2123 ((TH1F *)(fQAAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
2126 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
2127 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
2128 ((TH1F *)(fQAAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
2130 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
2131 ((TH1F *)(fQAAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
2132 }//chi2 per TPC cluster
2133 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
2134 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
2135 ((TH1F *)(fQAAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
2137 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
2138 ((TH1F *)(fQAAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
2140 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
2141 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
2142 ((TH1F *)(fQAAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
2144 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
2145 ((TH1F *)(fQAAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
2147 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
2148 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
2149 ((TH1F *)(fQAAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
2151 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
2152 ((TH1F *)(fQAAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
2154 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
2155 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
2156 ((TH1F *)(fQAAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
2158 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
2159 ((TH1F *)(fQAAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
2161 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
2162 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
2163 ((TH1F *)(fQAAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
2165 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
2166 ((TH1F *)(fQAAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
2168 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
2169 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
2170 ((TH1F *)(fQAAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2172 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
2173 ((TH1F *)(fQAAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2175 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
2176 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
2177 ((TH1F *)(fQAAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2179 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
2180 ((TH1F *)(fQAAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2181 }//sigma to vertex TPC
2182 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
2183 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
2184 ((TH1F *)(fQAAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
2186 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
2187 ((TH1F *)(fQAAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
2188 }//DCA xy global tracking
2189 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
2190 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
2191 ((TH1F *)(fQAAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
2193 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
2194 ((TH1F *)(fQAAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
2195 }//DCA xy TPC tracking
2196 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
2197 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
2198 ((TH1F *)(fQAAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
2200 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
2201 ((TH1F *)(fQAAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
2202 }//DCA z global tracking
2203 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
2204 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
2205 ((TH1F *)(fQAAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
2207 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
2208 ((TH1F *)(fQAAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
2209 }//DCA z TPC tracking
2210 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
2211 if(track->GetConstrainedChi2() > 0) {
2212 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
2213 ((TH1F *)(fQAAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2215 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
2216 ((TH1F *)(fQAAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2218 }//constrain chi2 - vertex
2219 if(fProtonAnalysisBase->IsUsedITSRefit()) {
2220 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
2221 ((TH1F *)(fQAAntiProtonsRejectedList->At(16)))->Fill(0);
2223 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
2224 ((TH1F *)(fQAAntiProtonsAcceptedList->At(16)))->Fill(0);
2226 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
2227 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
2228 ((TH1F *)(fQAAntiProtonsRejectedList->At(17)))->Fill(0);
2230 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
2231 ((TH1F *)(fQAAntiProtonsAcceptedList->At(17)))->Fill(0);
2233 if(fProtonAnalysisBase->IsUsedESDpid()) {
2234 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
2235 ((TH1F *)(fQAAntiProtonsRejectedList->At(18)))->Fill(0);
2237 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
2238 ((TH1F *)(fQAAntiProtonsAcceptedList->At(18)))->Fill(0);
2240 if(fProtonAnalysisBase->IsUsedTPCpid()) {
2241 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
2242 ((TH1F *)(fQAAntiProtonsRejectedList->At(19)))->Fill(0);
2244 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
2245 ((TH1F *)(fQAAntiProtonsAcceptedList->At(19)))->Fill(0);
2247 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
2248 if(!track->HasPointOnITSLayer(0)) {
2249 ((TH1F *)(fQAAntiProtonsRejectedList->At(20)))->Fill(0);
2251 else if(track->HasPointOnITSLayer(0))
2252 ((TH1F *)(fQAAntiProtonsAcceptedList->At(20)))->Fill(0);
2254 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
2255 if(!track->HasPointOnITSLayer(1)) {
2256 ((TH1F *)(fQAAntiProtonsRejectedList->At(21)))->Fill(0);
2258 else if(track->HasPointOnITSLayer(1))
2259 ((TH1F *)(fQAAntiProtonsAcceptedList->At(21)))->Fill(0);
2261 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
2262 if(!track->HasPointOnITSLayer(2)) {
2263 ((TH1F *)(fQAAntiProtonsRejectedList->At(22)))->Fill(0);
2265 else if(track->HasPointOnITSLayer(2))
2266 ((TH1F *)(fQAAntiProtonsAcceptedList->At(22)))->Fill(0);
2268 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
2269 if(!track->HasPointOnITSLayer(3)) {
2270 ((TH1F *)(fQAAntiProtonsRejectedList->At(23)))->Fill(0);
2272 else if(track->HasPointOnITSLayer(3))
2273 ((TH1F *)(fQAAntiProtonsAcceptedList->At(23)))->Fill(0);
2275 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
2276 if(!track->HasPointOnITSLayer(4)) {
2277 ((TH1F *)(fQAAntiProtonsRejectedList->At(24)))->Fill(0);
2279 else if(track->HasPointOnITSLayer(4))
2280 ((TH1F *)(fQAAntiProtonsAcceptedList->At(24)))->Fill(0);
2282 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
2283 if(!track->HasPointOnITSLayer(5)) {
2284 ((TH1F *)(fQAAntiProtonsRejectedList->At(25)))->Fill(0);
2286 else if(track->HasPointOnITSLayer(5))
2287 ((TH1F *)(fQAAntiProtonsAcceptedList->At(25)))->Fill(0);
2289 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
2290 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
2291 ((TH1F *)(fQAAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
2293 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
2294 ((TH1F *)(fQAAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
2295 }//number of TPC points for the dE/dx