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>
38 #include <AliESDVertex.h>
40 ClassImp(AliProtonQAAnalysis)
42 //____________________________________________________________________//
43 AliProtonQAAnalysis::AliProtonQAAnalysis() :
45 fNBinsY(0), fMinY(0), fMaxY(0),
46 fNBinsPt(0), fMinPt(0), fMaxPt(0),
47 fMinTPCClusters(0), fMinITSClusters(0),
48 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
49 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
50 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
51 fMaxDCAXY(0), fMaxDCAXYTPC(0),
52 fMaxDCAZ(0), fMaxDCAZTPC(0),
54 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
55 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
56 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
57 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
58 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
59 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
60 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
61 fMaxConstrainChi2Flag(kFALSE),
62 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
63 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
64 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
65 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
66 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
67 fGlobalQAList(0), fQA2DList(0),
68 fQAPrimaryProtonsAcceptedList(0),
69 fQAPrimaryProtonsRejectedList(0),
70 fQASecondaryProtonsAcceptedList(0),
71 fQASecondaryProtonsRejectedList(0),
72 fQAPrimaryAntiProtonsAcceptedList(0),
73 fQAPrimaryAntiProtonsRejectedList(0),
74 fQASecondaryAntiProtonsAcceptedList(0),
75 fQASecondaryAntiProtonsRejectedList(0),
76 fFunctionProbabilityFlag(kFALSE),
77 fElectronFunction(0), fMuonFunction(0),
78 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
79 fUseTPCOnly(kFALSE), fUseHybridTPC(kFALSE),
80 fPDGList(0), fMCProcessesList(0),
81 fRunMCAnalysis(kFALSE),
82 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
83 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
84 fAcceptedCutList(0), fRejectedCutList(0),
85 fAcceptedDCAList(0), fRejectedDCAList(0),
86 fRunEfficiencyAnalysis(kFALSE), fRunEfficiencyAnalysisEtaMode(kFALSE),
87 fUseCutsInEfficiency(kFALSE),
90 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
93 //____________________________________________________________________//
94 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
96 if(fGlobalQAList) delete fGlobalQAList;
97 if(fQA2DList) delete fQA2DList;
98 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
99 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
100 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
101 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
102 if(fQAPrimaryAntiProtonsAcceptedList)
103 delete fQAPrimaryAntiProtonsAcceptedList;
104 if(fQAPrimaryAntiProtonsRejectedList)
105 delete fQAPrimaryAntiProtonsRejectedList;
106 if(fQASecondaryAntiProtonsAcceptedList)
107 delete fQASecondaryAntiProtonsAcceptedList;
108 if(fQASecondaryAntiProtonsRejectedList)
109 delete fQASecondaryAntiProtonsRejectedList;
111 if(fPDGList) delete fPDGList;
112 if(fMCProcessesList) delete fMCProcessesList;
114 if(fAcceptedCutList) delete fAcceptedCutList;
115 if(fRejectedCutList) delete fRejectedCutList;
116 if(fAcceptedDCAList) delete fAcceptedDCAList;
117 if(fRejectedDCAList) delete fRejectedDCAList;
119 if(fEfficiencyList) delete fEfficiencyList;
122 //____________________________________________________________________//
123 Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
125 if(fFunctionProbabilityFlag) {
126 if(i == 0) partFrac = fElectronFunction->Eval(p);
127 if(i == 1) partFrac = fMuonFunction->Eval(p);
128 if(i == 2) partFrac = fPionFunction->Eval(p);
129 if(i == 3) partFrac = fKaonFunction->Eval(p);
130 if(i == 4) partFrac = fProtonFunction->Eval(p);
132 else partFrac = fPartFrac[i];
137 //____________________________________________________________________//
138 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDEvent *esd,
139 const AliESDVertex *vertex,
140 AliESDtrack* track) {
141 // Checks if the track is excluded from the cuts
142 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
143 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
145 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
146 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
148 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
149 dca[0] = -100.; dca[1] = -100.;
150 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
157 tpcTrack->PropagateToDCA(vertex,
158 esd->GetMagneticField(),
162 else if(fUseHybridTPC) {
163 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
165 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
166 dca[0] = -100.; dca[1] = -100.;
167 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
174 tpcTrack->PropagateToDCA(vertex,
175 esd->GetMagneticField(),
184 track->PropagateToDCA(vertex,
185 esd->GetMagneticField(),
190 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
191 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
193 Float_t chi2PerClusterITS = -1;
195 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
196 Float_t chi2PerClusterTPC = -1;
198 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
201 track->GetExternalCovariance(extCov);
203 if(fPointOnITSLayer1Flag)
204 if(!track->HasPointOnITSLayer(0)) return kFALSE;
205 if(fPointOnITSLayer2Flag)
206 if(!track->HasPointOnITSLayer(1)) return kFALSE;
207 if(fPointOnITSLayer3Flag)
208 if(!track->HasPointOnITSLayer(2)) return kFALSE;
209 if(fPointOnITSLayer4Flag)
210 if(!track->HasPointOnITSLayer(3)) return kFALSE;
211 if(fPointOnITSLayer5Flag)
212 if(!track->HasPointOnITSLayer(4)) return kFALSE;
213 if(fPointOnITSLayer6Flag)
214 if(!track->HasPointOnITSLayer(5)) return kFALSE;
215 if(fMinITSClustersFlag)
216 if(nClustersITS < fMinITSClusters) return kFALSE;
217 if(fMaxChi2PerITSClusterFlag)
218 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
219 if(fMinTPCClustersFlag)
220 if(nClustersTPC < fMinTPCClusters) return kFALSE;
221 if(fMaxChi2PerTPCClusterFlag)
222 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
224 if(extCov[0] > fMaxCov11) return kFALSE;
226 if(extCov[2] > fMaxCov22) return kFALSE;
228 if(extCov[5] > fMaxCov33) return kFALSE;
230 if(extCov[9] > fMaxCov44) return kFALSE;
232 if(extCov[14] > fMaxCov55) return kFALSE;
233 if(fMaxSigmaToVertexFlag)
234 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
235 if(fMaxSigmaToVertexTPCFlag)
236 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
238 if(TMath::Abs(dca[0]) > fMaxDCAXY) return kFALSE;
240 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) return kFALSE;
242 if(TMath::Abs(dca[1]) > fMaxDCAZ) return kFALSE;
244 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) return kFALSE;
245 if(fMaxConstrainChi2Flag) {
246 if(track->GetConstrainedChi2() > 0)
247 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
250 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
252 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
254 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
256 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
258 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
259 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
265 //____________________________________________________________________//
266 void AliProtonQAAnalysis::FillQA(AliESDtrack* track, AliStack *stack) {
267 // Checks if the track is excluded from the cuts
268 Int_t nPrimaries = stack->GetNprimary();
269 Int_t label = TMath::Abs(track->GetLabel());
271 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
272 Float_t dcaXY = 0.0, dcaZ = 0.0;
273 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
274 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
276 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
277 dcaXY = -100.0, dcaZ = -100.0;
284 track->GetImpactParametersTPC(dcaXY,dcaZ);
287 else if(fUseHybridTPC) {
288 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
290 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
291 dcaXY = -100.0, dcaZ = -100.0;
298 track->GetImpactParameters(dcaXY,dcaZ);
306 track->GetImpactParameters(dcaXY,dcaZ);
310 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
311 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
313 Float_t chi2PerClusterITS = -1;
315 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
316 Float_t chi2PerClusterTPC = -1;
318 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
321 track->GetExternalCovariance(extCov);
323 //cout<<"Charge: "<<track->Charge()<<
324 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
325 //" - TPC clusters: "<<nClustersTPC<<endl;
327 if(track->Charge() > 0) {
329 if(label <= nPrimaries) {
330 if(fMinITSClustersFlag) {
331 if(nClustersITS < fMinITSClusters) {
332 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
335 else if(nClustersITS >= fMinITSClusters)
336 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
338 if(fMaxChi2PerITSClusterFlag) {
339 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
340 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
343 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
344 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
345 }//chi2 per ITS cluster
346 if(fMinTPCClustersFlag) {
347 if(nClustersTPC < fMinTPCClusters) {
348 //cout<<"Primary proton rejected"<<endl;
349 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
352 else if(nClustersTPC >= fMinTPCClusters) {
353 //cout<<"Primary proton accepted"<<endl;
354 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
357 if(fMaxChi2PerTPCClusterFlag) {
358 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
359 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
362 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
363 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
364 }//chi2 per TPC cluster
366 if(extCov[0] > fMaxCov11) {
367 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
370 else if(extCov[0] <= fMaxCov11)
371 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
374 if(extCov[2] > fMaxCov22) {
375 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
378 else if(extCov[2] <= fMaxCov22)
379 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
382 if(extCov[5] > fMaxCov33) {
383 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
386 else if(extCov[5] <= fMaxCov33)
387 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
390 if(extCov[9] > fMaxCov44) {
391 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
394 else if(extCov[9] <= fMaxCov44)
395 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
398 if(extCov[14] > fMaxCov55) {
399 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
402 else if(extCov[14] <= fMaxCov55)
403 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
405 if(fMaxSigmaToVertexFlag) {
406 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
407 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
410 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
411 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
413 if(fMaxSigmaToVertexTPCFlag) {
414 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
415 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
418 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
419 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
420 }//sigma to vertex TPC
422 if(dcaXY > fMaxDCAXY) {
423 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(dcaXY);
426 else if(dcaXY <= fMaxDCAXY)
427 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
428 }//DCA xy global tracking
429 if(fMaxDCAXYTPCFlag) {
430 if(dcaXY > fMaxDCAXYTPC) {
431 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(dcaXY);
434 else if(dcaXY <= fMaxDCAXYTPC)
435 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
436 }//DCA xy TPC tracking
438 if(dcaZ > fMaxDCAZ) {
439 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(dcaZ);
442 else if(dcaZ <= fMaxDCAZ)
443 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
444 }//DCA z global tracking
445 if(fMaxDCAZTPCFlag) {
446 if(dcaZ > fMaxDCAZTPC) {
447 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(dcaZ);
450 else if(dcaZ <= fMaxDCAZTPC)
451 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
452 }//DCA z TPC tracking
453 if(fMaxConstrainChi2Flag) {
454 if(track->GetConstrainedChi2() > 0) {
455 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
456 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
459 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
460 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
462 }//constrain chi2 - vertex
464 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
465 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
468 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
469 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
472 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
473 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
476 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
477 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
480 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
481 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
484 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
485 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
488 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
489 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
492 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
493 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
495 if(fPointOnITSLayer1Flag) {
496 if(!track->HasPointOnITSLayer(0)) {
497 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
499 else if(track->HasPointOnITSLayer(0))
500 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
502 if(fPointOnITSLayer2Flag) {
503 if(!track->HasPointOnITSLayer(1)) {
504 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
506 else if(track->HasPointOnITSLayer(1))
507 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
509 if(fPointOnITSLayer3Flag) {
510 if(!track->HasPointOnITSLayer(2)) {
511 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
513 else if(track->HasPointOnITSLayer(2))
514 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
516 if(fPointOnITSLayer4Flag) {
517 if(!track->HasPointOnITSLayer(3)) {
518 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
520 else if(track->HasPointOnITSLayer(3))
521 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
523 if(fPointOnITSLayer5Flag) {
524 if(!track->HasPointOnITSLayer(4)) {
525 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
527 else if(track->HasPointOnITSLayer(4))
528 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
530 if(fPointOnITSLayer6Flag) {
531 if(!track->HasPointOnITSLayer(5)) {
532 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
534 else if(track->HasPointOnITSLayer(5))
535 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
537 }//primary particle cut
540 if(label > nPrimaries) {
541 if(fMinITSClustersFlag) {
542 if(nClustersITS < fMinITSClusters) {
543 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
546 else if(nClustersITS >= fMinITSClusters)
547 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
549 if(fMaxChi2PerITSClusterFlag) {
550 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
551 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
554 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
555 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
556 }//chi2 per ITS cluster
557 if(fMinTPCClustersFlag) {
558 if(nClustersTPC < fMinTPCClusters) {
559 //cout<<"Secondary proton rejected"<<endl;
560 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
563 else if(nClustersTPC >= fMinTPCClusters) {
564 //cout<<"Secondary proton accepted"<<endl;
565 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
568 if(fMaxChi2PerTPCClusterFlag) {
569 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
570 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
573 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
574 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
575 }//chi2 per TPC cluster
577 if(extCov[0] > fMaxCov11) {
578 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
581 else if(extCov[0] <= fMaxCov11)
582 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
585 if(extCov[2] > fMaxCov22) {
586 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
589 else if(extCov[2] <= fMaxCov22)
590 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
593 if(extCov[5] > fMaxCov33) {
594 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
597 else if(extCov[5] <= fMaxCov33)
598 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
601 if(extCov[9] > fMaxCov44) {
602 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
605 else if(extCov[9] <= fMaxCov44)
606 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
609 if(extCov[14] > fMaxCov55) {
610 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
613 else if(extCov[14] <= fMaxCov55)
614 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
616 if(fMaxSigmaToVertexFlag) {
617 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
618 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
621 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
622 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
624 if(fMaxSigmaToVertexTPCFlag) {
625 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
626 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
629 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
630 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
631 }//sigma to vertex TPC
633 if(dcaXY > fMaxDCAXY) {
634 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(dcaXY);
637 else if(dcaXY <= fMaxDCAXY)
638 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
639 }//DCA xy global tracking
640 if(fMaxDCAXYTPCFlag) {
641 if(dcaXY > fMaxDCAXYTPC) {
642 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(dcaXY);
645 else if(dcaXY <= fMaxDCAXYTPC)
646 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
647 }//DCA xy TPC tracking
649 if(dcaZ > fMaxDCAZ) {
650 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(dcaZ);
653 else if(dcaZ <= fMaxDCAZ)
654 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
655 }//DCA z global tracking
656 if(fMaxDCAZTPCFlag) {
657 if(dcaZ > fMaxDCAZTPC) {
658 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(dcaZ);
661 else if(dcaZ <= fMaxDCAZTPC)
662 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
663 }//DCA z TPC tracking
664 if(fMaxConstrainChi2Flag) {
665 if(track->GetConstrainedChi2() > 0) {
666 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
667 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
670 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
671 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
673 }//constrain chi2 - vertex
675 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
676 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
679 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
680 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
683 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
684 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
687 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
688 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
691 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
692 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
695 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
696 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
699 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
700 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
703 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
704 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
706 if(fPointOnITSLayer1Flag) {
707 if(!track->HasPointOnITSLayer(0)) {
708 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
710 else if(track->HasPointOnITSLayer(0))
711 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
713 if(fPointOnITSLayer2Flag) {
714 if(!track->HasPointOnITSLayer(1)) {
715 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
717 else if(track->HasPointOnITSLayer(1))
718 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
720 if(fPointOnITSLayer3Flag) {
721 if(!track->HasPointOnITSLayer(2)) {
722 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
724 else if(track->HasPointOnITSLayer(2))
725 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
727 if(fPointOnITSLayer4Flag) {
728 if(!track->HasPointOnITSLayer(3)) {
729 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
731 else if(track->HasPointOnITSLayer(3))
732 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
734 if(fPointOnITSLayer5Flag) {
735 if(!track->HasPointOnITSLayer(4)) {
736 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
738 else if(track->HasPointOnITSLayer(4))
739 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
741 if(fPointOnITSLayer6Flag) {
742 if(!track->HasPointOnITSLayer(5)) {
743 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
745 else if(track->HasPointOnITSLayer(5))
746 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
748 }//secondary particle cut
752 if(track->Charge() < 0) {
754 if(label <= nPrimaries) {
755 if(fMinITSClustersFlag) {
756 if(nClustersITS < fMinITSClusters) {
757 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
760 else if(nClustersITS >= fMinITSClusters)
761 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
763 if(fMaxChi2PerITSClusterFlag) {
764 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
765 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
768 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
769 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
770 }//chi2 per ITS cluster
771 if(fMinTPCClustersFlag) {
772 if(nClustersTPC < fMinTPCClusters) {
773 //cout<<"Primary antiproton rejected"<<endl;
774 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
777 else if(nClustersTPC >= fMinTPCClusters) {
778 //cout<<"Primary antiproton accepted"<<endl;
779 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
782 if(fMaxChi2PerTPCClusterFlag) {
783 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
784 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
787 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
788 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
789 }//chi2 per TPC cluster
791 if(extCov[0] > fMaxCov11) {
792 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
795 else if(extCov[0] <= fMaxCov11)
796 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
799 if(extCov[2] > fMaxCov22) {
800 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
803 else if(extCov[2] <= fMaxCov22)
804 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
807 if(extCov[5] > fMaxCov33) {
808 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
811 else if(extCov[5] <= fMaxCov33)
812 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
815 if(extCov[9] > fMaxCov44) {
816 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
819 else if(extCov[9] <= fMaxCov44)
820 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
823 if(extCov[14] > fMaxCov55) {
824 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
827 else if(extCov[14] <= fMaxCov55)
828 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
830 if(fMaxSigmaToVertexFlag) {
831 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
832 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
835 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
836 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
838 if(fMaxSigmaToVertexTPCFlag) {
839 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
840 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
843 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
844 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
845 }//sigma to vertex TPC
847 if(dcaXY > fMaxDCAXY) {
848 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
851 else if(dcaXY <= fMaxDCAXY)
852 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
853 }//DCA xy global tracking
854 if(fMaxDCAXYTPCFlag) {
855 if(dcaXY > fMaxDCAXYTPC) {
856 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
859 else if(dcaXY <= fMaxDCAXYTPC)
860 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
861 }//DCA xy TPC tracking
863 if(dcaZ > fMaxDCAZ) {
864 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
867 else if(dcaZ <= fMaxDCAZ)
868 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
869 }//DCA z global tracking
870 if(fMaxDCAZTPCFlag) {
871 if(dcaZ > fMaxDCAZTPC) {
872 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
875 else if(dcaZ <= fMaxDCAZTPC)
876 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
877 }//DCA z TPC tracking
878 if(fMaxConstrainChi2Flag) {
879 if(track->GetConstrainedChi2() > 0) {
880 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
881 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
884 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
885 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
887 }//constrain chi2 - vertex
889 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
890 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
893 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
894 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
897 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
898 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
901 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
902 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
905 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
906 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
909 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
910 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
913 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
914 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
917 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
918 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
920 if(fPointOnITSLayer1Flag) {
921 if(!track->HasPointOnITSLayer(0)) {
922 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
924 else if(track->HasPointOnITSLayer(0))
925 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
927 if(fPointOnITSLayer2Flag) {
928 if(!track->HasPointOnITSLayer(1)) {
929 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
931 else if(track->HasPointOnITSLayer(1))
932 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
934 if(fPointOnITSLayer3Flag) {
935 if(!track->HasPointOnITSLayer(2)) {
936 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
938 else if(track->HasPointOnITSLayer(2))
939 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
941 if(fPointOnITSLayer4Flag) {
942 if(!track->HasPointOnITSLayer(3)) {
943 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
945 else if(track->HasPointOnITSLayer(3))
946 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
948 if(fPointOnITSLayer5Flag) {
949 if(!track->HasPointOnITSLayer(4)) {
950 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
952 else if(track->HasPointOnITSLayer(4))
953 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
955 if(fPointOnITSLayer6Flag) {
956 if(!track->HasPointOnITSLayer(5)) {
957 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
959 else if(track->HasPointOnITSLayer(5))
960 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
962 }//primary particle cut
965 if(label > nPrimaries) {
966 if(fMinITSClustersFlag) {
967 if(nClustersITS < fMinITSClusters) {
968 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
971 else if(nClustersITS >= fMinITSClusters)
972 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
974 if(fMaxChi2PerITSClusterFlag) {
975 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
976 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
979 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
980 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
981 }//chi2 per ITS cluster
982 if(fMinTPCClustersFlag) {
983 if(nClustersTPC < fMinTPCClusters) {
984 //cout<<"Secondary antiproton rejected"<<endl;
985 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
988 else if(nClustersTPC >= fMinTPCClusters) {
989 //cout<<"Secondary antiproton accepted"<<endl;
990 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
993 if(fMaxChi2PerTPCClusterFlag) {
994 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
995 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
998 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
999 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1000 }//chi2 per TPC cluster
1002 if(extCov[0] > fMaxCov11) {
1003 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
1006 else if(extCov[0] <= fMaxCov11)
1007 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1010 if(extCov[2] > fMaxCov22) {
1011 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1014 else if(extCov[2] <= fMaxCov22)
1015 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1018 if(extCov[5] > fMaxCov33) {
1019 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1022 else if(extCov[5] <= fMaxCov33)
1023 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1026 if(extCov[9] > fMaxCov44) {
1027 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1030 else if(extCov[9] <= fMaxCov44)
1031 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1034 if(extCov[14] > fMaxCov55) {
1035 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1038 else if(extCov[14] <= fMaxCov55)
1039 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1041 if(fMaxSigmaToVertexFlag) {
1042 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1043 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1046 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1047 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1049 if(fMaxSigmaToVertexTPCFlag) {
1050 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1051 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1054 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1055 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1056 }//sigma to vertex TPC
1058 if(dcaXY > fMaxDCAXY) {
1059 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
1062 else if(dcaXY <= fMaxDCAXY)
1063 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
1064 }//DCA xy global tracking
1065 if(fMaxDCAXYTPCFlag) {
1066 if(dcaXY > fMaxDCAXYTPC) {
1067 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
1070 else if(dcaXY <= fMaxDCAXYTPC)
1071 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
1072 }//DCA xy TPC tracking
1074 if(dcaZ > fMaxDCAZ) {
1075 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
1078 else if(dcaZ <= fMaxDCAZ)
1079 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
1080 }//DCA z global tracking
1081 if(fMaxDCAZTPCFlag) {
1082 if(dcaZ > fMaxDCAZTPC) {
1083 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
1086 else if(dcaZ <= fMaxDCAZTPC)
1087 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
1088 }//DCA z TPC tracking
1089 if(fMaxConstrainChi2Flag) {
1090 if(track->GetConstrainedChi2() > 0) {
1091 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1092 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1095 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1096 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1098 }//constrain chi2 - vertex
1100 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1101 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1104 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1105 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1108 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1109 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1112 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1113 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1116 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1117 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1120 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1121 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1124 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1125 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1128 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1129 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1131 if(fPointOnITSLayer1Flag) {
1132 if(!track->HasPointOnITSLayer(0)) {
1133 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1135 else if(track->HasPointOnITSLayer(0))
1136 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1138 if(fPointOnITSLayer2Flag) {
1139 if(!track->HasPointOnITSLayer(1)) {
1140 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1142 else if(track->HasPointOnITSLayer(1))
1143 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1145 if(fPointOnITSLayer3Flag) {
1146 if(!track->HasPointOnITSLayer(2)) {
1147 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1149 else if(track->HasPointOnITSLayer(2))
1150 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1152 if(fPointOnITSLayer4Flag) {
1153 if(!track->HasPointOnITSLayer(3)) {
1154 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1156 else if(track->HasPointOnITSLayer(3))
1157 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1159 if(fPointOnITSLayer5Flag) {
1160 if(!track->HasPointOnITSLayer(4)) {
1161 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1163 else if(track->HasPointOnITSLayer(4))
1164 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1166 if(fPointOnITSLayer6Flag) {
1167 if(!track->HasPointOnITSLayer(5)) {
1168 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1170 else if(track->HasPointOnITSLayer(5))
1171 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1173 }//secondary particle cut
1177 //____________________________________________________________________//
1178 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1179 // Calculates the number of sigma to the vertex.
1183 if((fUseTPCOnly)&&(!fUseHybridTPC))
1184 esdTrack->GetImpactParametersTPC(b,bCov);
1186 esdTrack->GetImpactParameters(b,bCov);
1188 if (bCov[0]<=0 || bCov[2]<=0) {
1189 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1190 bCov[0]=0; bCov[2]=0;
1192 bRes[0] = TMath::Sqrt(bCov[0]);
1193 bRes[1] = TMath::Sqrt(bCov[2]);
1195 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1197 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1199 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1201 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1206 //____________________________________________________________________//
1207 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1208 //returns the rapidity of the proton - to be removed
1209 Double_t fMass = 9.38270000000000048e-01;
1211 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1212 TMath::Power(Py,2) +
1213 TMath::Power(Pz,2));
1214 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1217 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1222 //____________________________________________________________________//
1223 void AliProtonQAAnalysis::SetRunQAAnalysis() {
1224 //initializes the QA lists
1225 //fQAHistograms = kTRUE;
1226 fGlobalQAList = new TList();
1227 fQA2DList = new TList();
1228 fQA2DList->SetName("fQA2DList");
1229 fGlobalQAList->Add(fQA2DList);
1231 fQAPrimaryProtonsAcceptedList = new TList();
1232 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1233 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1235 fQAPrimaryProtonsRejectedList = new TList();
1236 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1237 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1239 fQASecondaryProtonsAcceptedList = new TList();
1240 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1241 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1243 fQASecondaryProtonsRejectedList = new TList();
1244 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1245 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1247 fQAPrimaryAntiProtonsAcceptedList = new TList();
1248 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1249 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1251 fQAPrimaryAntiProtonsRejectedList = new TList();
1252 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1253 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1255 fQASecondaryAntiProtonsAcceptedList = new TList();
1256 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1257 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1259 fQASecondaryAntiProtonsRejectedList = new TList();
1260 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1261 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1264 //____________________________________________________________________//
1265 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1266 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1267 //Initializes the QA binning
1269 fMinY = minY; fMaxY = maxY;
1271 fMinPt = minPt; fMaxPt = maxPt;
1274 if(fRunMCAnalysis) InitMCAnalysis();
1275 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1278 //____________________________________________________________________//
1279 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1280 //Initialization of the efficiency list - reconstruction & PID efficiency
1281 //Adding each monitored object in the list
1282 fEfficiencyList = new TList();
1284 //MC primary protons and antiprotons for the reconstruction efficiency
1285 TH2D *gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1287 fNBinsY,fMinY,fMaxY,
1288 fNBinsPt,fMinPt,fMaxPt);
1289 if(fRunEfficiencyAnalysisEtaMode)
1290 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1292 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
1293 gHistMCYPtProtons->SetStats(kTRUE);
1294 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1295 fEfficiencyList->Add(gHistMCYPtProtons);
1296 TH2D *gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1298 fNBinsY,fMinY,fMaxY,
1299 fNBinsPt,fMinPt,fMaxPt);
1300 if(fRunEfficiencyAnalysisEtaMode)
1301 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1303 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
1304 gHistMCYPtAntiProtons->SetStats(kTRUE);
1305 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1306 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1308 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1309 TH2D *gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1311 fNBinsY,fMinY,fMaxY,
1312 fNBinsPt,fMinPt,fMaxPt);
1313 if(fRunEfficiencyAnalysisEtaMode)
1314 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1316 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1317 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1318 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1319 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1320 TH2D *gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1322 fNBinsY,fMinY,fMaxY,
1323 fNBinsPt,fMinPt,fMaxPt);
1324 if(fRunEfficiencyAnalysisEtaMode)
1325 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1327 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1328 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1329 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1330 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1332 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1333 TH2D *gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1335 fNBinsY,fMinY,fMaxY,
1336 fNBinsPt,fMinPt,fMaxPt);
1337 if(fRunEfficiencyAnalysisEtaMode)
1338 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1340 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1341 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1342 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1343 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1344 TH2D *gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1346 fNBinsY,fMinY,fMaxY,
1347 fNBinsPt,fMinPt,fMaxPt);
1348 if(fRunEfficiencyAnalysisEtaMode)
1349 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1351 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1352 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1353 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1354 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1356 //ESD primary protons and antiprotons for the reconstruction efficiency
1357 TH2D *gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1359 fNBinsY,fMinY,fMaxY,
1360 fNBinsPt,fMinPt,fMaxPt);
1361 if(fRunEfficiencyAnalysisEtaMode)
1362 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1364 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
1365 gHistESDYPtProtons->SetStats(kTRUE);
1366 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1367 fEfficiencyList->Add(gHistESDYPtProtons);
1368 TH2D *gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1370 fNBinsY,fMinY,fMaxY,
1371 fNBinsPt,fMinPt,fMaxPt);
1372 if(fRunEfficiencyAnalysisEtaMode)
1373 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1375 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
1376 gHistESDYPtAntiProtons->SetStats(kTRUE);
1377 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1378 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1380 //ESD (anti)protons from weak decays for the reconstruction efficiency
1381 TH2D *gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1383 fNBinsY,fMinY,fMaxY,
1384 fNBinsPt,fMinPt,fMaxPt);
1385 if(fRunEfficiencyAnalysisEtaMode)
1386 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1388 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1389 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1390 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1391 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1392 TH2D *gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1394 fNBinsY,fMinY,fMaxY,
1395 fNBinsPt,fMinPt,fMaxPt);
1396 if(fRunEfficiencyAnalysisEtaMode)
1397 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1399 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1400 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1401 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1402 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1404 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1405 TH2D *gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1407 fNBinsY,fMinY,fMaxY,
1408 fNBinsPt,fMinPt,fMaxPt);
1409 if(fRunEfficiencyAnalysisEtaMode)
1410 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1412 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1413 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1414 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1415 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1416 TH2D *gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1418 fNBinsY,fMinY,fMaxY,
1419 fNBinsPt,fMinPt,fMaxPt);
1420 if(fRunEfficiencyAnalysisEtaMode)
1421 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1423 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1424 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1425 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1426 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1429 //ESD reconstructed tracks that were initially protons for the PID efficiency
1430 TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
1432 fNBinsY,fMinY,fMaxY,
1433 fNBinsPt,fMinPt,fMaxPt);
1434 if(fRunEfficiencyAnalysisEtaMode)
1435 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1437 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
1438 gHistESDInitYPtProtons->SetStats(kTRUE);
1439 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1440 fEfficiencyList->Add(gHistESDInitYPtProtons);
1442 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1443 TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
1445 fNBinsY,fMinY,fMaxY,
1446 fNBinsPt,fMinPt,fMaxPt);
1447 if(fRunEfficiencyAnalysisEtaMode)
1448 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1450 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
1451 gHistESDIdYPtProtons->SetStats(kTRUE);
1452 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1453 fEfficiencyList->Add(gHistESDIdYPtProtons);
1455 //ESD reconstructed tracks that were identified as protons for the PID contamination
1456 TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
1458 fNBinsY,fMinY,fMaxY,
1459 fNBinsPt,fMinPt,fMaxPt);
1460 if(fRunEfficiencyAnalysisEtaMode)
1461 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1463 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
1464 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1465 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1466 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1468 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1469 TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
1471 fNBinsY,fMinY,fMaxY,
1472 fNBinsPt,fMinPt,fMaxPt);
1473 if(fRunEfficiencyAnalysisEtaMode)
1474 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1476 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
1477 gHistESDContamYPtProtons->SetStats(kTRUE);
1478 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1479 fEfficiencyList->Add(gHistESDContamYPtProtons);
1482 //____________________________________________________________________//
1483 void AliProtonQAAnalysis::InitCutLists() {
1484 //Initialization of the cut lists
1485 //Adding each monitored object in each list
1488 fAcceptedCutList = new TList();
1489 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1490 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1491 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1492 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1493 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1494 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1495 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1496 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1498 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1499 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1500 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1501 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1502 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1503 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1504 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1505 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1507 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1508 ";x^{2}/N_{clusters} (ITS);Entries",
1510 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1511 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1512 ";x^{2}/N_{clusters} (ITS);Entries",
1514 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1515 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1516 ";x^{2}/N_{clusters} (ITS);Entries",
1518 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1519 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1520 ";x^{2}/N_{clusters} (ITS);Entries",
1522 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1524 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1525 ";Log_{10}(#chi^{2});Entries",
1527 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1528 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1529 ";Log_{10}(#chi^{2});Entries",
1531 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1532 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1533 ";Log_{10}(#chi^{2});Entries",
1535 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1536 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1537 ";Log_{10}(#chi^{2});Entries",
1539 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1541 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1542 ";N_{clusters} (TPC);Entries",
1544 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1545 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1546 ";N_{clusters} (TPC);Entries",
1548 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1549 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1550 ";N_{clusters} (TPC);Entries",
1552 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1553 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1554 ";N_{clusters} (TPC);Entries",
1556 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1558 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1559 ";x^{2}/N_{clusters} (TPC);Entries",
1561 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1562 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1563 ";x^{2}/N_{clusters} (TPC);Entries",
1565 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1566 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1567 ";x^{2}/N_{clusters} (TPC);Entries",
1569 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1570 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1571 ";x^{2}/N_{clusters} (TPC);Entries",
1573 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1575 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1576 ";#sigma_{y} [cm];Entries",
1578 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1579 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1580 ";#sigma_{y} [cm];Entries",
1582 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1583 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1584 ";#sigma_{y} [cm];Entries",
1586 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1587 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1588 ";#sigma_{y} [cm];Entries",
1590 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1593 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1594 ";#sigma_{z} [cm];Entries",
1596 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1597 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1598 ";#sigma_{z} [cm];Entries",
1600 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1601 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1602 ";#sigma_{z} [cm];Entries",
1604 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1605 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1606 ";#sigma_{z} [cm];Entries",
1608 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1611 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1612 ";#sigma_{sin(#phi)};Entries",
1614 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1615 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1616 ";#sigma_{sin(#phi)};Entries",
1618 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1619 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1620 ";#sigma_{sin(#phi)};Entries",
1622 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1623 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1624 ";#sigma_{sin(#phi)};Entries",
1626 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1629 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1630 ";#sigma_{tan(#lambda)};Entries",
1632 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1633 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1634 ";#sigma_{tan(#lambda)};Entries",
1636 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1637 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1638 ";#sigma_{tan(#lambda)};Entries",
1640 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1641 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1642 ";#sigma_{tan(#lambda)};Entries",
1644 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1647 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1648 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1650 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1651 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1652 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1654 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1655 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1656 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1658 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1659 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1660 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1662 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1665 fAcceptedDCAList = new TList();
1666 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1667 ";DCA_{xy} [cm];Entries",
1669 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1670 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1671 ";DCA_{xy} [cm];Entries",
1673 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1674 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1675 ";DCA_{xy} [cm];Entries",
1677 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1678 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1679 ";DCA_{xy} [cm];Entries",
1682 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1683 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1684 ";DCA_{z} [cm];Entries",
1686 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1687 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1688 ";DCA_{z} [cm];Entries",
1690 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1691 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1692 ";DCA_{z} [cm];Entries",
1694 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1695 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1696 ";DCA_{z} [cm];Entries",
1698 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1700 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1701 ";#sigma_{Vertex};Entries",
1703 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1704 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1705 ";#sigma_{Vertex};Entries",
1707 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1708 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1709 ";#sigma_{Vertex};Entries",
1711 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1712 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1713 ";#sigma_{Vertex};Entries",
1715 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1719 //____________________________________________________________________//
1720 void AliProtonQAAnalysis::InitQA() {
1721 //Initializes the QA histograms and builds the directory structure
1722 //if(!fQAHistograms)
1726 //TDirectory *dir2D = gDirectory->mkdir("2D");
1727 //fGlobalQAList->Add(dir2D); dir2D->cd();
1728 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1730 fNBinsY,fMinY,fMaxY,
1731 fNBinsPt,fMinPt,fMaxPt);
1732 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1733 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1734 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
1735 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1737 fNBinsY,fMinY,fMaxY,
1738 fNBinsPt,fMinPt,fMaxPt);
1739 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1740 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1741 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
1743 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1745 fNBinsY,fMinY,fMaxY,
1746 fNBinsPt,fMinPt,fMaxPt);
1747 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1748 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1749 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
1750 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1752 fNBinsY,fMinY,fMaxY,
1753 fNBinsPt,fMinPt,fMaxPt);
1754 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1755 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1756 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
1758 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1760 fNBinsY,fMinY,fMaxY,
1761 fNBinsPt,fMinPt,fMaxPt);
1762 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1763 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1764 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
1765 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1767 fNBinsY,fMinY,fMaxY,
1768 fNBinsPt,fMinPt,fMaxPt);
1769 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1770 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1771 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
1773 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1775 fNBinsY,fMinY,fMaxY,
1776 fNBinsPt,fMinPt,fMaxPt);
1777 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1778 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1779 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
1780 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1782 fNBinsY,fMinY,fMaxY,
1783 fNBinsPt,fMinPt,fMaxPt);
1784 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1785 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1786 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
1788 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
1790 fNBinsY,fMinY,fMaxY,
1791 fNBinsPt,fMinPt,fMaxPt);
1792 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
1793 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
1794 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
1795 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
1797 fNBinsY,fMinY,fMaxY,
1798 fNBinsPt,fMinPt,fMaxPt);
1799 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
1800 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
1801 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
1803 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
1804 ";y;P_{T} [GeV/c];PDG",
1805 fNBinsY,fMinY,fMaxY,
1806 fNBinsPt,fMinPt,fMaxPt,
1808 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
1809 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
1810 ";y;P_{T} [GeV/c];PDG",
1811 fNBinsY,fMinY,fMaxY,
1812 fNBinsPt,fMinPt,fMaxPt,
1814 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
1816 /*gDirectory->cd("../");
1818 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1819 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1821 //________________________________________________________________//
1822 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1823 dirProtonsPrimary->cd();
1824 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1825 dirProtonsPrimaryAccepted->cd();*/
1827 //Accepted primary protons
1828 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
1829 ";N_{clusters} (ITS);Entries",
1831 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
1832 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
1833 ";x^{2}/N_{clusters} (ITS);Entries",
1835 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
1836 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
1837 ";N_{clusters} (TPC);Entries",
1839 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
1840 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
1841 ";x^{2}/N_{clusters} (TPC);Entries",
1843 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
1844 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
1845 ";#sigma_{y} [cm];Entries",
1847 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
1848 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
1849 ";#sigma_{z} [cm];Entries",
1851 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
1852 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
1853 ";#sigma_{sin(#phi)};Entries",
1855 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
1856 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
1857 ";#sigma_{tan(#lambda)};Entries",
1859 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
1860 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
1861 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1863 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
1864 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
1865 ";#sigma_{Vertex};Entries",
1867 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
1868 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
1869 ";#sigma_{Vertex};Entries",
1871 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
1872 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
1873 ";DCA_{xy} [cm];Entries",
1875 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
1876 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
1877 ";DCA_{xy} [cm];Entries",
1879 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
1880 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
1881 ";DCA_{z} [cm];Entries",
1883 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
1884 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
1885 ";DCA_{z} [cm];Entries",
1887 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
1888 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
1889 ";Log_{10}(#chi^{2});Entries",
1891 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
1892 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
1894 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
1895 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
1897 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
1898 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
1900 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
1901 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
1903 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
1904 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
1906 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
1907 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
1909 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
1910 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
1912 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
1913 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
1915 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
1916 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
1918 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
1919 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
1921 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
1923 //Rejected primary protons
1924 /*gDirectory->cd("../");
1925 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1926 dirProtonsPrimaryRejected->cd();*/
1928 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
1929 ";N_{clusters} (ITS);Entries",
1931 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
1932 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
1933 ";x^{2}/N_{clusters} (ITS);Entries",
1935 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
1936 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
1937 ";N_{clusters} (TPC);Entries",
1939 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
1940 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
1941 ";x^{2}/N_{clusters} (TPC);Entries",
1943 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
1944 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
1945 ";#sigma_{y} [cm];Entries",
1947 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
1948 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
1949 ";#sigma_{z} [cm];Entries",
1951 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
1952 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
1953 ";#sigma_{sin(#phi)};Entries",
1955 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
1956 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
1957 ";#sigma_{tan(#lambda)};Entries",
1959 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
1960 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
1961 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1963 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
1964 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
1965 ";#sigma_{Vertex};Entries",
1967 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
1968 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
1969 ";#sigma_{Vertex};Entries",
1971 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
1972 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
1973 ";DCA_{xy} [cm];Entries",
1975 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
1976 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
1977 ";DCA_{xy} [cm];Entries",
1979 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
1980 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
1981 ";DCA_{z} [cm];Entries",
1983 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
1984 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
1985 ";DCA_{z} [cm];Entries",
1987 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
1988 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
1989 ";Log_{10}(#chi^{2});Entries",
1991 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
1992 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
1994 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
1995 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
1997 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
1998 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2000 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2001 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2003 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2004 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2006 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2007 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2009 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2010 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2012 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2013 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2015 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2016 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2018 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2019 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2021 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2023 //________________________________________________________________//
2024 /*gDirectory->cd("../../");
2026 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2027 dirProtonsSecondary->cd();
2028 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2029 dirProtonsSecondaryAccepted->cd();*/
2031 //Accepted secondary protons
2032 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2033 ";N_{clusters} (ITS);Entries",
2035 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2036 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2037 ";x^{2}/N_{clusters} (ITS);Entries",
2039 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2040 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2041 ";N_{clusters} (TPC);Entries",
2043 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2044 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2045 ";x^{2}/N_{clusters} (TPC);Entries",
2047 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2048 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2049 ";#sigma_{y} [cm];Entries",
2051 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2052 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2053 ";#sigma_{z} [cm];Entries",
2055 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2056 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2057 ";#sigma_{sin(#phi)};Entries",
2059 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2060 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2061 ";#sigma_{tan(#lambda)};Entries",
2063 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2064 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2065 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2067 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2068 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2069 ";#sigma_{Vertex};Entries",
2071 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2072 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2073 ";#sigma_{Vertex};Entries",
2075 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2076 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2077 ";DCA_{xy} [cm];Entries",
2079 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2080 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2081 ";DCA_{xy} [cm];Entries",
2083 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2084 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2085 ";DCA_{z} [cm];Entries",
2087 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2088 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2089 ";DCA_{z} [cm];Entries",
2091 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2092 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2093 ";Log_{10}(#chi^{2});Entries",
2095 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2096 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2098 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2099 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2101 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2102 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2104 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2105 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2107 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2108 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2110 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2111 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2113 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2114 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2116 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2117 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2119 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2120 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2122 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2123 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2125 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2127 //Rejected secondary protons
2128 /*gDirectory->cd("../");
2129 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2130 dirProtonsSecondaryRejected->cd();*/
2132 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2133 ";N_{clusters} (ITS);Entries",
2135 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2136 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2137 ";x^{2}/N_{clusters} (ITS);Entries",
2139 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2140 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2141 ";N_{clusters} (TPC);Entries",
2143 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2144 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2145 ";x^{2}/N_{clusters} (TPC);Entries",
2147 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2148 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2149 ";#sigma_{y} [cm];Entries",
2151 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2152 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2153 ";#sigma_{z} [cm];Entries",
2155 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2156 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2157 ";#sigma_{sin(#phi)};Entries",
2159 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2160 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2161 ";#sigma_{tan(#lambda)};Entries",
2163 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2164 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2165 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2167 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2168 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2169 ";#sigma_{Vertex};Entries",
2171 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2172 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2173 ";#sigma_{Vertex};Entries",
2175 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2176 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2177 ";DCA_{xy} [cm];Entries",
2179 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2180 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2181 ";DCA_{xy} [cm];Entries",
2183 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2184 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2185 ";DCA_{z} [cm];Entries",
2187 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2188 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2189 ";DCA_{z} [cm];Entries",
2191 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2192 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2193 ";Log_{10}(#chi^{2});Entries",
2195 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2196 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2198 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2199 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2201 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2202 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2204 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2205 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2207 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2208 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2210 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2211 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2213 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2214 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2216 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2217 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2219 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2220 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2222 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2223 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2225 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2228 /*gDirectory->cd("../../../");
2231 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2232 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2234 //________________________________________________________________//
2235 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2236 dirAntiProtonsPrimary->cd();
2237 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2238 dirAntiProtonsPrimaryAccepted->cd();*/
2240 //Accepted primary antiprotons
2241 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2242 ";N_{clusters} (ITS);Entries",
2244 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2245 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2246 ";x^{2}/N_{clusters} (ITS);Entries",
2248 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2249 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2250 ";N_{clusters} (TPC);Entries",
2252 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2253 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2254 ";x^{2}/N_{clusters} (TPC);Entries",
2256 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2257 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2258 ";#sigma_{y} [cm];Entries",
2260 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2261 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2262 ";#sigma_{z} [cm];Entries",
2264 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2265 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2266 ";#sigma_{sin(#phi)};Entries",
2268 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2269 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2270 ";#sigma_{tan(#lambda)};Entries",
2272 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2273 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2274 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2276 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2277 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2278 ";#sigma_{Vertex};Entries",
2280 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2281 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2282 ";#sigma_{Vertex};Entries",
2284 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2285 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2286 ";DCA_{xy} [cm];Entries",
2288 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2289 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2290 ";DCA_{xy} [cm];Entries",
2292 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2293 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2294 ";DCA_{z} [cm];Entries",
2296 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2297 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2298 ";DCA_{z} [cm];Entries",
2300 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2301 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2302 ";Log_{10}(#chi^{2});Entries",
2304 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2305 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2307 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2308 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2310 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2311 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2313 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2314 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2316 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2317 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2319 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2320 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2322 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2323 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2325 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2326 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2328 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2329 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2331 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2332 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2334 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2336 //Rejected primary antiprotons
2337 /*gDirectory->cd("../");
2338 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2339 dirAntiProtonsPrimaryRejected->cd();*/
2341 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2342 ";N_{clusters} (ITS);Entries",
2344 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2345 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2346 ";x^{2}/N_{clusters} (ITS);Entries",
2348 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2349 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2350 ";N_{clusters} (TPC);Entries",
2352 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2353 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2354 ";x^{2}/N_{clusters} (TPC);Entries",
2356 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2357 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2358 ";#sigma_{y} [cm];Entries",
2360 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2361 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2362 ";#sigma_{z} [cm];Entries",
2364 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2365 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2366 ";#sigma_{sin(#phi)};Entries",
2368 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2369 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2370 ";#sigma_{tan(#lambda)};Entries",
2372 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2373 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2374 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2376 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2377 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2378 ";#sigma_{Vertex};Entries",
2380 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2381 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2382 ";#sigma_{Vertex};Entries",
2384 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2385 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2386 ";DCA_{xy} [cm];Entries",
2388 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2389 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2390 ";DCA_{xy} [cm];Entries",
2392 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2393 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2394 ";DCA_{z} [cm];Entries",
2396 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2397 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2398 ";DCA_{z} [cm];Entries",
2400 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2401 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2402 ";Log_{10}(#chi^{2});Entries",
2404 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2405 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2407 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2408 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2410 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2411 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2413 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2414 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2416 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2417 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2419 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2420 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2422 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2423 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2425 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2426 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2428 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2429 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2431 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2432 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2434 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2436 //________________________________________________________________//
2437 /*gDirectory->cd("../../");
2439 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2440 dirAntiProtonsSecondary->cd();
2441 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2442 dirAntiProtonsSecondaryAccepted->cd();*/
2444 //Accepted secondary antiprotons
2445 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2446 ";N_{clusters} (ITS);Entries",
2448 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2449 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2450 ";x^{2}/N_{clusters} (ITS);Entries",
2452 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2453 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2454 ";N_{clusters} (TPC);Entries",
2456 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2457 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2458 ";x^{2}/N_{clusters} (TPC);Entries",
2460 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2461 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2462 ";#sigma_{y} [cm];Entries",
2464 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2465 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2466 ";#sigma_{z} [cm];Entries",
2468 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2469 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2470 ";#sigma_{sin(#phi)};Entries",
2472 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2473 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2474 ";#sigma_{tan(#lambda)};Entries",
2476 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2477 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2478 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2480 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2481 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2482 ";#sigma_{Vertex};Entries",
2484 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2485 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2486 ";#sigma_{Vertex};Entries",
2488 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2489 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2490 ";DCA_{xy} [cm];Entries",
2492 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2493 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2494 ";DCA_{xy} [cm];Entries",
2496 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2497 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2498 ";DCA_{z} [cm];Entries",
2500 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2501 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2502 ";DCA_{z} [cm];Entries",
2504 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2505 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2506 ";Log_{10}(#chi^{2});Entries",
2508 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2509 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2511 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2512 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2514 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2515 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2517 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2518 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2520 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2521 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2523 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2524 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2526 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2527 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2529 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2530 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2532 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2533 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2535 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2536 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2538 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2540 //Rejected secondary antiprotons
2541 /*gDirectory->cd("../");
2542 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2543 dirAntiProtonsSecondaryRejected->cd();*/
2545 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2546 ";N_{clusters} (ITS);Entries",
2548 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2549 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2550 ";x^{2}/N_{clusters} (ITS);Entries",
2552 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2553 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2554 ";N_{clusters} (TPC);Entries",
2556 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2557 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2558 ";x^{2}/N_{clusters} (TPC);Entries",
2560 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2561 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2562 ";#sigma_{y} [cm];Entries",
2564 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2565 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2566 ";#sigma_{z} [cm];Entries",
2568 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2569 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2570 ";#sigma_{sin(#phi)};Entries",
2572 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2573 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2574 ";#sigma_{tan(#lambda)};Entries",
2576 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2577 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2578 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2580 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2581 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2582 ";#sigma_{Vertex};Entries",
2584 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2585 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2586 ";#sigma_{Vertex};Entries",
2588 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2589 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2590 ";DCA_{xy} [cm];Entries",
2592 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2593 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2594 ";DCA_{xy} [cm];Entries",
2596 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2597 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2598 ";DCA_{z} [cm];Entries",
2600 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2601 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2602 ";DCA_{z} [cm];Entries",
2604 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2605 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2606 ";Log_{10}(#chi^{2});Entries",
2608 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2609 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2611 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2612 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2614 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2615 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2617 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2618 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2620 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2621 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2623 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2624 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
2626 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2627 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
2629 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2630 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
2632 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2633 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
2635 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2636 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
2638 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
2641 //____________________________________________________________________//
2642 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
2644 const AliESDVertex *vertex) {
2645 //Runs the efficiency code
2647 Int_t nMCProtons = 0, nESDProtons = 0;
2648 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2649 TParticle *particle = stack->Particle(iParticle);
2650 if(!particle) continue;
2652 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2653 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2654 if(fRunEfficiencyAnalysisEtaMode) {
2655 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2658 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2660 Int_t pdgcode = particle->GetPdgCode();
2661 if(TMath::Abs(pdgcode) != 2212) continue;
2663 if(iParticle <= stack->GetNprimary()) {
2664 if(pdgcode == 2212) {
2666 if(fRunEfficiencyAnalysisEtaMode)
2667 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2670 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2675 if(pdgcode == -2212) {
2676 if(fRunEfficiencyAnalysisEtaMode)
2677 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2680 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2688 Int_t lPartMother = -1;
2689 Int_t motherPDGCode = -1;
2690 lPartMother = particle->GetFirstMother();
2691 TParticle *motherParticle = stack->Particle(lPartMother);
2692 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2694 if(pdgcode == 2212) {
2695 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2696 if(fRunEfficiencyAnalysisEtaMode)
2697 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
2700 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
2705 if((particle->GetUniqueID() == 13)) {
2706 if(fRunEfficiencyAnalysisEtaMode)
2707 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
2710 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
2714 }//hadronic interactions
2716 if(pdgcode == -2212) {
2717 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2718 if(fRunEfficiencyAnalysisEtaMode)
2719 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
2722 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
2727 if((particle->GetUniqueID() == 13)) {
2728 if(fRunEfficiencyAnalysisEtaMode)
2729 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
2732 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
2736 }//hadronic interactions
2743 Int_t nGoodTracks = esd->GetNumberOfTracks();
2744 TArrayI labelArray(nGoodTracks);
2745 Int_t labelCounter = 0;
2746 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2747 AliESDtrack* track = esd->GetTrack(iTracks);
2748 if(!track) continue;
2750 Int_t label = TMath::Abs(track->GetLabel());
2751 if(IsLabelUsed(labelArray,label)) continue;
2752 labelArray.AddAt(label,labelCounter);
2755 TParticle *particle = stack->Particle(label);
2756 if(!particle) continue;
2757 Int_t pdgcode = particle->GetPdgCode();
2758 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2760 Double_t Pt = 0.0, P = 0.0;
2761 Double_t probability[5];
2765 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2766 if(!tpcTrack) continue;
2767 Pt = tpcTrack->Pt();
2770 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2771 if(fRunEfficiencyAnalysisEtaMode) {
2772 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2775 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2777 if(fUseCutsInEfficiency)
2778 if(!IsAccepted(esd,vertex,track)) continue;
2780 //reconstructed primary (anti)protons
2781 if(pdgcode == 2212) {
2782 if(fRunEfficiencyAnalysisEtaMode)
2783 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2786 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2790 if(label <= stack->GetNprimary()) {
2792 if(fRunEfficiencyAnalysisEtaMode)
2793 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
2796 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
2801 if(label > stack->GetNprimary()) {
2802 Int_t lPartMother = -1;
2803 Int_t motherPDGCode = -1;
2804 lPartMother = particle->GetFirstMother();
2805 TParticle *motherParticle = stack->Particle(lPartMother);
2806 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2808 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2809 if(fRunEfficiencyAnalysisEtaMode)
2810 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
2813 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
2818 if((particle->GetUniqueID() == 13)) {
2819 if(fRunEfficiencyAnalysisEtaMode)
2820 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
2823 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
2827 }//hadronic interactions
2830 if(pdgcode == -2212) {
2831 if(fRunEfficiencyAnalysisEtaMode)
2832 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2835 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2839 if(label <= stack->GetNprimary()) {
2840 if(fRunEfficiencyAnalysisEtaMode)
2841 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
2844 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
2849 if(label > stack->GetNprimary()) {
2850 Int_t lPartMother = -1;
2851 Int_t motherPDGCode = -1;
2852 lPartMother = particle->GetFirstMother();
2853 TParticle *motherParticle = stack->Particle(lPartMother);
2854 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2856 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2857 if(fRunEfficiencyAnalysisEtaMode)
2858 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
2861 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
2866 if((particle->GetUniqueID() == 13)) {
2867 if(fRunEfficiencyAnalysisEtaMode)
2868 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
2871 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
2875 }//hadronic interactions
2877 }//initial antiprotons
2880 track->GetTPCpid(probability);
2882 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2883 rcc += probability[i]*GetParticleFraction(i,P);
2884 if(rcc == 0.0) continue;
2886 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2887 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2888 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2889 if(fParticleType == 4) {
2890 if(fRunEfficiencyAnalysisEtaMode)
2891 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
2894 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
2898 if(TMath::Abs(pdgcode) == 2212) {
2899 if(fRunEfficiencyAnalysisEtaMode)
2900 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
2903 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
2907 }//properly identified as proton
2909 if(fRunEfficiencyAnalysisEtaMode)
2910 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
2913 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
2918 }//identified as proton
2920 else if(!fUseTPCOnly) {
2921 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
2922 if(fRunEfficiencyAnalysisEtaMode) {
2923 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2926 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
2929 if(fUseCutsInEfficiency)
2930 if(!IsAccepted(esd,vertex,track)) continue;
2932 //reconstructed primary (anti)protons
2933 if(pdgcode == 2212) {
2934 if(fRunEfficiencyAnalysisEtaMode)
2935 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2938 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2942 if(label <= stack->GetNprimary()) {
2944 if(fRunEfficiencyAnalysisEtaMode)
2945 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
2948 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
2953 if(label > stack->GetNprimary()) {
2954 Int_t lPartMother = -1;
2955 Int_t motherPDGCode = -1;
2956 lPartMother = particle->GetFirstMother();
2957 TParticle *motherParticle = stack->Particle(lPartMother);
2958 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
2960 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
2961 if(fRunEfficiencyAnalysisEtaMode)
2962 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
2965 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
2970 if((particle->GetUniqueID() == 13)) {
2971 if(fRunEfficiencyAnalysisEtaMode)
2972 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
2975 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
2979 }//hadronic interactions
2982 if(pdgcode == -2212) {
2983 if(fRunEfficiencyAnalysisEtaMode)
2984 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
2987 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
2991 if(label <= stack->GetNprimary()) {
2992 if(fRunEfficiencyAnalysisEtaMode)
2993 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
2996 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3001 if(label > stack->GetNprimary()) {
3002 Int_t lPartMother = -1;
3003 Int_t motherPDGCode = -1;
3004 lPartMother = particle->GetFirstMother();
3005 TParticle *motherParticle = stack->Particle(lPartMother);
3006 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3008 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3009 if(fRunEfficiencyAnalysisEtaMode)
3010 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3013 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3018 if((particle->GetUniqueID() == 13)) {
3019 if(fRunEfficiencyAnalysisEtaMode)
3020 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3023 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3027 }//hadronic interactions
3029 }//initial antiprotons
3032 track->GetESDpid(probability);
3034 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3035 rcc += probability[i]*GetParticleFraction(i,P);
3036 if(rcc == 0.0) continue;
3038 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3039 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3040 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3041 if(fParticleType == 4) {
3042 if(fRunEfficiencyAnalysisEtaMode)
3043 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3045 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
3049 if(TMath::Abs(pdgcode) == 2212) {
3050 if(fRunEfficiencyAnalysisEtaMode)
3051 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3054 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
3058 }//properly identified as proton
3060 if(fRunEfficiencyAnalysisEtaMode)
3061 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3064 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
3069 }//identified as proton
3073 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3076 //____________________________________________________________________//
3077 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3079 //Checks if the label is used already
3080 Bool_t status = kFALSE;
3081 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3082 if(labelArray.At(i) == label)
3089 //____________________________________________________________________//
3090 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3092 const AliESDVertex *vertex) {
3095 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3096 TParticle *particle = stack->Particle(iParticle);
3097 if(!particle) continue;
3099 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3100 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3101 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3103 Int_t pdgcode = particle->GetPdgCode();
3105 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3109 if(pdgcode == -2212)
3110 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3117 Int_t nGoodTracks = esd->GetNumberOfTracks();
3118 TArrayI labelArray(nGoodTracks);
3119 Int_t labelCounter = 0;
3120 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3121 AliESDtrack* track = esd->GetTrack(iTracks);
3122 if(!track) continue;
3124 Int_t label = TMath::Abs(track->GetLabel());
3125 if(IsLabelUsed(labelArray,label)) continue;
3126 labelArray.AddAt(label,labelCounter);
3129 TParticle *particle = stack->Particle(label);
3130 if(!particle) continue;
3131 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3133 AliESDtrack trackTPC;
3135 //in case it's a TPC only track relate it to the proper vertex
3136 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3137 Float_t p[2],cov[3];
3138 track->GetImpactParametersTPC(p,cov);
3139 if (p[0]==0 && p[1]==0)
3140 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3141 if (!track->FillTPCOnlyTrack(trackTPC)) {
3147 Double_t Pt = 0.0, P = 0.0;
3148 Double_t probability[5];
3149 Float_t dcaXY = 0.0, dcaZ = 0.0;
3150 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3152 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3153 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3155 Float_t chi2PerClusterITS = -1;
3156 if (nClustersITS!=0)
3157 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3158 Float_t chi2PerClusterTPC = -1;
3159 if (nClustersTPC!=0)
3160 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3161 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3162 Double_t extCov[15];
3163 track->GetExternalCovariance(extCov);
3167 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3168 if(!tpcTrack) continue;
3169 Pt = tpcTrack->Pt();
3171 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3172 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3175 track->GetTPCpid(probability);
3177 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3178 rcc += probability[i]*GetParticleFraction(i,P);
3179 if(rcc == 0.0) continue;
3181 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3182 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3183 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3184 if(fParticleType == 4) {
3185 FillQA(track, stack);
3186 if(IsAccepted(esd,vertex,track)) {
3187 if(label <= stack->GetNprimary()) {
3188 if(track->Charge() > 0) {
3189 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3190 if(track->HasPointOnITSLayer(iLayer))
3191 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3193 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3194 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3195 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3196 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3197 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3198 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3199 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3200 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3201 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3202 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3204 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3205 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3206 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3207 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3212 else if(track->Charge() < 0) {
3213 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3214 if(track->HasPointOnITSLayer(iLayer))
3215 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3217 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3218 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3219 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3220 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3221 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3222 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3223 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3224 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3225 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3226 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3228 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3229 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3230 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3231 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3236 }//primary particles
3237 else if(label > stack->GetNprimary()) {
3238 Int_t lPartMother = -1;
3239 Int_t motherPDGCode = -1;
3241 lPartMother = particle->GetFirstMother();
3242 TParticle *motherParticle = stack->Particle(lPartMother);
3243 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3246 if(fMCProcessIdFlag)
3247 if(particle->GetUniqueID() != fMCProcessId) continue;
3248 if(fMotherParticlePDGCodeFlag)
3249 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3251 if(track->Charge() > 0) {
3252 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3253 if(track->HasPointOnITSLayer(iLayer))
3254 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3256 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3257 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3258 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3259 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3260 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3261 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3262 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3263 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3264 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3265 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3267 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3268 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3269 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3270 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3274 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3278 ConvertPDGToInt(motherPDGCode));
3280 else if(track->Charge() < 0) {
3281 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3282 if(track->HasPointOnITSLayer(iLayer))
3283 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3285 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3286 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3287 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3288 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3289 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3290 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3291 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3292 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3293 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3294 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3296 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3297 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3298 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3299 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3303 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3307 ConvertPDGToInt(motherPDGCode));
3309 }//secondary particles
3310 }//accepted - track cuts
3311 else if(!IsAccepted(esd,vertex,track)) {
3312 if(label <= stack->GetNprimary()) {
3313 if(track->Charge() > 0)
3314 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3318 else if(track->Charge() < 0)
3319 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3323 }//primary particles
3324 else if(label > stack->GetNprimary()) {
3325 if(track->Charge() > 0)
3326 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3330 else if(track->Charge() < 0)
3331 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3335 }//secondary particles
3336 }//rejected - track cuts
3340 else if(!fUseTPCOnly) {
3343 track->GetImpactParameters(dcaXY,dcaZ);
3346 track->GetESDpid(probability);
3348 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3349 rcc += probability[i]*GetParticleFraction(i,P);
3350 if(rcc == 0.0) continue;
3352 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3353 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3354 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3355 if(fParticleType == 4) {
3356 FillQA(track, stack);
3357 if(IsAccepted(esd,vertex,track)) {
3358 if(label <= stack->GetNprimary()) {
3359 if(track->Charge() > 0) {
3360 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3361 if(track->HasPointOnITSLayer(iLayer))
3362 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3364 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3365 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3366 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3367 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3368 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3369 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3370 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3371 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3372 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3373 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3375 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3376 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3377 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
3378 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3383 else if(track->Charge() < 0) {
3384 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3385 if(track->HasPointOnITSLayer(iLayer))
3386 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3388 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3389 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3390 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3391 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3392 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3393 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3394 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3395 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3396 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3397 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
3399 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3400 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3401 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
3402 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3407 }//primary particles
3408 else if(label > stack->GetNprimary()) {
3409 Int_t lPartMother = -1;
3410 Int_t motherPDGCode = -1;
3412 lPartMother = particle->GetFirstMother();
3413 TParticle *motherParticle = stack->Particle(lPartMother);
3414 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3417 if(fMCProcessIdFlag)
3418 if(particle->GetUniqueID() != fMCProcessId) continue;
3419 if(fMotherParticlePDGCodeFlag)
3420 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3422 if(track->Charge() > 0) {
3423 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3424 if(track->HasPointOnITSLayer(iLayer))
3425 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3427 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3428 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3429 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3430 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3431 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3432 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3433 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3434 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3435 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3436 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
3438 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3439 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3440 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
3441 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3445 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3449 ConvertPDGToInt(motherPDGCode));
3451 else if(track->Charge() < 0) {
3452 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3453 if(track->HasPointOnITSLayer(iLayer))
3454 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3456 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3457 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3458 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3459 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3460 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3461 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3462 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3463 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3464 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3465 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
3467 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3468 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3469 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
3470 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3475 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3479 ConvertPDGToInt(motherPDGCode));
3481 }//secondary particles
3482 }//accepted - track cuts
3483 else if(!IsAccepted(esd,vertex,track)) {
3484 if(label <= stack->GetNprimary()) {
3485 if(track->Charge() > 0)
3486 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3490 else if(track->Charge() < 0)
3491 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
3495 }//primary particles
3496 else if(label > stack->GetNprimary()) {
3497 if(track->Charge() > 0)
3498 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
3502 else if(track->Charge() < 0)
3503 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
3507 }//secondary particles
3508 }//rejected - track cuts
3510 }//combined tracking
3515 //____________________________________________________________________//
3516 void AliProtonQAAnalysis::InitMCAnalysis() {
3517 //MC analysis - 3D histograms: y-pT-pdg
3518 fPDGList = new TList();
3519 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
3520 ";y;P_{T} [GeV/c];PDG",
3521 fNBinsY,fMinY,fMaxY,
3522 fNBinsPt,fMinPt,fMaxPt,
3524 fPDGList->Add(gHistYPtPDGProtons);
3525 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
3526 ";y;P_{T} [GeV/c];PDG",
3527 fNBinsY,fMinY,fMaxY,
3528 fNBinsPt,fMinPt,fMaxPt,
3530 fPDGList->Add(gHistYPtPDGAntiProtons);
3533 fMCProcessesList = new TList();
3534 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
3535 fMCProcessesList->Add(gHistProtonsFromKLProcess);
3536 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
3537 fMCProcessesList->Add(gHistProtonsFromPionProcess);
3538 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
3539 fMCProcessesList->Add(gHistProtonsFromKSProcess);
3540 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
3541 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
3542 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
3543 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
3544 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
3545 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
3546 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
3547 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
3548 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
3549 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
3550 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3551 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
3552 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
3553 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
3554 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
3555 fMCProcessesList->Add(gHistProtonsFromXi0Process);
3556 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
3557 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
3559 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
3560 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
3561 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
3562 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
3563 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
3564 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
3565 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
3566 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
3567 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
3568 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
3569 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
3570 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
3571 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
3572 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
3573 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
3574 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
3577 //____________________________________________________________________//
3578 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
3579 //Main analysis part - MC
3580 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3581 TParticle *particle = stack->Particle(iParticle);
3582 if(!particle) continue;
3584 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3585 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3586 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3588 Int_t pdgcode = particle->GetPdgCode();
3589 if(pdgcode == 2212) {
3590 if(iParticle <= stack->GetNprimary())
3591 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3595 else if(iParticle > stack->GetNprimary()) {
3596 Int_t lPartMother = particle->GetFirstMother();
3597 TParticle *motherParticle = stack->Particle(lPartMother);
3598 if(!motherParticle) continue;
3599 Int_t motherPDGCode = motherParticle->GetPdgCode();
3600 if(fMCProcessIdFlag)
3601 if(particle->GetUniqueID() != fMCProcessId) continue;
3602 if(fMotherParticlePDGCodeFlag)
3603 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3605 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
3609 ConvertPDGToInt(motherParticle->GetPdgCode()));
3611 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3612 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
3613 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3614 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
3615 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3616 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
3617 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3618 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
3619 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3620 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
3621 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3622 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
3623 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
3624 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
3625 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3626 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
3627 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3628 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
3629 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
3630 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
3631 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
3632 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
3633 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
3634 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
3636 }//pdgcode of proton
3638 if(pdgcode == -2212) {
3639 if(iParticle <= stack->GetNprimary())
3640 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3644 else if(iParticle > stack->GetNprimary()) {
3645 Int_t lPartMother = particle->GetFirstMother();
3646 TParticle *motherParticle = stack->Particle(lPartMother);
3647 if(!motherParticle) continue;
3648 Int_t motherPDGCode = motherParticle->GetPdgCode();
3649 if(fMCProcessIdFlag)
3650 if(particle->GetUniqueID() != fMCProcessId) continue;
3651 if(fMotherParticlePDGCodeFlag)
3652 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
3654 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
3658 ConvertPDGToInt(motherParticle->GetPdgCode()));
3661 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
3662 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
3663 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
3664 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
3665 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
3666 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
3667 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
3668 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
3669 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
3670 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
3671 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
3672 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
3673 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
3674 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
3675 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
3676 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
3677 }//secondary antiproton
3678 }//pdgcode of antiproton
3683 //____________________________________________________________________//
3684 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
3685 //Converts the pdg code to an int based on the following scheme:
3686 //1: PDG code: 130 - Name: K_L0
3687 //2: PDG code: 211 - Name: pi+
3688 //3: PDG code: 310 - Name: K_S0
3689 //4: PDG code: 321 - Name: K+
3690 //5: PDG code: 2112 - Name: neutron
3691 //6: PDG code: 2212 - Name: proton
3692 //7: PDG code: 3112 - Name: Sigma-
3693 //8: PDG code: 3122 - Name: Lambda0
3694 //9: PDG code: 3222 - Name: Sigma+
3695 //10: PDG code: 3312 - Name: Xi-
3696 //11: PDG code: 3322 - Name: Xi0
3697 //12: PDG code: 3334 - Name: Omega-
3699 switch (TMath::Abs(pdgCode)) {
3757 //________________________________________________________________________
3758 /*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
3762 // Get the vertex from the ESD and returns it if the vertex is valid
3763 // depending on the analysis mode: TPC - Hybrid - Global
3764 const AliESDVertex* vertex = 0;
3765 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3766 Double_t kBz = esd->GetMagneticField();
3767 AliVertexerTracks vertexer(kBz);
3768 vertexer.SetTPCMode();
3769 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
3770 esd->SetPrimaryVertexTPC(vTPC);
3771 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
3772 AliESDtrack *t = esd->GetTrack(i);
3773 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
3776 vertex = esd->GetPrimaryVertexTPC();
3778 else if(fUseHybridTPC)
3779 vertex = esd->GetPrimaryVertexSPD();
3780 else if(!fUseTPCOnly)
3781 vertex = esd->GetPrimaryVertex();
3783 Printf("GetVertex: ERROR: Invalid analysis mode");
3785 if(!vertex) return 0;
3787 // check Ncontributors
3788 if(vertex->GetNContributors() <= 0) return 0;
3791 Double_t zRes = vertex->GetZRes();
3792 if(zRes == 0) return 0;
3795 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
3796 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
3797 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;