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),
58 fEffGridListProtons(0), fCorrectionListProtons2D(0),
59 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
60 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
61 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
62 fCorrectProtons(0), fCorrectAntiProtons(0),
63 fGlobalQAList(0), fQA2DList(0),
64 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
65 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
70 //____________________________________________________________________//
71 AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY,
72 Float_t fLowY, Float_t fHighY,
74 Float_t fLowPt, Float_t fHighPt) :
75 TObject(), fProtonAnalysisBase(0),
76 fNBinsY(nbinsY), fMinY(fLowY), fMaxY(fHighY),
77 fNBinsPt(nbinsPt), fMinPt(fLowPt), fMaxPt(fHighPt),
78 fProtonContainer(0), fAntiProtonContainer(0),
79 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), fHistEventStats(0),
80 fEffGridListProtons(0), fCorrectionListProtons2D(0),
81 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
82 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
83 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
84 fCorrectProtons(0), fCorrectAntiProtons(0),
85 fGlobalQAList(0), fQA2DList(0),
86 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
87 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
90 if(!fInitQAFlag) InitQA();
92 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
93 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
94 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
96 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
98 fNBinsPt,fMinPt,fMaxPt);
99 fHistYPtProtons->SetStats(kTRUE);
100 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
101 if(fProtonAnalysisBase->GetEtaMode())
102 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
104 fHistYPtProtons->GetXaxis()->SetTitle("y");
105 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
107 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
109 fNBinsPt,fMinPt,fMaxPt);
110 fHistYPtAntiProtons->SetStats(kTRUE);
111 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
112 if(fProtonAnalysisBase->GetEtaMode())
113 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
115 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
116 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
118 //setting up the containers
122 Double_t *binLimY = new Double_t[nbinsY+1];
123 Double_t *binLimPt = new Double_t[nbinsPt+1];
124 //values for bin lower bounds
125 for(Int_t i = 0; i <= nbinsY; i++)
126 binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i;
127 for(Int_t i = 0; i <= nbinsPt; i++)
128 binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i;
130 fProtonContainer = new AliCFContainer("containerProtons",
131 "container for protons",
133 fProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta
134 fProtonContainer->SetBinLimits(1,binLimPt); //pT
135 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
136 "container for antiprotons",
138 fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity or eta
139 fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT
142 //____________________________________________________________________//
143 AliProtonAnalysis::AliProtonAnalysis(Int_t nbinsY, Double_t *gY,
144 Int_t nbinsPt,Double_t *gPt) :
145 TObject(), fProtonAnalysisBase(0),
146 fNBinsY(nbinsY), fMinY(gY[0]), fMaxY(gY[nbinsY]),
147 fNBinsPt(nbinsPt), fMinPt(gPt[0]), fMaxPt(gPt[nbinsPt]),
148 fProtonContainer(0), fAntiProtonContainer(0),
149 fHistEvents(0), fHistYPtProtons(0), fHistYPtAntiProtons(0), fHistEventStats(0),
150 fEffGridListProtons(0), fCorrectionListProtons2D(0),
151 fEfficiencyListProtons1D(0), fCorrectionListProtons1D(0),
152 fEffGridListAntiProtons(0), fCorrectionListAntiProtons2D(0),
153 fEfficiencyListAntiProtons1D(0), fCorrectionListAntiProtons1D(0),
154 fCorrectProtons(0), fCorrectAntiProtons(0),
155 fGlobalQAList(0), fQA2DList(0),
156 fQAProtonsAcceptedList(0), fQAProtonsRejectedList(0),
157 fQAAntiProtonsAcceptedList(0), fQAAntiProtonsRejectedList(0),
158 fInitQAFlag(kFALSE) {
159 //Default constructor
160 if(!fInitQAFlag) InitQA();
162 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
163 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
164 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
166 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
167 fNBinsY,gY,fNBinsPt,gPt);
168 fHistYPtProtons->SetStats(kTRUE);
169 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
170 if(fProtonAnalysisBase->GetEtaMode())
171 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
173 fHistYPtProtons->GetXaxis()->SetTitle("y");
174 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
176 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
177 fNBinsY,gY,fNBinsPt,gPt);
178 fHistYPtAntiProtons->SetStats(kTRUE);
179 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
180 if(fProtonAnalysisBase->GetEtaMode())
181 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
183 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
184 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
186 //setting up the containers
190 fProtonContainer = new AliCFContainer("containerProtons",
191 "container for protons",
193 fProtonContainer->SetBinLimits(0,gY); //rapidity or eta
194 fProtonContainer->SetBinLimits(1,gPt); //pT
195 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
196 "container for antiprotons",
198 fAntiProtonContainer->SetBinLimits(0,gY); //rapidity or eta
199 fAntiProtonContainer->SetBinLimits(1,gPt); //pT
202 //____________________________________________________________________//
203 AliProtonAnalysis::~AliProtonAnalysis() {
205 if(fProtonAnalysisBase) delete fProtonAnalysisBase;
207 if(fHistEvents) delete fHistEvents;
208 if(fHistYPtProtons) delete fHistYPtProtons;
209 if(fHistYPtAntiProtons) delete fHistYPtAntiProtons;
210 if(fHistEventStats) delete fHistEventStats;
211 if(fProtonContainer) delete fProtonContainer;
212 if(fAntiProtonContainer) delete fAntiProtonContainer;
214 if(fEffGridListProtons) delete fEffGridListProtons;
215 if(fCorrectionListProtons2D) delete fCorrectionListProtons2D;
216 if(fEfficiencyListProtons1D) delete fEfficiencyListProtons1D;
217 if(fCorrectionListProtons1D) delete fCorrectionListProtons1D;
218 if(fEffGridListAntiProtons) delete fEffGridListAntiProtons;
219 if(fCorrectionListAntiProtons2D) delete fCorrectionListAntiProtons2D;
220 if(fEfficiencyListAntiProtons1D) delete fEfficiencyListAntiProtons1D;
221 if(fCorrectionListAntiProtons1D) delete fCorrectionListAntiProtons1D;
222 if(fCorrectProtons) delete fCorrectProtons;
223 if(fCorrectAntiProtons) delete fCorrectAntiProtons;
226 if(fGlobalQAList) delete fGlobalQAList;
227 if(fQA2DList) delete fQA2DList;
228 if(fQAProtonsAcceptedList) delete fQAProtonsAcceptedList;
229 if(fQAProtonsRejectedList) delete fQAProtonsRejectedList;
230 if(fQAAntiProtonsAcceptedList) delete fQAAntiProtonsAcceptedList;
231 if(fQAAntiProtonsRejectedList) delete fQAAntiProtonsRejectedList;
234 //____________________________________________________________________//
235 void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY,
236 Float_t fLowY, Float_t fHighY,
238 Float_t fLowPt, Float_t fHighPt) {
239 //Initializes the histograms
240 if(!fInitQAFlag) InitQA();
248 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
249 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
250 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
252 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
254 fNBinsPt,fMinPt,fMaxPt);
255 fHistYPtProtons->SetStats(kTRUE);
256 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
257 if(fProtonAnalysisBase->GetEtaMode())
258 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
260 fHistYPtProtons->GetXaxis()->SetTitle("y");
261 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
263 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
265 fNBinsPt,fMinPt,fMaxPt);
266 fHistYPtAntiProtons->SetStats(kTRUE);
267 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
268 if(fProtonAnalysisBase->GetEtaMode())
269 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
271 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
272 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
274 //setting up the containers
278 Double_t *binLimY = new Double_t[nbinsY+1];
279 Double_t *binLimPt = new Double_t[nbinsPt+1];
280 //values for bin lower bounds
281 for(Int_t i = 0; i <= nbinsY; i++)
282 binLimY[i]=(Double_t)fLowY + (fHighY - fLowY) /nbinsY*(Double_t)i;
283 for(Int_t i = 0; i <= nbinsPt; i++)
284 binLimPt[i]=(Double_t)fLowPt + (fHighPt - fLowPt) /nbinsPt*(Double_t)i;
286 fProtonContainer = new AliCFContainer("containerProtons",
287 "container for protons",
289 fProtonContainer->SetBinLimits(0,binLimY); //rapidity
290 fProtonContainer->SetBinLimits(1,binLimPt); //pT
291 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
292 "container for antiprotons",
294 fAntiProtonContainer->SetBinLimits(0,binLimY); //rapidity
295 fAntiProtonContainer->SetBinLimits(1,binLimPt); //pT
298 //____________________________________________________________________//
299 void AliProtonAnalysis::InitAnalysisHistograms(Int_t nbinsY, Double_t *gY,
300 Int_t nbinsPt, Double_t *gPt) {
301 //Initializes the histograms using asymmetric values - global tracking
302 if(!fInitQAFlag) InitQA();
308 fMaxPt = gPt[nbinsPt];
310 fHistEvents = new TH1I("fHistEvents","Analyzed events",2,0.5,2.5);
311 fHistEvents->GetXaxis()->SetBinLabel(1,"Analyzed events");
312 fHistEvents->GetXaxis()->SetBinLabel(2,"Events with (anti)protons");
314 fHistYPtProtons = new TH2D("fHistYPtProtons","Protons",
315 fNBinsY,gY,fNBinsPt,gPt);
316 fHistYPtProtons->SetStats(kTRUE);
317 fHistYPtProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
318 if(fProtonAnalysisBase->GetEtaMode())
319 fHistYPtProtons->GetXaxis()->SetTitle("#eta");
321 fHistYPtProtons->GetXaxis()->SetTitle("y");
322 fHistYPtProtons->GetXaxis()->SetTitleColor(1);
324 fHistYPtAntiProtons = new TH2D("fHistYPtAntiProtons","Antiprotons",
325 fNBinsY,gY,fNBinsPt,gPt);
326 fHistYPtAntiProtons->SetStats(kTRUE);
327 fHistYPtAntiProtons->GetYaxis()->SetTitle("P_{T} [GeV/c]");
328 if(fProtonAnalysisBase->GetEtaMode())
329 fHistYPtAntiProtons->GetXaxis()->SetTitle("#eta");
331 fHistYPtAntiProtons->GetXaxis()->SetTitle("y");
332 fHistYPtAntiProtons->GetXaxis()->SetTitleColor(1);
334 //setting up the containers
339 fProtonContainer = new AliCFContainer("containerProtons",
340 "container for protons",
342 fProtonContainer->SetBinLimits(0,gY); //rapidity
343 fProtonContainer->SetBinLimits(1,gPt); //pT
344 fAntiProtonContainer = new AliCFContainer("containerAntiProtons",
345 "container for antiprotons",
347 fAntiProtonContainer->SetBinLimits(0,gY); //rapidity
348 fAntiProtonContainer->SetBinLimits(1,gPt); //pT
351 //____________________________________________________________________//
352 Bool_t AliProtonAnalysis::ReadFromFile(const char* filename) {
353 //Read the containers from the existing file
354 Bool_t status = kTRUE;
356 TFile *file = TFile::Open(filename);
358 cout<<"Could not find the input file "<<filename<<endl;
362 TList *list = (TList *)file->Get("outputList");
364 cout<<"Retrieving objects from the list "<<list->GetName()<<"..."<<endl;
365 fHistYPtProtons = (TH2D *)list->At(0);
366 fHistYPtAntiProtons = (TH2D *)list->At(1);
367 fHistEvents = (TH1I *)list->At(2);
368 fProtonContainer = (AliCFContainer *)list->At(3);
369 fAntiProtonContainer = (AliCFContainer *)list->At(4);
370 fHistEventStats = (TH1F *)list->At(5);
373 cout<<"Retrieving objects from the file... "<<endl;
374 fHistYPtProtons = (TH2D *)file->Get("fHistYPtProtons");
375 fHistYPtAntiProtons = (TH2D *)file->Get("fHistYPtAntiProtons");
376 fHistEvents = (TH1I *)file->Get("fHistEvents");
377 fProtonContainer = (AliCFContainer *)file->Get("containerProtons");
378 fAntiProtonContainer = (AliCFContainer *)file->Get("containerAntiProtons");
379 fHistEventStats = (TH1F *)file->Get("fHistEventStats");
381 if((!fHistYPtProtons)||(!fHistYPtAntiProtons)||(!fHistEvents)
382 ||(!fProtonContainer)||(!fAntiProtonContainer)||(!fHistEventStats)) {
383 cout<<"Input containers were not found!!!"<<endl;
387 //fHistYPtProtons = fProtonContainer->ShowProjection(0,1,0);
388 //fHistYPtAntiProtons = fAntiProtonContainer->ShowProjection(0,1,0);
389 fHistYPtProtons->Sumw2();
390 fHistYPtAntiProtons->Sumw2();
396 //____________________________________________________________________//
397 TH1D *AliProtonAnalysis::GetProtonYHistogram() {
398 //Get the y histogram for protons
399 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
401 //TH1D *fYProtons = (TH1D *)fHistYPtProtons->ProjectionX("fYProtons",0,fHistYPtProtons->GetYaxis()->GetNbins(),"");
402 TH1D *fYProtons = fProtonContainer->ShowProjection(0,2); //variable-step
404 fYProtons->SetStats(kFALSE);
405 fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
406 fYProtons->SetTitle("dN/dy protons");
407 fYProtons->SetMarkerStyle(kFullCircle);
408 fYProtons->SetMarkerColor(4);
409 if(nAnalyzedEvents > 0)
410 fYProtons->Scale(1./nAnalyzedEvents);
415 //____________________________________________________________________//
416 TH1D *AliProtonAnalysis::GetAntiProtonYHistogram() {
417 //Get the y histogram for antiprotons
418 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
420 //TH1D *fYAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionX("fYAntiProtons",0,fHistYPtAntiProtons->GetYaxis()->GetNbins(),"");
421 TH1D *fYAntiProtons = fAntiProtonContainer->ShowProjection(0,2);//variable-step
423 fYAntiProtons->SetStats(kFALSE);
424 fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
425 fYAntiProtons->SetTitle("dN/dy antiprotons");
426 fYAntiProtons->SetMarkerStyle(kFullCircle);
427 fYAntiProtons->SetMarkerColor(4);
428 if(nAnalyzedEvents > 0)
429 fYAntiProtons->Scale(1./nAnalyzedEvents);
431 return fYAntiProtons;
434 //____________________________________________________________________//
435 TH1D *AliProtonAnalysis::GetProtonPtHistogram() {
436 //Get the Pt histogram for protons
437 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
439 //TH1D *fPtProtons = (TH1D *)fHistYPtProtons->ProjectionY("fPtProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"");
440 TH1D *fPtProtons = fProtonContainer->ShowProjection(1,2); //variable-step
442 fPtProtons->SetStats(kFALSE);
443 fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
444 fPtProtons->SetTitle("dN/dPt protons");
445 fPtProtons->SetMarkerStyle(kFullCircle);
446 fPtProtons->SetMarkerColor(4);
447 if(nAnalyzedEvents > 0)
448 fPtProtons->Scale(1./nAnalyzedEvents);
453 //____________________________________________________________________//
454 TH1D *AliProtonAnalysis::GetAntiProtonPtHistogram() {
455 //Get the Pt histogram for antiprotons
456 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
458 //TH1D *fPtAntiProtons = (TH1D *)fHistYPtAntiProtons->ProjectionY("fPtAntiProtons",0,fHistYPtProtons->GetXaxis()->GetNbins(),"");
459 TH1D *fPtAntiProtons = fAntiProtonContainer->ShowProjection(1,2); //variable-step
461 fPtAntiProtons->SetStats(kFALSE);
462 fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
463 fPtAntiProtons->SetTitle("dN/dPt antiprotons");
464 fPtAntiProtons->SetMarkerStyle(kFullCircle);
465 fPtAntiProtons->SetMarkerColor(4);
466 if(nAnalyzedEvents > 0)
467 fPtAntiProtons->Scale(1./nAnalyzedEvents);
469 return fPtAntiProtons;
472 //____________________________________________________________________//
473 TH1D *AliProtonAnalysis::GetProtonCorrectedYHistogram() {
474 //Get the corrected y histogram for protons
475 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
477 TH1D *fYProtons = fCorrectProtons->Project(0); //0: rapidity
479 fYProtons->SetStats(kFALSE);
480 fYProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
481 fYProtons->GetXaxis()->SetTitle("y");
482 fYProtons->SetTitle("dN/dy protons");
483 fYProtons->SetMarkerStyle(kFullCircle);
484 fYProtons->SetMarkerColor(4);
485 if(nAnalyzedEvents > 0)
486 fYProtons->Scale(1./nAnalyzedEvents);
491 //____________________________________________________________________//
492 TH1D *AliProtonAnalysis::GetAntiProtonCorrectedYHistogram() {
493 //Get the corrected y histogram for antiprotons
494 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
496 TH1D *fYAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity
498 fYAntiProtons->SetStats(kFALSE);
499 fYAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dy)");
500 fYAntiProtons->GetXaxis()->SetTitle("y");
501 fYAntiProtons->SetTitle("dN/dy protons");
502 fYAntiProtons->SetMarkerStyle(kFullCircle);
503 fYAntiProtons->SetMarkerColor(4);
504 if(nAnalyzedEvents > 0)
505 fYAntiProtons->Scale(1./nAnalyzedEvents);
507 return fYAntiProtons;
510 //____________________________________________________________________//
511 TH1D *AliProtonAnalysis::GetProtonCorrectedPtHistogram() {
512 //Get the corrected Pt histogram for protons
513 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
515 TH1D *fPtProtons = fCorrectProtons->Project(0); //0: rapidity
517 fPtProtons->SetStats(kFALSE);
518 fPtProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
519 fPtProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]");
520 fPtProtons->SetTitle("dN/dPt protons");
521 fPtProtons->SetMarkerStyle(kFullCircle);
522 fPtProtons->SetMarkerColor(4);
523 if(nAnalyzedEvents > 0)
524 fPtProtons->Scale(1./nAnalyzedEvents);
529 //____________________________________________________________________//
530 TH1D *AliProtonAnalysis::GetAntiProtonCorrectedPtHistogram() {
531 //Get the corrected Pt histogram for antiprotons
532 Int_t nAnalyzedEvents = GetNumberOfAnalyzedEvents();
534 TH1D *fPtAntiProtons = fCorrectAntiProtons->Project(0); //0: rapidity
536 fPtAntiProtons->SetStats(kFALSE);
537 fPtAntiProtons->GetYaxis()->SetTitle("(1/N_{events})(dN/dP_{T})");
538 fPtAntiProtons->GetXaxis()->SetTitle("P_{T} [GeV/c]");
539 fPtAntiProtons->SetTitle("dN/dPt antiprotons");
540 fPtAntiProtons->SetMarkerStyle(kFullCircle);
541 fPtAntiProtons->SetMarkerColor(4);
542 if(nAnalyzedEvents > 0)
543 fPtAntiProtons->Scale(1./nAnalyzedEvents);
545 return fPtAntiProtons;
548 //____________________________________________________________________//
549 TH1D *AliProtonAnalysis::GetYRatioHistogram() {
550 //Returns the rapidity dependence of the ratio (uncorrected)
551 TH1D *fYProtons = GetProtonYHistogram();
552 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
554 TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
555 hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0);
556 hRatioY->SetMarkerStyle(kFullCircle);
557 hRatioY->SetMarkerColor(4);
558 hRatioY->GetYaxis()->SetTitle("#bar{p}/p");
559 hRatioY->GetYaxis()->SetTitleOffset(1.4);
560 hRatioY->GetXaxis()->SetTitle("y");
561 hRatioY->GetXaxis()->SetTitleColor(1);
562 hRatioY->SetStats(kFALSE);
567 //____________________________________________________________________//
568 TH1D *AliProtonAnalysis::GetYRatioCorrectedHistogram(TH2D *gCorrectionProtons,
569 TH2D *gCorrectionAntiProtons) {
570 //Returns the rapidity dependence of the ratio (corrected)
571 fHistYPtProtons->Multiply(gCorrectionProtons);
572 TH1D *fYProtons = GetProtonYHistogram();
573 fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons);
574 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
576 TH1D *hRatioY = new TH1D("hRatioY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
577 hRatioY->Divide(fYAntiProtons,fYProtons,1.0,1.0);
578 hRatioY->SetMarkerStyle(kFullCircle);
579 hRatioY->SetMarkerColor(4);
580 hRatioY->GetYaxis()->SetTitle("#bar{p}/p");
581 hRatioY->GetYaxis()->SetTitleOffset(1.4);
582 hRatioY->GetXaxis()->SetTitle("y");
583 hRatioY->GetXaxis()->SetTitleColor(1);
584 hRatioY->SetStats(kFALSE);
589 //____________________________________________________________________//
590 TH1D *AliProtonAnalysis::GetPtRatioHistogram() {
591 //Returns the pT dependence of the ratio (uncorrected)
592 TH1D *fPtProtons = GetProtonPtHistogram();
593 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
595 TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
596 hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0);
597 hRatioPt->SetMarkerStyle(kFullCircle);
598 hRatioPt->SetMarkerColor(4);
599 hRatioPt->GetYaxis()->SetTitle("#bar{p}/p");
600 hRatioPt->GetYaxis()->SetTitleOffset(1.4);
601 hRatioPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
602 hRatioPt->GetXaxis()->SetTitleColor(1);
603 hRatioPt->SetStats(kFALSE);
608 //____________________________________________________________________//
609 TH1D *AliProtonAnalysis::GetPtRatioCorrectedHistogram(TH2D *gCorrectionProtons,
610 TH2D *gCorrectionAntiProtons) {
611 //Returns the Pt dependence of the ratio (corrected)
612 fHistYPtProtons->Multiply(gCorrectionProtons);
613 TH1D *fPtProtons = GetProtonPtHistogram();
614 fHistYPtAntiProtons->Multiply(gCorrectionAntiProtons);
615 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
617 TH1D *hRatioPt = new TH1D("hRatioPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
618 hRatioPt->Divide(fPtAntiProtons,fPtProtons,1.0,1.0);
619 hRatioPt->SetMarkerStyle(kFullCircle);
620 hRatioPt->SetMarkerColor(4);
621 hRatioPt->GetYaxis()->SetTitle("#bar{p}/p");
622 hRatioPt->GetYaxis()->SetTitleOffset(1.4);
623 hRatioPt->GetXaxis()->SetTitle("y");
624 hRatioPt->GetXaxis()->SetTitleColor(1);
625 hRatioPt->SetStats(kFALSE);
630 //____________________________________________________________________//
631 TH1D *AliProtonAnalysis::GetYAsymmetryHistogram() {
632 //Returns the rapidity dependence of the asymmetry (uncorrected)
633 TH1D *fYProtons = GetProtonYHistogram();
634 TH1D *fYAntiProtons = GetAntiProtonYHistogram();
636 TH1D *hsum = new TH1D("hsumY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
637 hsum->Add(fYProtons,fYAntiProtons,1.0,1.0);
639 TH1D *hdiff = new TH1D("hdiffY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
640 hdiff->Add(fYProtons,fYAntiProtons,1.0,-1.0);
642 TH1D *hAsymmetryY = new TH1D("hAsymmetryY","",fYProtons->GetNbinsX(),fYProtons->GetXaxis()->GetXmin(),fYProtons->GetXaxis()->GetXmax());
643 hAsymmetryY->Divide(hdiff,hsum,2.0,1.);
644 hAsymmetryY->SetMarkerStyle(kFullCircle);
645 hAsymmetryY->SetMarkerColor(4);
646 hAsymmetryY->GetYaxis()->SetTitle("A_{p}");
647 hAsymmetryY->GetYaxis()->SetTitleOffset(1.4);
648 hAsymmetryY->GetXaxis()->SetTitle("y");
649 hAsymmetryY->GetXaxis()->SetTitleColor(1);
650 hAsymmetryY->SetStats(kFALSE);
655 //____________________________________________________________________//
656 TH1D *AliProtonAnalysis::GetPtAsymmetryHistogram() {
657 //Returns the pT dependence of the asymmetry (uncorrected)
658 TH1D *fPtProtons = GetProtonPtHistogram();
659 TH1D *fPtAntiProtons = GetAntiProtonPtHistogram();
661 TH1D *hsum = new TH1D("hsumPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
662 hsum->Add(fPtProtons,fPtAntiProtons,1.0,1.0);
664 TH1D *hdiff = new TH1D("hdiffPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
665 hdiff->Add(fPtProtons,fPtAntiProtons,1.0,-1.0);
667 TH1D *hAsymmetryPt = new TH1D("hAsymmetryPt","",fPtProtons->GetNbinsX(),fPtProtons->GetXaxis()->GetXmin(),fPtProtons->GetXaxis()->GetXmax());
668 hAsymmetryPt->Divide(hdiff,hsum,2.0,1.);
669 hAsymmetryPt->SetMarkerStyle(kFullCircle);
670 hAsymmetryPt->SetMarkerColor(4);
671 hAsymmetryPt->GetYaxis()->SetTitle("A_{p}");
672 hAsymmetryPt->GetYaxis()->SetTitleOffset(1.4);
673 hAsymmetryPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
674 hAsymmetryPt->GetXaxis()->SetTitleColor(1);
675 hAsymmetryPt->SetStats(kFALSE);
680 //____________________________________________________________________//
681 void AliProtonAnalysis::Analyze(AliESDEvent* esd,
682 const AliESDVertex *vertex) {
683 //Main analysis part - ESD
685 Int_t nIdentifiedProtons = 0, nIdentifiedAntiProtons = 0;
686 Int_t nSurvivedProtons = 0, nSurvivedAntiProtons = 0;
688 fHistEvents->Fill(1); //number of analyzed events
689 Double_t containerInput[2] ;
690 Double_t gPt = 0.0, gP = 0.0;
691 nTracks = esd->GetNumberOfTracks();
692 for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
693 AliESDtrack* track = esd->GetTrack(iTracks);
694 AliESDtrack trackTPC;
696 //in case it's a TPC only track relate it to the proper vertex
697 /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC) {
699 track->GetImpactParametersTPC(p,cov);
700 if (p[0]==0 && p[1]==0)
701 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
702 if (!track->FillTPCOnlyTrack(trackTPC)) {
709 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
710 Int_t npointsTPCdEdx = track->GetTPCsignalN();
712 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
713 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
714 if(!tpcTrack) continue;
715 gPt = tpcTrack->Pt();
718 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
719 ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal());
720 ((TH3F *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),
721 tpcTrack->Phi()*180./TMath::Pi(),
723 ((TH3F *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),
724 tpcTrack->Phi()*180./TMath::Pi(),
726 ((TH3F *)(fQA2DList->At(6)))->Fill(gPt,
727 tpcTrack->Phi()*180./TMath::Pi(),
729 ((TH3F *)(fQA2DList->At(8)))->Fill(gPt,
730 tpcTrack->Phi()*180./TMath::Pi(),
733 if(fProtonAnalysisBase->IsProton(track)) {
734 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
735 ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal());
736 ((TH3F *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),
737 tpcTrack->Phi()*180./TMath::Pi(),
739 ((TH3F *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),
740 tpcTrack->Phi()*180./TMath::Pi(),
742 ((TH3F *)(fQA2DList->At(7)))->Fill(gPt,
743 tpcTrack->Phi()*180./TMath::Pi(),
745 ((TH3F *)(fQA2DList->At(9)))->Fill(gPt,
746 tpcTrack->Phi()*180./TMath::Pi(),
749 FillQA(esd,vertex,track);
750 if(tpcTrack->Charge() > 0) {
751 nIdentifiedProtons += 1;
752 if(fProtonAnalysisBase->GetEtaMode())
753 containerInput[0] = tpcTrack->Eta();
755 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
758 containerInput[1] = gPt;
759 fProtonContainer->Fill(containerInput,0);
761 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
762 if(fProtonAnalysisBase->GetEtaMode())
763 containerInput[0] = tpcTrack->Eta();
765 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
768 containerInput[1] = gPt;
769 fProtonContainer->Fill(containerInput,1);
771 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
772 nSurvivedProtons += 1;
773 if(fProtonAnalysisBase->GetEtaMode()) {
774 fHistYPtProtons->Fill(tpcTrack->Eta(),
776 containerInput[0] = tpcTrack->Eta();
779 fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
784 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
788 containerInput[1] = gPt;
789 fProtonContainer->Fill(containerInput,2);
791 else if(tpcTrack->Charge() < 0) {
792 nIdentifiedAntiProtons += 1;
793 if(fProtonAnalysisBase->GetEtaMode())
794 containerInput[0] = tpcTrack->Eta();
796 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
799 containerInput[1] = gPt;
800 fAntiProtonContainer->Fill(containerInput,0);
802 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
803 if(fProtonAnalysisBase->GetEtaMode())
804 containerInput[0] = tpcTrack->Eta();
806 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
809 containerInput[1] = gPt;
810 fAntiProtonContainer->Fill(containerInput,1);
812 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
813 nSurvivedAntiProtons += 1;
814 if(fProtonAnalysisBase->GetEtaMode()) {
815 fHistYPtAntiProtons->Fill(tpcTrack->Eta(),
817 containerInput[0] = tpcTrack->Eta();
820 fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
825 containerInput[0] = fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
829 containerInput[1] = gPt;
830 fAntiProtonContainer->Fill(containerInput,2);
834 else if(fProtonAnalysisBase->GetAnalysisMode() == AliProtonAnalysisBase::kGlobal) {
838 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
839 ((TH2F *)(fQA2DList->At(0)))->Fill(gP,track->GetTPCsignal());
840 ((TH3F *)(fQA2DList->At(2)))->Fill(track->Eta(),
841 track->Phi()*180./TMath::Pi(),
843 ((TH3F *)(fQA2DList->At(4)))->Fill(track->Eta(),
844 track->Phi()*180./TMath::Pi(),
846 ((TH3F *)(fQA2DList->At(6)))->Fill(gPt,
847 track->Phi()*180./TMath::Pi(),
849 ((TH3F *)(fQA2DList->At(8)))->Fill(gPt,
850 track->Phi()*180./TMath::Pi(),
853 if(fProtonAnalysisBase->IsProton(track)) {
854 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
855 ((TH2F *)(fQA2DList->At(1)))->Fill(gP,track->GetTPCsignal());
856 ((TH3F *)(fQA2DList->At(3)))->Fill(track->Eta(),
857 track->Phi()*180./TMath::Pi(),
859 ((TH3F *)(fQA2DList->At(5)))->Fill(track->Eta(),
860 track->Phi()*180./TMath::Pi(),
862 ((TH3F *)(fQA2DList->At(7)))->Fill(gPt,
863 track->Phi()*180./TMath::Pi(),
865 ((TH3F *)(fQA2DList->At(9)))->Fill(gPt,
866 track->Phi()*180./TMath::Pi(),
869 FillQA(esd,vertex,track);
870 if(track->Charge() > 0) {
871 nIdentifiedProtons += 1;
872 if(fProtonAnalysisBase->GetEtaMode())
873 containerInput[0] = track->Eta();
875 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
878 containerInput[1] = gPt;
879 fProtonContainer->Fill(containerInput,0);
881 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
882 if(fProtonAnalysisBase->GetEtaMode())
883 containerInput[0] = track->Eta();
885 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
888 containerInput[1] = gPt;
889 fProtonContainer->Fill(containerInput,1);
891 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
892 nSurvivedProtons += 1;
893 if(fProtonAnalysisBase->GetEtaMode()) {
894 fHistYPtProtons->Fill(track->Eta(),
896 containerInput[0] = track->Eta();
899 fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
904 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
908 containerInput[1] = gPt;
909 fProtonContainer->Fill(containerInput,2);
911 else if(track->Charge() < 0) {
912 nIdentifiedAntiProtons += 1;
913 if(fProtonAnalysisBase->GetEtaMode())
914 containerInput[0] = track->Eta();
916 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
919 containerInput[1] = gPt;
920 fAntiProtonContainer->Fill(containerInput,0);
922 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;//track cuts
923 if(fProtonAnalysisBase->GetEtaMode())
924 containerInput[0] = track->Eta();
926 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
929 containerInput[1] = gPt;
930 fAntiProtonContainer->Fill(containerInput,1);
932 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
933 nSurvivedAntiProtons += 1;
934 if(fProtonAnalysisBase->GetEtaMode()) {
935 fHistYPtAntiProtons->Fill(track->Eta(),
937 containerInput[0] = track->Eta();
940 fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
945 containerInput[0] = fProtonAnalysisBase->Rapidity(track->Px(),
949 containerInput[1] = gPt;
950 fAntiProtonContainer->Fill(containerInput,2);
956 if((nIdentifiedProtons > 0)||(nIdentifiedAntiProtons > 0))
957 fHistEvents->Fill(2); //number of analyzed events with at least one (anti)proton
959 if(fProtonAnalysisBase->GetDebugMode())
960 Printf("Initial number of tracks: %d | Identified (anti)protons: %d - %d | Survived (anti)protons: %d - %d",nTracks,nIdentifiedProtons,nIdentifiedAntiProtons,nSurvivedProtons,nSurvivedAntiProtons);
963 //____________________________________________________________________//
964 void AliProtonAnalysis::Analyze(AliAODEvent* const fAOD) {
965 //Main analysis part - AOD
966 fHistEvents->Fill(1); //number of analyzed events
967 Int_t nTracks = fAOD->GetNumberOfTracks();
968 for(Int_t iTracks = 0; iTracks < nTracks; iTracks++) {
969 AliAODTrack* track = fAOD->GetTrack(iTracks);
970 Double_t gPt = track->Pt();
971 Double_t gP = track->P();
974 Double_t probability[10];
975 track->GetPID(probability);
977 for(Int_t i = 0; i < AliPID::kSPECIESN; i++) rcc += probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP);
978 if(rcc == 0.0) continue;
980 for(Int_t i = 0; i < AliPID::kSPECIESN; i++) w[i] = probability[i]*fProtonAnalysisBase->GetParticleFraction(i,gP)/rcc;
981 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIESN,w);
982 if(fParticleType == 4) {
983 if(track->Charge() > 0)
984 fHistYPtProtons->Fill(track->Y(fParticleType),gPt);
985 else if(track->Charge() < 0)
986 fHistYPtAntiProtons->Fill(track->Y(fParticleType),gPt);
991 //____________________________________________________________________//
992 void AliProtonAnalysis::Analyze(AliStack* const stack,
994 //Main analysis part - MC
995 fHistEvents->Fill(1); //number of analyzed events
997 Int_t nParticles = 0;
998 //inclusive protons -
999 if(iInclusive) nParticles = stack->GetNtrack();
1000 else nParticles = stack->GetNprimary();
1002 for(Int_t i = 0; i < nParticles; i++) {
1003 TParticle *particle = stack->Particle(i);
1004 if(!particle) continue;
1006 //in case of inclusive protons reject the secondaries from hadronic inter.
1007 if(particle->GetUniqueID() == 13) continue;
1009 if(TMath::Abs(particle->Eta()) > 1.0) continue;
1010 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
1011 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
1013 Int_t pdgcode = particle->GetPdgCode();
1014 if(pdgcode == 2212) fHistYPtProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
1018 if(pdgcode == -2212) fHistYPtAntiProtons->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
1025 //____________________________________________________________________//
1026 Bool_t AliProtonAnalysis::PrintMean(TH1 *hist, Double_t edge) {
1027 //calculates the mean value of the ratio/asymmetry within \pm edge
1030 //calculate the mean
1031 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1032 Double_t x = hist->GetBinCenter(i+1);
1033 Double_t y = hist->GetBinContent(i+1);
1034 if(TMath::Abs(x) < edge) {
1039 Double_t mean = 0.0;
1041 mean = sum/nentries;
1043 //calculate the error
1044 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1045 Double_t x = hist->GetBinCenter(i+1);
1046 Double_t y = hist->GetBinContent(i+1);
1047 if(TMath::Abs(x) < edge) {
1048 sum += TMath::Power((mean - y),2);
1053 Double_t error = 0.0;
1055 error = TMath::Sqrt(sum)/nentries;
1057 cout<<"========================================="<<endl;
1058 cout<<"Input distribution: "<<hist->GetName()<<endl;
1059 cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl;
1060 cout<<"Mean value :"<<mean<<endl;
1061 cout<<"Error: "<<error<<endl;
1062 cout<<"========================================="<<endl;
1067 //____________________________________________________________________//
1068 Bool_t AliProtonAnalysis::PrintYields(TH1 *hist, Double_t edge) {
1069 //calculates the (anti)proton yields within the \pm edge
1070 Double_t sum = 0.0, sumerror = 0.0;
1071 Double_t error = 0.0;
1072 for(Int_t i = 0; i < hist->GetXaxis()->GetNbins(); i++) {
1073 Double_t x = hist->GetBinCenter(i+1);
1074 Double_t y = hist->GetBinContent(i+1);
1075 if(TMath::Abs(x) < edge) {
1077 sumerror += TMath::Power(hist->GetBinError(i+1),2);
1081 error = TMath::Sqrt(sumerror);
1083 cout<<"========================================="<<endl;
1084 cout<<"Input distribution: "<<hist->GetName()<<endl;
1085 cout<<"Interval used: -"<<edge<<" -> "<<edge<<endl;
1086 cout<<"Yields :"<<sum<<endl;
1087 cout<<"Error: "<<error<<endl;
1088 cout<<"========================================="<<endl;
1093 //____________________________________________________________________//
1094 void AliProtonAnalysis::Correct(Int_t step) {
1095 //Applies the correction maps to the initial containers
1096 fCorrectProtons = new AliCFDataGrid("correctProtons",
1099 fCorrectProtons->SetMeasured(0);
1100 fCorrectProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListProtons->At(step));
1102 fCorrectAntiProtons = new AliCFDataGrid("correctAntiProtons",
1104 *fAntiProtonContainer);
1105 fCorrectAntiProtons->SetMeasured(0);
1106 fCorrectAntiProtons->ApplyEffCorrection(*(AliCFEffGrid *)fEffGridListAntiProtons->At(step));
1109 //____________________________________________________________________//
1110 Bool_t AliProtonAnalysis::ReadCorrectionContainer(const char* filename) {
1111 // Reads the outout of the correction framework task
1112 // Creates the correction maps
1113 // Puts the results in the different TList objects
1114 Bool_t status = kTRUE;
1116 TFile *file = TFile::Open(filename);
1118 cout<<"Could not find the input CORRFW file "<<filename<<endl;
1122 //________________________________________//
1124 fEffGridListProtons = new TList();
1125 fCorrectionListProtons2D = new TList();
1126 fEfficiencyListProtons1D = new TList();
1127 fCorrectionListProtons1D = new TList();
1129 AliCFContainer *corrfwContainerProtons = (AliCFContainer*) (file->Get("containerProtons"));
1130 if(!corrfwContainerProtons) {
1131 cout<<"CORRFW container for protons not found!"<<endl;
1135 Int_t nSteps = corrfwContainerProtons->GetNStep();
1137 //currently the GRID is formed by the y-pT parameters
1138 //Add Vz as a next step
1139 Int_t iRap = 0, iPt = 1;
1140 AliCFEffGrid *effProtonsStep0Step1 = new AliCFEffGrid("eff10",
1141 "effProtonsStep0Step1",
1142 *corrfwContainerProtons);
1143 effProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0
1144 fEffGridListProtons->Add(effProtonsStep0Step1);
1145 gYPt[0] = effProtonsStep0Step1->Project(iRap,iPt);
1146 fCorrectionListProtons2D->Add(gYPt[0]);
1148 AliCFEffGrid *effProtonsStep0Step2 = new AliCFEffGrid("eff20",
1149 "effProtonsStep0Step2",
1150 *corrfwContainerProtons);
1151 effProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0
1152 fEffGridListProtons->Add(effProtonsStep0Step2);
1153 gYPt[1] = effProtonsStep0Step2->Project(iRap,iPt);
1154 fCorrectionListProtons2D->Add(gYPt[1]);
1156 AliCFEffGrid *effProtonsStep0Step3 = new AliCFEffGrid("eff30",
1157 "effProtonsStep0Step3",
1158 *corrfwContainerProtons);
1159 effProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0
1160 fEffGridListProtons->Add(effProtonsStep0Step3);
1161 gYPt[2] = effProtonsStep0Step3->Project(iRap,iPt);
1162 fCorrectionListProtons2D->Add(gYPt[2]);
1164 TH1D *gEfficiency[2][3]; //efficiency as a function of pT and of y (raws-[2])
1165 TH1D *gCorrection[2][3]; //efficiency as a function of pT and of y (raws-[2])
1167 //Get the projection of the efficiency maps
1168 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1169 gEfficiency[iParameter][0] = effProtonsStep0Step1->Project(iParameter);
1170 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1171 gTitle += "_Step0_Step1";
1172 gEfficiency[iParameter][0]->SetName(gTitle.Data());
1173 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][0]);
1174 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1175 gTitle += "_Step0_Step1";
1176 gCorrection[iParameter][0] = new TH1D(gTitle.Data(),
1178 gEfficiency[iParameter][0]->GetNbinsX(),
1179 gEfficiency[iParameter][0]->GetXaxis()->GetXmin(),
1180 gEfficiency[iParameter][0]->GetXaxis()->GetXmax());
1181 //initialisation of the correction
1182 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++)
1183 gCorrection[iParameter][0]->SetBinContent(iBin,1.0);
1185 gEfficiency[iParameter][1] = effProtonsStep0Step2->Project(iParameter);
1186 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1187 gTitle += "_Step0_Step2";
1188 gEfficiency[iParameter][1]->SetName(gTitle.Data());
1189 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][1]);
1190 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1191 gTitle += "_Step0_Step2";
1192 gCorrection[iParameter][1] = new TH1D(gTitle.Data(),
1194 gEfficiency[iParameter][1]->GetNbinsX(),
1195 gEfficiency[iParameter][1]->GetXaxis()->GetXmin(),
1196 gEfficiency[iParameter][1]->GetXaxis()->GetXmax());
1197 //initialisation of the correction
1198 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++)
1199 gCorrection[iParameter][1]->SetBinContent(iBin,1.0);
1201 gEfficiency[iParameter][2] = effProtonsStep0Step3->Project(iParameter);
1202 gTitle = "ProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1203 gTitle += "_Step0_Step3";
1204 gEfficiency[iParameter][2]->SetName(gTitle.Data());
1205 fEfficiencyListProtons1D->Add(gEfficiency[iParameter][2]);
1206 gTitle = "ProtonsCorrection_Parameter"; gTitle += iParameter+1;
1207 gTitle += "_Step0_Step3";
1208 gCorrection[iParameter][2] = new TH1D(gTitle.Data(),
1210 gEfficiency[iParameter][2]->GetNbinsX(),
1211 gEfficiency[iParameter][2]->GetXaxis()->GetXmin(),
1212 gEfficiency[iParameter][2]->GetXaxis()->GetXmax());
1213 //initialisation of the correction
1214 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++)
1215 gCorrection[iParameter][2]->SetBinContent(iBin,1.0);
1217 //Calculate the 1D correction parameters as a function of y and pT
1218 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1219 for(Int_t iStep = 1; iStep < nSteps; iStep++) {
1220 gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]);
1221 fCorrectionListProtons1D->Add(gCorrection[iParameter][iStep-1]);
1225 //________________________________________//
1227 fEffGridListAntiProtons = new TList();
1228 fCorrectionListAntiProtons2D = new TList();
1229 fEfficiencyListAntiProtons1D = new TList();
1230 fCorrectionListAntiProtons1D = new TList();
1232 AliCFContainer *corrfwContainerAntiProtons = (AliCFContainer*) (file->Get("containerAntiProtons"));
1233 if(!corrfwContainerAntiProtons) {
1234 cout<<"CORRFW container for antiprotons not found!"<<endl;
1238 nSteps = corrfwContainerAntiProtons->GetNStep();
1239 //currently the GRID is formed by the y-pT parameters
1240 //Add Vz as a next step
1241 AliCFEffGrid *effAntiProtonsStep0Step1 = new AliCFEffGrid("eff10",
1242 "effAntiProtonsStep0Step1",
1243 *corrfwContainerAntiProtons);
1244 effAntiProtonsStep0Step1->CalculateEfficiency(1,0); //eff= step1/step0
1245 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step1);
1246 gYPt[0] = effAntiProtonsStep0Step1->Project(iRap,iPt);
1247 fCorrectionListAntiProtons2D->Add(gYPt[0]);
1249 AliCFEffGrid *effAntiProtonsStep0Step2 = new AliCFEffGrid("eff20",
1250 "effAntiProtonsStep0Step2",
1251 *corrfwContainerAntiProtons);
1252 effAntiProtonsStep0Step2->CalculateEfficiency(2,0); //eff= step2/step0
1253 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step2);
1254 gYPt[1] = effAntiProtonsStep0Step2->Project(iRap,iPt);
1255 fCorrectionListAntiProtons2D->Add(gYPt[1]);
1257 AliCFEffGrid *effAntiProtonsStep0Step3 = new AliCFEffGrid("eff30",
1258 "effAntiProtonsStep0Step3",
1259 *corrfwContainerAntiProtons);
1260 effAntiProtonsStep0Step3->CalculateEfficiency(3,0); //eff= step1/step0
1261 fEffGridListAntiProtons->Add(effAntiProtonsStep0Step3);
1262 gYPt[2] = effAntiProtonsStep0Step3->Project(iRap,iPt);
1263 fCorrectionListAntiProtons2D->Add(gYPt[2]);
1265 //Get the projection of the efficiency maps
1266 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1267 gEfficiency[iParameter][0] = effAntiProtonsStep0Step1->Project(iParameter);
1268 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1269 gTitle += "_Step0_Step1";
1270 gEfficiency[iParameter][0]->SetName(gTitle.Data());
1271 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][0]);
1272 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1273 gTitle += "_Step0_Step1";
1274 gCorrection[iParameter][0] = new TH1D(gTitle.Data(),
1276 gEfficiency[iParameter][0]->GetNbinsX(),
1277 gEfficiency[iParameter][0]->GetXaxis()->GetXmin(),
1278 gEfficiency[iParameter][0]->GetXaxis()->GetXmax());
1279 //initialisation of the correction
1280 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][0]->GetNbinsX(); iBin++)
1281 gCorrection[iParameter][0]->SetBinContent(iBin,1.0);
1283 gEfficiency[iParameter][1] = effAntiProtonsStep0Step2->Project(iParameter);
1284 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1285 gTitle += "_Step0_Step2";
1286 gEfficiency[iParameter][1]->SetName(gTitle.Data());
1287 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][1]);
1288 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1289 gTitle += "_Step0_Step2";
1290 gCorrection[iParameter][1] = new TH1D(gTitle.Data(),
1292 gEfficiency[iParameter][1]->GetNbinsX(),
1293 gEfficiency[iParameter][1]->GetXaxis()->GetXmin(),
1294 gEfficiency[iParameter][1]->GetXaxis()->GetXmax());
1295 //initialisation of the correction
1296 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][1]->GetNbinsX(); iBin++)
1297 gCorrection[iParameter][1]->SetBinContent(iBin,1.0);
1299 gEfficiency[iParameter][2] = effAntiProtonsStep0Step3->Project(iParameter);
1300 gTitle = "AntiProtonsEfficiency_Parameter"; gTitle += iParameter+1;
1301 gTitle += "_Step0_Step3";
1302 gEfficiency[iParameter][2]->SetName(gTitle.Data());
1303 fEfficiencyListAntiProtons1D->Add(gEfficiency[iParameter][2]);
1304 gTitle = "AntiProtonsCorrection_Parameter"; gTitle += iParameter+1;
1305 gTitle += "_Step0_Step3";
1306 gCorrection[iParameter][2] = new TH1D(gTitle.Data(),
1308 gEfficiency[iParameter][2]->GetNbinsX(),
1309 gEfficiency[iParameter][2]->GetXaxis()->GetXmin(),
1310 gEfficiency[iParameter][2]->GetXaxis()->GetXmax());
1311 //initialisation of the correction
1312 for(Int_t iBin = 1; iBin <= gEfficiency[iParameter][2]->GetNbinsX(); iBin++)
1313 gCorrection[iParameter][2]->SetBinContent(iBin,1.0);
1315 //Calculate the 1D correction parameters as a function of y and pT
1316 for(Int_t iParameter = 0; iParameter < 2; iParameter++) {
1317 for(Int_t iStep = 1; iStep < nSteps; iStep++) {
1318 gCorrection[iParameter][iStep-1]->Divide(gEfficiency[iParameter][iStep-1]);
1319 fCorrectionListAntiProtons1D->Add(gCorrection[iParameter][iStep-1]);
1326 //____________________________________________________________________//
1327 void AliProtonAnalysis::InitQA() {
1328 //Applies the correction maps to the initial containers
1329 fInitQAFlag = kTRUE;
1330 fGlobalQAList = new TList();
1331 fGlobalQAList->SetName("fGlobalQAList");
1333 //========================================================//
1334 fQA2DList = new TList();
1335 fQA2DList->SetName("fQA2DList");
1336 fGlobalQAList->Add(fQA2DList);
1339 TH2F *gHistdEdxP = new TH2F("gHistdEdxP","dE/dx (TPC); P [GeV/c]; dE/dx [a.u]",1000,0.05,20.05,600,0,600);
1340 fQA2DList->Add(gHistdEdxP);
1341 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);
1342 fQA2DList->Add(gHistProtonsdEdxP);
1344 //eta-phi-Npoints(dEdx)
1345 TH3F *gHistEtaPhiTPCdEdxNPoints = new TH3F("gHistEtaPhiTPCdEdxNPoints",
1346 ";#eta;#phi;N_{points}(TPC)",
1347 fNBinsY,fMinY,fMaxY,
1350 gHistEtaPhiTPCdEdxNPoints->SetStats(kTRUE);
1351 fQA2DList->Add(gHistEtaPhiTPCdEdxNPoints);
1352 TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = new TH3F("gHistProtonsEtaPhiTPCdEdxNPoints",
1353 ";#eta;#phi;N_{points}(TPC)",
1354 fNBinsY,fMinY,fMaxY,
1357 gHistProtonsEtaPhiTPCdEdxNPoints->SetStats(kTRUE);
1358 fQA2DList->Add(gHistProtonsEtaPhiTPCdEdxNPoints);
1361 TH3F *gHistEtaPhiTPCNPoints = new TH3F("gHistEtaPhiTPCNPoints",
1362 ";#eta;#phi;N_{points}(TPC)",
1363 fNBinsY,fMinY,fMaxY,
1366 gHistEtaPhiTPCNPoints->SetStats(kTRUE);
1367 fQA2DList->Add(gHistEtaPhiTPCNPoints);
1368 TH3F *gHistProtonsEtaPhiTPCNPoints = new TH3F("gHistProtonsEtaPhiTPCNPoints",
1369 ";#eta;#phi;N_{points}(TPC)",
1370 fNBinsY,fMinY,fMaxY,
1373 gHistProtonsEtaPhiTPCNPoints->SetStats(kTRUE);
1374 fQA2DList->Add(gHistProtonsEtaPhiTPCNPoints);
1376 //pt-phi-Npoints(dEdx)
1377 TH3F *gHistPtPhiTPCdEdxNPoints = new TH3F("gHistPtPhiTPCdEdxNPoints",
1378 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1379 fNBinsPt,fMinPt,fMaxPt,
1382 gHistPtPhiTPCdEdxNPoints->SetStats(kTRUE);
1383 fQA2DList->Add(gHistPtPhiTPCdEdxNPoints);
1384 TH3F *gHistProtonsPtPhiTPCdEdxNPoints = new TH3F("gHistProtonsPtPhiTPCdEdxNPoints",
1385 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1386 fNBinsPt,fMinPt,fMaxPt,
1389 gHistProtonsPtPhiTPCdEdxNPoints->SetStats(kTRUE);
1390 fQA2DList->Add(gHistProtonsPtPhiTPCdEdxNPoints);
1393 TH3F *gHistPtPhiTPCNPoints = new TH3F("gHistPtPhiTPCNPoints",
1394 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1395 fNBinsPt,fMinPt,fMaxPt,
1398 gHistPtPhiTPCNPoints->SetStats(kTRUE);
1399 fQA2DList->Add(gHistPtPhiTPCNPoints);
1400 TH3F *gHistProtonsPtPhiTPCNPoints = new TH3F("gHistProtonsPtPhiTPCNPoints",
1401 ";P_{T} [GeV/c];#phi;N_{points}(TPC)",
1402 fNBinsPt,fMinPt,fMaxPt,
1405 gHistProtonsPtPhiTPCNPoints->SetStats(kTRUE);
1406 fQA2DList->Add(gHistProtonsPtPhiTPCNPoints);
1408 //========================================================//
1409 fQAProtonsAcceptedList = new TList();
1410 fQAProtonsAcceptedList->SetName("fQAProtonsAcceptedList");
1411 fGlobalQAList->Add(fQAProtonsAcceptedList);
1413 TH1F *gProtonsITSClustersPass = new TH1F("gProtonsITSClustersPass",
1414 ";N_{clusters} (ITS);Entries",
1416 fQAProtonsAcceptedList->Add(gProtonsITSClustersPass);
1417 TH1F *gProtonsChi2PerClusterITSPass = new TH1F("gProtonsChi2PerClusterITSPass",
1418 ";x^{2}/N_{clusters} (ITS);Entries",
1420 fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterITSPass);
1421 TH1F *gProtonsTPCClustersPass = new TH1F("gProtonsTPCClustersPass",
1422 ";N_{clusters} (TPC);Entries",
1424 fQAProtonsAcceptedList->Add(gProtonsTPCClustersPass);
1425 TH1F *gProtonsChi2PerClusterTPCPass = new TH1F("gProtonsChi2PerClusterTPCPass",
1426 ";x^{2}/N_{clusters} (TPC);Entries",
1428 fQAProtonsAcceptedList->Add(gProtonsChi2PerClusterTPCPass);
1429 TH1F *gProtonsExtCov11Pass = new TH1F("gProtonsExtCov11Pass",
1430 ";#sigma_{y} [cm];Entries",
1432 fQAProtonsAcceptedList->Add(gProtonsExtCov11Pass);
1433 TH1F *gProtonsExtCov22Pass = new TH1F("gProtonsExtCov22Pass",
1434 ";#sigma_{z} [cm];Entries",
1436 fQAProtonsAcceptedList->Add(gProtonsExtCov22Pass);
1437 TH1F *gProtonsExtCov33Pass = new TH1F("gProtonsExtCov33Pass",
1438 ";#sigma_{sin(#phi)};Entries",
1440 fQAProtonsAcceptedList->Add(gProtonsExtCov33Pass);
1441 TH1F *gProtonsExtCov44Pass = new TH1F("gProtonsExtCov44Pass",
1442 ";#sigma_{tan(#lambda)};Entries",
1444 fQAProtonsAcceptedList->Add(gProtonsExtCov44Pass);
1445 TH1F *gProtonsExtCov55Pass = new TH1F("gProtonsExtCov55Pass",
1446 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1448 fQAProtonsAcceptedList->Add(gProtonsExtCov55Pass);
1449 TH1F *gProtonsSigmaToVertexPass = new TH1F("gProtonsSigmaToVertexPass",
1450 ";#sigma_{Vertex};Entries",
1452 fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexPass);
1453 TH1F *gProtonsSigmaToVertexTPCPass = new TH1F("gProtonsSigmaToVertexTPCPass",
1454 ";#sigma_{Vertex};Entries",
1456 fQAProtonsAcceptedList->Add(gProtonsSigmaToVertexTPCPass);
1457 TH1F *gProtonsDCAXYPass = new TH1F("gProtonsDCAXYPass",
1458 ";DCA_{xy} [cm];Entries",
1460 fQAProtonsAcceptedList->Add(gProtonsDCAXYPass);
1461 TH1F *gProtonsDCAXYTPCPass = new TH1F("gProtonsDCAXYTPCPass",
1462 ";DCA_{xy} [cm];Entries",
1464 fQAProtonsAcceptedList->Add(gProtonsDCAXYTPCPass);
1465 TH1F *gProtonsDCAZPass = new TH1F("gProtonsDCAZPass",
1466 ";DCA_{z} [cm];Entries",
1468 fQAProtonsAcceptedList->Add(gProtonsDCAZPass);
1469 TH1F *gProtonsDCAZTPCPass = new TH1F("gProtonsDCAZTPCPass",
1470 ";DCA_{z} [cm];Entries",
1472 fQAProtonsAcceptedList->Add(gProtonsDCAZTPCPass);
1473 TH1F *gProtonsConstrainChi2Pass = new TH1F("gProtonsConstrainChi2Pass",
1474 ";Log_{10}(#chi^{2});Entries",
1476 fQAProtonsAcceptedList->Add(gProtonsConstrainChi2Pass);
1477 TH1F *gProtonsITSRefitPass = new TH1F("gProtonsITSRefitPass",
1479 fQAProtonsAcceptedList->Add(gProtonsITSRefitPass);
1480 TH1F *gProtonsTPCRefitPass = new TH1F("gProtonsTPCRefitPass",
1482 fQAProtonsAcceptedList->Add(gProtonsTPCRefitPass);
1483 TH1F *gProtonsESDpidPass = new TH1F("gProtonsESDpidPass",
1485 fQAProtonsAcceptedList->Add(gProtonsESDpidPass);
1486 TH1F *gProtonsTPCpidPass = new TH1F("gProtonsTPCpidPass",
1488 fQAProtonsAcceptedList->Add(gProtonsTPCpidPass);
1489 TH1F *gProtonsPointOnITSLayer1Pass = new TH1F("gProtonsPointOnITSLayer1Pass",
1491 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer1Pass);
1492 TH1F *gProtonsPointOnITSLayer2Pass = new TH1F("gProtonsPointOnITSLayer2Pass",
1494 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer2Pass);
1495 TH1F *gProtonsPointOnITSLayer3Pass = new TH1F("gProtonsPointOnITSLayer3Pass",
1497 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer3Pass);
1498 TH1F *gProtonsPointOnITSLayer4Pass = new TH1F("gProtonsPointOnITSLayer4Pass",
1500 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer4Pass);
1501 TH1F *gProtonsPointOnITSLayer5Pass = new TH1F("gProtonsPointOnITSLayer5Pass",
1503 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer5Pass);
1504 TH1F *gProtonsPointOnITSLayer6Pass = new TH1F("gProtonsPointOnITSLayer6Pass",
1506 fQAProtonsAcceptedList->Add(gProtonsPointOnITSLayer6Pass);
1507 TH1F *gProtonsNumberOfTPCdEdxPointsPass = new TH1F("gProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
1508 fQAProtonsAcceptedList->Add(gProtonsNumberOfTPCdEdxPointsPass);
1510 //========================================================//
1511 fQAProtonsRejectedList = new TList();
1512 fQAProtonsRejectedList->SetName("fQAProtonsRejectedList");
1513 fGlobalQAList->Add(fQAProtonsRejectedList);
1515 TH1F *gProtonsITSClustersReject = new TH1F("gProtonsITSClustersReject",
1516 ";N_{clusters} (ITS);Entries",
1518 gProtonsITSClustersReject->SetFillColor(kRed-2);
1519 fQAProtonsRejectedList->Add(gProtonsITSClustersReject);
1520 TH1F *gProtonsChi2PerClusterITSReject = new TH1F("gProtonsChi2PerClusterITSReject",
1521 ";x^{2}/N_{clusters} (ITS);Entries",
1523 gProtonsChi2PerClusterITSReject->SetFillColor(kRed-2);
1524 fQAProtonsRejectedList->Add(gProtonsChi2PerClusterITSReject);
1525 TH1F *gProtonsTPCClustersReject = new TH1F("gProtonsTPCClustersReject",
1526 ";N_{clusters} (TPC);Entries",
1528 gProtonsTPCClustersReject->SetFillColor(kRed-2);
1529 fQAProtonsRejectedList->Add(gProtonsTPCClustersReject);
1530 TH1F *gProtonsChi2PerClusterTPCReject = new TH1F("gProtonsChi2PerClusterTPCReject",
1531 ";x^{2}/N_{clusters} (TPC);Entries",
1533 gProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2);
1534 fQAProtonsRejectedList->Add(gProtonsChi2PerClusterTPCReject);
1535 TH1F *gProtonsExtCov11Reject = new TH1F("gProtonsExtCov11Reject",
1536 ";#sigma_{y} [cm];Entries",
1538 gProtonsExtCov11Reject->SetFillColor(kRed-2);
1539 fQAProtonsRejectedList->Add(gProtonsExtCov11Reject);
1540 TH1F *gProtonsExtCov22Reject = new TH1F("gProtonsExtCov22Reject",
1541 ";#sigma_{z} [cm];Entries",
1543 gProtonsExtCov22Reject->SetFillColor(kRed-2);
1544 fQAProtonsRejectedList->Add(gProtonsExtCov22Reject);
1545 TH1F *gProtonsExtCov33Reject = new TH1F("gProtonsExtCov33Reject",
1546 ";#sigma_{sin(#phi)};Entries",
1548 gProtonsExtCov33Reject->SetFillColor(kRed-2);
1549 fQAProtonsRejectedList->Add(gProtonsExtCov33Reject);
1550 TH1F *gProtonsExtCov44Reject = new TH1F("gProtonsExtCov44Reject",
1551 ";#sigma_{tan(#lambda)};Entries",
1553 gProtonsExtCov44Reject->SetFillColor(kRed-2);
1554 fQAProtonsRejectedList->Add(gProtonsExtCov44Reject);
1555 TH1F *gProtonsExtCov55Reject = new TH1F("gProtonsExtCov55Reject",
1556 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1558 gProtonsExtCov55Reject->SetFillColor(kRed-2);
1559 fQAProtonsRejectedList->Add(gProtonsExtCov55Reject);
1560 TH1F *gProtonsSigmaToVertexReject = new TH1F("gProtonsSigmaToVertexReject",
1561 ";#sigma_{Vertex};Entries",
1563 gProtonsSigmaToVertexReject->SetFillColor(kRed-2);
1564 fQAProtonsRejectedList->Add(gProtonsSigmaToVertexReject);
1565 TH1F *gProtonsSigmaToVertexTPCReject = new TH1F("gProtonsSigmaToVertexTPCReject",
1566 ";#sigma_{Vertex};Entries",
1568 gProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2);
1569 fQAProtonsRejectedList->Add(gProtonsSigmaToVertexTPCReject);
1570 TH1F *gProtonsDCAXYReject = new TH1F("gProtonsDCAXYReject",
1571 ";DCA_{xy} [cm];Entries",
1573 gProtonsDCAXYReject->SetFillColor(kRed-2);
1574 fQAProtonsRejectedList->Add(gProtonsDCAXYReject);
1575 TH1F *gProtonsDCAXYTPCReject = new TH1F("gProtonsDCAXYTPCReject",
1576 ";DCA_{xy} [cm];Entries",
1578 gProtonsDCAXYTPCReject->SetFillColor(kRed-2);
1579 fQAProtonsRejectedList->Add(gProtonsDCAXYTPCReject);
1580 TH1F *gProtonsDCAZReject = new TH1F("gProtonsDCAZReject",
1581 ";DCA_{z} [cm];Entries",
1583 gProtonsDCAZReject->SetFillColor(kRed-2);
1584 fQAProtonsRejectedList->Add(gProtonsDCAZReject);
1585 TH1F *gProtonsDCAZTPCReject = new TH1F("gProtonsDCAZTPCReject",
1586 ";DCA_{z} [cm];Entries",
1588 gProtonsDCAZTPCReject->SetFillColor(kRed-2);
1589 fQAProtonsRejectedList->Add(gProtonsDCAZTPCReject);
1590 TH1F *gProtonsConstrainChi2Reject = new TH1F("gProtonsConstrainChi2Reject",
1591 ";Log_{10}(#chi^{2});Entries",
1593 gProtonsConstrainChi2Reject->SetFillColor(kRed-2);
1594 fQAProtonsRejectedList->Add(gProtonsConstrainChi2Reject);
1595 TH1F *gProtonsITSRefitReject = new TH1F("gProtonsITSRefitReject",
1597 gProtonsITSRefitReject->SetFillColor(kRed-2);
1598 fQAProtonsRejectedList->Add(gProtonsITSRefitReject);
1599 TH1F *gProtonsTPCRefitReject = new TH1F("gProtonsTPCRefitReject",
1601 gProtonsTPCRefitReject->SetFillColor(kRed-2);
1602 fQAProtonsRejectedList->Add(gProtonsTPCRefitReject);
1603 TH1F *gProtonsESDpidReject = new TH1F("gProtonsESDpidReject",
1605 gProtonsESDpidReject->SetFillColor(kRed-2);
1606 fQAProtonsRejectedList->Add(gProtonsESDpidReject);
1607 TH1F *gProtonsTPCpidReject = new TH1F("gProtonsTPCpidReject",
1609 gProtonsTPCpidReject->SetFillColor(kRed-2);
1610 fQAProtonsRejectedList->Add(gProtonsTPCpidReject);
1611 TH1F *gProtonsPointOnITSLayer1Reject = new TH1F("gProtonsPointOnITSLayer1Reject",
1613 gProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2);
1614 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer1Reject);
1615 TH1F *gProtonsPointOnITSLayer2Reject = new TH1F("gProtonsPointOnITSLayer2Reject",
1617 gProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2);
1618 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer2Reject);
1619 TH1F *gProtonsPointOnITSLayer3Reject = new TH1F("gProtonsPointOnITSLayer3Reject",
1621 gProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2);
1622 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer3Reject);
1623 TH1F *gProtonsPointOnITSLayer4Reject = new TH1F("gProtonsPointOnITSLayer4Reject",
1625 gProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2);
1626 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer4Reject);
1627 TH1F *gProtonsPointOnITSLayer5Reject = new TH1F("gProtonsPointOnITSLayer5Reject",
1629 gProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2);
1630 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer5Reject);
1631 TH1F *gProtonsPointOnITSLayer6Reject = new TH1F("gProtonsPointOnITSLayer6Reject",
1633 gProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2);
1634 fQAProtonsRejectedList->Add(gProtonsPointOnITSLayer6Reject);
1635 TH1F *gProtonsNumberOfTPCdEdxPointsReject = new TH1F("gProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
1636 gProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2);
1637 fQAProtonsRejectedList->Add(gProtonsNumberOfTPCdEdxPointsReject);
1639 //========================================================//
1640 fQAAntiProtonsAcceptedList = new TList();
1641 fQAAntiProtonsAcceptedList->SetName("fQAAntiProtonsAcceptedList");
1642 fGlobalQAList->Add(fQAAntiProtonsAcceptedList);
1643 //Accepted antiprotons
1644 TH1F *gAntiProtonsITSClustersPass = new TH1F("gAntiProtonsITSClustersPass",
1645 ";N_{clusters} (ITS);Entries",
1647 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSClustersPass);
1648 TH1F *gAntiProtonsChi2PerClusterITSPass = new TH1F("gAntiProtonsChi2PerClusterITSPass",
1649 ";x^{2}/N_{clusters} (ITS);Entries",
1651 fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterITSPass);
1652 TH1F *gAntiProtonsTPCClustersPass = new TH1F("gAntiProtonsTPCClustersPass",
1653 ";N_{clusters} (TPC);Entries",
1655 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCClustersPass);
1656 TH1F *gAntiProtonsChi2PerClusterTPCPass = new TH1F("gAntiProtonsChi2PerClusterTPCPass",
1657 ";x^{2}/N_{clusters} (TPC);Entries",
1659 fQAAntiProtonsAcceptedList->Add(gAntiProtonsChi2PerClusterTPCPass);
1660 TH1F *gAntiProtonsExtCov11Pass = new TH1F("gAntiProtonsExtCov11Pass",
1661 ";#sigma_{y} [cm];Entries",
1663 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov11Pass);
1664 TH1F *gAntiProtonsExtCov22Pass = new TH1F("gAntiProtonsExtCov22Pass",
1665 ";#sigma_{z} [cm];Entries",
1667 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov22Pass);
1668 TH1F *gAntiProtonsExtCov33Pass = new TH1F("gAntiProtonsExtCov33Pass",
1669 ";#sigma_{sin(#phi)};Entries",
1671 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov33Pass);
1672 TH1F *gAntiProtonsExtCov44Pass = new TH1F("gAntiProtonsExtCov44Pass",
1673 ";#sigma_{tan(#lambda)};Entries",
1675 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov44Pass);
1676 TH1F *gAntiProtonsExtCov55Pass = new TH1F("gAntiProtonsExtCov55Pass",
1677 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1679 fQAAntiProtonsAcceptedList->Add(gAntiProtonsExtCov55Pass);
1680 TH1F *gAntiProtonsSigmaToVertexPass = new TH1F("gAntiProtonsSigmaToVertexPass",
1681 ";#sigma_{Vertex};Entries",
1683 fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexPass);
1684 TH1F *gAntiProtonsSigmaToVertexTPCPass = new TH1F("gAntiProtonsSigmaToVertexTPCPass",
1685 ";#sigma_{Vertex};Entries",
1687 fQAAntiProtonsAcceptedList->Add(gAntiProtonsSigmaToVertexTPCPass);
1688 TH1F *gAntiProtonsDCAXYPass = new TH1F("gAntiProtonsDCAXYPass",
1689 ";DCA_{xy} [cm];Entries",
1691 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYPass);
1692 TH1F *gAntiProtonsDCAXYTPCPass = new TH1F("gAntiProtonsDCAXYTPCPass",
1693 ";DCA_{xy} [cm];Entries",
1695 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAXYTPCPass);
1696 TH1F *gAntiProtonsDCAZPass = new TH1F("gAntiProtonsDCAZPass",
1697 ";DCA_{z} [cm];Entries",
1699 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZPass);
1700 TH1F *gAntiProtonsDCAZTPCPass = new TH1F("gAntiProtonsDCAZTPCPass",
1701 ";DCA_{z} [cm];Entries",
1703 fQAAntiProtonsAcceptedList->Add(gAntiProtonsDCAZTPCPass);
1704 TH1F *gAntiProtonsConstrainChi2Pass = new TH1F("gAntiProtonsConstrainChi2Pass",
1705 ";Log_{10}(#chi^{2});Entries",
1707 fQAAntiProtonsAcceptedList->Add(gAntiProtonsConstrainChi2Pass);
1708 TH1F *gAntiProtonsITSRefitPass = new TH1F("gAntiProtonsITSRefitPass",
1710 fQAAntiProtonsAcceptedList->Add(gAntiProtonsITSRefitPass);
1711 TH1F *gAntiProtonsTPCRefitPass = new TH1F("gAntiProtonsTPCRefitPass",
1713 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCRefitPass);
1714 TH1F *gAntiProtonsESDpidPass = new TH1F("gAntiProtonsESDpidPass",
1716 fQAAntiProtonsAcceptedList->Add(gAntiProtonsESDpidPass);
1717 TH1F *gAntiProtonsTPCpidPass = new TH1F("gAntiProtonsTPCpidPass",
1719 fQAAntiProtonsAcceptedList->Add(gAntiProtonsTPCpidPass);
1720 TH1F *gAntiProtonsPointOnITSLayer1Pass = new TH1F("gAntiProtonsPointOnITSLayer1Pass",
1722 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer1Pass);
1723 TH1F *gAntiProtonsPointOnITSLayer2Pass = new TH1F("gAntiProtonsPointOnITSLayer2Pass",
1725 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer2Pass);
1726 TH1F *gAntiProtonsPointOnITSLayer3Pass = new TH1F("gAntiProtonsPointOnITSLayer3Pass",
1728 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer3Pass);
1729 TH1F *gAntiProtonsPointOnITSLayer4Pass = new TH1F("gAntiProtonsPointOnITSLayer4Pass",
1731 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer4Pass);
1732 TH1F *gAntiProtonsPointOnITSLayer5Pass = new TH1F("gAntiProtonsPointOnITSLayer5Pass",
1734 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer5Pass);
1735 TH1F *gAntiProtonsPointOnITSLayer6Pass = new TH1F("gAntiProtonsPointOnITSLayer6Pass",
1737 fQAAntiProtonsAcceptedList->Add(gAntiProtonsPointOnITSLayer6Pass);
1738 TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
1739 fQAAntiProtonsAcceptedList->Add(gAntiProtonsNumberOfTPCdEdxPointsPass);
1741 //========================================================//
1742 fQAAntiProtonsRejectedList = new TList();
1743 fQAAntiProtonsRejectedList->SetName("fQAAntiProtonsRejectedList");
1744 fGlobalQAList->Add(fQAAntiProtonsRejectedList);
1745 //Rejected antiprotons
1746 TH1F *gAntiProtonsITSClustersReject = new TH1F("gAntiProtonsITSClustersReject",
1747 ";N_{clusters} (ITS);Entries",
1749 gAntiProtonsITSClustersReject->SetFillColor(kRed-2);
1750 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSClustersReject);
1751 TH1F *gAntiProtonsChi2PerClusterITSReject = new TH1F("gAntiProtonsChi2PerClusterITSReject",
1752 ";x^{2}/N_{clusters} (ITS);Entries",
1754 gAntiProtonsChi2PerClusterITSReject->SetFillColor(kRed-2);
1755 fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterITSReject);
1756 TH1F *gAntiProtonsTPCClustersReject = new TH1F("gAntiProtonsTPCClustersReject",
1757 ";N_{clusters} (TPC);Entries",
1759 gAntiProtonsTPCClustersReject->SetFillColor(kRed-2);
1760 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCClustersReject);
1761 TH1F *gAntiProtonsChi2PerClusterTPCReject = new TH1F("gAntiProtonsChi2PerClusterTPCReject",
1762 ";x^{2}/N_{clusters} (TPC);Entries",
1764 gAntiProtonsChi2PerClusterTPCReject->SetFillColor(kRed-2);
1765 fQAAntiProtonsRejectedList->Add(gAntiProtonsChi2PerClusterTPCReject);
1766 TH1F *gAntiProtonsExtCov11Reject = new TH1F("gAntiProtonsExtCov11Reject",
1767 ";#sigma_{y} [cm];Entries",
1769 gAntiProtonsExtCov11Reject->SetFillColor(kRed-2);
1770 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov11Reject);
1771 TH1F *gAntiProtonsExtCov22Reject = new TH1F("gAntiProtonsExtCov22Reject",
1772 ";#sigma_{z} [cm];Entries",
1774 gAntiProtonsExtCov22Reject->SetFillColor(kRed-2);
1775 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov22Reject);
1776 TH1F *gAntiProtonsExtCov33Reject = new TH1F("gAntiProtonsExtCov33Reject",
1777 ";#sigma_{sin(#phi)};Entries",
1779 gAntiProtonsExtCov33Reject->SetFillColor(kRed-2);
1780 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov33Reject);
1781 TH1F *gAntiProtonsExtCov44Reject = new TH1F("gAntiProtonsExtCov44Reject",
1782 ";#sigma_{tan(#lambda)};Entries",
1784 gAntiProtonsExtCov44Reject->SetFillColor(kRed-2);
1785 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov44Reject);
1786 TH1F *gAntiProtonsExtCov55Reject = new TH1F("gAntiProtonsExtCov55Reject",
1787 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1789 gAntiProtonsExtCov55Reject->SetFillColor(kRed-2);
1790 fQAAntiProtonsRejectedList->Add(gAntiProtonsExtCov55Reject);
1791 TH1F *gAntiProtonsSigmaToVertexReject = new TH1F("gAntiProtonsSigmaToVertexReject",
1792 ";#sigma_{Vertex};Entries",
1794 gAntiProtonsSigmaToVertexReject->SetFillColor(kRed-2);
1795 fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexReject);
1796 TH1F *gAntiProtonsSigmaToVertexTPCReject = new TH1F("gAntiProtonsSigmaToVertexTPCReject",
1797 ";#sigma_{Vertex};Entries",
1799 gAntiProtonsSigmaToVertexTPCReject->SetFillColor(kRed-2);
1800 fQAAntiProtonsRejectedList->Add(gAntiProtonsSigmaToVertexTPCReject);
1801 TH1F *gAntiProtonsDCAXYReject = new TH1F("gAntiProtonsDCAXYReject",
1802 ";DCA_{xy} [cm];Entries",
1804 gAntiProtonsDCAXYReject->SetFillColor(kRed-2);
1805 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYReject);
1806 TH1F *gAntiProtonsDCAXYTPCReject = new TH1F("gAntiProtonsDCAXYTPCReject",
1807 ";DCA_{xy} [cm];Entries",
1809 gAntiProtonsDCAXYTPCReject->SetFillColor(kRed-2);
1810 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAXYTPCReject);
1811 TH1F *gAntiProtonsDCAZReject = new TH1F("gAntiProtonsDCAZReject",
1812 ";DCA_{z} [cm];Entries",
1814 gAntiProtonsDCAZReject->SetFillColor(kRed-2);
1815 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZReject);
1816 TH1F *gAntiProtonsDCAZTPCReject = new TH1F("gAntiProtonsDCAZTPCReject",
1817 ";DCA_{z} [cm];Entries",
1819 gAntiProtonsDCAZTPCReject->SetFillColor(kRed-2);
1820 fQAAntiProtonsRejectedList->Add(gAntiProtonsDCAZTPCReject);
1821 TH1F *gAntiProtonsConstrainChi2Reject = new TH1F("gAntiProtonsConstrainChi2Reject",
1822 ";Log_{10}(#chi^{2});Entries",
1824 gAntiProtonsConstrainChi2Reject->SetFillColor(kRed-2);
1825 fQAAntiProtonsRejectedList->Add(gAntiProtonsConstrainChi2Reject);
1826 TH1F *gAntiProtonsITSRefitReject = new TH1F("gAntiProtonsITSRefitReject",
1828 gAntiProtonsITSRefitReject->SetFillColor(kRed-2);
1829 fQAAntiProtonsRejectedList->Add(gAntiProtonsITSRefitReject);
1830 TH1F *gAntiProtonsTPCRefitReject = new TH1F("gAntiProtonsTPCRefitReject",
1832 gAntiProtonsTPCRefitReject->SetFillColor(kRed-2);
1833 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCRefitReject);
1834 TH1F *gAntiProtonsESDpidReject = new TH1F("gAntiProtonsESDpidReject",
1836 gAntiProtonsESDpidReject->SetFillColor(kRed-2);
1837 fQAAntiProtonsRejectedList->Add(gAntiProtonsESDpidReject);
1838 TH1F *gAntiProtonsTPCpidReject = new TH1F("gAntiProtonsTPCpidReject",
1840 gAntiProtonsTPCpidReject->SetFillColor(kRed-2);
1841 fQAAntiProtonsRejectedList->Add(gAntiProtonsTPCpidReject);
1842 TH1F *gAntiProtonsPointOnITSLayer1Reject = new TH1F("gAntiProtonsPointOnITSLayer1Reject",
1844 gAntiProtonsPointOnITSLayer1Reject->SetFillColor(kRed-2);
1845 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer1Reject);
1846 TH1F *gAntiProtonsPointOnITSLayer2Reject = new TH1F("gAntiProtonsPointOnITSLayer2Reject",
1848 gAntiProtonsPointOnITSLayer2Reject->SetFillColor(kRed-2);
1849 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer2Reject);
1850 TH1F *gAntiProtonsPointOnITSLayer3Reject = new TH1F("gAntiProtonsPointOnITSLayer3Reject",
1852 gAntiProtonsPointOnITSLayer3Reject->SetFillColor(kRed-2);
1853 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer3Reject);
1854 TH1F *gAntiProtonsPointOnITSLayer4Reject = new TH1F("gAntiProtonsPointOnITSLayer4Reject",
1856 gAntiProtonsPointOnITSLayer4Reject->SetFillColor(kRed-2);
1857 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer4Reject);
1858 TH1F *gAntiProtonsPointOnITSLayer5Reject = new TH1F("gAntiProtonsPointOnITSLayer5Reject",
1860 gAntiProtonsPointOnITSLayer5Reject->SetFillColor(kRed-2);
1861 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer5Reject);
1862 TH1F *gAntiProtonsPointOnITSLayer6Reject = new TH1F("gAntiProtonsPointOnITSLayer6Reject",
1864 gAntiProtonsPointOnITSLayer6Reject->SetFillColor(kRed-2);
1865 fQAAntiProtonsRejectedList->Add(gAntiProtonsPointOnITSLayer6Reject);
1866 TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
1867 gAntiProtonsNumberOfTPCdEdxPointsReject->SetFillColor(kRed-2);
1868 fQAAntiProtonsRejectedList->Add(gAntiProtonsNumberOfTPCdEdxPointsReject);
1871 //____________________________________________________________________//
1872 void AliProtonAnalysis::FillQA(AliESDEvent *esd,
1873 const AliESDVertex *vertex,
1874 AliESDtrack* track) {
1875 //Fills the QA histograms
1876 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
1877 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
1879 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
1880 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
1882 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
1883 dca[0] = -100.; dca[1] = -100.;
1884 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
1887 gPt = tpcTrack->Pt();
1888 gPx = tpcTrack->Px();
1889 gPy = tpcTrack->Py();
1890 gPz = tpcTrack->Pz();
1891 tpcTrack->PropagateToDCA(vertex,
1892 esd->GetMagneticField(),
1901 track->PropagateToDCA(vertex,
1902 esd->GetMagneticField(),
1907 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
1908 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
1910 Float_t chi2PerClusterITS = -1;
1911 if (nClustersITS!=0)
1912 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
1913 Float_t chi2PerClusterTPC = -1;
1914 if (nClustersTPC!=0)
1915 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
1917 Double_t extCov[15];
1918 track->GetExternalCovariance(extCov);
1921 if(track->Charge() > 0) {
1922 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
1923 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
1924 ((TH1F *)(fQAProtonsRejectedList->At(0)))->Fill(nClustersITS);
1926 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
1927 ((TH1F *)(fQAProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1929 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
1930 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
1931 ((TH1F *)(fQAProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1933 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
1934 ((TH1F *)(fQAProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1935 }//chi2 per ITS cluster
1936 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
1937 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
1938 ((TH1F *)(fQAProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1940 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
1941 ((TH1F *)(fQAProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1944 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
1945 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
1946 ((TH1F *)(fQAProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1948 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
1949 ((TH1F *)(fQAProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1950 }//chi2 per TPC cluster
1951 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
1952 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
1953 ((TH1F *)(fQAProtonsRejectedList->At(4)))->Fill(extCov[0]);
1955 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
1956 ((TH1F *)(fQAProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1958 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
1959 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
1960 ((TH1F *)(fQAProtonsRejectedList->At(5)))->Fill(extCov[2]);
1962 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
1963 ((TH1F *)(fQAProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1965 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
1966 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
1967 ((TH1F *)(fQAProtonsRejectedList->At(6)))->Fill(extCov[5]);
1969 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
1970 ((TH1F *)(fQAProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1972 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
1973 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
1974 ((TH1F *)(fQAProtonsRejectedList->At(7)))->Fill(extCov[9]);
1976 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
1977 ((TH1F *)(fQAProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1979 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
1980 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
1981 ((TH1F *)(fQAProtonsRejectedList->At(8)))->Fill(extCov[14]);
1983 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
1984 ((TH1F *)(fQAProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1986 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
1987 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
1988 ((TH1F *)(fQAProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1990 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
1991 ((TH1F *)(fQAProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1993 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
1994 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
1995 ((TH1F *)(fQAProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1997 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
1998 ((TH1F *)(fQAProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
1999 }//sigma to vertex TPC
2000 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
2001 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
2002 ((TH1F *)(fQAProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
2004 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
2005 ((TH1F *)(fQAProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
2006 }//DCA xy global tracking
2007 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
2008 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
2009 ((TH1F *)(fQAProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
2011 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
2012 ((TH1F *)(fQAProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
2013 }//DCA xy TPC tracking
2014 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
2015 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
2016 ((TH1F *)(fQAProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
2018 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
2019 ((TH1F *)(fQAProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
2020 }//DCA z global tracking
2021 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
2022 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
2023 ((TH1F *)(fQAProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
2025 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
2026 ((TH1F *)(fQAProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
2027 }//DCA z TPC tracking
2028 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
2029 if(track->GetConstrainedChi2() > 0) {
2030 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
2031 ((TH1F *)(fQAProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2033 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
2034 ((TH1F *)(fQAProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2036 }//constrain chi2 - vertex
2037 if(fProtonAnalysisBase->IsUsedITSRefit()) {
2038 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
2039 ((TH1F *)(fQAProtonsRejectedList->At(16)))->Fill(0);
2041 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
2042 ((TH1F *)(fQAProtonsAcceptedList->At(16)))->Fill(0);
2044 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
2045 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
2046 ((TH1F *)(fQAProtonsRejectedList->At(17)))->Fill(0);
2048 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
2049 ((TH1F *)(fQAProtonsAcceptedList->At(17)))->Fill(0);
2051 if(fProtonAnalysisBase->IsUsedESDpid()) {
2052 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
2053 ((TH1F *)(fQAProtonsRejectedList->At(18)))->Fill(0);
2055 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
2056 ((TH1F *)(fQAProtonsAcceptedList->At(18)))->Fill(0);
2058 if(fProtonAnalysisBase->IsUsedTPCpid()) {
2059 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
2060 ((TH1F *)(fQAProtonsRejectedList->At(19)))->Fill(0);
2062 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
2063 ((TH1F *)(fQAProtonsAcceptedList->At(19)))->Fill(0);
2065 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
2066 if(!track->HasPointOnITSLayer(0)) {
2067 ((TH1F *)(fQAProtonsRejectedList->At(20)))->Fill(0);
2069 else if(track->HasPointOnITSLayer(0))
2070 ((TH1F *)(fQAProtonsAcceptedList->At(20)))->Fill(0);
2072 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
2073 if(!track->HasPointOnITSLayer(1)) {
2074 ((TH1F *)(fQAProtonsRejectedList->At(21)))->Fill(0);
2076 else if(track->HasPointOnITSLayer(1))
2077 ((TH1F *)(fQAProtonsAcceptedList->At(21)))->Fill(0);
2079 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
2080 if(!track->HasPointOnITSLayer(2)) {
2081 ((TH1F *)(fQAProtonsRejectedList->At(22)))->Fill(0);
2083 else if(track->HasPointOnITSLayer(2))
2084 ((TH1F *)(fQAProtonsAcceptedList->At(22)))->Fill(0);
2086 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
2087 if(!track->HasPointOnITSLayer(3)) {
2088 ((TH1F *)(fQAProtonsRejectedList->At(23)))->Fill(0);
2090 else if(track->HasPointOnITSLayer(3))
2091 ((TH1F *)(fQAProtonsAcceptedList->At(23)))->Fill(0);
2093 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
2094 if(!track->HasPointOnITSLayer(4)) {
2095 ((TH1F *)(fQAProtonsRejectedList->At(24)))->Fill(0);
2097 else if(track->HasPointOnITSLayer(4))
2098 ((TH1F *)(fQAProtonsAcceptedList->At(24)))->Fill(0);
2100 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
2101 if(!track->HasPointOnITSLayer(5)) {
2102 ((TH1F *)(fQAProtonsRejectedList->At(25)))->Fill(0);
2104 else if(track->HasPointOnITSLayer(5))
2105 ((TH1F *)(fQAProtonsAcceptedList->At(25)))->Fill(0);
2107 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
2108 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
2109 ((TH1F *)(fQAProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
2111 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
2112 ((TH1F *)(fQAProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
2113 }//number of TPC points for the dE/dx
2117 if(track->Charge() < 0) {
2118 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
2119 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
2120 ((TH1F *)(fQAAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
2122 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
2123 ((TH1F *)(fQAAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
2125 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
2126 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
2127 ((TH1F *)(fQAAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
2129 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
2130 ((TH1F *)(fQAAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
2131 }//chi2 per ITS cluster
2132 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
2133 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
2134 ((TH1F *)(fQAAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
2136 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
2137 ((TH1F *)(fQAAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
2140 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
2141 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
2142 ((TH1F *)(fQAAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
2144 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
2145 ((TH1F *)(fQAAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
2146 }//chi2 per TPC cluster
2147 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
2148 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
2149 ((TH1F *)(fQAAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
2151 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
2152 ((TH1F *)(fQAAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
2154 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
2155 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
2156 ((TH1F *)(fQAAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
2158 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
2159 ((TH1F *)(fQAAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
2161 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
2162 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
2163 ((TH1F *)(fQAAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
2165 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
2166 ((TH1F *)(fQAAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
2168 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
2169 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
2170 ((TH1F *)(fQAAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
2172 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
2173 ((TH1F *)(fQAAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
2175 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
2176 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
2177 ((TH1F *)(fQAAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
2179 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
2180 ((TH1F *)(fQAAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
2182 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
2183 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
2184 ((TH1F *)(fQAAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2186 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
2187 ((TH1F *)(fQAAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2189 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
2190 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
2191 ((TH1F *)(fQAAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2193 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
2194 ((TH1F *)(fQAAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
2195 }//sigma to vertex TPC
2196 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
2197 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
2198 ((TH1F *)(fQAAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
2200 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
2201 ((TH1F *)(fQAAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
2202 }//DCA xy global tracking
2203 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
2204 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
2205 ((TH1F *)(fQAAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
2207 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
2208 ((TH1F *)(fQAAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
2209 }//DCA xy TPC tracking
2210 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
2211 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
2212 ((TH1F *)(fQAAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
2214 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
2215 ((TH1F *)(fQAAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
2216 }//DCA z global tracking
2217 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
2218 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
2219 ((TH1F *)(fQAAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
2221 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
2222 ((TH1F *)(fQAAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
2223 }//DCA z TPC tracking
2224 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
2225 if(track->GetConstrainedChi2() > 0) {
2226 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
2227 ((TH1F *)(fQAAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2229 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
2230 ((TH1F *)(fQAAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
2232 }//constrain chi2 - vertex
2233 if(fProtonAnalysisBase->IsUsedITSRefit()) {
2234 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
2235 ((TH1F *)(fQAAntiProtonsRejectedList->At(16)))->Fill(0);
2237 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
2238 ((TH1F *)(fQAAntiProtonsAcceptedList->At(16)))->Fill(0);
2240 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
2241 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
2242 ((TH1F *)(fQAAntiProtonsRejectedList->At(17)))->Fill(0);
2244 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
2245 ((TH1F *)(fQAAntiProtonsAcceptedList->At(17)))->Fill(0);
2247 if(fProtonAnalysisBase->IsUsedESDpid()) {
2248 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
2249 ((TH1F *)(fQAAntiProtonsRejectedList->At(18)))->Fill(0);
2251 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
2252 ((TH1F *)(fQAAntiProtonsAcceptedList->At(18)))->Fill(0);
2254 if(fProtonAnalysisBase->IsUsedTPCpid()) {
2255 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
2256 ((TH1F *)(fQAAntiProtonsRejectedList->At(19)))->Fill(0);
2258 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
2259 ((TH1F *)(fQAAntiProtonsAcceptedList->At(19)))->Fill(0);
2261 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
2262 if(!track->HasPointOnITSLayer(0)) {
2263 ((TH1F *)(fQAAntiProtonsRejectedList->At(20)))->Fill(0);
2265 else if(track->HasPointOnITSLayer(0))
2266 ((TH1F *)(fQAAntiProtonsAcceptedList->At(20)))->Fill(0);
2268 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
2269 if(!track->HasPointOnITSLayer(1)) {
2270 ((TH1F *)(fQAAntiProtonsRejectedList->At(21)))->Fill(0);
2272 else if(track->HasPointOnITSLayer(1))
2273 ((TH1F *)(fQAAntiProtonsAcceptedList->At(21)))->Fill(0);
2275 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
2276 if(!track->HasPointOnITSLayer(2)) {
2277 ((TH1F *)(fQAAntiProtonsRejectedList->At(22)))->Fill(0);
2279 else if(track->HasPointOnITSLayer(2))
2280 ((TH1F *)(fQAAntiProtonsAcceptedList->At(22)))->Fill(0);
2282 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
2283 if(!track->HasPointOnITSLayer(3)) {
2284 ((TH1F *)(fQAAntiProtonsRejectedList->At(23)))->Fill(0);
2286 else if(track->HasPointOnITSLayer(3))
2287 ((TH1F *)(fQAAntiProtonsAcceptedList->At(23)))->Fill(0);
2289 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
2290 if(!track->HasPointOnITSLayer(4)) {
2291 ((TH1F *)(fQAAntiProtonsRejectedList->At(24)))->Fill(0);
2293 else if(track->HasPointOnITSLayer(4))
2294 ((TH1F *)(fQAAntiProtonsAcceptedList->At(24)))->Fill(0);
2296 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
2297 if(!track->HasPointOnITSLayer(5)) {
2298 ((TH1F *)(fQAAntiProtonsRejectedList->At(25)))->Fill(0);
2300 else if(track->HasPointOnITSLayer(5))
2301 ((TH1F *)(fQAAntiProtonsAcceptedList->At(25)))->Fill(0);
2303 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
2304 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
2305 ((TH1F *)(fQAAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
2307 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
2308 ((TH1F *)(fQAAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
2309 }//number of TPC points for the dE/dx