1 /**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
5 * Permission to use, copy, modify and distribute this software and its *
6 * documentation strictly for non-commercial purposes is hereby granted *
7 * without fee, provided that the above copyright notice appears in all *
8 * copies and that both the copyright notice and this permission notice *
9 * appear in the supporting documentation. The authors make no claims *
10 * about the suitability of this software for any purpose. It is *
11 * provided "as is" without express or implied warranty. *
12 **************************************************************************/
14 /* $Id: AliProtonQAAnalysis.cxx 29114 2008-10-03 16:49:02Z pchrist $ */
16 //-----------------------------------------------------------------
17 // AliProtonQAAnalysis class
18 // This is the class to deal with the proton analysis
19 // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
21 #include <Riostream.h>
29 #include <TParticle.h>
31 #include "AliProtonQAAnalysis.h"
33 #include <AliExternalTrackParam.h>
34 #include <AliESDEvent.h>
39 ClassImp(AliProtonQAAnalysis)
41 //____________________________________________________________________//
42 AliProtonQAAnalysis::AliProtonQAAnalysis() :
44 fNBinsY(0), fMinY(0), fMaxY(0),
45 fNBinsPt(0), fMinPt(0), fMaxPt(0),
46 fMinTPCClusters(0), fMinITSClusters(0),
47 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
48 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
49 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
50 fMaxDCAXY(0), fMaxDCAXYTPC(0),
51 fMaxDCAZ(0), fMaxDCAZTPC(0),
53 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
54 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
55 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
56 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
57 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
58 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
59 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
60 fMaxConstrainChi2Flag(kFALSE),
61 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
62 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
63 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
64 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
65 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
66 fGlobalQAList(0), fQA2DList(0),
67 fQAPrimaryProtonsAcceptedList(0),
68 fQAPrimaryProtonsRejectedList(0),
69 fQASecondaryProtonsAcceptedList(0),
70 fQASecondaryProtonsRejectedList(0),
71 fQAPrimaryAntiProtonsAcceptedList(0),
72 fQAPrimaryAntiProtonsRejectedList(0),
73 fQASecondaryAntiProtonsAcceptedList(0),
74 fQASecondaryAntiProtonsRejectedList(0),
75 fFunctionProbabilityFlag(kFALSE),
76 fElectronFunction(0), fMuonFunction(0),
77 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
78 fUseTPCOnly(kFALSE), fUseHybridTPC(kFALSE),
79 fPDGList(0), fMCProcessesList(0),
80 fRunMCAnalysis(kFALSE),
81 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
82 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
83 fAcceptedCutList(0), fRejectedCutList(0),
84 fAcceptedDCAList(0), fRejectedDCAList(0),
85 fRunEfficiencyAnalysis(kFALSE), fEfficiencyList(0) {
87 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
90 //____________________________________________________________________//
91 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
93 if(fGlobalQAList) delete fGlobalQAList;
94 if(fQA2DList) delete fQA2DList;
95 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
96 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
97 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
98 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
99 if(fQAPrimaryAntiProtonsAcceptedList)
100 delete fQAPrimaryAntiProtonsAcceptedList;
101 if(fQAPrimaryAntiProtonsRejectedList)
102 delete fQAPrimaryAntiProtonsRejectedList;
103 if(fQASecondaryAntiProtonsAcceptedList)
104 delete fQASecondaryAntiProtonsAcceptedList;
105 if(fQASecondaryAntiProtonsRejectedList)
106 delete fQASecondaryAntiProtonsRejectedList;
108 if(fPDGList) delete fPDGList;
109 if(fMCProcessesList) delete fMCProcessesList;
111 if(fAcceptedCutList) delete fAcceptedCutList;
112 if(fRejectedCutList) delete fRejectedCutList;
113 if(fAcceptedDCAList) delete fAcceptedDCAList;
114 if(fRejectedDCAList) delete fRejectedDCAList;
116 if(fEfficiencyList) delete fEfficiencyList;
119 //____________________________________________________________________//
120 Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
122 if(fFunctionProbabilityFlag) {
123 if(i == 0) partFrac = fElectronFunction->Eval(p);
124 if(i == 1) partFrac = fMuonFunction->Eval(p);
125 if(i == 2) partFrac = fPionFunction->Eval(p);
126 if(i == 3) partFrac = fKaonFunction->Eval(p);
127 if(i == 4) partFrac = fProtonFunction->Eval(p);
129 else partFrac = fPartFrac[i];
134 //____________________________________________________________________//
135 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDtrack* track) {
136 // Checks if the track is excluded from the cuts
137 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
138 Float_t dcaXY = 0.0, dcaZ = 0.0;
140 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
141 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
143 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
144 dcaXY = -100.0, dcaZ = -100.0;
151 track->GetImpactParametersTPC(dcaXY,dcaZ);
154 else if(fUseHybridTPC) {
155 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
157 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
158 dcaXY = -100.0, dcaZ = -100.0;
165 track->GetImpactParameters(dcaXY,dcaZ);
173 track->GetImpactParameters(dcaXY,dcaZ);
177 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
178 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
180 Float_t chi2PerClusterITS = -1;
182 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
183 Float_t chi2PerClusterTPC = -1;
185 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
188 track->GetExternalCovariance(extCov);
190 if(fPointOnITSLayer1Flag)
191 if(!track->HasPointOnITSLayer(0)) return kFALSE;
192 if(fPointOnITSLayer2Flag)
193 if(!track->HasPointOnITSLayer(1)) return kFALSE;
194 if(fPointOnITSLayer3Flag)
195 if(!track->HasPointOnITSLayer(2)) return kFALSE;
196 if(fPointOnITSLayer4Flag)
197 if(!track->HasPointOnITSLayer(3)) return kFALSE;
198 if(fPointOnITSLayer5Flag)
199 if(!track->HasPointOnITSLayer(4)) return kFALSE;
200 if(fPointOnITSLayer6Flag)
201 if(!track->HasPointOnITSLayer(5)) return kFALSE;
202 if(fMinITSClustersFlag)
203 if(nClustersITS < fMinITSClusters) return kFALSE;
204 if(fMaxChi2PerITSClusterFlag)
205 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
206 if(fMinTPCClustersFlag)
207 if(nClustersTPC < fMinTPCClusters) return kFALSE;
208 if(fMaxChi2PerTPCClusterFlag)
209 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
211 if(extCov[0] > fMaxCov11) return kFALSE;
213 if(extCov[2] > fMaxCov22) return kFALSE;
215 if(extCov[5] > fMaxCov33) return kFALSE;
217 if(extCov[9] > fMaxCov44) return kFALSE;
219 if(extCov[14] > fMaxCov55) return kFALSE;
220 if(fMaxSigmaToVertexFlag)
221 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
222 if(fMaxSigmaToVertexTPCFlag)
223 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
225 if(TMath::Abs(dcaXY) > fMaxDCAXY) return kFALSE;
227 if(TMath::Abs(dcaXY) > fMaxDCAXYTPC) return kFALSE;
229 if(TMath::Abs(dcaZ) > fMaxDCAZ) return kFALSE;
231 if(TMath::Abs(dcaZ) > fMaxDCAZTPC) return kFALSE;
232 if(fMaxConstrainChi2Flag) {
233 if(track->GetConstrainedChi2() > 0)
234 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
237 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
239 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
241 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
243 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
245 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
246 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
252 //____________________________________________________________________//
253 void AliProtonQAAnalysis::FillQA(AliESDtrack* track, AliStack *stack) {
254 // Checks if the track is excluded from the cuts
255 Int_t nPrimaries = stack->GetNprimary();
256 Int_t label = TMath::Abs(track->GetLabel());
258 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
259 Float_t dcaXY = 0.0, dcaZ = 0.0;
260 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
261 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
263 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
264 dcaXY = -100.0, dcaZ = -100.0;
271 track->GetImpactParametersTPC(dcaXY,dcaZ);
274 else if(fUseHybridTPC) {
275 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
277 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
278 dcaXY = -100.0, dcaZ = -100.0;
285 track->GetImpactParameters(dcaXY,dcaZ);
293 track->GetImpactParameters(dcaXY,dcaZ);
297 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
298 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
300 Float_t chi2PerClusterITS = -1;
302 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
303 Float_t chi2PerClusterTPC = -1;
305 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
308 track->GetExternalCovariance(extCov);
310 //cout<<"Charge: "<<track->Charge()<<
311 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
312 //" - TPC clusters: "<<nClustersTPC<<endl;
314 if(track->Charge() > 0) {
316 if(label <= nPrimaries) {
317 if(fMinITSClustersFlag) {
318 if(nClustersITS < fMinITSClusters) {
319 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
322 else if(nClustersITS >= fMinITSClusters)
323 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
325 if(fMaxChi2PerITSClusterFlag) {
326 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
327 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
330 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
331 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
332 }//chi2 per ITS cluster
333 if(fMinTPCClustersFlag) {
334 if(nClustersTPC < fMinTPCClusters) {
335 //cout<<"Primary proton rejected"<<endl;
336 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
339 else if(nClustersTPC >= fMinTPCClusters) {
340 //cout<<"Primary proton accepted"<<endl;
341 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
344 if(fMaxChi2PerTPCClusterFlag) {
345 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
346 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
349 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
350 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
351 }//chi2 per TPC cluster
353 if(extCov[0] > fMaxCov11) {
354 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
357 else if(extCov[0] <= fMaxCov11)
358 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
361 if(extCov[2] > fMaxCov22) {
362 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
365 else if(extCov[2] <= fMaxCov22)
366 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
369 if(extCov[5] > fMaxCov33) {
370 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
373 else if(extCov[5] <= fMaxCov33)
374 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
377 if(extCov[9] > fMaxCov44) {
378 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
381 else if(extCov[9] <= fMaxCov44)
382 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
385 if(extCov[14] > fMaxCov55) {
386 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
389 else if(extCov[14] <= fMaxCov55)
390 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
392 if(fMaxSigmaToVertexFlag) {
393 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
394 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
397 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
398 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
400 if(fMaxSigmaToVertexTPCFlag) {
401 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
402 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
405 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
406 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
407 }//sigma to vertex TPC
409 if(dcaXY > fMaxDCAXY) {
410 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(dcaXY);
413 else if(dcaXY <= fMaxDCAXY)
414 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
415 }//DCA xy global tracking
416 if(fMaxDCAXYTPCFlag) {
417 if(dcaXY > fMaxDCAXYTPC) {
418 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(dcaXY);
421 else if(dcaXY <= fMaxDCAXYTPC)
422 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
423 }//DCA xy TPC tracking
425 if(dcaZ > fMaxDCAZ) {
426 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(dcaZ);
429 else if(dcaZ <= fMaxDCAZ)
430 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
431 }//DCA z global tracking
432 if(fMaxDCAZTPCFlag) {
433 if(dcaZ > fMaxDCAZTPC) {
434 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(dcaZ);
437 else if(dcaZ <= fMaxDCAZTPC)
438 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
439 }//DCA z TPC tracking
440 if(fMaxConstrainChi2Flag) {
441 if(track->GetConstrainedChi2() > 0) {
442 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
443 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
446 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
447 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
449 }//constrain chi2 - vertex
451 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
452 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
455 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
456 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
459 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
460 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
463 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
464 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
467 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
468 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
471 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
472 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
475 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
476 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
479 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
480 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
482 if(fPointOnITSLayer1Flag) {
483 if(!track->HasPointOnITSLayer(0)) {
484 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
486 else if(track->HasPointOnITSLayer(0))
487 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
489 if(fPointOnITSLayer2Flag) {
490 if(!track->HasPointOnITSLayer(1)) {
491 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
493 else if(track->HasPointOnITSLayer(1))
494 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
496 if(fPointOnITSLayer3Flag) {
497 if(!track->HasPointOnITSLayer(2)) {
498 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
500 else if(track->HasPointOnITSLayer(2))
501 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
503 if(fPointOnITSLayer4Flag) {
504 if(!track->HasPointOnITSLayer(3)) {
505 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
507 else if(track->HasPointOnITSLayer(3))
508 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
510 if(fPointOnITSLayer5Flag) {
511 if(!track->HasPointOnITSLayer(4)) {
512 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
514 else if(track->HasPointOnITSLayer(4))
515 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
517 if(fPointOnITSLayer6Flag) {
518 if(!track->HasPointOnITSLayer(5)) {
519 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
521 else if(track->HasPointOnITSLayer(5))
522 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
524 }//primary particle cut
527 if(label > nPrimaries) {
528 if(fMinITSClustersFlag) {
529 if(nClustersITS < fMinITSClusters) {
530 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
533 else if(nClustersITS >= fMinITSClusters)
534 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
536 if(fMaxChi2PerITSClusterFlag) {
537 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
538 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
541 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
542 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
543 }//chi2 per ITS cluster
544 if(fMinTPCClustersFlag) {
545 if(nClustersTPC < fMinTPCClusters) {
546 //cout<<"Secondary proton rejected"<<endl;
547 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
550 else if(nClustersTPC >= fMinTPCClusters) {
551 //cout<<"Secondary proton accepted"<<endl;
552 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
555 if(fMaxChi2PerTPCClusterFlag) {
556 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
557 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
560 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
561 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
562 }//chi2 per TPC cluster
564 if(extCov[0] > fMaxCov11) {
565 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
568 else if(extCov[0] <= fMaxCov11)
569 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
572 if(extCov[2] > fMaxCov22) {
573 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
576 else if(extCov[2] <= fMaxCov22)
577 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
580 if(extCov[5] > fMaxCov33) {
581 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
584 else if(extCov[5] <= fMaxCov33)
585 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
588 if(extCov[9] > fMaxCov44) {
589 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
592 else if(extCov[9] <= fMaxCov44)
593 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
596 if(extCov[14] > fMaxCov55) {
597 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
600 else if(extCov[14] <= fMaxCov55)
601 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
603 if(fMaxSigmaToVertexFlag) {
604 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
605 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
608 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
609 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
611 if(fMaxSigmaToVertexTPCFlag) {
612 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
613 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
616 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
617 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
618 }//sigma to vertex TPC
620 if(dcaXY > fMaxDCAXY) {
621 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(dcaXY);
624 else if(dcaXY <= fMaxDCAXY)
625 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
626 }//DCA xy global tracking
627 if(fMaxDCAXYTPCFlag) {
628 if(dcaXY > fMaxDCAXYTPC) {
629 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(dcaXY);
632 else if(dcaXY <= fMaxDCAXYTPC)
633 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
634 }//DCA xy TPC tracking
636 if(dcaZ > fMaxDCAZ) {
637 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(dcaZ);
640 else if(dcaZ <= fMaxDCAZ)
641 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
642 }//DCA z global tracking
643 if(fMaxDCAZTPCFlag) {
644 if(dcaZ > fMaxDCAZTPC) {
645 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(dcaZ);
648 else if(dcaZ <= fMaxDCAZTPC)
649 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
650 }//DCA z TPC tracking
651 if(fMaxConstrainChi2Flag) {
652 if(track->GetConstrainedChi2() > 0) {
653 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
654 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
657 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
658 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
660 }//constrain chi2 - vertex
662 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
663 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
666 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
667 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
670 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
671 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
674 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
675 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
678 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
679 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
682 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
683 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
686 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
687 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
690 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
691 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
693 if(fPointOnITSLayer1Flag) {
694 if(!track->HasPointOnITSLayer(0)) {
695 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
697 else if(track->HasPointOnITSLayer(0))
698 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
700 if(fPointOnITSLayer2Flag) {
701 if(!track->HasPointOnITSLayer(1)) {
702 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
704 else if(track->HasPointOnITSLayer(1))
705 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
707 if(fPointOnITSLayer3Flag) {
708 if(!track->HasPointOnITSLayer(2)) {
709 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
711 else if(track->HasPointOnITSLayer(2))
712 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
714 if(fPointOnITSLayer4Flag) {
715 if(!track->HasPointOnITSLayer(3)) {
716 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
718 else if(track->HasPointOnITSLayer(3))
719 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
721 if(fPointOnITSLayer5Flag) {
722 if(!track->HasPointOnITSLayer(4)) {
723 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
725 else if(track->HasPointOnITSLayer(4))
726 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
728 if(fPointOnITSLayer6Flag) {
729 if(!track->HasPointOnITSLayer(5)) {
730 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
732 else if(track->HasPointOnITSLayer(5))
733 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
735 }//secondary particle cut
739 if(track->Charge() < 0) {
741 if(label <= nPrimaries) {
742 if(fMinITSClustersFlag) {
743 if(nClustersITS < fMinITSClusters) {
744 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
747 else if(nClustersITS >= fMinITSClusters)
748 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
750 if(fMaxChi2PerITSClusterFlag) {
751 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
752 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
755 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
756 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
757 }//chi2 per ITS cluster
758 if(fMinTPCClustersFlag) {
759 if(nClustersTPC < fMinTPCClusters) {
760 //cout<<"Primary antiproton rejected"<<endl;
761 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
764 else if(nClustersTPC >= fMinTPCClusters) {
765 //cout<<"Primary antiproton accepted"<<endl;
766 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
769 if(fMaxChi2PerTPCClusterFlag) {
770 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
771 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
774 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
775 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
776 }//chi2 per TPC cluster
778 if(extCov[0] > fMaxCov11) {
779 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
782 else if(extCov[0] <= fMaxCov11)
783 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
786 if(extCov[2] > fMaxCov22) {
787 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
790 else if(extCov[2] <= fMaxCov22)
791 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
794 if(extCov[5] > fMaxCov33) {
795 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
798 else if(extCov[5] <= fMaxCov33)
799 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
802 if(extCov[9] > fMaxCov44) {
803 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
806 else if(extCov[9] <= fMaxCov44)
807 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
810 if(extCov[14] > fMaxCov55) {
811 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
814 else if(extCov[14] <= fMaxCov55)
815 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
817 if(fMaxSigmaToVertexFlag) {
818 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
819 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
822 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
823 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
825 if(fMaxSigmaToVertexTPCFlag) {
826 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
827 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
830 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
831 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
832 }//sigma to vertex TPC
834 if(dcaXY > fMaxDCAXY) {
835 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
838 else if(dcaXY <= fMaxDCAXY)
839 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
840 }//DCA xy global tracking
841 if(fMaxDCAXYTPCFlag) {
842 if(dcaXY > fMaxDCAXYTPC) {
843 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
846 else if(dcaXY <= fMaxDCAXYTPC)
847 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
848 }//DCA xy TPC tracking
850 if(dcaZ > fMaxDCAZ) {
851 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
854 else if(dcaZ <= fMaxDCAZ)
855 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
856 }//DCA z global tracking
857 if(fMaxDCAZTPCFlag) {
858 if(dcaZ > fMaxDCAZTPC) {
859 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
862 else if(dcaZ <= fMaxDCAZTPC)
863 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
864 }//DCA z TPC tracking
865 if(fMaxConstrainChi2Flag) {
866 if(track->GetConstrainedChi2() > 0) {
867 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
868 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
871 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
872 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
874 }//constrain chi2 - vertex
876 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
877 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
880 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
881 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
884 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
885 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
888 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
889 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
892 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
893 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
896 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
897 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
900 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
901 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
904 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
905 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
907 if(fPointOnITSLayer1Flag) {
908 if(!track->HasPointOnITSLayer(0)) {
909 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
911 else if(track->HasPointOnITSLayer(0))
912 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
914 if(fPointOnITSLayer2Flag) {
915 if(!track->HasPointOnITSLayer(1)) {
916 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
918 else if(track->HasPointOnITSLayer(1))
919 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
921 if(fPointOnITSLayer3Flag) {
922 if(!track->HasPointOnITSLayer(2)) {
923 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
925 else if(track->HasPointOnITSLayer(2))
926 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
928 if(fPointOnITSLayer4Flag) {
929 if(!track->HasPointOnITSLayer(3)) {
930 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
932 else if(track->HasPointOnITSLayer(3))
933 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
935 if(fPointOnITSLayer5Flag) {
936 if(!track->HasPointOnITSLayer(4)) {
937 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
939 else if(track->HasPointOnITSLayer(4))
940 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
942 if(fPointOnITSLayer6Flag) {
943 if(!track->HasPointOnITSLayer(5)) {
944 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
946 else if(track->HasPointOnITSLayer(5))
947 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
949 }//primary particle cut
952 if(label > nPrimaries) {
953 if(fMinITSClustersFlag) {
954 if(nClustersITS < fMinITSClusters) {
955 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
958 else if(nClustersITS >= fMinITSClusters)
959 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
961 if(fMaxChi2PerITSClusterFlag) {
962 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
963 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
966 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
967 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
968 }//chi2 per ITS cluster
969 if(fMinTPCClustersFlag) {
970 if(nClustersTPC < fMinTPCClusters) {
971 //cout<<"Secondary antiproton rejected"<<endl;
972 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
975 else if(nClustersTPC >= fMinTPCClusters) {
976 //cout<<"Secondary antiproton accepted"<<endl;
977 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
980 if(fMaxChi2PerTPCClusterFlag) {
981 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
982 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
985 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
986 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
987 }//chi2 per TPC cluster
989 if(extCov[0] > fMaxCov11) {
990 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
993 else if(extCov[0] <= fMaxCov11)
994 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
997 if(extCov[2] > fMaxCov22) {
998 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1001 else if(extCov[2] <= fMaxCov22)
1002 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1005 if(extCov[5] > fMaxCov33) {
1006 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1009 else if(extCov[5] <= fMaxCov33)
1010 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1013 if(extCov[9] > fMaxCov44) {
1014 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1017 else if(extCov[9] <= fMaxCov44)
1018 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1021 if(extCov[14] > fMaxCov55) {
1022 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1025 else if(extCov[14] <= fMaxCov55)
1026 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1028 if(fMaxSigmaToVertexFlag) {
1029 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1030 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1033 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1034 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1036 if(fMaxSigmaToVertexTPCFlag) {
1037 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1038 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1041 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1042 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1043 }//sigma to vertex TPC
1045 if(dcaXY > fMaxDCAXY) {
1046 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
1049 else if(dcaXY <= fMaxDCAXY)
1050 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
1051 }//DCA xy global tracking
1052 if(fMaxDCAXYTPCFlag) {
1053 if(dcaXY > fMaxDCAXYTPC) {
1054 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
1057 else if(dcaXY <= fMaxDCAXYTPC)
1058 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
1059 }//DCA xy TPC tracking
1061 if(dcaZ > fMaxDCAZ) {
1062 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
1065 else if(dcaZ <= fMaxDCAZ)
1066 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
1067 }//DCA z global tracking
1068 if(fMaxDCAZTPCFlag) {
1069 if(dcaZ > fMaxDCAZTPC) {
1070 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
1073 else if(dcaZ <= fMaxDCAZTPC)
1074 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
1075 }//DCA z TPC tracking
1076 if(fMaxConstrainChi2Flag) {
1077 if(track->GetConstrainedChi2() > 0) {
1078 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1079 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1082 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1083 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1085 }//constrain chi2 - vertex
1087 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1088 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1091 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1092 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1095 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1096 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1099 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1100 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1103 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1104 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1107 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1108 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1111 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1112 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1115 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1116 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1118 if(fPointOnITSLayer1Flag) {
1119 if(!track->HasPointOnITSLayer(0)) {
1120 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1122 else if(track->HasPointOnITSLayer(0))
1123 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1125 if(fPointOnITSLayer2Flag) {
1126 if(!track->HasPointOnITSLayer(1)) {
1127 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1129 else if(track->HasPointOnITSLayer(1))
1130 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1132 if(fPointOnITSLayer3Flag) {
1133 if(!track->HasPointOnITSLayer(2)) {
1134 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1136 else if(track->HasPointOnITSLayer(2))
1137 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1139 if(fPointOnITSLayer4Flag) {
1140 if(!track->HasPointOnITSLayer(3)) {
1141 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1143 else if(track->HasPointOnITSLayer(3))
1144 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1146 if(fPointOnITSLayer5Flag) {
1147 if(!track->HasPointOnITSLayer(4)) {
1148 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1150 else if(track->HasPointOnITSLayer(4))
1151 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1153 if(fPointOnITSLayer6Flag) {
1154 if(!track->HasPointOnITSLayer(5)) {
1155 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1157 else if(track->HasPointOnITSLayer(5))
1158 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1160 }//secondary particle cut
1164 //____________________________________________________________________//
1165 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1166 // Calculates the number of sigma to the vertex.
1171 if((fUseTPCOnly)&&(!fUseHybridTPC))
1172 esdTrack->GetImpactParametersTPC(b,bCov);
1174 esdTrack->GetImpactParameters(b,bCov);
1176 if (bCov[0]<=0 || bCov[2]<=0) {
1177 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1178 bCov[0]=0; bCov[2]=0;
1180 bRes[0] = TMath::Sqrt(bCov[0]);
1181 bRes[1] = TMath::Sqrt(bCov[2]);
1183 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1185 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1187 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1189 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1194 //____________________________________________________________________//
1195 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1196 //returns the rapidity of the proton - to be removed
1197 Double_t fMass = 9.38270000000000048e-01;
1199 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1200 TMath::Power(Py,2) +
1201 TMath::Power(Pz,2));
1202 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1205 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1210 //____________________________________________________________________//
1211 void AliProtonQAAnalysis::SetRunQAAnalysis() {
1212 //initializes the QA lists
1213 //fQAHistograms = kTRUE;
1214 fGlobalQAList = new TList();
1215 fQA2DList = new TList();
1216 fQA2DList->SetName("fQA2DList");
1217 fGlobalQAList->Add(fQA2DList);
1219 fQAPrimaryProtonsAcceptedList = new TList();
1220 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1221 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1223 fQAPrimaryProtonsRejectedList = new TList();
1224 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1225 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1227 fQASecondaryProtonsAcceptedList = new TList();
1228 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1229 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1231 fQASecondaryProtonsRejectedList = new TList();
1232 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1233 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1235 fQAPrimaryAntiProtonsAcceptedList = new TList();
1236 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1237 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1239 fQAPrimaryAntiProtonsRejectedList = new TList();
1240 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1241 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1243 fQASecondaryAntiProtonsAcceptedList = new TList();
1244 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1245 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1247 fQASecondaryAntiProtonsRejectedList = new TList();
1248 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1249 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1252 //____________________________________________________________________//
1253 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1254 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1255 //Initializes the QA binning
1257 fMinY = minY; fMaxY = maxY;
1259 fMinPt = minPt; fMaxPt = maxPt;
1262 if(fRunMCAnalysis) InitMCAnalysis();
1263 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1266 //____________________________________________________________________//
1267 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1268 //Initialization of the efficiency list - reconstruction & PID efficiency
1269 //Adding each monitored object in the list
1270 fEfficiencyList = new TList();
1272 //MC primary protons and antiprotons for the reconstruction efficiency
1273 TH2D *gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1275 fNBinsY,fMinY,fMaxY,
1276 fNBinsPt,fMinPt,fMaxPt);
1277 gHistMCYPtProtons->SetStats(kTRUE);
1278 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1279 fEfficiencyList->Add(gHistMCYPtProtons);
1280 TH2D *gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1282 fNBinsY,fMinY,fMaxY,
1283 fNBinsPt,fMinPt,fMaxPt);
1284 gHistMCYPtAntiProtons->SetStats(kTRUE);
1285 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1286 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1288 //ESD primary protons and antiprotons for the reconstruction efficiency
1289 TH2D *gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1291 fNBinsY,fMinY,fMaxY,
1292 fNBinsPt,fMinPt,fMaxPt);
1293 gHistESDYPtProtons->SetStats(kTRUE);
1294 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1295 fEfficiencyList->Add(gHistESDYPtProtons);
1296 TH2D *gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1298 fNBinsY,fMinY,fMaxY,
1299 fNBinsPt,fMinPt,fMaxPt);
1300 gHistESDYPtAntiProtons->SetStats(kTRUE);
1301 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1302 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1304 //ESD reconstructed tracks that were initially protons for the PID efficiency
1305 TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
1307 fNBinsY,fMinY,fMaxY,
1308 fNBinsPt,fMinPt,fMaxPt);
1309 gHistESDInitYPtProtons->SetStats(kTRUE);
1310 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1311 fEfficiencyList->Add(gHistESDInitYPtProtons);
1313 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1314 TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
1316 fNBinsY,fMinY,fMaxY,
1317 fNBinsPt,fMinPt,fMaxPt);
1318 gHistESDIdYPtProtons->SetStats(kTRUE);
1319 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1320 fEfficiencyList->Add(gHistESDIdYPtProtons);
1322 //ESD reconstructed tracks that were identified as protons for the PID contamination
1323 TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
1325 fNBinsY,fMinY,fMaxY,
1326 fNBinsPt,fMinPt,fMaxPt);
1327 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1328 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1329 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1331 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1332 TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
1334 fNBinsY,fMinY,fMaxY,
1335 fNBinsPt,fMinPt,fMaxPt);
1336 gHistESDContamYPtProtons->SetStats(kTRUE);
1337 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1338 fEfficiencyList->Add(gHistESDContamYPtProtons);
1341 //____________________________________________________________________//
1342 void AliProtonQAAnalysis::InitCutLists() {
1343 //Initialization of the cut lists
1344 //Adding each monitored object in each list
1347 fAcceptedCutList = new TList();
1348 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1349 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1350 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1351 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1352 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1353 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1354 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1355 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1357 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1358 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1359 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1360 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1361 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1362 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1363 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1364 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1366 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1367 ";x^{2}/N_{clusters} (ITS);Entries",
1369 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1370 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1371 ";x^{2}/N_{clusters} (ITS);Entries",
1373 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1374 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1375 ";x^{2}/N_{clusters} (ITS);Entries",
1377 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1378 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1379 ";x^{2}/N_{clusters} (ITS);Entries",
1381 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1383 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1384 ";Log_{10}(#chi^{2});Entries",
1386 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1387 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1388 ";Log_{10}(#chi^{2});Entries",
1390 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1391 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1392 ";Log_{10}(#chi^{2});Entries",
1394 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1395 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1396 ";Log_{10}(#chi^{2});Entries",
1398 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1400 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1401 ";N_{clusters} (TPC);Entries",
1403 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1404 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1405 ";N_{clusters} (TPC);Entries",
1407 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1408 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1409 ";N_{clusters} (TPC);Entries",
1411 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1412 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1413 ";N_{clusters} (TPC);Entries",
1415 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1417 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1418 ";x^{2}/N_{clusters} (TPC);Entries",
1420 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1421 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1422 ";x^{2}/N_{clusters} (TPC);Entries",
1424 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1425 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1426 ";x^{2}/N_{clusters} (TPC);Entries",
1428 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1429 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1430 ";x^{2}/N_{clusters} (TPC);Entries",
1432 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1434 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1435 ";#sigma_{y} [cm];Entries",
1437 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1438 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1439 ";#sigma_{y} [cm];Entries",
1441 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1442 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1443 ";#sigma_{y} [cm];Entries",
1445 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1446 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1447 ";#sigma_{y} [cm];Entries",
1449 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1452 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1453 ";#sigma_{z} [cm];Entries",
1455 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1456 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1457 ";#sigma_{z} [cm];Entries",
1459 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1460 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1461 ";#sigma_{z} [cm];Entries",
1463 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1464 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1465 ";#sigma_{z} [cm];Entries",
1467 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1470 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1471 ";#sigma_{sin(#phi)};Entries",
1473 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1474 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1475 ";#sigma_{sin(#phi)};Entries",
1477 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1478 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1479 ";#sigma_{sin(#phi)};Entries",
1481 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1482 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1483 ";#sigma_{sin(#phi)};Entries",
1485 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1488 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1489 ";#sigma_{tan(#lambda)};Entries",
1491 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1492 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1493 ";#sigma_{tan(#lambda)};Entries",
1495 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1496 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1497 ";#sigma_{tan(#lambda)};Entries",
1499 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1500 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1501 ";#sigma_{tan(#lambda)};Entries",
1503 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1506 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1507 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1509 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1510 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1511 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1513 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1514 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1515 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1517 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1518 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1519 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1521 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1524 fAcceptedDCAList = new TList();
1525 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1526 ";DCA_{xy} [cm];Entries",
1528 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1529 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1530 ";DCA_{xy} [cm];Entries",
1532 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1533 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1534 ";DCA_{xy} [cm];Entries",
1536 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1537 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1538 ";DCA_{xy} [cm];Entries",
1541 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1542 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1543 ";DCA_{z} [cm];Entries",
1545 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1546 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1547 ";DCA_{z} [cm];Entries",
1549 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1550 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1551 ";DCA_{z} [cm];Entries",
1553 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1554 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1555 ";DCA_{z} [cm];Entries",
1557 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1559 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1560 ";#sigma_{Vertex};Entries",
1562 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1563 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1564 ";#sigma_{Vertex};Entries",
1566 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1567 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1568 ";#sigma_{Vertex};Entries",
1570 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1571 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1572 ";#sigma_{Vertex};Entries",
1574 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1578 //____________________________________________________________________//
1579 void AliProtonQAAnalysis::InitQA() {
1580 //Initializes the QA histograms and builds the directory structure
1581 //if(!fQAHistograms)
1585 //TDirectory *dir2D = gDirectory->mkdir("2D");
1586 //fGlobalQAList->Add(dir2D); dir2D->cd();
1587 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1589 fNBinsY,fMinY,fMaxY,
1590 fNBinsPt,fMinPt,fMaxPt);
1591 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1592 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1593 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
1594 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1596 fNBinsY,fMinY,fMaxY,
1597 fNBinsPt,fMinPt,fMaxPt);
1598 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1599 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1600 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
1602 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1604 fNBinsY,fMinY,fMaxY,
1605 fNBinsPt,fMinPt,fMaxPt);
1606 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1607 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1608 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
1609 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1611 fNBinsY,fMinY,fMaxY,
1612 fNBinsPt,fMinPt,fMaxPt);
1613 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1614 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1615 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
1617 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1619 fNBinsY,fMinY,fMaxY,
1620 fNBinsPt,fMinPt,fMaxPt);
1621 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1622 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1623 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
1624 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1626 fNBinsY,fMinY,fMaxY,
1627 fNBinsPt,fMinPt,fMaxPt);
1628 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1629 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1630 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
1632 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1634 fNBinsY,fMinY,fMaxY,
1635 fNBinsPt,fMinPt,fMaxPt);
1636 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1637 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1638 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
1639 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1641 fNBinsY,fMinY,fMaxY,
1642 fNBinsPt,fMinPt,fMaxPt);
1643 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1644 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1645 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
1647 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
1649 fNBinsY,fMinY,fMaxY,
1650 fNBinsPt,fMinPt,fMaxPt);
1651 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
1652 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
1653 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
1654 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
1656 fNBinsY,fMinY,fMaxY,
1657 fNBinsPt,fMinPt,fMaxPt);
1658 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
1659 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
1660 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
1662 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
1663 ";y;P_{T} [GeV/c];PDG",
1664 fNBinsY,fMinY,fMaxY,
1665 fNBinsPt,fMinPt,fMaxPt,
1667 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
1668 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
1669 ";y;P_{T} [GeV/c];PDG",
1670 fNBinsY,fMinY,fMaxY,
1671 fNBinsPt,fMinPt,fMaxPt,
1673 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
1675 /*gDirectory->cd("../");
1677 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1678 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1680 //________________________________________________________________//
1681 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1682 dirProtonsPrimary->cd();
1683 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1684 dirProtonsPrimaryAccepted->cd();*/
1686 //Accepted primary protons
1687 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1688 ";N_{clusters} (ITS);Entries",
1690 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1691 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1692 ";x^{2}/N_{clusters} (ITS);Entries",
1694 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1695 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1696 ";N_{clusters} (TPC);Entries",
1698 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1699 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1700 ";x^{2}/N_{clusters} (TPC);Entries",
1702 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1703 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
1704 ";#sigma_{y} [cm];Entries",
1706 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
1707 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
1708 ";#sigma_{z} [cm];Entries",
1710 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
1711 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
1712 ";#sigma_{sin(#phi)};Entries",
1714 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
1715 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
1716 ";#sigma_{tan(#lambda)};Entries",
1718 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
1719 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
1720 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1722 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
1723 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
1724 ";#sigma_{Vertex};Entries",
1726 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
1727 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
1728 ";#sigma_{Vertex};Entries",
1730 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
1731 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
1732 ";DCA_{xy} [cm];Entries",
1734 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
1735 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
1736 ";DCA_{xy} [cm];Entries",
1738 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
1739 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
1740 ";DCA_{z} [cm];Entries",
1742 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
1743 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
1744 ";DCA_{z} [cm];Entries",
1746 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
1747 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
1748 ";Log_{10}(#chi^{2});Entries",
1750 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
1751 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
1753 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
1754 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
1756 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
1757 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
1759 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
1760 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
1762 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
1763 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
1765 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
1766 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
1768 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
1769 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
1771 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
1772 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
1774 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
1775 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
1777 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
1778 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
1780 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
1782 //Rejected primary protons
1783 /*gDirectory->cd("../");
1784 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1785 dirProtonsPrimaryRejected->cd();*/
1787 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
1788 ";N_{clusters} (ITS);Entries",
1790 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
1791 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
1792 ";x^{2}/N_{clusters} (ITS);Entries",
1794 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
1795 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
1796 ";N_{clusters} (TPC);Entries",
1798 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
1799 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
1800 ";x^{2}/N_{clusters} (TPC);Entries",
1802 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
1803 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
1804 ";#sigma_{y} [cm];Entries",
1806 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
1807 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
1808 ";#sigma_{z} [cm];Entries",
1810 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
1811 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
1812 ";#sigma_{sin(#phi)};Entries",
1814 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
1815 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
1816 ";#sigma_{tan(#lambda)};Entries",
1818 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
1819 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
1820 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1822 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
1823 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
1824 ";#sigma_{Vertex};Entries",
1826 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
1827 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
1828 ";#sigma_{Vertex};Entries",
1830 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
1831 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
1832 ";DCA_{xy} [cm];Entries",
1834 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
1835 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
1836 ";DCA_{xy} [cm];Entries",
1838 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
1839 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
1840 ";DCA_{z} [cm];Entries",
1842 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
1843 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
1844 ";DCA_{z} [cm];Entries",
1846 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
1847 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
1848 ";Log_{10}(#chi^{2});Entries",
1850 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
1851 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
1853 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
1854 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
1856 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
1857 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
1859 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
1860 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
1862 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
1863 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
1865 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
1866 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
1868 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
1869 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
1871 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
1872 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
1874 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
1875 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
1877 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
1878 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
1880 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
1882 //________________________________________________________________//
1883 /*gDirectory->cd("../../");
1885 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
1886 dirProtonsSecondary->cd();
1887 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
1888 dirProtonsSecondaryAccepted->cd();*/
1890 //Accepted secondary protons
1891 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
1892 ";N_{clusters} (ITS);Entries",
1894 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
1895 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
1896 ";x^{2}/N_{clusters} (ITS);Entries",
1898 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
1899 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
1900 ";N_{clusters} (TPC);Entries",
1902 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
1903 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
1904 ";x^{2}/N_{clusters} (TPC);Entries",
1906 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
1907 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
1908 ";#sigma_{y} [cm];Entries",
1910 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
1911 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
1912 ";#sigma_{z} [cm];Entries",
1914 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
1915 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
1916 ";#sigma_{sin(#phi)};Entries",
1918 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
1919 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
1920 ";#sigma_{tan(#lambda)};Entries",
1922 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
1923 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
1924 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1926 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
1927 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
1928 ";#sigma_{Vertex};Entries",
1930 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
1931 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
1932 ";#sigma_{Vertex};Entries",
1934 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
1935 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
1936 ";DCA_{xy} [cm];Entries",
1938 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
1939 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
1940 ";DCA_{xy} [cm];Entries",
1942 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
1943 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
1944 ";DCA_{z} [cm];Entries",
1946 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
1947 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
1948 ";DCA_{z} [cm];Entries",
1950 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
1951 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
1952 ";Log_{10}(#chi^{2});Entries",
1954 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
1955 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
1957 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
1958 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
1960 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
1961 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
1963 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
1964 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
1966 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
1967 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
1969 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
1970 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
1972 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
1973 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
1975 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
1976 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
1978 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
1979 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
1981 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
1982 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
1984 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
1986 //Rejected secondary protons
1987 /*gDirectory->cd("../");
1988 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
1989 dirProtonsSecondaryRejected->cd();*/
1991 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
1992 ";N_{clusters} (ITS);Entries",
1994 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
1995 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
1996 ";x^{2}/N_{clusters} (ITS);Entries",
1998 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
1999 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2000 ";N_{clusters} (TPC);Entries",
2002 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2003 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2004 ";x^{2}/N_{clusters} (TPC);Entries",
2006 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2007 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2008 ";#sigma_{y} [cm];Entries",
2010 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2011 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2012 ";#sigma_{z} [cm];Entries",
2014 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2015 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2016 ";#sigma_{sin(#phi)};Entries",
2018 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2019 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2020 ";#sigma_{tan(#lambda)};Entries",
2022 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2023 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2024 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2026 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2027 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2028 ";#sigma_{Vertex};Entries",
2030 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2031 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2032 ";#sigma_{Vertex};Entries",
2034 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2035 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2036 ";DCA_{xy} [cm];Entries",
2038 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2039 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2040 ";DCA_{xy} [cm];Entries",
2042 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2043 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2044 ";DCA_{z} [cm];Entries",
2046 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2047 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2048 ";DCA_{z} [cm];Entries",
2050 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2051 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2052 ";Log_{10}(#chi^{2});Entries",
2054 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2055 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2057 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2058 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2060 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2061 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2063 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2064 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2066 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2067 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2069 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2070 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2072 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2073 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2075 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2076 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2078 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2079 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2081 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2082 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2084 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2087 /*gDirectory->cd("../../../");
2090 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2091 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2093 //________________________________________________________________//
2094 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2095 dirAntiProtonsPrimary->cd();
2096 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2097 dirAntiProtonsPrimaryAccepted->cd();*/
2099 //Accepted primary antiprotons
2100 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2101 ";N_{clusters} (ITS);Entries",
2103 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2104 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2105 ";x^{2}/N_{clusters} (ITS);Entries",
2107 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2108 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2109 ";N_{clusters} (TPC);Entries",
2111 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2112 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2113 ";x^{2}/N_{clusters} (TPC);Entries",
2115 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2116 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2117 ";#sigma_{y} [cm];Entries",
2119 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2120 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2121 ";#sigma_{z} [cm];Entries",
2123 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2124 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2125 ";#sigma_{sin(#phi)};Entries",
2127 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2128 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2129 ";#sigma_{tan(#lambda)};Entries",
2131 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2132 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2133 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2135 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2136 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2137 ";#sigma_{Vertex};Entries",
2139 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2140 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2141 ";#sigma_{Vertex};Entries",
2143 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2144 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2145 ";DCA_{xy} [cm];Entries",
2147 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2148 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2149 ";DCA_{xy} [cm];Entries",
2151 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2152 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2153 ";DCA_{z} [cm];Entries",
2155 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2156 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2157 ";DCA_{z} [cm];Entries",
2159 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2160 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2161 ";Log_{10}(#chi^{2});Entries",
2163 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2164 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2166 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2167 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2169 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2170 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2172 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2173 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2175 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2176 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2178 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2179 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2181 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2182 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2184 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2185 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2187 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2188 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2190 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2191 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2193 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2195 //Rejected primary antiprotons
2196 /*gDirectory->cd("../");
2197 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2198 dirAntiProtonsPrimaryRejected->cd();*/
2200 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2201 ";N_{clusters} (ITS);Entries",
2203 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2204 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2205 ";x^{2}/N_{clusters} (ITS);Entries",
2207 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2208 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2209 ";N_{clusters} (TPC);Entries",
2211 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2212 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2213 ";x^{2}/N_{clusters} (TPC);Entries",
2215 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2216 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2217 ";#sigma_{y} [cm];Entries",
2219 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2220 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2221 ";#sigma_{z} [cm];Entries",
2223 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2224 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2225 ";#sigma_{sin(#phi)};Entries",
2227 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2228 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2229 ";#sigma_{tan(#lambda)};Entries",
2231 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2232 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2233 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2235 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2236 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2237 ";#sigma_{Vertex};Entries",
2239 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2240 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2241 ";#sigma_{Vertex};Entries",
2243 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2244 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2245 ";DCA_{xy} [cm];Entries",
2247 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2248 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2249 ";DCA_{xy} [cm];Entries",
2251 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2252 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2253 ";DCA_{z} [cm];Entries",
2255 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2256 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2257 ";DCA_{z} [cm];Entries",
2259 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2260 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2261 ";Log_{10}(#chi^{2});Entries",
2263 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2264 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2266 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2267 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2269 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2270 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2272 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2273 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2275 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2276 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2278 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2279 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2281 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2282 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2284 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2285 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2287 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2288 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2290 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2291 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2293 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2295 //________________________________________________________________//
2296 /*gDirectory->cd("../../");
2298 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2299 dirAntiProtonsSecondary->cd();
2300 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2301 dirAntiProtonsSecondaryAccepted->cd();*/
2303 //Accepted secondary antiprotons
2304 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2305 ";N_{clusters} (ITS);Entries",
2307 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2308 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2309 ";x^{2}/N_{clusters} (ITS);Entries",
2311 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2312 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2313 ";N_{clusters} (TPC);Entries",
2315 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2316 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2317 ";x^{2}/N_{clusters} (TPC);Entries",
2319 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2320 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2321 ";#sigma_{y} [cm];Entries",
2323 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2324 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2325 ";#sigma_{z} [cm];Entries",
2327 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2328 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2329 ";#sigma_{sin(#phi)};Entries",
2331 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2332 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2333 ";#sigma_{tan(#lambda)};Entries",
2335 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2336 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2337 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2339 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2340 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2341 ";#sigma_{Vertex};Entries",
2343 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2344 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2345 ";#sigma_{Vertex};Entries",
2347 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2348 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2349 ";DCA_{xy} [cm];Entries",
2351 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2352 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2353 ";DCA_{xy} [cm];Entries",
2355 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2356 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2357 ";DCA_{z} [cm];Entries",
2359 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2360 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2361 ";DCA_{z} [cm];Entries",
2363 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2364 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2365 ";Log_{10}(#chi^{2});Entries",
2367 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2368 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2370 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2371 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2373 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2374 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2376 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2377 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2379 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2380 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2382 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2383 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2385 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2386 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2388 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2389 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2391 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2392 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2394 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2395 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2397 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2399 //Rejected secondary antiprotons
2400 /*gDirectory->cd("../");
2401 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2402 dirAntiProtonsSecondaryRejected->cd();*/
2404 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2405 ";N_{clusters} (ITS);Entries",
2407 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2408 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2409 ";x^{2}/N_{clusters} (ITS);Entries",
2411 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2412 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2413 ";N_{clusters} (TPC);Entries",
2415 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2416 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2417 ";x^{2}/N_{clusters} (TPC);Entries",
2419 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2420 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2421 ";#sigma_{y} [cm];Entries",
2423 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2424 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2425 ";#sigma_{z} [cm];Entries",
2427 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2428 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2429 ";#sigma_{sin(#phi)};Entries",
2431 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2432 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2433 ";#sigma_{tan(#lambda)};Entries",
2435 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2436 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2437 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2439 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2440 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2441 ";#sigma_{Vertex};Entries",
2443 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2444 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2445 ";#sigma_{Vertex};Entries",
2447 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2448 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2449 ";DCA_{xy} [cm];Entries",
2451 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2452 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2453 ";DCA_{xy} [cm];Entries",
2455 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2456 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2457 ";DCA_{z} [cm];Entries",
2459 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2460 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2461 ";DCA_{z} [cm];Entries",
2463 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2464 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2465 ";Log_{10}(#chi^{2});Entries",
2467 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2468 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2470 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2471 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2473 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2474 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2476 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2477 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2479 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2480 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2482 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2483 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2485 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2486 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2488 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2489 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2491 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2492 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2494 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2495 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2497 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2500 //____________________________________________________________________//
2501 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2503 //Runs the efficiency code
2505 Int_t nMCProtons = 0, nESDProtons = 0;
2506 for(Int_t iParticle = 0; iParticle <= stack->GetNprimary(); iParticle++) {
2507 TParticle *particle = stack->Particle(iParticle);
2508 if(!particle) continue;
2510 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2511 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2512 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2514 Int_t pdgcode = particle->GetPdgCode();
2515 if(pdgcode == 2212) {
2517 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2522 if(pdgcode == -2212)
2523 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2530 Int_t nGoodTracks = esd->GetNumberOfTracks();
2531 TArrayI labelArray(nGoodTracks);
2532 Int_t labelCounter = 0;
2533 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2534 AliESDtrack* track = esd->GetTrack(iTracks);
2535 if(!track) continue;
2537 Int_t label = TMath::Abs(track->GetLabel());
2538 if(IsLabelUsed(labelArray,label)) continue;
2539 labelArray.AddAt(label,labelCounter);
2542 TParticle *particle = stack->Particle(label);
2543 if(!particle) continue;
2544 Int_t pdgcode = particle->GetPdgCode();
2546 Double_t Pt = 0.0, P = 0.0;
2547 Double_t probability[5];
2551 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2552 if(!tpcTrack) continue;
2553 Pt = tpcTrack->Pt();
2556 if((tpcTrack->Pt() > fMaxPt)||(tpcTrack->Pt() < fMinPt)) continue;
2557 if((Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()) > fMaxY)||(Rapidity(tpcTrack->Px(),tpcTrack->Py(),tpcTrack->Pz()) < fMinY)) continue;
2559 //reconstructed primary (anti)protons
2560 if(pdgcode == 2212) {
2561 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
2565 if(label <= stack->GetNprimary()) {
2567 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
2573 if(pdgcode == -2212) {
2574 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
2578 if(label <= stack->GetNprimary())
2579 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
2583 }//initial antiprotons
2586 track->GetTPCpid(probability);
2588 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2589 rcc += probability[i]*GetParticleFraction(i,P);
2590 if(rcc == 0.0) continue;
2592 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2593 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2594 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2595 if(fParticleType == 4) {
2596 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
2600 if(TMath::Abs(pdgcode) == 2212)
2601 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
2606 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
2610 }//identified as proton
2612 else if(!fUseTPCOnly) {
2613 if((track->Pt() > fMaxPt)||(track->Pt() < fMinPt)) continue;
2614 if((Rapidity(track->Px(),track->Py(),track->Pz()) > fMaxY)||(Rapidity(track->Px(),track->Py(),track->Pz()) < fMinY)) continue;
2616 //reconstructed primary (anti)protons
2617 if(pdgcode == 2212) {
2618 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(track->Px(),
2622 if(label <= stack->GetNprimary())
2623 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(track->Px(),
2628 if(pdgcode == -2212) {
2629 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(track->Px(),
2633 if(label <= stack->GetNprimary())
2634 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(track->Px(),
2638 }//initial antiprotons
2641 track->GetESDpid(probability);
2643 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2644 rcc += probability[i]*GetParticleFraction(i,P);
2645 if(rcc == 0.0) continue;
2647 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2648 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2649 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2650 if(fParticleType == 4) {
2651 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(track->Px(),
2655 if(TMath::Abs(pdgcode) == 2212)
2656 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(track->Px(),
2661 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(track->Px(),
2665 }//identified as proton
2669 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
2672 //____________________________________________________________________//
2673 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
2675 //Checks if the label is used already
2676 Bool_t status = kFALSE;
2677 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
2678 if(labelArray.At(i) == label)
2685 //____________________________________________________________________//
2686 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
2690 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
2691 TParticle *particle = stack->Particle(iParticle);
2692 if(!particle) continue;
2694 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2695 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2696 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2698 Int_t pdgcode = particle->GetPdgCode();
2700 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
2704 if(pdgcode == -2212)
2705 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
2712 Int_t nGoodTracks = esd->GetNumberOfTracks();
2713 TArrayI labelArray(nGoodTracks);
2714 Int_t labelCounter = 0;
2715 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2716 AliESDtrack* track = esd->GetTrack(iTracks);
2717 if(!track) continue;
2719 Int_t label = TMath::Abs(track->GetLabel());
2720 if(IsLabelUsed(labelArray,label)) continue;
2721 labelArray.AddAt(label,labelCounter);
2724 Double_t Pt = 0.0, P = 0.0;
2725 Double_t probability[5];
2726 Float_t dcaXY = 0.0, dcaZ = 0.0;
2727 Double_t nSigmaToVertex = GetSigmaToVertex(track);
2729 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
2730 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
2732 Float_t chi2PerClusterITS = -1;
2733 if (nClustersITS!=0)
2734 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
2735 Float_t chi2PerClusterTPC = -1;
2736 if (nClustersTPC!=0)
2737 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
2738 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
2739 Double_t extCov[15];
2740 track->GetExternalCovariance(extCov);
2744 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2745 if(!tpcTrack) continue;
2746 Pt = tpcTrack->Pt();
2748 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
2749 else track->GetImpactParametersTPC(dcaXY,dcaZ);
2752 track->GetTPCpid(probability);
2754 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2755 rcc += probability[i]*GetParticleFraction(i,P);
2756 if(rcc == 0.0) continue;
2758 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2759 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2760 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2761 if(fParticleType == 4) {
2762 FillQA(track, stack);
2763 if(IsAccepted(track)) {
2764 if(label <= stack->GetNprimary()) {
2765 if(track->Charge() > 0) {
2766 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2767 if(track->HasPointOnITSLayer(iLayer))
2768 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
2770 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
2771 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
2772 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
2773 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
2774 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
2775 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
2776 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
2777 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
2778 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
2779 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
2781 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
2782 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
2783 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
2784 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
2789 else if(track->Charge() < 0) {
2790 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2791 if(track->HasPointOnITSLayer(iLayer))
2792 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
2794 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
2795 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
2796 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
2797 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
2798 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
2799 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
2800 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
2801 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
2802 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
2803 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
2805 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
2806 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
2807 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
2808 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
2813 }//primary particles
2814 else if(label > stack->GetNprimary()) {
2815 TParticle *particle = stack->Particle(label);
2816 if(!particle) continue;
2818 Int_t lPartMother = -1;
2819 Int_t motherPDGCode = -1;
2821 lPartMother = particle->GetFirstMother();
2822 TParticle *motherParticle = stack->Particle(lPartMother);
2823 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2826 if(fMCProcessIdFlag)
2827 if(particle->GetUniqueID() != fMCProcessId) continue;
2828 if(fMotherParticlePDGCodeFlag)
2829 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
2831 if(track->Charge() > 0) {
2832 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2833 if(track->HasPointOnITSLayer(iLayer))
2834 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
2836 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
2837 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
2838 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
2839 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
2840 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
2841 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
2842 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
2843 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
2844 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
2845 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
2847 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
2848 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
2849 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
2850 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
2854 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
2858 ConvertPDGToInt(motherPDGCode));
2860 else if(track->Charge() < 0) {
2861 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2862 if(track->HasPointOnITSLayer(iLayer))
2863 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
2865 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
2866 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
2867 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
2868 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
2869 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
2870 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
2871 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
2872 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
2873 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
2874 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
2876 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
2877 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
2878 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
2879 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
2883 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
2887 ConvertPDGToInt(motherPDGCode));
2889 }//secondary particles
2890 }//accepted - track cuts
2891 else if(!IsAccepted(track)) {
2892 if(label <= stack->GetNprimary()) {
2893 if(track->Charge() > 0)
2894 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
2898 else if(track->Charge() < 0)
2899 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
2903 }//primary particles
2904 else if(label > stack->GetNprimary()) {
2905 if(track->Charge() > 0)
2906 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
2910 else if(track->Charge() < 0)
2911 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
2915 }//secondary particles
2916 }//rejected - track cuts
2920 else if(!fUseTPCOnly) {
2923 track->GetImpactParameters(dcaXY,dcaZ);
2926 track->GetESDpid(probability);
2928 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2929 rcc += probability[i]*GetParticleFraction(i,P);
2930 if(rcc == 0.0) continue;
2932 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2933 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2934 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2935 if(fParticleType == 4) {
2936 FillQA(track, stack);
2937 if(IsAccepted(track)) {
2938 if(label <= stack->GetNprimary()) {
2939 if(track->Charge() > 0) {
2940 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2941 if(track->HasPointOnITSLayer(iLayer))
2942 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
2944 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
2945 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
2946 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
2947 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
2948 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
2949 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
2950 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
2951 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
2952 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
2953 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
2955 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
2956 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
2957 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
2958 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2963 else if(track->Charge() < 0) {
2964 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
2965 if(track->HasPointOnITSLayer(iLayer))
2966 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
2968 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
2969 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
2970 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
2971 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
2972 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
2973 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
2974 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
2975 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
2976 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
2977 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
2979 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
2980 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
2981 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
2982 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2987 }//primary particles
2988 else if(label > stack->GetNprimary()) {
2989 TParticle *particle = stack->Particle(label);
2990 if(!particle) continue;
2992 Int_t lPartMother = -1;
2993 Int_t motherPDGCode = -1;
2995 lPartMother = particle->GetFirstMother();
2996 TParticle *motherParticle = stack->Particle(lPartMother);
2997 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3000 if(fMCProcessIdFlag)
3001 if(particle->GetUniqueID() != fMCProcessId) continue;
3002 if(fMotherParticlePDGCodeFlag)
3003 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3005 if(track->Charge() > 0) {
3006 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3007 if(track->HasPointOnITSLayer(iLayer))
3008 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3010 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3011 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3012 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3013 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3014 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3015 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3016 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3017 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3018 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3019 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3021 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3022 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3023 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3024 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3028 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3032 ConvertPDGToInt(motherPDGCode));
3034 else if(track->Charge() < 0) {
3035 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3036 if(track->HasPointOnITSLayer(iLayer))
3037 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3039 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3040 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3041 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3042 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3043 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3044 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3045 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3046 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3047 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3048 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3050 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3051 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3052 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3053 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3058 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3062 ConvertPDGToInt(motherPDGCode));
3064 }//secondary particles
3065 }//accepted - track cuts
3066 else if(!IsAccepted(track)) {
3067 if(label <= stack->GetNprimary()) {
3068 if(track->Charge() > 0)
3069 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3073 else if(track->Charge() < 0)
3074 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
3078 }//primary particles
3079 else if(label > stack->GetNprimary()) {
3080 if(track->Charge() > 0)
3081 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
3085 else if(track->Charge() < 0)
3086 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
3090 }//secondary particles
3091 }//rejected - track cuts
3093 }//combined tracking
3098 //____________________________________________________________________//
3099 void AliProtonQAAnalysis::InitMCAnalysis() {
3100 //MC analysis - 3D histograms: y-pT-pdg
3101 fPDGList = new TList();
3102 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
3103 ";y;P_{T} [GeV/c];PDG",
3104 fNBinsY,fMinY,fMaxY,
3105 fNBinsPt,fMinPt,fMaxPt,
3107 fPDGList->Add(gHistYPtPDGProtons);
3108 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
3109 ";y;P_{T} [GeV/c];PDG",
3110 fNBinsY,fMinY,fMaxY,
3111 fNBinsPt,fMinPt,fMaxPt,
3113 fPDGList->Add(gHistYPtPDGAntiProtons);
3116 fMCProcessesList = new TList();
3117 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
3118 fMCProcessesList->Add(gHistProtonsFromKLProcess);
3119 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
3120 fMCProcessesList->Add(gHistProtonsFromPionProcess);
3121 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
3122 fMCProcessesList->Add(gHistProtonsFromKSProcess);
3123 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
3124 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
3125 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
3126 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
3127 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
3128 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
3129 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
3130 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
3131 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
3132 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
3133 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3134 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
3135 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
3136 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
3137 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
3138 fMCProcessesList->Add(gHistProtonsFromXi0Process);
3139 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
3140 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
3142 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
3143 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
3144 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
3145 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
3146 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
3147 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
3148 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
3149 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
3150 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
3151 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
3152 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
3153 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
3154 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
3155 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
3156 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3157 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
3160 //____________________________________________________________________//
3161 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
3162 //Main analysis part - MC
3163 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3164 TParticle *particle = stack->Particle(iParticle);
3165 if(!particle) continue;
3167 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3168 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3169 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3171 Int_t pdgcode = particle->GetPdgCode();
3172 if(pdgcode == 2212) {
3173 if(iParticle <= stack->GetNprimary())
3174 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3178 else if(iParticle > stack->GetNprimary()) {
3179 Int_t lPartMother = particle->GetFirstMother();
3180 TParticle *motherParticle = stack->Particle(lPartMother);
3181 if(!motherParticle) continue;
3182 Int_t motherPDGCode = motherParticle->GetPdgCode();
3183 if(fMCProcessIdFlag)
3184 if(particle->GetUniqueID() != fMCProcessId) continue;
3185 if(fMotherParticlePDGCodeFlag)
3186 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3188 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3192 ConvertPDGToInt(motherParticle->GetPdgCode()));
3194 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3195 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
3196 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3197 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
3198 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3199 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
3200 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3201 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
3202 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3203 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
3204 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3205 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
3206 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
3207 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
3208 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3209 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
3210 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3211 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
3212 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
3213 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
3214 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
3215 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
3216 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
3217 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
3219 }//pdgcode of proton
3221 if(pdgcode == -2212) {
3222 if(iParticle <= stack->GetNprimary())
3223 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3227 else if(iParticle > stack->GetNprimary()) {
3228 Int_t lPartMother = particle->GetFirstMother();
3229 TParticle *motherParticle = stack->Particle(lPartMother);
3230 if(!motherParticle) continue;
3231 Int_t motherPDGCode = motherParticle->GetPdgCode();
3232 if(fMCProcessIdFlag)
3233 if(particle->GetUniqueID() != fMCProcessId) continue;
3234 if(fMotherParticlePDGCodeFlag)
3235 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3237 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3241 ConvertPDGToInt(motherParticle->GetPdgCode()));
3244 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3245 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
3246 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3247 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
3248 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3249 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
3250 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3251 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
3252 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3253 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
3254 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3255 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
3256 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3257 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
3258 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3259 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
3260 }//secondary antiproton
3261 }//pdgcode of antiproton
3266 //____________________________________________________________________//
3267 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
3268 //Converts the pdg code to an int based on the following scheme:
3269 //1: PDG code: 130 - Name: K_L0
3270 //2: PDG code: 211 - Name: pi+
3271 //3: PDG code: 310 - Name: K_S0
3272 //4: PDG code: 321 - Name: K+
3273 //5: PDG code: 2112 - Name: neutron
3274 //6: PDG code: 2212 - Name: proton
3275 //7: PDG code: 3112 - Name: Sigma-
3276 //8: PDG code: 3122 - Name: Lambda0
3277 //9: PDG code: 3222 - Name: Sigma+
3278 //10: PDG code: 3312 - Name: Xi-
3279 //11: PDG code: 3322 - Name: Xi0
3280 //12: PDG code: 3334 - Name: Omega-
3282 switch (TMath::Abs(pdgCode)) {