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);
1719 TH3D *gHistEtaPhiNClustersPrimaryProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryProtonsPass",
1720 "Accepted primary protons;#eta;#phi;N_{clusters}(TPC)",
1721 fNBinsY,fMinY,fMaxY,
1724 gHistEtaPhiNClustersPrimaryProtonsPass->SetStats(kTRUE);
1725 gHistEtaPhiNClustersPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1726 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1727 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsPass",
1728 "Accepted primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1729 fNBinsY,fMinY,fMaxY,
1732 gHistEtaPhiNClustersPrimaryAntiProtonsPass->SetStats(kTRUE);
1733 gHistEtaPhiNClustersPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1734 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1735 TH3D *gHistEtaPhiNClustersSecondaryProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryProtonsPass",
1736 "Accepted secondary protons;#eta;#phi;N_{clusters}(TPC)",
1737 fNBinsY,fMinY,fMaxY,
1740 gHistEtaPhiNClustersSecondaryProtonsPass->SetStats(kTRUE);
1741 gHistEtaPhiNClustersSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1742 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1743 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsPass",
1744 "Accepted secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1745 fNBinsY,fMinY,fMaxY,
1748 gHistEtaPhiNClustersSecondaryAntiProtonsPass->SetStats(kTRUE);
1749 gHistEtaPhiNClustersSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1750 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1753 fRejectedCutList = new TList();
1755 TH3D *gHistEtaPhiNClustersPrimaryProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryProtonsReject",
1756 "Rejected primary protons;#eta;#phi;N_{clusters}(TPC)",
1757 fNBinsY,fMinY,fMaxY,
1760 gHistEtaPhiNClustersPrimaryProtonsReject->SetStats(kTRUE);
1761 gHistEtaPhiNClustersPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1762 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1763 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsReject",
1764 "Rejected primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1765 fNBinsY,fMinY,fMaxY,
1768 gHistEtaPhiNClustersPrimaryAntiProtonsReject->SetStats(kTRUE);
1769 gHistEtaPhiNClustersPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1770 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1771 TH3D *gHistEtaPhiNClustersSecondaryProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryProtonsReject",
1772 "Rejected secondary protons;#eta;#phi;N_{clusters}(TPC)",
1773 fNBinsY,fMinY,fMaxY,
1776 gHistEtaPhiNClustersSecondaryProtonsReject->SetStats(kTRUE);
1777 gHistEtaPhiNClustersSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1778 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1779 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsReject",
1780 "Rejected secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1781 fNBinsY,fMinY,fMaxY,
1784 gHistEtaPhiNClustersSecondaryAntiProtonsReject->SetStats(kTRUE);
1785 gHistEtaPhiNClustersSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1786 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1790 fAcceptedDCAList = new TList();
1791 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1792 ";DCA_{xy} [cm];Entries",
1794 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1795 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1796 ";DCA_{xy} [cm];Entries",
1798 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1799 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1800 ";DCA_{xy} [cm];Entries",
1802 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1803 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1804 ";DCA_{xy} [cm];Entries",
1807 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1808 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1809 ";DCA_{z} [cm];Entries",
1811 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1812 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1813 ";DCA_{z} [cm];Entries",
1815 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1816 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1817 ";DCA_{z} [cm];Entries",
1819 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1820 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1821 ";DCA_{z} [cm];Entries",
1823 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1825 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1826 ";#sigma_{Vertex};Entries",
1828 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1829 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1830 ";#sigma_{Vertex};Entries",
1832 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1833 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1834 ";#sigma_{Vertex};Entries",
1836 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1837 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1838 ";#sigma_{Vertex};Entries",
1840 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1844 //____________________________________________________________________//
1845 void AliProtonQAAnalysis::InitVertexQA() {
1846 //Initializes the Vertex QA histograms
1847 fQAVertexList = new TList();
1848 fQAVertexList->SetName("fQAVertexList");
1850 //Gen. multiplicity bins
1851 Float_t xBins[24] = {0,1,2,4,6,8,10,15,20,30,40,50,75,100,
1852 200,300,400,500,750,1000,1500,2000,2500,3000};
1853 //MC primary multiplicity (vertex efficiency calculation)
1854 TH1F *gHistMCPrimaryMultiplicity = new TH1F("gHistMCPrimaryMultiplicity",
1855 ";N_{prim. gen.};Entries",
1857 fQAVertexList->Add(gHistMCPrimaryMultiplicity);
1860 TH1F *gHistMCPrimaryMultiplicityTPC = new TH1F("gHistMCPrimaryMultiplicityTPC",
1861 "Vertex TPC;N_{prim. gen.};Entries",
1863 fQAVertexList->Add(gHistMCPrimaryMultiplicityTPC);
1864 TH2F *gHistTPCESDVx = new TH2F("gHistTPCESDVx",
1865 "Primary vertex TPC;V_{x} [cm];N_{contributors}",
1866 100,-10.,10.,1000,0,5000);
1867 fQAVertexList->Add(gHistTPCESDVx);
1868 TH2F *gHistTPCESDVy = new TH2F("gHistTPCESDVy",
1869 "Primary vertex TPC;V_{y} [cm];N_{contributors}",
1870 100,-10.,10.,1000,0,5000);
1871 fQAVertexList->Add(gHistTPCESDVy);
1872 TH2F *gHistTPCESDVz = new TH2F("gHistTPCESDVz",
1873 "Primary vertex TPC;V_{z} [cm];N_{contributors}",
1874 100,-20.,20.,1000,0,5000);
1875 fQAVertexList->Add(gHistTPCESDVz);
1876 TH1F *gHistTPCDiffVx = new TH1F("gHistTPCDiffVx",
1877 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1878 100,-10000.,10000.);
1879 fQAVertexList->Add(gHistTPCDiffVx);
1880 TH1F *gHistTPCDiffVy = new TH1F("gHistTPCDiffVy",
1881 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1882 100,-10000.,10000.);
1883 fQAVertexList->Add(gHistTPCDiffVy);
1884 TH1F *gHistTPCDiffVz = new TH1F("gHistTPCDiffVz",
1885 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1886 100,-10000.,10000.);
1887 fQAVertexList->Add(gHistTPCDiffVz);
1888 TH1F *gHistTPCResolutionVx = new TH1F("gHistTPCResolutionVx",
1889 ";#sigma_{x} [#mu m];Entries",
1891 fQAVertexList->Add(gHistTPCResolutionVx);
1892 TH1F *gHistTPCResolutionVy = new TH1F("gHistTPCResolutionVy",
1893 ";#sigma_{y} [#mu m];Entries",
1895 fQAVertexList->Add(gHistTPCResolutionVy);
1896 TH1F *gHistTPCResolutionVz = new TH1F("gHistTPCResolutionVz",
1897 ";#sigma_{z} [#mu m];Entries",
1899 fQAVertexList->Add(gHistTPCResolutionVz);
1902 TH1F *gHistMCPrimaryMultiplicitySPD = new TH1F("gHistMCPrimaryMultiplicitySPD",
1903 "Vertex SPD;N_{prim. gen.};Entries",
1905 fQAVertexList->Add(gHistMCPrimaryMultiplicitySPD);
1906 TH2F *gHistSPDESDVx = new TH2F("gHistSPDESDVx",
1907 "Primary vertex SPD;V_{x} [cm];N_{contributors}",
1908 100,-10.,10.,1000,0,5000);
1909 fQAVertexList->Add(gHistSPDESDVx);
1910 TH2F *gHistSPDESDVy = new TH2F("gHistSPDESDVy",
1911 "Primary vertex SPD;V_{y} [cm];N_{contributors}",
1912 100,-10.,10.,1000,0,5000);
1913 fQAVertexList->Add(gHistSPDESDVy);
1914 TH2F *gHistSPDESDVz = new TH2F("gHistSPDESDVz",
1915 "Primary vertex SPD;V_{z} [cm];N_{contributors}",
1916 100,-20.,20.,1000,0,5000);
1917 fQAVertexList->Add(gHistSPDESDVz);
1918 TH1F *gHistSPDDiffVx = new TH1F("gHistSPDDiffVx",
1919 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1920 100,-10000.,10000.);
1921 fQAVertexList->Add(gHistSPDDiffVx);
1922 TH1F *gHistSPDDiffVy = new TH1F("gHistSPDDiffVy",
1923 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1924 100,-10000.,10000.);
1925 fQAVertexList->Add(gHistSPDDiffVy);
1926 TH1F *gHistSPDDiffVz = new TH1F("gHistSPDDiffVz",
1927 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1928 100,-10000.,10000.);
1929 fQAVertexList->Add(gHistSPDDiffVz);
1930 TH1F *gHistSPDResolutionVx = new TH1F("gHistSPDResolutionVx",
1931 ";#sigma_{x} [#mu m];Entries",
1933 fQAVertexList->Add(gHistSPDResolutionVx);
1934 TH1F *gHistSPDResolutionVy = new TH1F("gHistSPDResolutionVy",
1935 ";#sigma_{y} [#mu m];Entries",
1937 fQAVertexList->Add(gHistSPDResolutionVy);
1938 TH1F *gHistSPDResolutionVz = new TH1F("gHistSPDResolutionVz",
1939 ";#sigma_{z} [#mu m];Entries",
1941 fQAVertexList->Add(gHistSPDResolutionVz);
1944 TH1F *gHistMCPrimaryMultiplicityTracks = new TH1F("gHistMCPrimaryMultiplicityTracks",
1945 "Vertex Tracks;N_{prim. gen.};Entries",
1947 fQAVertexList->Add(gHistMCPrimaryMultiplicityTracks);
1948 TH2F *gHistTracksESDVx = new TH2F("gHistTracksESDVx",
1949 "Primary vertex Tracks;V_{x} [cm];N_{contributors}",
1950 100,-10.,10.,1000,0,5000);
1951 fQAVertexList->Add(gHistTracksESDVx);
1952 TH2F *gHistTracksESDVy = new TH2F("gHistTracksESDVy",
1953 "Primary vertex Tracks;V_{y} [cm];N_{contributors}",
1954 100,-10.,10.,1000,0,5000);
1955 fQAVertexList->Add(gHistTracksESDVy);
1956 TH2F *gHistTracksESDVz = new TH2F("gHistTracksESDVz",
1957 "Primary vertex Tracks;V_{z} [cm];N_{contributors}",
1958 100,-20.,20.,1000,0,5000);
1959 fQAVertexList->Add(gHistTracksESDVz);
1960 TH1F *gHistTracksDiffVx = new TH1F("gHistTracksDiffVx",
1961 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1962 100,-10000.,10000.);
1963 fQAVertexList->Add(gHistTracksDiffVx);
1964 TH1F *gHistTracksDiffVy = new TH1F("gHistTracksDiffVy",
1965 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1966 100,-10000.,10000.);
1967 fQAVertexList->Add(gHistTracksDiffVy);
1968 TH1F *gHistTracksDiffVz = new TH1F("gHistTracksDiffVz",
1969 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1970 100,-10000.,10000.);
1971 fQAVertexList->Add(gHistTracksDiffVz);
1972 TH1F *gHistTracksResolutionVx = new TH1F("gHistTracksResolutionVx",
1973 ";#sigma_{x} [#mu m];Entries",
1975 fQAVertexList->Add(gHistTracksResolutionVx);
1976 TH1F *gHistTracksResolutionVy = new TH1F("gHistTracksResolutionVy",
1977 ";#sigma_{y} [#mu m];Entries",
1979 fQAVertexList->Add(gHistTracksResolutionVy);
1980 TH1F *gHistTracksResolutionVz = new TH1F("gHistTracksResolutionVz",
1981 ";#sigma_{z} [#mu m];Entries",
1983 fQAVertexList->Add(gHistTracksResolutionVz);
1986 //____________________________________________________________________//
1987 void AliProtonQAAnalysis::InitQA() {
1988 //Initializes the QA histograms
1989 //if(!fQAHistograms)
1993 //TDirectory *dir2D = gDirectory->mkdir("2D");
1994 //fGlobalQAList->Add(dir2D); dir2D->cd();
1995 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1997 fNBinsY,fMinY,fMaxY,
1998 fNBinsPt,fMinPt,fMaxPt);
1999 if(fAnalysisEtaMode)
2000 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("#eta");
2002 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("y");
2003 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
2004 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
2005 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
2006 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
2008 fNBinsY,fMinY,fMaxY,
2009 fNBinsPt,fMinPt,fMaxPt);
2010 if(fAnalysisEtaMode)
2011 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("#eta");
2013 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("y");
2014 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
2015 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
2016 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
2018 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
2020 fNBinsY,fMinY,fMaxY,
2021 fNBinsPt,fMinPt,fMaxPt);
2022 if(fAnalysisEtaMode)
2023 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("#eta");
2025 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("y");
2026 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
2027 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
2028 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
2029 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
2031 fNBinsY,fMinY,fMaxY,
2032 fNBinsPt,fMinPt,fMaxPt);
2033 if(fAnalysisEtaMode)
2034 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("#eta");
2036 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("y");
2037 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
2038 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
2039 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
2041 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
2043 fNBinsY,fMinY,fMaxY,
2044 fNBinsPt,fMinPt,fMaxPt);
2045 if(fAnalysisEtaMode)
2046 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2048 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("y");
2049 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
2050 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2051 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
2052 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
2054 fNBinsY,fMinY,fMaxY,
2055 fNBinsPt,fMinPt,fMaxPt);
2056 if(fAnalysisEtaMode)
2057 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2059 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2060 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
2061 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2062 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
2064 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
2066 fNBinsY,fMinY,fMaxY,
2067 fNBinsPt,fMinPt,fMaxPt);
2068 if(fAnalysisEtaMode)
2069 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2071 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("y");
2072 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
2073 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2074 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
2075 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
2077 fNBinsY,fMinY,fMaxY,
2078 fNBinsPt,fMinPt,fMaxPt);
2079 if(fAnalysisEtaMode)
2080 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2082 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2083 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
2084 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2085 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
2087 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
2089 fNBinsY,fMinY,fMaxY,
2090 fNBinsPt,fMinPt,fMaxPt);
2091 if(fAnalysisEtaMode)
2092 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("#eta");
2094 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("y");
2095 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
2096 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
2097 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
2098 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
2100 fNBinsY,fMinY,fMaxY,
2101 fNBinsPt,fMinPt,fMaxPt);
2102 if(fAnalysisEtaMode)
2103 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("#eta");
2105 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("y");
2106 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
2107 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
2108 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
2110 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
2111 ";;P_{T} [GeV/c];PDG",
2112 fNBinsY,fMinY,fMaxY,
2113 fNBinsPt,fMinPt,fMaxPt,
2115 if(fAnalysisEtaMode)
2116 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("#eta");
2118 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("y");
2119 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
2120 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
2121 ";;P_{T} [GeV/c];PDG",
2122 fNBinsY,fMinY,fMaxY,
2123 fNBinsPt,fMinPt,fMaxPt,
2125 if(fAnalysisEtaMode)
2126 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2128 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("y");
2129 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
2131 /*gDirectory->cd("../");
2133 TDirectory *dirProtons = gDirectory->mkdir("Protons");
2134 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
2136 //________________________________________________________________//
2137 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
2138 dirProtonsPrimary->cd();
2139 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2140 dirProtonsPrimaryAccepted->cd();*/
2142 //Accepted primary protons
2143 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
2144 ";N_{clusters} (ITS);Entries",
2146 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
2147 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
2148 ";x^{2}/N_{clusters} (ITS);Entries",
2150 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
2151 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
2152 ";N_{clusters} (TPC);Entries",
2154 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
2155 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
2156 ";x^{2}/N_{clusters} (TPC);Entries",
2158 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
2159 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
2160 ";#sigma_{y} [cm];Entries",
2162 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
2163 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
2164 ";#sigma_{z} [cm];Entries",
2166 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
2167 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
2168 ";#sigma_{sin(#phi)};Entries",
2170 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
2171 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
2172 ";#sigma_{tan(#lambda)};Entries",
2174 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
2175 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
2176 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2178 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
2179 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
2180 ";#sigma_{Vertex};Entries",
2182 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
2183 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
2184 ";#sigma_{Vertex};Entries",
2186 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
2187 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
2188 ";DCA_{xy} [cm];Entries",
2190 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
2191 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
2192 ";DCA_{xy} [cm];Entries",
2194 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
2195 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
2196 ";DCA_{z} [cm];Entries",
2198 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
2199 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
2200 ";DCA_{z} [cm];Entries",
2202 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
2203 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
2204 ";Log_{10}(#chi^{2});Entries",
2206 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
2207 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
2209 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
2210 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
2212 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
2213 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
2215 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
2216 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
2218 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2219 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
2221 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2222 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
2224 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2225 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
2227 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2228 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
2230 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2231 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
2233 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2234 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
2236 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
2238 //Rejected primary protons
2239 /*gDirectory->cd("../");
2240 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2241 dirProtonsPrimaryRejected->cd();*/
2243 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
2244 ";N_{clusters} (ITS);Entries",
2246 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2247 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
2248 ";x^{2}/N_{clusters} (ITS);Entries",
2250 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2251 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
2252 ";N_{clusters} (TPC);Entries",
2254 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2255 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
2256 ";x^{2}/N_{clusters} (TPC);Entries",
2258 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2259 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
2260 ";#sigma_{y} [cm];Entries",
2262 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2263 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
2264 ";#sigma_{z} [cm];Entries",
2266 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2267 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
2268 ";#sigma_{sin(#phi)};Entries",
2270 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2271 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
2272 ";#sigma_{tan(#lambda)};Entries",
2274 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2275 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2276 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2278 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2279 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2280 ";#sigma_{Vertex};Entries",
2282 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2283 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2284 ";#sigma_{Vertex};Entries",
2286 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2287 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2288 ";DCA_{xy} [cm];Entries",
2290 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2291 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2292 ";DCA_{xy} [cm];Entries",
2294 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2295 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2296 ";DCA_{z} [cm];Entries",
2298 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2299 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2300 ";DCA_{z} [cm];Entries",
2302 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2303 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2304 ";Log_{10}(#chi^{2});Entries",
2306 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2307 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2309 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2310 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2312 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2313 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2315 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2316 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2318 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2319 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2321 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2322 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2324 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2325 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2327 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2328 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2330 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2331 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2333 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2334 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2336 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2338 //________________________________________________________________//
2339 /*gDirectory->cd("../../");
2341 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2342 dirProtonsSecondary->cd();
2343 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2344 dirProtonsSecondaryAccepted->cd();*/
2346 //Accepted secondary protons
2347 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2348 ";N_{clusters} (ITS);Entries",
2350 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2351 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2352 ";x^{2}/N_{clusters} (ITS);Entries",
2354 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2355 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2356 ";N_{clusters} (TPC);Entries",
2358 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2359 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2360 ";x^{2}/N_{clusters} (TPC);Entries",
2362 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2363 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2364 ";#sigma_{y} [cm];Entries",
2366 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2367 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2368 ";#sigma_{z} [cm];Entries",
2370 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2371 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2372 ";#sigma_{sin(#phi)};Entries",
2374 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2375 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2376 ";#sigma_{tan(#lambda)};Entries",
2378 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2379 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2380 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2382 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2383 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2384 ";#sigma_{Vertex};Entries",
2386 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2387 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2388 ";#sigma_{Vertex};Entries",
2390 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2391 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2392 ";DCA_{xy} [cm];Entries",
2394 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2395 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2396 ";DCA_{xy} [cm];Entries",
2398 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2399 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2400 ";DCA_{z} [cm];Entries",
2402 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2403 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2404 ";DCA_{z} [cm];Entries",
2406 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2407 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2408 ";Log_{10}(#chi^{2});Entries",
2410 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2411 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2413 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2414 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2416 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2417 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2419 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2420 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2422 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2423 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2425 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2426 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2428 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2429 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2431 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2432 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2434 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2435 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2437 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2438 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2440 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2442 //Rejected secondary protons
2443 /*gDirectory->cd("../");
2444 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2445 dirProtonsSecondaryRejected->cd();*/
2447 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2448 ";N_{clusters} (ITS);Entries",
2450 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2451 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2452 ";x^{2}/N_{clusters} (ITS);Entries",
2454 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2455 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2456 ";N_{clusters} (TPC);Entries",
2458 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2459 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2460 ";x^{2}/N_{clusters} (TPC);Entries",
2462 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2463 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2464 ";#sigma_{y} [cm];Entries",
2466 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2467 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2468 ";#sigma_{z} [cm];Entries",
2470 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2471 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2472 ";#sigma_{sin(#phi)};Entries",
2474 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2475 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2476 ";#sigma_{tan(#lambda)};Entries",
2478 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2479 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2480 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2482 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2483 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2484 ";#sigma_{Vertex};Entries",
2486 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2487 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2488 ";#sigma_{Vertex};Entries",
2490 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2491 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2492 ";DCA_{xy} [cm];Entries",
2494 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2495 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2496 ";DCA_{xy} [cm];Entries",
2498 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2499 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2500 ";DCA_{z} [cm];Entries",
2502 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2503 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2504 ";DCA_{z} [cm];Entries",
2506 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2507 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2508 ";Log_{10}(#chi^{2});Entries",
2510 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2511 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2513 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2514 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2516 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2517 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2519 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2520 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2522 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2523 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2525 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2526 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2528 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2529 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2531 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2532 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2534 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2535 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2537 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2538 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2540 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2543 /*gDirectory->cd("../../../");
2546 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2547 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2549 //________________________________________________________________//
2550 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2551 dirAntiProtonsPrimary->cd();
2552 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2553 dirAntiProtonsPrimaryAccepted->cd();*/
2555 //Accepted primary antiprotons
2556 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2557 ";N_{clusters} (ITS);Entries",
2559 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2560 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2561 ";x^{2}/N_{clusters} (ITS);Entries",
2563 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2564 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2565 ";N_{clusters} (TPC);Entries",
2567 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2568 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2569 ";x^{2}/N_{clusters} (TPC);Entries",
2571 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2572 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2573 ";#sigma_{y} [cm];Entries",
2575 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2576 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2577 ";#sigma_{z} [cm];Entries",
2579 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2580 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2581 ";#sigma_{sin(#phi)};Entries",
2583 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2584 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2585 ";#sigma_{tan(#lambda)};Entries",
2587 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2588 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2589 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2591 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2592 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2593 ";#sigma_{Vertex};Entries",
2595 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2596 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2597 ";#sigma_{Vertex};Entries",
2599 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2600 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2601 ";DCA_{xy} [cm];Entries",
2603 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2604 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2605 ";DCA_{xy} [cm];Entries",
2607 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2608 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2609 ";DCA_{z} [cm];Entries",
2611 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2612 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2613 ";DCA_{z} [cm];Entries",
2615 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2616 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2617 ";Log_{10}(#chi^{2});Entries",
2619 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2620 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2622 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2623 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2625 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2626 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2628 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2629 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2631 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2632 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2634 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2635 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2637 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2638 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2640 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2641 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2643 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2644 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2646 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2647 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2649 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2651 //Rejected primary antiprotons
2652 /*gDirectory->cd("../");
2653 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2654 dirAntiProtonsPrimaryRejected->cd();*/
2656 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2657 ";N_{clusters} (ITS);Entries",
2659 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2660 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2661 ";x^{2}/N_{clusters} (ITS);Entries",
2663 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2664 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2665 ";N_{clusters} (TPC);Entries",
2667 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2668 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2669 ";x^{2}/N_{clusters} (TPC);Entries",
2671 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2672 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2673 ";#sigma_{y} [cm];Entries",
2675 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2676 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2677 ";#sigma_{z} [cm];Entries",
2679 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2680 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2681 ";#sigma_{sin(#phi)};Entries",
2683 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2684 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2685 ";#sigma_{tan(#lambda)};Entries",
2687 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2688 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2689 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2691 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2692 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2693 ";#sigma_{Vertex};Entries",
2695 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2696 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2697 ";#sigma_{Vertex};Entries",
2699 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2700 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2701 ";DCA_{xy} [cm];Entries",
2703 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2704 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2705 ";DCA_{xy} [cm];Entries",
2707 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2708 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2709 ";DCA_{z} [cm];Entries",
2711 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2712 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2713 ";DCA_{z} [cm];Entries",
2715 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2716 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2717 ";Log_{10}(#chi^{2});Entries",
2719 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2720 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2722 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2723 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2725 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2726 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2728 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2729 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2731 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2732 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2734 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2735 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2737 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2738 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2740 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2741 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2743 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2744 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2746 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2747 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2749 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2751 //________________________________________________________________//
2752 /*gDirectory->cd("../../");
2754 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2755 dirAntiProtonsSecondary->cd();
2756 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2757 dirAntiProtonsSecondaryAccepted->cd();*/
2759 //Accepted secondary antiprotons
2760 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2761 ";N_{clusters} (ITS);Entries",
2763 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2764 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2765 ";x^{2}/N_{clusters} (ITS);Entries",
2767 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2768 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2769 ";N_{clusters} (TPC);Entries",
2771 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2772 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2773 ";x^{2}/N_{clusters} (TPC);Entries",
2775 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2776 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2777 ";#sigma_{y} [cm];Entries",
2779 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2780 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2781 ";#sigma_{z} [cm];Entries",
2783 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2784 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2785 ";#sigma_{sin(#phi)};Entries",
2787 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2788 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2789 ";#sigma_{tan(#lambda)};Entries",
2791 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2792 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2793 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2795 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2796 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2797 ";#sigma_{Vertex};Entries",
2799 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2800 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2801 ";#sigma_{Vertex};Entries",
2803 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2804 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2805 ";DCA_{xy} [cm];Entries",
2807 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2808 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2809 ";DCA_{xy} [cm];Entries",
2811 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2812 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2813 ";DCA_{z} [cm];Entries",
2815 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2816 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2817 ";DCA_{z} [cm];Entries",
2819 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2820 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2821 ";Log_{10}(#chi^{2});Entries",
2823 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2824 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2826 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2827 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2829 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2830 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2832 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2833 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2835 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2836 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2838 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2839 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2841 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2842 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2844 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2845 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2847 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2848 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2850 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2851 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2853 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2855 //Rejected secondary antiprotons
2856 /*gDirectory->cd("../");
2857 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2858 dirAntiProtonsSecondaryRejected->cd();*/
2860 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2861 ";N_{clusters} (ITS);Entries",
2863 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2864 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2865 ";x^{2}/N_{clusters} (ITS);Entries",
2867 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2868 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2869 ";N_{clusters} (TPC);Entries",
2871 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2872 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2873 ";x^{2}/N_{clusters} (TPC);Entries",
2875 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2876 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2877 ";#sigma_{y} [cm];Entries",
2879 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2880 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2881 ";#sigma_{z} [cm];Entries",
2883 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2884 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2885 ";#sigma_{sin(#phi)};Entries",
2887 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2888 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2889 ";#sigma_{tan(#lambda)};Entries",
2891 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2892 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2893 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2895 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2896 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2897 ";#sigma_{Vertex};Entries",
2899 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2900 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2901 ";#sigma_{Vertex};Entries",
2903 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2904 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2905 ";DCA_{xy} [cm];Entries",
2907 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2908 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2909 ";DCA_{xy} [cm];Entries",
2911 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2912 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2913 ";DCA_{z} [cm];Entries",
2915 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2916 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2917 ";DCA_{z} [cm];Entries",
2919 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2920 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2921 ";Log_{10}(#chi^{2});Entries",
2923 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2924 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2926 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2927 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2929 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2930 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2932 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2933 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2935 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2936 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2938 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2939 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2941 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2942 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2944 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2945 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2947 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2948 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2950 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2951 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2953 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2956 //____________________________________________________________________//
2957 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2959 const AliESDVertex *vertex) {
2960 //Runs the efficiency code
2962 Int_t nMCProtons = 0, nESDProtons = 0;
2963 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2964 TParticle *particle = stack->Particle(iParticle);
2965 if(!particle) continue;
2967 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2968 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2969 if(fAnalysisEtaMode) {
2970 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2973 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2975 Int_t pdgcode = particle->GetPdgCode();
2976 if(TMath::Abs(pdgcode) != 2212) continue;
2978 if(iParticle <= stack->GetNprimary()) {
2979 if(pdgcode == 2212) {
2981 if(fAnalysisEtaMode)
2982 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2985 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2990 if(pdgcode == -2212) {
2991 if(fAnalysisEtaMode)
2992 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2995 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
3003 Int_t lPartMother = -1;
3004 Int_t motherPDGCode = -1;
3005 lPartMother = particle->GetFirstMother();
3006 TParticle *motherParticle = stack->Particle(lPartMother);
3007 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3009 if(pdgcode == 2212) {
3010 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3011 if(fAnalysisEtaMode)
3012 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3015 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
3020 if((particle->GetUniqueID() == 13)) {
3021 if(fAnalysisEtaMode)
3022 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3025 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
3029 }//hadronic interactions
3031 if(pdgcode == -2212) {
3032 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3033 if(fAnalysisEtaMode)
3034 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3037 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
3042 if((particle->GetUniqueID() == 13)) {
3043 if(fAnalysisEtaMode)
3044 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3047 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
3051 }//hadronic interactions
3058 Int_t nGoodTracks = esd->GetNumberOfTracks();
3059 TArrayI labelArray(nGoodTracks);
3060 Int_t labelCounter = 0;
3061 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3062 AliESDtrack* track = esd->GetTrack(iTracks);
3063 if(!track) continue;
3065 Int_t label = TMath::Abs(track->GetLabel());
3066 if(IsLabelUsed(labelArray,label)) continue;
3067 labelArray.AddAt(label,labelCounter);
3070 TParticle *particle = stack->Particle(label);
3071 if(!particle) continue;
3072 Int_t pdgcode = particle->GetPdgCode();
3073 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3075 Double_t Pt = 0.0, P = 0.0;
3076 Double_t probability[5];
3080 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3081 if(!tpcTrack) continue;
3082 Pt = tpcTrack->Pt();
3085 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3086 if(fAnalysisEtaMode) {
3087 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3090 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3092 if(fUseCutsInEfficiency)
3093 if(!IsAccepted(esd,vertex,track)) continue;
3095 //reconstructed primary (anti)protons
3096 if(pdgcode == 2212) {
3097 if(fAnalysisEtaMode)
3098 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3101 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3105 if(label <= stack->GetNprimary()) {
3107 if(fAnalysisEtaMode)
3108 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3111 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3116 if(label > stack->GetNprimary()) {
3117 Int_t lPartMother = -1;
3118 Int_t motherPDGCode = -1;
3119 lPartMother = particle->GetFirstMother();
3120 TParticle *motherParticle = stack->Particle(lPartMother);
3121 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3123 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3124 if(fAnalysisEtaMode)
3125 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3128 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3133 if((particle->GetUniqueID() == 13)) {
3134 if(fAnalysisEtaMode)
3135 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3138 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3142 }//hadronic interactions
3145 if(pdgcode == -2212) {
3146 if(fAnalysisEtaMode)
3147 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3150 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3154 if(label <= stack->GetNprimary()) {
3155 if(fAnalysisEtaMode)
3156 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3159 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3164 if(label > stack->GetNprimary()) {
3165 Int_t lPartMother = -1;
3166 Int_t motherPDGCode = -1;
3167 lPartMother = particle->GetFirstMother();
3168 TParticle *motherParticle = stack->Particle(lPartMother);
3169 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3171 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3172 if(fAnalysisEtaMode)
3173 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3176 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3181 if((particle->GetUniqueID() == 13)) {
3182 if(fAnalysisEtaMode)
3183 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3186 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3190 }//hadronic interactions
3192 }//initial antiprotons
3195 track->GetTPCpid(probability);
3197 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3198 rcc += probability[i]*GetParticleFraction(i,P);
3199 if(rcc == 0.0) continue;
3201 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3202 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3203 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3204 if(fParticleType == 4) {
3205 if(fAnalysisEtaMode)
3206 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3209 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3213 if(TMath::Abs(pdgcode) == 2212) {
3214 if(fAnalysisEtaMode)
3215 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3218 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3222 }//properly identified as proton
3224 if(fAnalysisEtaMode)
3225 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3228 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3233 }//identified as proton
3235 else if(!fUseTPCOnly) {
3236 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3237 if(fAnalysisEtaMode) {
3238 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3241 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3244 if(fUseCutsInEfficiency)
3245 if(!IsAccepted(esd,vertex,track)) continue;
3247 //reconstructed primary (anti)protons
3248 if(pdgcode == 2212) {
3249 if(fAnalysisEtaMode)
3250 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3253 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3257 if(label <= stack->GetNprimary()) {
3259 if(fAnalysisEtaMode)
3260 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3263 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3268 if(label > stack->GetNprimary()) {
3269 Int_t lPartMother = -1;
3270 Int_t motherPDGCode = -1;
3271 lPartMother = particle->GetFirstMother();
3272 TParticle *motherParticle = stack->Particle(lPartMother);
3273 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3275 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3276 if(fAnalysisEtaMode)
3277 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3280 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3285 if((particle->GetUniqueID() == 13)) {
3286 if(fAnalysisEtaMode)
3287 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3290 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3294 }//hadronic interactions
3297 if(pdgcode == -2212) {
3298 if(fAnalysisEtaMode)
3299 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3302 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
3306 if(label <= stack->GetNprimary()) {
3307 if(fAnalysisEtaMode)
3308 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3311 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3316 if(label > stack->GetNprimary()) {
3317 Int_t lPartMother = -1;
3318 Int_t motherPDGCode = -1;
3319 lPartMother = particle->GetFirstMother();
3320 TParticle *motherParticle = stack->Particle(lPartMother);
3321 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3323 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3324 if(fAnalysisEtaMode)
3325 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3328 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3333 if((particle->GetUniqueID() == 13)) {
3334 if(fAnalysisEtaMode)
3335 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3338 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3342 }//hadronic interactions
3344 }//initial antiprotons
3347 track->GetESDpid(probability);
3349 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3350 rcc += probability[i]*GetParticleFraction(i,P);
3351 if(rcc == 0.0) continue;
3353 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3354 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3355 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3356 if(fParticleType == 4) {
3357 if(fAnalysisEtaMode)
3358 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3360 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3364 if(TMath::Abs(pdgcode) == 2212) {
3365 if(fAnalysisEtaMode)
3366 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3369 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3373 }//properly identified as proton
3375 if(fAnalysisEtaMode)
3376 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3379 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3384 }//identified as proton
3388 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3391 //____________________________________________________________________//
3392 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3394 //Checks if the label is used already
3395 Bool_t status = kFALSE;
3396 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3397 if(labelArray.At(i) == label)
3404 //____________________________________________________________________//
3405 void AliProtonQAAnalysis::RunVertexQA(AliGenEventHeader *header,
3408 //Runs the vertex QA
3410 TArrayF primaryVertex(3);
3411 header->PrimaryVertex(primaryVertex);
3413 Int_t nPrimaries = stack->GetNprimary();
3414 ((TH1F *)(fQAVertexList->At(0)))->Fill(nPrimaries);
3417 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
3419 Printf("ERROR: Could not retrieve the TPC vertex");
3422 if(vertexTPC->GetNContributors() > 0) {
3423 ((TH1F *)(fQAVertexList->At(1)))->Fill(nPrimaries);
3424 ((TH2F *)(fQAVertexList->At(2)))->Fill(vertexTPC->GetXv(),
3425 vertexTPC->GetNContributors());
3426 ((TH2F *)(fQAVertexList->At(3)))->Fill(vertexTPC->GetYv(),
3427 vertexTPC->GetNContributors());
3428 ((TH2F *)(fQAVertexList->At(4)))->Fill(vertexTPC->GetZv(),
3429 vertexTPC->GetNContributors());
3430 ((TH1F *)(fQAVertexList->At(5)))->Fill((vertexTPC->GetXv()-primaryVertex[0])*10000.);
3431 ((TH1F *)(fQAVertexList->At(6)))->Fill((vertexTPC->GetYv()-primaryVertex[1])*10000.);
3432 ((TH1F *)(fQAVertexList->At(7)))->Fill((vertexTPC->GetZv()-primaryVertex[2])*10000.);
3433 ((TH1F *)(fQAVertexList->At(8)))->Fill(vertexTPC->GetXRes()*10000.);
3434 ((TH1F *)(fQAVertexList->At(9)))->Fill(vertexTPC->GetYRes()*10000.);
3435 ((TH1F *)(fQAVertexList->At(10)))->Fill(vertexTPC->GetZRes()*10000.);
3439 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
3441 Printf("ERROR: Could not retrieve the SPD vertex");
3444 if(vertexSPD->GetNContributors() > 0) {
3445 ((TH1F *)(fQAVertexList->At(11)))->Fill(nPrimaries);
3446 ((TH2F *)(fQAVertexList->At(12)))->Fill(vertexSPD->GetXv(),
3447 vertexSPD->GetNContributors());
3448 ((TH2F *)(fQAVertexList->At(13)))->Fill(vertexSPD->GetYv(),
3449 vertexSPD->GetNContributors());
3450 ((TH2F *)(fQAVertexList->At(14)))->Fill(vertexSPD->GetZv(),
3451 vertexSPD->GetNContributors());
3452 ((TH1F *)(fQAVertexList->At(15)))->Fill((vertexSPD->GetXv()-primaryVertex[0])*10000.);
3453 ((TH1F *)(fQAVertexList->At(16)))->Fill((vertexSPD->GetYv()-primaryVertex[1])*10000.);
3454 ((TH1F *)(fQAVertexList->At(17)))->Fill((vertexSPD->GetZv()-primaryVertex[2])*10000.);
3455 ((TH1F *)(fQAVertexList->At(18)))->Fill(vertexSPD->GetXRes()*10000.);
3456 ((TH1F *)(fQAVertexList->At(19)))->Fill(vertexSPD->GetYRes()*10000.);
3457 ((TH1F *)(fQAVertexList->At(20)))->Fill(vertexSPD->GetZRes()*10000.);
3461 const AliESDVertex *vertexTracks = esd->GetPrimaryVertex();
3463 Printf("ERROR: Could not retrieve the Tracks vertex");
3466 if(vertexTracks->GetNContributors() > 0) {
3467 ((TH1F *)(fQAVertexList->At(21)))->Fill(nPrimaries);
3468 ((TH2F *)(fQAVertexList->At(22)))->Fill(vertexTracks->GetXv(),
3469 vertexTracks->GetNContributors());
3470 ((TH2F *)(fQAVertexList->At(23)))->Fill(vertexTracks->GetYv(),
3471 vertexTracks->GetNContributors());
3472 ((TH2F *)(fQAVertexList->At(24)))->Fill(vertexTracks->GetZv(),
3473 vertexTracks->GetNContributors());
3474 ((TH1F *)(fQAVertexList->At(25)))->Fill((vertexTracks->GetXv()-primaryVertex[0])*10000.);
3475 ((TH1F *)(fQAVertexList->At(26)))->Fill((vertexTracks->GetYv()-primaryVertex[1])*10000.);
3476 ((TH1F *)(fQAVertexList->At(27)))->Fill((vertexTracks->GetZv()-primaryVertex[2])*10000.);
3477 ((TH1F *)(fQAVertexList->At(28)))->Fill(vertexTracks->GetXRes()*10000.);
3478 ((TH1F *)(fQAVertexList->At(29)))->Fill(vertexTracks->GetYRes()*10000.);
3479 ((TH1F *)(fQAVertexList->At(30)))->Fill(vertexTracks->GetZRes()*10000.);
3484 //____________________________________________________________________//
3485 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3487 const AliESDVertex *vertex) {
3490 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3491 TParticle *particle = stack->Particle(iParticle);
3492 if(!particle) continue;
3494 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3495 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3496 if(fAnalysisEtaMode) {
3497 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3500 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3502 Int_t pdgcode = particle->GetPdgCode();
3503 if(pdgcode == 2212) {
3504 if(fAnalysisEtaMode)
3505 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
3508 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3513 if(pdgcode == -2212) {
3514 if(fAnalysisEtaMode)
3515 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
3518 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3526 Int_t nGoodTracks = esd->GetNumberOfTracks();
3527 TArrayI labelArray(nGoodTracks);
3528 Int_t labelCounter = 0;
3529 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3530 AliESDtrack* track = esd->GetTrack(iTracks);
3531 if(!track) continue;
3533 Int_t label = TMath::Abs(track->GetLabel());
3534 if(IsLabelUsed(labelArray,label)) continue;
3535 labelArray.AddAt(label,labelCounter);
3538 TParticle *particle = stack->Particle(label);
3539 if(!particle) continue;
3540 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3542 AliESDtrack trackTPC;
3544 //in case it's a TPC only track relate it to the proper vertex
3545 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3546 Float_t p[2],cov[3];
3547 track->GetImpactParametersTPC(p,cov);
3548 if (p[0]==0 && p[1]==0)
3549 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3550 if (!track->FillTPCOnlyTrack(trackTPC)) {
3556 Double_t Pt = 0.0, P = 0.0;
3557 Double_t probability[5];
3558 Float_t dcaXY = 0.0, dcaZ = 0.0;
3559 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3561 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3562 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3564 Float_t chi2PerClusterITS = -1;
3565 if (nClustersITS!=0)
3566 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3567 Float_t chi2PerClusterTPC = -1;
3568 if (nClustersTPC!=0)
3569 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3570 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3571 Double_t extCov[15];
3572 track->GetExternalCovariance(extCov);
3576 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3577 if(!tpcTrack) continue;
3578 Pt = tpcTrack->Pt();
3580 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3581 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3584 track->GetTPCpid(probability);
3586 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3587 rcc += probability[i]*GetParticleFraction(i,P);
3588 if(rcc == 0.0) continue;
3590 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3591 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3592 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3593 if(fParticleType == 4) {
3594 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3596 FillQA(stack,esd,vertex,track);
3597 if(IsAccepted(esd,vertex,track)) {
3598 if(label <= stack->GetNprimary()) {
3599 if(track->Charge() > 0) {
3600 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3601 if(track->HasPointOnITSLayer(iLayer))
3602 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3604 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3605 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3606 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3607 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3608 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3609 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3610 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3611 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3612 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3613 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3614 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(tpcTrack->Eta(),
3615 tpcTrack->Phi()*180./TMath::Pi(),
3618 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3619 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3620 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3621 if(fAnalysisEtaMode)
3622 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),Pt);
3624 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3628 }//accepted primary protons
3629 else if(track->Charge() < 0) {
3630 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3631 if(track->HasPointOnITSLayer(iLayer))
3632 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3634 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3635 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3636 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3637 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3638 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3639 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3640 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3641 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3642 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3643 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3644 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(tpcTrack->Eta(),
3645 tpcTrack->Phi()*180./TMath::Pi(),
3648 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3649 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3650 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3651 if(fAnalysisEtaMode)
3652 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),Pt);
3654 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3658 }//accepted primary antiprotons
3659 }//accepted primary particles
3660 else if(label > stack->GetNprimary()) {
3661 Int_t lPartMother = -1;
3662 Int_t motherPDGCode = -1;
3664 lPartMother = particle->GetFirstMother();
3665 TParticle *motherParticle = stack->Particle(lPartMother);
3666 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3669 if(fMCProcessIdFlag)
3670 if(particle->GetUniqueID() != fMCProcessId) continue;
3671 if(fMotherParticlePDGCodeFlag)
3672 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3674 if(track->Charge() > 0) {
3675 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3676 if(track->HasPointOnITSLayer(iLayer))
3677 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3679 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3680 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3681 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3682 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3683 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3684 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3685 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3686 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3687 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3688 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3689 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(tpcTrack->Eta(),
3690 tpcTrack->Phi()*180./TMath::Pi(),
3693 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3694 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3695 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3696 if(fAnalysisEtaMode)
3697 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),Pt);
3699 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3703 if(fAnalysisEtaMode)
3704 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),Pt,
3705 ConvertPDGToInt(motherPDGCode));
3707 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3711 ConvertPDGToInt(motherPDGCode));
3712 }//accepted secondary protons
3713 else if(track->Charge() < 0) {
3714 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3715 if(track->HasPointOnITSLayer(iLayer))
3716 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3718 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3719 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3720 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3721 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3722 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3723 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3724 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3725 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3726 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3727 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3728 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(tpcTrack->Eta(),
3729 tpcTrack->Phi()*180./TMath::Pi(),
3732 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3733 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3734 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3735 if(fAnalysisEtaMode)
3736 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),Pt);
3738 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3742 if(fAnalysisEtaMode)
3743 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),Pt,
3744 ConvertPDGToInt(motherPDGCode));
3746 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3750 ConvertPDGToInt(motherPDGCode));
3751 }//accepted secondary antiprotons
3752 }//accepted secondary particles
3753 }//accepted - track cuts
3755 if(label <= stack->GetNprimary()) {
3756 if(track->Charge() > 0) {
3757 ((TH3D *)(fRejectedCutList->At(0)))->Fill(tpcTrack->Eta(),
3758 tpcTrack->Phi()*180./TMath::Pi(),
3760 if(fAnalysisEtaMode)
3761 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),Pt);
3763 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3768 else if(track->Charge() < 0) {
3769 ((TH3D *)(fRejectedCutList->At(1)))->Fill(tpcTrack->Eta(),
3770 tpcTrack->Phi()*180./TMath::Pi(),
3772 if(fAnalysisEtaMode)
3773 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),Pt);
3775 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3780 }//rejected primary particles
3781 else if(label > stack->GetNprimary()) {
3782 if(track->Charge() > 0) {
3783 ((TH3D *)(fRejectedCutList->At(2)))->Fill(tpcTrack->Eta(),
3784 tpcTrack->Phi()*180./TMath::Pi(),
3786 if(fAnalysisEtaMode)
3787 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),Pt);
3789 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3794 else if(track->Charge() < 0) {
3795 ((TH3D *)(fRejectedCutList->At(3)))->Fill(tpcTrack->Eta(),
3796 tpcTrack->Phi()*180./TMath::Pi(),
3798 if(fAnalysisEtaMode)
3799 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),Pt);
3801 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3806 }//rejected secondary particles
3807 }//rejected - track cuts
3811 else if(!fUseTPCOnly) {
3814 track->GetImpactParameters(dcaXY,dcaZ);
3817 track->GetESDpid(probability);
3819 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3820 rcc += probability[i]*GetParticleFraction(i,P);
3821 if(rcc == 0.0) continue;
3823 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3824 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3825 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3826 if(fParticleType == 4) {
3827 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3829 FillQA(stack,esd,vertex,track);
3830 if(IsAccepted(esd,vertex,track)) {
3831 if(label <= stack->GetNprimary()) {
3832 if(track->Charge() > 0) {
3833 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3834 if(track->HasPointOnITSLayer(iLayer))
3835 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3837 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3838 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3839 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3840 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3841 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3842 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3843 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3844 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3845 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3846 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3847 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(track->Eta(),
3848 track->Phi()*180./TMath::Pi(),
3851 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3852 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3853 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3854 if(fAnalysisEtaMode)
3855 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),Pt);
3857 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3862 else if(track->Charge() < 0) {
3863 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3864 if(track->HasPointOnITSLayer(iLayer))
3865 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3867 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3868 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3869 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3870 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3871 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3872 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3873 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3874 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3875 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3876 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3877 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(track->Eta(),
3878 track->Phi()*180./TMath::Pi(),
3881 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3882 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3883 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3884 if(fAnalysisEtaMode)
3885 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),Pt);
3887 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3892 }//primary particles
3893 else if(label > stack->GetNprimary()) {
3894 Int_t lPartMother = -1;
3895 Int_t motherPDGCode = -1;
3897 lPartMother = particle->GetFirstMother();
3898 TParticle *motherParticle = stack->Particle(lPartMother);
3899 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3902 if(fMCProcessIdFlag)
3903 if(particle->GetUniqueID() != fMCProcessId) continue;
3904 if(fMotherParticlePDGCodeFlag)
3905 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3907 if(track->Charge() > 0) {
3908 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3909 if(track->HasPointOnITSLayer(iLayer))
3910 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3912 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3913 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3914 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3915 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3916 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3917 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3918 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3919 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3920 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3921 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3922 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(track->Eta(),
3923 track->Phi()*180./TMath::Pi(),
3926 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3927 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3928 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3929 if(fAnalysisEtaMode)
3930 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),Pt);
3932 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3936 if(fAnalysisEtaMode)
3937 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),Pt,
3938 ConvertPDGToInt(motherPDGCode));
3940 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3944 ConvertPDGToInt(motherPDGCode));
3946 else if(track->Charge() < 0) {
3947 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3948 if(track->HasPointOnITSLayer(iLayer))
3949 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3951 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3952 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3953 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3954 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3955 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3956 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3957 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3958 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3959 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3960 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3961 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(track->Eta(),
3962 track->Phi()*180./TMath::Pi(),
3965 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3966 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3967 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3968 if(fAnalysisEtaMode)
3969 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),Pt);
3971 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3975 if(fAnalysisEtaMode)
3976 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),Pt,
3977 ConvertPDGToInt(motherPDGCode));
3979 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3983 ConvertPDGToInt(motherPDGCode));
3985 }//secondary particles
3986 }//accepted - track cuts
3987 else if(!IsAccepted(esd,vertex,track)) {
3988 if(label <= stack->GetNprimary()) {
3989 if(track->Charge() > 0) {
3990 ((TH3D *)(fRejectedCutList->At(0)))->Fill(track->Eta(),
3991 track->Phi()*180./TMath::Pi(),
3993 if(fAnalysisEtaMode)
3994 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),Pt);
3996 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
4001 else if(track->Charge() < 0) {
4002 ((TH3D *)(fRejectedCutList->At(1)))->Fill(track->Eta(),
4003 track->Phi()*180./TMath::Pi(),
4005 if(fAnalysisEtaMode)
4006 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),Pt);
4008 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
4013 }//primary particles
4014 else if(label > stack->GetNprimary()) {
4015 if(track->Charge() > 0) {
4016 ((TH3D *)(fRejectedCutList->At(2)))->Fill(track->Eta(),
4017 track->Phi()*180./TMath::Pi(),
4019 if(fAnalysisEtaMode)
4020 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),Pt);
4022 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
4027 else if(track->Charge() < 0) {
4028 ((TH3D *)(fRejectedCutList->At(3)))->Fill(track->Eta(),
4029 track->Phi()*180./TMath::Pi(),
4031 if(fAnalysisEtaMode)
4032 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),Pt);
4034 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
4039 }//secondary particles
4040 }//rejected - track cuts
4042 }//combined tracking
4047 //____________________________________________________________________//
4048 void AliProtonQAAnalysis::InitMCAnalysis() {
4049 //MC analysis - 3D histograms: y-pT-pdg
4050 fPDGList = new TList();
4051 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
4052 ";;P_{T} [GeV/c];PDG",
4053 fNBinsY,fMinY,fMaxY,
4054 fNBinsPt,fMinPt,fMaxPt,
4056 if(fAnalysisEtaMode)
4057 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
4059 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
4060 fPDGList->Add(gHistYPtPDGProtons);
4061 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
4062 ";;P_{T} [GeV/c];PDG",
4063 fNBinsY,fMinY,fMaxY,
4064 fNBinsPt,fMinPt,fMaxPt,
4066 if(fAnalysisEtaMode)
4067 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
4069 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
4070 fPDGList->Add(gHistYPtPDGAntiProtons);
4073 fMCProcessesList = new TList();
4074 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
4075 fMCProcessesList->Add(gHistProtonsFromKLProcess);
4076 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
4077 fMCProcessesList->Add(gHistProtonsFromPionProcess);
4078 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
4079 fMCProcessesList->Add(gHistProtonsFromKSProcess);
4080 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
4081 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
4082 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
4083 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
4084 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
4085 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
4086 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
4087 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
4088 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
4089 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
4090 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4091 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
4092 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
4093 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
4094 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
4095 fMCProcessesList->Add(gHistProtonsFromXi0Process);
4096 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
4097 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
4099 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
4100 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
4101 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
4102 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
4103 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
4104 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
4105 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
4106 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
4107 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
4108 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
4109 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
4110 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
4111 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
4112 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
4113 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4114 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
4117 //____________________________________________________________________//
4118 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
4119 //Main analysis part - MC
4120 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
4121 TParticle *particle = stack->Particle(iParticle);
4122 if(!particle) continue;
4124 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
4125 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
4126 if(fAnalysisEtaMode) {
4127 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
4130 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4133 Int_t pdgcode = particle->GetPdgCode();
4134 if(pdgcode == 2212) {
4135 if(iParticle <= stack->GetNprimary()) {
4136 if(fAnalysisEtaMode)
4137 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
4139 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
4144 else if(iParticle > stack->GetNprimary()) {
4145 Int_t lPartMother = particle->GetFirstMother();
4146 TParticle *motherParticle = stack->Particle(lPartMother);
4147 if(!motherParticle) continue;
4148 Int_t motherPDGCode = motherParticle->GetPdgCode();
4149 if(fMCProcessIdFlag)
4150 if(particle->GetUniqueID() != fMCProcessId) continue;
4151 if(fMotherParticlePDGCodeFlag)
4152 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4154 if(fAnalysisEtaMode)
4155 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
4157 ConvertPDGToInt(motherParticle->GetPdgCode()));
4159 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
4163 ConvertPDGToInt(motherParticle->GetPdgCode()));
4165 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4166 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
4167 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4168 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
4169 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4170 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
4171 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4172 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
4173 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4174 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
4175 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4176 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
4177 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
4178 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
4179 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4180 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
4181 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4182 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
4183 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
4184 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
4185 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
4186 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
4187 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
4188 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
4190 }//pdgcode of proton
4192 if(pdgcode == -2212) {
4193 if(iParticle <= stack->GetNprimary()) {
4194 if(fAnalysisEtaMode)
4195 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
4197 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
4202 else if(iParticle > stack->GetNprimary()) {
4203 Int_t lPartMother = particle->GetFirstMother();
4204 TParticle *motherParticle = stack->Particle(lPartMother);
4205 if(!motherParticle) continue;
4206 Int_t motherPDGCode = motherParticle->GetPdgCode();
4207 if(fMCProcessIdFlag)
4208 if(particle->GetUniqueID() != fMCProcessId) continue;
4209 if(fMotherParticlePDGCodeFlag)
4210 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4212 if(fAnalysisEtaMode)
4213 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
4215 ConvertPDGToInt(motherParticle->GetPdgCode()));
4217 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
4221 ConvertPDGToInt(motherParticle->GetPdgCode()));
4224 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4225 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
4226 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4227 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
4228 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4229 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
4230 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4231 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
4232 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4233 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
4234 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4235 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
4236 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4237 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
4238 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4239 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
4240 }//secondary antiproton
4241 }//pdgcode of antiproton
4246 //____________________________________________________________________//
4247 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
4248 //Converts the pdg code to an int based on the following scheme:
4249 //1: PDG code: 130 - Name: K_L0
4250 //2: PDG code: 211 - Name: pi+
4251 //3: PDG code: 310 - Name: K_S0
4252 //4: PDG code: 321 - Name: K+
4253 //5: PDG code: 2112 - Name: neutron
4254 //6: PDG code: 2212 - Name: proton
4255 //7: PDG code: 3112 - Name: Sigma-
4256 //8: PDG code: 3122 - Name: Lambda0
4257 //9: PDG code: 3222 - Name: Sigma+
4258 //10: PDG code: 3312 - Name: Xi-
4259 //11: PDG code: 3322 - Name: Xi0
4260 //12: PDG code: 3334 - Name: Omega-
4262 switch (TMath::Abs(pdgCode)) {
4320 //________________________________________________________________________
4321 /*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
4325 // Get the vertex from the ESD and returns it if the vertex is valid
4326 // depending on the analysis mode: TPC - Hybrid - Global
4327 const AliESDVertex* vertex = 0;
4328 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
4329 Double_t kBz = esd->GetMagneticField();
4330 AliVertexerTracks vertexer(kBz);
4331 vertexer.SetTPCMode();
4332 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
4333 esd->SetPrimaryVertexTPC(vTPC);
4334 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
4335 AliESDtrack *t = esd->GetTrack(i);
4336 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
4339 vertex = esd->GetPrimaryVertexTPC();
4341 else if(fUseHybridTPC)
4342 vertex = esd->GetPrimaryVertexSPD();
4343 else if(!fUseTPCOnly)
4344 vertex = esd->GetPrimaryVertex();
4346 Printf("GetVertex: ERROR: Invalid analysis mode");
4348 if(!vertex) return 0;
4350 // check Ncontributors
4351 if(vertex->GetNContributors() <= 0) return 0;
4354 Double_t zRes = vertex->GetZRes();
4355 if(zRes == 0) return 0;
4358 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
4359 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
4360 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;