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 | 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() :
44 TObject(), fAnalysisEtaMode(kFALSE),
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),
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;
144 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
146 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0; eta = -10.0;
153 eta = tpcTrack->Eta();
164 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
165 if(fAnalysisEtaMode) {
166 if((eta < fMinY) || (eta > fMaxY))
170 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
177 //____________________________________________________________________//
178 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDEvent *esd,
179 const AliESDVertex *vertex,
180 AliESDtrack* track) {
181 // Checks if the track is excluded from the cuts
182 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
183 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
185 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
186 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
188 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
189 dca[0] = -100.; dca[1] = -100.;
190 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
197 tpcTrack->PropagateToDCA(vertex,
198 esd->GetMagneticField(),
202 else if(fUseHybridTPC) {
203 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
205 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
206 dca[0] = -100.; dca[1] = -100.;
207 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
214 tpcTrack->PropagateToDCA(vertex,
215 esd->GetMagneticField(),
224 track->PropagateToDCA(vertex,
225 esd->GetMagneticField(),
230 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
231 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
233 Float_t chi2PerClusterITS = -1;
235 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
236 Float_t chi2PerClusterTPC = -1;
238 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
241 track->GetExternalCovariance(extCov);
243 if(fPointOnITSLayer1Flag)
244 if(!track->HasPointOnITSLayer(0)) return kFALSE;
245 if(fPointOnITSLayer2Flag)
246 if(!track->HasPointOnITSLayer(1)) return kFALSE;
247 if(fPointOnITSLayer3Flag)
248 if(!track->HasPointOnITSLayer(2)) return kFALSE;
249 if(fPointOnITSLayer4Flag)
250 if(!track->HasPointOnITSLayer(3)) return kFALSE;
251 if(fPointOnITSLayer5Flag)
252 if(!track->HasPointOnITSLayer(4)) return kFALSE;
253 if(fPointOnITSLayer6Flag)
254 if(!track->HasPointOnITSLayer(5)) return kFALSE;
255 if(fMinITSClustersFlag)
256 if(nClustersITS < fMinITSClusters) return kFALSE;
257 if(fMaxChi2PerITSClusterFlag)
258 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
259 if(fMinTPCClustersFlag)
260 if(nClustersTPC < fMinTPCClusters) return kFALSE;
261 if(fMaxChi2PerTPCClusterFlag)
262 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
264 if(extCov[0] > fMaxCov11) return kFALSE;
266 if(extCov[2] > fMaxCov22) return kFALSE;
268 if(extCov[5] > fMaxCov33) return kFALSE;
270 if(extCov[9] > fMaxCov44) return kFALSE;
272 if(extCov[14] > fMaxCov55) return kFALSE;
273 if(fMaxSigmaToVertexFlag)
274 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
275 if(fMaxSigmaToVertexTPCFlag)
276 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
278 if(TMath::Abs(dca[0]) > fMaxDCAXY) return kFALSE;
280 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) return kFALSE;
282 if(TMath::Abs(dca[1]) > fMaxDCAZ) return kFALSE;
284 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) return kFALSE;
285 if(fMaxConstrainChi2Flag) {
286 if(track->GetConstrainedChi2() > 0)
287 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
290 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
292 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
294 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
296 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
301 //____________________________________________________________________//
302 void AliProtonQAAnalysis::FillQA(AliStack *stack,
304 const AliESDVertex *vertex,
305 AliESDtrack* track) {
306 // Checks if the track is excluded from the cuts
307 Int_t nPrimaries = stack->GetNprimary();
308 Int_t label = TMath::Abs(track->GetLabel());
310 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
311 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
313 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
314 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
316 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
317 dca[0] = -100.; dca[1] = -100.;
318 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
325 tpcTrack->PropagateToDCA(vertex,
326 esd->GetMagneticField(),
330 else if(fUseHybridTPC) {
331 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
333 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
334 dca[0] = -100.; dca[1] = -100.;
335 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
342 tpcTrack->PropagateToDCA(vertex,
343 esd->GetMagneticField(),
352 track->PropagateToDCA(vertex,
353 esd->GetMagneticField(),
358 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
359 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
361 Float_t chi2PerClusterITS = -1;
363 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
364 Float_t chi2PerClusterTPC = -1;
366 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
369 track->GetExternalCovariance(extCov);
371 //cout<<"Charge: "<<track->Charge()<<
372 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
373 //" - TPC clusters: "<<nClustersTPC<<endl;
375 if(track->Charge() > 0) {
377 if(label <= nPrimaries) {
378 if(fMinITSClustersFlag) {
379 if(nClustersITS < fMinITSClusters) {
380 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
383 else if(nClustersITS >= fMinITSClusters)
384 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
386 if(fMaxChi2PerITSClusterFlag) {
387 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
388 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
391 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
392 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
393 }//chi2 per ITS cluster
394 if(fMinTPCClustersFlag) {
395 if(nClustersTPC < fMinTPCClusters) {
396 //cout<<"Primary proton rejected"<<endl;
397 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
400 else if(nClustersTPC >= fMinTPCClusters) {
401 //cout<<"Primary proton accepted"<<endl;
402 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
405 if(fMaxChi2PerTPCClusterFlag) {
406 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
407 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
410 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
411 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
412 }//chi2 per TPC cluster
414 if(extCov[0] > fMaxCov11) {
415 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
418 else if(extCov[0] <= fMaxCov11)
419 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
422 if(extCov[2] > fMaxCov22) {
423 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
426 else if(extCov[2] <= fMaxCov22)
427 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
430 if(extCov[5] > fMaxCov33) {
431 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
434 else if(extCov[5] <= fMaxCov33)
435 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
438 if(extCov[9] > fMaxCov44) {
439 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
442 else if(extCov[9] <= fMaxCov44)
443 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
446 if(extCov[14] > fMaxCov55) {
447 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
450 else if(extCov[14] <= fMaxCov55)
451 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
453 if(fMaxSigmaToVertexFlag) {
454 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
455 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
458 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
459 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
461 if(fMaxSigmaToVertexTPCFlag) {
462 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
463 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
466 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
467 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
468 }//sigma to vertex TPC
470 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
471 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
474 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
475 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
476 }//DCA xy global tracking
477 if(fMaxDCAXYTPCFlag) {
478 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
479 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
482 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
483 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
484 }//DCA xy TPC tracking
486 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
487 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
490 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
491 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
492 }//DCA z global tracking
493 if(fMaxDCAZTPCFlag) {
494 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
495 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
498 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
499 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
500 }//DCA z TPC tracking
501 if(fMaxConstrainChi2Flag) {
502 if(track->GetConstrainedChi2() > 0) {
503 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
504 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
507 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
508 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
510 }//constrain chi2 - vertex
512 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
513 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
516 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
517 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
520 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
521 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
524 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
525 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
528 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
529 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
532 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
533 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
536 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
537 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
540 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
541 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
543 if(fPointOnITSLayer1Flag) {
544 if(!track->HasPointOnITSLayer(0)) {
545 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
547 else if(track->HasPointOnITSLayer(0))
548 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
550 if(fPointOnITSLayer2Flag) {
551 if(!track->HasPointOnITSLayer(1)) {
552 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
554 else if(track->HasPointOnITSLayer(1))
555 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
557 if(fPointOnITSLayer3Flag) {
558 if(!track->HasPointOnITSLayer(2)) {
559 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
561 else if(track->HasPointOnITSLayer(2))
562 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
564 if(fPointOnITSLayer4Flag) {
565 if(!track->HasPointOnITSLayer(3)) {
566 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
568 else if(track->HasPointOnITSLayer(3))
569 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
571 if(fPointOnITSLayer5Flag) {
572 if(!track->HasPointOnITSLayer(4)) {
573 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
575 else if(track->HasPointOnITSLayer(4))
576 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
578 if(fPointOnITSLayer6Flag) {
579 if(!track->HasPointOnITSLayer(5)) {
580 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
582 else if(track->HasPointOnITSLayer(5))
583 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
585 }//primary particle cut
588 if(label > nPrimaries) {
589 if(fMinITSClustersFlag) {
590 if(nClustersITS < fMinITSClusters) {
591 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
594 else if(nClustersITS >= fMinITSClusters)
595 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
597 if(fMaxChi2PerITSClusterFlag) {
598 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
599 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
602 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
603 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
604 }//chi2 per ITS cluster
605 if(fMinTPCClustersFlag) {
606 if(nClustersTPC < fMinTPCClusters) {
607 //cout<<"Secondary proton rejected"<<endl;
608 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
611 else if(nClustersTPC >= fMinTPCClusters) {
612 //cout<<"Secondary proton accepted"<<endl;
613 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
616 if(fMaxChi2PerTPCClusterFlag) {
617 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
618 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
621 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
622 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
623 }//chi2 per TPC cluster
625 if(extCov[0] > fMaxCov11) {
626 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
629 else if(extCov[0] <= fMaxCov11)
630 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
633 if(extCov[2] > fMaxCov22) {
634 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
637 else if(extCov[2] <= fMaxCov22)
638 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
641 if(extCov[5] > fMaxCov33) {
642 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
645 else if(extCov[5] <= fMaxCov33)
646 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
649 if(extCov[9] > fMaxCov44) {
650 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
653 else if(extCov[9] <= fMaxCov44)
654 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
657 if(extCov[14] > fMaxCov55) {
658 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
661 else if(extCov[14] <= fMaxCov55)
662 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
664 if(fMaxSigmaToVertexFlag) {
665 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
666 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
669 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
670 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
672 if(fMaxSigmaToVertexTPCFlag) {
673 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
674 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
677 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
678 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
679 }//sigma to vertex TPC
681 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
682 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
685 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
686 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
687 }//DCA xy global tracking
688 if(fMaxDCAXYTPCFlag) {
689 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
690 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
693 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
694 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
695 }//DCA xy TPC tracking
697 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
698 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
701 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
702 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
703 }//DCA z global tracking
704 if(fMaxDCAZTPCFlag) {
705 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
706 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
709 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
710 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
711 }//DCA z TPC tracking
712 if(fMaxConstrainChi2Flag) {
713 if(track->GetConstrainedChi2() > 0) {
714 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
715 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
718 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
719 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
721 }//constrain chi2 - vertex
723 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
724 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
727 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
728 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
731 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
732 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
735 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
736 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
739 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
740 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
743 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
744 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
747 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
748 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
751 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
752 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
754 if(fPointOnITSLayer1Flag) {
755 if(!track->HasPointOnITSLayer(0)) {
756 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
758 else if(track->HasPointOnITSLayer(0))
759 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
761 if(fPointOnITSLayer2Flag) {
762 if(!track->HasPointOnITSLayer(1)) {
763 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
765 else if(track->HasPointOnITSLayer(1))
766 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
768 if(fPointOnITSLayer3Flag) {
769 if(!track->HasPointOnITSLayer(2)) {
770 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
772 else if(track->HasPointOnITSLayer(2))
773 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
775 if(fPointOnITSLayer4Flag) {
776 if(!track->HasPointOnITSLayer(3)) {
777 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
779 else if(track->HasPointOnITSLayer(3))
780 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
782 if(fPointOnITSLayer5Flag) {
783 if(!track->HasPointOnITSLayer(4)) {
784 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
786 else if(track->HasPointOnITSLayer(4))
787 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
789 if(fPointOnITSLayer6Flag) {
790 if(!track->HasPointOnITSLayer(5)) {
791 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
793 else if(track->HasPointOnITSLayer(5))
794 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
796 }//secondary particle cut
800 if(track->Charge() < 0) {
802 if(label <= nPrimaries) {
803 if(fMinITSClustersFlag) {
804 if(nClustersITS < fMinITSClusters) {
805 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
808 else if(nClustersITS >= fMinITSClusters)
809 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
811 if(fMaxChi2PerITSClusterFlag) {
812 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
813 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
816 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
817 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
818 }//chi2 per ITS cluster
819 if(fMinTPCClustersFlag) {
820 if(nClustersTPC < fMinTPCClusters) {
821 //cout<<"Primary antiproton rejected"<<endl;
822 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
825 else if(nClustersTPC >= fMinTPCClusters) {
826 //cout<<"Primary antiproton accepted"<<endl;
827 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
830 if(fMaxChi2PerTPCClusterFlag) {
831 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
832 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
835 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
836 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
837 }//chi2 per TPC cluster
839 if(extCov[0] > fMaxCov11) {
840 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
843 else if(extCov[0] <= fMaxCov11)
844 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
847 if(extCov[2] > fMaxCov22) {
848 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
851 else if(extCov[2] <= fMaxCov22)
852 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
855 if(extCov[5] > fMaxCov33) {
856 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
859 else if(extCov[5] <= fMaxCov33)
860 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
863 if(extCov[9] > fMaxCov44) {
864 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
867 else if(extCov[9] <= fMaxCov44)
868 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
871 if(extCov[14] > fMaxCov55) {
872 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
875 else if(extCov[14] <= fMaxCov55)
876 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
878 if(fMaxSigmaToVertexFlag) {
879 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
880 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
883 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
884 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
886 if(fMaxSigmaToVertexTPCFlag) {
887 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
888 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
891 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
892 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
893 }//sigma to vertex TPC
895 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
896 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
899 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
900 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
901 }//DCA xy global tracking
902 if(fMaxDCAXYTPCFlag) {
903 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
904 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
907 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
908 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
909 }//DCA xy TPC tracking
911 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
912 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
915 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
916 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
917 }//DCA z global tracking
918 if(fMaxDCAZTPCFlag) {
919 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
920 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
923 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
924 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
925 }//DCA z TPC tracking
926 if(fMaxConstrainChi2Flag) {
927 if(track->GetConstrainedChi2() > 0) {
928 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
929 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
932 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
933 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
935 }//constrain chi2 - vertex
937 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
938 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
941 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
942 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
945 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
946 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
949 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
950 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
953 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
954 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
957 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
958 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
961 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
962 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
965 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
966 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
968 if(fPointOnITSLayer1Flag) {
969 if(!track->HasPointOnITSLayer(0)) {
970 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
972 else if(track->HasPointOnITSLayer(0))
973 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
975 if(fPointOnITSLayer2Flag) {
976 if(!track->HasPointOnITSLayer(1)) {
977 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
979 else if(track->HasPointOnITSLayer(1))
980 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
982 if(fPointOnITSLayer3Flag) {
983 if(!track->HasPointOnITSLayer(2)) {
984 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
986 else if(track->HasPointOnITSLayer(2))
987 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
989 if(fPointOnITSLayer4Flag) {
990 if(!track->HasPointOnITSLayer(3)) {
991 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
993 else if(track->HasPointOnITSLayer(3))
994 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
996 if(fPointOnITSLayer5Flag) {
997 if(!track->HasPointOnITSLayer(4)) {
998 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
1000 else if(track->HasPointOnITSLayer(4))
1001 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1003 if(fPointOnITSLayer6Flag) {
1004 if(!track->HasPointOnITSLayer(5)) {
1005 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
1007 else if(track->HasPointOnITSLayer(5))
1008 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1010 }//primary particle cut
1013 if(label > nPrimaries) {
1014 if(fMinITSClustersFlag) {
1015 if(nClustersITS < fMinITSClusters) {
1016 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
1019 else if(nClustersITS >= fMinITSClusters)
1020 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1022 if(fMaxChi2PerITSClusterFlag) {
1023 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
1024 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1027 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
1028 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1029 }//chi2 per ITS cluster
1030 if(fMinTPCClustersFlag) {
1031 if(nClustersTPC < fMinTPCClusters) {
1032 //cout<<"Secondary antiproton rejected"<<endl;
1033 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1036 else if(nClustersTPC >= fMinTPCClusters) {
1037 //cout<<"Secondary antiproton accepted"<<endl;
1038 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1041 if(fMaxChi2PerTPCClusterFlag) {
1042 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
1043 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1046 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
1047 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1048 }//chi2 per TPC cluster
1050 if(extCov[0] > fMaxCov11) {
1051 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
1054 else if(extCov[0] <= fMaxCov11)
1055 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1058 if(extCov[2] > fMaxCov22) {
1059 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1062 else if(extCov[2] <= fMaxCov22)
1063 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1066 if(extCov[5] > fMaxCov33) {
1067 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1070 else if(extCov[5] <= fMaxCov33)
1071 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1074 if(extCov[9] > fMaxCov44) {
1075 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1078 else if(extCov[9] <= fMaxCov44)
1079 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1082 if(extCov[14] > fMaxCov55) {
1083 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1086 else if(extCov[14] <= fMaxCov55)
1087 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1089 if(fMaxSigmaToVertexFlag) {
1090 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1091 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1094 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1095 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1097 if(fMaxSigmaToVertexTPCFlag) {
1098 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1099 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1102 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1103 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1104 }//sigma to vertex TPC
1106 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
1107 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
1110 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
1111 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
1112 }//DCA xy global tracking
1113 if(fMaxDCAXYTPCFlag) {
1114 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
1115 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
1118 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
1119 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
1120 }//DCA xy TPC tracking
1122 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
1123 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
1126 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
1127 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
1128 }//DCA z global tracking
1129 if(fMaxDCAZTPCFlag) {
1130 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
1131 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
1134 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
1135 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
1136 }//DCA z TPC tracking
1137 if(fMaxConstrainChi2Flag) {
1138 if(track->GetConstrainedChi2() > 0) {
1139 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1140 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1143 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1144 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1146 }//constrain chi2 - vertex
1148 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1149 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1152 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1153 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1156 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1157 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1160 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1161 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1164 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1165 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1168 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1169 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1172 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1173 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1176 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1177 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1179 if(fPointOnITSLayer1Flag) {
1180 if(!track->HasPointOnITSLayer(0)) {
1181 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1183 else if(track->HasPointOnITSLayer(0))
1184 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1186 if(fPointOnITSLayer2Flag) {
1187 if(!track->HasPointOnITSLayer(1)) {
1188 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1190 else if(track->HasPointOnITSLayer(1))
1191 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1193 if(fPointOnITSLayer3Flag) {
1194 if(!track->HasPointOnITSLayer(2)) {
1195 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1197 else if(track->HasPointOnITSLayer(2))
1198 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1200 if(fPointOnITSLayer4Flag) {
1201 if(!track->HasPointOnITSLayer(3)) {
1202 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1204 else if(track->HasPointOnITSLayer(3))
1205 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1207 if(fPointOnITSLayer5Flag) {
1208 if(!track->HasPointOnITSLayer(4)) {
1209 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1211 else if(track->HasPointOnITSLayer(4))
1212 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1214 if(fPointOnITSLayer6Flag) {
1215 if(!track->HasPointOnITSLayer(5)) {
1216 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1218 else if(track->HasPointOnITSLayer(5))
1219 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1221 }//secondary particle cut
1225 //____________________________________________________________________//
1226 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1227 // Calculates the number of sigma to the vertex.
1231 if((fUseTPCOnly)&&(!fUseHybridTPC))
1232 esdTrack->GetImpactParametersTPC(b,bCov);
1234 esdTrack->GetImpactParameters(b,bCov);
1236 if (bCov[0]<=0 || bCov[2]<=0) {
1237 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1238 bCov[0]=0; bCov[2]=0;
1240 bRes[0] = TMath::Sqrt(bCov[0]);
1241 bRes[1] = TMath::Sqrt(bCov[2]);
1243 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1245 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1247 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1249 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1254 //____________________________________________________________________//
1255 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1256 //returns the rapidity of the proton - to be removed
1257 Double_t fMass = 9.38270000000000048e-01;
1259 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1260 TMath::Power(Py,2) +
1261 TMath::Power(Pz,2));
1262 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1265 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1270 //____________________________________________________________________//
1271 void AliProtonQAAnalysis::SetRunQAAnalysis() {
1272 //initializes the QA lists
1273 //fQAHistograms = kTRUE;
1274 fGlobalQAList = new TList();
1275 fQA2DList = new TList();
1276 fQA2DList->SetName("fQA2DList");
1277 fGlobalQAList->Add(fQA2DList);
1279 fQAPrimaryProtonsAcceptedList = new TList();
1280 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1281 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1283 fQAPrimaryProtonsRejectedList = new TList();
1284 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1285 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1287 fQASecondaryProtonsAcceptedList = new TList();
1288 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1289 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1291 fQASecondaryProtonsRejectedList = new TList();
1292 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1293 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1295 fQAPrimaryAntiProtonsAcceptedList = new TList();
1296 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1297 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1299 fQAPrimaryAntiProtonsRejectedList = new TList();
1300 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1301 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1303 fQASecondaryAntiProtonsAcceptedList = new TList();
1304 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1305 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1307 fQASecondaryAntiProtonsRejectedList = new TList();
1308 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1309 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1312 //____________________________________________________________________//
1313 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1314 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1315 //Initializes the QA binning
1317 fMinY = minY; fMaxY = maxY;
1319 fMinPt = minPt; fMaxPt = maxPt;
1322 if(fRunMCAnalysis) InitMCAnalysis();
1323 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1326 //____________________________________________________________________//
1327 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1328 //Initialization of the efficiency list - reconstruction & PID efficiency
1329 //Adding each monitored object in the list
1330 fEfficiencyList = new TList();
1332 //MC primary protons and antiprotons for the reconstruction efficiency
1333 TH2D *gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1335 fNBinsY,fMinY,fMaxY,
1336 fNBinsPt,fMinPt,fMaxPt);
1337 if(fAnalysisEtaMode)
1338 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1340 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
1341 gHistMCYPtProtons->SetStats(kTRUE);
1342 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1343 fEfficiencyList->Add(gHistMCYPtProtons);
1344 TH2D *gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1346 fNBinsY,fMinY,fMaxY,
1347 fNBinsPt,fMinPt,fMaxPt);
1348 if(fAnalysisEtaMode)
1349 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1351 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
1352 gHistMCYPtAntiProtons->SetStats(kTRUE);
1353 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1354 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1356 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1357 TH2D *gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1359 fNBinsY,fMinY,fMaxY,
1360 fNBinsPt,fMinPt,fMaxPt);
1361 if(fAnalysisEtaMode)
1362 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1364 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1365 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1366 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1367 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1368 TH2D *gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1370 fNBinsY,fMinY,fMaxY,
1371 fNBinsPt,fMinPt,fMaxPt);
1372 if(fAnalysisEtaMode)
1373 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1375 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1376 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1377 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1378 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1380 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1381 TH2D *gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1383 fNBinsY,fMinY,fMaxY,
1384 fNBinsPt,fMinPt,fMaxPt);
1385 if(fAnalysisEtaMode)
1386 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1388 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1389 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1390 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1391 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1392 TH2D *gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1394 fNBinsY,fMinY,fMaxY,
1395 fNBinsPt,fMinPt,fMaxPt);
1396 if(fAnalysisEtaMode)
1397 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1399 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1400 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1401 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1402 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1404 //ESD primary protons and antiprotons for the reconstruction efficiency
1405 TH2D *gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1407 fNBinsY,fMinY,fMaxY,
1408 fNBinsPt,fMinPt,fMaxPt);
1409 if(fAnalysisEtaMode)
1410 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1412 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
1413 gHistESDYPtProtons->SetStats(kTRUE);
1414 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1415 fEfficiencyList->Add(gHistESDYPtProtons);
1416 TH2D *gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1418 fNBinsY,fMinY,fMaxY,
1419 fNBinsPt,fMinPt,fMaxPt);
1420 if(fAnalysisEtaMode)
1421 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1423 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
1424 gHistESDYPtAntiProtons->SetStats(kTRUE);
1425 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1426 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1428 //ESD (anti)protons from weak decays for the reconstruction efficiency
1429 TH2D *gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1431 fNBinsY,fMinY,fMaxY,
1432 fNBinsPt,fMinPt,fMaxPt);
1433 if(fAnalysisEtaMode)
1434 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1436 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1437 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1438 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1439 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1440 TH2D *gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1442 fNBinsY,fMinY,fMaxY,
1443 fNBinsPt,fMinPt,fMaxPt);
1444 if(fAnalysisEtaMode)
1445 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1447 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1448 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1449 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1450 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1452 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1453 TH2D *gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1455 fNBinsY,fMinY,fMaxY,
1456 fNBinsPt,fMinPt,fMaxPt);
1457 if(fAnalysisEtaMode)
1458 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1460 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1461 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1462 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1463 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1464 TH2D *gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1466 fNBinsY,fMinY,fMaxY,
1467 fNBinsPt,fMinPt,fMaxPt);
1468 if(fAnalysisEtaMode)
1469 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1471 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1472 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1473 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1474 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1477 //ESD reconstructed tracks that were initially protons for the PID efficiency
1478 TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
1480 fNBinsY,fMinY,fMaxY,
1481 fNBinsPt,fMinPt,fMaxPt);
1482 if(fAnalysisEtaMode)
1483 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1485 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
1486 gHistESDInitYPtProtons->SetStats(kTRUE);
1487 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1488 fEfficiencyList->Add(gHistESDInitYPtProtons);
1490 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1491 TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
1493 fNBinsY,fMinY,fMaxY,
1494 fNBinsPt,fMinPt,fMaxPt);
1495 if(fAnalysisEtaMode)
1496 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1498 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
1499 gHistESDIdYPtProtons->SetStats(kTRUE);
1500 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1501 fEfficiencyList->Add(gHistESDIdYPtProtons);
1503 //ESD reconstructed tracks that were identified as protons for the PID contamination
1504 TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
1506 fNBinsY,fMinY,fMaxY,
1507 fNBinsPt,fMinPt,fMaxPt);
1508 if(fAnalysisEtaMode)
1509 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1511 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
1512 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1513 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1514 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1516 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1517 TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
1519 fNBinsY,fMinY,fMaxY,
1520 fNBinsPt,fMinPt,fMaxPt);
1521 if(fAnalysisEtaMode)
1522 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1524 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
1525 gHistESDContamYPtProtons->SetStats(kTRUE);
1526 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1527 fEfficiencyList->Add(gHistESDContamYPtProtons);
1530 //____________________________________________________________________//
1531 void AliProtonQAAnalysis::InitCutLists() {
1532 //Initialization of the cut lists
1533 //Adding each monitored object in each list
1536 fAcceptedCutList = new TList();
1537 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1538 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1539 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1540 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1541 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1542 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1543 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1544 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1546 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1547 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1548 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1549 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1550 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1551 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1552 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1553 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1555 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1556 ";x^{2}/N_{clusters} (ITS);Entries",
1558 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1559 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1560 ";x^{2}/N_{clusters} (ITS);Entries",
1562 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1563 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1564 ";x^{2}/N_{clusters} (ITS);Entries",
1566 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1567 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1568 ";x^{2}/N_{clusters} (ITS);Entries",
1570 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1572 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1573 ";Log_{10}(#chi^{2});Entries",
1575 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1576 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1577 ";Log_{10}(#chi^{2});Entries",
1579 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1580 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1581 ";Log_{10}(#chi^{2});Entries",
1583 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1584 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1585 ";Log_{10}(#chi^{2});Entries",
1587 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1589 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1590 ";N_{clusters} (TPC);Entries",
1592 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1593 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1594 ";N_{clusters} (TPC);Entries",
1596 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1597 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1598 ";N_{clusters} (TPC);Entries",
1600 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1601 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1602 ";N_{clusters} (TPC);Entries",
1604 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1606 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1607 ";x^{2}/N_{clusters} (TPC);Entries",
1609 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1610 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1611 ";x^{2}/N_{clusters} (TPC);Entries",
1613 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1614 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1615 ";x^{2}/N_{clusters} (TPC);Entries",
1617 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1618 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1619 ";x^{2}/N_{clusters} (TPC);Entries",
1621 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1623 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1624 ";#sigma_{y} [cm];Entries",
1626 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1627 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1628 ";#sigma_{y} [cm];Entries",
1630 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1631 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1632 ";#sigma_{y} [cm];Entries",
1634 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1635 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1636 ";#sigma_{y} [cm];Entries",
1638 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1641 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1642 ";#sigma_{z} [cm];Entries",
1644 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1645 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1646 ";#sigma_{z} [cm];Entries",
1648 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1649 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1650 ";#sigma_{z} [cm];Entries",
1652 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1653 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1654 ";#sigma_{z} [cm];Entries",
1656 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1659 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1660 ";#sigma_{sin(#phi)};Entries",
1662 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1663 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1664 ";#sigma_{sin(#phi)};Entries",
1666 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1667 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1668 ";#sigma_{sin(#phi)};Entries",
1670 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1671 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1672 ";#sigma_{sin(#phi)};Entries",
1674 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1677 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1678 ";#sigma_{tan(#lambda)};Entries",
1680 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1681 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1682 ";#sigma_{tan(#lambda)};Entries",
1684 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1685 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1686 ";#sigma_{tan(#lambda)};Entries",
1688 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1689 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1690 ";#sigma_{tan(#lambda)};Entries",
1692 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1695 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1696 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1698 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1699 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1700 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1702 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1703 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1704 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1706 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1707 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1708 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1710 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1713 fAcceptedDCAList = new TList();
1714 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1715 ";DCA_{xy} [cm];Entries",
1717 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1718 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1719 ";DCA_{xy} [cm];Entries",
1721 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1722 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1723 ";DCA_{xy} [cm];Entries",
1725 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1726 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1727 ";DCA_{xy} [cm];Entries",
1730 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1731 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1732 ";DCA_{z} [cm];Entries",
1734 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1735 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1736 ";DCA_{z} [cm];Entries",
1738 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1739 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1740 ";DCA_{z} [cm];Entries",
1742 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1743 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1744 ";DCA_{z} [cm];Entries",
1746 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1748 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1749 ";#sigma_{Vertex};Entries",
1751 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1752 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1753 ";#sigma_{Vertex};Entries",
1755 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1756 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1757 ";#sigma_{Vertex};Entries",
1759 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1760 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1761 ";#sigma_{Vertex};Entries",
1763 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1767 //____________________________________________________________________//
1768 void AliProtonQAAnalysis::InitQA() {
1769 //Initializes the QA histograms and builds the directory structure
1770 //if(!fQAHistograms)
1774 //TDirectory *dir2D = gDirectory->mkdir("2D");
1775 //fGlobalQAList->Add(dir2D); dir2D->cd();
1776 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1778 fNBinsY,fMinY,fMaxY,
1779 fNBinsPt,fMinPt,fMaxPt);
1780 if(fAnalysisEtaMode)
1781 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("#eta");
1783 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("y");
1784 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1785 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1786 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
1787 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1789 fNBinsY,fMinY,fMaxY,
1790 fNBinsPt,fMinPt,fMaxPt);
1791 if(fAnalysisEtaMode)
1792 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("#eta");
1794 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("y");
1795 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1796 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1797 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
1799 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1801 fNBinsY,fMinY,fMaxY,
1802 fNBinsPt,fMinPt,fMaxPt);
1803 if(fAnalysisEtaMode)
1804 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("#eta");
1806 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("y");
1807 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1808 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1809 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
1810 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1812 fNBinsY,fMinY,fMaxY,
1813 fNBinsPt,fMinPt,fMaxPt);
1814 if(fAnalysisEtaMode)
1815 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("#eta");
1817 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("y");
1818 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1819 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1820 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
1822 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1824 fNBinsY,fMinY,fMaxY,
1825 fNBinsPt,fMinPt,fMaxPt);
1826 if(fAnalysisEtaMode)
1827 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
1829 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("y");
1830 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1831 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1832 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
1833 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1835 fNBinsY,fMinY,fMaxY,
1836 fNBinsPt,fMinPt,fMaxPt);
1837 if(fAnalysisEtaMode)
1838 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
1840 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("y");
1841 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1842 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1843 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
1845 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1847 fNBinsY,fMinY,fMaxY,
1848 fNBinsPt,fMinPt,fMaxPt);
1849 if(fAnalysisEtaMode)
1850 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
1852 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("y");
1853 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1854 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1855 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
1856 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1858 fNBinsY,fMinY,fMaxY,
1859 fNBinsPt,fMinPt,fMaxPt);
1860 if(fAnalysisEtaMode)
1861 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
1863 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("y");
1864 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1865 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1866 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
1868 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
1870 fNBinsY,fMinY,fMaxY,
1871 fNBinsPt,fMinPt,fMaxPt);
1872 if(fAnalysisEtaMode)
1873 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("#eta");
1875 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("y");
1876 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
1877 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
1878 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
1879 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
1881 fNBinsY,fMinY,fMaxY,
1882 fNBinsPt,fMinPt,fMaxPt);
1883 if(fAnalysisEtaMode)
1884 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("#eta");
1886 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("y");
1887 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
1888 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
1889 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
1891 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
1892 ";;P_{T} [GeV/c];PDG",
1893 fNBinsY,fMinY,fMaxY,
1894 fNBinsPt,fMinPt,fMaxPt,
1896 if(fAnalysisEtaMode)
1897 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("#eta");
1899 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("y");
1900 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
1901 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
1902 ";;P_{T} [GeV/c];PDG",
1903 fNBinsY,fMinY,fMaxY,
1904 fNBinsPt,fMinPt,fMaxPt,
1906 if(fAnalysisEtaMode)
1907 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("#eta");
1909 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("y");
1910 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
1912 /*gDirectory->cd("../");
1914 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1915 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1917 //________________________________________________________________//
1918 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1919 dirProtonsPrimary->cd();
1920 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1921 dirProtonsPrimaryAccepted->cd();*/
1923 //Accepted primary protons
1924 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1925 ";N_{clusters} (ITS);Entries",
1927 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1928 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1929 ";x^{2}/N_{clusters} (ITS);Entries",
1931 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1932 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1933 ";N_{clusters} (TPC);Entries",
1935 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1936 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1937 ";x^{2}/N_{clusters} (TPC);Entries",
1939 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1940 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
1941 ";#sigma_{y} [cm];Entries",
1943 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
1944 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
1945 ";#sigma_{z} [cm];Entries",
1947 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
1948 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
1949 ";#sigma_{sin(#phi)};Entries",
1951 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
1952 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
1953 ";#sigma_{tan(#lambda)};Entries",
1955 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
1956 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
1957 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1959 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
1960 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
1961 ";#sigma_{Vertex};Entries",
1963 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
1964 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
1965 ";#sigma_{Vertex};Entries",
1967 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
1968 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
1969 ";DCA_{xy} [cm];Entries",
1971 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
1972 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
1973 ";DCA_{xy} [cm];Entries",
1975 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
1976 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
1977 ";DCA_{z} [cm];Entries",
1979 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
1980 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
1981 ";DCA_{z} [cm];Entries",
1983 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
1984 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
1985 ";Log_{10}(#chi^{2});Entries",
1987 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
1988 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
1990 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
1991 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
1993 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
1994 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
1996 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
1997 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
1999 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2000 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
2002 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2003 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
2005 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2006 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
2008 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2009 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
2011 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2012 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
2014 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2015 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
2017 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
2019 //Rejected primary protons
2020 /*gDirectory->cd("../");
2021 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2022 dirProtonsPrimaryRejected->cd();*/
2024 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
2025 ";N_{clusters} (ITS);Entries",
2027 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2028 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
2029 ";x^{2}/N_{clusters} (ITS);Entries",
2031 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2032 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
2033 ";N_{clusters} (TPC);Entries",
2035 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2036 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
2037 ";x^{2}/N_{clusters} (TPC);Entries",
2039 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2040 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
2041 ";#sigma_{y} [cm];Entries",
2043 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2044 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
2045 ";#sigma_{z} [cm];Entries",
2047 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2048 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
2049 ";#sigma_{sin(#phi)};Entries",
2051 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2052 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
2053 ";#sigma_{tan(#lambda)};Entries",
2055 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2056 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2057 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2059 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2060 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2061 ";#sigma_{Vertex};Entries",
2063 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2064 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2065 ";#sigma_{Vertex};Entries",
2067 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2068 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2069 ";DCA_{xy} [cm];Entries",
2071 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2072 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2073 ";DCA_{xy} [cm];Entries",
2075 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2076 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2077 ";DCA_{z} [cm];Entries",
2079 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2080 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2081 ";DCA_{z} [cm];Entries",
2083 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2084 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2085 ";Log_{10}(#chi^{2});Entries",
2087 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2088 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2090 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2091 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2093 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2094 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2096 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2097 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2099 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2100 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2102 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2103 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2105 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2106 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2108 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2109 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2111 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2112 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2114 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2115 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2117 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2119 //________________________________________________________________//
2120 /*gDirectory->cd("../../");
2122 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2123 dirProtonsSecondary->cd();
2124 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2125 dirProtonsSecondaryAccepted->cd();*/
2127 //Accepted secondary protons
2128 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2129 ";N_{clusters} (ITS);Entries",
2131 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2132 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2133 ";x^{2}/N_{clusters} (ITS);Entries",
2135 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2136 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2137 ";N_{clusters} (TPC);Entries",
2139 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2140 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2141 ";x^{2}/N_{clusters} (TPC);Entries",
2143 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2144 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2145 ";#sigma_{y} [cm];Entries",
2147 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2148 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2149 ";#sigma_{z} [cm];Entries",
2151 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2152 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2153 ";#sigma_{sin(#phi)};Entries",
2155 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2156 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2157 ";#sigma_{tan(#lambda)};Entries",
2159 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2160 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2161 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2163 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2164 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2165 ";#sigma_{Vertex};Entries",
2167 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2168 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2169 ";#sigma_{Vertex};Entries",
2171 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2172 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2173 ";DCA_{xy} [cm];Entries",
2175 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2176 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2177 ";DCA_{xy} [cm];Entries",
2179 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2180 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2181 ";DCA_{z} [cm];Entries",
2183 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2184 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2185 ";DCA_{z} [cm];Entries",
2187 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2188 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2189 ";Log_{10}(#chi^{2});Entries",
2191 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2192 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2194 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2195 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2197 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2198 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2200 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2201 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2203 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2204 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2206 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2207 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2209 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2210 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2212 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2213 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2215 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2216 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2218 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2219 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2221 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2223 //Rejected secondary protons
2224 /*gDirectory->cd("../");
2225 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2226 dirProtonsSecondaryRejected->cd();*/
2228 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2229 ";N_{clusters} (ITS);Entries",
2231 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2232 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2233 ";x^{2}/N_{clusters} (ITS);Entries",
2235 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2236 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2237 ";N_{clusters} (TPC);Entries",
2239 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2240 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2241 ";x^{2}/N_{clusters} (TPC);Entries",
2243 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2244 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2245 ";#sigma_{y} [cm];Entries",
2247 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2248 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2249 ";#sigma_{z} [cm];Entries",
2251 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2252 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2253 ";#sigma_{sin(#phi)};Entries",
2255 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2256 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2257 ";#sigma_{tan(#lambda)};Entries",
2259 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2260 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2261 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2263 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2264 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2265 ";#sigma_{Vertex};Entries",
2267 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2268 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2269 ";#sigma_{Vertex};Entries",
2271 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2272 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2273 ";DCA_{xy} [cm];Entries",
2275 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2276 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2277 ";DCA_{xy} [cm];Entries",
2279 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2280 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2281 ";DCA_{z} [cm];Entries",
2283 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2284 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2285 ";DCA_{z} [cm];Entries",
2287 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2288 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2289 ";Log_{10}(#chi^{2});Entries",
2291 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2292 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2294 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2295 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2297 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2298 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2300 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2301 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2303 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2304 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2306 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2307 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2309 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2310 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2312 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2313 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2315 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2316 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2318 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2319 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2321 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2324 /*gDirectory->cd("../../../");
2327 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2328 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2330 //________________________________________________________________//
2331 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2332 dirAntiProtonsPrimary->cd();
2333 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2334 dirAntiProtonsPrimaryAccepted->cd();*/
2336 //Accepted primary antiprotons
2337 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2338 ";N_{clusters} (ITS);Entries",
2340 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2341 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2342 ";x^{2}/N_{clusters} (ITS);Entries",
2344 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2345 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2346 ";N_{clusters} (TPC);Entries",
2348 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2349 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2350 ";x^{2}/N_{clusters} (TPC);Entries",
2352 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2353 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2354 ";#sigma_{y} [cm];Entries",
2356 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2357 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2358 ";#sigma_{z} [cm];Entries",
2360 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2361 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2362 ";#sigma_{sin(#phi)};Entries",
2364 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2365 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2366 ";#sigma_{tan(#lambda)};Entries",
2368 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2369 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2370 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2372 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2373 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2374 ";#sigma_{Vertex};Entries",
2376 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2377 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2378 ";#sigma_{Vertex};Entries",
2380 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2381 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2382 ";DCA_{xy} [cm];Entries",
2384 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2385 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2386 ";DCA_{xy} [cm];Entries",
2388 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2389 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2390 ";DCA_{z} [cm];Entries",
2392 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2393 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2394 ";DCA_{z} [cm];Entries",
2396 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2397 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2398 ";Log_{10}(#chi^{2});Entries",
2400 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2401 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2403 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2404 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2406 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2407 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2409 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2410 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2412 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2413 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2415 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2416 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2418 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2419 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2421 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2422 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2424 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2425 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2427 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2428 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2430 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2432 //Rejected primary antiprotons
2433 /*gDirectory->cd("../");
2434 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2435 dirAntiProtonsPrimaryRejected->cd();*/
2437 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2438 ";N_{clusters} (ITS);Entries",
2440 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2441 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2442 ";x^{2}/N_{clusters} (ITS);Entries",
2444 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2445 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2446 ";N_{clusters} (TPC);Entries",
2448 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2449 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2450 ";x^{2}/N_{clusters} (TPC);Entries",
2452 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2453 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2454 ";#sigma_{y} [cm];Entries",
2456 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2457 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2458 ";#sigma_{z} [cm];Entries",
2460 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2461 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2462 ";#sigma_{sin(#phi)};Entries",
2464 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2465 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2466 ";#sigma_{tan(#lambda)};Entries",
2468 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2469 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2470 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2472 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2473 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2474 ";#sigma_{Vertex};Entries",
2476 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2477 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2478 ";#sigma_{Vertex};Entries",
2480 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2481 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2482 ";DCA_{xy} [cm];Entries",
2484 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2485 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2486 ";DCA_{xy} [cm];Entries",
2488 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2489 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2490 ";DCA_{z} [cm];Entries",
2492 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2493 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2494 ";DCA_{z} [cm];Entries",
2496 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2497 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2498 ";Log_{10}(#chi^{2});Entries",
2500 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2501 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2503 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2504 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2506 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2507 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2509 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2510 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2512 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2513 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2515 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2516 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2518 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2519 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2521 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2522 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2524 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2525 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2527 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2528 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2530 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2532 //________________________________________________________________//
2533 /*gDirectory->cd("../../");
2535 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2536 dirAntiProtonsSecondary->cd();
2537 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2538 dirAntiProtonsSecondaryAccepted->cd();*/
2540 //Accepted secondary antiprotons
2541 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2542 ";N_{clusters} (ITS);Entries",
2544 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2545 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2546 ";x^{2}/N_{clusters} (ITS);Entries",
2548 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2549 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2550 ";N_{clusters} (TPC);Entries",
2552 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2553 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2554 ";x^{2}/N_{clusters} (TPC);Entries",
2556 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2557 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2558 ";#sigma_{y} [cm];Entries",
2560 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2561 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2562 ";#sigma_{z} [cm];Entries",
2564 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2565 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2566 ";#sigma_{sin(#phi)};Entries",
2568 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2569 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2570 ";#sigma_{tan(#lambda)};Entries",
2572 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2573 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2574 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2576 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2577 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2578 ";#sigma_{Vertex};Entries",
2580 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2581 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2582 ";#sigma_{Vertex};Entries",
2584 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2585 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2586 ";DCA_{xy} [cm];Entries",
2588 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2589 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2590 ";DCA_{xy} [cm];Entries",
2592 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2593 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2594 ";DCA_{z} [cm];Entries",
2596 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2597 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2598 ";DCA_{z} [cm];Entries",
2600 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2601 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2602 ";Log_{10}(#chi^{2});Entries",
2604 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2605 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2607 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2608 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2610 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2611 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2613 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2614 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2616 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2617 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2619 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2620 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2622 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2623 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2625 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2626 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2628 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2629 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2631 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2632 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2634 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2636 //Rejected secondary antiprotons
2637 /*gDirectory->cd("../");
2638 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2639 dirAntiProtonsSecondaryRejected->cd();*/
2641 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2642 ";N_{clusters} (ITS);Entries",
2644 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2645 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2646 ";x^{2}/N_{clusters} (ITS);Entries",
2648 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2649 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2650 ";N_{clusters} (TPC);Entries",
2652 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2653 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2654 ";x^{2}/N_{clusters} (TPC);Entries",
2656 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2657 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2658 ";#sigma_{y} [cm];Entries",
2660 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2661 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2662 ";#sigma_{z} [cm];Entries",
2664 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2665 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2666 ";#sigma_{sin(#phi)};Entries",
2668 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2669 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2670 ";#sigma_{tan(#lambda)};Entries",
2672 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2673 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2674 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2676 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2677 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2678 ";#sigma_{Vertex};Entries",
2680 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2681 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2682 ";#sigma_{Vertex};Entries",
2684 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2685 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2686 ";DCA_{xy} [cm];Entries",
2688 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2689 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2690 ";DCA_{xy} [cm];Entries",
2692 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2693 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2694 ";DCA_{z} [cm];Entries",
2696 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2697 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2698 ";DCA_{z} [cm];Entries",
2700 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2701 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2702 ";Log_{10}(#chi^{2});Entries",
2704 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2705 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2707 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2708 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2710 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2711 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2713 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2714 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2716 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2717 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2719 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2720 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2722 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2723 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2725 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2726 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2728 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2729 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2731 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2732 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2734 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2737 //____________________________________________________________________//
2738 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2740 const AliESDVertex *vertex) {
2741 //Runs the efficiency code
2743 Int_t nMCProtons = 0, nESDProtons = 0;
2744 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2745 TParticle *particle = stack->Particle(iParticle);
2746 if(!particle) continue;
2748 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2749 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2750 if(fAnalysisEtaMode) {
2751 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2754 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2756 Int_t pdgcode = particle->GetPdgCode();
2757 if(TMath::Abs(pdgcode) != 2212) continue;
2759 if(iParticle <= stack->GetNprimary()) {
2760 if(pdgcode == 2212) {
2762 if(fAnalysisEtaMode)
2763 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2766 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2771 if(pdgcode == -2212) {
2772 if(fAnalysisEtaMode)
2773 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2776 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2784 Int_t lPartMother = -1;
2785 Int_t motherPDGCode = -1;
2786 lPartMother = particle->GetFirstMother();
2787 TParticle *motherParticle = stack->Particle(lPartMother);
2788 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2790 if(pdgcode == 2212) {
2791 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2792 if(fAnalysisEtaMode)
2793 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
2796 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
2801 if((particle->GetUniqueID() == 13)) {
2802 if(fAnalysisEtaMode)
2803 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
2806 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
2810 }//hadronic interactions
2812 if(pdgcode == -2212) {
2813 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2814 if(fAnalysisEtaMode)
2815 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
2818 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
2823 if((particle->GetUniqueID() == 13)) {
2824 if(fAnalysisEtaMode)
2825 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
2828 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
2832 }//hadronic interactions
2839 Int_t nGoodTracks = esd->GetNumberOfTracks();
2840 TArrayI labelArray(nGoodTracks);
2841 Int_t labelCounter = 0;
2842 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2843 AliESDtrack* track = esd->GetTrack(iTracks);
2844 if(!track) continue;
2846 Int_t label = TMath::Abs(track->GetLabel());
2847 if(IsLabelUsed(labelArray,label)) continue;
2848 labelArray.AddAt(label,labelCounter);
2851 TParticle *particle = stack->Particle(label);
2852 if(!particle) continue;
2853 Int_t pdgcode = particle->GetPdgCode();
2854 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2856 Double_t Pt = 0.0, P = 0.0;
2857 Double_t probability[5];
2861 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2862 if(!tpcTrack) continue;
2863 Pt = tpcTrack->Pt();
2866 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2867 if(fAnalysisEtaMode) {
2868 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2871 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2873 if(fUseCutsInEfficiency)
2874 if(!IsAccepted(esd,vertex,track)) continue;
2876 //reconstructed primary (anti)protons
2877 if(pdgcode == 2212) {
2878 if(fAnalysisEtaMode)
2879 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2882 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2886 if(label <= stack->GetNprimary()) {
2888 if(fAnalysisEtaMode)
2889 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
2892 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
2897 if(label > stack->GetNprimary()) {
2898 Int_t lPartMother = -1;
2899 Int_t motherPDGCode = -1;
2900 lPartMother = particle->GetFirstMother();
2901 TParticle *motherParticle = stack->Particle(lPartMother);
2902 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2904 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2905 if(fAnalysisEtaMode)
2906 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
2909 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
2914 if((particle->GetUniqueID() == 13)) {
2915 if(fAnalysisEtaMode)
2916 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
2919 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
2923 }//hadronic interactions
2926 if(pdgcode == -2212) {
2927 if(fAnalysisEtaMode)
2928 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2931 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2935 if(label <= stack->GetNprimary()) {
2936 if(fAnalysisEtaMode)
2937 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
2940 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
2945 if(label > stack->GetNprimary()) {
2946 Int_t lPartMother = -1;
2947 Int_t motherPDGCode = -1;
2948 lPartMother = particle->GetFirstMother();
2949 TParticle *motherParticle = stack->Particle(lPartMother);
2950 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2952 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2953 if(fAnalysisEtaMode)
2954 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
2957 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
2962 if((particle->GetUniqueID() == 13)) {
2963 if(fAnalysisEtaMode)
2964 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
2967 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
2971 }//hadronic interactions
2973 }//initial antiprotons
2976 track->GetTPCpid(probability);
2978 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2979 rcc += probability[i]*GetParticleFraction(i,P);
2980 if(rcc == 0.0) continue;
2982 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2983 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2984 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2985 if(fParticleType == 4) {
2986 if(fAnalysisEtaMode)
2987 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
2990 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
2994 if(TMath::Abs(pdgcode) == 2212) {
2995 if(fAnalysisEtaMode)
2996 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
2999 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3003 }//properly identified as proton
3005 if(fAnalysisEtaMode)
3006 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3009 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3014 }//identified as proton
3016 else if(!fUseTPCOnly) {
3017 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3018 if(fAnalysisEtaMode) {
3019 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3022 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3025 if(fUseCutsInEfficiency)
3026 if(!IsAccepted(esd,vertex,track)) continue;
3028 //reconstructed primary (anti)protons
3029 if(pdgcode == 2212) {
3030 if(fAnalysisEtaMode)
3031 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3034 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3038 if(label <= stack->GetNprimary()) {
3040 if(fAnalysisEtaMode)
3041 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3044 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3049 if(label > stack->GetNprimary()) {
3050 Int_t lPartMother = -1;
3051 Int_t motherPDGCode = -1;
3052 lPartMother = particle->GetFirstMother();
3053 TParticle *motherParticle = stack->Particle(lPartMother);
3054 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3056 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3057 if(fAnalysisEtaMode)
3058 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3061 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3066 if((particle->GetUniqueID() == 13)) {
3067 if(fAnalysisEtaMode)
3068 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3071 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3075 }//hadronic interactions
3078 if(pdgcode == -2212) {
3079 if(fAnalysisEtaMode)
3080 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3083 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3087 if(label <= stack->GetNprimary()) {
3088 if(fAnalysisEtaMode)
3089 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3092 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3097 if(label > stack->GetNprimary()) {
3098 Int_t lPartMother = -1;
3099 Int_t motherPDGCode = -1;
3100 lPartMother = particle->GetFirstMother();
3101 TParticle *motherParticle = stack->Particle(lPartMother);
3102 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3104 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3105 if(fAnalysisEtaMode)
3106 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3109 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3114 if((particle->GetUniqueID() == 13)) {
3115 if(fAnalysisEtaMode)
3116 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3119 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3123 }//hadronic interactions
3125 }//initial antiprotons
3128 track->GetESDpid(probability);
3130 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3131 rcc += probability[i]*GetParticleFraction(i,P);
3132 if(rcc == 0.0) continue;
3134 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3135 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3136 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3137 if(fParticleType == 4) {
3138 if(fAnalysisEtaMode)
3139 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3141 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3145 if(TMath::Abs(pdgcode) == 2212) {
3146 if(fAnalysisEtaMode)
3147 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3150 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3154 }//properly identified as proton
3156 if(fAnalysisEtaMode)
3157 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3160 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3165 }//identified as proton
3169 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3172 //____________________________________________________________________//
3173 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3175 //Checks if the label is used already
3176 Bool_t status = kFALSE;
3177 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3178 if(labelArray.At(i) == label)
3185 //____________________________________________________________________//
3186 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3188 const AliESDVertex *vertex) {
3191 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3192 TParticle *particle = stack->Particle(iParticle);
3193 if(!particle) continue;
3195 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3196 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3197 if(fAnalysisEtaMode) {
3198 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3201 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3203 Int_t pdgcode = particle->GetPdgCode();
3204 if(pdgcode == 2212) {
3205 if(fAnalysisEtaMode)
3206 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
3209 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3214 if(pdgcode == -2212) {
3215 if(fAnalysisEtaMode)
3216 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
3219 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3227 Int_t nGoodTracks = esd->GetNumberOfTracks();
3228 TArrayI labelArray(nGoodTracks);
3229 Int_t labelCounter = 0;
3230 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3231 AliESDtrack* track = esd->GetTrack(iTracks);
3232 if(!track) continue;
3234 Int_t label = TMath::Abs(track->GetLabel());
3235 if(IsLabelUsed(labelArray,label)) continue;
3236 labelArray.AddAt(label,labelCounter);
3239 TParticle *particle = stack->Particle(label);
3240 if(!particle) continue;
3241 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3243 AliESDtrack trackTPC;
3245 //in case it's a TPC only track relate it to the proper vertex
3246 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3247 Float_t p[2],cov[3];
3248 track->GetImpactParametersTPC(p,cov);
3249 if (p[0]==0 && p[1]==0)
3250 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3251 if (!track->FillTPCOnlyTrack(trackTPC)) {
3257 Double_t Pt = 0.0, P = 0.0;
3258 Double_t probability[5];
3259 Float_t dcaXY = 0.0, dcaZ = 0.0;
3260 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3262 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3263 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3265 Float_t chi2PerClusterITS = -1;
3266 if (nClustersITS!=0)
3267 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3268 Float_t chi2PerClusterTPC = -1;
3269 if (nClustersTPC!=0)
3270 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3271 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3272 Double_t extCov[15];
3273 track->GetExternalCovariance(extCov);
3277 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3278 if(!tpcTrack) continue;
3279 Pt = tpcTrack->Pt();
3281 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3282 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3285 track->GetTPCpid(probability);
3287 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3288 rcc += probability[i]*GetParticleFraction(i,P);
3289 if(rcc == 0.0) continue;
3291 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3292 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3293 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3294 if(fParticleType == 4) {
3295 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3297 FillQA(stack,esd,vertex,track);
3298 if(IsAccepted(esd,vertex,track)) {
3299 if(label <= stack->GetNprimary()) {
3300 if(track->Charge() > 0) {
3301 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3302 if(track->HasPointOnITSLayer(iLayer))
3303 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3305 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3306 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3307 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3308 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3309 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3310 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3311 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3312 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3313 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3314 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3316 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3317 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3318 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3319 if(fAnalysisEtaMode)
3320 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),Pt);
3322 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3326 }//accepted primary protons
3327 else if(track->Charge() < 0) {
3328 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3329 if(track->HasPointOnITSLayer(iLayer))
3330 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3332 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3333 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3334 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3335 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3336 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3337 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3338 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3339 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3340 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3341 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3343 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3344 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3345 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3346 if(fAnalysisEtaMode)
3347 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),Pt);
3349 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3353 }//accepted primary antiprotons
3354 }//accepted primary particles
3355 else if(label > stack->GetNprimary()) {
3356 Int_t lPartMother = -1;
3357 Int_t motherPDGCode = -1;
3359 lPartMother = particle->GetFirstMother();
3360 TParticle *motherParticle = stack->Particle(lPartMother);
3361 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3364 if(fMCProcessIdFlag)
3365 if(particle->GetUniqueID() != fMCProcessId) continue;
3366 if(fMotherParticlePDGCodeFlag)
3367 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3369 if(track->Charge() > 0) {
3370 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3371 if(track->HasPointOnITSLayer(iLayer))
3372 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3374 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3375 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3376 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3377 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3378 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3379 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3380 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3381 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3382 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3383 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3385 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3386 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3387 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3388 if(fAnalysisEtaMode)
3389 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),Pt);
3391 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3395 if(fAnalysisEtaMode)
3396 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),Pt,
3397 ConvertPDGToInt(motherPDGCode));
3399 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3403 ConvertPDGToInt(motherPDGCode));
3404 }//accepted secondary protons
3405 else if(track->Charge() < 0) {
3406 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3407 if(track->HasPointOnITSLayer(iLayer))
3408 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3410 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3411 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3412 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3413 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3414 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3415 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3416 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3417 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3418 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3419 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3421 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3422 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3423 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3424 if(fAnalysisEtaMode)
3425 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),Pt);
3427 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3431 if(fAnalysisEtaMode)
3432 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),Pt,
3433 ConvertPDGToInt(motherPDGCode));
3435 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3439 ConvertPDGToInt(motherPDGCode));
3440 }//accepted secondary antiprotons
3441 }//accepted secondary particles
3442 }//accepted - track cuts
3443 else {// if(!IsAccepted(esd,vertex,track)) {
3444 if(label <= stack->GetNprimary()) {
3445 if(track->Charge() > 0) {
3446 if(fAnalysisEtaMode)
3447 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),Pt);
3449 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3454 else if(track->Charge() < 0) {
3455 if(fAnalysisEtaMode)
3456 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),Pt);
3458 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3463 }//rejected primary particles
3464 else if(label > stack->GetNprimary()) {
3465 if(track->Charge() > 0) {
3466 if(fAnalysisEtaMode)
3467 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),Pt);
3469 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3474 else if(track->Charge() < 0) {
3475 if(fAnalysisEtaMode)
3476 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),Pt);
3478 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3483 }//rejected secondary particles
3484 }//rejected - track cuts
3488 else if(!fUseTPCOnly) {
3491 track->GetImpactParameters(dcaXY,dcaZ);
3494 track->GetESDpid(probability);
3496 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3497 rcc += probability[i]*GetParticleFraction(i,P);
3498 if(rcc == 0.0) continue;
3500 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3501 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3502 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3503 if(fParticleType == 4) {
3504 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3506 FillQA(stack,esd,vertex,track);
3507 if(IsAccepted(esd,vertex,track)) {
3508 if(label <= stack->GetNprimary()) {
3509 if(track->Charge() > 0) {
3510 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3511 if(track->HasPointOnITSLayer(iLayer))
3512 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3514 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3515 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3516 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3517 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3518 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3519 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3520 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3521 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3522 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3523 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3525 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3526 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3527 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3528 if(fAnalysisEtaMode)
3529 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),Pt);
3531 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3536 else if(track->Charge() < 0) {
3537 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3538 if(track->HasPointOnITSLayer(iLayer))
3539 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3541 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3542 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3543 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3544 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3545 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3546 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3547 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3548 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3549 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3550 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3552 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3553 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3554 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3555 if(fAnalysisEtaMode)
3556 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),Pt);
3558 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3563 }//primary particles
3564 else if(label > stack->GetNprimary()) {
3565 Int_t lPartMother = -1;
3566 Int_t motherPDGCode = -1;
3568 lPartMother = particle->GetFirstMother();
3569 TParticle *motherParticle = stack->Particle(lPartMother);
3570 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3573 if(fMCProcessIdFlag)
3574 if(particle->GetUniqueID() != fMCProcessId) continue;
3575 if(fMotherParticlePDGCodeFlag)
3576 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3578 if(track->Charge() > 0) {
3579 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3580 if(track->HasPointOnITSLayer(iLayer))
3581 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3583 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3584 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3585 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3586 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3587 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3588 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3589 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3590 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3591 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3592 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3594 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3595 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3596 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3597 if(fAnalysisEtaMode)
3598 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),Pt);
3600 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3604 if(fAnalysisEtaMode)
3605 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),Pt,
3606 ConvertPDGToInt(motherPDGCode));
3608 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3612 ConvertPDGToInt(motherPDGCode));
3614 else if(track->Charge() < 0) {
3615 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3616 if(track->HasPointOnITSLayer(iLayer))
3617 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3619 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3620 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3621 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3622 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3623 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3624 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3625 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3626 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3627 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3628 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3630 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3631 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3632 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3633 if(fAnalysisEtaMode)
3634 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),Pt);
3636 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3641 if(fAnalysisEtaMode)
3642 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),Pt,
3643 ConvertPDGToInt(motherPDGCode));
3645 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3649 ConvertPDGToInt(motherPDGCode));
3651 }//secondary particles
3652 }//accepted - track cuts
3653 else if(!IsAccepted(esd,vertex,track)) {
3654 if(label <= stack->GetNprimary()) {
3655 if(track->Charge() > 0) {
3656 if(fAnalysisEtaMode)
3657 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),Pt);
3659 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3664 else if(track->Charge() < 0) {
3665 if(fAnalysisEtaMode)
3666 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),Pt);
3668 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
3673 }//primary particles
3674 else if(label > stack->GetNprimary()) {
3675 if(track->Charge() > 0) {
3676 if(fAnalysisEtaMode)
3677 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),Pt);
3679 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
3684 else if(track->Charge() < 0) {
3685 if(fAnalysisEtaMode)
3686 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),Pt);
3688 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
3693 }//secondary particles
3694 }//rejected - track cuts
3696 }//combined tracking
3701 //____________________________________________________________________//
3702 void AliProtonQAAnalysis::InitMCAnalysis() {
3703 //MC analysis - 3D histograms: y-pT-pdg
3704 fPDGList = new TList();
3705 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
3706 ";;P_{T} [GeV/c];PDG",
3707 fNBinsY,fMinY,fMaxY,
3708 fNBinsPt,fMinPt,fMaxPt,
3710 if(fAnalysisEtaMode)
3711 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
3713 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
3714 fPDGList->Add(gHistYPtPDGProtons);
3715 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
3716 ";;P_{T} [GeV/c];PDG",
3717 fNBinsY,fMinY,fMaxY,
3718 fNBinsPt,fMinPt,fMaxPt,
3720 if(fAnalysisEtaMode)
3721 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
3723 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
3724 fPDGList->Add(gHistYPtPDGAntiProtons);
3727 fMCProcessesList = new TList();
3728 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
3729 fMCProcessesList->Add(gHistProtonsFromKLProcess);
3730 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
3731 fMCProcessesList->Add(gHistProtonsFromPionProcess);
3732 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
3733 fMCProcessesList->Add(gHistProtonsFromKSProcess);
3734 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
3735 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
3736 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
3737 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
3738 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
3739 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
3740 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
3741 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
3742 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
3743 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
3744 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3745 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
3746 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
3747 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
3748 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
3749 fMCProcessesList->Add(gHistProtonsFromXi0Process);
3750 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
3751 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
3753 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
3754 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
3755 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
3756 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
3757 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
3758 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
3759 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
3760 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
3761 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
3762 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
3763 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
3764 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
3765 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
3766 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
3767 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3768 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
3771 //____________________________________________________________________//
3772 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
3773 //Main analysis part - MC
3774 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3775 TParticle *particle = stack->Particle(iParticle);
3776 if(!particle) continue;
3778 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3779 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3780 if(fAnalysisEtaMode) {
3781 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3784 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3787 Int_t pdgcode = particle->GetPdgCode();
3788 if(pdgcode == 2212) {
3789 if(iParticle <= stack->GetNprimary()) {
3790 if(fAnalysisEtaMode)
3791 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
3793 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3798 else if(iParticle > stack->GetNprimary()) {
3799 Int_t lPartMother = particle->GetFirstMother();
3800 TParticle *motherParticle = stack->Particle(lPartMother);
3801 if(!motherParticle) continue;
3802 Int_t motherPDGCode = motherParticle->GetPdgCode();
3803 if(fMCProcessIdFlag)
3804 if(particle->GetUniqueID() != fMCProcessId) continue;
3805 if(fMotherParticlePDGCodeFlag)
3806 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3808 if(fAnalysisEtaMode)
3809 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
3811 ConvertPDGToInt(motherParticle->GetPdgCode()));
3813 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3817 ConvertPDGToInt(motherParticle->GetPdgCode()));
3819 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3820 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
3821 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3822 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
3823 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3824 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
3825 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3826 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
3827 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3828 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
3829 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3830 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
3831 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
3832 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
3833 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3834 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
3835 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3836 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
3837 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
3838 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
3839 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
3840 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
3841 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
3842 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
3844 }//pdgcode of proton
3846 if(pdgcode == -2212) {
3847 if(iParticle <= stack->GetNprimary()) {
3848 if(fAnalysisEtaMode)
3849 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
3851 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3856 else if(iParticle > stack->GetNprimary()) {
3857 Int_t lPartMother = particle->GetFirstMother();
3858 TParticle *motherParticle = stack->Particle(lPartMother);
3859 if(!motherParticle) continue;
3860 Int_t motherPDGCode = motherParticle->GetPdgCode();
3861 if(fMCProcessIdFlag)
3862 if(particle->GetUniqueID() != fMCProcessId) continue;
3863 if(fMotherParticlePDGCodeFlag)
3864 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3866 if(fAnalysisEtaMode)
3867 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
3869 ConvertPDGToInt(motherParticle->GetPdgCode()));
3871 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3875 ConvertPDGToInt(motherParticle->GetPdgCode()));
3878 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3879 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
3880 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3881 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
3882 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3883 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
3884 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3885 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
3886 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3887 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
3888 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3889 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
3890 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3891 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
3892 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3893 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
3894 }//secondary antiproton
3895 }//pdgcode of antiproton
3900 //____________________________________________________________________//
3901 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
3902 //Converts the pdg code to an int based on the following scheme:
3903 //1: PDG code: 130 - Name: K_L0
3904 //2: PDG code: 211 - Name: pi+
3905 //3: PDG code: 310 - Name: K_S0
3906 //4: PDG code: 321 - Name: K+
3907 //5: PDG code: 2112 - Name: neutron
3908 //6: PDG code: 2212 - Name: proton
3909 //7: PDG code: 3112 - Name: Sigma-
3910 //8: PDG code: 3122 - Name: Lambda0
3911 //9: PDG code: 3222 - Name: Sigma+
3912 //10: PDG code: 3312 - Name: Xi-
3913 //11: PDG code: 3322 - Name: Xi0
3914 //12: PDG code: 3334 - Name: Omega-
3916 switch (TMath::Abs(pdgCode)) {
3974 //________________________________________________________________________
3975 /*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
3979 // Get the vertex from the ESD and returns it if the vertex is valid
3980 // depending on the analysis mode: TPC - Hybrid - Global
3981 const AliESDVertex* vertex = 0;
3982 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3983 Double_t kBz = esd->GetMagneticField();
3984 AliVertexerTracks vertexer(kBz);
3985 vertexer.SetTPCMode();
3986 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
3987 esd->SetPrimaryVertexTPC(vTPC);
3988 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
3989 AliESDtrack *t = esd->GetTrack(i);
3990 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
3993 vertex = esd->GetPrimaryVertexTPC();
3995 else if(fUseHybridTPC)
3996 vertex = esd->GetPrimaryVertexSPD();
3997 else if(!fUseTPCOnly)
3998 vertex = esd->GetPrimaryVertex();
4000 Printf("GetVertex: ERROR: Invalid analysis mode");
4002 if(!vertex) return 0;
4004 // check Ncontributors
4005 if(vertex->GetNContributors() <= 0) return 0;
4008 Double_t zRes = vertex->GetZRes();
4009 if(zRes == 0) return 0;
4012 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
4013 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
4014 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;