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
1913 TH2D *gHistEtaPhiPrimaryProtonsPass = new TH2D("gHistEtaPhiPrimaryProtonsPass",
1914 ";#eta;#phi [deg.]",
1915 fNBinsY,fMinY,fMaxY,
1917 gHistEtaPhiPrimaryProtonsPass->SetStats(kTRUE);
1918 gHistEtaPhiPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1919 fQA2DList->Add(gHistEtaPhiPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1920 TH2D *gHistEtaPhiPrimaryProtonsReject = new TH2D("gHistEtaPhiPrimaryProtonsReject",
1921 ";#eta;#phi [deg.]",
1922 fNBinsY,fMinY,fMaxY,
1924 gHistEtaPhiPrimaryProtonsReject->SetStats(kTRUE);
1925 gHistEtaPhiPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1926 fQA2DList->Add(gHistEtaPhiPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1927 TH2D *gHistEtaPhiSecondaryProtonsPass = new TH2D("gHistEtaPhiSecondaryProtonsPass",
1928 ";#eta;#phi [deg.]",
1929 fNBinsY,fMinY,fMaxY,
1931 gHistEtaPhiSecondaryProtonsPass->SetStats(kTRUE);
1932 gHistEtaPhiSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1933 fQA2DList->Add(gHistEtaPhiSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1934 TH2D *gHistEtaPhiSecondaryProtonsReject = new TH2D("gHistEtaPhiSecondaryProtonsReject",
1935 ";#eta;#phi [deg.]",
1936 fNBinsY,fMinY,fMaxY,
1938 gHistEtaPhiSecondaryProtonsReject->SetStats(kTRUE);
1939 gHistEtaPhiSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1940 fQA2DList->Add(gHistEtaPhiSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1942 TH2D *gHistEtaPhiPrimaryAntiProtonsPass = new TH2D("gHistEtaPhiPrimaryAntiProtonsPass",
1943 ";#eta;#phi [deg.]",
1944 fNBinsY,fMinY,fMaxY,
1946 gHistEtaPhiPrimaryAntiProtonsPass->SetStats(kTRUE);
1947 gHistEtaPhiPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1948 fQA2DList->Add(gHistEtaPhiPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1949 TH2D *gHistEtaPhiPrimaryAntiProtonsReject = new TH2D("gHistEtaPhiPrimaryAntiProtonsReject",
1950 ";#eta;#phi [deg.]",
1951 fNBinsY,fMinY,fMaxY,
1953 gHistEtaPhiPrimaryAntiProtonsReject->SetStats(kTRUE);
1954 gHistEtaPhiPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1955 fQA2DList->Add(gHistEtaPhiPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1956 TH2D *gHistEtaPhiSecondaryAntiProtonsPass = new TH2D("gHistEtaPhiSecondaryAntiProtonsPass",
1957 ";#eta;#phi [deg.]",
1958 fNBinsY,fMinY,fMaxY,
1960 gHistEtaPhiSecondaryAntiProtonsPass->SetStats(kTRUE);
1961 gHistEtaPhiSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1962 fQA2DList->Add(gHistEtaPhiSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1963 TH2D *gHistEtaPhiSecondaryAntiProtonsReject = new TH2D("gHistEtaPhiSecondaryAntiProtonsReject",
1964 ";#eta;#phi [deg.]",
1965 fNBinsY,fMinY,fMaxY,
1967 gHistEtaPhiSecondaryAntiProtonsReject->SetStats(kTRUE);
1968 gHistEtaPhiSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1969 fQA2DList->Add(gHistEtaPhiSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1971 /*gDirectory->cd("../");
1973 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1974 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1976 //________________________________________________________________//
1977 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1978 dirProtonsPrimary->cd();
1979 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1980 dirProtonsPrimaryAccepted->cd();*/
1982 //Accepted primary protons
1983 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1984 ";N_{clusters} (ITS);Entries",
1986 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1987 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1988 ";x^{2}/N_{clusters} (ITS);Entries",
1990 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1991 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1992 ";N_{clusters} (TPC);Entries",
1994 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1995 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1996 ";x^{2}/N_{clusters} (TPC);Entries",
1998 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1999 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
2000 ";#sigma_{y} [cm];Entries",
2002 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
2003 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
2004 ";#sigma_{z} [cm];Entries",
2006 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
2007 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
2008 ";#sigma_{sin(#phi)};Entries",
2010 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
2011 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
2012 ";#sigma_{tan(#lambda)};Entries",
2014 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
2015 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
2016 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2018 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
2019 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
2020 ";#sigma_{Vertex};Entries",
2022 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
2023 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
2024 ";#sigma_{Vertex};Entries",
2026 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
2027 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
2028 ";DCA_{xy} [cm];Entries",
2030 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
2031 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
2032 ";DCA_{xy} [cm];Entries",
2034 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
2035 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
2036 ";DCA_{z} [cm];Entries",
2038 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
2039 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
2040 ";DCA_{z} [cm];Entries",
2042 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
2043 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
2044 ";Log_{10}(#chi^{2});Entries",
2046 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
2047 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
2049 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
2050 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
2052 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
2053 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
2055 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
2056 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
2058 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2059 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
2061 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2062 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
2064 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2065 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
2067 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2068 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
2070 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2071 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
2073 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2074 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
2076 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
2078 //Rejected primary protons
2079 /*gDirectory->cd("../");
2080 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2081 dirProtonsPrimaryRejected->cd();*/
2083 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
2084 ";N_{clusters} (ITS);Entries",
2086 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2087 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
2088 ";x^{2}/N_{clusters} (ITS);Entries",
2090 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2091 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
2092 ";N_{clusters} (TPC);Entries",
2094 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2095 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
2096 ";x^{2}/N_{clusters} (TPC);Entries",
2098 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2099 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
2100 ";#sigma_{y} [cm];Entries",
2102 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2103 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
2104 ";#sigma_{z} [cm];Entries",
2106 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2107 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
2108 ";#sigma_{sin(#phi)};Entries",
2110 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2111 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
2112 ";#sigma_{tan(#lambda)};Entries",
2114 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2115 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2116 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2118 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2119 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2120 ";#sigma_{Vertex};Entries",
2122 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2123 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2124 ";#sigma_{Vertex};Entries",
2126 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2127 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2128 ";DCA_{xy} [cm];Entries",
2130 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2131 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2132 ";DCA_{xy} [cm];Entries",
2134 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2135 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2136 ";DCA_{z} [cm];Entries",
2138 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2139 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2140 ";DCA_{z} [cm];Entries",
2142 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2143 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2144 ";Log_{10}(#chi^{2});Entries",
2146 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2147 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2149 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2150 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2152 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2153 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2155 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2156 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2158 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2159 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2161 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2162 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2164 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2165 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2167 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2168 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2170 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2171 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2173 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2174 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2176 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2178 //________________________________________________________________//
2179 /*gDirectory->cd("../../");
2181 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2182 dirProtonsSecondary->cd();
2183 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2184 dirProtonsSecondaryAccepted->cd();*/
2186 //Accepted secondary protons
2187 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2188 ";N_{clusters} (ITS);Entries",
2190 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2191 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2192 ";x^{2}/N_{clusters} (ITS);Entries",
2194 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2195 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2196 ";N_{clusters} (TPC);Entries",
2198 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2199 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2200 ";x^{2}/N_{clusters} (TPC);Entries",
2202 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2203 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2204 ";#sigma_{y} [cm];Entries",
2206 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2207 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2208 ";#sigma_{z} [cm];Entries",
2210 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2211 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2212 ";#sigma_{sin(#phi)};Entries",
2214 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2215 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2216 ";#sigma_{tan(#lambda)};Entries",
2218 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2219 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2220 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2222 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2223 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2224 ";#sigma_{Vertex};Entries",
2226 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2227 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2228 ";#sigma_{Vertex};Entries",
2230 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2231 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2232 ";DCA_{xy} [cm];Entries",
2234 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2235 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2236 ";DCA_{xy} [cm];Entries",
2238 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2239 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2240 ";DCA_{z} [cm];Entries",
2242 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2243 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2244 ";DCA_{z} [cm];Entries",
2246 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2247 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2248 ";Log_{10}(#chi^{2});Entries",
2250 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2251 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2253 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2254 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2256 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2257 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2259 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2260 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2262 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2263 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2265 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2266 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2268 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2269 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2271 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2272 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2274 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2275 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2277 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2278 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2280 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2282 //Rejected secondary protons
2283 /*gDirectory->cd("../");
2284 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2285 dirProtonsSecondaryRejected->cd();*/
2287 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2288 ";N_{clusters} (ITS);Entries",
2290 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2291 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2292 ";x^{2}/N_{clusters} (ITS);Entries",
2294 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2295 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2296 ";N_{clusters} (TPC);Entries",
2298 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2299 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2300 ";x^{2}/N_{clusters} (TPC);Entries",
2302 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2303 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2304 ";#sigma_{y} [cm];Entries",
2306 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2307 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2308 ";#sigma_{z} [cm];Entries",
2310 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2311 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2312 ";#sigma_{sin(#phi)};Entries",
2314 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2315 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2316 ";#sigma_{tan(#lambda)};Entries",
2318 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2319 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2320 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2322 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2323 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2324 ";#sigma_{Vertex};Entries",
2326 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2327 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2328 ";#sigma_{Vertex};Entries",
2330 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2331 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2332 ";DCA_{xy} [cm];Entries",
2334 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2335 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2336 ";DCA_{xy} [cm];Entries",
2338 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2339 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2340 ";DCA_{z} [cm];Entries",
2342 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2343 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2344 ";DCA_{z} [cm];Entries",
2346 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2347 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2348 ";Log_{10}(#chi^{2});Entries",
2350 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2351 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2353 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2354 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2356 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2357 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2359 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2360 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2362 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2363 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2365 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2366 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2368 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2369 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2371 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2372 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2374 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2375 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2377 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2378 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2380 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2383 /*gDirectory->cd("../../../");
2386 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2387 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2389 //________________________________________________________________//
2390 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2391 dirAntiProtonsPrimary->cd();
2392 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2393 dirAntiProtonsPrimaryAccepted->cd();*/
2395 //Accepted primary antiprotons
2396 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2397 ";N_{clusters} (ITS);Entries",
2399 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2400 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2401 ";x^{2}/N_{clusters} (ITS);Entries",
2403 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2404 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2405 ";N_{clusters} (TPC);Entries",
2407 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2408 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2409 ";x^{2}/N_{clusters} (TPC);Entries",
2411 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2412 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2413 ";#sigma_{y} [cm];Entries",
2415 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2416 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2417 ";#sigma_{z} [cm];Entries",
2419 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2420 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2421 ";#sigma_{sin(#phi)};Entries",
2423 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2424 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2425 ";#sigma_{tan(#lambda)};Entries",
2427 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2428 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2429 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2431 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2432 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2433 ";#sigma_{Vertex};Entries",
2435 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2436 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2437 ";#sigma_{Vertex};Entries",
2439 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2440 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2441 ";DCA_{xy} [cm];Entries",
2443 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2444 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2445 ";DCA_{xy} [cm];Entries",
2447 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2448 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2449 ";DCA_{z} [cm];Entries",
2451 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2452 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2453 ";DCA_{z} [cm];Entries",
2455 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2456 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2457 ";Log_{10}(#chi^{2});Entries",
2459 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2460 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2462 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2463 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2465 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2466 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2468 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2469 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2471 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2472 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2474 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2475 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2477 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2478 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2480 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2481 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2483 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2484 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2486 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2487 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2489 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2491 //Rejected primary antiprotons
2492 /*gDirectory->cd("../");
2493 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2494 dirAntiProtonsPrimaryRejected->cd();*/
2496 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2497 ";N_{clusters} (ITS);Entries",
2499 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2500 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2501 ";x^{2}/N_{clusters} (ITS);Entries",
2503 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2504 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2505 ";N_{clusters} (TPC);Entries",
2507 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2508 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2509 ";x^{2}/N_{clusters} (TPC);Entries",
2511 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2512 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2513 ";#sigma_{y} [cm];Entries",
2515 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2516 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2517 ";#sigma_{z} [cm];Entries",
2519 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2520 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2521 ";#sigma_{sin(#phi)};Entries",
2523 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2524 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2525 ";#sigma_{tan(#lambda)};Entries",
2527 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2528 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2529 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2531 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2532 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2533 ";#sigma_{Vertex};Entries",
2535 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2536 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2537 ";#sigma_{Vertex};Entries",
2539 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2540 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2541 ";DCA_{xy} [cm];Entries",
2543 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2544 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2545 ";DCA_{xy} [cm];Entries",
2547 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2548 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2549 ";DCA_{z} [cm];Entries",
2551 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2552 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2553 ";DCA_{z} [cm];Entries",
2555 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2556 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2557 ";Log_{10}(#chi^{2});Entries",
2559 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2560 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2562 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2563 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2565 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2566 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2568 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2569 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2571 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2572 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2574 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2575 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2577 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2578 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2580 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2581 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2583 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2584 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2586 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2587 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2589 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2591 //________________________________________________________________//
2592 /*gDirectory->cd("../../");
2594 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2595 dirAntiProtonsSecondary->cd();
2596 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2597 dirAntiProtonsSecondaryAccepted->cd();*/
2599 //Accepted secondary antiprotons
2600 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2601 ";N_{clusters} (ITS);Entries",
2603 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2604 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2605 ";x^{2}/N_{clusters} (ITS);Entries",
2607 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2608 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2609 ";N_{clusters} (TPC);Entries",
2611 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2612 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2613 ";x^{2}/N_{clusters} (TPC);Entries",
2615 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2616 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2617 ";#sigma_{y} [cm];Entries",
2619 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2620 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2621 ";#sigma_{z} [cm];Entries",
2623 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2624 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2625 ";#sigma_{sin(#phi)};Entries",
2627 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2628 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2629 ";#sigma_{tan(#lambda)};Entries",
2631 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2632 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2633 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2635 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2636 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2637 ";#sigma_{Vertex};Entries",
2639 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2640 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2641 ";#sigma_{Vertex};Entries",
2643 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2644 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2645 ";DCA_{xy} [cm];Entries",
2647 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2648 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2649 ";DCA_{xy} [cm];Entries",
2651 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2652 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2653 ";DCA_{z} [cm];Entries",
2655 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2656 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2657 ";DCA_{z} [cm];Entries",
2659 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2660 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2661 ";Log_{10}(#chi^{2});Entries",
2663 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2664 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2666 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2667 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2669 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2670 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2672 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2673 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2675 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2676 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2678 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2679 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2681 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2682 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2684 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2685 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2687 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2688 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2690 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2691 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2693 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2695 //Rejected secondary antiprotons
2696 /*gDirectory->cd("../");
2697 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2698 dirAntiProtonsSecondaryRejected->cd();*/
2700 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2701 ";N_{clusters} (ITS);Entries",
2703 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2704 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2705 ";x^{2}/N_{clusters} (ITS);Entries",
2707 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2708 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2709 ";N_{clusters} (TPC);Entries",
2711 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2712 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2713 ";x^{2}/N_{clusters} (TPC);Entries",
2715 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2716 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2717 ";#sigma_{y} [cm];Entries",
2719 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2720 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2721 ";#sigma_{z} [cm];Entries",
2723 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2724 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2725 ";#sigma_{sin(#phi)};Entries",
2727 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2728 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2729 ";#sigma_{tan(#lambda)};Entries",
2731 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2732 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2733 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2735 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2736 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2737 ";#sigma_{Vertex};Entries",
2739 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2740 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2741 ";#sigma_{Vertex};Entries",
2743 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2744 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2745 ";DCA_{xy} [cm];Entries",
2747 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2748 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2749 ";DCA_{xy} [cm];Entries",
2751 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2752 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2753 ";DCA_{z} [cm];Entries",
2755 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2756 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2757 ";DCA_{z} [cm];Entries",
2759 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2760 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2761 ";Log_{10}(#chi^{2});Entries",
2763 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2764 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2766 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2767 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2769 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2770 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2772 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2773 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2775 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2776 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2778 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2779 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2781 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2782 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2784 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2785 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2787 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2788 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2790 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2791 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2793 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2796 //____________________________________________________________________//
2797 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2799 const AliESDVertex *vertex) {
2800 //Runs the efficiency code
2802 Int_t nMCProtons = 0, nESDProtons = 0;
2803 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2804 TParticle *particle = stack->Particle(iParticle);
2805 if(!particle) continue;
2807 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2808 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2809 if(fAnalysisEtaMode) {
2810 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2813 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2815 Int_t pdgcode = particle->GetPdgCode();
2816 if(TMath::Abs(pdgcode) != 2212) continue;
2818 if(iParticle <= stack->GetNprimary()) {
2819 if(pdgcode == 2212) {
2821 if(fAnalysisEtaMode)
2822 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2825 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2830 if(pdgcode == -2212) {
2831 if(fAnalysisEtaMode)
2832 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2835 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2843 Int_t lPartMother = -1;
2844 Int_t motherPDGCode = -1;
2845 lPartMother = particle->GetFirstMother();
2846 TParticle *motherParticle = stack->Particle(lPartMother);
2847 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2849 if(pdgcode == 2212) {
2850 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2851 if(fAnalysisEtaMode)
2852 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
2855 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
2860 if((particle->GetUniqueID() == 13)) {
2861 if(fAnalysisEtaMode)
2862 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
2865 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
2869 }//hadronic interactions
2871 if(pdgcode == -2212) {
2872 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2873 if(fAnalysisEtaMode)
2874 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
2877 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
2882 if((particle->GetUniqueID() == 13)) {
2883 if(fAnalysisEtaMode)
2884 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
2887 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
2891 }//hadronic interactions
2898 Int_t nGoodTracks = esd->GetNumberOfTracks();
2899 TArrayI labelArray(nGoodTracks);
2900 Int_t labelCounter = 0;
2901 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2902 AliESDtrack* track = esd->GetTrack(iTracks);
2903 if(!track) continue;
2905 Int_t label = TMath::Abs(track->GetLabel());
2906 if(IsLabelUsed(labelArray,label)) continue;
2907 labelArray.AddAt(label,labelCounter);
2910 TParticle *particle = stack->Particle(label);
2911 if(!particle) continue;
2912 Int_t pdgcode = particle->GetPdgCode();
2913 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2915 Double_t Pt = 0.0, P = 0.0;
2916 Double_t probability[5];
2920 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2921 if(!tpcTrack) continue;
2922 Pt = tpcTrack->Pt();
2925 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2926 if(fAnalysisEtaMode) {
2927 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2930 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2932 if(fUseCutsInEfficiency)
2933 if(!IsAccepted(esd,vertex,track)) continue;
2935 //reconstructed primary (anti)protons
2936 if(pdgcode == 2212) {
2937 if(fAnalysisEtaMode)
2938 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2941 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2945 if(label <= stack->GetNprimary()) {
2947 if(fAnalysisEtaMode)
2948 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
2951 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
2956 if(label > stack->GetNprimary()) {
2957 Int_t lPartMother = -1;
2958 Int_t motherPDGCode = -1;
2959 lPartMother = particle->GetFirstMother();
2960 TParticle *motherParticle = stack->Particle(lPartMother);
2961 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2963 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2964 if(fAnalysisEtaMode)
2965 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
2968 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
2973 if((particle->GetUniqueID() == 13)) {
2974 if(fAnalysisEtaMode)
2975 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
2978 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
2982 }//hadronic interactions
2985 if(pdgcode == -2212) {
2986 if(fAnalysisEtaMode)
2987 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2990 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2994 if(label <= stack->GetNprimary()) {
2995 if(fAnalysisEtaMode)
2996 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
2999 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3004 if(label > stack->GetNprimary()) {
3005 Int_t lPartMother = -1;
3006 Int_t motherPDGCode = -1;
3007 lPartMother = particle->GetFirstMother();
3008 TParticle *motherParticle = stack->Particle(lPartMother);
3009 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3011 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3012 if(fAnalysisEtaMode)
3013 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3016 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3021 if((particle->GetUniqueID() == 13)) {
3022 if(fAnalysisEtaMode)
3023 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3026 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3030 }//hadronic interactions
3032 }//initial antiprotons
3035 track->GetTPCpid(probability);
3037 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3038 rcc += probability[i]*GetParticleFraction(i,P);
3039 if(rcc == 0.0) continue;
3041 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3042 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3043 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3044 if(fParticleType == 4) {
3045 if(fAnalysisEtaMode)
3046 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3049 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3053 if(TMath::Abs(pdgcode) == 2212) {
3054 if(fAnalysisEtaMode)
3055 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3058 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3062 }//properly identified as proton
3064 if(fAnalysisEtaMode)
3065 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3068 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3073 }//identified as proton
3075 else if(!fUseTPCOnly) {
3076 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3077 if(fAnalysisEtaMode) {
3078 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3081 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3084 if(fUseCutsInEfficiency)
3085 if(!IsAccepted(esd,vertex,track)) continue;
3087 //reconstructed primary (anti)protons
3088 if(pdgcode == 2212) {
3089 if(fAnalysisEtaMode)
3090 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3093 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3097 if(label <= stack->GetNprimary()) {
3099 if(fAnalysisEtaMode)
3100 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3103 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3108 if(label > stack->GetNprimary()) {
3109 Int_t lPartMother = -1;
3110 Int_t motherPDGCode = -1;
3111 lPartMother = particle->GetFirstMother();
3112 TParticle *motherParticle = stack->Particle(lPartMother);
3113 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3115 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3116 if(fAnalysisEtaMode)
3117 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3120 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3125 if((particle->GetUniqueID() == 13)) {
3126 if(fAnalysisEtaMode)
3127 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3130 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3134 }//hadronic interactions
3137 if(pdgcode == -2212) {
3138 if(fAnalysisEtaMode)
3139 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3142 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3146 if(label <= stack->GetNprimary()) {
3147 if(fAnalysisEtaMode)
3148 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3151 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3156 if(label > stack->GetNprimary()) {
3157 Int_t lPartMother = -1;
3158 Int_t motherPDGCode = -1;
3159 lPartMother = particle->GetFirstMother();
3160 TParticle *motherParticle = stack->Particle(lPartMother);
3161 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3163 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3164 if(fAnalysisEtaMode)
3165 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3168 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3173 if((particle->GetUniqueID() == 13)) {
3174 if(fAnalysisEtaMode)
3175 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3178 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3182 }//hadronic interactions
3184 }//initial antiprotons
3187 track->GetESDpid(probability);
3189 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3190 rcc += probability[i]*GetParticleFraction(i,P);
3191 if(rcc == 0.0) continue;
3193 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3194 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3195 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3196 if(fParticleType == 4) {
3197 if(fAnalysisEtaMode)
3198 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3200 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3204 if(TMath::Abs(pdgcode) == 2212) {
3205 if(fAnalysisEtaMode)
3206 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3209 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3213 }//properly identified as proton
3215 if(fAnalysisEtaMode)
3216 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3219 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3224 }//identified as proton
3228 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3231 //____________________________________________________________________//
3232 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3234 //Checks if the label is used already
3235 Bool_t status = kFALSE;
3236 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3237 if(labelArray.At(i) == label)
3244 //____________________________________________________________________//
3245 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3247 const AliESDVertex *vertex) {
3250 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3251 TParticle *particle = stack->Particle(iParticle);
3252 if(!particle) continue;
3254 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3255 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3256 if(fAnalysisEtaMode) {
3257 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3260 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3262 Int_t pdgcode = particle->GetPdgCode();
3263 if(pdgcode == 2212) {
3264 if(fAnalysisEtaMode)
3265 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
3268 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3273 if(pdgcode == -2212) {
3274 if(fAnalysisEtaMode)
3275 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
3278 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3286 Int_t nGoodTracks = esd->GetNumberOfTracks();
3287 TArrayI labelArray(nGoodTracks);
3288 Int_t labelCounter = 0;
3289 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3290 AliESDtrack* track = esd->GetTrack(iTracks);
3291 if(!track) continue;
3293 Int_t label = TMath::Abs(track->GetLabel());
3294 if(IsLabelUsed(labelArray,label)) continue;
3295 labelArray.AddAt(label,labelCounter);
3298 TParticle *particle = stack->Particle(label);
3299 if(!particle) continue;
3300 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3302 AliESDtrack trackTPC;
3304 //in case it's a TPC only track relate it to the proper vertex
3305 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3306 Float_t p[2],cov[3];
3307 track->GetImpactParametersTPC(p,cov);
3308 if (p[0]==0 && p[1]==0)
3309 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3310 if (!track->FillTPCOnlyTrack(trackTPC)) {
3316 Double_t Pt = 0.0, P = 0.0;
3317 Double_t probability[5];
3318 Float_t dcaXY = 0.0, dcaZ = 0.0;
3319 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3321 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3322 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3324 Float_t chi2PerClusterITS = -1;
3325 if (nClustersITS!=0)
3326 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3327 Float_t chi2PerClusterTPC = -1;
3328 if (nClustersTPC!=0)
3329 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3330 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3331 Double_t extCov[15];
3332 track->GetExternalCovariance(extCov);
3336 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3337 if(!tpcTrack) continue;
3338 Pt = tpcTrack->Pt();
3340 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3341 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3344 track->GetTPCpid(probability);
3346 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3347 rcc += probability[i]*GetParticleFraction(i,P);
3348 if(rcc == 0.0) continue;
3350 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3351 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3352 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3353 if(fParticleType == 4) {
3354 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3356 FillQA(stack,esd,vertex,track);
3357 if(IsAccepted(esd,vertex,track)) {
3358 if(label <= stack->GetNprimary()) {
3359 if(track->Charge() > 0) {
3360 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3361 if(track->HasPointOnITSLayer(iLayer))
3362 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3364 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3365 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3366 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3367 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3368 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3369 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3370 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3371 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3372 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3373 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3375 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3376 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3377 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3378 if(fAnalysisEtaMode)
3379 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),Pt);
3381 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3385 ((TH2D *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(),
3386 tpcTrack->Phi()*180./TMath::Pi());
3387 }//accepted primary protons
3388 else if(track->Charge() < 0) {
3389 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3390 if(track->HasPointOnITSLayer(iLayer))
3391 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3393 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3394 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3395 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3396 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3397 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3398 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3399 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3400 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3401 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3402 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3404 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3405 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3406 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3407 if(fAnalysisEtaMode)
3408 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),Pt);
3410 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3414 ((TH2D *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(),
3415 tpcTrack->Phi()*180./TMath::Pi());
3416 }//accepted primary antiprotons
3417 }//accepted primary particles
3418 else if(label > stack->GetNprimary()) {
3419 Int_t lPartMother = -1;
3420 Int_t motherPDGCode = -1;
3422 lPartMother = particle->GetFirstMother();
3423 TParticle *motherParticle = stack->Particle(lPartMother);
3424 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3427 if(fMCProcessIdFlag)
3428 if(particle->GetUniqueID() != fMCProcessId) continue;
3429 if(fMotherParticlePDGCodeFlag)
3430 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3432 if(track->Charge() > 0) {
3433 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3434 if(track->HasPointOnITSLayer(iLayer))
3435 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3437 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3438 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3439 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3440 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3441 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3442 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3443 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3444 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3445 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3446 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3448 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3449 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3450 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3451 if(fAnalysisEtaMode)
3452 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),Pt);
3454 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3458 ((TH2D *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(),
3459 tpcTrack->Phi()*180./TMath::Pi());
3460 if(fAnalysisEtaMode)
3461 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),Pt,
3462 ConvertPDGToInt(motherPDGCode));
3464 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3468 ConvertPDGToInt(motherPDGCode));
3469 }//accepted secondary protons
3470 else if(track->Charge() < 0) {
3471 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3472 if(track->HasPointOnITSLayer(iLayer))
3473 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3475 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3476 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3477 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3478 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3479 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3480 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3481 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3482 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3483 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3484 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3486 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3487 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3488 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3489 if(fAnalysisEtaMode)
3490 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),Pt);
3492 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3496 ((TH2D *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(),
3497 tpcTrack->Phi()*180./TMath::Pi());
3498 if(fAnalysisEtaMode)
3499 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),Pt,
3500 ConvertPDGToInt(motherPDGCode));
3502 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3506 ConvertPDGToInt(motherPDGCode));
3507 }//accepted secondary antiprotons
3508 }//accepted secondary particles
3509 }//accepted - track cuts
3511 if(label <= stack->GetNprimary()) {
3512 if(track->Charge() > 0) {
3513 if(fAnalysisEtaMode)
3514 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),Pt);
3516 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3520 ((TH2D *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(),
3521 tpcTrack->Phi()*180./TMath::Pi());
3523 else if(track->Charge() < 0) {
3524 if(fAnalysisEtaMode)
3525 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),Pt);
3527 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3531 ((TH2D *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(),
3532 tpcTrack->Phi()*180./TMath::Pi());
3534 }//rejected primary particles
3535 else if(label > stack->GetNprimary()) {
3536 if(track->Charge() > 0) {
3537 if(fAnalysisEtaMode)
3538 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),Pt);
3540 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3544 ((TH2D *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(),
3545 tpcTrack->Phi()*180./TMath::Pi());
3547 else if(track->Charge() < 0) {
3548 if(fAnalysisEtaMode)
3549 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),Pt);
3551 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3555 ((TH2D *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(),
3556 tpcTrack->Phi()*180./TMath::Pi());
3558 }//rejected secondary particles
3559 }//rejected - track cuts
3563 else if(!fUseTPCOnly) {
3566 track->GetImpactParameters(dcaXY,dcaZ);
3569 track->GetESDpid(probability);
3571 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3572 rcc += probability[i]*GetParticleFraction(i,P);
3573 if(rcc == 0.0) continue;
3575 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3576 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3577 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3578 if(fParticleType == 4) {
3579 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3581 FillQA(stack,esd,vertex,track);
3582 if(IsAccepted(esd,vertex,track)) {
3583 if(label <= stack->GetNprimary()) {
3584 if(track->Charge() > 0) {
3585 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3586 if(track->HasPointOnITSLayer(iLayer))
3587 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3589 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3590 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3591 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3592 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3593 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3594 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3595 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3596 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3597 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3598 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3600 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3601 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3602 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3603 if(fAnalysisEtaMode)
3604 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),Pt);
3606 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3610 ((TH2D *)(fQA2DList->At(12)))->Fill(track->Eta(),
3611 track->Phi()*180./TMath::Pi());
3613 else if(track->Charge() < 0) {
3614 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3615 if(track->HasPointOnITSLayer(iLayer))
3616 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3618 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3619 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3620 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3621 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3622 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3623 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3624 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3625 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3626 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3627 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3629 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3630 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3631 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3632 if(fAnalysisEtaMode)
3633 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),Pt);
3635 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3639 ((TH2D *)(fQA2DList->At(16)))->Fill(track->Eta(),
3640 track->Phi()*180./TMath::Pi());
3642 }//primary particles
3643 else if(label > stack->GetNprimary()) {
3644 Int_t lPartMother = -1;
3645 Int_t motherPDGCode = -1;
3647 lPartMother = particle->GetFirstMother();
3648 TParticle *motherParticle = stack->Particle(lPartMother);
3649 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3652 if(fMCProcessIdFlag)
3653 if(particle->GetUniqueID() != fMCProcessId) continue;
3654 if(fMotherParticlePDGCodeFlag)
3655 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3657 if(track->Charge() > 0) {
3658 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3659 if(track->HasPointOnITSLayer(iLayer))
3660 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3662 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3663 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3664 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3665 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3666 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3667 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3668 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3669 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3670 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3671 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3673 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3674 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3675 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3676 if(fAnalysisEtaMode)
3677 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),Pt);
3679 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3683 ((TH2D *)(fQA2DList->At(14)))->Fill(track->Eta(),
3684 track->Phi()*180./TMath::Pi());
3685 if(fAnalysisEtaMode)
3686 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),Pt,
3687 ConvertPDGToInt(motherPDGCode));
3689 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3693 ConvertPDGToInt(motherPDGCode));
3695 else if(track->Charge() < 0) {
3696 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3697 if(track->HasPointOnITSLayer(iLayer))
3698 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3700 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3701 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3702 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3703 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3704 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3705 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3706 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3707 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3708 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3709 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3711 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3712 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3713 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3714 if(fAnalysisEtaMode)
3715 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),Pt);
3717 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3722 ((TH2D *)(fQA2DList->At(18)))->Fill(track->Eta(),
3723 track->Phi()*180./TMath::Pi());
3724 if(fAnalysisEtaMode)
3725 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),Pt,
3726 ConvertPDGToInt(motherPDGCode));
3728 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3732 ConvertPDGToInt(motherPDGCode));
3734 }//secondary particles
3735 }//accepted - track cuts
3736 else if(!IsAccepted(esd,vertex,track)) {
3737 if(label <= stack->GetNprimary()) {
3738 if(track->Charge() > 0) {
3739 if(fAnalysisEtaMode)
3740 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),Pt);
3742 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3746 ((TH2D *)(fQA2DList->At(13)))->Fill(track->Eta(),
3747 track->Phi()*180./TMath::Pi());
3749 else if(track->Charge() < 0) {
3750 if(fAnalysisEtaMode)
3751 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),Pt);
3753 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
3757 ((TH2D *)(fQA2DList->At(17)))->Fill(track->Eta(),
3758 track->Phi()*180./TMath::Pi());
3760 }//primary particles
3761 else if(label > stack->GetNprimary()) {
3762 if(track->Charge() > 0) {
3763 if(fAnalysisEtaMode)
3764 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),Pt);
3766 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
3770 ((TH2D *)(fQA2DList->At(15)))->Fill(track->Eta(),
3771 track->Phi()*180./TMath::Pi());
3773 else if(track->Charge() < 0) {
3774 if(fAnalysisEtaMode)
3775 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),Pt);
3777 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
3781 ((TH2D *)(fQA2DList->At(19)))->Fill(track->Eta(),
3782 track->Phi()*180./TMath::Pi());
3784 }//secondary particles
3785 }//rejected - track cuts
3787 }//combined tracking
3792 //____________________________________________________________________//
3793 void AliProtonQAAnalysis::InitMCAnalysis() {
3794 //MC analysis - 3D histograms: y-pT-pdg
3795 fPDGList = new TList();
3796 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
3797 ";;P_{T} [GeV/c];PDG",
3798 fNBinsY,fMinY,fMaxY,
3799 fNBinsPt,fMinPt,fMaxPt,
3801 if(fAnalysisEtaMode)
3802 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
3804 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
3805 fPDGList->Add(gHistYPtPDGProtons);
3806 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
3807 ";;P_{T} [GeV/c];PDG",
3808 fNBinsY,fMinY,fMaxY,
3809 fNBinsPt,fMinPt,fMaxPt,
3811 if(fAnalysisEtaMode)
3812 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
3814 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
3815 fPDGList->Add(gHistYPtPDGAntiProtons);
3818 fMCProcessesList = new TList();
3819 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
3820 fMCProcessesList->Add(gHistProtonsFromKLProcess);
3821 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
3822 fMCProcessesList->Add(gHistProtonsFromPionProcess);
3823 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
3824 fMCProcessesList->Add(gHistProtonsFromKSProcess);
3825 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
3826 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
3827 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
3828 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
3829 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
3830 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
3831 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
3832 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
3833 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
3834 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
3835 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3836 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
3837 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
3838 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
3839 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
3840 fMCProcessesList->Add(gHistProtonsFromXi0Process);
3841 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
3842 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
3844 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
3845 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
3846 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
3847 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
3848 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
3849 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
3850 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
3851 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
3852 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
3853 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
3854 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
3855 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
3856 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
3857 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
3858 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3859 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
3862 //____________________________________________________________________//
3863 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
3864 //Main analysis part - MC
3865 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3866 TParticle *particle = stack->Particle(iParticle);
3867 if(!particle) continue;
3869 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3870 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3871 if(fAnalysisEtaMode) {
3872 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3875 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3878 Int_t pdgcode = particle->GetPdgCode();
3879 if(pdgcode == 2212) {
3880 if(iParticle <= stack->GetNprimary()) {
3881 if(fAnalysisEtaMode)
3882 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
3884 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3889 else if(iParticle > stack->GetNprimary()) {
3890 Int_t lPartMother = particle->GetFirstMother();
3891 TParticle *motherParticle = stack->Particle(lPartMother);
3892 if(!motherParticle) continue;
3893 Int_t motherPDGCode = motherParticle->GetPdgCode();
3894 if(fMCProcessIdFlag)
3895 if(particle->GetUniqueID() != fMCProcessId) continue;
3896 if(fMotherParticlePDGCodeFlag)
3897 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3899 if(fAnalysisEtaMode)
3900 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
3902 ConvertPDGToInt(motherParticle->GetPdgCode()));
3904 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3908 ConvertPDGToInt(motherParticle->GetPdgCode()));
3910 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3911 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
3912 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3913 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
3914 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3915 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
3916 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3917 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
3918 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3919 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
3920 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3921 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
3922 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
3923 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
3924 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3925 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
3926 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3927 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
3928 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
3929 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
3930 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
3931 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
3932 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
3933 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
3935 }//pdgcode of proton
3937 if(pdgcode == -2212) {
3938 if(iParticle <= stack->GetNprimary()) {
3939 if(fAnalysisEtaMode)
3940 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
3942 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3947 else if(iParticle > stack->GetNprimary()) {
3948 Int_t lPartMother = particle->GetFirstMother();
3949 TParticle *motherParticle = stack->Particle(lPartMother);
3950 if(!motherParticle) continue;
3951 Int_t motherPDGCode = motherParticle->GetPdgCode();
3952 if(fMCProcessIdFlag)
3953 if(particle->GetUniqueID() != fMCProcessId) continue;
3954 if(fMotherParticlePDGCodeFlag)
3955 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3957 if(fAnalysisEtaMode)
3958 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
3960 ConvertPDGToInt(motherParticle->GetPdgCode()));
3962 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3966 ConvertPDGToInt(motherParticle->GetPdgCode()));
3969 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3970 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
3971 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3972 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
3973 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3974 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
3975 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3976 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
3977 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3978 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
3979 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3980 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
3981 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3982 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
3983 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3984 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
3985 }//secondary antiproton
3986 }//pdgcode of antiproton
3991 //____________________________________________________________________//
3992 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
3993 //Converts the pdg code to an int based on the following scheme:
3994 //1: PDG code: 130 - Name: K_L0
3995 //2: PDG code: 211 - Name: pi+
3996 //3: PDG code: 310 - Name: K_S0
3997 //4: PDG code: 321 - Name: K+
3998 //5: PDG code: 2112 - Name: neutron
3999 //6: PDG code: 2212 - Name: proton
4000 //7: PDG code: 3112 - Name: Sigma-
4001 //8: PDG code: 3122 - Name: Lambda0
4002 //9: PDG code: 3222 - Name: Sigma+
4003 //10: PDG code: 3312 - Name: Xi-
4004 //11: PDG code: 3322 - Name: Xi0
4005 //12: PDG code: 3334 - Name: Omega-
4007 switch (TMath::Abs(pdgCode)) {
4065 //________________________________________________________________________
4066 /*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
4070 // Get the vertex from the ESD and returns it if the vertex is valid
4071 // depending on the analysis mode: TPC - Hybrid - Global
4072 const AliESDVertex* vertex = 0;
4073 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
4074 Double_t kBz = esd->GetMagneticField();
4075 AliVertexerTracks vertexer(kBz);
4076 vertexer.SetTPCMode();
4077 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
4078 esd->SetPrimaryVertexTPC(vTPC);
4079 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
4080 AliESDtrack *t = esd->GetTrack(i);
4081 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
4084 vertex = esd->GetPrimaryVertexTPC();
4086 else if(fUseHybridTPC)
4087 vertex = esd->GetPrimaryVertexSPD();
4088 else if(!fUseTPCOnly)
4089 vertex = esd->GetPrimaryVertex();
4091 Printf("GetVertex: ERROR: Invalid analysis mode");
4093 if(!vertex) return 0;
4095 // check Ncontributors
4096 if(vertex->GetNContributors() <= 0) return 0;
4099 Double_t zRes = vertex->GetZRes();
4100 if(zRes == 0) return 0;
4103 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
4104 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
4105 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;