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 **************************************************************************/
14 /* $Id: AliProtonQAAnalysis.cxx 29114 2008-10-03 16:49:02Z pchrist $ */
16 //-----------------------------------------------------------------
17 // AliProtonQAAnalysis class
18 // This is the class to deal with the proton analysis
19 // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
21 #include <Riostream.h>
28 #include <TParticle.h>
30 #include "AliProtonQAAnalysis.h"
32 #include <AliExternalTrackParam.h>
33 #include <AliESDEvent.h>
38 ClassImp(AliProtonQAAnalysis)
40 //____________________________________________________________________//
41 AliProtonQAAnalysis::AliProtonQAAnalysis() :
43 fNBinsY(0), fMinY(0), fMaxY(0),
44 fNBinsPt(0), fMinPt(0), fMaxPt(0),
45 fMinTPCClusters(0), fMinITSClusters(0),
46 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
47 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
48 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
49 fMaxDCAXY(0), fMaxDCAXYTPC(0),
50 fMaxDCAZ(0), fMaxDCAZTPC(0),
52 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
53 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
54 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
55 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
56 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
57 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
58 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
59 fMaxConstrainChi2Flag(kFALSE),
60 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
61 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
62 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
63 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
64 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
65 fGlobalQAList(0), fQA2DList(0),
66 fQAPrimaryProtonsAcceptedList(0),
67 fQAPrimaryProtonsRejectedList(0),
68 fQASecondaryProtonsAcceptedList(0),
69 fQASecondaryProtonsRejectedList(0),
70 fQAPrimaryAntiProtonsAcceptedList(0),
71 fQAPrimaryAntiProtonsRejectedList(0),
72 fQASecondaryAntiProtonsAcceptedList(0),
73 fQASecondaryAntiProtonsRejectedList(0),
74 fFunctionProbabilityFlag(kFALSE),
75 fElectronFunction(0), fMuonFunction(0),
76 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
77 fUseTPCOnly(kFALSE), fUseHybridTPC(kFALSE),
78 fPDGList(0), fMCProcessesList(0),
79 fRunMCAnalysis(kFALSE),
80 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
81 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
82 fAcceptedCutList(0), fRejectedCutList(0),
83 fAcceptedDCAList(0), fRejectedDCAList(0) {
85 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
88 //____________________________________________________________________//
89 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
91 if(fGlobalQAList) delete fGlobalQAList;
92 if(fQA2DList) delete fQA2DList;
93 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
94 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
95 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
96 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
97 if(fQAPrimaryAntiProtonsAcceptedList)
98 delete fQAPrimaryAntiProtonsAcceptedList;
99 if(fQAPrimaryAntiProtonsRejectedList)
100 delete fQAPrimaryAntiProtonsRejectedList;
101 if(fQASecondaryAntiProtonsAcceptedList)
102 delete fQASecondaryAntiProtonsAcceptedList;
103 if(fQASecondaryAntiProtonsRejectedList)
104 delete fQASecondaryAntiProtonsRejectedList;
106 if(fPDGList) delete fPDGList;
107 if(fMCProcessesList) delete fMCProcessesList;
109 if(fAcceptedCutList) delete fAcceptedCutList;
110 if(fRejectedCutList) delete fRejectedCutList;
111 if(fAcceptedDCAList) delete fAcceptedDCAList;
112 if(fRejectedDCAList) delete fRejectedDCAList;
115 //____________________________________________________________________//
116 Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
118 if(fFunctionProbabilityFlag) {
119 if(i == 0) partFrac = fElectronFunction->Eval(p);
120 if(i == 1) partFrac = fMuonFunction->Eval(p);
121 if(i == 2) partFrac = fPionFunction->Eval(p);
122 if(i == 3) partFrac = fKaonFunction->Eval(p);
123 if(i == 4) partFrac = fProtonFunction->Eval(p);
125 else partFrac = fPartFrac[i];
130 //____________________________________________________________________//
131 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDtrack* track) {
132 // Checks if the track is excluded from the cuts
133 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
134 Float_t dcaXY = 0.0, dcaZ = 0.0;
136 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
137 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
139 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
140 dcaXY = -100.0, dcaZ = -100.0;
147 track->GetImpactParametersTPC(dcaXY,dcaZ);
150 else if(fUseHybridTPC) {
151 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
153 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
154 dcaXY = -100.0, dcaZ = -100.0;
161 track->GetImpactParameters(dcaXY,dcaZ);
169 track->GetImpactParameters(dcaXY,dcaZ);
173 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
174 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
176 Float_t chi2PerClusterITS = -1;
178 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
179 Float_t chi2PerClusterTPC = -1;
181 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
184 track->GetExternalCovariance(extCov);
186 if(fPointOnITSLayer1Flag)
187 if(!track->HasPointOnITSLayer(0)) return kFALSE;
188 if(fPointOnITSLayer2Flag)
189 if(!track->HasPointOnITSLayer(1)) return kFALSE;
190 if(fPointOnITSLayer3Flag)
191 if(!track->HasPointOnITSLayer(2)) return kFALSE;
192 if(fPointOnITSLayer4Flag)
193 if(!track->HasPointOnITSLayer(3)) return kFALSE;
194 if(fPointOnITSLayer5Flag)
195 if(!track->HasPointOnITSLayer(4)) return kFALSE;
196 if(fPointOnITSLayer6Flag)
197 if(!track->HasPointOnITSLayer(5)) return kFALSE;
198 if(fMinITSClustersFlag)
199 if(nClustersITS < fMinITSClusters) return kFALSE;
200 if(fMaxChi2PerITSClusterFlag)
201 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
202 if(fMinTPCClustersFlag)
203 if(nClustersTPC < fMinTPCClusters) return kFALSE;
204 if(fMaxChi2PerTPCClusterFlag)
205 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
207 if(extCov[0] > fMaxCov11) return kFALSE;
209 if(extCov[2] > fMaxCov22) return kFALSE;
211 if(extCov[5] > fMaxCov33) return kFALSE;
213 if(extCov[9] > fMaxCov44) return kFALSE;
215 if(extCov[14] > fMaxCov55) return kFALSE;
216 if(fMaxSigmaToVertexFlag)
217 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
218 if(fMaxSigmaToVertexTPCFlag)
219 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
221 if(TMath::Abs(dcaXY) > fMaxDCAXY) return kFALSE;
223 if(TMath::Abs(dcaXY) > fMaxDCAXYTPC) return kFALSE;
225 if(TMath::Abs(dcaZ) > fMaxDCAZ) return kFALSE;
227 if(TMath::Abs(dcaZ) > fMaxDCAZTPC) return kFALSE;
228 if(fMaxConstrainChi2Flag) {
229 if(track->GetConstrainedChi2() > 0)
230 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
233 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
235 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
237 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
239 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
241 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
242 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
248 //____________________________________________________________________//
249 void AliProtonQAAnalysis::FillQA(AliESDtrack* track, AliStack *stack) {
250 // Checks if the track is excluded from the cuts
251 Int_t nPrimaries = stack->GetNprimary();
252 Int_t label = TMath::Abs(track->GetLabel());
254 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
255 Float_t dcaXY = 0.0, dcaZ = 0.0;
256 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
257 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
259 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
260 dcaXY = -100.0, dcaZ = -100.0;
267 track->GetImpactParametersTPC(dcaXY,dcaZ);
270 else if(fUseHybridTPC) {
271 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
273 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
274 dcaXY = -100.0, dcaZ = -100.0;
281 track->GetImpactParameters(dcaXY,dcaZ);
289 track->GetImpactParameters(dcaXY,dcaZ);
293 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
294 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
296 Float_t chi2PerClusterITS = -1;
298 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
299 Float_t chi2PerClusterTPC = -1;
301 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
304 track->GetExternalCovariance(extCov);
306 //cout<<"Charge: "<<track->Charge()<<
307 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
308 //" - TPC clusters: "<<nClustersTPC<<endl;
310 if(track->Charge() > 0) {
312 if(label <= nPrimaries) {
313 if(fMinITSClustersFlag) {
314 if(nClustersITS < fMinITSClusters) {
315 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
318 else if(nClustersITS >= fMinITSClusters)
319 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
321 if(fMaxChi2PerITSClusterFlag) {
322 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
323 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
326 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
327 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
328 }//chi2 per ITS cluster
329 if(fMinTPCClustersFlag) {
330 if(nClustersTPC < fMinTPCClusters) {
331 //cout<<"Primary proton rejected"<<endl;
332 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
335 else if(nClustersTPC >= fMinTPCClusters) {
336 //cout<<"Primary proton accepted"<<endl;
337 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
340 if(fMaxChi2PerTPCClusterFlag) {
341 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
342 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
345 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
346 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
347 }//chi2 per TPC cluster
349 if(extCov[0] > fMaxCov11) {
350 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
353 else if(extCov[0] <= fMaxCov11)
354 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
357 if(extCov[2] > fMaxCov22) {
358 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
361 else if(extCov[2] <= fMaxCov22)
362 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
365 if(extCov[5] > fMaxCov33) {
366 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
369 else if(extCov[5] <= fMaxCov33)
370 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
373 if(extCov[9] > fMaxCov44) {
374 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
377 else if(extCov[9] <= fMaxCov44)
378 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
381 if(extCov[14] > fMaxCov55) {
382 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
385 else if(extCov[14] <= fMaxCov55)
386 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
388 if(fMaxSigmaToVertexFlag) {
389 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
390 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
393 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
394 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
396 if(fMaxSigmaToVertexTPCFlag) {
397 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
398 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
401 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
402 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
403 }//sigma to vertex TPC
405 if(dcaXY > fMaxDCAXY) {
406 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(dcaXY);
409 else if(dcaXY <= fMaxDCAXY)
410 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
411 }//DCA xy global tracking
412 if(fMaxDCAXYTPCFlag) {
413 if(dcaXY > fMaxDCAXYTPC) {
414 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(dcaXY);
417 else if(dcaXY <= fMaxDCAXYTPC)
418 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
419 }//DCA xy TPC tracking
421 if(dcaZ > fMaxDCAZ) {
422 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(dcaZ);
425 else if(dcaZ <= fMaxDCAZ)
426 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
427 }//DCA z global tracking
428 if(fMaxDCAZTPCFlag) {
429 if(dcaZ > fMaxDCAZTPC) {
430 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(dcaZ);
433 else if(dcaZ <= fMaxDCAZTPC)
434 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
435 }//DCA z TPC tracking
436 if(fMaxConstrainChi2Flag) {
437 if(track->GetConstrainedChi2() > 0) {
438 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
439 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
442 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
443 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
445 }//constrain chi2 - vertex
447 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
448 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
451 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
452 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
455 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
456 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
459 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
460 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
463 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
464 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
467 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
468 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
471 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
472 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
475 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
476 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
478 if(fPointOnITSLayer1Flag) {
479 if(!track->HasPointOnITSLayer(0)) {
480 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
482 else if(track->HasPointOnITSLayer(0))
483 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
485 if(fPointOnITSLayer2Flag) {
486 if(!track->HasPointOnITSLayer(1)) {
487 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
489 else if(track->HasPointOnITSLayer(1))
490 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
492 if(fPointOnITSLayer3Flag) {
493 if(!track->HasPointOnITSLayer(2)) {
494 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
496 else if(track->HasPointOnITSLayer(2))
497 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
499 if(fPointOnITSLayer4Flag) {
500 if(!track->HasPointOnITSLayer(3)) {
501 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
503 else if(track->HasPointOnITSLayer(3))
504 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
506 if(fPointOnITSLayer5Flag) {
507 if(!track->HasPointOnITSLayer(4)) {
508 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
510 else if(track->HasPointOnITSLayer(4))
511 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
513 if(fPointOnITSLayer6Flag) {
514 if(!track->HasPointOnITSLayer(5)) {
515 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
517 else if(track->HasPointOnITSLayer(5))
518 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
520 }//primary particle cut
523 if(label > nPrimaries) {
524 if(fMinITSClustersFlag) {
525 if(nClustersITS < fMinITSClusters) {
526 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
529 else if(nClustersITS >= fMinITSClusters)
530 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
532 if(fMaxChi2PerITSClusterFlag) {
533 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
534 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
537 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
538 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
539 }//chi2 per ITS cluster
540 if(fMinTPCClustersFlag) {
541 if(nClustersTPC < fMinTPCClusters) {
542 //cout<<"Secondary proton rejected"<<endl;
543 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
546 else if(nClustersTPC >= fMinTPCClusters) {
547 //cout<<"Secondary proton accepted"<<endl;
548 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
551 if(fMaxChi2PerTPCClusterFlag) {
552 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
553 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
556 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
557 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
558 }//chi2 per TPC cluster
560 if(extCov[0] > fMaxCov11) {
561 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
564 else if(extCov[0] <= fMaxCov11)
565 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
568 if(extCov[2] > fMaxCov22) {
569 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
572 else if(extCov[2] <= fMaxCov22)
573 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
576 if(extCov[5] > fMaxCov33) {
577 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
580 else if(extCov[5] <= fMaxCov33)
581 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
584 if(extCov[9] > fMaxCov44) {
585 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
588 else if(extCov[9] <= fMaxCov44)
589 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
592 if(extCov[14] > fMaxCov55) {
593 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
596 else if(extCov[14] <= fMaxCov55)
597 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
599 if(fMaxSigmaToVertexFlag) {
600 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
601 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
604 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
605 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
607 if(fMaxSigmaToVertexTPCFlag) {
608 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
609 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
612 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
613 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
614 }//sigma to vertex TPC
616 if(dcaXY > fMaxDCAXY) {
617 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(dcaXY);
620 else if(dcaXY <= fMaxDCAXY)
621 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
622 }//DCA xy global tracking
623 if(fMaxDCAXYTPCFlag) {
624 if(dcaXY > fMaxDCAXYTPC) {
625 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(dcaXY);
628 else if(dcaXY <= fMaxDCAXYTPC)
629 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
630 }//DCA xy TPC tracking
632 if(dcaZ > fMaxDCAZ) {
633 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(dcaZ);
636 else if(dcaZ <= fMaxDCAZ)
637 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
638 }//DCA z global tracking
639 if(fMaxDCAZTPCFlag) {
640 if(dcaZ > fMaxDCAZTPC) {
641 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(dcaZ);
644 else if(dcaZ <= fMaxDCAZTPC)
645 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
646 }//DCA z TPC tracking
647 if(fMaxConstrainChi2Flag) {
648 if(track->GetConstrainedChi2() > 0) {
649 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
650 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
653 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
654 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
656 }//constrain chi2 - vertex
658 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
659 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
662 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
663 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
666 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
667 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
670 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
671 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
674 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
675 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
678 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
679 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
682 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
683 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
686 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
687 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
689 if(fPointOnITSLayer1Flag) {
690 if(!track->HasPointOnITSLayer(0)) {
691 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
693 else if(track->HasPointOnITSLayer(0))
694 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
696 if(fPointOnITSLayer2Flag) {
697 if(!track->HasPointOnITSLayer(1)) {
698 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
700 else if(track->HasPointOnITSLayer(1))
701 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
703 if(fPointOnITSLayer3Flag) {
704 if(!track->HasPointOnITSLayer(2)) {
705 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
707 else if(track->HasPointOnITSLayer(2))
708 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
710 if(fPointOnITSLayer4Flag) {
711 if(!track->HasPointOnITSLayer(3)) {
712 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
714 else if(track->HasPointOnITSLayer(3))
715 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
717 if(fPointOnITSLayer5Flag) {
718 if(!track->HasPointOnITSLayer(4)) {
719 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
721 else if(track->HasPointOnITSLayer(4))
722 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
724 if(fPointOnITSLayer6Flag) {
725 if(!track->HasPointOnITSLayer(5)) {
726 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
728 else if(track->HasPointOnITSLayer(5))
729 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
731 }//secondary particle cut
735 if(track->Charge() < 0) {
737 if(label <= nPrimaries) {
738 if(fMinITSClustersFlag) {
739 if(nClustersITS < fMinITSClusters) {
740 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
743 else if(nClustersITS >= fMinITSClusters)
744 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
746 if(fMaxChi2PerITSClusterFlag) {
747 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
748 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
751 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
752 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
753 }//chi2 per ITS cluster
754 if(fMinTPCClustersFlag) {
755 if(nClustersTPC < fMinTPCClusters) {
756 //cout<<"Primary antiproton rejected"<<endl;
757 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
760 else if(nClustersTPC >= fMinTPCClusters) {
761 //cout<<"Primary antiproton accepted"<<endl;
762 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
765 if(fMaxChi2PerTPCClusterFlag) {
766 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
767 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
770 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
771 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
772 }//chi2 per TPC cluster
774 if(extCov[0] > fMaxCov11) {
775 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
778 else if(extCov[0] <= fMaxCov11)
779 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
782 if(extCov[2] > fMaxCov22) {
783 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
786 else if(extCov[2] <= fMaxCov22)
787 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
790 if(extCov[5] > fMaxCov33) {
791 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
794 else if(extCov[5] <= fMaxCov33)
795 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
798 if(extCov[9] > fMaxCov44) {
799 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
802 else if(extCov[9] <= fMaxCov44)
803 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
806 if(extCov[14] > fMaxCov55) {
807 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
810 else if(extCov[14] <= fMaxCov55)
811 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
813 if(fMaxSigmaToVertexFlag) {
814 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
815 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
818 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
819 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
821 if(fMaxSigmaToVertexTPCFlag) {
822 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
823 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
826 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
827 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
828 }//sigma to vertex TPC
830 if(dcaXY > fMaxDCAXY) {
831 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
834 else if(dcaXY <= fMaxDCAXY)
835 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
836 }//DCA xy global tracking
837 if(fMaxDCAXYTPCFlag) {
838 if(dcaXY > fMaxDCAXYTPC) {
839 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
842 else if(dcaXY <= fMaxDCAXYTPC)
843 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
844 }//DCA xy TPC tracking
846 if(dcaZ > fMaxDCAZ) {
847 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
850 else if(dcaZ <= fMaxDCAZ)
851 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
852 }//DCA z global tracking
853 if(fMaxDCAZTPCFlag) {
854 if(dcaZ > fMaxDCAZTPC) {
855 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
858 else if(dcaZ <= fMaxDCAZTPC)
859 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
860 }//DCA z TPC tracking
861 if(fMaxConstrainChi2Flag) {
862 if(track->GetConstrainedChi2() > 0) {
863 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
864 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
867 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
868 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
870 }//constrain chi2 - vertex
872 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
873 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
876 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
877 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
880 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
881 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
884 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
885 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
888 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
889 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
892 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
893 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
896 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
897 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
900 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
901 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
903 if(fPointOnITSLayer1Flag) {
904 if(!track->HasPointOnITSLayer(0)) {
905 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
907 else if(track->HasPointOnITSLayer(0))
908 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
910 if(fPointOnITSLayer2Flag) {
911 if(!track->HasPointOnITSLayer(1)) {
912 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
914 else if(track->HasPointOnITSLayer(1))
915 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
917 if(fPointOnITSLayer3Flag) {
918 if(!track->HasPointOnITSLayer(2)) {
919 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
921 else if(track->HasPointOnITSLayer(2))
922 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
924 if(fPointOnITSLayer4Flag) {
925 if(!track->HasPointOnITSLayer(3)) {
926 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
928 else if(track->HasPointOnITSLayer(3))
929 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
931 if(fPointOnITSLayer5Flag) {
932 if(!track->HasPointOnITSLayer(4)) {
933 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
935 else if(track->HasPointOnITSLayer(4))
936 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
938 if(fPointOnITSLayer6Flag) {
939 if(!track->HasPointOnITSLayer(5)) {
940 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
942 else if(track->HasPointOnITSLayer(5))
943 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
945 }//primary particle cut
948 if(label > nPrimaries) {
949 if(fMinITSClustersFlag) {
950 if(nClustersITS < fMinITSClusters) {
951 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
954 else if(nClustersITS >= fMinITSClusters)
955 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
957 if(fMaxChi2PerITSClusterFlag) {
958 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
959 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
962 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
963 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
964 }//chi2 per ITS cluster
965 if(fMinTPCClustersFlag) {
966 if(nClustersTPC < fMinTPCClusters) {
967 //cout<<"Secondary antiproton rejected"<<endl;
968 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
971 else if(nClustersTPC >= fMinTPCClusters) {
972 //cout<<"Secondary antiproton accepted"<<endl;
973 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
976 if(fMaxChi2PerTPCClusterFlag) {
977 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
978 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
981 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
982 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
983 }//chi2 per TPC cluster
985 if(extCov[0] > fMaxCov11) {
986 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
989 else if(extCov[0] <= fMaxCov11)
990 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
993 if(extCov[2] > fMaxCov22) {
994 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
997 else if(extCov[2] <= fMaxCov22)
998 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1001 if(extCov[5] > fMaxCov33) {
1002 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1005 else if(extCov[5] <= fMaxCov33)
1006 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1009 if(extCov[9] > fMaxCov44) {
1010 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1013 else if(extCov[9] <= fMaxCov44)
1014 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1017 if(extCov[14] > fMaxCov55) {
1018 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1021 else if(extCov[14] <= fMaxCov55)
1022 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1024 if(fMaxSigmaToVertexFlag) {
1025 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1026 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1029 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1030 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1032 if(fMaxSigmaToVertexTPCFlag) {
1033 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1034 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1037 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1038 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1039 }//sigma to vertex TPC
1041 if(dcaXY > fMaxDCAXY) {
1042 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
1045 else if(dcaXY <= fMaxDCAXY)
1046 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
1047 }//DCA xy global tracking
1048 if(fMaxDCAXYTPCFlag) {
1049 if(dcaXY > fMaxDCAXYTPC) {
1050 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
1053 else if(dcaXY <= fMaxDCAXYTPC)
1054 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
1055 }//DCA xy TPC tracking
1057 if(dcaZ > fMaxDCAZ) {
1058 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
1061 else if(dcaZ <= fMaxDCAZ)
1062 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
1063 }//DCA z global tracking
1064 if(fMaxDCAZTPCFlag) {
1065 if(dcaZ > fMaxDCAZTPC) {
1066 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
1069 else if(dcaZ <= fMaxDCAZTPC)
1070 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
1071 }//DCA z TPC tracking
1072 if(fMaxConstrainChi2Flag) {
1073 if(track->GetConstrainedChi2() > 0) {
1074 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1075 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1078 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1079 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1081 }//constrain chi2 - vertex
1083 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1084 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1087 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1088 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1091 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1092 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1095 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1096 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1099 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1100 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1103 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1104 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1107 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1108 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1111 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1112 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1114 if(fPointOnITSLayer1Flag) {
1115 if(!track->HasPointOnITSLayer(0)) {
1116 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1118 else if(track->HasPointOnITSLayer(0))
1119 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1121 if(fPointOnITSLayer2Flag) {
1122 if(!track->HasPointOnITSLayer(1)) {
1123 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1125 else if(track->HasPointOnITSLayer(1))
1126 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1128 if(fPointOnITSLayer3Flag) {
1129 if(!track->HasPointOnITSLayer(2)) {
1130 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1132 else if(track->HasPointOnITSLayer(2))
1133 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1135 if(fPointOnITSLayer4Flag) {
1136 if(!track->HasPointOnITSLayer(3)) {
1137 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1139 else if(track->HasPointOnITSLayer(3))
1140 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1142 if(fPointOnITSLayer5Flag) {
1143 if(!track->HasPointOnITSLayer(4)) {
1144 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1146 else if(track->HasPointOnITSLayer(4))
1147 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1149 if(fPointOnITSLayer6Flag) {
1150 if(!track->HasPointOnITSLayer(5)) {
1151 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1153 else if(track->HasPointOnITSLayer(5))
1154 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1156 }//secondary particle cut
1160 //____________________________________________________________________//
1161 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1162 // Calculates the number of sigma to the vertex.
1167 if((fUseTPCOnly)&&(!fUseHybridTPC))
1168 esdTrack->GetImpactParametersTPC(b,bCov);
1170 esdTrack->GetImpactParameters(b,bCov);
1172 if (bCov[0]<=0 || bCov[2]<=0) {
1173 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1174 bCov[0]=0; bCov[2]=0;
1176 bRes[0] = TMath::Sqrt(bCov[0]);
1177 bRes[1] = TMath::Sqrt(bCov[2]);
1179 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1181 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1183 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1185 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1190 //____________________________________________________________________//
1191 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1192 //returns the rapidity of the proton - to be removed
1193 Double_t fMass = 9.38270000000000048e-01;
1195 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1196 TMath::Power(Py,2) +
1197 TMath::Power(Pz,2));
1198 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1201 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1206 //____________________________________________________________________//
1207 void AliProtonQAAnalysis::SetQAOn() {
1208 //initializes the QA lists
1209 //fQAHistograms = kTRUE;
1210 fGlobalQAList = new TList();
1211 fQA2DList = new TList();
1212 fQA2DList->SetName("fQA2DList");
1213 fGlobalQAList->Add(fQA2DList);
1215 fQAPrimaryProtonsAcceptedList = new TList();
1216 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1217 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1219 fQAPrimaryProtonsRejectedList = new TList();
1220 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1221 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1223 fQASecondaryProtonsAcceptedList = new TList();
1224 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1225 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1227 fQASecondaryProtonsRejectedList = new TList();
1228 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1229 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1231 fQAPrimaryAntiProtonsAcceptedList = new TList();
1232 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1233 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1235 fQAPrimaryAntiProtonsRejectedList = new TList();
1236 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1237 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1239 fQASecondaryAntiProtonsAcceptedList = new TList();
1240 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1241 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1243 fQASecondaryAntiProtonsRejectedList = new TList();
1244 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1245 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1248 //____________________________________________________________________//
1249 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1250 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1251 //Initializes the QA binning
1253 fMinY = minY; fMaxY = maxY;
1255 fMinPt = minPt; fMaxPt = maxPt;
1258 if(fRunMCAnalysis) InitMCAnalysis();
1261 //____________________________________________________________________//
1262 void AliProtonQAAnalysis::InitCutLists() {
1263 //Initialization of the cut lists
1264 //Adding each monitored object in each list
1267 fAcceptedCutList = new TList();
1268 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1269 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1270 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1271 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1272 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1273 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1274 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1275 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1277 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1278 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1279 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1280 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1281 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1282 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1283 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1284 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1286 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1287 ";x^{2}/N_{clusters} (ITS);Entries",
1289 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1290 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1291 ";x^{2}/N_{clusters} (ITS);Entries",
1293 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1294 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1295 ";x^{2}/N_{clusters} (ITS);Entries",
1297 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1298 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1299 ";x^{2}/N_{clusters} (ITS);Entries",
1301 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1303 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1304 ";Log_{10}(#chi^{2});Entries",
1306 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1307 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1308 ";Log_{10}(#chi^{2});Entries",
1310 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1311 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1312 ";Log_{10}(#chi^{2});Entries",
1314 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1315 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1316 ";Log_{10}(#chi^{2});Entries",
1318 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1320 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1321 ";N_{clusters} (TPC);Entries",
1323 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1324 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1325 ";N_{clusters} (TPC);Entries",
1327 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1328 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1329 ";N_{clusters} (TPC);Entries",
1331 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1332 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1333 ";N_{clusters} (TPC);Entries",
1335 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1337 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1338 ";x^{2}/N_{clusters} (TPC);Entries",
1340 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1341 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1342 ";x^{2}/N_{clusters} (TPC);Entries",
1344 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1345 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1346 ";x^{2}/N_{clusters} (TPC);Entries",
1348 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1349 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1350 ";x^{2}/N_{clusters} (TPC);Entries",
1352 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1354 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1355 ";#sigma_{y} [cm];Entries",
1357 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1358 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1359 ";#sigma_{y} [cm];Entries",
1361 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1362 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1363 ";#sigma_{y} [cm];Entries",
1365 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1366 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1367 ";#sigma_{y} [cm];Entries",
1369 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1372 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1373 ";#sigma_{z} [cm];Entries",
1375 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1376 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1377 ";#sigma_{z} [cm];Entries",
1379 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1380 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1381 ";#sigma_{z} [cm];Entries",
1383 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1384 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1385 ";#sigma_{z} [cm];Entries",
1387 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1390 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1391 ";#sigma_{sin(#phi)};Entries",
1393 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1394 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1395 ";#sigma_{sin(#phi)};Entries",
1397 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1398 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1399 ";#sigma_{sin(#phi)};Entries",
1401 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1402 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1403 ";#sigma_{sin(#phi)};Entries",
1405 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1408 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1409 ";#sigma_{tan(#lambda)};Entries",
1411 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1412 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1413 ";#sigma_{tan(#lambda)};Entries",
1415 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1416 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1417 ";#sigma_{tan(#lambda)};Entries",
1419 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1420 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1421 ";#sigma_{tan(#lambda)};Entries",
1423 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1426 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1427 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1429 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1430 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1431 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1433 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1434 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1435 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1437 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1438 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1439 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1441 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1444 fAcceptedDCAList = new TList();
1445 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1446 ";DCA_{xy} [cm];Entries",
1448 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1449 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1450 ";DCA_{xy} [cm];Entries",
1452 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1453 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1454 ";DCA_{xy} [cm];Entries",
1456 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1457 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1458 ";DCA_{xy} [cm];Entries",
1461 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1462 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1463 ";DCA_{z} [cm];Entries",
1465 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1466 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1467 ";DCA_{z} [cm];Entries",
1469 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1470 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1471 ";DCA_{z} [cm];Entries",
1473 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1474 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1475 ";DCA_{z} [cm];Entries",
1477 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1479 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1480 ";#sigma_{Vertex};Entries",
1482 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1483 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1484 ";#sigma_{Vertex};Entries",
1486 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1487 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1488 ";#sigma_{Vertex};Entries",
1490 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1491 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1492 ";#sigma_{Vertex};Entries",
1494 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1498 //____________________________________________________________________//
1499 void AliProtonQAAnalysis::InitQA() {
1500 //Initializes the QA histograms and builds the directory structure
1501 //if(!fQAHistograms)
1505 //TDirectory *dir2D = gDirectory->mkdir("2D");
1506 //fGlobalQAList->Add(dir2D); dir2D->cd();
1507 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1509 fNBinsY,fMinY,fMaxY,
1510 fNBinsPt,fMinPt,fMaxPt);
1511 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1512 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1513 fQA2DList->Add(gHistYPtPrimaryProtonsPass);
1514 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1516 fNBinsY,fMinY,fMaxY,
1517 fNBinsPt,fMinPt,fMaxPt);
1518 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1519 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1520 fQA2DList->Add(gHistYPtPrimaryProtonsReject);
1522 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1524 fNBinsY,fMinY,fMaxY,
1525 fNBinsPt,fMinPt,fMaxPt);
1526 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1527 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1528 fQA2DList->Add(gHistYPtSecondaryProtonsPass);
1529 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1531 fNBinsY,fMinY,fMaxY,
1532 fNBinsPt,fMinPt,fMaxPt);
1533 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1534 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1535 fQA2DList->Add(gHistYPtSecondaryProtonsReject);
1537 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1539 fNBinsY,fMinY,fMaxY,
1540 fNBinsPt,fMinPt,fMaxPt);
1541 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1542 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1543 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);
1544 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1546 fNBinsY,fMinY,fMaxY,
1547 fNBinsPt,fMinPt,fMaxPt);
1548 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1549 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1550 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);
1552 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1554 fNBinsY,fMinY,fMaxY,
1555 fNBinsPt,fMinPt,fMaxPt);
1556 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1557 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1558 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);
1559 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1561 fNBinsY,fMinY,fMaxY,
1562 fNBinsPt,fMinPt,fMaxPt);
1563 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1564 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1565 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);
1567 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
1569 fNBinsY,fMinY,fMaxY,
1570 fNBinsPt,fMinPt,fMaxPt);
1571 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
1572 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
1573 fQA2DList->Add(gHistYPtPrimaryProtonsMC);
1574 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
1576 fNBinsY,fMinY,fMaxY,
1577 fNBinsPt,fMinPt,fMaxPt);
1578 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
1579 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
1580 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);
1582 /*gDirectory->cd("../");
1584 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1585 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1587 //________________________________________________________________//
1588 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1589 dirProtonsPrimary->cd();
1590 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1591 dirProtonsPrimaryAccepted->cd();*/
1593 //Accepted primary protons
1594 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1595 ";N_{clusters} (ITS);Entries",
1597 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1598 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1599 ";x^{2}/N_{clusters} (ITS);Entries",
1601 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1602 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1603 ";N_{clusters} (TPC);Entries",
1605 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1606 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1607 ";x^{2}/N_{clusters} (TPC);Entries",
1609 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1610 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
1611 ";#sigma_{y} [cm];Entries",
1613 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
1614 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
1615 ";#sigma_{z} [cm];Entries",
1617 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
1618 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
1619 ";#sigma_{sin(#phi)};Entries",
1621 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
1622 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
1623 ";#sigma_{tan(#lambda)};Entries",
1625 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
1626 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
1627 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1629 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
1630 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
1631 ";#sigma_{Vertex};Entries",
1633 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
1634 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
1635 ";#sigma_{Vertex};Entries",
1637 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
1638 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
1639 ";DCA_{xy} [cm];Entries",
1641 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
1642 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
1643 ";DCA_{xy} [cm];Entries",
1645 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
1646 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
1647 ";DCA_{z} [cm];Entries",
1649 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
1650 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
1651 ";DCA_{z} [cm];Entries",
1653 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
1654 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
1655 ";Log_{10}(#chi^{2});Entries",
1657 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
1658 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
1660 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
1661 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
1663 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
1664 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
1666 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
1667 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
1669 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
1670 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
1672 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
1673 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
1675 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
1676 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
1678 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
1679 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
1681 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
1682 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
1684 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
1685 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
1687 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
1689 //Rejected primary protons
1690 /*gDirectory->cd("../");
1691 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1692 dirProtonsPrimaryRejected->cd();*/
1694 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
1695 ";N_{clusters} (ITS);Entries",
1697 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
1698 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
1699 ";x^{2}/N_{clusters} (ITS);Entries",
1701 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
1702 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
1703 ";N_{clusters} (TPC);Entries",
1705 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
1706 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
1707 ";x^{2}/N_{clusters} (TPC);Entries",
1709 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
1710 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
1711 ";#sigma_{y} [cm];Entries",
1713 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
1714 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
1715 ";#sigma_{z} [cm];Entries",
1717 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
1718 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
1719 ";#sigma_{sin(#phi)};Entries",
1721 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
1722 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
1723 ";#sigma_{tan(#lambda)};Entries",
1725 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
1726 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
1727 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1729 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
1730 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
1731 ";#sigma_{Vertex};Entries",
1733 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
1734 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
1735 ";#sigma_{Vertex};Entries",
1737 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
1738 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
1739 ";DCA_{xy} [cm];Entries",
1741 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
1742 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
1743 ";DCA_{xy} [cm];Entries",
1745 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
1746 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
1747 ";DCA_{z} [cm];Entries",
1749 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
1750 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
1751 ";DCA_{z} [cm];Entries",
1753 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
1754 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
1755 ";Log_{10}(#chi^{2});Entries",
1757 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
1758 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
1760 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
1761 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
1763 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
1764 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
1766 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
1767 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
1769 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
1770 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
1772 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
1773 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
1775 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
1776 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
1778 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
1779 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
1781 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
1782 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
1784 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
1785 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
1787 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
1789 //________________________________________________________________//
1790 /*gDirectory->cd("../../");
1792 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
1793 dirProtonsSecondary->cd();
1794 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
1795 dirProtonsSecondaryAccepted->cd();*/
1797 //Accepted secondary protons
1798 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
1799 ";N_{clusters} (ITS);Entries",
1801 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
1802 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
1803 ";x^{2}/N_{clusters} (ITS);Entries",
1805 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
1806 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
1807 ";N_{clusters} (TPC);Entries",
1809 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
1810 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
1811 ";x^{2}/N_{clusters} (TPC);Entries",
1813 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
1814 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
1815 ";#sigma_{y} [cm];Entries",
1817 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
1818 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
1819 ";#sigma_{z} [cm];Entries",
1821 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
1822 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
1823 ";#sigma_{sin(#phi)};Entries",
1825 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
1826 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
1827 ";#sigma_{tan(#lambda)};Entries",
1829 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
1830 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
1831 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1833 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
1834 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
1835 ";#sigma_{Vertex};Entries",
1837 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
1838 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
1839 ";#sigma_{Vertex};Entries",
1841 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
1842 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
1843 ";DCA_{xy} [cm];Entries",
1845 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
1846 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
1847 ";DCA_{xy} [cm];Entries",
1849 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
1850 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
1851 ";DCA_{z} [cm];Entries",
1853 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
1854 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
1855 ";DCA_{z} [cm];Entries",
1857 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
1858 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
1859 ";Log_{10}(#chi^{2});Entries",
1861 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
1862 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
1864 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
1865 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
1867 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
1868 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
1870 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
1871 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
1873 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
1874 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
1876 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
1877 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
1879 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
1880 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
1882 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
1883 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
1885 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
1886 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
1888 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
1889 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
1891 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
1893 //Rejected secondary protons
1894 /*gDirectory->cd("../");
1895 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
1896 dirProtonsSecondaryRejected->cd();*/
1898 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
1899 ";N_{clusters} (ITS);Entries",
1901 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
1902 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
1903 ";x^{2}/N_{clusters} (ITS);Entries",
1905 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
1906 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
1907 ";N_{clusters} (TPC);Entries",
1909 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
1910 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
1911 ";x^{2}/N_{clusters} (TPC);Entries",
1913 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
1914 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
1915 ";#sigma_{y} [cm];Entries",
1917 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
1918 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
1919 ";#sigma_{z} [cm];Entries",
1921 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
1922 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
1923 ";#sigma_{sin(#phi)};Entries",
1925 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
1926 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
1927 ";#sigma_{tan(#lambda)};Entries",
1929 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
1930 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
1931 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1933 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
1934 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
1935 ";#sigma_{Vertex};Entries",
1937 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
1938 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
1939 ";#sigma_{Vertex};Entries",
1941 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
1942 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
1943 ";DCA_{xy} [cm];Entries",
1945 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
1946 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
1947 ";DCA_{xy} [cm];Entries",
1949 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
1950 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
1951 ";DCA_{z} [cm];Entries",
1953 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
1954 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
1955 ";DCA_{z} [cm];Entries",
1957 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
1958 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
1959 ";Log_{10}(#chi^{2});Entries",
1961 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
1962 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
1964 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
1965 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
1967 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
1968 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
1970 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
1971 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
1973 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
1974 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
1976 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
1977 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
1979 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
1980 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
1982 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
1983 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
1985 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
1986 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
1988 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
1989 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
1991 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
1994 /*gDirectory->cd("../../../");
1997 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
1998 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2000 //________________________________________________________________//
2001 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2002 dirAntiProtonsPrimary->cd();
2003 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2004 dirAntiProtonsPrimaryAccepted->cd();*/
2006 //Accepted primary antiprotons
2007 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2008 ";N_{clusters} (ITS);Entries",
2010 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2011 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2012 ";x^{2}/N_{clusters} (ITS);Entries",
2014 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2015 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2016 ";N_{clusters} (TPC);Entries",
2018 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2019 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2020 ";x^{2}/N_{clusters} (TPC);Entries",
2022 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2023 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2024 ";#sigma_{y} [cm];Entries",
2026 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2027 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2028 ";#sigma_{z} [cm];Entries",
2030 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2031 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2032 ";#sigma_{sin(#phi)};Entries",
2034 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2035 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2036 ";#sigma_{tan(#lambda)};Entries",
2038 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2039 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2040 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2042 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2043 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2044 ";#sigma_{Vertex};Entries",
2046 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2047 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2048 ";#sigma_{Vertex};Entries",
2050 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2051 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2052 ";DCA_{xy} [cm];Entries",
2054 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2055 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2056 ";DCA_{xy} [cm];Entries",
2058 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2059 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2060 ";DCA_{z} [cm];Entries",
2062 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2063 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2064 ";DCA_{z} [cm];Entries",
2066 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2067 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2068 ";Log_{10}(#chi^{2});Entries",
2070 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2071 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2073 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2074 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2076 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2077 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2079 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2080 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2082 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2083 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2085 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2086 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2088 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2089 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2091 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2092 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2094 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2095 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2097 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2098 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2100 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2102 //Rejected primary antiprotons
2103 /*gDirectory->cd("../");
2104 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2105 dirAntiProtonsPrimaryRejected->cd();*/
2107 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2108 ";N_{clusters} (ITS);Entries",
2110 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2111 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2112 ";x^{2}/N_{clusters} (ITS);Entries",
2114 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2115 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2116 ";N_{clusters} (TPC);Entries",
2118 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2119 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2120 ";x^{2}/N_{clusters} (TPC);Entries",
2122 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2123 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2124 ";#sigma_{y} [cm];Entries",
2126 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2127 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2128 ";#sigma_{z} [cm];Entries",
2130 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2131 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2132 ";#sigma_{sin(#phi)};Entries",
2134 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2135 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2136 ";#sigma_{tan(#lambda)};Entries",
2138 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2139 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2140 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2142 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2143 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2144 ";#sigma_{Vertex};Entries",
2146 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2147 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2148 ";#sigma_{Vertex};Entries",
2150 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2151 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2152 ";DCA_{xy} [cm];Entries",
2154 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2155 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2156 ";DCA_{xy} [cm];Entries",
2158 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2159 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2160 ";DCA_{z} [cm];Entries",
2162 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2163 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2164 ";DCA_{z} [cm];Entries",
2166 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2167 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2168 ";Log_{10}(#chi^{2});Entries",
2170 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2171 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2173 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2174 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2176 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2177 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2179 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2180 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2182 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2183 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2185 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2186 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2188 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2189 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2191 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2192 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2194 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2195 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2197 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2198 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2200 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2202 //________________________________________________________________//
2203 /*gDirectory->cd("../../");
2205 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2206 dirAntiProtonsSecondary->cd();
2207 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2208 dirAntiProtonsSecondaryAccepted->cd();*/
2210 //Accepted secondary antiprotons
2211 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2212 ";N_{clusters} (ITS);Entries",
2214 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2215 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2216 ";x^{2}/N_{clusters} (ITS);Entries",
2218 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2219 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2220 ";N_{clusters} (TPC);Entries",
2222 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2223 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2224 ";x^{2}/N_{clusters} (TPC);Entries",
2226 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2227 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2228 ";#sigma_{y} [cm];Entries",
2230 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2231 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2232 ";#sigma_{z} [cm];Entries",
2234 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2235 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2236 ";#sigma_{sin(#phi)};Entries",
2238 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2239 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2240 ";#sigma_{tan(#lambda)};Entries",
2242 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2243 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2244 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2246 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2247 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2248 ";#sigma_{Vertex};Entries",
2250 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2251 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2252 ";#sigma_{Vertex};Entries",
2254 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2255 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2256 ";DCA_{xy} [cm];Entries",
2258 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2259 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2260 ";DCA_{xy} [cm];Entries",
2262 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2263 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2264 ";DCA_{z} [cm];Entries",
2266 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2267 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2268 ";DCA_{z} [cm];Entries",
2270 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2271 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2272 ";Log_{10}(#chi^{2});Entries",
2274 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2275 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2277 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2278 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2280 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2281 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2283 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2284 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2286 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2287 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2289 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2290 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2292 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2293 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2295 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2296 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2298 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2299 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2301 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2302 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2304 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2306 //Rejected secondary antiprotons
2307 /*gDirectory->cd("../");
2308 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2309 dirAntiProtonsSecondaryRejected->cd();*/
2311 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2312 ";N_{clusters} (ITS);Entries",
2314 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2315 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2316 ";x^{2}/N_{clusters} (ITS);Entries",
2318 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2319 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2320 ";N_{clusters} (TPC);Entries",
2322 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2323 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2324 ";x^{2}/N_{clusters} (TPC);Entries",
2326 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2327 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2328 ";#sigma_{y} [cm];Entries",
2330 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2331 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2332 ";#sigma_{z} [cm];Entries",
2334 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2335 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2336 ";#sigma_{sin(#phi)};Entries",
2338 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2339 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2340 ";#sigma_{tan(#lambda)};Entries",
2342 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2343 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2344 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2346 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2347 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2348 ";#sigma_{Vertex};Entries",
2350 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2351 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2352 ";#sigma_{Vertex};Entries",
2354 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2355 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2356 ";DCA_{xy} [cm];Entries",
2358 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2359 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2360 ";DCA_{xy} [cm];Entries",
2362 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2363 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2364 ";DCA_{z} [cm];Entries",
2366 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2367 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2368 ";DCA_{z} [cm];Entries",
2370 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2371 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2372 ";Log_{10}(#chi^{2});Entries",
2374 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2375 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2377 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2378 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2380 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2381 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2383 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2384 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2386 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2387 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2389 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2390 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2392 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2393 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2395 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2396 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2398 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2399 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2401 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2402 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2404 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2407 //____________________________________________________________________//
2408 void AliProtonQAAnalysis::RunQA(AliStack *stack, AliESDEvent *fESD) {
2411 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
2412 TParticle *particle = stack->Particle(iParticle);
2413 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2414 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2415 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2417 Int_t pdgcode = particle->GetPdgCode();
2419 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
2423 if(pdgcode == -2212)
2424 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
2431 Int_t nGoodTracks = fESD->GetNumberOfTracks();
2432 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2433 AliESDtrack* track = fESD->GetTrack(iTracks);
2434 Int_t label = TMath::Abs(track->GetLabel());
2436 Double_t Pt = 0.0, P = 0.0;
2437 Double_t probability[5];
2438 Float_t dcaXY = 0.0, dcaZ = 0.0;
2439 Double_t nSigmaToVertex = GetSigmaToVertex(track);
2441 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
2442 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
2444 Float_t chi2PerClusterITS = -1;
2445 if (nClustersITS!=0)
2446 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
2447 Float_t chi2PerClusterTPC = -1;
2448 if (nClustersTPC!=0)
2449 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
2450 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
2451 Double_t extCov[15];
2452 track->GetExternalCovariance(extCov);
2456 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2457 if(!tpcTrack) continue;
2458 Pt = tpcTrack->Pt();
2460 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
2461 else track->GetImpactParametersTPC(dcaXY,dcaZ);
2464 track->GetTPCpid(probability);
2466 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2467 rcc += probability[i]*GetParticleFraction(i,P);
2468 if(rcc == 0.0) continue;
2470 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2471 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2472 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2473 if(fParticleType == 4) {
2474 FillQA(track, stack);
2475 if(IsAccepted(track)) {
2476 if(label <= stack->GetNprimary()) {
2477 if(track->Charge() > 0) {
2478 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2479 if(track->HasPointOnITSLayer(iLayer))
2480 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
2482 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
2483 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
2484 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
2485 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
2486 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
2487 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
2488 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
2489 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
2490 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
2491 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
2493 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
2494 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
2495 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
2496 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2501 else if(track->Charge() < 0) {
2502 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2503 if(track->HasPointOnITSLayer(iLayer))
2504 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
2506 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
2507 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
2508 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
2509 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
2510 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
2511 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
2512 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
2513 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
2514 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
2515 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
2517 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
2518 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
2519 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
2520 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2525 }//primary particles
2526 else if(label > stack->GetNprimary()) {
2527 TParticle *particle = stack->Particle(label);
2528 Int_t lPartMother = -1;
2529 Int_t motherPDGCode = -1;
2531 lPartMother = particle->GetFirstMother();
2532 TParticle *motherParticle = stack->Particle(lPartMother);
2533 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2536 if(fMCProcessIdFlag)
2537 if(particle->GetUniqueID() != fMCProcessId) continue;
2538 if(fMotherParticlePDGCodeFlag)
2539 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2541 if(track->Charge() > 0) {
2542 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2543 if(track->HasPointOnITSLayer(iLayer))
2544 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
2546 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
2547 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
2548 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
2549 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
2550 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
2551 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
2552 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
2553 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
2554 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
2555 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
2557 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
2558 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
2559 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
2560 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
2565 else if(track->Charge() < 0) {
2566 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2567 if(track->HasPointOnITSLayer(iLayer))
2568 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
2570 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
2571 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
2572 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
2573 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
2574 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
2575 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
2576 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
2577 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
2578 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
2579 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
2581 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
2582 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
2583 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
2584 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
2589 }//secondary particles
2590 }//accepted - track cuts
2591 else if(!IsAccepted(track)) {
2592 if(label <= stack->GetNprimary()) {
2593 if(track->Charge() > 0)
2594 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
2598 else if(track->Charge() < 0)
2599 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
2603 }//primary particles
2604 else if(label > stack->GetNprimary()) {
2605 if(track->Charge() > 0)
2606 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
2610 else if(track->Charge() < 0)
2611 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
2615 }//secondary particles
2616 }//rejected - track cuts
2620 else if(!fUseTPCOnly) {
2621 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2622 if(!tpcTrack) continue;
2625 track->GetImpactParameters(dcaXY,dcaZ);
2628 track->GetESDpid(probability);
2630 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2631 rcc += probability[i]*GetParticleFraction(i,P);
2632 if(rcc == 0.0) continue;
2634 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2635 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2636 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2637 if(fParticleType == 4) {
2638 FillQA(track, stack);
2639 if(IsAccepted(track)) {
2640 if(label <= stack->GetNprimary()) {
2641 if(track->Charge() > 0) {
2642 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2643 if(track->HasPointOnITSLayer(iLayer))
2644 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
2646 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
2647 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
2648 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
2649 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
2650 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
2651 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
2652 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
2653 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
2654 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
2655 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
2657 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
2658 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
2659 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
2660 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2665 else if(track->Charge() < 0) {
2666 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2667 if(track->HasPointOnITSLayer(iLayer))
2668 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
2670 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
2671 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
2672 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
2673 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
2674 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
2675 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
2676 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
2677 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
2678 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
2679 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
2681 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
2682 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
2683 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
2684 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2689 }//primary particles
2690 else if(label > stack->GetNprimary()) {
2691 TParticle *particle = stack->Particle(label);
2692 Int_t lPartMother = -1;
2693 Int_t motherPDGCode = -1;
2695 lPartMother = particle->GetFirstMother();
2696 TParticle *motherParticle = stack->Particle(lPartMother);
2697 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2700 if(fMCProcessIdFlag)
2701 if(particle->GetUniqueID() != fMCProcessId) continue;
2702 if(fMotherParticlePDGCodeFlag)
2703 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2705 if(track->Charge() > 0) {
2706 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2707 if(track->HasPointOnITSLayer(iLayer))
2708 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
2710 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
2711 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
2712 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
2713 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
2714 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
2715 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
2716 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
2717 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
2718 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
2719 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
2721 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
2722 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
2723 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
2724 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
2729 else if(track->Charge() < 0) {
2730 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2731 if(track->HasPointOnITSLayer(iLayer))
2732 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
2734 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
2735 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
2736 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
2737 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
2738 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
2739 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
2740 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
2741 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
2742 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
2743 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
2745 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
2746 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
2747 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
2748 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
2753 }//secondary particles
2754 }//accepted - track cuts
2755 else if(!IsAccepted(track)) {
2756 if(label <= stack->GetNprimary()) {
2757 if(track->Charge() > 0)
2758 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
2762 else if(track->Charge() < 0)
2763 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
2767 }//primary particles
2768 else if(label > stack->GetNprimary()) {
2769 if(track->Charge() > 0)
2770 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
2774 else if(track->Charge() < 0)
2775 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
2779 }//secondary particles
2780 }//rejected - track cuts
2782 }//combined tracking
2787 //____________________________________________________________________//
2788 void AliProtonQAAnalysis::InitMCAnalysis() {
2789 //MC analysis - 3D histograms: y-pT-pdg
2790 fPDGList = new TList();
2791 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
2792 ";y;P_{T} [GeV/c];PDG",
2793 fNBinsY,fMinY,fMaxY,
2794 fNBinsPt,fMinPt,fMaxPt,
2796 fPDGList->Add(gHistYPtPDGProtons);
2797 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
2798 ";y;P_{T} [GeV/c];PDG",
2799 fNBinsY,fMinY,fMaxY,
2800 fNBinsPt,fMinPt,fMaxPt,
2802 fPDGList->Add(gHistYPtPDGAntiProtons);
2805 fMCProcessesList = new TList();
2806 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
2807 fMCProcessesList->Add(gHistProtonsFromKLProcess);
2808 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
2809 fMCProcessesList->Add(gHistProtonsFromPionProcess);
2810 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
2811 fMCProcessesList->Add(gHistProtonsFromKSProcess);
2812 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
2813 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
2814 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
2815 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
2816 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
2817 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
2818 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
2819 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
2820 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
2821 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
2822 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
2823 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
2824 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
2825 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
2826 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
2827 fMCProcessesList->Add(gHistProtonsFromXi0Process);
2828 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
2829 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
2831 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
2832 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
2833 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
2834 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
2835 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
2836 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
2837 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
2838 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
2839 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
2840 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
2841 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
2842 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
2843 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
2844 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
2845 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
2846 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
2849 //____________________________________________________________________//
2850 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
2851 //Main analysis part - MC
2852 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2853 TParticle *particle = stack->Particle(iParticle);
2854 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2855 Int_t pdgcode = particle->GetPdgCode();
2856 if(pdgcode == 2212) {
2857 if(iParticle <= stack->GetNprimary())
2858 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
2862 else if(iParticle > stack->GetNprimary()) {
2863 Int_t lPartMother = particle->GetFirstMother();
2864 TParticle *motherParticle = stack->Particle(lPartMother);
2865 if(!motherParticle) continue;
2866 Int_t motherPDGCode = motherParticle->GetPdgCode();
2867 if(fMCProcessIdFlag)
2868 if(particle->GetUniqueID() != fMCProcessId) continue;
2869 if(fMotherParticlePDGCodeFlag)
2870 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2872 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
2876 ConvertPDGToInt(motherParticle->GetPdgCode()));
2878 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
2879 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
2880 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
2881 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
2882 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
2883 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
2884 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
2885 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
2886 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
2887 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
2888 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
2889 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
2890 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
2891 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
2892 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
2893 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
2894 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
2895 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
2896 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
2897 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
2898 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
2899 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
2900 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
2901 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
2903 }//pdgcode of proton
2905 if(pdgcode == -2212) {
2906 if(iParticle <= stack->GetNprimary())
2907 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
2911 else if(iParticle > stack->GetNprimary()) {
2912 Int_t lPartMother = particle->GetFirstMother();
2913 TParticle *motherParticle = stack->Particle(lPartMother);
2914 if(!motherParticle) continue;
2915 Int_t motherPDGCode = motherParticle->GetPdgCode();
2916 if(fMCProcessIdFlag)
2917 if(particle->GetUniqueID() != fMCProcessId) continue;
2918 if(fMotherParticlePDGCodeFlag)
2919 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2921 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
2925 ConvertPDGToInt(motherParticle->GetPdgCode()));
2928 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
2929 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
2930 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
2931 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
2932 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
2933 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
2934 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
2935 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
2936 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
2937 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
2938 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
2939 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
2940 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
2941 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
2942 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
2943 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
2944 }//secondary antiproton
2945 }//pdgcode of antiproton
2950 //____________________________________________________________________//
2951 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
2952 //Converts the pdg code to an int based on the following scheme:
2953 //1: PDG code: 130 - Name: K_L0
2954 //2: PDG code: 211 - Name: pi+
2955 //3: PDG code: 310 - Name: K_S0
2956 //4: PDG code: 321 - Name: K+
2957 //5: PDG code: 2112 - Name: neutron
2958 //6: PDG code: 2212 - Name: proton
2959 //7: PDG code: 3112 - Name: Sigma-
2960 //8: PDG code: 3122 - Name: Lambda0
2961 //9: PDG code: 3222 - Name: Sigma+
2962 //10: PDG code: 3312 - Name: Xi-
2963 //11: PDG code: 3322 - Name: Xi0
2964 //12: PDG code: 3334 - Name: Omega-
2966 switch (TMath::Abs(pdgCode)) {