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),
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;
135 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
137 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
154 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
155 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
157 Float_t chi2PerClusterITS = -1;
159 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
160 Float_t chi2PerClusterTPC = -1;
162 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
165 track->GetExternalCovariance(extCov);
167 if(fPointOnITSLayer1Flag)
168 if(!track->HasPointOnITSLayer(0)) return kFALSE;
169 if(fPointOnITSLayer2Flag)
170 if(!track->HasPointOnITSLayer(1)) return kFALSE;
171 if(fPointOnITSLayer3Flag)
172 if(!track->HasPointOnITSLayer(2)) return kFALSE;
173 if(fPointOnITSLayer4Flag)
174 if(!track->HasPointOnITSLayer(3)) return kFALSE;
175 if(fPointOnITSLayer5Flag)
176 if(!track->HasPointOnITSLayer(4)) return kFALSE;
177 if(fPointOnITSLayer6Flag)
178 if(!track->HasPointOnITSLayer(5)) return kFALSE;
179 if(fMinITSClustersFlag)
180 if(nClustersITS < fMinITSClusters) return kFALSE;
181 if(fMaxChi2PerITSClusterFlag)
182 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
183 if(fMinTPCClustersFlag)
184 if(nClustersTPC < fMinTPCClusters) return kFALSE;
185 if(fMaxChi2PerTPCClusterFlag)
186 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
188 if(extCov[0] > fMaxCov11) return kFALSE;
190 if(extCov[2] > fMaxCov22) return kFALSE;
192 if(extCov[5] > fMaxCov33) return kFALSE;
194 if(extCov[9] > fMaxCov44) return kFALSE;
196 if(extCov[14] > fMaxCov55) return kFALSE;
197 if(fMaxSigmaToVertexFlag)
198 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
199 if(fMaxSigmaToVertexTPCFlag)
200 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
202 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
204 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
206 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
208 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
210 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
211 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
217 //____________________________________________________________________//
218 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDtrack* track) {
219 // Checks if the track is excluded from the cuts
220 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
221 Float_t dcaXY = 0.0, dcaZ = 0.0;
224 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
226 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
227 dcaXY = -100.0, dcaZ = -100.0;
234 track->GetImpactParametersTPC(dcaXY,dcaZ);
242 track->GetImpactParameters(dcaXY,dcaZ);
246 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
247 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
249 Float_t chi2PerClusterITS = -1;
251 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
252 Float_t chi2PerClusterTPC = -1;
254 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
257 track->GetExternalCovariance(extCov);
259 if(fPointOnITSLayer1Flag)
260 if(!track->HasPointOnITSLayer(0)) return kFALSE;
261 if(fPointOnITSLayer2Flag)
262 if(!track->HasPointOnITSLayer(1)) return kFALSE;
263 if(fPointOnITSLayer3Flag)
264 if(!track->HasPointOnITSLayer(2)) return kFALSE;
265 if(fPointOnITSLayer4Flag)
266 if(!track->HasPointOnITSLayer(3)) return kFALSE;
267 if(fPointOnITSLayer5Flag)
268 if(!track->HasPointOnITSLayer(4)) return kFALSE;
269 if(fPointOnITSLayer6Flag)
270 if(!track->HasPointOnITSLayer(5)) return kFALSE;
271 if(fMinITSClustersFlag)
272 if(nClustersITS < fMinITSClusters) return kFALSE;
273 if(fMaxChi2PerITSClusterFlag)
274 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
275 if(fMinTPCClustersFlag)
276 if(nClustersTPC < fMinTPCClusters) return kFALSE;
277 if(fMaxChi2PerTPCClusterFlag)
278 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
280 if(extCov[0] > fMaxCov11) return kFALSE;
282 if(extCov[2] > fMaxCov22) return kFALSE;
284 if(extCov[5] > fMaxCov33) return kFALSE;
286 if(extCov[9] > fMaxCov44) return kFALSE;
288 if(extCov[14] > fMaxCov55) return kFALSE;
289 if(fMaxSigmaToVertexFlag)
290 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
291 if(fMaxSigmaToVertexTPCFlag)
292 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
294 if(TMath::Abs(dcaXY) > fMaxDCAXY) return kFALSE;
296 if(TMath::Abs(dcaXY) > fMaxDCAXY) return kFALSE;
298 if(TMath::Abs(dcaZ) > fMaxDCAZ) return kFALSE;
300 if(TMath::Abs(dcaZ) > fMaxDCAZ) return kFALSE;
301 if(fMaxConstrainChi2Flag) {
302 if(track->GetConstrainedChi2() > 0)
303 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
306 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
308 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
310 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
312 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
314 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
315 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
321 //____________________________________________________________________//
322 void AliProtonQAAnalysis::FillQA(AliESDtrack* track, AliStack *stack) {
323 // Checks if the track is excluded from the cuts
324 Int_t nPrimaries = stack->GetNprimary();
325 Int_t label = TMath::Abs(track->GetLabel());
327 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
328 Float_t dcaXY = 0.0, dcaZ = 0.0;
330 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
332 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
333 dcaXY = -100.0, dcaZ = -100.0;
340 track->GetImpactParametersTPC(dcaXY,dcaZ);
348 track->GetImpactParameters(dcaXY,dcaZ);
352 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
353 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
355 Float_t chi2PerClusterITS = -1;
357 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
358 Float_t chi2PerClusterTPC = -1;
360 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
363 track->GetExternalCovariance(extCov);
365 //cout<<"Charge: "<<track->Charge()<<
366 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
367 //" - TPC clusters: "<<nClustersTPC<<endl;
369 if(track->Charge() > 0) {
371 if(label <= nPrimaries) {
372 if(fMinITSClustersFlag) {
373 if(nClustersITS < fMinITSClusters) {
374 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
377 else if(nClustersITS >= fMinITSClusters)
378 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
380 if(fMaxChi2PerITSClusterFlag) {
381 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
382 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
385 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
386 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
387 }//chi2 per ITS cluster
388 if(fMinTPCClustersFlag) {
389 if(nClustersTPC < fMinTPCClusters) {
390 //cout<<"Primary proton rejected"<<endl;
391 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
394 else if(nClustersTPC >= fMinTPCClusters) {
395 //cout<<"Primary proton accepted"<<endl;
396 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
399 if(fMaxChi2PerTPCClusterFlag) {
400 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
401 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
404 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
405 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
406 }//chi2 per TPC cluster
408 if(extCov[0] > fMaxCov11) {
409 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
412 else if(extCov[0] <= fMaxCov11)
413 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
416 if(extCov[2] > fMaxCov22) {
417 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
420 else if(extCov[2] <= fMaxCov22)
421 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
424 if(extCov[5] > fMaxCov33) {
425 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
428 else if(extCov[5] <= fMaxCov33)
429 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
432 if(extCov[9] > fMaxCov44) {
433 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
436 else if(extCov[9] <= fMaxCov44)
437 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
440 if(extCov[14] > fMaxCov55) {
441 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
444 else if(extCov[14] <= fMaxCov55)
445 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
447 if(fMaxSigmaToVertexFlag) {
448 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
449 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
452 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
453 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
455 if(fMaxSigmaToVertexTPCFlag) {
456 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
457 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
460 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
461 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
462 }//sigma to vertex TPC
464 if(dcaXY > fMaxDCAXY) {
465 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(dcaXY);
468 else if(dcaXY <= fMaxDCAXY)
469 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
470 }//DCA xy global tracking
471 if(fMaxDCAXYTPCFlag) {
472 if(dcaXY > fMaxDCAXY) {
473 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(dcaXY);
476 else if(dcaXY <= fMaxDCAXY)
477 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
478 }//DCA xy TPC tracking
480 if(dcaZ > fMaxDCAZ) {
481 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(dcaZ);
484 else if(dcaZ <= fMaxDCAZ)
485 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
486 }//DCA z global tracking
487 if(fMaxDCAZTPCFlag) {
488 if(dcaZ > fMaxDCAZ) {
489 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(dcaZ);
492 else if(dcaZ <= fMaxDCAZ)
493 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
494 }//DCA z TPC tracking
495 if(fMaxConstrainChi2Flag) {
496 if(track->GetConstrainedChi2() > 0) {
497 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
498 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
501 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
502 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
504 }//constrain chi2 - vertex
506 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
507 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
510 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
511 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
514 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
515 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
518 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
519 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
522 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
523 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
526 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
527 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
530 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
531 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
534 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
535 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
537 if(fPointOnITSLayer1Flag) {
538 if(!track->HasPointOnITSLayer(0)) {
539 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
541 else if(track->HasPointOnITSLayer(0))
542 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
544 if(fPointOnITSLayer2Flag) {
545 if(!track->HasPointOnITSLayer(1)) {
546 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
548 else if(track->HasPointOnITSLayer(1))
549 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
551 if(fPointOnITSLayer3Flag) {
552 if(!track->HasPointOnITSLayer(2)) {
553 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
555 else if(track->HasPointOnITSLayer(2))
556 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
558 if(fPointOnITSLayer4Flag) {
559 if(!track->HasPointOnITSLayer(3)) {
560 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
562 else if(track->HasPointOnITSLayer(3))
563 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
565 if(fPointOnITSLayer5Flag) {
566 if(!track->HasPointOnITSLayer(4)) {
567 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
569 else if(track->HasPointOnITSLayer(4))
570 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
572 if(fPointOnITSLayer6Flag) {
573 if(!track->HasPointOnITSLayer(5)) {
574 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
576 else if(track->HasPointOnITSLayer(5))
577 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
579 }//primary particle cut
582 if(label > nPrimaries) {
583 if(fMinITSClustersFlag) {
584 if(nClustersITS < fMinITSClusters) {
585 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
588 else if(nClustersITS >= fMinITSClusters)
589 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
591 if(fMaxChi2PerITSClusterFlag) {
592 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
593 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
596 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
597 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
598 }//chi2 per ITS cluster
599 if(fMinTPCClustersFlag) {
600 if(nClustersTPC < fMinTPCClusters) {
601 //cout<<"Secondary proton rejected"<<endl;
602 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
605 else if(nClustersTPC >= fMinTPCClusters) {
606 //cout<<"Secondary proton accepted"<<endl;
607 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
610 if(fMaxChi2PerTPCClusterFlag) {
611 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
612 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
615 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
616 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
617 }//chi2 per TPC cluster
619 if(extCov[0] > fMaxCov11) {
620 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
623 else if(extCov[0] <= fMaxCov11)
624 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
627 if(extCov[2] > fMaxCov22) {
628 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
631 else if(extCov[2] <= fMaxCov22)
632 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
635 if(extCov[5] > fMaxCov33) {
636 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
639 else if(extCov[5] <= fMaxCov33)
640 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
643 if(extCov[9] > fMaxCov44) {
644 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
647 else if(extCov[9] <= fMaxCov44)
648 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
651 if(extCov[14] > fMaxCov55) {
652 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
655 else if(extCov[14] <= fMaxCov55)
656 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
658 if(fMaxSigmaToVertexFlag) {
659 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
660 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
663 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
664 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
666 if(fMaxSigmaToVertexTPCFlag) {
667 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
668 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
671 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
672 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
673 }//sigma to vertex TPC
675 if(dcaXY > fMaxDCAXY) {
676 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(dcaXY);
679 else if(dcaXY <= fMaxDCAXY)
680 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
681 }//DCA xy global tracking
682 if(fMaxDCAXYTPCFlag) {
683 if(dcaXY > fMaxDCAXY) {
684 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(dcaXY);
687 else if(dcaXY <= fMaxDCAXY)
688 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
689 }//DCA xy TPC tracking
691 if(dcaZ > fMaxDCAZ) {
692 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(dcaZ);
695 else if(dcaZ <= fMaxDCAZ)
696 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
697 }//DCA z global tracking
698 if(fMaxDCAZTPCFlag) {
699 if(dcaZ > fMaxDCAZ) {
700 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(dcaZ);
703 else if(dcaZ <= fMaxDCAZ)
704 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
705 }//DCA z TPC tracking
706 if(fMaxConstrainChi2Flag) {
707 if(track->GetConstrainedChi2() > 0) {
708 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
709 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
712 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
713 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
715 }//constrain chi2 - vertex
717 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
718 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
721 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
722 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
725 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
726 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
729 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
730 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
733 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
734 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
737 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
738 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
741 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
742 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
745 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
746 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
748 if(fPointOnITSLayer1Flag) {
749 if(!track->HasPointOnITSLayer(0)) {
750 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
752 else if(track->HasPointOnITSLayer(0))
753 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
755 if(fPointOnITSLayer2Flag) {
756 if(!track->HasPointOnITSLayer(1)) {
757 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
759 else if(track->HasPointOnITSLayer(1))
760 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
762 if(fPointOnITSLayer3Flag) {
763 if(!track->HasPointOnITSLayer(2)) {
764 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
766 else if(track->HasPointOnITSLayer(2))
767 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
769 if(fPointOnITSLayer4Flag) {
770 if(!track->HasPointOnITSLayer(3)) {
771 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
773 else if(track->HasPointOnITSLayer(3))
774 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
776 if(fPointOnITSLayer5Flag) {
777 if(!track->HasPointOnITSLayer(4)) {
778 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
780 else if(track->HasPointOnITSLayer(4))
781 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
783 if(fPointOnITSLayer6Flag) {
784 if(!track->HasPointOnITSLayer(5)) {
785 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
787 else if(track->HasPointOnITSLayer(5))
788 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
790 }//secondary particle cut
794 if(track->Charge() < 0) {
796 if(label <= nPrimaries) {
797 if(fMinITSClustersFlag) {
798 if(nClustersITS < fMinITSClusters) {
799 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
802 else if(nClustersITS >= fMinITSClusters)
803 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
805 if(fMaxChi2PerITSClusterFlag) {
806 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
807 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
810 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
811 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
812 }//chi2 per ITS cluster
813 if(fMinTPCClustersFlag) {
814 if(nClustersTPC < fMinTPCClusters) {
815 //cout<<"Primary antiproton rejected"<<endl;
816 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
819 else if(nClustersTPC >= fMinTPCClusters) {
820 //cout<<"Primary antiproton accepted"<<endl;
821 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
824 if(fMaxChi2PerTPCClusterFlag) {
825 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
826 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
829 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
830 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
831 }//chi2 per TPC cluster
833 if(extCov[0] > fMaxCov11) {
834 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
837 else if(extCov[0] <= fMaxCov11)
838 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
841 if(extCov[2] > fMaxCov22) {
842 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
845 else if(extCov[2] <= fMaxCov22)
846 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
849 if(extCov[5] > fMaxCov33) {
850 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
853 else if(extCov[5] <= fMaxCov33)
854 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
857 if(extCov[9] > fMaxCov44) {
858 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
861 else if(extCov[9] <= fMaxCov44)
862 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
865 if(extCov[14] > fMaxCov55) {
866 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
869 else if(extCov[14] <= fMaxCov55)
870 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
872 if(fMaxSigmaToVertexFlag) {
873 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
874 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
877 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
878 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
880 if(fMaxSigmaToVertexTPCFlag) {
881 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
882 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
885 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
886 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
887 }//sigma to vertex TPC
889 if(dcaXY > fMaxDCAXY) {
890 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
893 else if(dcaXY <= fMaxDCAXY)
894 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
895 }//DCA xy global tracking
896 if(fMaxDCAXYTPCFlag) {
897 if(dcaXY > fMaxDCAXY) {
898 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
901 else if(dcaXY <= fMaxDCAXY)
902 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
903 }//DCA xy TPC tracking
905 if(dcaZ > fMaxDCAZ) {
906 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
909 else if(dcaZ <= fMaxDCAZ)
910 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
911 }//DCA z global tracking
912 if(fMaxDCAZTPCFlag) {
913 if(dcaZ > fMaxDCAZ) {
914 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
917 else if(dcaZ <= fMaxDCAZ)
918 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
919 }//DCA z TPC tracking
920 if(fMaxConstrainChi2Flag) {
921 if(track->GetConstrainedChi2() > 0) {
922 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
923 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
926 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
927 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
929 }//constrain chi2 - vertex
931 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
932 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
935 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
936 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
939 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
940 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
943 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
944 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
947 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
948 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
951 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
952 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
955 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
956 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
959 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
960 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
962 if(fPointOnITSLayer1Flag) {
963 if(!track->HasPointOnITSLayer(0)) {
964 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
966 else if(track->HasPointOnITSLayer(0))
967 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
969 if(fPointOnITSLayer2Flag) {
970 if(!track->HasPointOnITSLayer(1)) {
971 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
973 else if(track->HasPointOnITSLayer(1))
974 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
976 if(fPointOnITSLayer3Flag) {
977 if(!track->HasPointOnITSLayer(2)) {
978 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
980 else if(track->HasPointOnITSLayer(2))
981 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
983 if(fPointOnITSLayer4Flag) {
984 if(!track->HasPointOnITSLayer(3)) {
985 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
987 else if(track->HasPointOnITSLayer(3))
988 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
990 if(fPointOnITSLayer5Flag) {
991 if(!track->HasPointOnITSLayer(4)) {
992 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
994 else if(track->HasPointOnITSLayer(4))
995 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
997 if(fPointOnITSLayer6Flag) {
998 if(!track->HasPointOnITSLayer(5)) {
999 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
1001 else if(track->HasPointOnITSLayer(5))
1002 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1004 }//primary particle cut
1007 if(label > nPrimaries) {
1008 if(fMinITSClustersFlag) {
1009 if(nClustersITS < fMinITSClusters) {
1010 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
1013 else if(nClustersITS >= fMinITSClusters)
1014 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1016 if(fMaxChi2PerITSClusterFlag) {
1017 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
1018 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1021 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
1022 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1023 }//chi2 per ITS cluster
1024 if(fMinTPCClustersFlag) {
1025 if(nClustersTPC < fMinTPCClusters) {
1026 //cout<<"Secondary antiproton rejected"<<endl;
1027 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1030 else if(nClustersTPC >= fMinTPCClusters) {
1031 //cout<<"Secondary antiproton accepted"<<endl;
1032 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1035 if(fMaxChi2PerTPCClusterFlag) {
1036 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
1037 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1040 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
1041 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1042 }//chi2 per TPC cluster
1044 if(extCov[0] > fMaxCov11) {
1045 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
1048 else if(extCov[0] <= fMaxCov11)
1049 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1052 if(extCov[2] > fMaxCov22) {
1053 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1056 else if(extCov[2] <= fMaxCov22)
1057 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1060 if(extCov[5] > fMaxCov33) {
1061 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1064 else if(extCov[5] <= fMaxCov33)
1065 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1068 if(extCov[9] > fMaxCov44) {
1069 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1072 else if(extCov[9] <= fMaxCov44)
1073 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1076 if(extCov[14] > fMaxCov55) {
1077 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1080 else if(extCov[14] <= fMaxCov55)
1081 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1083 if(fMaxSigmaToVertexFlag) {
1084 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1085 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1088 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1089 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1091 if(fMaxSigmaToVertexTPCFlag) {
1092 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1093 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1096 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1097 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1098 }//sigma to vertex TPC
1100 if(dcaXY > fMaxDCAXY) {
1101 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
1104 else if(dcaXY <= fMaxDCAXY)
1105 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
1106 }//DCA xy global tracking
1107 if(fMaxDCAXYTPCFlag) {
1108 if(dcaXY > fMaxDCAXY) {
1109 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
1112 else if(dcaXY <= fMaxDCAXY)
1113 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
1114 }//DCA xy TPC tracking
1116 if(dcaZ > fMaxDCAZ) {
1117 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
1120 else if(dcaZ <= fMaxDCAZ)
1121 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
1122 }//DCA z global tracking
1123 if(fMaxDCAZTPCFlag) {
1124 if(dcaZ > fMaxDCAZ) {
1125 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
1128 else if(dcaZ <= fMaxDCAZ)
1129 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
1130 }//DCA z TPC tracking
1131 if(fMaxConstrainChi2Flag) {
1132 if(track->GetConstrainedChi2() > 0) {
1133 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1134 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1137 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1138 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1140 }//constrain chi2 - vertex
1142 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1143 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1146 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1147 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1150 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1151 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1154 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1155 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1158 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1159 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1162 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1163 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1166 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1167 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1170 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1171 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1173 if(fPointOnITSLayer1Flag) {
1174 if(!track->HasPointOnITSLayer(0)) {
1175 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1177 else if(track->HasPointOnITSLayer(0))
1178 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1180 if(fPointOnITSLayer2Flag) {
1181 if(!track->HasPointOnITSLayer(1)) {
1182 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1184 else if(track->HasPointOnITSLayer(1))
1185 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1187 if(fPointOnITSLayer3Flag) {
1188 if(!track->HasPointOnITSLayer(2)) {
1189 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1191 else if(track->HasPointOnITSLayer(2))
1192 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1194 if(fPointOnITSLayer4Flag) {
1195 if(!track->HasPointOnITSLayer(3)) {
1196 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1198 else if(track->HasPointOnITSLayer(3))
1199 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1201 if(fPointOnITSLayer5Flag) {
1202 if(!track->HasPointOnITSLayer(4)) {
1203 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1205 else if(track->HasPointOnITSLayer(4))
1206 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1208 if(fPointOnITSLayer6Flag) {
1209 if(!track->HasPointOnITSLayer(5)) {
1210 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1212 else if(track->HasPointOnITSLayer(5))
1213 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1215 }//secondary particle cut
1219 //____________________________________________________________________//
1220 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1221 // Calculates the number of sigma to the vertex.
1227 esdTrack->GetImpactParametersTPC(b,bCov);
1229 esdTrack->GetImpactParameters(b,bCov);
1231 if (bCov[0]<=0 || bCov[2]<=0) {
1232 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1233 bCov[0]=0; bCov[2]=0;
1235 bRes[0] = TMath::Sqrt(bCov[0]);
1236 bRes[1] = TMath::Sqrt(bCov[2]);
1238 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1240 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1242 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1244 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1249 //____________________________________________________________________//
1250 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1251 //returns the rapidity of the proton - to be removed
1252 Double_t fMass = 9.38270000000000048e-01;
1254 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1255 TMath::Power(Py,2) +
1256 TMath::Power(Pz,2));
1257 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1260 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1265 //____________________________________________________________________//
1266 void AliProtonQAAnalysis::SetQAOn() {
1267 //initializes the QA lists
1268 //fQAHistograms = kTRUE;
1269 fGlobalQAList = new TList();
1270 fQA2DList = new TList();
1271 fQA2DList->SetName("fQA2DList");
1272 fGlobalQAList->Add(fQA2DList);
1274 fQAPrimaryProtonsAcceptedList = new TList();
1275 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1276 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1278 fQAPrimaryProtonsRejectedList = new TList();
1279 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1280 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1282 fQASecondaryProtonsAcceptedList = new TList();
1283 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1284 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1286 fQASecondaryProtonsRejectedList = new TList();
1287 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1288 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1290 fQAPrimaryAntiProtonsAcceptedList = new TList();
1291 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1292 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1294 fQAPrimaryAntiProtonsRejectedList = new TList();
1295 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1296 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1298 fQASecondaryAntiProtonsAcceptedList = new TList();
1299 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1300 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1302 fQASecondaryAntiProtonsRejectedList = new TList();
1303 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1304 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1307 //____________________________________________________________________//
1308 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1309 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1310 //Initializes the QA binning
1312 fMinY = minY; fMaxY = maxY;
1314 fMinPt = minPt; fMaxPt = maxPt;
1317 if(fRunMCAnalysis) InitMCAnalysis();
1320 //____________________________________________________________________//
1321 void AliProtonQAAnalysis::InitCutLists() {
1322 //Initialization of the cut lists
1323 //Adding each monitored object in each list
1326 fAcceptedCutList = new TList();
1327 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1328 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1329 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1330 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1331 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1332 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1333 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1334 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1336 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1337 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1338 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1339 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1340 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1341 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1342 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1343 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1345 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1346 ";x^{2}/N_{clusters} (ITS);Entries",
1348 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1349 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1350 ";x^{2}/N_{clusters} (ITS);Entries",
1352 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1353 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1354 ";x^{2}/N_{clusters} (ITS);Entries",
1356 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1357 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1358 ";x^{2}/N_{clusters} (ITS);Entries",
1360 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1362 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1363 ";Log_{10}(#chi^{2});Entries",
1365 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1366 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1367 ";Log_{10}(#chi^{2});Entries",
1369 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1370 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1371 ";Log_{10}(#chi^{2});Entries",
1373 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1374 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1375 ";Log_{10}(#chi^{2});Entries",
1377 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1379 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1380 ";N_{clusters} (TPC);Entries",
1382 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1383 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1384 ";N_{clusters} (TPC);Entries",
1386 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1387 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1388 ";N_{clusters} (TPC);Entries",
1390 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1391 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1392 ";N_{clusters} (TPC);Entries",
1394 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1396 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1397 ";x^{2}/N_{clusters} (TPC);Entries",
1399 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1400 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1401 ";x^{2}/N_{clusters} (TPC);Entries",
1403 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1404 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1405 ";x^{2}/N_{clusters} (TPC);Entries",
1407 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1408 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1409 ";x^{2}/N_{clusters} (TPC);Entries",
1411 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1413 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1414 ";#sigma_{y} [cm];Entries",
1416 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1417 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1418 ";#sigma_{y} [cm];Entries",
1420 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1421 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1422 ";#sigma_{y} [cm];Entries",
1424 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1425 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1426 ";#sigma_{y} [cm];Entries",
1428 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1431 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1432 ";#sigma_{z} [cm];Entries",
1434 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1435 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1436 ";#sigma_{z} [cm];Entries",
1438 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1439 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1440 ";#sigma_{z} [cm];Entries",
1442 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1443 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1444 ";#sigma_{z} [cm];Entries",
1446 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1449 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1450 ";#sigma_{sin(#phi)};Entries",
1452 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1453 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1454 ";#sigma_{sin(#phi)};Entries",
1456 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1457 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1458 ";#sigma_{sin(#phi)};Entries",
1460 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1461 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1462 ";#sigma_{sin(#phi)};Entries",
1464 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1467 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1468 ";#sigma_{tan(#lambda)};Entries",
1470 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1471 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1472 ";#sigma_{tan(#lambda)};Entries",
1474 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1475 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1476 ";#sigma_{tan(#lambda)};Entries",
1478 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1479 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1480 ";#sigma_{tan(#lambda)};Entries",
1482 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1485 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1486 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1488 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1489 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1490 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1492 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1493 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1494 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1496 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1497 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1498 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1500 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1503 fAcceptedDCAList = new TList();
1504 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1505 ";DCA_{xy} [cm];Entries",
1507 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1508 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1509 ";DCA_{xy} [cm];Entries",
1511 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1512 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1513 ";DCA_{xy} [cm];Entries",
1515 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1516 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1517 ";DCA_{xy} [cm];Entries",
1520 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1521 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1522 ";DCA_{z} [cm];Entries",
1524 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1525 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1526 ";DCA_{z} [cm];Entries",
1528 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1529 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1530 ";DCA_{z} [cm];Entries",
1532 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1533 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1534 ";DCA_{z} [cm];Entries",
1536 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1538 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1539 ";#sigma_{Vertex};Entries",
1541 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1542 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1543 ";#sigma_{Vertex};Entries",
1545 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1546 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1547 ";#sigma_{Vertex};Entries",
1549 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1550 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1551 ";#sigma_{Vertex};Entries",
1553 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1557 //____________________________________________________________________//
1558 void AliProtonQAAnalysis::InitQA() {
1559 //Initializes the QA histograms and builds the directory structure
1560 //if(!fQAHistograms)
1564 //TDirectory *dir2D = gDirectory->mkdir("2D");
1565 //fGlobalQAList->Add(dir2D); dir2D->cd();
1566 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1568 fNBinsY,fMinY,fMaxY,
1569 fNBinsPt,fMinPt,fMaxPt);
1570 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1571 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1572 fQA2DList->Add(gHistYPtPrimaryProtonsPass);
1573 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1575 fNBinsY,fMinY,fMaxY,
1576 fNBinsPt,fMinPt,fMaxPt);
1577 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1578 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1579 fQA2DList->Add(gHistYPtPrimaryProtonsReject);
1581 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1583 fNBinsY,fMinY,fMaxY,
1584 fNBinsPt,fMinPt,fMaxPt);
1585 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1586 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1587 fQA2DList->Add(gHistYPtSecondaryProtonsPass);
1588 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1590 fNBinsY,fMinY,fMaxY,
1591 fNBinsPt,fMinPt,fMaxPt);
1592 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1593 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1594 fQA2DList->Add(gHistYPtSecondaryProtonsReject);
1596 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1598 fNBinsY,fMinY,fMaxY,
1599 fNBinsPt,fMinPt,fMaxPt);
1600 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1601 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1602 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);
1603 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1605 fNBinsY,fMinY,fMaxY,
1606 fNBinsPt,fMinPt,fMaxPt);
1607 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1608 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1609 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);
1611 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1613 fNBinsY,fMinY,fMaxY,
1614 fNBinsPt,fMinPt,fMaxPt);
1615 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1616 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1617 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);
1618 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1620 fNBinsY,fMinY,fMaxY,
1621 fNBinsPt,fMinPt,fMaxPt);
1622 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1623 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1624 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);
1626 /*gDirectory->cd("../");
1628 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1629 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1631 //________________________________________________________________//
1632 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1633 dirProtonsPrimary->cd();
1634 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1635 dirProtonsPrimaryAccepted->cd();*/
1637 //Accepted primary protons
1638 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1639 ";N_{clusters} (ITS);Entries",
1641 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1642 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1643 ";x^{2}/N_{clusters} (ITS);Entries",
1645 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1646 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1647 ";N_{clusters} (TPC);Entries",
1649 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1650 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1651 ";x^{2}/N_{clusters} (TPC);Entries",
1653 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1654 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
1655 ";#sigma_{y} [cm];Entries",
1657 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
1658 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
1659 ";#sigma_{z} [cm];Entries",
1661 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
1662 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
1663 ";#sigma_{sin(#phi)};Entries",
1665 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
1666 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
1667 ";#sigma_{tan(#lambda)};Entries",
1669 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
1670 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
1671 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1673 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
1674 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
1675 ";#sigma_{Vertex};Entries",
1677 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
1678 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
1679 ";#sigma_{Vertex};Entries",
1681 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
1682 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
1683 ";DCA_{xy} [cm];Entries",
1685 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
1686 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
1687 ";DCA_{xy} [cm];Entries",
1689 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
1690 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
1691 ";DCA_{z} [cm];Entries",
1693 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
1694 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
1695 ";DCA_{z} [cm];Entries",
1697 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
1698 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
1699 ";Log_{10}(#chi^{2});Entries",
1701 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
1702 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
1704 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
1705 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
1707 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
1708 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
1710 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
1711 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
1713 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
1714 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
1716 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
1717 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
1719 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
1720 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
1722 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
1723 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
1725 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
1726 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
1728 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
1729 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
1731 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
1733 //Rejected primary protons
1734 /*gDirectory->cd("../");
1735 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1736 dirProtonsPrimaryRejected->cd();*/
1738 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
1739 ";N_{clusters} (ITS);Entries",
1741 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
1742 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
1743 ";x^{2}/N_{clusters} (ITS);Entries",
1745 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
1746 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
1747 ";N_{clusters} (TPC);Entries",
1749 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
1750 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
1751 ";x^{2}/N_{clusters} (TPC);Entries",
1753 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
1754 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
1755 ";#sigma_{y} [cm];Entries",
1757 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
1758 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
1759 ";#sigma_{z} [cm];Entries",
1761 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
1762 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
1763 ";#sigma_{sin(#phi)};Entries",
1765 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
1766 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
1767 ";#sigma_{tan(#lambda)};Entries",
1769 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
1770 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
1771 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1773 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
1774 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
1775 ";#sigma_{Vertex};Entries",
1777 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
1778 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
1779 ";#sigma_{Vertex};Entries",
1781 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
1782 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
1783 ";DCA_{xy} [cm];Entries",
1785 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
1786 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
1787 ";DCA_{xy} [cm];Entries",
1789 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
1790 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
1791 ";DCA_{z} [cm];Entries",
1793 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
1794 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
1795 ";DCA_{z} [cm];Entries",
1797 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
1798 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
1799 ";Log_{10}(#chi^{2});Entries",
1801 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
1802 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
1804 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
1805 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
1807 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
1808 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
1810 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
1811 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
1813 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
1814 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
1816 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
1817 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
1819 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
1820 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
1822 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
1823 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
1825 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
1826 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
1828 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
1829 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
1831 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
1833 //________________________________________________________________//
1834 /*gDirectory->cd("../../");
1836 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
1837 dirProtonsSecondary->cd();
1838 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
1839 dirProtonsSecondaryAccepted->cd();*/
1841 //Accepted secondary protons
1842 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
1843 ";N_{clusters} (ITS);Entries",
1845 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
1846 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
1847 ";x^{2}/N_{clusters} (ITS);Entries",
1849 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
1850 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
1851 ";N_{clusters} (TPC);Entries",
1853 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
1854 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
1855 ";x^{2}/N_{clusters} (TPC);Entries",
1857 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
1858 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
1859 ";#sigma_{y} [cm];Entries",
1861 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
1862 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
1863 ";#sigma_{z} [cm];Entries",
1865 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
1866 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
1867 ";#sigma_{sin(#phi)};Entries",
1869 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
1870 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
1871 ";#sigma_{tan(#lambda)};Entries",
1873 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
1874 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
1875 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1877 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
1878 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
1879 ";#sigma_{Vertex};Entries",
1881 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
1882 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
1883 ";#sigma_{Vertex};Entries",
1885 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
1886 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
1887 ";DCA_{xy} [cm];Entries",
1889 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
1890 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
1891 ";DCA_{xy} [cm];Entries",
1893 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
1894 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
1895 ";DCA_{z} [cm];Entries",
1897 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
1898 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
1899 ";DCA_{z} [cm];Entries",
1901 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
1902 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
1903 ";Log_{10}(#chi^{2});Entries",
1905 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
1906 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
1908 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
1909 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
1911 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
1912 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
1914 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
1915 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
1917 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
1918 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
1920 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
1921 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
1923 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
1924 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
1926 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
1927 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
1929 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
1930 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
1932 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
1933 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
1935 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
1937 //Rejected secondary protons
1938 /*gDirectory->cd("../");
1939 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
1940 dirProtonsSecondaryRejected->cd();*/
1942 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
1943 ";N_{clusters} (ITS);Entries",
1945 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
1946 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
1947 ";x^{2}/N_{clusters} (ITS);Entries",
1949 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
1950 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
1951 ";N_{clusters} (TPC);Entries",
1953 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
1954 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
1955 ";x^{2}/N_{clusters} (TPC);Entries",
1957 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
1958 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
1959 ";#sigma_{y} [cm];Entries",
1961 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
1962 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
1963 ";#sigma_{z} [cm];Entries",
1965 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
1966 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
1967 ";#sigma_{sin(#phi)};Entries",
1969 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
1970 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
1971 ";#sigma_{tan(#lambda)};Entries",
1973 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
1974 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
1975 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1977 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
1978 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
1979 ";#sigma_{Vertex};Entries",
1981 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
1982 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
1983 ";#sigma_{Vertex};Entries",
1985 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
1986 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
1987 ";DCA_{xy} [cm];Entries",
1989 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
1990 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
1991 ";DCA_{xy} [cm];Entries",
1993 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
1994 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
1995 ";DCA_{z} [cm];Entries",
1997 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
1998 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
1999 ";DCA_{z} [cm];Entries",
2001 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2002 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2003 ";Log_{10}(#chi^{2});Entries",
2005 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2006 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2008 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2009 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2011 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2012 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2014 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2015 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2017 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2018 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2020 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2021 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2023 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2024 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2026 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2027 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2029 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2030 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2032 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2033 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2035 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2038 /*gDirectory->cd("../../../");
2041 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2042 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2044 //________________________________________________________________//
2045 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2046 dirAntiProtonsPrimary->cd();
2047 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2048 dirAntiProtonsPrimaryAccepted->cd();*/
2050 //Accepted primary antiprotons
2051 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2052 ";N_{clusters} (ITS);Entries",
2054 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2055 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2056 ";x^{2}/N_{clusters} (ITS);Entries",
2058 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2059 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2060 ";N_{clusters} (TPC);Entries",
2062 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2063 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2064 ";x^{2}/N_{clusters} (TPC);Entries",
2066 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2067 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2068 ";#sigma_{y} [cm];Entries",
2070 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2071 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2072 ";#sigma_{z} [cm];Entries",
2074 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2075 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2076 ";#sigma_{sin(#phi)};Entries",
2078 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2079 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2080 ";#sigma_{tan(#lambda)};Entries",
2082 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2083 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2084 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2086 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2087 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2088 ";#sigma_{Vertex};Entries",
2090 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2091 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2092 ";#sigma_{Vertex};Entries",
2094 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2095 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2096 ";DCA_{xy} [cm];Entries",
2098 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2099 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2100 ";DCA_{xy} [cm];Entries",
2102 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2103 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2104 ";DCA_{z} [cm];Entries",
2106 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2107 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2108 ";DCA_{z} [cm];Entries",
2110 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2111 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2112 ";Log_{10}(#chi^{2});Entries",
2114 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2115 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2117 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2118 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2120 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2121 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2123 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2124 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2126 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2127 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2129 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2130 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2132 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2133 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2135 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2136 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2138 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2139 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2141 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2142 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2144 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2146 //Rejected primary antiprotons
2147 /*gDirectory->cd("../");
2148 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2149 dirAntiProtonsPrimaryRejected->cd();*/
2151 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2152 ";N_{clusters} (ITS);Entries",
2154 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2155 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2156 ";x^{2}/N_{clusters} (ITS);Entries",
2158 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2159 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2160 ";N_{clusters} (TPC);Entries",
2162 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2163 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2164 ";x^{2}/N_{clusters} (TPC);Entries",
2166 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2167 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2168 ";#sigma_{y} [cm];Entries",
2170 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2171 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2172 ";#sigma_{z} [cm];Entries",
2174 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2175 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2176 ";#sigma_{sin(#phi)};Entries",
2178 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2179 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2180 ";#sigma_{tan(#lambda)};Entries",
2182 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2183 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2184 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2186 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2187 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2188 ";#sigma_{Vertex};Entries",
2190 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2191 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2192 ";#sigma_{Vertex};Entries",
2194 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2195 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2196 ";DCA_{xy} [cm];Entries",
2198 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2199 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2200 ";DCA_{xy} [cm];Entries",
2202 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2203 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2204 ";DCA_{z} [cm];Entries",
2206 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2207 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2208 ";DCA_{z} [cm];Entries",
2210 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2211 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2212 ";Log_{10}(#chi^{2});Entries",
2214 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2215 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2217 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2218 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2220 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2221 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2223 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2224 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2226 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2227 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2229 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2230 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2232 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2233 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2235 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2236 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2238 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2239 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2241 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2242 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2244 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2246 //________________________________________________________________//
2247 /*gDirectory->cd("../../");
2249 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2250 dirAntiProtonsSecondary->cd();
2251 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2252 dirAntiProtonsSecondaryAccepted->cd();*/
2254 //Accepted secondary antiprotons
2255 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2256 ";N_{clusters} (ITS);Entries",
2258 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2259 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2260 ";x^{2}/N_{clusters} (ITS);Entries",
2262 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2263 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2264 ";N_{clusters} (TPC);Entries",
2266 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2267 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2268 ";x^{2}/N_{clusters} (TPC);Entries",
2270 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2271 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2272 ";#sigma_{y} [cm];Entries",
2274 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2275 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2276 ";#sigma_{z} [cm];Entries",
2278 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2279 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2280 ";#sigma_{sin(#phi)};Entries",
2282 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2283 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2284 ";#sigma_{tan(#lambda)};Entries",
2286 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2287 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2288 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2290 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2291 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2292 ";#sigma_{Vertex};Entries",
2294 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2295 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2296 ";#sigma_{Vertex};Entries",
2298 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2299 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2300 ";DCA_{xy} [cm];Entries",
2302 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2303 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2304 ";DCA_{xy} [cm];Entries",
2306 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2307 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2308 ";DCA_{z} [cm];Entries",
2310 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2311 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2312 ";DCA_{z} [cm];Entries",
2314 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2315 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2316 ";Log_{10}(#chi^{2});Entries",
2318 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2319 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2321 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2322 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2324 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2325 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2327 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2328 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2330 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2331 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2333 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2334 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2336 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2337 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2339 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2340 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2342 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2343 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2345 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2346 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2348 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2350 //Rejected secondary antiprotons
2351 /*gDirectory->cd("../");
2352 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2353 dirAntiProtonsSecondaryRejected->cd();*/
2355 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2356 ";N_{clusters} (ITS);Entries",
2358 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2359 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2360 ";x^{2}/N_{clusters} (ITS);Entries",
2362 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2363 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2364 ";N_{clusters} (TPC);Entries",
2366 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2367 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2368 ";x^{2}/N_{clusters} (TPC);Entries",
2370 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2371 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2372 ";#sigma_{y} [cm];Entries",
2374 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2375 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2376 ";#sigma_{z} [cm];Entries",
2378 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2379 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2380 ";#sigma_{sin(#phi)};Entries",
2382 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2383 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2384 ";#sigma_{tan(#lambda)};Entries",
2386 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2387 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2388 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2390 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2391 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2392 ";#sigma_{Vertex};Entries",
2394 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2395 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2396 ";#sigma_{Vertex};Entries",
2398 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2399 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2400 ";DCA_{xy} [cm];Entries",
2402 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2403 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2404 ";DCA_{xy} [cm];Entries",
2406 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2407 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2408 ";DCA_{z} [cm];Entries",
2410 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2411 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2412 ";DCA_{z} [cm];Entries",
2414 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2415 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2416 ";Log_{10}(#chi^{2});Entries",
2418 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2419 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2421 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2422 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2424 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2425 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2427 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2428 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2430 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2431 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2433 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2434 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2436 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2437 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2439 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2440 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2442 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2443 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2445 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2446 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2448 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2451 //____________________________________________________________________//
2452 void AliProtonQAAnalysis::RunQA(AliStack *stack, AliESDEvent *fESD) {
2454 Int_t nGoodTracks = fESD->GetNumberOfTracks();
2455 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2456 AliESDtrack* track = fESD->GetTrack(iTracks);
2457 Int_t label = TMath::Abs(track->GetLabel());
2459 Double_t Pt = 0.0, P = 0.0;
2460 Double_t probability[5];
2461 Float_t dcaXY = 0.0, dcaZ = 0.0;
2462 Double_t nSigmaToVertex = GetSigmaToVertex(track);
2464 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
2465 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
2467 Float_t chi2PerClusterITS = -1;
2468 if (nClustersITS!=0)
2469 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
2470 Float_t chi2PerClusterTPC = -1;
2471 if (nClustersTPC!=0)
2472 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
2473 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
2474 Double_t extCov[15];
2475 track->GetExternalCovariance(extCov);
2479 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2480 if(!tpcTrack) continue;
2481 Pt = tpcTrack->Pt();
2483 track->GetImpactParametersTPC(dcaXY,dcaZ);
2486 track->GetTPCpid(probability);
2488 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2489 rcc += probability[i]*GetParticleFraction(i,P);
2490 if(rcc == 0.0) continue;
2492 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2493 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2494 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2495 if(fParticleType == 4) {
2496 FillQA(track, stack);
2497 if(IsAccepted(track)) {
2498 if(label <= stack->GetNprimary()) {
2499 if(track->Charge() > 0) {
2500 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2501 if(track->HasPointOnITSLayer(iLayer))
2502 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
2504 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
2505 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
2506 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
2507 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
2508 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
2509 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
2510 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
2511 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
2512 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
2513 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
2515 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
2516 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
2517 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
2518 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2523 else if(track->Charge() < 0) {
2524 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2525 if(track->HasPointOnITSLayer(iLayer))
2526 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
2528 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
2529 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
2530 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
2531 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
2532 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
2533 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
2534 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
2535 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
2536 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
2537 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
2539 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
2540 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
2541 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
2542 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2547 }//primary particles
2548 else if(label > stack->GetNprimary()) {
2549 TParticle *particle = stack->Particle(label);
2550 Int_t lPartMother = -1;
2551 Int_t motherPDGCode = -1;
2553 lPartMother = particle->GetFirstMother();
2554 TParticle *motherParticle = stack->Particle(lPartMother);
2555 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2558 if(fMCProcessIdFlag)
2559 if(particle->GetUniqueID() != fMCProcessId) continue;
2560 if(fMotherParticlePDGCodeFlag)
2561 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2563 if(track->Charge() > 0) {
2564 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2565 if(track->HasPointOnITSLayer(iLayer))
2566 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
2568 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
2569 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
2570 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
2571 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
2572 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
2573 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
2574 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
2575 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
2576 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
2577 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
2579 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
2580 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
2581 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
2582 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
2587 else if(track->Charge() < 0) {
2588 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2589 if(track->HasPointOnITSLayer(iLayer))
2590 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
2592 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
2593 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
2594 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
2595 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
2596 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
2597 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
2598 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
2599 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
2600 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
2601 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
2603 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
2604 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
2605 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
2606 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
2611 }//secondary particles
2612 }//accepted - track cuts
2613 else if(!IsAccepted(track)) {
2614 if(label <= stack->GetNprimary()) {
2615 if(track->Charge() > 0)
2616 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
2620 else if(track->Charge() < 0)
2621 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
2625 }//primary particles
2626 else if(label > stack->GetNprimary()) {
2627 if(track->Charge() > 0)
2628 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
2632 else if(track->Charge() < 0)
2633 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
2637 }//secondary particles
2638 }//rejected - track cuts
2642 else if(!fUseTPCOnly) {
2645 track->GetImpactParameters(dcaXY,dcaZ);
2648 track->GetESDpid(probability);
2650 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2651 rcc += probability[i]*GetParticleFraction(i,P);
2652 if(rcc == 0.0) continue;
2654 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2655 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2656 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2657 if(fParticleType == 4) {
2658 FillQA(track, stack);
2659 if(IsAccepted(track)) {
2660 if(label <= stack->GetNprimary()) {
2661 if(track->Charge() > 0) {
2662 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2663 if(track->HasPointOnITSLayer(iLayer))
2664 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
2666 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
2667 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
2668 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
2669 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
2670 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
2671 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
2672 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
2673 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
2674 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
2675 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
2677 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
2678 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
2679 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
2680 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2685 else if(track->Charge() < 0) {
2686 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2687 if(track->HasPointOnITSLayer(iLayer))
2688 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
2690 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
2691 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
2692 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
2693 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
2694 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
2695 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
2696 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
2697 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
2698 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
2699 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
2701 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
2702 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
2703 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
2704 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2709 }//primary particles
2710 else if(label > stack->GetNprimary()) {
2711 TParticle *particle = stack->Particle(label);
2712 Int_t lPartMother = -1;
2713 Int_t motherPDGCode = -1;
2715 lPartMother = particle->GetFirstMother();
2716 TParticle *motherParticle = stack->Particle(lPartMother);
2717 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2720 if(fMCProcessIdFlag)
2721 if(particle->GetUniqueID() != fMCProcessId) continue;
2722 if(fMotherParticlePDGCodeFlag)
2723 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2725 if(track->Charge() > 0) {
2726 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2727 if(track->HasPointOnITSLayer(iLayer))
2728 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
2730 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
2731 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
2732 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
2733 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
2734 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
2735 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
2736 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
2737 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
2738 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
2739 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
2741 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
2742 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
2743 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
2744 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
2749 else if(track->Charge() < 0) {
2750 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2751 if(track->HasPointOnITSLayer(iLayer))
2752 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
2754 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
2755 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
2756 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
2757 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
2758 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
2759 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
2760 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
2761 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
2762 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
2763 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
2765 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
2766 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
2767 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
2768 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
2773 }//secondary particles
2774 }//accepted - track cuts
2775 else if(!IsAccepted(track)) {
2776 if(label <= stack->GetNprimary()) {
2777 if(track->Charge() > 0)
2778 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
2782 else if(track->Charge() < 0)
2783 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
2787 }//primary particles
2788 else if(label > stack->GetNprimary()) {
2789 if(track->Charge() > 0)
2790 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
2794 else if(track->Charge() < 0)
2795 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
2799 }//secondary particles
2800 }//rejected - track cuts
2802 }//combined tracking
2807 //____________________________________________________________________//
2808 void AliProtonQAAnalysis::InitMCAnalysis() {
2809 //MC analysis - 3D histograms: y-pT-pdg
2810 fPDGList = new TList();
2811 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
2812 ";y;P_{T} [GeV/c];PDG",
2813 fNBinsY,fMinY,fMaxY,
2814 fNBinsPt,fMinPt,fMaxPt,
2816 fPDGList->Add(gHistYPtPDGProtons);
2817 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
2818 ";y;P_{T} [GeV/c];PDG",
2819 fNBinsY,fMinY,fMaxY,
2820 fNBinsPt,fMinPt,fMaxPt,
2822 fPDGList->Add(gHistYPtPDGAntiProtons);
2825 fMCProcessesList = new TList();
2826 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
2827 fMCProcessesList->Add(gHistProtonsFromKLProcess);
2828 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
2829 fMCProcessesList->Add(gHistProtonsFromPionProcess);
2830 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
2831 fMCProcessesList->Add(gHistProtonsFromKSProcess);
2832 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
2833 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
2834 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
2835 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
2836 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
2837 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
2838 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
2839 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
2840 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
2841 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
2842 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
2843 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
2844 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
2845 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
2846 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
2847 fMCProcessesList->Add(gHistProtonsFromXi0Process);
2848 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
2849 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
2851 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
2852 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
2853 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
2854 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
2855 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
2856 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
2857 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
2858 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
2859 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
2860 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
2861 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
2862 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
2863 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
2864 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
2865 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
2866 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
2869 //____________________________________________________________________//
2870 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
2871 //Main analysis part - MC
2872 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2873 TParticle *particle = stack->Particle(iParticle);
2874 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2875 Int_t pdgcode = particle->GetPdgCode();
2876 if(pdgcode == 2212) {
2877 if(iParticle <= stack->GetNprimary())
2878 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
2882 else if(iParticle > stack->GetNprimary()) {
2883 Int_t lPartMother = particle->GetFirstMother();
2884 TParticle *motherParticle = stack->Particle(lPartMother);
2885 if(!motherParticle) continue;
2886 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
2890 ConvertPDGToInt(motherParticle->GetPdgCode()));
2892 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
2893 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
2894 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
2895 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
2896 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
2897 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
2898 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
2899 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
2900 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
2901 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
2902 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
2903 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
2904 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
2905 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
2906 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
2907 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
2908 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
2909 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
2910 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
2911 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
2912 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
2913 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
2914 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
2915 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
2917 }//pdgcode of proton
2919 if(pdgcode == -2212) {
2920 if(iParticle <= stack->GetNprimary())
2921 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
2925 else if(iParticle > stack->GetNprimary()) {
2926 Int_t lPartMother = particle->GetFirstMother();
2927 TParticle *motherParticle = stack->Particle(lPartMother);
2928 if(!motherParticle) continue;
2929 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
2933 ConvertPDGToInt(motherParticle->GetPdgCode()));
2936 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
2937 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
2938 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
2939 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
2940 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
2941 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
2942 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
2943 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
2944 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
2945 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
2946 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
2947 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
2948 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
2949 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
2950 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
2951 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
2952 }//secondary antiproton
2953 }//pdgcode of antiproton
2958 //____________________________________________________________________//
2959 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
2960 //Converts the pdg code to an int based on the following scheme:
2961 //1: PDG code: 130 - Name: K_L0
2962 //2: PDG code: 211 - Name: pi+
2963 //3: PDG code: 310 - Name: K_S0
2964 //4: PDG code: 321 - Name: K+
2965 //5: PDG code: 2112 - Name: neutron
2966 //6: PDG code: 2212 - Name: proton
2967 //7: PDG code: 3112 - Name: Sigma-
2968 //8: PDG code: 3122 - Name: Lambda0
2969 //9: PDG code: 3222 - Name: Sigma+
2970 //10: PDG code: 3312 - Name: Xi-
2971 //11: PDG code: 3322 - Name: Xi0
2972 //12: PDG code: 3334 - Name: Omega-
2974 switch (TMath::Abs(pdgCode)) {