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>
39 #include <AliGenEventHeader.h>
41 ClassImp(AliProtonQAAnalysis)
43 //____________________________________________________________________//
44 AliProtonQAAnalysis::AliProtonQAAnalysis() :
45 TObject(), fAnalysisEtaMode(kFALSE),
46 fNBinsY(0), fMinY(0), fMaxY(0),
47 fNBinsPt(0), fMinPt(0), fMaxPt(0),
48 fMinTPCClusters(0), fMinITSClusters(0),
49 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
50 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
51 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
52 fMaxDCAXY(0), fMaxDCAXYTPC(0),
53 fMaxDCAZ(0), fMaxDCAZTPC(0),
55 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
56 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
57 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
58 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
59 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
60 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
61 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
62 fMaxConstrainChi2Flag(kFALSE),
63 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
64 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
65 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
66 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
67 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
68 fGlobalQAList(0), fQAVertexList(0), fQA2DList(0),
69 fQAPrimaryProtonsAcceptedList(0),
70 fQAPrimaryProtonsRejectedList(0),
71 fQASecondaryProtonsAcceptedList(0),
72 fQASecondaryProtonsRejectedList(0),
73 fQAPrimaryAntiProtonsAcceptedList(0),
74 fQAPrimaryAntiProtonsRejectedList(0),
75 fQASecondaryAntiProtonsAcceptedList(0),
76 fQASecondaryAntiProtonsRejectedList(0),
77 fFunctionProbabilityFlag(kFALSE),
78 fElectronFunction(0), fMuonFunction(0),
79 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
80 fUseTPCOnly(kFALSE), fUseHybridTPC(kFALSE),
81 fPDGList(0), fMCProcessesList(0),
82 fRunMCAnalysis(kFALSE),
83 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
84 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
85 fAcceptedCutList(0), fRejectedCutList(0),
86 fAcceptedDCAList(0), fRejectedDCAList(0),
87 fRunEfficiencyAnalysis(kFALSE),
88 fUseCutsInEfficiency(kFALSE),
91 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
94 //____________________________________________________________________//
95 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
97 if(fGlobalQAList) delete fGlobalQAList;
98 if(fQAVertexList) delete fQAVertexList;
99 if(fQA2DList) delete fQA2DList;
100 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
101 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
102 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
103 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
104 if(fQAPrimaryAntiProtonsAcceptedList)
105 delete fQAPrimaryAntiProtonsAcceptedList;
106 if(fQAPrimaryAntiProtonsRejectedList)
107 delete fQAPrimaryAntiProtonsRejectedList;
108 if(fQASecondaryAntiProtonsAcceptedList)
109 delete fQASecondaryAntiProtonsAcceptedList;
110 if(fQASecondaryAntiProtonsRejectedList)
111 delete fQASecondaryAntiProtonsRejectedList;
113 if(fPDGList) delete fPDGList;
114 if(fMCProcessesList) delete fMCProcessesList;
116 if(fAcceptedCutList) delete fAcceptedCutList;
117 if(fRejectedCutList) delete fRejectedCutList;
118 if(fAcceptedDCAList) delete fAcceptedDCAList;
119 if(fRejectedDCAList) delete fRejectedDCAList;
121 if(fEfficiencyList) delete fEfficiencyList;
124 //____________________________________________________________________//
125 Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
127 if(fFunctionProbabilityFlag) {
128 if(i == 0) partFrac = fElectronFunction->Eval(p);
129 if(i == 1) partFrac = fMuonFunction->Eval(p);
130 if(i == 2) partFrac = fPionFunction->Eval(p);
131 if(i == 3) partFrac = fKaonFunction->Eval(p);
132 if(i == 4) partFrac = fProtonFunction->Eval(p);
134 else partFrac = fPartFrac[i];
139 //____________________________________________________________________//
140 Bool_t AliProtonQAAnalysis::IsInPhaseSpace(AliESDtrack* const track) {
141 // Checks if the track is outside the analyzed y-Pt phase space
142 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
146 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
148 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; eta = -10.0;
151 gPt = tpcTrack->Pt();
152 gPx = tpcTrack->Px();
153 gPy = tpcTrack->Py();
154 gPz = tpcTrack->Pz();
155 eta = tpcTrack->Eta();
166 if((gPt < fMinPt) || (gPt > fMaxPt)) return kFALSE;
167 if(fAnalysisEtaMode) {
168 if((eta < fMinY) || (eta > fMaxY))
172 if((Rapidity(gPx,gPy,gPz) < fMinY) || (Rapidity(gPx,gPy,gPz) > fMaxY))
179 //____________________________________________________________________//
180 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDEvent *esd,
181 const AliESDVertex *vertex,
182 AliESDtrack* track) {
183 // Checks if the track is excluded from the cuts
184 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
185 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
187 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
188 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
190 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
191 dca[0] = -100.; dca[1] = -100.;
192 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
195 gPt = tpcTrack->Pt();
196 gPx = tpcTrack->Px();
197 gPy = tpcTrack->Py();
198 gPz = tpcTrack->Pz();
199 tpcTrack->PropagateToDCA(vertex,
200 esd->GetMagneticField(),
204 else if(fUseHybridTPC) {
205 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
207 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
208 dca[0] = -100.; dca[1] = -100.;
209 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
212 gPt = tpcTrack->Pt();
213 gPx = tpcTrack->Px();
214 gPy = tpcTrack->Py();
215 gPz = tpcTrack->Pz();
216 tpcTrack->PropagateToDCA(vertex,
217 esd->GetMagneticField(),
226 track->PropagateToDCA(vertex,
227 esd->GetMagneticField(),
232 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
233 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
235 Float_t chi2PerClusterITS = -1;
237 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
238 Float_t chi2PerClusterTPC = -1;
240 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
243 track->GetExternalCovariance(extCov);
245 if(fPointOnITSLayer1Flag)
246 if(!track->HasPointOnITSLayer(0)) return kFALSE;
247 if(fPointOnITSLayer2Flag)
248 if(!track->HasPointOnITSLayer(1)) return kFALSE;
249 if(fPointOnITSLayer3Flag)
250 if(!track->HasPointOnITSLayer(2)) return kFALSE;
251 if(fPointOnITSLayer4Flag)
252 if(!track->HasPointOnITSLayer(3)) return kFALSE;
253 if(fPointOnITSLayer5Flag)
254 if(!track->HasPointOnITSLayer(4)) return kFALSE;
255 if(fPointOnITSLayer6Flag)
256 if(!track->HasPointOnITSLayer(5)) return kFALSE;
257 if(fMinITSClustersFlag)
258 if(nClustersITS < fMinITSClusters) return kFALSE;
259 if(fMaxChi2PerITSClusterFlag)
260 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
261 if(fMinTPCClustersFlag)
262 if(nClustersTPC < fMinTPCClusters) return kFALSE;
263 if(fMaxChi2PerTPCClusterFlag)
264 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
266 if(extCov[0] > fMaxCov11) return kFALSE;
268 if(extCov[2] > fMaxCov22) return kFALSE;
270 if(extCov[5] > fMaxCov33) return kFALSE;
272 if(extCov[9] > fMaxCov44) return kFALSE;
274 if(extCov[14] > fMaxCov55) return kFALSE;
275 if(fMaxSigmaToVertexFlag)
276 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
277 if(fMaxSigmaToVertexTPCFlag)
278 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
280 if(TMath::Abs(dca[0]) > fMaxDCAXY) return kFALSE;
282 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) return kFALSE;
284 if(TMath::Abs(dca[1]) > fMaxDCAZ) return kFALSE;
286 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) return kFALSE;
287 if(fMaxConstrainChi2Flag) {
288 if(track->GetConstrainedChi2() > 0)
289 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
292 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
294 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
296 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
298 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
303 //____________________________________________________________________//
304 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) const {
305 // Calculates the number of sigma to the vertex.
310 if((fUseTPCOnly)&&(!fUseHybridTPC))
311 esdTrack->GetImpactParametersTPC(b,bCov);
313 esdTrack->GetImpactParameters(b,bCov);
315 if (bCov[0]<=0 || bCov[2]<=0) {
316 //AliDebug(1, "Estimated b resolution lower or equal zero!");
317 bCov[0]=0; bCov[2]=0;
319 bRes[0] = TMath::Sqrt(bCov[0]);
320 bRes[1] = TMath::Sqrt(bCov[2]);
322 if (bRes[0] == 0 || bRes[1] ==0) return -1;
324 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
326 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
328 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
333 //____________________________________________________________________//
334 Double_t AliProtonQAAnalysis::Rapidity(Double_t gPx,
336 Double_t gPz) const {
337 //returns the rapidity of the proton - to be removed
338 Double_t fMass = 9.38270000000000048e-01;
340 Double_t gP = TMath::Sqrt(TMath::Power(gPx,2) +
341 TMath::Power(gPy,2) +
342 TMath::Power(gPz,2));
343 Double_t energy = TMath::Sqrt(gP*gP + fMass*fMass);
346 y = 0.5*TMath::Log((energy + gPz)/(energy - gPz));
351 //____________________________________________________________________//
352 void AliProtonQAAnalysis::FillQA(AliStack *stack,
354 const AliESDVertex *vertex,
355 AliESDtrack* track) {
356 // Checks if the track is excluded from the cuts
357 Int_t nPrimaries = stack->GetNprimary();
358 Int_t label = TMath::Abs(track->GetLabel());
360 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
361 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
363 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
364 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
366 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
367 dca[0] = -100.; dca[1] = -100.;
368 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
375 tpcTrack->PropagateToDCA(vertex,
376 esd->GetMagneticField(),
380 else if(fUseHybridTPC) {
381 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
383 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
384 dca[0] = -100.; dca[1] = -100.;
385 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
392 tpcTrack->PropagateToDCA(vertex,
393 esd->GetMagneticField(),
402 track->PropagateToDCA(vertex,
403 esd->GetMagneticField(),
408 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
409 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
411 Float_t chi2PerClusterITS = -1;
413 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
414 Float_t chi2PerClusterTPC = -1;
416 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
419 track->GetExternalCovariance(extCov);
421 //cout<<"Charge: "<<track->Charge()<<
422 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
423 //" - TPC clusters: "<<nClustersTPC<<endl;
425 if(track->Charge() > 0) {
427 if(label <= nPrimaries) {
428 if(fMinITSClustersFlag) {
429 if(nClustersITS < fMinITSClusters) {
430 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
433 else if(nClustersITS >= fMinITSClusters)
434 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
436 if(fMaxChi2PerITSClusterFlag) {
437 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
438 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
441 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
442 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
443 }//chi2 per ITS cluster
444 if(fMinTPCClustersFlag) {
445 if(nClustersTPC < fMinTPCClusters) {
446 //cout<<"Primary proton rejected"<<endl;
447 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
450 else if(nClustersTPC >= fMinTPCClusters) {
451 //cout<<"Primary proton accepted"<<endl;
452 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
455 if(fMaxChi2PerTPCClusterFlag) {
456 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
457 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
460 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
461 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
462 }//chi2 per TPC cluster
464 if(extCov[0] > fMaxCov11) {
465 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
468 else if(extCov[0] <= fMaxCov11)
469 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
472 if(extCov[2] > fMaxCov22) {
473 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
476 else if(extCov[2] <= fMaxCov22)
477 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
480 if(extCov[5] > fMaxCov33) {
481 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
484 else if(extCov[5] <= fMaxCov33)
485 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
488 if(extCov[9] > fMaxCov44) {
489 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
492 else if(extCov[9] <= fMaxCov44)
493 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
496 if(extCov[14] > fMaxCov55) {
497 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
500 else if(extCov[14] <= fMaxCov55)
501 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
503 if(fMaxSigmaToVertexFlag) {
504 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
505 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
508 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
509 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
511 if(fMaxSigmaToVertexTPCFlag) {
512 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
513 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
516 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
517 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
518 }//sigma to vertex TPC
520 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
521 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
524 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
525 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
526 }//DCA xy global tracking
527 if(fMaxDCAXYTPCFlag) {
528 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
529 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
532 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
533 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
534 }//DCA xy TPC tracking
536 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
537 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
540 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
541 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
542 }//DCA z global tracking
543 if(fMaxDCAZTPCFlag) {
544 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
545 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
548 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
549 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
550 }//DCA z TPC tracking
551 if(fMaxConstrainChi2Flag) {
552 if(track->GetConstrainedChi2() > 0) {
553 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
554 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
557 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
558 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
560 }//constrain chi2 - vertex
562 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
563 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
566 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
567 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
570 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
571 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
574 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
575 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
578 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
579 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
582 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
583 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
586 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
587 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
590 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
591 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
593 if(fPointOnITSLayer1Flag) {
594 if(!track->HasPointOnITSLayer(0)) {
595 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
597 else if(track->HasPointOnITSLayer(0))
598 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
600 if(fPointOnITSLayer2Flag) {
601 if(!track->HasPointOnITSLayer(1)) {
602 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
604 else if(track->HasPointOnITSLayer(1))
605 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
607 if(fPointOnITSLayer3Flag) {
608 if(!track->HasPointOnITSLayer(2)) {
609 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
611 else if(track->HasPointOnITSLayer(2))
612 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
614 if(fPointOnITSLayer4Flag) {
615 if(!track->HasPointOnITSLayer(3)) {
616 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
618 else if(track->HasPointOnITSLayer(3))
619 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
621 if(fPointOnITSLayer5Flag) {
622 if(!track->HasPointOnITSLayer(4)) {
623 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
625 else if(track->HasPointOnITSLayer(4))
626 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
628 if(fPointOnITSLayer6Flag) {
629 if(!track->HasPointOnITSLayer(5)) {
630 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
632 else if(track->HasPointOnITSLayer(5))
633 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
635 }//primary particle cut
638 if(label > nPrimaries) {
639 if(fMinITSClustersFlag) {
640 if(nClustersITS < fMinITSClusters) {
641 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
644 else if(nClustersITS >= fMinITSClusters)
645 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
647 if(fMaxChi2PerITSClusterFlag) {
648 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
649 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
652 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
653 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
654 }//chi2 per ITS cluster
655 if(fMinTPCClustersFlag) {
656 if(nClustersTPC < fMinTPCClusters) {
657 //cout<<"Secondary proton rejected"<<endl;
658 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
661 else if(nClustersTPC >= fMinTPCClusters) {
662 //cout<<"Secondary proton accepted"<<endl;
663 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
666 if(fMaxChi2PerTPCClusterFlag) {
667 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
668 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
671 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
672 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
673 }//chi2 per TPC cluster
675 if(extCov[0] > fMaxCov11) {
676 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
679 else if(extCov[0] <= fMaxCov11)
680 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
683 if(extCov[2] > fMaxCov22) {
684 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
687 else if(extCov[2] <= fMaxCov22)
688 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
691 if(extCov[5] > fMaxCov33) {
692 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
695 else if(extCov[5] <= fMaxCov33)
696 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
699 if(extCov[9] > fMaxCov44) {
700 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
703 else if(extCov[9] <= fMaxCov44)
704 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
707 if(extCov[14] > fMaxCov55) {
708 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
711 else if(extCov[14] <= fMaxCov55)
712 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
714 if(fMaxSigmaToVertexFlag) {
715 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
716 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
719 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
720 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
722 if(fMaxSigmaToVertexTPCFlag) {
723 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
724 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
727 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
728 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
729 }//sigma to vertex TPC
731 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
732 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
735 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
736 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
737 }//DCA xy global tracking
738 if(fMaxDCAXYTPCFlag) {
739 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
740 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
743 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
744 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
745 }//DCA xy TPC tracking
747 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
748 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
751 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
752 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
753 }//DCA z global tracking
754 if(fMaxDCAZTPCFlag) {
755 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
756 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
759 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
760 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
761 }//DCA z TPC tracking
762 if(fMaxConstrainChi2Flag) {
763 if(track->GetConstrainedChi2() > 0) {
764 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
765 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
768 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
769 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
771 }//constrain chi2 - vertex
773 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
774 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
777 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
778 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
781 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
782 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
785 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
786 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
789 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
790 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
793 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
794 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
797 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
798 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
801 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
802 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
804 if(fPointOnITSLayer1Flag) {
805 if(!track->HasPointOnITSLayer(0)) {
806 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
808 else if(track->HasPointOnITSLayer(0))
809 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
811 if(fPointOnITSLayer2Flag) {
812 if(!track->HasPointOnITSLayer(1)) {
813 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
815 else if(track->HasPointOnITSLayer(1))
816 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
818 if(fPointOnITSLayer3Flag) {
819 if(!track->HasPointOnITSLayer(2)) {
820 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
822 else if(track->HasPointOnITSLayer(2))
823 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
825 if(fPointOnITSLayer4Flag) {
826 if(!track->HasPointOnITSLayer(3)) {
827 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
829 else if(track->HasPointOnITSLayer(3))
830 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
832 if(fPointOnITSLayer5Flag) {
833 if(!track->HasPointOnITSLayer(4)) {
834 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
836 else if(track->HasPointOnITSLayer(4))
837 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
839 if(fPointOnITSLayer6Flag) {
840 if(!track->HasPointOnITSLayer(5)) {
841 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
843 else if(track->HasPointOnITSLayer(5))
844 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
846 }//secondary particle cut
850 if(track->Charge() < 0) {
852 if(label <= nPrimaries) {
853 if(fMinITSClustersFlag) {
854 if(nClustersITS < fMinITSClusters) {
855 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
858 else if(nClustersITS >= fMinITSClusters)
859 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
861 if(fMaxChi2PerITSClusterFlag) {
862 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
863 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
866 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
867 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
868 }//chi2 per ITS cluster
869 if(fMinTPCClustersFlag) {
870 if(nClustersTPC < fMinTPCClusters) {
871 //cout<<"Primary antiproton rejected"<<endl;
872 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
875 else if(nClustersTPC >= fMinTPCClusters) {
876 //cout<<"Primary antiproton accepted"<<endl;
877 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
880 if(fMaxChi2PerTPCClusterFlag) {
881 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
882 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
885 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
886 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
887 }//chi2 per TPC cluster
889 if(extCov[0] > fMaxCov11) {
890 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
893 else if(extCov[0] <= fMaxCov11)
894 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
897 if(extCov[2] > fMaxCov22) {
898 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
901 else if(extCov[2] <= fMaxCov22)
902 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
905 if(extCov[5] > fMaxCov33) {
906 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
909 else if(extCov[5] <= fMaxCov33)
910 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
913 if(extCov[9] > fMaxCov44) {
914 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
917 else if(extCov[9] <= fMaxCov44)
918 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
921 if(extCov[14] > fMaxCov55) {
922 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
925 else if(extCov[14] <= fMaxCov55)
926 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
928 if(fMaxSigmaToVertexFlag) {
929 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
930 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
933 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
934 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
936 if(fMaxSigmaToVertexTPCFlag) {
937 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
938 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
941 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
942 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
943 }//sigma to vertex TPC
945 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
946 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
949 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
950 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
951 }//DCA xy global tracking
952 if(fMaxDCAXYTPCFlag) {
953 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
954 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
957 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
958 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
959 }//DCA xy TPC tracking
961 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
962 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
965 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
966 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
967 }//DCA z global tracking
968 if(fMaxDCAZTPCFlag) {
969 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
970 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
973 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
974 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
975 }//DCA z TPC tracking
976 if(fMaxConstrainChi2Flag) {
977 if(track->GetConstrainedChi2() > 0) {
978 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
979 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
982 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
983 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
985 }//constrain chi2 - vertex
987 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
988 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
991 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
992 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
995 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
996 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
999 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1000 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1003 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1004 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
1007 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1008 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1011 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1012 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
1015 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1016 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1018 if(fPointOnITSLayer1Flag) {
1019 if(!track->HasPointOnITSLayer(0)) {
1020 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
1022 else if(track->HasPointOnITSLayer(0))
1023 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1025 if(fPointOnITSLayer2Flag) {
1026 if(!track->HasPointOnITSLayer(1)) {
1027 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
1029 else if(track->HasPointOnITSLayer(1))
1030 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1032 if(fPointOnITSLayer3Flag) {
1033 if(!track->HasPointOnITSLayer(2)) {
1034 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
1036 else if(track->HasPointOnITSLayer(2))
1037 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1039 if(fPointOnITSLayer4Flag) {
1040 if(!track->HasPointOnITSLayer(3)) {
1041 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
1043 else if(track->HasPointOnITSLayer(3))
1044 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1046 if(fPointOnITSLayer5Flag) {
1047 if(!track->HasPointOnITSLayer(4)) {
1048 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
1050 else if(track->HasPointOnITSLayer(4))
1051 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1053 if(fPointOnITSLayer6Flag) {
1054 if(!track->HasPointOnITSLayer(5)) {
1055 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
1057 else if(track->HasPointOnITSLayer(5))
1058 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1060 }//primary particle cut
1063 if(label > nPrimaries) {
1064 if(fMinITSClustersFlag) {
1065 if(nClustersITS < fMinITSClusters) {
1066 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
1069 else if(nClustersITS >= fMinITSClusters)
1070 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1072 if(fMaxChi2PerITSClusterFlag) {
1073 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
1074 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1077 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
1078 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1079 }//chi2 per ITS cluster
1080 if(fMinTPCClustersFlag) {
1081 if(nClustersTPC < fMinTPCClusters) {
1082 //cout<<"Secondary antiproton rejected"<<endl;
1083 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1086 else if(nClustersTPC >= fMinTPCClusters) {
1087 //cout<<"Secondary antiproton accepted"<<endl;
1088 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1091 if(fMaxChi2PerTPCClusterFlag) {
1092 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
1093 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1096 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
1097 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1098 }//chi2 per TPC cluster
1100 if(extCov[0] > fMaxCov11) {
1101 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
1104 else if(extCov[0] <= fMaxCov11)
1105 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1108 if(extCov[2] > fMaxCov22) {
1109 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1112 else if(extCov[2] <= fMaxCov22)
1113 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1116 if(extCov[5] > fMaxCov33) {
1117 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1120 else if(extCov[5] <= fMaxCov33)
1121 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1124 if(extCov[9] > fMaxCov44) {
1125 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1128 else if(extCov[9] <= fMaxCov44)
1129 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1132 if(extCov[14] > fMaxCov55) {
1133 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1136 else if(extCov[14] <= fMaxCov55)
1137 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1139 if(fMaxSigmaToVertexFlag) {
1140 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1141 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1144 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1145 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1147 if(fMaxSigmaToVertexTPCFlag) {
1148 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1149 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1152 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1153 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1154 }//sigma to vertex TPC
1156 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
1157 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
1160 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
1161 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
1162 }//DCA xy global tracking
1163 if(fMaxDCAXYTPCFlag) {
1164 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
1165 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
1168 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
1169 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
1170 }//DCA xy TPC tracking
1172 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
1173 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
1176 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
1177 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
1178 }//DCA z global tracking
1179 if(fMaxDCAZTPCFlag) {
1180 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
1181 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
1184 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
1185 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
1186 }//DCA z TPC tracking
1187 if(fMaxConstrainChi2Flag) {
1188 if(track->GetConstrainedChi2() > 0) {
1189 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1190 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1193 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1194 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1196 }//constrain chi2 - vertex
1198 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1199 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1202 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1203 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1206 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1207 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1210 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1211 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1214 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1215 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1218 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1219 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1222 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1223 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1226 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1227 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1229 if(fPointOnITSLayer1Flag) {
1230 if(!track->HasPointOnITSLayer(0)) {
1231 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1233 else if(track->HasPointOnITSLayer(0))
1234 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1236 if(fPointOnITSLayer2Flag) {
1237 if(!track->HasPointOnITSLayer(1)) {
1238 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1240 else if(track->HasPointOnITSLayer(1))
1241 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1243 if(fPointOnITSLayer3Flag) {
1244 if(!track->HasPointOnITSLayer(2)) {
1245 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1247 else if(track->HasPointOnITSLayer(2))
1248 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1250 if(fPointOnITSLayer4Flag) {
1251 if(!track->HasPointOnITSLayer(3)) {
1252 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1254 else if(track->HasPointOnITSLayer(3))
1255 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1257 if(fPointOnITSLayer5Flag) {
1258 if(!track->HasPointOnITSLayer(4)) {
1259 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1261 else if(track->HasPointOnITSLayer(4))
1262 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1264 if(fPointOnITSLayer6Flag) {
1265 if(!track->HasPointOnITSLayer(5)) {
1266 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1268 else if(track->HasPointOnITSLayer(5))
1269 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1271 }//secondary particle cut
1275 //____________________________________________________________________//
1276 void AliProtonQAAnalysis::SetRunQAAnalysis() {
1277 //initializes the QA lists
1278 //fQAHistograms = kTRUE;
1279 fGlobalQAList = new TList();
1281 fQA2DList = new TList();
1282 fQA2DList->SetName("fQA2DList");
1283 fGlobalQAList->Add(fQA2DList);
1285 fQAPrimaryProtonsAcceptedList = new TList();
1286 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1287 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1289 fQAPrimaryProtonsRejectedList = new TList();
1290 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1291 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1293 fQASecondaryProtonsAcceptedList = new TList();
1294 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1295 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1297 fQASecondaryProtonsRejectedList = new TList();
1298 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1299 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1301 fQAPrimaryAntiProtonsAcceptedList = new TList();
1302 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1303 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1305 fQAPrimaryAntiProtonsRejectedList = new TList();
1306 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1307 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1309 fQASecondaryAntiProtonsAcceptedList = new TList();
1310 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1311 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1313 fQASecondaryAntiProtonsRejectedList = new TList();
1314 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1315 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1318 //____________________________________________________________________//
1319 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1320 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1321 //Initializes the QA binning
1323 fMinY = minY; fMaxY = maxY;
1325 fMinPt = minPt; fMaxPt = maxPt;
1329 if(fRunMCAnalysis) InitMCAnalysis();
1330 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1333 //____________________________________________________________________//
1334 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1335 //Initialization of the efficiency list - reconstruction & PID efficiency
1336 //Adding each monitored object in the list
1337 fEfficiencyList = new TList();
1339 //MC primary protons and antiprotons for the reconstruction efficiency
1340 TH2D *gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1342 fNBinsY,fMinY,fMaxY,
1343 fNBinsPt,fMinPt,fMaxPt);
1344 if(fAnalysisEtaMode)
1345 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1347 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
1348 gHistMCYPtProtons->SetStats(kTRUE);
1349 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1350 fEfficiencyList->Add(gHistMCYPtProtons);
1351 TH2D *gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1353 fNBinsY,fMinY,fMaxY,
1354 fNBinsPt,fMinPt,fMaxPt);
1355 if(fAnalysisEtaMode)
1356 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1358 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
1359 gHistMCYPtAntiProtons->SetStats(kTRUE);
1360 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1361 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1363 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1364 TH2D *gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1366 fNBinsY,fMinY,fMaxY,
1367 fNBinsPt,fMinPt,fMaxPt);
1368 if(fAnalysisEtaMode)
1369 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1371 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1372 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1373 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1374 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1375 TH2D *gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1377 fNBinsY,fMinY,fMaxY,
1378 fNBinsPt,fMinPt,fMaxPt);
1379 if(fAnalysisEtaMode)
1380 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1382 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1383 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1384 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1385 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1387 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1388 TH2D *gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1390 fNBinsY,fMinY,fMaxY,
1391 fNBinsPt,fMinPt,fMaxPt);
1392 if(fAnalysisEtaMode)
1393 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1395 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1396 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1397 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1398 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1399 TH2D *gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1401 fNBinsY,fMinY,fMaxY,
1402 fNBinsPt,fMinPt,fMaxPt);
1403 if(fAnalysisEtaMode)
1404 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1406 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1407 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1408 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1409 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1411 //ESD primary protons and antiprotons for the reconstruction efficiency
1412 TH2D *gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1414 fNBinsY,fMinY,fMaxY,
1415 fNBinsPt,fMinPt,fMaxPt);
1416 if(fAnalysisEtaMode)
1417 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1419 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
1420 gHistESDYPtProtons->SetStats(kTRUE);
1421 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1422 fEfficiencyList->Add(gHistESDYPtProtons);
1423 TH2D *gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1425 fNBinsY,fMinY,fMaxY,
1426 fNBinsPt,fMinPt,fMaxPt);
1427 if(fAnalysisEtaMode)
1428 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1430 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
1431 gHistESDYPtAntiProtons->SetStats(kTRUE);
1432 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1433 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1435 //ESD (anti)protons from weak decays for the reconstruction efficiency
1436 TH2D *gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1438 fNBinsY,fMinY,fMaxY,
1439 fNBinsPt,fMinPt,fMaxPt);
1440 if(fAnalysisEtaMode)
1441 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1443 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1444 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1445 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1446 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1447 TH2D *gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1449 fNBinsY,fMinY,fMaxY,
1450 fNBinsPt,fMinPt,fMaxPt);
1451 if(fAnalysisEtaMode)
1452 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1454 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1455 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1456 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1457 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1459 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1460 TH2D *gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1462 fNBinsY,fMinY,fMaxY,
1463 fNBinsPt,fMinPt,fMaxPt);
1464 if(fAnalysisEtaMode)
1465 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1467 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1468 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1469 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1470 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1471 TH2D *gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1473 fNBinsY,fMinY,fMaxY,
1474 fNBinsPt,fMinPt,fMaxPt);
1475 if(fAnalysisEtaMode)
1476 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1478 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1479 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1480 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1481 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1484 //ESD reconstructed tracks that were initially protons for the PID efficiency
1485 TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
1487 fNBinsY,fMinY,fMaxY,
1488 fNBinsPt,fMinPt,fMaxPt);
1489 if(fAnalysisEtaMode)
1490 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1492 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
1493 gHistESDInitYPtProtons->SetStats(kTRUE);
1494 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1495 fEfficiencyList->Add(gHistESDInitYPtProtons);
1497 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1498 TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
1500 fNBinsY,fMinY,fMaxY,
1501 fNBinsPt,fMinPt,fMaxPt);
1502 if(fAnalysisEtaMode)
1503 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1505 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
1506 gHistESDIdYPtProtons->SetStats(kTRUE);
1507 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1508 fEfficiencyList->Add(gHistESDIdYPtProtons);
1510 //ESD reconstructed tracks that were identified as protons for the PID contamination
1511 TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
1513 fNBinsY,fMinY,fMaxY,
1514 fNBinsPt,fMinPt,fMaxPt);
1515 if(fAnalysisEtaMode)
1516 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1518 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
1519 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1520 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1521 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1523 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1524 TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
1526 fNBinsY,fMinY,fMaxY,
1527 fNBinsPt,fMinPt,fMaxPt);
1528 if(fAnalysisEtaMode)
1529 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1531 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
1532 gHistESDContamYPtProtons->SetStats(kTRUE);
1533 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1534 fEfficiencyList->Add(gHistESDContamYPtProtons);
1537 //____________________________________________________________________//
1538 void AliProtonQAAnalysis::InitCutLists() {
1539 //Initialization of the cut lists
1540 //Adding each monitored object in each list
1543 fAcceptedCutList = new TList();
1544 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1545 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1546 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1547 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1548 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1549 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1550 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1551 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1553 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1554 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1555 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1556 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1557 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1558 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1559 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1560 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1562 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1563 ";x^{2}/N_{clusters} (ITS);Entries",
1565 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1566 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1567 ";x^{2}/N_{clusters} (ITS);Entries",
1569 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1570 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1571 ";x^{2}/N_{clusters} (ITS);Entries",
1573 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1574 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1575 ";x^{2}/N_{clusters} (ITS);Entries",
1577 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1579 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1580 ";Log_{10}(#chi^{2});Entries",
1582 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1583 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1584 ";Log_{10}(#chi^{2});Entries",
1586 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1587 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1588 ";Log_{10}(#chi^{2});Entries",
1590 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1591 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1592 ";Log_{10}(#chi^{2});Entries",
1594 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1596 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1597 ";N_{clusters} (TPC);Entries",
1599 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1600 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1601 ";N_{clusters} (TPC);Entries",
1603 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1604 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1605 ";N_{clusters} (TPC);Entries",
1607 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1608 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1609 ";N_{clusters} (TPC);Entries",
1611 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1613 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1614 ";x^{2}/N_{clusters} (TPC);Entries",
1616 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1617 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1618 ";x^{2}/N_{clusters} (TPC);Entries",
1620 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1621 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1622 ";x^{2}/N_{clusters} (TPC);Entries",
1624 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1625 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1626 ";x^{2}/N_{clusters} (TPC);Entries",
1628 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1630 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1631 ";#sigma_{y} [cm];Entries",
1633 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1634 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1635 ";#sigma_{y} [cm];Entries",
1637 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1638 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1639 ";#sigma_{y} [cm];Entries",
1641 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1642 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1643 ";#sigma_{y} [cm];Entries",
1645 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1648 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1649 ";#sigma_{z} [cm];Entries",
1651 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1652 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1653 ";#sigma_{z} [cm];Entries",
1655 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1656 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1657 ";#sigma_{z} [cm];Entries",
1659 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1660 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1661 ";#sigma_{z} [cm];Entries",
1663 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1666 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1667 ";#sigma_{sin(#phi)};Entries",
1669 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1670 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1671 ";#sigma_{sin(#phi)};Entries",
1673 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1674 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1675 ";#sigma_{sin(#phi)};Entries",
1677 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1678 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1679 ";#sigma_{sin(#phi)};Entries",
1681 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1684 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1685 ";#sigma_{tan(#lambda)};Entries",
1687 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1688 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1689 ";#sigma_{tan(#lambda)};Entries",
1691 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1692 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1693 ";#sigma_{tan(#lambda)};Entries",
1695 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1696 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1697 ";#sigma_{tan(#lambda)};Entries",
1699 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1702 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1703 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1705 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1706 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1707 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1709 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1710 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1711 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1713 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1714 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1715 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1717 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1720 fAcceptedDCAList = new TList();
1721 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1722 ";DCA_{xy} [cm];Entries",
1724 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1725 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1726 ";DCA_{xy} [cm];Entries",
1728 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1729 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1730 ";DCA_{xy} [cm];Entries",
1732 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1733 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1734 ";DCA_{xy} [cm];Entries",
1737 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1738 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1739 ";DCA_{z} [cm];Entries",
1741 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1742 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1743 ";DCA_{z} [cm];Entries",
1745 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1746 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1747 ";DCA_{z} [cm];Entries",
1749 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1750 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1751 ";DCA_{z} [cm];Entries",
1753 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1755 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1756 ";#sigma_{Vertex};Entries",
1758 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1759 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1760 ";#sigma_{Vertex};Entries",
1762 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1763 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1764 ";#sigma_{Vertex};Entries",
1766 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1767 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1768 ";#sigma_{Vertex};Entries",
1770 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1774 //____________________________________________________________________//
1775 void AliProtonQAAnalysis::InitVertexQA() {
1776 //Initializes the Vertex QA histograms
1777 fQAVertexList = new TList();
1778 fQAVertexList->SetName("fQAVertexList");
1780 //MC primary multiplicity (vertex efficiency calculation)
1781 TH1I *gHistMCPrimaryMultiplicity = new TH1I("gHistMCPrimaryMultiplicity",
1782 ";N_{prim. gen.};Entries",
1784 fQAVertexList->Add(gHistMCPrimaryMultiplicity);
1787 TH1I *gHistMCPrimaryMultiplicityTPC = new TH1I("gHistMCPrimaryMultiplicityTPC",
1788 ";N_{prim. gen.};Entries",
1790 fQAVertexList->Add(gHistMCPrimaryMultiplicityTPC);
1791 TH2F *gHistTPCESDVx = new TH2F("gHistTPCESDVx",
1792 "Primary vertex TPC;V_{x} [cm];N_{contributors}",
1793 100,-10.,10.,100,0,100);
1794 fQAVertexList->Add(gHistTPCESDVx);
1795 TH2F *gHistTPCESDVy = new TH2F("gHistTPCESDVy",
1796 "Primary vertex TPC;V_{y} [cm];N_{contributors}",
1797 100,-10.,10.,100,0,100);
1798 fQAVertexList->Add(gHistTPCESDVy);
1799 TH2F *gHistTPCESDVz = new TH2F("gHistTPCESDVz",
1800 "Primary vertex TPC;V_{z} [cm];N_{contributors}",
1801 100,-20.,20.,100,0,100);
1802 fQAVertexList->Add(gHistTPCESDVz);
1803 TH1F *gHistTPCDiffVx = new TH1F("gHistTPCDiffVx",
1804 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1805 100,-10000.,10000.);
1806 fQAVertexList->Add(gHistTPCDiffVx);
1807 TH1F *gHistTPCDiffVy = new TH1F("gHistTPCDiffVy",
1808 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1809 100,-10000.,10000.);
1810 fQAVertexList->Add(gHistTPCDiffVy);
1811 TH1F *gHistTPCDiffVz = new TH1F("gHistTPCDiffVz",
1812 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1813 100,-10000.,10000.);
1814 fQAVertexList->Add(gHistTPCDiffVz);
1815 TH1F *gHistTPCResolutionVx = new TH1F("gHistTPCResolutionVx",
1816 ";#sigma_{x} [#mu m];Entries",
1818 fQAVertexList->Add(gHistTPCResolutionVx);
1819 TH1F *gHistTPCResolutionVy = new TH1F("gHistTPCResolutionVy",
1820 ";#sigma_{y} [#mu m];Entries",
1822 fQAVertexList->Add(gHistTPCResolutionVy);
1823 TH1F *gHistTPCResolutionVz = new TH1F("gHistTPCResolutionVz",
1824 ";#sigma_{z} [#mu m];Entries",
1826 fQAVertexList->Add(gHistTPCResolutionVz);
1829 TH1I *gHistMCPrimaryMultiplicitySPD = new TH1I("gHistMCPrimaryMultiplicitySPD",
1830 ";N_{prim. gen.};Entries",
1832 fQAVertexList->Add(gHistMCPrimaryMultiplicitySPD);
1833 TH2F *gHistSPDESDVx = new TH2F("gHistSPDESDVx",
1834 "Primary vertex SPD;V_{x} [cm];N_{contributors}",
1835 100,-10.,10.,100,0,100);
1836 fQAVertexList->Add(gHistSPDESDVx);
1837 TH2F *gHistSPDESDVy = new TH2F("gHistSPDESDVy",
1838 "Primary vertex SPD;V_{y} [cm];N_{contributors}",
1839 100,-10.,10.,100,0,100);
1840 fQAVertexList->Add(gHistSPDESDVy);
1841 TH2F *gHistSPDESDVz = new TH2F("gHistSPDESDVz",
1842 "Primary vertex SPD;V_{z} [cm];N_{contributors}",
1843 100,-20.,20.,100,0,100);
1844 fQAVertexList->Add(gHistSPDESDVz);
1845 TH1F *gHistSPDDiffVx = new TH1F("gHistSPDDiffVx",
1846 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1847 100,-10000.,10000.);
1848 fQAVertexList->Add(gHistSPDDiffVx);
1849 TH1F *gHistSPDDiffVy = new TH1F("gHistSPDDiffVy",
1850 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1851 100,-10000.,10000.);
1852 fQAVertexList->Add(gHistSPDDiffVy);
1853 TH1F *gHistSPDDiffVz = new TH1F("gHistSPDDiffVz",
1854 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1855 100,-10000.,10000.);
1856 fQAVertexList->Add(gHistSPDDiffVz);
1857 TH1F *gHistSPDResolutionVx = new TH1F("gHistSPDResolutionVx",
1858 ";#sigma_{x} [#mu m];Entries",
1860 fQAVertexList->Add(gHistSPDResolutionVx);
1861 TH1F *gHistSPDResolutionVy = new TH1F("gHistSPDResolutionVy",
1862 ";#sigma_{y} [#mu m];Entries",
1864 fQAVertexList->Add(gHistSPDResolutionVy);
1865 TH1F *gHistSPDResolutionVz = new TH1F("gHistSPDResolutionVz",
1866 ";#sigma_{z} [#mu m];Entries",
1868 fQAVertexList->Add(gHistSPDResolutionVz);
1871 TH1I *gHistMCPrimaryMultiplicityTracks = new TH1I("gHistMCPrimaryMultiplicityTracks",
1872 ";N_{prim. gen.};Entries",
1874 fQAVertexList->Add(gHistMCPrimaryMultiplicityTracks);
1875 TH2F *gHistTracksESDVx = new TH2F("gHistTracksESDVx",
1876 "Primary vertex Tracks;V_{x} [cm];N_{contributors}",
1877 100,-10.,10.,100,0,100);
1878 fQAVertexList->Add(gHistTracksESDVx);
1879 TH2F *gHistTracksESDVy = new TH2F("gHistTracksESDVy",
1880 "Primary vertex Tracks;V_{y} [cm];N_{contributors}",
1881 100,-10.,10.,100,0,100);
1882 fQAVertexList->Add(gHistTracksESDVy);
1883 TH2F *gHistTracksESDVz = new TH2F("gHistTracksESDVz",
1884 "Primary vertex Tracks;V_{z} [cm];N_{contributors}",
1885 100,-20.,20.,100,0,100);
1886 fQAVertexList->Add(gHistTracksESDVz);
1887 TH1F *gHistTracksDiffVx = new TH1F("gHistTracksDiffVx",
1888 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1889 100,-10000.,10000.);
1890 fQAVertexList->Add(gHistTracksDiffVx);
1891 TH1F *gHistTracksDiffVy = new TH1F("gHistTracksDiffVy",
1892 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1893 100,-10000.,10000.);
1894 fQAVertexList->Add(gHistTracksDiffVy);
1895 TH1F *gHistTracksDiffVz = new TH1F("gHistTracksDiffVz",
1896 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1897 100,-10000.,10000.);
1898 fQAVertexList->Add(gHistTracksDiffVz);
1899 TH1F *gHistTracksResolutionVx = new TH1F("gHistTracksResolutionVx",
1900 ";#sigma_{x} [#mu m];Entries",
1902 fQAVertexList->Add(gHistTracksResolutionVx);
1903 TH1F *gHistTracksResolutionVy = new TH1F("gHistTracksResolutionVy",
1904 ";#sigma_{y} [#mu m];Entries",
1906 fQAVertexList->Add(gHistTracksResolutionVy);
1907 TH1F *gHistTracksResolutionVz = new TH1F("gHistTracksResolutionVz",
1908 ";#sigma_{z} [#mu m];Entries",
1910 fQAVertexList->Add(gHistTracksResolutionVz);
1913 //____________________________________________________________________//
1914 void AliProtonQAAnalysis::InitQA() {
1915 //Initializes the QA histograms
1916 //if(!fQAHistograms)
1920 //TDirectory *dir2D = gDirectory->mkdir("2D");
1921 //fGlobalQAList->Add(dir2D); dir2D->cd();
1922 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1924 fNBinsY,fMinY,fMaxY,
1925 fNBinsPt,fMinPt,fMaxPt);
1926 if(fAnalysisEtaMode)
1927 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("#eta");
1929 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("y");
1930 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1931 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1932 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
1933 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1935 fNBinsY,fMinY,fMaxY,
1936 fNBinsPt,fMinPt,fMaxPt);
1937 if(fAnalysisEtaMode)
1938 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("#eta");
1940 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("y");
1941 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1942 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1943 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
1945 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1947 fNBinsY,fMinY,fMaxY,
1948 fNBinsPt,fMinPt,fMaxPt);
1949 if(fAnalysisEtaMode)
1950 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("#eta");
1952 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("y");
1953 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1954 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1955 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
1956 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1958 fNBinsY,fMinY,fMaxY,
1959 fNBinsPt,fMinPt,fMaxPt);
1960 if(fAnalysisEtaMode)
1961 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("#eta");
1963 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("y");
1964 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1965 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1966 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
1968 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1970 fNBinsY,fMinY,fMaxY,
1971 fNBinsPt,fMinPt,fMaxPt);
1972 if(fAnalysisEtaMode)
1973 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
1975 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("y");
1976 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1977 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1978 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
1979 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1981 fNBinsY,fMinY,fMaxY,
1982 fNBinsPt,fMinPt,fMaxPt);
1983 if(fAnalysisEtaMode)
1984 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
1986 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("y");
1987 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1988 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1989 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
1991 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1993 fNBinsY,fMinY,fMaxY,
1994 fNBinsPt,fMinPt,fMaxPt);
1995 if(fAnalysisEtaMode)
1996 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
1998 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("y");
1999 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
2000 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2001 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
2002 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
2004 fNBinsY,fMinY,fMaxY,
2005 fNBinsPt,fMinPt,fMaxPt);
2006 if(fAnalysisEtaMode)
2007 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2009 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2010 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
2011 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2012 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
2014 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
2016 fNBinsY,fMinY,fMaxY,
2017 fNBinsPt,fMinPt,fMaxPt);
2018 if(fAnalysisEtaMode)
2019 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("#eta");
2021 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("y");
2022 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
2023 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
2024 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
2025 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
2027 fNBinsY,fMinY,fMaxY,
2028 fNBinsPt,fMinPt,fMaxPt);
2029 if(fAnalysisEtaMode)
2030 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("#eta");
2032 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("y");
2033 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
2034 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
2035 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
2037 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
2038 ";;P_{T} [GeV/c];PDG",
2039 fNBinsY,fMinY,fMaxY,
2040 fNBinsPt,fMinPt,fMaxPt,
2042 if(fAnalysisEtaMode)
2043 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("#eta");
2045 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("y");
2046 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
2047 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
2048 ";;P_{T} [GeV/c];PDG",
2049 fNBinsY,fMinY,fMaxY,
2050 fNBinsPt,fMinPt,fMaxPt,
2052 if(fAnalysisEtaMode)
2053 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2055 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("y");
2056 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
2059 TH2D *gHistEtaPhiPrimaryProtonsPass = new TH2D("gHistEtaPhiPrimaryProtonsPass",
2060 ";#eta;#phi [deg.]",
2061 fNBinsY,fMinY,fMaxY,
2063 gHistEtaPhiPrimaryProtonsPass->SetStats(kTRUE);
2064 gHistEtaPhiPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
2065 fQA2DList->Add(gHistEtaPhiPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
2066 TH2D *gHistEtaPhiPrimaryProtonsReject = new TH2D("gHistEtaPhiPrimaryProtonsReject",
2067 ";#eta;#phi [deg.]",
2068 fNBinsY,fMinY,fMaxY,
2070 gHistEtaPhiPrimaryProtonsReject->SetStats(kTRUE);
2071 gHistEtaPhiPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
2072 fQA2DList->Add(gHistEtaPhiPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
2073 TH2D *gHistEtaPhiSecondaryProtonsPass = new TH2D("gHistEtaPhiSecondaryProtonsPass",
2074 ";#eta;#phi [deg.]",
2075 fNBinsY,fMinY,fMaxY,
2077 gHistEtaPhiSecondaryProtonsPass->SetStats(kTRUE);
2078 gHistEtaPhiSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
2079 fQA2DList->Add(gHistEtaPhiSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
2080 TH2D *gHistEtaPhiSecondaryProtonsReject = new TH2D("gHistEtaPhiSecondaryProtonsReject",
2081 ";#eta;#phi [deg.]",
2082 fNBinsY,fMinY,fMaxY,
2084 gHistEtaPhiSecondaryProtonsReject->SetStats(kTRUE);
2085 gHistEtaPhiSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
2086 fQA2DList->Add(gHistEtaPhiSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
2088 TH2D *gHistEtaPhiPrimaryAntiProtonsPass = new TH2D("gHistEtaPhiPrimaryAntiProtonsPass",
2089 ";#eta;#phi [deg.]",
2090 fNBinsY,fMinY,fMaxY,
2092 gHistEtaPhiPrimaryAntiProtonsPass->SetStats(kTRUE);
2093 gHistEtaPhiPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2094 fQA2DList->Add(gHistEtaPhiPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
2095 TH2D *gHistEtaPhiPrimaryAntiProtonsReject = new TH2D("gHistEtaPhiPrimaryAntiProtonsReject",
2096 ";#eta;#phi [deg.]",
2097 fNBinsY,fMinY,fMaxY,
2099 gHistEtaPhiPrimaryAntiProtonsReject->SetStats(kTRUE);
2100 gHistEtaPhiPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2101 fQA2DList->Add(gHistEtaPhiPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
2102 TH2D *gHistEtaPhiSecondaryAntiProtonsPass = new TH2D("gHistEtaPhiSecondaryAntiProtonsPass",
2103 ";#eta;#phi [deg.]",
2104 fNBinsY,fMinY,fMaxY,
2106 gHistEtaPhiSecondaryAntiProtonsPass->SetStats(kTRUE);
2107 gHistEtaPhiSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2108 fQA2DList->Add(gHistEtaPhiSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
2109 TH2D *gHistEtaPhiSecondaryAntiProtonsReject = new TH2D("gHistEtaPhiSecondaryAntiProtonsReject",
2110 ";#eta;#phi [deg.]",
2111 fNBinsY,fMinY,fMaxY,
2113 gHistEtaPhiSecondaryAntiProtonsReject->SetStats(kTRUE);
2114 gHistEtaPhiSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2115 fQA2DList->Add(gHistEtaPhiSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
2117 /*gDirectory->cd("../");
2119 TDirectory *dirProtons = gDirectory->mkdir("Protons");
2120 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
2122 //________________________________________________________________//
2123 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
2124 dirProtonsPrimary->cd();
2125 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2126 dirProtonsPrimaryAccepted->cd();*/
2128 //Accepted primary protons
2129 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
2130 ";N_{clusters} (ITS);Entries",
2132 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
2133 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
2134 ";x^{2}/N_{clusters} (ITS);Entries",
2136 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
2137 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
2138 ";N_{clusters} (TPC);Entries",
2140 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
2141 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
2142 ";x^{2}/N_{clusters} (TPC);Entries",
2144 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
2145 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
2146 ";#sigma_{y} [cm];Entries",
2148 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
2149 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
2150 ";#sigma_{z} [cm];Entries",
2152 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
2153 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
2154 ";#sigma_{sin(#phi)};Entries",
2156 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
2157 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
2158 ";#sigma_{tan(#lambda)};Entries",
2160 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
2161 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
2162 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2164 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
2165 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
2166 ";#sigma_{Vertex};Entries",
2168 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
2169 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
2170 ";#sigma_{Vertex};Entries",
2172 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
2173 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
2174 ";DCA_{xy} [cm];Entries",
2176 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
2177 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
2178 ";DCA_{xy} [cm];Entries",
2180 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
2181 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
2182 ";DCA_{z} [cm];Entries",
2184 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
2185 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
2186 ";DCA_{z} [cm];Entries",
2188 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
2189 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
2190 ";Log_{10}(#chi^{2});Entries",
2192 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
2193 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
2195 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
2196 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
2198 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
2199 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
2201 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
2202 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
2204 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2205 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
2207 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2208 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
2210 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2211 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
2213 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2214 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
2216 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2217 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
2219 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2220 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
2222 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
2224 //Rejected primary protons
2225 /*gDirectory->cd("../");
2226 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2227 dirProtonsPrimaryRejected->cd();*/
2229 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
2230 ";N_{clusters} (ITS);Entries",
2232 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2233 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
2234 ";x^{2}/N_{clusters} (ITS);Entries",
2236 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2237 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
2238 ";N_{clusters} (TPC);Entries",
2240 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2241 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
2242 ";x^{2}/N_{clusters} (TPC);Entries",
2244 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2245 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
2246 ";#sigma_{y} [cm];Entries",
2248 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2249 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
2250 ";#sigma_{z} [cm];Entries",
2252 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2253 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
2254 ";#sigma_{sin(#phi)};Entries",
2256 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2257 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
2258 ";#sigma_{tan(#lambda)};Entries",
2260 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2261 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2262 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2264 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2265 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2266 ";#sigma_{Vertex};Entries",
2268 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2269 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2270 ";#sigma_{Vertex};Entries",
2272 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2273 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2274 ";DCA_{xy} [cm];Entries",
2276 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2277 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2278 ";DCA_{xy} [cm];Entries",
2280 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2281 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2282 ";DCA_{z} [cm];Entries",
2284 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2285 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2286 ";DCA_{z} [cm];Entries",
2288 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2289 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2290 ";Log_{10}(#chi^{2});Entries",
2292 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2293 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2295 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2296 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2298 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2299 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2301 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2302 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2304 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2305 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2307 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2308 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2310 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2311 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2313 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2314 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2316 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2317 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2319 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2320 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2322 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2324 //________________________________________________________________//
2325 /*gDirectory->cd("../../");
2327 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2328 dirProtonsSecondary->cd();
2329 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2330 dirProtonsSecondaryAccepted->cd();*/
2332 //Accepted secondary protons
2333 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2334 ";N_{clusters} (ITS);Entries",
2336 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2337 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2338 ";x^{2}/N_{clusters} (ITS);Entries",
2340 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2341 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2342 ";N_{clusters} (TPC);Entries",
2344 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2345 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2346 ";x^{2}/N_{clusters} (TPC);Entries",
2348 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2349 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2350 ";#sigma_{y} [cm];Entries",
2352 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2353 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2354 ";#sigma_{z} [cm];Entries",
2356 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2357 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2358 ";#sigma_{sin(#phi)};Entries",
2360 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2361 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2362 ";#sigma_{tan(#lambda)};Entries",
2364 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2365 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2366 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2368 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2369 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2370 ";#sigma_{Vertex};Entries",
2372 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2373 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2374 ";#sigma_{Vertex};Entries",
2376 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2377 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2378 ";DCA_{xy} [cm];Entries",
2380 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2381 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2382 ";DCA_{xy} [cm];Entries",
2384 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2385 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2386 ";DCA_{z} [cm];Entries",
2388 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2389 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2390 ";DCA_{z} [cm];Entries",
2392 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2393 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2394 ";Log_{10}(#chi^{2});Entries",
2396 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2397 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2399 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2400 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2402 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2403 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2405 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2406 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2408 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2409 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2411 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2412 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2414 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2415 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2417 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2418 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2420 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2421 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2423 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2424 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2426 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2428 //Rejected secondary protons
2429 /*gDirectory->cd("../");
2430 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2431 dirProtonsSecondaryRejected->cd();*/
2433 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2434 ";N_{clusters} (ITS);Entries",
2436 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2437 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2438 ";x^{2}/N_{clusters} (ITS);Entries",
2440 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2441 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2442 ";N_{clusters} (TPC);Entries",
2444 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2445 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2446 ";x^{2}/N_{clusters} (TPC);Entries",
2448 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2449 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2450 ";#sigma_{y} [cm];Entries",
2452 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2453 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2454 ";#sigma_{z} [cm];Entries",
2456 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2457 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2458 ";#sigma_{sin(#phi)};Entries",
2460 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2461 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2462 ";#sigma_{tan(#lambda)};Entries",
2464 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2465 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2466 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2468 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2469 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2470 ";#sigma_{Vertex};Entries",
2472 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2473 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2474 ";#sigma_{Vertex};Entries",
2476 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2477 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2478 ";DCA_{xy} [cm];Entries",
2480 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2481 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2482 ";DCA_{xy} [cm];Entries",
2484 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2485 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2486 ";DCA_{z} [cm];Entries",
2488 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2489 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2490 ";DCA_{z} [cm];Entries",
2492 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2493 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2494 ";Log_{10}(#chi^{2});Entries",
2496 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2497 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2499 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2500 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2502 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2503 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2505 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2506 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2508 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2509 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2511 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2512 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2514 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2515 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2517 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2518 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2520 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2521 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2523 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2524 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2526 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2529 /*gDirectory->cd("../../../");
2532 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2533 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2535 //________________________________________________________________//
2536 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2537 dirAntiProtonsPrimary->cd();
2538 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2539 dirAntiProtonsPrimaryAccepted->cd();*/
2541 //Accepted primary antiprotons
2542 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2543 ";N_{clusters} (ITS);Entries",
2545 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2546 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2547 ";x^{2}/N_{clusters} (ITS);Entries",
2549 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2550 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2551 ";N_{clusters} (TPC);Entries",
2553 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2554 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2555 ";x^{2}/N_{clusters} (TPC);Entries",
2557 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2558 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2559 ";#sigma_{y} [cm];Entries",
2561 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2562 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2563 ";#sigma_{z} [cm];Entries",
2565 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2566 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2567 ";#sigma_{sin(#phi)};Entries",
2569 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2570 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2571 ";#sigma_{tan(#lambda)};Entries",
2573 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2574 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2575 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2577 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2578 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2579 ";#sigma_{Vertex};Entries",
2581 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2582 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2583 ";#sigma_{Vertex};Entries",
2585 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2586 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2587 ";DCA_{xy} [cm];Entries",
2589 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2590 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2591 ";DCA_{xy} [cm];Entries",
2593 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2594 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2595 ";DCA_{z} [cm];Entries",
2597 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2598 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2599 ";DCA_{z} [cm];Entries",
2601 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2602 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2603 ";Log_{10}(#chi^{2});Entries",
2605 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2606 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2608 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2609 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2611 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2612 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2614 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2615 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2617 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2618 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2620 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2621 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2623 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2624 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2626 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2627 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2629 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2630 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2632 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2633 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2635 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2637 //Rejected primary antiprotons
2638 /*gDirectory->cd("../");
2639 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2640 dirAntiProtonsPrimaryRejected->cd();*/
2642 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2643 ";N_{clusters} (ITS);Entries",
2645 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2646 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2647 ";x^{2}/N_{clusters} (ITS);Entries",
2649 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2650 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2651 ";N_{clusters} (TPC);Entries",
2653 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2654 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2655 ";x^{2}/N_{clusters} (TPC);Entries",
2657 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2658 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2659 ";#sigma_{y} [cm];Entries",
2661 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2662 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2663 ";#sigma_{z} [cm];Entries",
2665 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2666 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2667 ";#sigma_{sin(#phi)};Entries",
2669 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2670 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2671 ";#sigma_{tan(#lambda)};Entries",
2673 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2674 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2675 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2677 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2678 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2679 ";#sigma_{Vertex};Entries",
2681 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2682 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2683 ";#sigma_{Vertex};Entries",
2685 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2686 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2687 ";DCA_{xy} [cm];Entries",
2689 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2690 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2691 ";DCA_{xy} [cm];Entries",
2693 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2694 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2695 ";DCA_{z} [cm];Entries",
2697 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2698 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2699 ";DCA_{z} [cm];Entries",
2701 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2702 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2703 ";Log_{10}(#chi^{2});Entries",
2705 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2706 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2708 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2709 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2711 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2712 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2714 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2715 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2717 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2718 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2720 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2721 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2723 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2724 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2726 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2727 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2729 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2730 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2732 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2733 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2735 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2737 //________________________________________________________________//
2738 /*gDirectory->cd("../../");
2740 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2741 dirAntiProtonsSecondary->cd();
2742 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2743 dirAntiProtonsSecondaryAccepted->cd();*/
2745 //Accepted secondary antiprotons
2746 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2747 ";N_{clusters} (ITS);Entries",
2749 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2750 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2751 ";x^{2}/N_{clusters} (ITS);Entries",
2753 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2754 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2755 ";N_{clusters} (TPC);Entries",
2757 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2758 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2759 ";x^{2}/N_{clusters} (TPC);Entries",
2761 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2762 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2763 ";#sigma_{y} [cm];Entries",
2765 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2766 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2767 ";#sigma_{z} [cm];Entries",
2769 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2770 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2771 ";#sigma_{sin(#phi)};Entries",
2773 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2774 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2775 ";#sigma_{tan(#lambda)};Entries",
2777 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2778 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2779 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2781 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2782 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2783 ";#sigma_{Vertex};Entries",
2785 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2786 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2787 ";#sigma_{Vertex};Entries",
2789 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2790 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2791 ";DCA_{xy} [cm];Entries",
2793 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2794 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2795 ";DCA_{xy} [cm];Entries",
2797 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2798 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2799 ";DCA_{z} [cm];Entries",
2801 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2802 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2803 ";DCA_{z} [cm];Entries",
2805 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2806 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2807 ";Log_{10}(#chi^{2});Entries",
2809 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2810 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2812 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2813 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2815 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2816 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2818 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2819 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2821 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2822 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2824 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2825 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2827 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2828 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2830 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2831 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2833 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2834 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2836 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2837 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2839 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2841 //Rejected secondary antiprotons
2842 /*gDirectory->cd("../");
2843 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2844 dirAntiProtonsSecondaryRejected->cd();*/
2846 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2847 ";N_{clusters} (ITS);Entries",
2849 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2850 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2851 ";x^{2}/N_{clusters} (ITS);Entries",
2853 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2854 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2855 ";N_{clusters} (TPC);Entries",
2857 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2858 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2859 ";x^{2}/N_{clusters} (TPC);Entries",
2861 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2862 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2863 ";#sigma_{y} [cm];Entries",
2865 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2866 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2867 ";#sigma_{z} [cm];Entries",
2869 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2870 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2871 ";#sigma_{sin(#phi)};Entries",
2873 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2874 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2875 ";#sigma_{tan(#lambda)};Entries",
2877 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2878 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2879 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2881 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2882 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2883 ";#sigma_{Vertex};Entries",
2885 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2886 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2887 ";#sigma_{Vertex};Entries",
2889 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2890 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2891 ";DCA_{xy} [cm];Entries",
2893 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2894 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2895 ";DCA_{xy} [cm];Entries",
2897 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2898 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2899 ";DCA_{z} [cm];Entries",
2901 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2902 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2903 ";DCA_{z} [cm];Entries",
2905 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2906 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2907 ";Log_{10}(#chi^{2});Entries",
2909 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2910 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2912 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2913 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2915 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2916 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2918 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2919 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2921 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2922 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2924 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2925 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2927 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2928 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2930 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2931 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2933 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2934 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2936 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2937 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2939 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2942 //____________________________________________________________________//
2943 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2945 const AliESDVertex *vertex) {
2946 //Runs the efficiency code
2948 Int_t nMCProtons = 0, nESDProtons = 0;
2949 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2950 TParticle *particle = stack->Particle(iParticle);
2951 if(!particle) continue;
2953 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2954 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2955 if(fAnalysisEtaMode) {
2956 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2959 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2961 Int_t pdgcode = particle->GetPdgCode();
2962 if(TMath::Abs(pdgcode) != 2212) continue;
2964 if(iParticle <= stack->GetNprimary()) {
2965 if(pdgcode == 2212) {
2967 if(fAnalysisEtaMode)
2968 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2971 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2976 if(pdgcode == -2212) {
2977 if(fAnalysisEtaMode)
2978 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2981 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2989 Int_t lPartMother = -1;
2990 Int_t motherPDGCode = -1;
2991 lPartMother = particle->GetFirstMother();
2992 TParticle *motherParticle = stack->Particle(lPartMother);
2993 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2995 if(pdgcode == 2212) {
2996 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2997 if(fAnalysisEtaMode)
2998 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3001 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
3006 if((particle->GetUniqueID() == 13)) {
3007 if(fAnalysisEtaMode)
3008 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3011 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
3015 }//hadronic interactions
3017 if(pdgcode == -2212) {
3018 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3019 if(fAnalysisEtaMode)
3020 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3023 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
3028 if((particle->GetUniqueID() == 13)) {
3029 if(fAnalysisEtaMode)
3030 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3033 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
3037 }//hadronic interactions
3044 Int_t nGoodTracks = esd->GetNumberOfTracks();
3045 TArrayI labelArray(nGoodTracks);
3046 Int_t labelCounter = 0;
3047 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3048 AliESDtrack* track = esd->GetTrack(iTracks);
3049 if(!track) continue;
3051 Int_t label = TMath::Abs(track->GetLabel());
3052 if(IsLabelUsed(labelArray,label)) continue;
3053 labelArray.AddAt(label,labelCounter);
3056 TParticle *particle = stack->Particle(label);
3057 if(!particle) continue;
3058 Int_t pdgcode = particle->GetPdgCode();
3059 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3061 Double_t Pt = 0.0, P = 0.0;
3062 Double_t probability[5];
3066 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3067 if(!tpcTrack) continue;
3068 Pt = tpcTrack->Pt();
3071 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3072 if(fAnalysisEtaMode) {
3073 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3076 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3078 if(fUseCutsInEfficiency)
3079 if(!IsAccepted(esd,vertex,track)) continue;
3081 //reconstructed primary (anti)protons
3082 if(pdgcode == 2212) {
3083 if(fAnalysisEtaMode)
3084 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3087 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3091 if(label <= stack->GetNprimary()) {
3093 if(fAnalysisEtaMode)
3094 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3097 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3102 if(label > stack->GetNprimary()) {
3103 Int_t lPartMother = -1;
3104 Int_t motherPDGCode = -1;
3105 lPartMother = particle->GetFirstMother();
3106 TParticle *motherParticle = stack->Particle(lPartMother);
3107 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3109 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3110 if(fAnalysisEtaMode)
3111 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3114 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3119 if((particle->GetUniqueID() == 13)) {
3120 if(fAnalysisEtaMode)
3121 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3124 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3128 }//hadronic interactions
3131 if(pdgcode == -2212) {
3132 if(fAnalysisEtaMode)
3133 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3136 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3140 if(label <= stack->GetNprimary()) {
3141 if(fAnalysisEtaMode)
3142 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3145 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3150 if(label > stack->GetNprimary()) {
3151 Int_t lPartMother = -1;
3152 Int_t motherPDGCode = -1;
3153 lPartMother = particle->GetFirstMother();
3154 TParticle *motherParticle = stack->Particle(lPartMother);
3155 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3157 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3158 if(fAnalysisEtaMode)
3159 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3162 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3167 if((particle->GetUniqueID() == 13)) {
3168 if(fAnalysisEtaMode)
3169 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3172 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3176 }//hadronic interactions
3178 }//initial antiprotons
3181 track->GetTPCpid(probability);
3183 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3184 rcc += probability[i]*GetParticleFraction(i,P);
3185 if(rcc == 0.0) continue;
3187 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3188 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3189 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3190 if(fParticleType == 4) {
3191 if(fAnalysisEtaMode)
3192 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3195 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3199 if(TMath::Abs(pdgcode) == 2212) {
3200 if(fAnalysisEtaMode)
3201 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3204 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3208 }//properly identified as proton
3210 if(fAnalysisEtaMode)
3211 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3214 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3219 }//identified as proton
3221 else if(!fUseTPCOnly) {
3222 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3223 if(fAnalysisEtaMode) {
3224 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3227 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3230 if(fUseCutsInEfficiency)
3231 if(!IsAccepted(esd,vertex,track)) continue;
3233 //reconstructed primary (anti)protons
3234 if(pdgcode == 2212) {
3235 if(fAnalysisEtaMode)
3236 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3239 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3243 if(label <= stack->GetNprimary()) {
3245 if(fAnalysisEtaMode)
3246 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3249 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3254 if(label > stack->GetNprimary()) {
3255 Int_t lPartMother = -1;
3256 Int_t motherPDGCode = -1;
3257 lPartMother = particle->GetFirstMother();
3258 TParticle *motherParticle = stack->Particle(lPartMother);
3259 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3261 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3262 if(fAnalysisEtaMode)
3263 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3266 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3271 if((particle->GetUniqueID() == 13)) {
3272 if(fAnalysisEtaMode)
3273 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3276 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3280 }//hadronic interactions
3283 if(pdgcode == -2212) {
3284 if(fAnalysisEtaMode)
3285 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3288 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3292 if(label <= stack->GetNprimary()) {
3293 if(fAnalysisEtaMode)
3294 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3297 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3302 if(label > stack->GetNprimary()) {
3303 Int_t lPartMother = -1;
3304 Int_t motherPDGCode = -1;
3305 lPartMother = particle->GetFirstMother();
3306 TParticle *motherParticle = stack->Particle(lPartMother);
3307 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3309 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3310 if(fAnalysisEtaMode)
3311 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3314 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3319 if((particle->GetUniqueID() == 13)) {
3320 if(fAnalysisEtaMode)
3321 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3324 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3328 }//hadronic interactions
3330 }//initial antiprotons
3333 track->GetESDpid(probability);
3335 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3336 rcc += probability[i]*GetParticleFraction(i,P);
3337 if(rcc == 0.0) continue;
3339 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3340 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3341 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3342 if(fParticleType == 4) {
3343 if(fAnalysisEtaMode)
3344 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3346 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3350 if(TMath::Abs(pdgcode) == 2212) {
3351 if(fAnalysisEtaMode)
3352 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3355 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3359 }//properly identified as proton
3361 if(fAnalysisEtaMode)
3362 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3365 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3370 }//identified as proton
3374 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3377 //____________________________________________________________________//
3378 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3380 //Checks if the label is used already
3381 Bool_t status = kFALSE;
3382 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3383 if(labelArray.At(i) == label)
3390 //____________________________________________________________________//
3391 void AliProtonQAAnalysis::RunVertexQA(AliGenEventHeader *header,
3394 //Runs the vertex QA
3396 TArrayF primaryVertex(3);
3397 header->PrimaryVertex(primaryVertex);
3399 Int_t nPrimaries = stack->GetNprimary();
3400 ((TH1I *)(fQAVertexList->At(0)))->Fill(nPrimaries);
3403 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
3405 Printf("ERROR: Could not retrieve the TPC vertex");
3408 if(vertexTPC->GetNContributors() > 0) {
3409 ((TH1I *)(fQAVertexList->At(1)))->Fill(nPrimaries);
3410 ((TH2F *)(fQAVertexList->At(2)))->Fill(vertexTPC->GetXv(),
3411 vertexTPC->GetNContributors());
3412 ((TH2F *)(fQAVertexList->At(3)))->Fill(vertexTPC->GetYv(),
3413 vertexTPC->GetNContributors());
3414 ((TH2F *)(fQAVertexList->At(4)))->Fill(vertexTPC->GetZv(),
3415 vertexTPC->GetNContributors());
3416 ((TH1F *)(fQAVertexList->At(5)))->Fill((vertexTPC->GetXv()-primaryVertex[0])*10000.);
3417 ((TH1F *)(fQAVertexList->At(6)))->Fill((vertexTPC->GetYv()-primaryVertex[1])*10000.);
3418 ((TH1F *)(fQAVertexList->At(7)))->Fill((vertexTPC->GetZv()-primaryVertex[2])*10000.);
3419 ((TH1F *)(fQAVertexList->At(8)))->Fill(vertexTPC->GetXRes()*10000.);
3420 ((TH1F *)(fQAVertexList->At(9)))->Fill(vertexTPC->GetYRes()*10000.);
3421 ((TH1F *)(fQAVertexList->At(10)))->Fill(vertexTPC->GetZRes()*10000.);
3425 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
3427 Printf("ERROR: Could not retrieve the SPD vertex");
3430 if(vertexSPD->GetNContributors() > 0) {
3431 ((TH1I *)(fQAVertexList->At(11)))->Fill(nPrimaries);
3432 ((TH2F *)(fQAVertexList->At(12)))->Fill(vertexSPD->GetXv(),
3433 vertexSPD->GetNContributors());
3434 ((TH2F *)(fQAVertexList->At(13)))->Fill(vertexSPD->GetYv(),
3435 vertexSPD->GetNContributors());
3436 ((TH2F *)(fQAVertexList->At(14)))->Fill(vertexSPD->GetZv(),
3437 vertexSPD->GetNContributors());
3438 ((TH1F *)(fQAVertexList->At(15)))->Fill((vertexSPD->GetXv()-primaryVertex[0])*10000.);
3439 ((TH1F *)(fQAVertexList->At(16)))->Fill((vertexSPD->GetYv()-primaryVertex[1])*10000.);
3440 ((TH1F *)(fQAVertexList->At(17)))->Fill((vertexSPD->GetZv()-primaryVertex[2])*10000.);
3441 ((TH1F *)(fQAVertexList->At(18)))->Fill(vertexSPD->GetXRes()*10000.);
3442 ((TH1F *)(fQAVertexList->At(19)))->Fill(vertexSPD->GetYRes()*10000.);
3443 ((TH1F *)(fQAVertexList->At(20)))->Fill(vertexSPD->GetZRes()*10000.);
3447 const AliESDVertex *vertexTracks = esd->GetPrimaryVertex();
3449 Printf("ERROR: Could not retrieve the Tracks vertex");
3452 if(vertexTracks->GetNContributors() > 0) {
3453 ((TH1I *)(fQAVertexList->At(21)))->Fill(nPrimaries);
3454 ((TH2F *)(fQAVertexList->At(22)))->Fill(vertexTracks->GetXv(),
3455 vertexTracks->GetNContributors());
3456 ((TH2F *)(fQAVertexList->At(23)))->Fill(vertexTracks->GetYv(),
3457 vertexTracks->GetNContributors());
3458 ((TH2F *)(fQAVertexList->At(24)))->Fill(vertexTracks->GetZv(),
3459 vertexTracks->GetNContributors());
3460 ((TH1F *)(fQAVertexList->At(25)))->Fill((vertexTracks->GetXv()-primaryVertex[0])*10000.);
3461 ((TH1F *)(fQAVertexList->At(26)))->Fill((vertexTracks->GetYv()-primaryVertex[1])*10000.);
3462 ((TH1F *)(fQAVertexList->At(27)))->Fill((vertexTracks->GetZv()-primaryVertex[2])*10000.);
3463 ((TH1F *)(fQAVertexList->At(28)))->Fill(vertexTracks->GetXRes()*10000.);
3464 ((TH1F *)(fQAVertexList->At(29)))->Fill(vertexTracks->GetYRes()*10000.);
3465 ((TH1F *)(fQAVertexList->At(30)))->Fill(vertexTracks->GetZRes()*10000.);
3470 //____________________________________________________________________//
3471 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3473 const AliESDVertex *vertex) {
3476 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3477 TParticle *particle = stack->Particle(iParticle);
3478 if(!particle) continue;
3480 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3481 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3482 if(fAnalysisEtaMode) {
3483 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3486 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3488 Int_t pdgcode = particle->GetPdgCode();
3489 if(pdgcode == 2212) {
3490 if(fAnalysisEtaMode)
3491 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
3494 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3499 if(pdgcode == -2212) {
3500 if(fAnalysisEtaMode)
3501 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
3504 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3512 Int_t nGoodTracks = esd->GetNumberOfTracks();
3513 TArrayI labelArray(nGoodTracks);
3514 Int_t labelCounter = 0;
3515 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3516 AliESDtrack* track = esd->GetTrack(iTracks);
3517 if(!track) continue;
3519 Int_t label = TMath::Abs(track->GetLabel());
3520 if(IsLabelUsed(labelArray,label)) continue;
3521 labelArray.AddAt(label,labelCounter);
3524 TParticle *particle = stack->Particle(label);
3525 if(!particle) continue;
3526 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3528 AliESDtrack trackTPC;
3530 //in case it's a TPC only track relate it to the proper vertex
3531 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3532 Float_t p[2],cov[3];
3533 track->GetImpactParametersTPC(p,cov);
3534 if (p[0]==0 && p[1]==0)
3535 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3536 if (!track->FillTPCOnlyTrack(trackTPC)) {
3542 Double_t Pt = 0.0, P = 0.0;
3543 Double_t probability[5];
3544 Float_t dcaXY = 0.0, dcaZ = 0.0;
3545 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3547 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3548 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3550 Float_t chi2PerClusterITS = -1;
3551 if (nClustersITS!=0)
3552 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3553 Float_t chi2PerClusterTPC = -1;
3554 if (nClustersTPC!=0)
3555 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3556 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3557 Double_t extCov[15];
3558 track->GetExternalCovariance(extCov);
3562 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3563 if(!tpcTrack) continue;
3564 Pt = tpcTrack->Pt();
3566 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3567 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3570 track->GetTPCpid(probability);
3572 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3573 rcc += probability[i]*GetParticleFraction(i,P);
3574 if(rcc == 0.0) continue;
3576 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3577 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3578 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3579 if(fParticleType == 4) {
3580 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3582 FillQA(stack,esd,vertex,track);
3583 if(IsAccepted(esd,vertex,track)) {
3584 if(label <= stack->GetNprimary()) {
3585 if(track->Charge() > 0) {
3586 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3587 if(track->HasPointOnITSLayer(iLayer))
3588 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3590 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3591 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3592 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3593 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3594 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3595 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3596 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3597 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3598 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3599 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3601 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3602 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3603 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3604 if(fAnalysisEtaMode)
3605 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),Pt);
3607 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3611 ((TH2D *)(fQA2DList->At(12)))->Fill(tpcTrack->Eta(),
3612 tpcTrack->Phi()*180./TMath::Pi());
3613 }//accepted primary protons
3614 else if(track->Charge() < 0) {
3615 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3616 if(track->HasPointOnITSLayer(iLayer))
3617 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3619 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3620 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3621 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3622 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3623 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3624 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3625 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3626 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3627 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3628 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3630 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3631 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3632 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3633 if(fAnalysisEtaMode)
3634 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),Pt);
3636 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3640 ((TH2D *)(fQA2DList->At(16)))->Fill(tpcTrack->Eta(),
3641 tpcTrack->Phi()*180./TMath::Pi());
3642 }//accepted primary antiprotons
3643 }//accepted primary particles
3644 else if(label > stack->GetNprimary()) {
3645 Int_t lPartMother = -1;
3646 Int_t motherPDGCode = -1;
3648 lPartMother = particle->GetFirstMother();
3649 TParticle *motherParticle = stack->Particle(lPartMother);
3650 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3653 if(fMCProcessIdFlag)
3654 if(particle->GetUniqueID() != fMCProcessId) continue;
3655 if(fMotherParticlePDGCodeFlag)
3656 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3658 if(track->Charge() > 0) {
3659 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3660 if(track->HasPointOnITSLayer(iLayer))
3661 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3663 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3664 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3665 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3666 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3667 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3668 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3669 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3670 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3671 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3672 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3674 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3675 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3676 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3677 if(fAnalysisEtaMode)
3678 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),Pt);
3680 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3684 ((TH2D *)(fQA2DList->At(14)))->Fill(tpcTrack->Eta(),
3685 tpcTrack->Phi()*180./TMath::Pi());
3686 if(fAnalysisEtaMode)
3687 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),Pt,
3688 ConvertPDGToInt(motherPDGCode));
3690 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3694 ConvertPDGToInt(motherPDGCode));
3695 }//accepted secondary protons
3696 else if(track->Charge() < 0) {
3697 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3698 if(track->HasPointOnITSLayer(iLayer))
3699 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3701 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3702 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3703 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3704 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3705 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3706 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3707 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3708 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3709 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3710 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3712 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3713 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3714 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3715 if(fAnalysisEtaMode)
3716 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),Pt);
3718 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3722 ((TH2D *)(fQA2DList->At(18)))->Fill(tpcTrack->Eta(),
3723 tpcTrack->Phi()*180./TMath::Pi());
3724 if(fAnalysisEtaMode)
3725 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),Pt,
3726 ConvertPDGToInt(motherPDGCode));
3728 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3732 ConvertPDGToInt(motherPDGCode));
3733 }//accepted secondary antiprotons
3734 }//accepted secondary particles
3735 }//accepted - track cuts
3737 if(label <= stack->GetNprimary()) {
3738 if(track->Charge() > 0) {
3739 if(fAnalysisEtaMode)
3740 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),Pt);
3742 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3746 ((TH2D *)(fQA2DList->At(13)))->Fill(tpcTrack->Eta(),
3747 tpcTrack->Phi()*180./TMath::Pi());
3749 else if(track->Charge() < 0) {
3750 if(fAnalysisEtaMode)
3751 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),Pt);
3753 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3757 ((TH2D *)(fQA2DList->At(17)))->Fill(tpcTrack->Eta(),
3758 tpcTrack->Phi()*180./TMath::Pi());
3760 }//rejected primary particles
3761 else if(label > stack->GetNprimary()) {
3762 if(track->Charge() > 0) {
3763 if(fAnalysisEtaMode)
3764 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),Pt);
3766 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3770 ((TH2D *)(fQA2DList->At(15)))->Fill(tpcTrack->Eta(),
3771 tpcTrack->Phi()*180./TMath::Pi());
3773 else if(track->Charge() < 0) {
3774 if(fAnalysisEtaMode)
3775 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),Pt);
3777 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3781 ((TH2D *)(fQA2DList->At(19)))->Fill(tpcTrack->Eta(),
3782 tpcTrack->Phi()*180./TMath::Pi());
3784 }//rejected secondary particles
3785 }//rejected - track cuts
3789 else if(!fUseTPCOnly) {
3792 track->GetImpactParameters(dcaXY,dcaZ);
3795 track->GetESDpid(probability);
3797 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3798 rcc += probability[i]*GetParticleFraction(i,P);
3799 if(rcc == 0.0) continue;
3801 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3802 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3803 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3804 if(fParticleType == 4) {
3805 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3807 FillQA(stack,esd,vertex,track);
3808 if(IsAccepted(esd,vertex,track)) {
3809 if(label <= stack->GetNprimary()) {
3810 if(track->Charge() > 0) {
3811 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3812 if(track->HasPointOnITSLayer(iLayer))
3813 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3815 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3816 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3817 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3818 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3819 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3820 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3821 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3822 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3823 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3824 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3826 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3827 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3828 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3829 if(fAnalysisEtaMode)
3830 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),Pt);
3832 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3836 ((TH2D *)(fQA2DList->At(12)))->Fill(track->Eta(),
3837 track->Phi()*180./TMath::Pi());
3839 else if(track->Charge() < 0) {
3840 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3841 if(track->HasPointOnITSLayer(iLayer))
3842 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3844 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3845 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3846 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3847 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3848 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3849 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3850 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3851 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3852 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3853 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3855 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3856 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3857 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3858 if(fAnalysisEtaMode)
3859 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),Pt);
3861 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3865 ((TH2D *)(fQA2DList->At(16)))->Fill(track->Eta(),
3866 track->Phi()*180./TMath::Pi());
3868 }//primary particles
3869 else if(label > stack->GetNprimary()) {
3870 Int_t lPartMother = -1;
3871 Int_t motherPDGCode = -1;
3873 lPartMother = particle->GetFirstMother();
3874 TParticle *motherParticle = stack->Particle(lPartMother);
3875 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3878 if(fMCProcessIdFlag)
3879 if(particle->GetUniqueID() != fMCProcessId) continue;
3880 if(fMotherParticlePDGCodeFlag)
3881 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3883 if(track->Charge() > 0) {
3884 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3885 if(track->HasPointOnITSLayer(iLayer))
3886 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3888 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3889 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3890 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3891 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3892 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3893 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3894 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3895 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3896 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3897 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3899 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3900 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3901 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3902 if(fAnalysisEtaMode)
3903 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),Pt);
3905 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3909 ((TH2D *)(fQA2DList->At(14)))->Fill(track->Eta(),
3910 track->Phi()*180./TMath::Pi());
3911 if(fAnalysisEtaMode)
3912 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),Pt,
3913 ConvertPDGToInt(motherPDGCode));
3915 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3919 ConvertPDGToInt(motherPDGCode));
3921 else if(track->Charge() < 0) {
3922 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3923 if(track->HasPointOnITSLayer(iLayer))
3924 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3926 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3927 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3928 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3929 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3930 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3931 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3932 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3933 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3934 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3935 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3937 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3938 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3939 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3940 if(fAnalysisEtaMode)
3941 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),Pt);
3943 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3948 ((TH2D *)(fQA2DList->At(18)))->Fill(track->Eta(),
3949 track->Phi()*180./TMath::Pi());
3950 if(fAnalysisEtaMode)
3951 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),Pt,
3952 ConvertPDGToInt(motherPDGCode));
3954 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3958 ConvertPDGToInt(motherPDGCode));
3960 }//secondary particles
3961 }//accepted - track cuts
3962 else if(!IsAccepted(esd,vertex,track)) {
3963 if(label <= stack->GetNprimary()) {
3964 if(track->Charge() > 0) {
3965 if(fAnalysisEtaMode)
3966 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),Pt);
3968 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3972 ((TH2D *)(fQA2DList->At(13)))->Fill(track->Eta(),
3973 track->Phi()*180./TMath::Pi());
3975 else if(track->Charge() < 0) {
3976 if(fAnalysisEtaMode)
3977 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),Pt);
3979 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
3983 ((TH2D *)(fQA2DList->At(17)))->Fill(track->Eta(),
3984 track->Phi()*180./TMath::Pi());
3986 }//primary particles
3987 else if(label > stack->GetNprimary()) {
3988 if(track->Charge() > 0) {
3989 if(fAnalysisEtaMode)
3990 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),Pt);
3992 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
3996 ((TH2D *)(fQA2DList->At(15)))->Fill(track->Eta(),
3997 track->Phi()*180./TMath::Pi());
3999 else if(track->Charge() < 0) {
4000 if(fAnalysisEtaMode)
4001 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),Pt);
4003 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
4007 ((TH2D *)(fQA2DList->At(19)))->Fill(track->Eta(),
4008 track->Phi()*180./TMath::Pi());
4010 }//secondary particles
4011 }//rejected - track cuts
4013 }//combined tracking
4018 //____________________________________________________________________//
4019 void AliProtonQAAnalysis::InitMCAnalysis() {
4020 //MC analysis - 3D histograms: y-pT-pdg
4021 fPDGList = new TList();
4022 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
4023 ";;P_{T} [GeV/c];PDG",
4024 fNBinsY,fMinY,fMaxY,
4025 fNBinsPt,fMinPt,fMaxPt,
4027 if(fAnalysisEtaMode)
4028 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
4030 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
4031 fPDGList->Add(gHistYPtPDGProtons);
4032 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
4033 ";;P_{T} [GeV/c];PDG",
4034 fNBinsY,fMinY,fMaxY,
4035 fNBinsPt,fMinPt,fMaxPt,
4037 if(fAnalysisEtaMode)
4038 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
4040 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
4041 fPDGList->Add(gHistYPtPDGAntiProtons);
4044 fMCProcessesList = new TList();
4045 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
4046 fMCProcessesList->Add(gHistProtonsFromKLProcess);
4047 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
4048 fMCProcessesList->Add(gHistProtonsFromPionProcess);
4049 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
4050 fMCProcessesList->Add(gHistProtonsFromKSProcess);
4051 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
4052 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
4053 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
4054 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
4055 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
4056 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
4057 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
4058 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
4059 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
4060 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
4061 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4062 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
4063 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
4064 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
4065 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
4066 fMCProcessesList->Add(gHistProtonsFromXi0Process);
4067 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
4068 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
4070 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
4071 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
4072 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
4073 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
4074 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
4075 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
4076 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
4077 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
4078 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
4079 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
4080 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
4081 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
4082 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
4083 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
4084 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4085 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
4088 //____________________________________________________________________//
4089 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
4090 //Main analysis part - MC
4091 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
4092 TParticle *particle = stack->Particle(iParticle);
4093 if(!particle) continue;
4095 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
4096 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
4097 if(fAnalysisEtaMode) {
4098 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
4101 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4104 Int_t pdgcode = particle->GetPdgCode();
4105 if(pdgcode == 2212) {
4106 if(iParticle <= stack->GetNprimary()) {
4107 if(fAnalysisEtaMode)
4108 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
4110 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
4115 else if(iParticle > stack->GetNprimary()) {
4116 Int_t lPartMother = particle->GetFirstMother();
4117 TParticle *motherParticle = stack->Particle(lPartMother);
4118 if(!motherParticle) continue;
4119 Int_t motherPDGCode = motherParticle->GetPdgCode();
4120 if(fMCProcessIdFlag)
4121 if(particle->GetUniqueID() != fMCProcessId) continue;
4122 if(fMotherParticlePDGCodeFlag)
4123 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4125 if(fAnalysisEtaMode)
4126 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
4128 ConvertPDGToInt(motherParticle->GetPdgCode()));
4130 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
4134 ConvertPDGToInt(motherParticle->GetPdgCode()));
4136 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4137 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
4138 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4139 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
4140 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4141 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
4142 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4143 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
4144 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4145 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
4146 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4147 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
4148 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
4149 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
4150 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4151 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
4152 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4153 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
4154 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
4155 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
4156 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
4157 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
4158 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
4159 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
4161 }//pdgcode of proton
4163 if(pdgcode == -2212) {
4164 if(iParticle <= stack->GetNprimary()) {
4165 if(fAnalysisEtaMode)
4166 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
4168 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
4173 else if(iParticle > stack->GetNprimary()) {
4174 Int_t lPartMother = particle->GetFirstMother();
4175 TParticle *motherParticle = stack->Particle(lPartMother);
4176 if(!motherParticle) continue;
4177 Int_t motherPDGCode = motherParticle->GetPdgCode();
4178 if(fMCProcessIdFlag)
4179 if(particle->GetUniqueID() != fMCProcessId) continue;
4180 if(fMotherParticlePDGCodeFlag)
4181 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4183 if(fAnalysisEtaMode)
4184 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
4186 ConvertPDGToInt(motherParticle->GetPdgCode()));
4188 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
4192 ConvertPDGToInt(motherParticle->GetPdgCode()));
4195 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4196 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
4197 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4198 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
4199 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4200 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
4201 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4202 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
4203 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4204 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
4205 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4206 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
4207 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4208 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
4209 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4210 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
4211 }//secondary antiproton
4212 }//pdgcode of antiproton
4217 //____________________________________________________________________//
4218 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
4219 //Converts the pdg code to an int based on the following scheme:
4220 //1: PDG code: 130 - Name: K_L0
4221 //2: PDG code: 211 - Name: pi+
4222 //3: PDG code: 310 - Name: K_S0
4223 //4: PDG code: 321 - Name: K+
4224 //5: PDG code: 2112 - Name: neutron
4225 //6: PDG code: 2212 - Name: proton
4226 //7: PDG code: 3112 - Name: Sigma-
4227 //8: PDG code: 3122 - Name: Lambda0
4228 //9: PDG code: 3222 - Name: Sigma+
4229 //10: PDG code: 3312 - Name: Xi-
4230 //11: PDG code: 3322 - Name: Xi0
4231 //12: PDG code: 3334 - Name: Omega-
4233 switch (TMath::Abs(pdgCode)) {
4291 //________________________________________________________________________
4292 /*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
4296 // Get the vertex from the ESD and returns it if the vertex is valid
4297 // depending on the analysis mode: TPC - Hybrid - Global
4298 const AliESDVertex* vertex = 0;
4299 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
4300 Double_t kBz = esd->GetMagneticField();
4301 AliVertexerTracks vertexer(kBz);
4302 vertexer.SetTPCMode();
4303 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
4304 esd->SetPrimaryVertexTPC(vTPC);
4305 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
4306 AliESDtrack *t = esd->GetTrack(i);
4307 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
4310 vertex = esd->GetPrimaryVertexTPC();
4312 else if(fUseHybridTPC)
4313 vertex = esd->GetPrimaryVertexSPD();
4314 else if(!fUseTPCOnly)
4315 vertex = esd->GetPrimaryVertex();
4317 Printf("GetVertex: ERROR: Invalid analysis mode");
4319 if(!vertex) return 0;
4321 // check Ncontributors
4322 if(vertex->GetNContributors() <= 0) return 0;
4325 Double_t zRes = vertex->GetZRes();
4326 if(zRes == 0) return 0;
4329 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
4330 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
4331 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;