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>
29 #include <TParticle.h>
31 #include "AliProtonQAAnalysis.h"
33 #include <AliExternalTrackParam.h>
34 #include <AliESDEvent.h>
38 #include <AliESDVertex.h>
40 ClassImp(AliProtonQAAnalysis)
42 //____________________________________________________________________//
43 AliProtonQAAnalysis::AliProtonQAAnalysis() :
45 fNBinsY(0), fMinY(0), fMaxY(0),
46 fNBinsPt(0), fMinPt(0), fMaxPt(0),
47 fMinTPCClusters(0), fMinITSClusters(0),
48 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
49 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
50 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
51 fMaxDCAXY(0), fMaxDCAXYTPC(0),
52 fMaxDCAZ(0), fMaxDCAZTPC(0),
54 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
55 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
56 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
57 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
58 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
59 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
60 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
61 fMaxConstrainChi2Flag(kFALSE),
62 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
63 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
64 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
65 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
66 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
67 fGlobalQAList(0), fQA2DList(0),
68 fQAPrimaryProtonsAcceptedList(0),
69 fQAPrimaryProtonsRejectedList(0),
70 fQASecondaryProtonsAcceptedList(0),
71 fQASecondaryProtonsRejectedList(0),
72 fQAPrimaryAntiProtonsAcceptedList(0),
73 fQAPrimaryAntiProtonsRejectedList(0),
74 fQASecondaryAntiProtonsAcceptedList(0),
75 fQASecondaryAntiProtonsRejectedList(0),
76 fFunctionProbabilityFlag(kFALSE),
77 fElectronFunction(0), fMuonFunction(0),
78 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
79 fUseTPCOnly(kFALSE), fUseHybridTPC(kFALSE),
80 fPDGList(0), fMCProcessesList(0),
81 fRunMCAnalysis(kFALSE),
82 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
83 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
84 fAcceptedCutList(0), fRejectedCutList(0),
85 fAcceptedDCAList(0), fRejectedDCAList(0),
86 fRunEfficiencyAnalysis(kFALSE), fRunEfficiencyAnalysisEtaMode(kFALSE),
87 fUseCutsInEfficiency(kFALSE),
90 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
93 //____________________________________________________________________//
94 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
96 if(fGlobalQAList) delete fGlobalQAList;
97 if(fQA2DList) delete fQA2DList;
98 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
99 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
100 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
101 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
102 if(fQAPrimaryAntiProtonsAcceptedList)
103 delete fQAPrimaryAntiProtonsAcceptedList;
104 if(fQAPrimaryAntiProtonsRejectedList)
105 delete fQAPrimaryAntiProtonsRejectedList;
106 if(fQASecondaryAntiProtonsAcceptedList)
107 delete fQASecondaryAntiProtonsAcceptedList;
108 if(fQASecondaryAntiProtonsRejectedList)
109 delete fQASecondaryAntiProtonsRejectedList;
111 if(fPDGList) delete fPDGList;
112 if(fMCProcessesList) delete fMCProcessesList;
114 if(fAcceptedCutList) delete fAcceptedCutList;
115 if(fRejectedCutList) delete fRejectedCutList;
116 if(fAcceptedDCAList) delete fAcceptedDCAList;
117 if(fRejectedDCAList) delete fRejectedDCAList;
119 if(fEfficiencyList) delete fEfficiencyList;
122 //____________________________________________________________________//
123 Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
125 if(fFunctionProbabilityFlag) {
126 if(i == 0) partFrac = fElectronFunction->Eval(p);
127 if(i == 1) partFrac = fMuonFunction->Eval(p);
128 if(i == 2) partFrac = fPionFunction->Eval(p);
129 if(i == 3) partFrac = fKaonFunction->Eval(p);
130 if(i == 4) partFrac = fProtonFunction->Eval(p);
132 else partFrac = fPartFrac[i];
137 //____________________________________________________________________//
138 Bool_t AliProtonQAAnalysis::IsInPhaseSpace(AliESDtrack* track) {
139 // Checks if the track is outside the analyzed y-Pt phase space
140 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
143 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
145 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
161 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
162 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
168 //____________________________________________________________________//
169 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDEvent *esd,
170 const AliESDVertex *vertex,
171 AliESDtrack* track) {
172 // Checks if the track is excluded from the cuts
173 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
174 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
176 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
177 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
179 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
180 dca[0] = -100.; dca[1] = -100.;
181 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
188 tpcTrack->PropagateToDCA(vertex,
189 esd->GetMagneticField(),
193 else if(fUseHybridTPC) {
194 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
196 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
197 dca[0] = -100.; dca[1] = -100.;
198 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
205 tpcTrack->PropagateToDCA(vertex,
206 esd->GetMagneticField(),
215 track->PropagateToDCA(vertex,
216 esd->GetMagneticField(),
221 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
222 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
224 Float_t chi2PerClusterITS = -1;
226 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
227 Float_t chi2PerClusterTPC = -1;
229 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
232 track->GetExternalCovariance(extCov);
234 if(fPointOnITSLayer1Flag)
235 if(!track->HasPointOnITSLayer(0)) return kFALSE;
236 if(fPointOnITSLayer2Flag)
237 if(!track->HasPointOnITSLayer(1)) return kFALSE;
238 if(fPointOnITSLayer3Flag)
239 if(!track->HasPointOnITSLayer(2)) return kFALSE;
240 if(fPointOnITSLayer4Flag)
241 if(!track->HasPointOnITSLayer(3)) return kFALSE;
242 if(fPointOnITSLayer5Flag)
243 if(!track->HasPointOnITSLayer(4)) return kFALSE;
244 if(fPointOnITSLayer6Flag)
245 if(!track->HasPointOnITSLayer(5)) return kFALSE;
246 if(fMinITSClustersFlag)
247 if(nClustersITS < fMinITSClusters) return kFALSE;
248 if(fMaxChi2PerITSClusterFlag)
249 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
250 if(fMinTPCClustersFlag)
251 if(nClustersTPC < fMinTPCClusters) return kFALSE;
252 if(fMaxChi2PerTPCClusterFlag)
253 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
255 if(extCov[0] > fMaxCov11) return kFALSE;
257 if(extCov[2] > fMaxCov22) return kFALSE;
259 if(extCov[5] > fMaxCov33) return kFALSE;
261 if(extCov[9] > fMaxCov44) return kFALSE;
263 if(extCov[14] > fMaxCov55) return kFALSE;
264 if(fMaxSigmaToVertexFlag)
265 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
266 if(fMaxSigmaToVertexTPCFlag)
267 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
269 if(TMath::Abs(dca[0]) > fMaxDCAXY) return kFALSE;
271 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) return kFALSE;
273 if(TMath::Abs(dca[1]) > fMaxDCAZ) return kFALSE;
275 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) return kFALSE;
276 if(fMaxConstrainChi2Flag) {
277 if(track->GetConstrainedChi2() > 0)
278 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
281 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
283 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
285 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
287 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
292 //____________________________________________________________________//
293 void AliProtonQAAnalysis::FillQA(AliStack *stack,
295 const AliESDVertex *vertex,
296 AliESDtrack* track) {
297 // Checks if the track is excluded from the cuts
298 Int_t nPrimaries = stack->GetNprimary();
299 Int_t label = TMath::Abs(track->GetLabel());
301 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
302 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
304 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
305 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
307 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
308 dca[0] = -100.; dca[1] = -100.;
309 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
316 tpcTrack->PropagateToDCA(vertex,
317 esd->GetMagneticField(),
321 else if(fUseHybridTPC) {
322 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
324 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
325 dca[0] = -100.; dca[1] = -100.;
326 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
333 tpcTrack->PropagateToDCA(vertex,
334 esd->GetMagneticField(),
343 track->PropagateToDCA(vertex,
344 esd->GetMagneticField(),
349 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
350 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
352 Float_t chi2PerClusterITS = -1;
354 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
355 Float_t chi2PerClusterTPC = -1;
357 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
360 track->GetExternalCovariance(extCov);
362 //cout<<"Charge: "<<track->Charge()<<
363 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
364 //" - TPC clusters: "<<nClustersTPC<<endl;
366 if(track->Charge() > 0) {
368 if(label <= nPrimaries) {
369 if(fMinITSClustersFlag) {
370 if(nClustersITS < fMinITSClusters) {
371 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
374 else if(nClustersITS >= fMinITSClusters)
375 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
377 if(fMaxChi2PerITSClusterFlag) {
378 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
379 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
382 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
383 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
384 }//chi2 per ITS cluster
385 if(fMinTPCClustersFlag) {
386 if(nClustersTPC < fMinTPCClusters) {
387 //cout<<"Primary proton rejected"<<endl;
388 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
391 else if(nClustersTPC >= fMinTPCClusters) {
392 //cout<<"Primary proton accepted"<<endl;
393 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
396 if(fMaxChi2PerTPCClusterFlag) {
397 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
398 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
401 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
402 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
403 }//chi2 per TPC cluster
405 if(extCov[0] > fMaxCov11) {
406 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
409 else if(extCov[0] <= fMaxCov11)
410 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
413 if(extCov[2] > fMaxCov22) {
414 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
417 else if(extCov[2] <= fMaxCov22)
418 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
421 if(extCov[5] > fMaxCov33) {
422 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
425 else if(extCov[5] <= fMaxCov33)
426 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
429 if(extCov[9] > fMaxCov44) {
430 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
433 else if(extCov[9] <= fMaxCov44)
434 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
437 if(extCov[14] > fMaxCov55) {
438 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
441 else if(extCov[14] <= fMaxCov55)
442 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
444 if(fMaxSigmaToVertexFlag) {
445 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
446 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
449 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
450 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
452 if(fMaxSigmaToVertexTPCFlag) {
453 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
454 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
457 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
458 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
459 }//sigma to vertex TPC
461 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
462 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
465 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
466 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
467 }//DCA xy global tracking
468 if(fMaxDCAXYTPCFlag) {
469 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
470 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
473 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
474 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
475 }//DCA xy TPC tracking
477 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
478 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
481 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
482 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
483 }//DCA z global tracking
484 if(fMaxDCAZTPCFlag) {
485 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
486 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
489 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
490 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
491 }//DCA z TPC tracking
492 if(fMaxConstrainChi2Flag) {
493 if(track->GetConstrainedChi2() > 0) {
494 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
495 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
498 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
499 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
501 }//constrain chi2 - vertex
503 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
504 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
507 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
508 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
511 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
512 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
515 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
516 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
519 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
520 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
523 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
524 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
527 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
528 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
531 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
532 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
534 if(fPointOnITSLayer1Flag) {
535 if(!track->HasPointOnITSLayer(0)) {
536 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
538 else if(track->HasPointOnITSLayer(0))
539 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
541 if(fPointOnITSLayer2Flag) {
542 if(!track->HasPointOnITSLayer(1)) {
543 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
545 else if(track->HasPointOnITSLayer(1))
546 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
548 if(fPointOnITSLayer3Flag) {
549 if(!track->HasPointOnITSLayer(2)) {
550 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
552 else if(track->HasPointOnITSLayer(2))
553 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
555 if(fPointOnITSLayer4Flag) {
556 if(!track->HasPointOnITSLayer(3)) {
557 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
559 else if(track->HasPointOnITSLayer(3))
560 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
562 if(fPointOnITSLayer5Flag) {
563 if(!track->HasPointOnITSLayer(4)) {
564 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
566 else if(track->HasPointOnITSLayer(4))
567 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
569 if(fPointOnITSLayer6Flag) {
570 if(!track->HasPointOnITSLayer(5)) {
571 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
573 else if(track->HasPointOnITSLayer(5))
574 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
576 }//primary particle cut
579 if(label > nPrimaries) {
580 if(fMinITSClustersFlag) {
581 if(nClustersITS < fMinITSClusters) {
582 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
585 else if(nClustersITS >= fMinITSClusters)
586 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
588 if(fMaxChi2PerITSClusterFlag) {
589 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
590 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
593 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
594 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
595 }//chi2 per ITS cluster
596 if(fMinTPCClustersFlag) {
597 if(nClustersTPC < fMinTPCClusters) {
598 //cout<<"Secondary proton rejected"<<endl;
599 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
602 else if(nClustersTPC >= fMinTPCClusters) {
603 //cout<<"Secondary proton accepted"<<endl;
604 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
607 if(fMaxChi2PerTPCClusterFlag) {
608 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
609 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
612 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
613 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
614 }//chi2 per TPC cluster
616 if(extCov[0] > fMaxCov11) {
617 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
620 else if(extCov[0] <= fMaxCov11)
621 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
624 if(extCov[2] > fMaxCov22) {
625 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
628 else if(extCov[2] <= fMaxCov22)
629 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
632 if(extCov[5] > fMaxCov33) {
633 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
636 else if(extCov[5] <= fMaxCov33)
637 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
640 if(extCov[9] > fMaxCov44) {
641 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
644 else if(extCov[9] <= fMaxCov44)
645 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
648 if(extCov[14] > fMaxCov55) {
649 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
652 else if(extCov[14] <= fMaxCov55)
653 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
655 if(fMaxSigmaToVertexFlag) {
656 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
657 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
660 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
661 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
663 if(fMaxSigmaToVertexTPCFlag) {
664 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
665 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
668 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
669 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
670 }//sigma to vertex TPC
672 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
673 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
676 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
677 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
678 }//DCA xy global tracking
679 if(fMaxDCAXYTPCFlag) {
680 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
681 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
684 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
685 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
686 }//DCA xy TPC tracking
688 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
689 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
692 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
693 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
694 }//DCA z global tracking
695 if(fMaxDCAZTPCFlag) {
696 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
697 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
700 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
701 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
702 }//DCA z TPC tracking
703 if(fMaxConstrainChi2Flag) {
704 if(track->GetConstrainedChi2() > 0) {
705 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
706 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
709 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
710 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
712 }//constrain chi2 - vertex
714 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
715 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
718 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
719 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
722 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
723 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
726 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
727 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
730 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
731 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
734 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
735 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
738 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
739 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
742 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
743 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
745 if(fPointOnITSLayer1Flag) {
746 if(!track->HasPointOnITSLayer(0)) {
747 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
749 else if(track->HasPointOnITSLayer(0))
750 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
752 if(fPointOnITSLayer2Flag) {
753 if(!track->HasPointOnITSLayer(1)) {
754 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
756 else if(track->HasPointOnITSLayer(1))
757 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
759 if(fPointOnITSLayer3Flag) {
760 if(!track->HasPointOnITSLayer(2)) {
761 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
763 else if(track->HasPointOnITSLayer(2))
764 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
766 if(fPointOnITSLayer4Flag) {
767 if(!track->HasPointOnITSLayer(3)) {
768 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
770 else if(track->HasPointOnITSLayer(3))
771 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
773 if(fPointOnITSLayer5Flag) {
774 if(!track->HasPointOnITSLayer(4)) {
775 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
777 else if(track->HasPointOnITSLayer(4))
778 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
780 if(fPointOnITSLayer6Flag) {
781 if(!track->HasPointOnITSLayer(5)) {
782 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
784 else if(track->HasPointOnITSLayer(5))
785 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
787 }//secondary particle cut
791 if(track->Charge() < 0) {
793 if(label <= nPrimaries) {
794 if(fMinITSClustersFlag) {
795 if(nClustersITS < fMinITSClusters) {
796 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
799 else if(nClustersITS >= fMinITSClusters)
800 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
802 if(fMaxChi2PerITSClusterFlag) {
803 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
804 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
807 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
808 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
809 }//chi2 per ITS cluster
810 if(fMinTPCClustersFlag) {
811 if(nClustersTPC < fMinTPCClusters) {
812 //cout<<"Primary antiproton rejected"<<endl;
813 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
816 else if(nClustersTPC >= fMinTPCClusters) {
817 //cout<<"Primary antiproton accepted"<<endl;
818 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
821 if(fMaxChi2PerTPCClusterFlag) {
822 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
823 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
826 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
827 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
828 }//chi2 per TPC cluster
830 if(extCov[0] > fMaxCov11) {
831 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
834 else if(extCov[0] <= fMaxCov11)
835 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
838 if(extCov[2] > fMaxCov22) {
839 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
842 else if(extCov[2] <= fMaxCov22)
843 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
846 if(extCov[5] > fMaxCov33) {
847 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
850 else if(extCov[5] <= fMaxCov33)
851 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
854 if(extCov[9] > fMaxCov44) {
855 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
858 else if(extCov[9] <= fMaxCov44)
859 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
862 if(extCov[14] > fMaxCov55) {
863 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
866 else if(extCov[14] <= fMaxCov55)
867 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
869 if(fMaxSigmaToVertexFlag) {
870 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
871 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
874 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
875 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
877 if(fMaxSigmaToVertexTPCFlag) {
878 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
879 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
882 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
883 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
884 }//sigma to vertex TPC
886 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
887 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
890 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
891 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
892 }//DCA xy global tracking
893 if(fMaxDCAXYTPCFlag) {
894 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
895 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
898 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
899 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
900 }//DCA xy TPC tracking
902 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
903 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
906 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
907 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
908 }//DCA z global tracking
909 if(fMaxDCAZTPCFlag) {
910 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
911 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
914 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
915 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
916 }//DCA z TPC tracking
917 if(fMaxConstrainChi2Flag) {
918 if(track->GetConstrainedChi2() > 0) {
919 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
920 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
923 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
924 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
926 }//constrain chi2 - vertex
928 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
929 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
932 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
933 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
936 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
937 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
940 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
941 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
944 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
945 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
948 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
949 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
952 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
953 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
956 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
957 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
959 if(fPointOnITSLayer1Flag) {
960 if(!track->HasPointOnITSLayer(0)) {
961 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
963 else if(track->HasPointOnITSLayer(0))
964 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
966 if(fPointOnITSLayer2Flag) {
967 if(!track->HasPointOnITSLayer(1)) {
968 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
970 else if(track->HasPointOnITSLayer(1))
971 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
973 if(fPointOnITSLayer3Flag) {
974 if(!track->HasPointOnITSLayer(2)) {
975 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
977 else if(track->HasPointOnITSLayer(2))
978 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
980 if(fPointOnITSLayer4Flag) {
981 if(!track->HasPointOnITSLayer(3)) {
982 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
984 else if(track->HasPointOnITSLayer(3))
985 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
987 if(fPointOnITSLayer5Flag) {
988 if(!track->HasPointOnITSLayer(4)) {
989 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
991 else if(track->HasPointOnITSLayer(4))
992 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
994 if(fPointOnITSLayer6Flag) {
995 if(!track->HasPointOnITSLayer(5)) {
996 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
998 else if(track->HasPointOnITSLayer(5))
999 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1001 }//primary particle cut
1004 if(label > nPrimaries) {
1005 if(fMinITSClustersFlag) {
1006 if(nClustersITS < fMinITSClusters) {
1007 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
1010 else if(nClustersITS >= fMinITSClusters)
1011 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1013 if(fMaxChi2PerITSClusterFlag) {
1014 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
1015 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1018 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
1019 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1020 }//chi2 per ITS cluster
1021 if(fMinTPCClustersFlag) {
1022 if(nClustersTPC < fMinTPCClusters) {
1023 //cout<<"Secondary antiproton rejected"<<endl;
1024 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1027 else if(nClustersTPC >= fMinTPCClusters) {
1028 //cout<<"Secondary antiproton accepted"<<endl;
1029 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1032 if(fMaxChi2PerTPCClusterFlag) {
1033 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
1034 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1037 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
1038 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1039 }//chi2 per TPC cluster
1041 if(extCov[0] > fMaxCov11) {
1042 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
1045 else if(extCov[0] <= fMaxCov11)
1046 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1049 if(extCov[2] > fMaxCov22) {
1050 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1053 else if(extCov[2] <= fMaxCov22)
1054 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1057 if(extCov[5] > fMaxCov33) {
1058 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1061 else if(extCov[5] <= fMaxCov33)
1062 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1065 if(extCov[9] > fMaxCov44) {
1066 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1069 else if(extCov[9] <= fMaxCov44)
1070 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1073 if(extCov[14] > fMaxCov55) {
1074 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1077 else if(extCov[14] <= fMaxCov55)
1078 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1080 if(fMaxSigmaToVertexFlag) {
1081 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1082 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1085 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1086 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1088 if(fMaxSigmaToVertexTPCFlag) {
1089 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1090 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1093 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1094 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1095 }//sigma to vertex TPC
1097 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
1098 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
1101 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
1102 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
1103 }//DCA xy global tracking
1104 if(fMaxDCAXYTPCFlag) {
1105 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
1106 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
1109 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
1110 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
1111 }//DCA xy TPC tracking
1113 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
1114 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
1117 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
1118 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
1119 }//DCA z global tracking
1120 if(fMaxDCAZTPCFlag) {
1121 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
1122 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
1125 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
1126 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
1127 }//DCA z TPC tracking
1128 if(fMaxConstrainChi2Flag) {
1129 if(track->GetConstrainedChi2() > 0) {
1130 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1131 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1134 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1135 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1137 }//constrain chi2 - vertex
1139 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1140 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1143 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1144 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1147 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1148 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1151 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1152 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1155 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1156 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1159 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1160 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1163 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1164 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1167 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1168 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1170 if(fPointOnITSLayer1Flag) {
1171 if(!track->HasPointOnITSLayer(0)) {
1172 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1174 else if(track->HasPointOnITSLayer(0))
1175 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1177 if(fPointOnITSLayer2Flag) {
1178 if(!track->HasPointOnITSLayer(1)) {
1179 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1181 else if(track->HasPointOnITSLayer(1))
1182 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1184 if(fPointOnITSLayer3Flag) {
1185 if(!track->HasPointOnITSLayer(2)) {
1186 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1188 else if(track->HasPointOnITSLayer(2))
1189 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1191 if(fPointOnITSLayer4Flag) {
1192 if(!track->HasPointOnITSLayer(3)) {
1193 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1195 else if(track->HasPointOnITSLayer(3))
1196 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1198 if(fPointOnITSLayer5Flag) {
1199 if(!track->HasPointOnITSLayer(4)) {
1200 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1202 else if(track->HasPointOnITSLayer(4))
1203 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1205 if(fPointOnITSLayer6Flag) {
1206 if(!track->HasPointOnITSLayer(5)) {
1207 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1209 else if(track->HasPointOnITSLayer(5))
1210 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1212 }//secondary particle cut
1216 //____________________________________________________________________//
1217 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1218 // Calculates the number of sigma to the vertex.
1222 if((fUseTPCOnly)&&(!fUseHybridTPC))
1223 esdTrack->GetImpactParametersTPC(b,bCov);
1225 esdTrack->GetImpactParameters(b,bCov);
1227 if (bCov[0]<=0 || bCov[2]<=0) {
1228 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1229 bCov[0]=0; bCov[2]=0;
1231 bRes[0] = TMath::Sqrt(bCov[0]);
1232 bRes[1] = TMath::Sqrt(bCov[2]);
1234 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1236 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1238 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1240 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1245 //____________________________________________________________________//
1246 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1247 //returns the rapidity of the proton - to be removed
1248 Double_t fMass = 9.38270000000000048e-01;
1250 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1251 TMath::Power(Py,2) +
1252 TMath::Power(Pz,2));
1253 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1256 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1261 //____________________________________________________________________//
1262 void AliProtonQAAnalysis::SetRunQAAnalysis() {
1263 //initializes the QA lists
1264 //fQAHistograms = kTRUE;
1265 fGlobalQAList = new TList();
1266 fQA2DList = new TList();
1267 fQA2DList->SetName("fQA2DList");
1268 fGlobalQAList->Add(fQA2DList);
1270 fQAPrimaryProtonsAcceptedList = new TList();
1271 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1272 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1274 fQAPrimaryProtonsRejectedList = new TList();
1275 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1276 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1278 fQASecondaryProtonsAcceptedList = new TList();
1279 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1280 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1282 fQASecondaryProtonsRejectedList = new TList();
1283 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1284 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1286 fQAPrimaryAntiProtonsAcceptedList = new TList();
1287 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1288 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1290 fQAPrimaryAntiProtonsRejectedList = new TList();
1291 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1292 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1294 fQASecondaryAntiProtonsAcceptedList = new TList();
1295 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1296 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1298 fQASecondaryAntiProtonsRejectedList = new TList();
1299 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1300 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1303 //____________________________________________________________________//
1304 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1305 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1306 //Initializes the QA binning
1308 fMinY = minY; fMaxY = maxY;
1310 fMinPt = minPt; fMaxPt = maxPt;
1313 if(fRunMCAnalysis) InitMCAnalysis();
1314 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1317 //____________________________________________________________________//
1318 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1319 //Initialization of the efficiency list - reconstruction & PID efficiency
1320 //Adding each monitored object in the list
1321 fEfficiencyList = new TList();
1323 //MC primary protons and antiprotons for the reconstruction efficiency
1324 TH2D *gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1326 fNBinsY,fMinY,fMaxY,
1327 fNBinsPt,fMinPt,fMaxPt);
1328 if(fRunEfficiencyAnalysisEtaMode)
1329 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1331 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
1332 gHistMCYPtProtons->SetStats(kTRUE);
1333 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1334 fEfficiencyList->Add(gHistMCYPtProtons);
1335 TH2D *gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1337 fNBinsY,fMinY,fMaxY,
1338 fNBinsPt,fMinPt,fMaxPt);
1339 if(fRunEfficiencyAnalysisEtaMode)
1340 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1342 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
1343 gHistMCYPtAntiProtons->SetStats(kTRUE);
1344 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1345 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1347 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1348 TH2D *gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1350 fNBinsY,fMinY,fMaxY,
1351 fNBinsPt,fMinPt,fMaxPt);
1352 if(fRunEfficiencyAnalysisEtaMode)
1353 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1355 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1356 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1357 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1358 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1359 TH2D *gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1361 fNBinsY,fMinY,fMaxY,
1362 fNBinsPt,fMinPt,fMaxPt);
1363 if(fRunEfficiencyAnalysisEtaMode)
1364 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1366 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1367 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1368 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1369 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1371 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1372 TH2D *gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1374 fNBinsY,fMinY,fMaxY,
1375 fNBinsPt,fMinPt,fMaxPt);
1376 if(fRunEfficiencyAnalysisEtaMode)
1377 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1379 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1380 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1381 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1382 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1383 TH2D *gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1385 fNBinsY,fMinY,fMaxY,
1386 fNBinsPt,fMinPt,fMaxPt);
1387 if(fRunEfficiencyAnalysisEtaMode)
1388 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1390 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1391 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1392 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1393 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1395 //ESD primary protons and antiprotons for the reconstruction efficiency
1396 TH2D *gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1398 fNBinsY,fMinY,fMaxY,
1399 fNBinsPt,fMinPt,fMaxPt);
1400 if(fRunEfficiencyAnalysisEtaMode)
1401 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1403 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
1404 gHistESDYPtProtons->SetStats(kTRUE);
1405 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1406 fEfficiencyList->Add(gHistESDYPtProtons);
1407 TH2D *gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1409 fNBinsY,fMinY,fMaxY,
1410 fNBinsPt,fMinPt,fMaxPt);
1411 if(fRunEfficiencyAnalysisEtaMode)
1412 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1414 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
1415 gHistESDYPtAntiProtons->SetStats(kTRUE);
1416 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1417 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1419 //ESD (anti)protons from weak decays for the reconstruction efficiency
1420 TH2D *gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1422 fNBinsY,fMinY,fMaxY,
1423 fNBinsPt,fMinPt,fMaxPt);
1424 if(fRunEfficiencyAnalysisEtaMode)
1425 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1427 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1428 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1429 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1430 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1431 TH2D *gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1433 fNBinsY,fMinY,fMaxY,
1434 fNBinsPt,fMinPt,fMaxPt);
1435 if(fRunEfficiencyAnalysisEtaMode)
1436 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1438 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1439 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1440 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1441 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1443 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1444 TH2D *gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1446 fNBinsY,fMinY,fMaxY,
1447 fNBinsPt,fMinPt,fMaxPt);
1448 if(fRunEfficiencyAnalysisEtaMode)
1449 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1451 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1452 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1453 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1454 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1455 TH2D *gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1457 fNBinsY,fMinY,fMaxY,
1458 fNBinsPt,fMinPt,fMaxPt);
1459 if(fRunEfficiencyAnalysisEtaMode)
1460 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1462 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1463 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1464 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1465 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1468 //ESD reconstructed tracks that were initially protons for the PID efficiency
1469 TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
1471 fNBinsY,fMinY,fMaxY,
1472 fNBinsPt,fMinPt,fMaxPt);
1473 if(fRunEfficiencyAnalysisEtaMode)
1474 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1476 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
1477 gHistESDInitYPtProtons->SetStats(kTRUE);
1478 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1479 fEfficiencyList->Add(gHistESDInitYPtProtons);
1481 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1482 TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
1484 fNBinsY,fMinY,fMaxY,
1485 fNBinsPt,fMinPt,fMaxPt);
1486 if(fRunEfficiencyAnalysisEtaMode)
1487 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1489 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
1490 gHistESDIdYPtProtons->SetStats(kTRUE);
1491 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1492 fEfficiencyList->Add(gHistESDIdYPtProtons);
1494 //ESD reconstructed tracks that were identified as protons for the PID contamination
1495 TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
1497 fNBinsY,fMinY,fMaxY,
1498 fNBinsPt,fMinPt,fMaxPt);
1499 if(fRunEfficiencyAnalysisEtaMode)
1500 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1502 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
1503 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1504 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1505 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1507 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1508 TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
1510 fNBinsY,fMinY,fMaxY,
1511 fNBinsPt,fMinPt,fMaxPt);
1512 if(fRunEfficiencyAnalysisEtaMode)
1513 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1515 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
1516 gHistESDContamYPtProtons->SetStats(kTRUE);
1517 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1518 fEfficiencyList->Add(gHistESDContamYPtProtons);
1521 //____________________________________________________________________//
1522 void AliProtonQAAnalysis::InitCutLists() {
1523 //Initialization of the cut lists
1524 //Adding each monitored object in each list
1527 fAcceptedCutList = new TList();
1528 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1529 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1530 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1531 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1532 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1533 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1534 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1535 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1537 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1538 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1539 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1540 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1541 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1542 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1543 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1544 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1546 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1547 ";x^{2}/N_{clusters} (ITS);Entries",
1549 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1550 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1551 ";x^{2}/N_{clusters} (ITS);Entries",
1553 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1554 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1555 ";x^{2}/N_{clusters} (ITS);Entries",
1557 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1558 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1559 ";x^{2}/N_{clusters} (ITS);Entries",
1561 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1563 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1564 ";Log_{10}(#chi^{2});Entries",
1566 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1567 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1568 ";Log_{10}(#chi^{2});Entries",
1570 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1571 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1572 ";Log_{10}(#chi^{2});Entries",
1574 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1575 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1576 ";Log_{10}(#chi^{2});Entries",
1578 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1580 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1581 ";N_{clusters} (TPC);Entries",
1583 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1584 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1585 ";N_{clusters} (TPC);Entries",
1587 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1588 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1589 ";N_{clusters} (TPC);Entries",
1591 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1592 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1593 ";N_{clusters} (TPC);Entries",
1595 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1597 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1598 ";x^{2}/N_{clusters} (TPC);Entries",
1600 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1601 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1602 ";x^{2}/N_{clusters} (TPC);Entries",
1604 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1605 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1606 ";x^{2}/N_{clusters} (TPC);Entries",
1608 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1609 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1610 ";x^{2}/N_{clusters} (TPC);Entries",
1612 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1614 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1615 ";#sigma_{y} [cm];Entries",
1617 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1618 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1619 ";#sigma_{y} [cm];Entries",
1621 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1622 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1623 ";#sigma_{y} [cm];Entries",
1625 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1626 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1627 ";#sigma_{y} [cm];Entries",
1629 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1632 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1633 ";#sigma_{z} [cm];Entries",
1635 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1636 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1637 ";#sigma_{z} [cm];Entries",
1639 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1640 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1641 ";#sigma_{z} [cm];Entries",
1643 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1644 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1645 ";#sigma_{z} [cm];Entries",
1647 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1650 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1651 ";#sigma_{sin(#phi)};Entries",
1653 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1654 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1655 ";#sigma_{sin(#phi)};Entries",
1657 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1658 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1659 ";#sigma_{sin(#phi)};Entries",
1661 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1662 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1663 ";#sigma_{sin(#phi)};Entries",
1665 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1668 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1669 ";#sigma_{tan(#lambda)};Entries",
1671 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1672 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1673 ";#sigma_{tan(#lambda)};Entries",
1675 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1676 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1677 ";#sigma_{tan(#lambda)};Entries",
1679 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1680 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1681 ";#sigma_{tan(#lambda)};Entries",
1683 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1686 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1687 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1689 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1690 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1691 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1693 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1694 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1695 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1697 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1698 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1699 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1701 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1704 fAcceptedDCAList = new TList();
1705 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1706 ";DCA_{xy} [cm];Entries",
1708 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1709 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1710 ";DCA_{xy} [cm];Entries",
1712 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1713 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1714 ";DCA_{xy} [cm];Entries",
1716 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1717 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1718 ";DCA_{xy} [cm];Entries",
1721 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1722 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1723 ";DCA_{z} [cm];Entries",
1725 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1726 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1727 ";DCA_{z} [cm];Entries",
1729 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1730 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1731 ";DCA_{z} [cm];Entries",
1733 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1734 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1735 ";DCA_{z} [cm];Entries",
1737 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1739 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1740 ";#sigma_{Vertex};Entries",
1742 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1743 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1744 ";#sigma_{Vertex};Entries",
1746 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1747 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1748 ";#sigma_{Vertex};Entries",
1750 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1751 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1752 ";#sigma_{Vertex};Entries",
1754 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1758 //____________________________________________________________________//
1759 void AliProtonQAAnalysis::InitQA() {
1760 //Initializes the QA histograms and builds the directory structure
1761 //if(!fQAHistograms)
1765 //TDirectory *dir2D = gDirectory->mkdir("2D");
1766 //fGlobalQAList->Add(dir2D); dir2D->cd();
1767 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1769 fNBinsY,fMinY,fMaxY,
1770 fNBinsPt,fMinPt,fMaxPt);
1771 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1772 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1773 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
1774 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1776 fNBinsY,fMinY,fMaxY,
1777 fNBinsPt,fMinPt,fMaxPt);
1778 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1779 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1780 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
1782 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1784 fNBinsY,fMinY,fMaxY,
1785 fNBinsPt,fMinPt,fMaxPt);
1786 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1787 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1788 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
1789 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1791 fNBinsY,fMinY,fMaxY,
1792 fNBinsPt,fMinPt,fMaxPt);
1793 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1794 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1795 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
1797 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1799 fNBinsY,fMinY,fMaxY,
1800 fNBinsPt,fMinPt,fMaxPt);
1801 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1802 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1803 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
1804 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1806 fNBinsY,fMinY,fMaxY,
1807 fNBinsPt,fMinPt,fMaxPt);
1808 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1809 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1810 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
1812 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1814 fNBinsY,fMinY,fMaxY,
1815 fNBinsPt,fMinPt,fMaxPt);
1816 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1817 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1818 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
1819 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1821 fNBinsY,fMinY,fMaxY,
1822 fNBinsPt,fMinPt,fMaxPt);
1823 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1824 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1825 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
1827 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
1829 fNBinsY,fMinY,fMaxY,
1830 fNBinsPt,fMinPt,fMaxPt);
1831 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
1832 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
1833 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
1834 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
1836 fNBinsY,fMinY,fMaxY,
1837 fNBinsPt,fMinPt,fMaxPt);
1838 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
1839 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
1840 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
1842 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
1843 ";y;P_{T} [GeV/c];PDG",
1844 fNBinsY,fMinY,fMaxY,
1845 fNBinsPt,fMinPt,fMaxPt,
1847 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
1848 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
1849 ";y;P_{T} [GeV/c];PDG",
1850 fNBinsY,fMinY,fMaxY,
1851 fNBinsPt,fMinPt,fMaxPt,
1853 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
1855 /*gDirectory->cd("../");
1857 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1858 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1860 //________________________________________________________________//
1861 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1862 dirProtonsPrimary->cd();
1863 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1864 dirProtonsPrimaryAccepted->cd();*/
1866 //Accepted primary protons
1867 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1868 ";N_{clusters} (ITS);Entries",
1870 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1871 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1872 ";x^{2}/N_{clusters} (ITS);Entries",
1874 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1875 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1876 ";N_{clusters} (TPC);Entries",
1878 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1879 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1880 ";x^{2}/N_{clusters} (TPC);Entries",
1882 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1883 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
1884 ";#sigma_{y} [cm];Entries",
1886 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
1887 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
1888 ";#sigma_{z} [cm];Entries",
1890 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
1891 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
1892 ";#sigma_{sin(#phi)};Entries",
1894 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
1895 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
1896 ";#sigma_{tan(#lambda)};Entries",
1898 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
1899 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
1900 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1902 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
1903 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
1904 ";#sigma_{Vertex};Entries",
1906 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
1907 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
1908 ";#sigma_{Vertex};Entries",
1910 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
1911 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
1912 ";DCA_{xy} [cm];Entries",
1914 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
1915 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
1916 ";DCA_{xy} [cm];Entries",
1918 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
1919 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
1920 ";DCA_{z} [cm];Entries",
1922 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
1923 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
1924 ";DCA_{z} [cm];Entries",
1926 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
1927 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
1928 ";Log_{10}(#chi^{2});Entries",
1930 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
1931 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
1933 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
1934 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
1936 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
1937 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
1939 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
1940 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
1942 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
1943 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
1945 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
1946 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
1948 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
1949 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
1951 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
1952 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
1954 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
1955 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
1957 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
1958 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
1960 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
1962 //Rejected primary protons
1963 /*gDirectory->cd("../");
1964 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1965 dirProtonsPrimaryRejected->cd();*/
1967 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
1968 ";N_{clusters} (ITS);Entries",
1970 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
1971 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
1972 ";x^{2}/N_{clusters} (ITS);Entries",
1974 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
1975 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
1976 ";N_{clusters} (TPC);Entries",
1978 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
1979 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
1980 ";x^{2}/N_{clusters} (TPC);Entries",
1982 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
1983 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
1984 ";#sigma_{y} [cm];Entries",
1986 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
1987 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
1988 ";#sigma_{z} [cm];Entries",
1990 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
1991 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
1992 ";#sigma_{sin(#phi)};Entries",
1994 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
1995 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
1996 ";#sigma_{tan(#lambda)};Entries",
1998 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
1999 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2000 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2002 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2003 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2004 ";#sigma_{Vertex};Entries",
2006 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2007 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2008 ";#sigma_{Vertex};Entries",
2010 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2011 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2012 ";DCA_{xy} [cm];Entries",
2014 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2015 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2016 ";DCA_{xy} [cm];Entries",
2018 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2019 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2020 ";DCA_{z} [cm];Entries",
2022 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2023 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2024 ";DCA_{z} [cm];Entries",
2026 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2027 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2028 ";Log_{10}(#chi^{2});Entries",
2030 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2031 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2033 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2034 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2036 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2037 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2039 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2040 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2042 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2043 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2045 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2046 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2048 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2049 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2051 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2052 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2054 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2055 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2057 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2058 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2060 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2062 //________________________________________________________________//
2063 /*gDirectory->cd("../../");
2065 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2066 dirProtonsSecondary->cd();
2067 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2068 dirProtonsSecondaryAccepted->cd();*/
2070 //Accepted secondary protons
2071 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2072 ";N_{clusters} (ITS);Entries",
2074 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2075 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2076 ";x^{2}/N_{clusters} (ITS);Entries",
2078 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2079 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2080 ";N_{clusters} (TPC);Entries",
2082 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2083 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2084 ";x^{2}/N_{clusters} (TPC);Entries",
2086 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2087 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2088 ";#sigma_{y} [cm];Entries",
2090 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2091 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2092 ";#sigma_{z} [cm];Entries",
2094 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2095 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2096 ";#sigma_{sin(#phi)};Entries",
2098 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2099 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2100 ";#sigma_{tan(#lambda)};Entries",
2102 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2103 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2104 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2106 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2107 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2108 ";#sigma_{Vertex};Entries",
2110 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2111 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2112 ";#sigma_{Vertex};Entries",
2114 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2115 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2116 ";DCA_{xy} [cm];Entries",
2118 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2119 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2120 ";DCA_{xy} [cm];Entries",
2122 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2123 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2124 ";DCA_{z} [cm];Entries",
2126 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2127 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2128 ";DCA_{z} [cm];Entries",
2130 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2131 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2132 ";Log_{10}(#chi^{2});Entries",
2134 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2135 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2137 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2138 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2140 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2141 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2143 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2144 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2146 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2147 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2149 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2150 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2152 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2153 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2155 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2156 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2158 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2159 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2161 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2162 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2164 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2166 //Rejected secondary protons
2167 /*gDirectory->cd("../");
2168 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2169 dirProtonsSecondaryRejected->cd();*/
2171 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2172 ";N_{clusters} (ITS);Entries",
2174 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2175 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2176 ";x^{2}/N_{clusters} (ITS);Entries",
2178 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2179 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2180 ";N_{clusters} (TPC);Entries",
2182 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2183 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2184 ";x^{2}/N_{clusters} (TPC);Entries",
2186 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2187 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2188 ";#sigma_{y} [cm];Entries",
2190 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2191 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2192 ";#sigma_{z} [cm];Entries",
2194 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2195 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2196 ";#sigma_{sin(#phi)};Entries",
2198 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2199 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2200 ";#sigma_{tan(#lambda)};Entries",
2202 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2203 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2204 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2206 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2207 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2208 ";#sigma_{Vertex};Entries",
2210 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2211 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2212 ";#sigma_{Vertex};Entries",
2214 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2215 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2216 ";DCA_{xy} [cm];Entries",
2218 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2219 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2220 ";DCA_{xy} [cm];Entries",
2222 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2223 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2224 ";DCA_{z} [cm];Entries",
2226 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2227 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2228 ";DCA_{z} [cm];Entries",
2230 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2231 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2232 ";Log_{10}(#chi^{2});Entries",
2234 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2235 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2237 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2238 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2240 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2241 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2243 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2244 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2246 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2247 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2249 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2250 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2252 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2253 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2255 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2256 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2258 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2259 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2261 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2262 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2264 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2267 /*gDirectory->cd("../../../");
2270 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2271 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2273 //________________________________________________________________//
2274 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2275 dirAntiProtonsPrimary->cd();
2276 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2277 dirAntiProtonsPrimaryAccepted->cd();*/
2279 //Accepted primary antiprotons
2280 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2281 ";N_{clusters} (ITS);Entries",
2283 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2284 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2285 ";x^{2}/N_{clusters} (ITS);Entries",
2287 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2288 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2289 ";N_{clusters} (TPC);Entries",
2291 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2292 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2293 ";x^{2}/N_{clusters} (TPC);Entries",
2295 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2296 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2297 ";#sigma_{y} [cm];Entries",
2299 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2300 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2301 ";#sigma_{z} [cm];Entries",
2303 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2304 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2305 ";#sigma_{sin(#phi)};Entries",
2307 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2308 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2309 ";#sigma_{tan(#lambda)};Entries",
2311 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2312 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2313 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2315 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2316 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2317 ";#sigma_{Vertex};Entries",
2319 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2320 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2321 ";#sigma_{Vertex};Entries",
2323 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2324 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2325 ";DCA_{xy} [cm];Entries",
2327 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2328 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2329 ";DCA_{xy} [cm];Entries",
2331 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2332 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2333 ";DCA_{z} [cm];Entries",
2335 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2336 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2337 ";DCA_{z} [cm];Entries",
2339 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2340 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2341 ";Log_{10}(#chi^{2});Entries",
2343 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2344 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2346 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2347 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2349 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2350 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2352 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2353 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2355 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2356 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2358 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2359 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2361 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2362 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2364 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2365 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2367 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2368 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2370 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2371 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2373 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2375 //Rejected primary antiprotons
2376 /*gDirectory->cd("../");
2377 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2378 dirAntiProtonsPrimaryRejected->cd();*/
2380 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2381 ";N_{clusters} (ITS);Entries",
2383 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2384 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2385 ";x^{2}/N_{clusters} (ITS);Entries",
2387 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2388 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2389 ";N_{clusters} (TPC);Entries",
2391 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2392 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2393 ";x^{2}/N_{clusters} (TPC);Entries",
2395 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2396 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2397 ";#sigma_{y} [cm];Entries",
2399 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2400 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2401 ";#sigma_{z} [cm];Entries",
2403 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2404 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2405 ";#sigma_{sin(#phi)};Entries",
2407 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2408 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2409 ";#sigma_{tan(#lambda)};Entries",
2411 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2412 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2413 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2415 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2416 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2417 ";#sigma_{Vertex};Entries",
2419 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2420 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2421 ";#sigma_{Vertex};Entries",
2423 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2424 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2425 ";DCA_{xy} [cm];Entries",
2427 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2428 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2429 ";DCA_{xy} [cm];Entries",
2431 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2432 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2433 ";DCA_{z} [cm];Entries",
2435 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2436 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2437 ";DCA_{z} [cm];Entries",
2439 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2440 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2441 ";Log_{10}(#chi^{2});Entries",
2443 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2444 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2446 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2447 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2449 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2450 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2452 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2453 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2455 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2456 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2458 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2459 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2461 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2462 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2464 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2465 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2467 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2468 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2470 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2471 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2473 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2475 //________________________________________________________________//
2476 /*gDirectory->cd("../../");
2478 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2479 dirAntiProtonsSecondary->cd();
2480 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2481 dirAntiProtonsSecondaryAccepted->cd();*/
2483 //Accepted secondary antiprotons
2484 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2485 ";N_{clusters} (ITS);Entries",
2487 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2488 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2489 ";x^{2}/N_{clusters} (ITS);Entries",
2491 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2492 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2493 ";N_{clusters} (TPC);Entries",
2495 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2496 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2497 ";x^{2}/N_{clusters} (TPC);Entries",
2499 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2500 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2501 ";#sigma_{y} [cm];Entries",
2503 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2504 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2505 ";#sigma_{z} [cm];Entries",
2507 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2508 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2509 ";#sigma_{sin(#phi)};Entries",
2511 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2512 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2513 ";#sigma_{tan(#lambda)};Entries",
2515 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2516 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2517 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2519 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2520 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2521 ";#sigma_{Vertex};Entries",
2523 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2524 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2525 ";#sigma_{Vertex};Entries",
2527 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2528 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2529 ";DCA_{xy} [cm];Entries",
2531 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2532 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2533 ";DCA_{xy} [cm];Entries",
2535 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2536 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2537 ";DCA_{z} [cm];Entries",
2539 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2540 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2541 ";DCA_{z} [cm];Entries",
2543 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2544 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2545 ";Log_{10}(#chi^{2});Entries",
2547 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2548 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2550 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2551 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2553 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2554 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2556 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2557 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2559 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2560 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2562 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2563 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2565 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2566 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2568 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2569 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2571 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2572 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2574 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2575 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2577 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2579 //Rejected secondary antiprotons
2580 /*gDirectory->cd("../");
2581 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2582 dirAntiProtonsSecondaryRejected->cd();*/
2584 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2585 ";N_{clusters} (ITS);Entries",
2587 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2588 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2589 ";x^{2}/N_{clusters} (ITS);Entries",
2591 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2592 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2593 ";N_{clusters} (TPC);Entries",
2595 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2596 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2597 ";x^{2}/N_{clusters} (TPC);Entries",
2599 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2600 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2601 ";#sigma_{y} [cm];Entries",
2603 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2604 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2605 ";#sigma_{z} [cm];Entries",
2607 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2608 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2609 ";#sigma_{sin(#phi)};Entries",
2611 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2612 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2613 ";#sigma_{tan(#lambda)};Entries",
2615 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2616 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2617 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2619 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2620 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2621 ";#sigma_{Vertex};Entries",
2623 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2624 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2625 ";#sigma_{Vertex};Entries",
2627 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2628 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2629 ";DCA_{xy} [cm];Entries",
2631 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2632 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2633 ";DCA_{xy} [cm];Entries",
2635 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2636 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2637 ";DCA_{z} [cm];Entries",
2639 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2640 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2641 ";DCA_{z} [cm];Entries",
2643 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2644 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2645 ";Log_{10}(#chi^{2});Entries",
2647 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2648 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2650 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2651 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2653 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2654 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2656 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2657 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2659 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2660 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2662 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2663 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2665 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2666 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2668 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2669 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2671 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2672 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2674 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2675 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2677 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2680 //____________________________________________________________________//
2681 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2683 const AliESDVertex *vertex) {
2684 //Runs the efficiency code
2686 Int_t nMCProtons = 0, nESDProtons = 0;
2687 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2688 TParticle *particle = stack->Particle(iParticle);
2689 if(!particle) continue;
2691 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2692 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2693 if(fRunEfficiencyAnalysisEtaMode) {
2694 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2697 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2699 Int_t pdgcode = particle->GetPdgCode();
2700 if(TMath::Abs(pdgcode) != 2212) continue;
2702 if(iParticle <= stack->GetNprimary()) {
2703 if(pdgcode == 2212) {
2705 if(fRunEfficiencyAnalysisEtaMode)
2706 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2709 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2714 if(pdgcode == -2212) {
2715 if(fRunEfficiencyAnalysisEtaMode)
2716 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2719 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2727 Int_t lPartMother = -1;
2728 Int_t motherPDGCode = -1;
2729 lPartMother = particle->GetFirstMother();
2730 TParticle *motherParticle = stack->Particle(lPartMother);
2731 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2733 if(pdgcode == 2212) {
2734 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2735 if(fRunEfficiencyAnalysisEtaMode)
2736 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
2739 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
2744 if((particle->GetUniqueID() == 13)) {
2745 if(fRunEfficiencyAnalysisEtaMode)
2746 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
2749 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
2753 }//hadronic interactions
2755 if(pdgcode == -2212) {
2756 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2757 if(fRunEfficiencyAnalysisEtaMode)
2758 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
2761 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
2766 if((particle->GetUniqueID() == 13)) {
2767 if(fRunEfficiencyAnalysisEtaMode)
2768 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
2771 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
2775 }//hadronic interactions
2782 Int_t nGoodTracks = esd->GetNumberOfTracks();
2783 TArrayI labelArray(nGoodTracks);
2784 Int_t labelCounter = 0;
2785 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2786 AliESDtrack* track = esd->GetTrack(iTracks);
2787 if(!track) continue;
2789 Int_t label = TMath::Abs(track->GetLabel());
2790 if(IsLabelUsed(labelArray,label)) continue;
2791 labelArray.AddAt(label,labelCounter);
2794 TParticle *particle = stack->Particle(label);
2795 if(!particle) continue;
2796 Int_t pdgcode = particle->GetPdgCode();
2797 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2799 Double_t Pt = 0.0, P = 0.0;
2800 Double_t probability[5];
2804 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2805 if(!tpcTrack) continue;
2806 Pt = tpcTrack->Pt();
2809 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2810 if(fRunEfficiencyAnalysisEtaMode) {
2811 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2814 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2816 if(fUseCutsInEfficiency)
2817 if(!IsAccepted(esd,vertex,track)) continue;
2819 //reconstructed primary (anti)protons
2820 if(pdgcode == 2212) {
2821 if(fRunEfficiencyAnalysisEtaMode)
2822 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2825 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2829 if(label <= stack->GetNprimary()) {
2831 if(fRunEfficiencyAnalysisEtaMode)
2832 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
2835 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
2840 if(label > stack->GetNprimary()) {
2841 Int_t lPartMother = -1;
2842 Int_t motherPDGCode = -1;
2843 lPartMother = particle->GetFirstMother();
2844 TParticle *motherParticle = stack->Particle(lPartMother);
2845 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2847 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2848 if(fRunEfficiencyAnalysisEtaMode)
2849 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
2852 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
2857 if((particle->GetUniqueID() == 13)) {
2858 if(fRunEfficiencyAnalysisEtaMode)
2859 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
2862 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
2866 }//hadronic interactions
2869 if(pdgcode == -2212) {
2870 if(fRunEfficiencyAnalysisEtaMode)
2871 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2874 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2878 if(label <= stack->GetNprimary()) {
2879 if(fRunEfficiencyAnalysisEtaMode)
2880 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
2883 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
2888 if(label > stack->GetNprimary()) {
2889 Int_t lPartMother = -1;
2890 Int_t motherPDGCode = -1;
2891 lPartMother = particle->GetFirstMother();
2892 TParticle *motherParticle = stack->Particle(lPartMother);
2893 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2895 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2896 if(fRunEfficiencyAnalysisEtaMode)
2897 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
2900 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
2905 if((particle->GetUniqueID() == 13)) {
2906 if(fRunEfficiencyAnalysisEtaMode)
2907 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
2910 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
2914 }//hadronic interactions
2916 }//initial antiprotons
2919 track->GetTPCpid(probability);
2921 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2922 rcc += probability[i]*GetParticleFraction(i,P);
2923 if(rcc == 0.0) continue;
2925 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2926 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2927 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2928 if(fParticleType == 4) {
2929 if(fRunEfficiencyAnalysisEtaMode)
2930 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
2933 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
2937 if(TMath::Abs(pdgcode) == 2212) {
2938 if(fRunEfficiencyAnalysisEtaMode)
2939 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
2942 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
2946 }//properly identified as proton
2948 if(fRunEfficiencyAnalysisEtaMode)
2949 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
2952 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
2957 }//identified as proton
2959 else if(!fUseTPCOnly) {
2960 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2961 if(fRunEfficiencyAnalysisEtaMode) {
2962 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2965 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2968 if(fUseCutsInEfficiency)
2969 if(!IsAccepted(esd,vertex,track)) continue;
2971 //reconstructed primary (anti)protons
2972 if(pdgcode == 2212) {
2973 if(fRunEfficiencyAnalysisEtaMode)
2974 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2977 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2981 if(label <= stack->GetNprimary()) {
2983 if(fRunEfficiencyAnalysisEtaMode)
2984 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
2987 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
2992 if(label > stack->GetNprimary()) {
2993 Int_t lPartMother = -1;
2994 Int_t motherPDGCode = -1;
2995 lPartMother = particle->GetFirstMother();
2996 TParticle *motherParticle = stack->Particle(lPartMother);
2997 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2999 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3000 if(fRunEfficiencyAnalysisEtaMode)
3001 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3004 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3009 if((particle->GetUniqueID() == 13)) {
3010 if(fRunEfficiencyAnalysisEtaMode)
3011 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3014 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3018 }//hadronic interactions
3021 if(pdgcode == -2212) {
3022 if(fRunEfficiencyAnalysisEtaMode)
3023 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3026 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3030 if(label <= stack->GetNprimary()) {
3031 if(fRunEfficiencyAnalysisEtaMode)
3032 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3035 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3040 if(label > stack->GetNprimary()) {
3041 Int_t lPartMother = -1;
3042 Int_t motherPDGCode = -1;
3043 lPartMother = particle->GetFirstMother();
3044 TParticle *motherParticle = stack->Particle(lPartMother);
3045 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3047 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3048 if(fRunEfficiencyAnalysisEtaMode)
3049 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3052 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3057 if((particle->GetUniqueID() == 13)) {
3058 if(fRunEfficiencyAnalysisEtaMode)
3059 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3062 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3066 }//hadronic interactions
3068 }//initial antiprotons
3071 track->GetESDpid(probability);
3073 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3074 rcc += probability[i]*GetParticleFraction(i,P);
3075 if(rcc == 0.0) continue;
3077 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3078 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3079 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3080 if(fParticleType == 4) {
3081 if(fRunEfficiencyAnalysisEtaMode)
3082 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3084 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3088 if(TMath::Abs(pdgcode) == 2212) {
3089 if(fRunEfficiencyAnalysisEtaMode)
3090 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3093 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3097 }//properly identified as proton
3099 if(fRunEfficiencyAnalysisEtaMode)
3100 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3103 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3108 }//identified as proton
3112 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3115 //____________________________________________________________________//
3116 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3118 //Checks if the label is used already
3119 Bool_t status = kFALSE;
3120 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3121 if(labelArray.At(i) == label)
3128 //____________________________________________________________________//
3129 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3131 const AliESDVertex *vertex) {
3134 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3135 TParticle *particle = stack->Particle(iParticle);
3136 if(!particle) continue;
3138 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3139 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3140 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3142 Int_t pdgcode = particle->GetPdgCode();
3144 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3148 if(pdgcode == -2212)
3149 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3156 Int_t nGoodTracks = esd->GetNumberOfTracks();
3157 TArrayI labelArray(nGoodTracks);
3158 Int_t labelCounter = 0;
3159 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3160 AliESDtrack* track = esd->GetTrack(iTracks);
3161 if(!track) continue;
3163 Int_t label = TMath::Abs(track->GetLabel());
3164 if(IsLabelUsed(labelArray,label)) continue;
3165 labelArray.AddAt(label,labelCounter);
3168 TParticle *particle = stack->Particle(label);
3169 if(!particle) continue;
3170 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3172 AliESDtrack trackTPC;
3174 //in case it's a TPC only track relate it to the proper vertex
3175 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3176 Float_t p[2],cov[3];
3177 track->GetImpactParametersTPC(p,cov);
3178 if (p[0]==0 && p[1]==0)
3179 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3180 if (!track->FillTPCOnlyTrack(trackTPC)) {
3186 Double_t Pt = 0.0, P = 0.0;
3187 Double_t probability[5];
3188 Float_t dcaXY = 0.0, dcaZ = 0.0;
3189 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3191 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3192 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3194 Float_t chi2PerClusterITS = -1;
3195 if (nClustersITS!=0)
3196 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3197 Float_t chi2PerClusterTPC = -1;
3198 if (nClustersTPC!=0)
3199 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3200 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3201 Double_t extCov[15];
3202 track->GetExternalCovariance(extCov);
3206 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3207 if(!tpcTrack) continue;
3208 Pt = tpcTrack->Pt();
3210 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3211 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3214 track->GetTPCpid(probability);
3216 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3217 rcc += probability[i]*GetParticleFraction(i,P);
3218 if(rcc == 0.0) continue;
3220 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3221 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3222 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3223 if(fParticleType == 4) {
3224 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3226 FillQA(stack,esd,vertex,track);
3227 if(IsAccepted(esd,vertex,track)) {
3228 if(label <= stack->GetNprimary()) {
3229 if(track->Charge() > 0) {
3230 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3231 if(track->HasPointOnITSLayer(iLayer))
3232 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3234 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3235 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3236 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3237 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3238 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3239 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3240 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3241 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3242 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3243 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3245 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3246 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3247 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3248 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3252 }//accepted primary protons
3253 else if(track->Charge() < 0) {
3254 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3255 if(track->HasPointOnITSLayer(iLayer))
3256 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3258 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3259 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3260 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3261 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3262 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3263 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3264 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3265 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3266 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3267 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3269 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3270 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3271 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3272 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3276 }//accepted primary antiprotons
3277 }//accepted primary particles
3278 else if(label > stack->GetNprimary()) {
3279 Int_t lPartMother = -1;
3280 Int_t motherPDGCode = -1;
3282 lPartMother = particle->GetFirstMother();
3283 TParticle *motherParticle = stack->Particle(lPartMother);
3284 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3287 if(fMCProcessIdFlag)
3288 if(particle->GetUniqueID() != fMCProcessId) continue;
3289 if(fMotherParticlePDGCodeFlag)
3290 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3292 if(track->Charge() > 0) {
3293 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3294 if(track->HasPointOnITSLayer(iLayer))
3295 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3297 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3298 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3299 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3300 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3301 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3302 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3303 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3304 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3305 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3306 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3308 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3309 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3310 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3311 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3315 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3319 ConvertPDGToInt(motherPDGCode));
3320 }//accepted secondary protons
3321 else if(track->Charge() < 0) {
3322 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3323 if(track->HasPointOnITSLayer(iLayer))
3324 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3326 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3327 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3328 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3329 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3330 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3331 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3332 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3333 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3334 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3335 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3337 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3338 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3339 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3340 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3344 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3348 ConvertPDGToInt(motherPDGCode));
3349 }//accepted secondary antiprotons
3350 }//accepted secondary particles
3351 }//accepted - track cuts
3352 else {// if(!IsAccepted(esd,vertex,track)) {
3353 if(label <= stack->GetNprimary()) {
3354 if(track->Charge() > 0)
3355 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3359 else if(track->Charge() < 0)
3360 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3364 }//rejected primary particles
3365 else if(label > stack->GetNprimary()) {
3366 if(track->Charge() > 0)
3367 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3371 else if(track->Charge() < 0)
3372 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3376 }//rejected secondary particles
3377 }//rejected - track cuts
3381 else if(!fUseTPCOnly) {
3384 track->GetImpactParameters(dcaXY,dcaZ);
3387 track->GetESDpid(probability);
3389 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3390 rcc += probability[i]*GetParticleFraction(i,P);
3391 if(rcc == 0.0) continue;
3393 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3394 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3395 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3396 if(fParticleType == 4) {
3397 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3399 FillQA(stack,esd,vertex,track);
3400 if(IsAccepted(esd,vertex,track)) {
3401 if(label <= stack->GetNprimary()) {
3402 if(track->Charge() > 0) {
3403 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3404 if(track->HasPointOnITSLayer(iLayer))
3405 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3407 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3408 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3409 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3410 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3411 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3412 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3413 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3414 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3415 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3416 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3418 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3419 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3420 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3421 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3426 else if(track->Charge() < 0) {
3427 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3428 if(track->HasPointOnITSLayer(iLayer))
3429 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3431 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3432 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3433 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3434 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3435 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3436 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3437 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3438 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3439 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3440 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3442 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3443 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3444 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3445 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3450 }//primary particles
3451 else if(label > stack->GetNprimary()) {
3452 Int_t lPartMother = -1;
3453 Int_t motherPDGCode = -1;
3455 lPartMother = particle->GetFirstMother();
3456 TParticle *motherParticle = stack->Particle(lPartMother);
3457 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3460 if(fMCProcessIdFlag)
3461 if(particle->GetUniqueID() != fMCProcessId) continue;
3462 if(fMotherParticlePDGCodeFlag)
3463 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3465 if(track->Charge() > 0) {
3466 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3467 if(track->HasPointOnITSLayer(iLayer))
3468 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3470 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3471 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3472 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3473 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3474 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3475 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3476 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3477 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3478 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3479 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3481 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3482 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3483 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3484 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3488 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3492 ConvertPDGToInt(motherPDGCode));
3494 else if(track->Charge() < 0) {
3495 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3496 if(track->HasPointOnITSLayer(iLayer))
3497 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3499 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3500 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3501 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3502 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3503 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3504 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3505 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3506 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3507 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3508 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3510 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3511 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3512 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3513 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3518 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3522 ConvertPDGToInt(motherPDGCode));
3524 }//secondary particles
3525 }//accepted - track cuts
3526 else if(!IsAccepted(esd,vertex,track)) {
3527 if(label <= stack->GetNprimary()) {
3528 if(track->Charge() > 0)
3529 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3533 else if(track->Charge() < 0)
3534 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
3538 }//primary particles
3539 else if(label > stack->GetNprimary()) {
3540 if(track->Charge() > 0)
3541 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
3545 else if(track->Charge() < 0)
3546 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
3550 }//secondary particles
3551 }//rejected - track cuts
3553 }//combined tracking
3558 //____________________________________________________________________//
3559 void AliProtonQAAnalysis::InitMCAnalysis() {
3560 //MC analysis - 3D histograms: y-pT-pdg
3561 fPDGList = new TList();
3562 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
3563 ";y;P_{T} [GeV/c];PDG",
3564 fNBinsY,fMinY,fMaxY,
3565 fNBinsPt,fMinPt,fMaxPt,
3567 fPDGList->Add(gHistYPtPDGProtons);
3568 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
3569 ";y;P_{T} [GeV/c];PDG",
3570 fNBinsY,fMinY,fMaxY,
3571 fNBinsPt,fMinPt,fMaxPt,
3573 fPDGList->Add(gHistYPtPDGAntiProtons);
3576 fMCProcessesList = new TList();
3577 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
3578 fMCProcessesList->Add(gHistProtonsFromKLProcess);
3579 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
3580 fMCProcessesList->Add(gHistProtonsFromPionProcess);
3581 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
3582 fMCProcessesList->Add(gHistProtonsFromKSProcess);
3583 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
3584 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
3585 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
3586 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
3587 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
3588 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
3589 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
3590 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
3591 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
3592 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
3593 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3594 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
3595 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
3596 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
3597 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
3598 fMCProcessesList->Add(gHistProtonsFromXi0Process);
3599 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
3600 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
3602 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
3603 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
3604 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
3605 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
3606 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
3607 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
3608 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
3609 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
3610 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
3611 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
3612 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
3613 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
3614 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
3615 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
3616 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3617 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
3620 //____________________________________________________________________//
3621 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
3622 //Main analysis part - MC
3623 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3624 TParticle *particle = stack->Particle(iParticle);
3625 if(!particle) continue;
3627 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3628 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3629 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3631 Int_t pdgcode = particle->GetPdgCode();
3632 if(pdgcode == 2212) {
3633 if(iParticle <= stack->GetNprimary())
3634 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3638 else if(iParticle > stack->GetNprimary()) {
3639 Int_t lPartMother = particle->GetFirstMother();
3640 TParticle *motherParticle = stack->Particle(lPartMother);
3641 if(!motherParticle) continue;
3642 Int_t motherPDGCode = motherParticle->GetPdgCode();
3643 if(fMCProcessIdFlag)
3644 if(particle->GetUniqueID() != fMCProcessId) continue;
3645 if(fMotherParticlePDGCodeFlag)
3646 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3648 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3652 ConvertPDGToInt(motherParticle->GetPdgCode()));
3654 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3655 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
3656 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3657 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
3658 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3659 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
3660 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3661 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
3662 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3663 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
3664 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3665 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
3666 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
3667 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
3668 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3669 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
3670 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3671 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
3672 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
3673 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
3674 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
3675 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
3676 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
3677 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
3679 }//pdgcode of proton
3681 if(pdgcode == -2212) {
3682 if(iParticle <= stack->GetNprimary())
3683 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3687 else if(iParticle > stack->GetNprimary()) {
3688 Int_t lPartMother = particle->GetFirstMother();
3689 TParticle *motherParticle = stack->Particle(lPartMother);
3690 if(!motherParticle) continue;
3691 Int_t motherPDGCode = motherParticle->GetPdgCode();
3692 if(fMCProcessIdFlag)
3693 if(particle->GetUniqueID() != fMCProcessId) continue;
3694 if(fMotherParticlePDGCodeFlag)
3695 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3697 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3701 ConvertPDGToInt(motherParticle->GetPdgCode()));
3704 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3705 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
3706 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3707 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
3708 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3709 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
3710 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3711 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
3712 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3713 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
3714 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3715 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
3716 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3717 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
3718 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3719 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
3720 }//secondary antiproton
3721 }//pdgcode of antiproton
3726 //____________________________________________________________________//
3727 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
3728 //Converts the pdg code to an int based on the following scheme:
3729 //1: PDG code: 130 - Name: K_L0
3730 //2: PDG code: 211 - Name: pi+
3731 //3: PDG code: 310 - Name: K_S0
3732 //4: PDG code: 321 - Name: K+
3733 //5: PDG code: 2112 - Name: neutron
3734 //6: PDG code: 2212 - Name: proton
3735 //7: PDG code: 3112 - Name: Sigma-
3736 //8: PDG code: 3122 - Name: Lambda0
3737 //9: PDG code: 3222 - Name: Sigma+
3738 //10: PDG code: 3312 - Name: Xi-
3739 //11: PDG code: 3322 - Name: Xi0
3740 //12: PDG code: 3334 - Name: Omega-
3742 switch (TMath::Abs(pdgCode)) {
3800 //________________________________________________________________________
3801 /*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
3805 // Get the vertex from the ESD and returns it if the vertex is valid
3806 // depending on the analysis mode: TPC - Hybrid - Global
3807 const AliESDVertex* vertex = 0;
3808 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3809 Double_t kBz = esd->GetMagneticField();
3810 AliVertexerTracks vertexer(kBz);
3811 vertexer.SetTPCMode();
3812 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
3813 esd->SetPrimaryVertexTPC(vTPC);
3814 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
3815 AliESDtrack *t = esd->GetTrack(i);
3816 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
3819 vertex = esd->GetPrimaryVertexTPC();
3821 else if(fUseHybridTPC)
3822 vertex = esd->GetPrimaryVertexSPD();
3823 else if(!fUseTPCOnly)
3824 vertex = esd->GetPrimaryVertex();
3826 Printf("GetVertex: ERROR: Invalid analysis mode");
3828 if(!vertex) return 0;
3830 // check Ncontributors
3831 if(vertex->GetNContributors() <= 0) return 0;
3834 Double_t zRes = vertex->GetZRes();
3835 if(zRes == 0) return 0;
3838 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
3839 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
3840 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;