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>
28 #include <TParticle.h>
30 #include "AliProtonQAAnalysis.h"
32 #include <AliExternalTrackParam.h>
33 #include <AliESDEvent.h>
38 ClassImp(AliProtonQAAnalysis)
40 //____________________________________________________________________//
41 AliProtonQAAnalysis::AliProtonQAAnalysis() :
43 fNBinsY(0), fMinY(0), fMaxY(0),
44 fNBinsPt(0), fMinPt(0), fMaxPt(0),
45 fMinTPCClusters(0), fMinITSClusters(0),
46 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
47 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
48 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
49 fMaxDCAXY(0), fMaxDCAXYTPC(0),
50 fMaxDCAZ(0), fMaxDCAZTPC(0),
52 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
53 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
54 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
55 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
56 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
57 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
58 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
59 fMaxConstrainChi2Flag(kFALSE),
60 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
61 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
62 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
63 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
64 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
65 fGlobalQAList(0), fQA2DList(0),
66 fQAPrimaryProtonsAcceptedList(0),
67 fQAPrimaryProtonsRejectedList(0),
68 fQASecondaryProtonsAcceptedList(0),
69 fQASecondaryProtonsRejectedList(0),
70 fQAPrimaryAntiProtonsAcceptedList(0),
71 fQAPrimaryAntiProtonsRejectedList(0),
72 fQASecondaryAntiProtonsAcceptedList(0),
73 fQASecondaryAntiProtonsRejectedList(0),
74 fFunctionProbabilityFlag(kFALSE),
75 fElectronFunction(0), fMuonFunction(0),
76 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
78 fPDGList(0), fMCProcessesList(0),
79 fRunMCAnalysis(kFALSE) {
81 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
84 //____________________________________________________________________//
85 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
87 if(fGlobalQAList) delete fGlobalQAList;
88 if(fQA2DList) delete fQA2DList;
89 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
90 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
91 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
92 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
93 if(fQAPrimaryAntiProtonsAcceptedList)
94 delete fQAPrimaryAntiProtonsAcceptedList;
95 if(fQAPrimaryAntiProtonsRejectedList)
96 delete fQAPrimaryAntiProtonsRejectedList;
97 if(fQASecondaryAntiProtonsAcceptedList)
98 delete fQASecondaryAntiProtonsAcceptedList;
99 if(fQASecondaryAntiProtonsRejectedList)
100 delete fQASecondaryAntiProtonsRejectedList;
102 if(fPDGList) delete fPDGList;
103 if(fMCProcessesList) delete fMCProcessesList;
106 //____________________________________________________________________//
107 Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
109 if(fFunctionProbabilityFlag) {
110 if(i == 0) partFrac = fElectronFunction->Eval(p);
111 if(i == 1) partFrac = fMuonFunction->Eval(p);
112 if(i == 2) partFrac = fPionFunction->Eval(p);
113 if(i == 3) partFrac = fKaonFunction->Eval(p);
114 if(i == 4) partFrac = fProtonFunction->Eval(p);
116 else partFrac = fPartFrac[i];
121 //____________________________________________________________________//
122 Bool_t AliProtonQAAnalysis::IsAccepted(AliESDtrack* track) {
123 // Checks if the track is excluded from the cuts
124 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
126 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
128 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
145 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
146 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
148 Float_t chi2PerClusterITS = -1;
150 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
151 Float_t chi2PerClusterTPC = -1;
153 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
156 track->GetExternalCovariance(extCov);
158 if(fPointOnITSLayer1Flag)
159 if(!track->HasPointOnITSLayer(0)) return kFALSE;
160 if(fPointOnITSLayer2Flag)
161 if(!track->HasPointOnITSLayer(1)) return kFALSE;
162 if(fPointOnITSLayer3Flag)
163 if(!track->HasPointOnITSLayer(2)) return kFALSE;
164 if(fPointOnITSLayer4Flag)
165 if(!track->HasPointOnITSLayer(3)) return kFALSE;
166 if(fPointOnITSLayer5Flag)
167 if(!track->HasPointOnITSLayer(4)) return kFALSE;
168 if(fPointOnITSLayer6Flag)
169 if(!track->HasPointOnITSLayer(5)) return kFALSE;
170 if(fMinITSClustersFlag)
171 if(nClustersITS < fMinITSClusters) return kFALSE;
172 if(fMaxChi2PerITSClusterFlag)
173 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
174 if(fMinTPCClustersFlag)
175 if(nClustersTPC < fMinTPCClusters) return kFALSE;
176 if(fMaxChi2PerTPCClusterFlag)
177 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
179 if(extCov[0] > fMaxCov11) return kFALSE;
181 if(extCov[2] > fMaxCov22) return kFALSE;
183 if(extCov[5] > fMaxCov33) return kFALSE;
185 if(extCov[9] > fMaxCov44) return kFALSE;
187 if(extCov[14] > fMaxCov55) return kFALSE;
188 if(fMaxSigmaToVertexFlag)
189 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
190 if(fMaxSigmaToVertexTPCFlag)
191 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
193 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
195 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
197 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
199 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
201 if((Pt < fMinPt) || (Pt > fMaxPt)) return kFALSE;
202 if((Rapidity(Px,Py,Pz) < fMinY) || (Rapidity(Px,Py,Pz) > fMaxY))
208 //____________________________________________________________________//
209 void AliProtonQAAnalysis::FillQA(AliESDtrack* track, AliStack *stack) {
210 // Checks if the track is excluded from the cuts
211 Int_t nPrimaries = stack->GetNprimary();
212 Int_t label = TMath::Abs(track->GetLabel());
214 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
215 Float_t dcaXY = 0.0, dcaZ = 0.0;
217 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
219 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
220 dcaXY = -100.0, dcaZ = -100.0;
227 track->GetImpactParametersTPC(dcaXY,dcaZ);
235 track->GetImpactParameters(dcaXY,dcaZ);
239 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
240 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
242 Float_t chi2PerClusterITS = -1;
244 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
245 Float_t chi2PerClusterTPC = -1;
247 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
250 track->GetExternalCovariance(extCov);
252 //cout<<"Charge: "<<track->Charge()<<
253 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
254 //" - TPC clusters: "<<nClustersTPC<<endl;
256 if(track->Charge() > 0) {
258 if(label <= nPrimaries) {
259 if(fMinITSClustersFlag) {
260 if(nClustersITS < fMinITSClusters) {
261 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
264 else if(nClustersITS >= fMinITSClusters)
265 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
267 if(fMaxChi2PerITSClusterFlag) {
268 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
269 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
272 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
273 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
274 }//chi2 per ITS cluster
275 if(fMinTPCClustersFlag) {
276 if(nClustersTPC < fMinTPCClusters) {
277 //cout<<"Primary proton rejected"<<endl;
278 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
281 else if(nClustersTPC >= fMinTPCClusters) {
282 //cout<<"Primary proton accepted"<<endl;
283 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
286 if(fMaxChi2PerTPCClusterFlag) {
287 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
288 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
291 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
292 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
293 }//chi2 per TPC cluster
295 if(extCov[0] > fMaxCov11) {
296 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
299 else if(extCov[0] <= fMaxCov11)
300 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
303 if(extCov[2] > fMaxCov22) {
304 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
307 else if(extCov[2] <= fMaxCov22)
308 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
311 if(extCov[5] > fMaxCov33) {
312 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
315 else if(extCov[5] <= fMaxCov33)
316 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
319 if(extCov[9] > fMaxCov44) {
320 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
323 else if(extCov[9] <= fMaxCov44)
324 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
327 if(extCov[14] > fMaxCov55) {
328 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
331 else if(extCov[14] <= fMaxCov55)
332 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
334 if(fMaxSigmaToVertexFlag) {
335 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
336 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
339 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
340 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
342 if(fMaxSigmaToVertexTPCFlag) {
343 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
344 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
347 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
348 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
349 }//sigma to vertex TPC
351 if(dcaXY > fMaxDCAXY) {
352 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(dcaXY);
355 else if(dcaXY <= fMaxDCAXY)
356 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
357 }//DCA xy global tracking
358 if(fMaxDCAXYTPCFlag) {
359 if(dcaXY > fMaxDCAXY) {
360 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(dcaXY);
363 else if(dcaXY <= fMaxDCAXY)
364 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
365 }//DCA xy TPC tracking
367 if(dcaZ > fMaxDCAZ) {
368 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(dcaZ);
371 else if(dcaZ <= fMaxDCAZ)
372 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
373 }//DCA z global tracking
374 if(fMaxDCAZTPCFlag) {
375 if(dcaZ > fMaxDCAZ) {
376 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(dcaZ);
379 else if(dcaZ <= fMaxDCAZ)
380 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
381 }//DCA z TPC tracking
382 if(fMaxConstrainChi2Flag) {
383 if(track->GetConstrainedChi2() > 0) {
384 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
385 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
388 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
389 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
391 }//constrain chi2 - vertex
393 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
394 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
397 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
398 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
401 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
402 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
405 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
406 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
409 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
410 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
413 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
414 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
417 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
418 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
421 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
422 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
424 if(fPointOnITSLayer1Flag) {
425 if(!track->HasPointOnITSLayer(0)) {
426 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
428 else if(track->HasPointOnITSLayer(0))
429 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
431 if(fPointOnITSLayer2Flag) {
432 if(!track->HasPointOnITSLayer(1)) {
433 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
435 else if(track->HasPointOnITSLayer(1))
436 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
438 if(fPointOnITSLayer3Flag) {
439 if(!track->HasPointOnITSLayer(2)) {
440 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
442 else if(track->HasPointOnITSLayer(2))
443 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
445 if(fPointOnITSLayer4Flag) {
446 if(!track->HasPointOnITSLayer(3)) {
447 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
449 else if(track->HasPointOnITSLayer(3))
450 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
452 if(fPointOnITSLayer5Flag) {
453 if(!track->HasPointOnITSLayer(4)) {
454 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
456 else if(track->HasPointOnITSLayer(4))
457 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
459 if(fPointOnITSLayer6Flag) {
460 if(!track->HasPointOnITSLayer(5)) {
461 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
463 else if(track->HasPointOnITSLayer(5))
464 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
466 }//primary particle cut
469 if(label > nPrimaries) {
470 if(fMinITSClustersFlag) {
471 if(nClustersITS < fMinITSClusters) {
472 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
475 else if(nClustersITS >= fMinITSClusters)
476 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
478 if(fMaxChi2PerITSClusterFlag) {
479 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
480 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
483 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
484 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
485 }//chi2 per ITS cluster
486 if(fMinTPCClustersFlag) {
487 if(nClustersTPC < fMinTPCClusters) {
488 //cout<<"Secondary proton rejected"<<endl;
489 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
492 else if(nClustersTPC >= fMinTPCClusters) {
493 //cout<<"Secondary proton accepted"<<endl;
494 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
497 if(fMaxChi2PerTPCClusterFlag) {
498 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
499 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
502 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
503 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
504 }//chi2 per TPC cluster
506 if(extCov[0] > fMaxCov11) {
507 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
510 else if(extCov[0] <= fMaxCov11)
511 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
514 if(extCov[2] > fMaxCov22) {
515 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
518 else if(extCov[2] <= fMaxCov22)
519 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
522 if(extCov[5] > fMaxCov33) {
523 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
526 else if(extCov[5] <= fMaxCov33)
527 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
530 if(extCov[9] > fMaxCov44) {
531 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
534 else if(extCov[9] <= fMaxCov44)
535 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
538 if(extCov[14] > fMaxCov55) {
539 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
542 else if(extCov[14] <= fMaxCov55)
543 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
545 if(fMaxSigmaToVertexFlag) {
546 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
547 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
550 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
551 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
553 if(fMaxSigmaToVertexTPCFlag) {
554 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
555 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
558 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
559 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
560 }//sigma to vertex TPC
562 if(dcaXY > fMaxDCAXY) {
563 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(dcaXY);
566 else if(dcaXY <= fMaxDCAXY)
567 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(dcaXY);
568 }//DCA xy global tracking
569 if(fMaxDCAXYTPCFlag) {
570 if(dcaXY > fMaxDCAXY) {
571 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(dcaXY);
574 else if(dcaXY <= fMaxDCAXY)
575 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(dcaXY);
576 }//DCA xy TPC tracking
578 if(dcaZ > fMaxDCAZ) {
579 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(dcaZ);
582 else if(dcaZ <= fMaxDCAZ)
583 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(dcaZ);
584 }//DCA z global tracking
585 if(fMaxDCAZTPCFlag) {
586 if(dcaZ > fMaxDCAZ) {
587 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(dcaZ);
590 else if(dcaZ <= fMaxDCAZ)
591 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(dcaZ);
592 }//DCA z TPC tracking
593 if(fMaxConstrainChi2Flag) {
594 if(track->GetConstrainedChi2() > 0) {
595 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
596 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
599 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
600 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
602 }//constrain chi2 - vertex
604 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
605 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
608 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
609 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
612 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
613 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
616 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
617 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
620 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
621 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
624 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
625 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
628 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
629 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
632 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
633 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
635 if(fPointOnITSLayer1Flag) {
636 if(!track->HasPointOnITSLayer(0)) {
637 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
639 else if(track->HasPointOnITSLayer(0))
640 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
642 if(fPointOnITSLayer2Flag) {
643 if(!track->HasPointOnITSLayer(1)) {
644 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
646 else if(track->HasPointOnITSLayer(1))
647 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
649 if(fPointOnITSLayer3Flag) {
650 if(!track->HasPointOnITSLayer(2)) {
651 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
653 else if(track->HasPointOnITSLayer(2))
654 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
656 if(fPointOnITSLayer4Flag) {
657 if(!track->HasPointOnITSLayer(3)) {
658 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
660 else if(track->HasPointOnITSLayer(3))
661 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
663 if(fPointOnITSLayer5Flag) {
664 if(!track->HasPointOnITSLayer(4)) {
665 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
667 else if(track->HasPointOnITSLayer(4))
668 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
670 if(fPointOnITSLayer6Flag) {
671 if(!track->HasPointOnITSLayer(5)) {
672 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
674 else if(track->HasPointOnITSLayer(5))
675 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
677 }//secondary particle cut
681 if(track->Charge() < 0) {
683 if(label <= nPrimaries) {
684 if(fMinITSClustersFlag) {
685 if(nClustersITS < fMinITSClusters) {
686 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
689 else if(nClustersITS >= fMinITSClusters)
690 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
692 if(fMaxChi2PerITSClusterFlag) {
693 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
694 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
697 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
698 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
699 }//chi2 per ITS cluster
700 if(fMinTPCClustersFlag) {
701 if(nClustersTPC < fMinTPCClusters) {
702 //cout<<"Primary antiproton rejected"<<endl;
703 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
706 else if(nClustersTPC >= fMinTPCClusters) {
707 //cout<<"Primary antiproton accepted"<<endl;
708 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
711 if(fMaxChi2PerTPCClusterFlag) {
712 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
713 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
716 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
717 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
718 }//chi2 per TPC cluster
720 if(extCov[0] > fMaxCov11) {
721 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
724 else if(extCov[0] <= fMaxCov11)
725 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
728 if(extCov[2] > fMaxCov22) {
729 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
732 else if(extCov[2] <= fMaxCov22)
733 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
736 if(extCov[5] > fMaxCov33) {
737 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
740 else if(extCov[5] <= fMaxCov33)
741 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
744 if(extCov[9] > fMaxCov44) {
745 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
748 else if(extCov[9] <= fMaxCov44)
749 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
752 if(extCov[14] > fMaxCov55) {
753 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
756 else if(extCov[14] <= fMaxCov55)
757 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
759 if(fMaxSigmaToVertexFlag) {
760 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
761 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
764 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
765 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
767 if(fMaxSigmaToVertexTPCFlag) {
768 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
769 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
772 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
773 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
774 }//sigma to vertex TPC
776 if(dcaXY > fMaxDCAXY) {
777 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
780 else if(dcaXY <= fMaxDCAXY)
781 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
782 }//DCA xy global tracking
783 if(fMaxDCAXYTPCFlag) {
784 if(dcaXY > fMaxDCAXY) {
785 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
788 else if(dcaXY <= fMaxDCAXY)
789 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
790 }//DCA xy TPC tracking
792 if(dcaZ > fMaxDCAZ) {
793 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
796 else if(dcaZ <= fMaxDCAZ)
797 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
798 }//DCA z global tracking
799 if(fMaxDCAZTPCFlag) {
800 if(dcaZ > fMaxDCAZ) {
801 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
804 else if(dcaZ <= fMaxDCAZ)
805 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
806 }//DCA z TPC tracking
807 if(fMaxConstrainChi2Flag) {
808 if(track->GetConstrainedChi2() > 0) {
809 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
810 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
813 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
814 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
816 }//constrain chi2 - vertex
818 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
819 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
822 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
823 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
826 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
827 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
830 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
831 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
834 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
835 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
838 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
839 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
842 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
843 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
846 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
847 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
849 if(fPointOnITSLayer1Flag) {
850 if(!track->HasPointOnITSLayer(0)) {
851 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
853 else if(track->HasPointOnITSLayer(0))
854 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
856 if(fPointOnITSLayer2Flag) {
857 if(!track->HasPointOnITSLayer(1)) {
858 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
860 else if(track->HasPointOnITSLayer(1))
861 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
863 if(fPointOnITSLayer3Flag) {
864 if(!track->HasPointOnITSLayer(2)) {
865 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
867 else if(track->HasPointOnITSLayer(2))
868 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
870 if(fPointOnITSLayer4Flag) {
871 if(!track->HasPointOnITSLayer(3)) {
872 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
874 else if(track->HasPointOnITSLayer(3))
875 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
877 if(fPointOnITSLayer5Flag) {
878 if(!track->HasPointOnITSLayer(4)) {
879 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
881 else if(track->HasPointOnITSLayer(4))
882 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
884 if(fPointOnITSLayer6Flag) {
885 if(!track->HasPointOnITSLayer(5)) {
886 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
888 else if(track->HasPointOnITSLayer(5))
889 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
891 }//primary particle cut
894 if(label > nPrimaries) {
895 if(fMinITSClustersFlag) {
896 if(nClustersITS < fMinITSClusters) {
897 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
900 else if(nClustersITS >= fMinITSClusters)
901 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
903 if(fMaxChi2PerITSClusterFlag) {
904 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
905 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
908 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
909 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
910 }//chi2 per ITS cluster
911 if(fMinTPCClustersFlag) {
912 if(nClustersTPC < fMinTPCClusters) {
913 //cout<<"Secondary antiproton rejected"<<endl;
914 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
917 else if(nClustersTPC >= fMinTPCClusters) {
918 //cout<<"Secondary antiproton accepted"<<endl;
919 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
922 if(fMaxChi2PerTPCClusterFlag) {
923 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
924 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
927 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
928 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
929 }//chi2 per TPC cluster
931 if(extCov[0] > fMaxCov11) {
932 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
935 else if(extCov[0] <= fMaxCov11)
936 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
939 if(extCov[2] > fMaxCov22) {
940 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
943 else if(extCov[2] <= fMaxCov22)
944 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
947 if(extCov[5] > fMaxCov33) {
948 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
951 else if(extCov[5] <= fMaxCov33)
952 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
955 if(extCov[9] > fMaxCov44) {
956 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
959 else if(extCov[9] <= fMaxCov44)
960 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
963 if(extCov[14] > fMaxCov55) {
964 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
967 else if(extCov[14] <= fMaxCov55)
968 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
970 if(fMaxSigmaToVertexFlag) {
971 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
972 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
975 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
976 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
978 if(fMaxSigmaToVertexTPCFlag) {
979 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
980 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
983 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
984 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
985 }//sigma to vertex TPC
987 if(dcaXY > fMaxDCAXY) {
988 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(dcaXY);
991 else if(dcaXY <= fMaxDCAXY)
992 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(dcaXY);
993 }//DCA xy global tracking
994 if(fMaxDCAXYTPCFlag) {
995 if(dcaXY > fMaxDCAXY) {
996 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(dcaXY);
999 else if(dcaXY <= fMaxDCAXY)
1000 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(dcaXY);
1001 }//DCA xy TPC tracking
1003 if(dcaZ > fMaxDCAZ) {
1004 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(dcaZ);
1007 else if(dcaZ <= fMaxDCAZ)
1008 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(dcaZ);
1009 }//DCA z global tracking
1010 if(fMaxDCAZTPCFlag) {
1011 if(dcaZ > fMaxDCAZ) {
1012 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(dcaZ);
1015 else if(dcaZ <= fMaxDCAZ)
1016 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(dcaZ);
1017 }//DCA z TPC tracking
1018 if(fMaxConstrainChi2Flag) {
1019 if(track->GetConstrainedChi2() > 0) {
1020 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1021 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1024 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1025 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1027 }//constrain chi2 - vertex
1029 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1030 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1033 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1034 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1037 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1038 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1041 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1042 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1045 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1046 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1049 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1050 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1053 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1054 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1057 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1058 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1060 if(fPointOnITSLayer1Flag) {
1061 if(!track->HasPointOnITSLayer(0)) {
1062 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1064 else if(track->HasPointOnITSLayer(0))
1065 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1067 if(fPointOnITSLayer2Flag) {
1068 if(!track->HasPointOnITSLayer(1)) {
1069 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1071 else if(track->HasPointOnITSLayer(1))
1072 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1074 if(fPointOnITSLayer3Flag) {
1075 if(!track->HasPointOnITSLayer(2)) {
1076 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1078 else if(track->HasPointOnITSLayer(2))
1079 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1081 if(fPointOnITSLayer4Flag) {
1082 if(!track->HasPointOnITSLayer(3)) {
1083 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1085 else if(track->HasPointOnITSLayer(3))
1086 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1088 if(fPointOnITSLayer5Flag) {
1089 if(!track->HasPointOnITSLayer(4)) {
1090 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1092 else if(track->HasPointOnITSLayer(4))
1093 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1095 if(fPointOnITSLayer6Flag) {
1096 if(!track->HasPointOnITSLayer(5)) {
1097 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1099 else if(track->HasPointOnITSLayer(5))
1100 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1102 }//secondary particle cut
1106 //____________________________________________________________________//
1107 Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) {
1108 // Calculates the number of sigma to the vertex.
1114 esdTrack->GetImpactParametersTPC(b,bCov);
1116 esdTrack->GetImpactParameters(b,bCov);
1118 if (bCov[0]<=0 || bCov[2]<=0) {
1119 //AliDebug(1, "Estimated b resolution lower or equal zero!");
1120 bCov[0]=0; bCov[2]=0;
1122 bRes[0] = TMath::Sqrt(bCov[0]);
1123 bRes[1] = TMath::Sqrt(bCov[2]);
1125 if (bRes[0] == 0 || bRes[1] ==0) return -1;
1127 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
1129 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
1131 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
1136 //____________________________________________________________________//
1137 Double_t AliProtonQAAnalysis::Rapidity(Double_t Px, Double_t Py, Double_t Pz) {
1138 //returns the rapidity of the proton - to be removed
1139 Double_t fMass = 9.38270000000000048e-01;
1141 Double_t P = TMath::Sqrt(TMath::Power(Px,2) +
1142 TMath::Power(Py,2) +
1143 TMath::Power(Pz,2));
1144 Double_t energy = TMath::Sqrt(P*P + fMass*fMass);
1147 y = 0.5*TMath::Log((energy + Pz)/(energy - Pz));
1152 //____________________________________________________________________//
1153 void AliProtonQAAnalysis::SetQAOn() {
1154 //initializes the QA lists
1155 //fQAHistograms = kTRUE;
1156 fGlobalQAList = new TList();
1157 fQA2DList = new TList();
1158 fQA2DList->SetName("fQA2DList");
1159 fGlobalQAList->Add(fQA2DList);
1161 fQAPrimaryProtonsAcceptedList = new TList();
1162 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1163 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1165 fQAPrimaryProtonsRejectedList = new TList();
1166 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1167 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1169 fQASecondaryProtonsAcceptedList = new TList();
1170 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1171 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1173 fQASecondaryProtonsRejectedList = new TList();
1174 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1175 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1177 fQAPrimaryAntiProtonsAcceptedList = new TList();
1178 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1179 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1181 fQAPrimaryAntiProtonsRejectedList = new TList();
1182 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1183 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1185 fQASecondaryAntiProtonsAcceptedList = new TList();
1186 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1187 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1189 fQASecondaryAntiProtonsRejectedList = new TList();
1190 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1191 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1194 //____________________________________________________________________//
1195 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1196 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1197 //Initializes the QA binning
1199 fMinY = minY; fMaxY = maxY;
1201 fMinPt = minPt; fMaxPt = maxPt;
1203 if(fRunMCAnalysis) InitMCAnalysis();
1206 //____________________________________________________________________//
1207 void AliProtonQAAnalysis::InitQA() {
1208 //Initializes the QA histograms and builds the directory structure
1209 //if(!fQAHistograms)
1213 //TDirectory *dir2D = gDirectory->mkdir("2D");
1214 //fGlobalQAList->Add(dir2D); dir2D->cd();
1215 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1217 fNBinsY,fMinY,fMaxY,
1218 fNBinsPt,fMinPt,fMaxPt);
1219 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1220 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1221 fQA2DList->Add(gHistYPtPrimaryProtonsPass);
1222 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1224 fNBinsY,fMinY,fMaxY,
1225 fNBinsPt,fMinPt,fMaxPt);
1226 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1227 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1228 fQA2DList->Add(gHistYPtPrimaryProtonsReject);
1230 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
1232 fNBinsY,fMinY,fMaxY,
1233 fNBinsPt,fMinPt,fMaxPt);
1234 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
1235 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1236 fQA2DList->Add(gHistYPtSecondaryProtonsPass);
1237 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
1239 fNBinsY,fMinY,fMaxY,
1240 fNBinsPt,fMinPt,fMaxPt);
1241 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
1242 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1243 fQA2DList->Add(gHistYPtSecondaryProtonsReject);
1245 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
1247 fNBinsY,fMinY,fMaxY,
1248 fNBinsPt,fMinPt,fMaxPt);
1249 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
1250 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1251 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);
1252 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
1254 fNBinsY,fMinY,fMaxY,
1255 fNBinsPt,fMinPt,fMaxPt);
1256 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
1257 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1258 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);
1260 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
1262 fNBinsY,fMinY,fMaxY,
1263 fNBinsPt,fMinPt,fMaxPt);
1264 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
1265 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1266 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);
1267 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
1269 fNBinsY,fMinY,fMaxY,
1270 fNBinsPt,fMinPt,fMaxPt);
1271 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
1272 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1273 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);
1275 /*gDirectory->cd("../");
1277 TDirectory *dirProtons = gDirectory->mkdir("Protons");
1278 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
1280 //________________________________________________________________//
1281 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
1282 dirProtonsPrimary->cd();
1283 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1284 dirProtonsPrimaryAccepted->cd();*/
1286 //Accepted primary protons
1287 TH1F *fPrimaryProtonsITSClustersPass = new TH1F("fPrimaryProtonsITSClustersPass",
1288 ";N_{clusters} (ITS);Entries",
1290 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsITSClustersPass);
1291 TH1F *fPrimaryProtonsChi2PerClusterITSPass = new TH1F("fPrimaryProtonsChi2PerClusterITSPass",
1292 ";x^{2}/N_{clusters} (ITS);Entries",
1294 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsChi2PerClusterITSPass);
1295 TH1F *fPrimaryProtonsTPCClustersPass = new TH1F("fPrimaryProtonsTPCClustersPass",
1296 ";N_{clusters} (TPC);Entries",
1298 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsTPCClustersPass);
1299 TH1F *fPrimaryProtonsChi2PerClusterTPCPass = new TH1F("fPrimaryProtonsChi2PerClusterTPCPass",
1300 ";x^{2}/N_{clusters} (TPC);Entries",
1302 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsChi2PerClusterTPCPass);
1303 TH1F *fPrimaryProtonsExtCov11Pass = new TH1F("fPrimaryProtonsExtCov11Pass",
1304 ";#sigma_{y} [cm];Entries",
1306 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov11Pass);
1307 TH1F *fPrimaryProtonsExtCov22Pass = new TH1F("fPrimaryProtonsExtCov22Pass",
1308 ";#sigma_{z} [cm];Entries",
1310 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov22Pass);
1311 TH1F *fPrimaryProtonsExtCov33Pass = new TH1F("fPrimaryProtonsExtCov33Pass",
1312 ";#sigma_{sin(#phi)};Entries",
1314 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov33Pass);
1315 TH1F *fPrimaryProtonsExtCov44Pass = new TH1F("fPrimaryProtonsExtCov44Pass",
1316 ";#sigma_{tan(#lambda)};Entries",
1318 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov44Pass);
1319 TH1F *fPrimaryProtonsExtCov55Pass = new TH1F("fPrimaryProtonsExtCov55Pass",
1320 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1322 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsExtCov55Pass);
1323 TH1F *fPrimaryProtonsSigmaToVertexPass = new TH1F("fPrimaryProtonsSigmaToVertexPass",
1324 ";#sigma_{Vertex};Entries",
1326 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsSigmaToVertexPass);
1327 TH1F *fPrimaryProtonsSigmaToVertexTPCPass = new TH1F("fPrimaryProtonsSigmaToVertexTPCPass",
1328 ";#sigma_{Vertex};Entries",
1330 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsSigmaToVertexTPCPass);
1331 TH1F *fPrimaryProtonsDCAXYPass = new TH1F("fPrimaryProtonsDCAXYPass",
1332 ";DCA_{xy} [cm];Entries",
1334 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsDCAXYPass);
1335 TH1F *fPrimaryProtonsDCAXYTPCPass = new TH1F("fPrimaryProtonsDCAXYTPCPass",
1336 ";DCA_{xy} [cm];Entries",
1338 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsDCAXYTPCPass);
1339 TH1F *fPrimaryProtonsDCAZPass = new TH1F("fPrimaryProtonsDCAZPass",
1340 ";DCA_{z} [cm];Entries",
1342 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsDCAZPass);
1343 TH1F *fPrimaryProtonsDCAZTPCPass = new TH1F("fPrimaryProtonsDCAZTPCPass",
1344 ";DCA_{z} [cm];Entries",
1346 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsDCAZTPCPass);
1347 TH1F *fPrimaryProtonsConstrainChi2Pass = new TH1F("fPrimaryProtonsConstrainChi2Pass",
1348 ";Log_{10}(#chi^{2});Entries",
1350 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsConstrainChi2Pass);
1351 TH1F *fPrimaryProtonsITSRefitPass = new TH1F("fPrimaryProtonsITSRefitPass",
1353 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsITSRefitPass);
1354 TH1F *fPrimaryProtonsTPCRefitPass = new TH1F("fPrimaryProtonsTPCRefitPass",
1356 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsTPCRefitPass);
1357 TH1F *fPrimaryProtonsESDpidPass = new TH1F("fPrimaryProtonsESDpidPass",
1359 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsESDpidPass);
1360 TH1F *fPrimaryProtonsTPCpidPass = new TH1F("fPrimaryProtonsTPCpidPass",
1362 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsTPCpidPass);
1363 TH1F *fPrimaryProtonsPointOnITSLayer1Pass = new TH1F("fPrimaryProtonsPointOnITSLayer1Pass",
1365 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsPointOnITSLayer1Pass);
1366 TH1F *fPrimaryProtonsPointOnITSLayer2Pass = new TH1F("fPrimaryProtonsPointOnITSLayer2Pass",
1368 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsPointOnITSLayer2Pass);
1369 TH1F *fPrimaryProtonsPointOnITSLayer3Pass = new TH1F("fPrimaryProtonsPointOnITSLayer3Pass",
1371 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsPointOnITSLayer3Pass);
1372 TH1F *fPrimaryProtonsPointOnITSLayer4Pass = new TH1F("fPrimaryProtonsPointOnITSLayer4Pass",
1374 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsPointOnITSLayer4Pass);
1375 TH1F *fPrimaryProtonsPointOnITSLayer5Pass = new TH1F("fPrimaryProtonsPointOnITSLayer5Pass",
1377 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsPointOnITSLayer5Pass);
1378 TH1F *fPrimaryProtonsPointOnITSLayer6Pass = new TH1F("fPrimaryProtonsPointOnITSLayer6Pass",
1380 fQAPrimaryProtonsAcceptedList->Add(fPrimaryProtonsPointOnITSLayer6Pass);
1382 //Rejected primary protons
1383 /*gDirectory->cd("../");
1384 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1385 dirProtonsPrimaryRejected->cd();*/
1387 TH1F *fPrimaryProtonsITSClustersReject = new TH1F("fPrimaryProtonsITSClustersReject",
1388 ";N_{clusters} (ITS);Entries",
1390 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsITSClustersReject);
1391 TH1F *fPrimaryProtonsChi2PerClusterITSReject = new TH1F("fPrimaryProtonsChi2PerClusterITSReject",
1392 ";x^{2}/N_{clusters} (ITS);Entries",
1394 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsChi2PerClusterITSReject);
1395 TH1F *fPrimaryProtonsTPCClustersReject = new TH1F("fPrimaryProtonsTPCClustersReject",
1396 ";N_{clusters} (TPC);Entries",
1398 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsTPCClustersReject);
1399 TH1F *fPrimaryProtonsChi2PerClusterTPCReject = new TH1F("fPrimaryProtonsChi2PerClusterTPCReject",
1400 ";x^{2}/N_{clusters} (TPC);Entries",
1402 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsChi2PerClusterTPCReject);
1403 TH1F *fPrimaryProtonsExtCov11Reject = new TH1F("fPrimaryProtonsExtCov11Reject",
1404 ";#sigma_{y} [cm];Entries",
1406 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov11Reject);
1407 TH1F *fPrimaryProtonsExtCov22Reject = new TH1F("fPrimaryProtonsExtCov22Reject",
1408 ";#sigma_{z} [cm];Entries",
1410 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov22Reject);
1411 TH1F *fPrimaryProtonsExtCov33Reject = new TH1F("fPrimaryProtonsExtCov33Reject",
1412 ";#sigma_{sin(#phi)};Entries",
1414 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov33Reject);
1415 TH1F *fPrimaryProtonsExtCov44Reject = new TH1F("fPrimaryProtonsExtCov44Reject",
1416 ";#sigma_{tan(#lambda)};Entries",
1418 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov44Reject);
1419 TH1F *fPrimaryProtonsExtCov55Reject = new TH1F("fPrimaryProtonsExtCov55Reject",
1420 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1422 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsExtCov55Reject);
1423 TH1F *fPrimaryProtonsSigmaToVertexReject = new TH1F("fPrimaryProtonsSigmaToVertexReject",
1424 ";#sigma_{Vertex};Entries",
1426 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsSigmaToVertexReject);
1427 TH1F *fPrimaryProtonsSigmaToVertexTPCReject = new TH1F("fPrimaryProtonsSigmaToVertexTPCReject",
1428 ";#sigma_{Vertex};Entries",
1430 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsSigmaToVertexTPCReject);
1431 TH1F *fPrimaryProtonsDCAXYReject = new TH1F("fPrimaryProtonsDCAXYReject",
1432 ";DCA_{xy} [cm];Entries",
1434 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsDCAXYReject);
1435 TH1F *fPrimaryProtonsDCAXYTPCReject = new TH1F("fPrimaryProtonsDCAXYTPCReject",
1436 ";DCA_{xy} [cm];Entries",
1438 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsDCAXYTPCReject);
1439 TH1F *fPrimaryProtonsDCAZReject = new TH1F("fPrimaryProtonsDCAZReject",
1440 ";DCA_{z} [cm];Entries",
1442 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsDCAZReject);
1443 TH1F *fPrimaryProtonsDCAZTPCReject = new TH1F("fPrimaryProtonsDCAZTPCReject",
1444 ";DCA_{z} [cm];Entries",
1446 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsDCAZTPCReject);
1447 TH1F *fPrimaryProtonsConstrainChi2Reject = new TH1F("fPrimaryProtonsConstrainChi2Reject",
1448 ";Log_{10}(#chi^{2});Entries",
1450 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsConstrainChi2Reject);
1451 TH1F *fPrimaryProtonsITSRefitReject = new TH1F("fPrimaryProtonsITSRefitReject",
1453 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsITSRefitReject);
1454 TH1F *fPrimaryProtonsTPCRefitReject = new TH1F("fPrimaryProtonsTPCRefitReject",
1456 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsTPCRefitReject);
1457 TH1F *fPrimaryProtonsESDpidReject = new TH1F("fPrimaryProtonsESDpidReject",
1459 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsESDpidReject);
1460 TH1F *fPrimaryProtonsTPCpidReject = new TH1F("fPrimaryProtonsTPCpidReject",
1462 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsTPCpidReject);
1463 TH1F *fPrimaryProtonsPointOnITSLayer1Reject = new TH1F("fPrimaryProtonsPointOnITSLayer1Reject",
1465 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsPointOnITSLayer1Reject);
1466 TH1F *fPrimaryProtonsPointOnITSLayer2Reject = new TH1F("fPrimaryProtonsPointOnITSLayer2Reject",
1468 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsPointOnITSLayer2Reject);
1469 TH1F *fPrimaryProtonsPointOnITSLayer3Reject = new TH1F("fPrimaryProtonsPointOnITSLayer3Reject",
1471 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsPointOnITSLayer3Reject);
1472 TH1F *fPrimaryProtonsPointOnITSLayer4Reject = new TH1F("fPrimaryProtonsPointOnITSLayer4Reject",
1474 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsPointOnITSLayer4Reject);
1475 TH1F *fPrimaryProtonsPointOnITSLayer5Reject = new TH1F("fPrimaryProtonsPointOnITSLayer5Reject",
1477 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsPointOnITSLayer5Reject);
1478 TH1F *fPrimaryProtonsPointOnITSLayer6Reject = new TH1F("fPrimaryProtonsPointOnITSLayer6Reject",
1480 fQAPrimaryProtonsRejectedList->Add(fPrimaryProtonsPointOnITSLayer6Reject);
1482 //________________________________________________________________//
1483 /*gDirectory->cd("../../");
1485 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
1486 dirProtonsSecondary->cd();
1487 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
1488 dirProtonsSecondaryAccepted->cd();*/
1490 //Accepted secondary protons
1491 TH1F *fSecondaryProtonsITSClustersPass = new TH1F("fSecondaryProtonsITSClustersPass",
1492 ";N_{clusters} (ITS);Entries",
1494 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsITSClustersPass);
1495 TH1F *fSecondaryProtonsChi2PerClusterITSPass = new TH1F("fSecondaryProtonsChi2PerClusterITSPass",
1496 ";x^{2}/N_{clusters} (ITS);Entries",
1498 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsChi2PerClusterITSPass);
1499 TH1F *fSecondaryProtonsTPCClustersPass = new TH1F("fSecondaryProtonsTPCClustersPass",
1500 ";N_{clusters} (TPC);Entries",
1502 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsTPCClustersPass);
1503 TH1F *fSecondaryProtonsChi2PerClusterTPCPass = new TH1F("fSecondaryProtonsChi2PerClusterTPCPass",
1504 ";x^{2}/N_{clusters} (TPC);Entries",
1506 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsChi2PerClusterTPCPass);
1507 TH1F *fSecondaryProtonsExtCov11Pass = new TH1F("fSecondaryProtonsExtCov11Pass",
1508 ";#sigma_{y} [cm];Entries",
1510 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov11Pass);
1511 TH1F *fSecondaryProtonsExtCov22Pass = new TH1F("fSecondaryProtonsExtCov22Pass",
1512 ";#sigma_{z} [cm];Entries",
1514 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov22Pass);
1515 TH1F *fSecondaryProtonsExtCov33Pass = new TH1F("fSecondaryProtonsExtCov33Pass",
1516 ";#sigma_{sin(#phi)};Entries",
1518 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov33Pass);
1519 TH1F *fSecondaryProtonsExtCov44Pass = new TH1F("fSecondaryProtonsExtCov44Pass",
1520 ";#sigma_{tan(#lambda)};Entries",
1522 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov44Pass);
1523 TH1F *fSecondaryProtonsExtCov55Pass = new TH1F("fSecondaryProtonsExtCov55Pass",
1524 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1526 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsExtCov55Pass);
1527 TH1F *fSecondaryProtonsSigmaToVertexPass = new TH1F("fSecondaryProtonsSigmaToVertexPass",
1528 ";#sigma_{Vertex};Entries",
1530 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsSigmaToVertexPass);
1531 TH1F *fSecondaryProtonsSigmaToVertexTPCPass = new TH1F("fSecondaryProtonsSigmaToVertexTPCPass",
1532 ";#sigma_{Vertex};Entries",
1534 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsSigmaToVertexTPCPass);
1535 TH1F *fSecondaryProtonsDCAXYPass = new TH1F("fSecondaryProtonsDCAXYPass",
1536 ";DCA_{xy} [cm];Entries",
1538 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsDCAXYPass);
1539 TH1F *fSecondaryProtonsDCAXYTPCPass = new TH1F("fSecondaryProtonsDCAXYTPCPass",
1540 ";DCA_{xy} [cm];Entries",
1542 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsDCAXYTPCPass);
1543 TH1F *fSecondaryProtonsDCAZPass = new TH1F("fSecondaryProtonsDCAZPass",
1544 ";DCA_{z} [cm];Entries",
1546 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsDCAZPass);
1547 TH1F *fSecondaryProtonsDCAZTPCPass = new TH1F("fSecondaryProtonsDCAZTPCPass",
1548 ";DCA_{z} [cm];Entries",
1550 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsDCAZTPCPass);
1551 TH1F *fSecondaryProtonsConstrainChi2Pass = new TH1F("fSecondaryProtonsConstrainChi2Pass",
1552 ";Log_{10}(#chi^{2});Entries",
1554 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsConstrainChi2Pass);
1555 TH1F *fSecondaryProtonsITSRefitPass = new TH1F("fSecondaryProtonsITSRefitPass",
1557 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsITSRefitPass);
1558 TH1F *fSecondaryProtonsTPCRefitPass = new TH1F("fSecondaryProtonsTPCRefitPass",
1560 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsTPCRefitPass);
1561 TH1F *fSecondaryProtonsESDpidPass = new TH1F("fSecondaryProtonsESDpidPass",
1563 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsESDpidPass);
1564 TH1F *fSecondaryProtonsTPCpidPass = new TH1F("fSecondaryProtonsTPCpidPass",
1566 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsTPCpidPass);
1567 TH1F *fSecondaryProtonsPointOnITSLayer1Pass = new TH1F("fSecondaryProtonsPointOnITSLayer1Pass",
1569 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsPointOnITSLayer1Pass);
1570 TH1F *fSecondaryProtonsPointOnITSLayer2Pass = new TH1F("fSecondaryProtonsPointOnITSLayer2Pass",
1572 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsPointOnITSLayer2Pass);
1573 TH1F *fSecondaryProtonsPointOnITSLayer3Pass = new TH1F("fSecondaryProtonsPointOnITSLayer3Pass",
1575 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsPointOnITSLayer3Pass);
1576 TH1F *fSecondaryProtonsPointOnITSLayer4Pass = new TH1F("fSecondaryProtonsPointOnITSLayer4Pass",
1578 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsPointOnITSLayer4Pass);
1579 TH1F *fSecondaryProtonsPointOnITSLayer5Pass = new TH1F("fSecondaryProtonsPointOnITSLayer5Pass",
1581 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsPointOnITSLayer5Pass);
1582 TH1F *fSecondaryProtonsPointOnITSLayer6Pass = new TH1F("fSecondaryProtonsPointOnITSLayer6Pass",
1584 fQASecondaryProtonsAcceptedList->Add(fSecondaryProtonsPointOnITSLayer6Pass);
1586 //Rejected secondary protons
1587 /*gDirectory->cd("../");
1588 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
1589 dirProtonsSecondaryRejected->cd();*/
1591 TH1F *fSecondaryProtonsITSClustersReject = new TH1F("fSecondaryProtonsITSClustersReject",
1592 ";N_{clusters} (ITS);Entries",
1594 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsITSClustersReject);
1595 TH1F *fSecondaryProtonsChi2PerClusterITSReject = new TH1F("fSecondaryProtonsChi2PerClusterITSReject",
1596 ";x^{2}/N_{clusters} (ITS);Entries",
1598 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsChi2PerClusterITSReject);
1599 TH1F *fSecondaryProtonsTPCClustersReject = new TH1F("fSecondaryProtonsTPCClustersReject",
1600 ";N_{clusters} (TPC);Entries",
1602 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsTPCClustersReject);
1603 TH1F *fSecondaryProtonsChi2PerClusterTPCReject = new TH1F("fSecondaryProtonsChi2PerClusterTPCReject",
1604 ";x^{2}/N_{clusters} (TPC);Entries",
1606 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsChi2PerClusterTPCReject);
1607 TH1F *fSecondaryProtonsExtCov11Reject = new TH1F("fSecondaryProtonsExtCov11Reject",
1608 ";#sigma_{y} [cm];Entries",
1610 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov11Reject);
1611 TH1F *fSecondaryProtonsExtCov22Reject = new TH1F("fSecondaryProtonsExtCov22Reject",
1612 ";#sigma_{z} [cm];Entries",
1614 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov22Reject);
1615 TH1F *fSecondaryProtonsExtCov33Reject = new TH1F("fSecondaryProtonsExtCov33Reject",
1616 ";#sigma_{sin(#phi)};Entries",
1618 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov33Reject);
1619 TH1F *fSecondaryProtonsExtCov44Reject = new TH1F("fSecondaryProtonsExtCov44Reject",
1620 ";#sigma_{tan(#lambda)};Entries",
1622 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov44Reject);
1623 TH1F *fSecondaryProtonsExtCov55Reject = new TH1F("fSecondaryProtonsExtCov55Reject",
1624 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1626 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsExtCov55Reject);
1627 TH1F *fSecondaryProtonsSigmaToVertexReject = new TH1F("fSecondaryProtonsSigmaToVertexReject",
1628 ";#sigma_{Vertex};Entries",
1630 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsSigmaToVertexReject);
1631 TH1F *fSecondaryProtonsSigmaToVertexTPCReject = new TH1F("fSecondaryProtonsSigmaToVertexTPCReject",
1632 ";#sigma_{Vertex};Entries",
1634 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsSigmaToVertexTPCReject);
1635 TH1F *fSecondaryProtonsDCAXYReject = new TH1F("fSecondaryProtonsDCAXYReject",
1636 ";DCA_{xy} [cm];Entries",
1638 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsDCAXYReject);
1639 TH1F *fSecondaryProtonsDCAXYTPCReject = new TH1F("fSecondaryProtonsDCAXYTPCReject",
1640 ";DCA_{xy} [cm];Entries",
1642 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsDCAXYTPCReject);
1643 TH1F *fSecondaryProtonsDCAZReject = new TH1F("fSecondaryProtonsDCAZReject",
1644 ";DCA_{z} [cm];Entries",
1646 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsDCAZReject);
1647 TH1F *fSecondaryProtonsDCAZTPCReject = new TH1F("fSecondaryProtonsDCAZTPCReject",
1648 ";DCA_{z} [cm];Entries",
1650 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsDCAZTPCReject);
1651 TH1F *fSecondaryProtonsConstrainChi2Reject = new TH1F("fSecondaryProtonsConstrainChi2Reject",
1652 ";Log_{10}(#chi^{2});Entries",
1654 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsConstrainChi2Reject);
1655 TH1F *fSecondaryProtonsITSRefitReject = new TH1F("fSecondaryProtonsITSRefitReject",
1657 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsITSRefitReject);
1658 TH1F *fSecondaryProtonsTPCRefitReject = new TH1F("fSecondaryProtonsTPCRefitReject",
1660 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsTPCRefitReject);
1661 TH1F *fSecondaryProtonsESDpidReject = new TH1F("fSecondaryProtonsESDpidReject",
1663 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsESDpidReject);
1664 TH1F *fSecondaryProtonsTPCpidReject = new TH1F("fSecondaryProtonsTPCpidReject",
1666 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsTPCpidReject);
1667 TH1F *fSecondaryProtonsPointOnITSLayer1Reject = new TH1F("fSecondaryProtonsPointOnITSLayer1Reject",
1669 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsPointOnITSLayer1Reject);
1670 TH1F *fSecondaryProtonsPointOnITSLayer2Reject = new TH1F("fSecondaryProtonsPointOnITSLayer2Reject",
1672 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsPointOnITSLayer2Reject);
1673 TH1F *fSecondaryProtonsPointOnITSLayer3Reject = new TH1F("fSecondaryProtonsPointOnITSLayer3Reject",
1675 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsPointOnITSLayer3Reject);
1676 TH1F *fSecondaryProtonsPointOnITSLayer4Reject = new TH1F("fSecondaryProtonsPointOnITSLayer4Reject",
1678 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsPointOnITSLayer4Reject);
1679 TH1F *fSecondaryProtonsPointOnITSLayer5Reject = new TH1F("fSecondaryProtonsPointOnITSLayer5Reject",
1681 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsPointOnITSLayer5Reject);
1682 TH1F *fSecondaryProtonsPointOnITSLayer6Reject = new TH1F("fSecondaryProtonsPointOnITSLayer6Reject",
1684 fQASecondaryProtonsRejectedList->Add(fSecondaryProtonsPointOnITSLayer6Reject);
1687 /*gDirectory->cd("../../../");
1690 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
1691 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
1693 //________________________________________________________________//
1694 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
1695 dirAntiProtonsPrimary->cd();
1696 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
1697 dirAntiProtonsPrimaryAccepted->cd();*/
1699 //Accepted primary antiprotons
1700 TH1F *fPrimaryAntiProtonsITSClustersPass = new TH1F("fPrimaryAntiProtonsITSClustersPass",
1701 ";N_{clusters} (ITS);Entries",
1703 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsITSClustersPass);
1704 TH1F *fPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("fPrimaryAntiProtonsChi2PerClusterITSPass",
1705 ";x^{2}/N_{clusters} (ITS);Entries",
1707 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsChi2PerClusterITSPass);
1708 TH1F *fPrimaryAntiProtonsTPCClustersPass = new TH1F("fPrimaryAntiProtonsTPCClustersPass",
1709 ";N_{clusters} (TPC);Entries",
1711 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsTPCClustersPass);
1712 TH1F *fPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("fPrimaryAntiProtonsChi2PerClusterTPCPass",
1713 ";x^{2}/N_{clusters} (TPC);Entries",
1715 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsChi2PerClusterTPCPass);
1716 TH1F *fPrimaryAntiProtonsExtCov11Pass = new TH1F("fPrimaryAntiProtonsExtCov11Pass",
1717 ";#sigma_{y} [cm];Entries",
1719 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov11Pass);
1720 TH1F *fPrimaryAntiProtonsExtCov22Pass = new TH1F("fPrimaryAntiProtonsExtCov22Pass",
1721 ";#sigma_{z} [cm];Entries",
1723 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov22Pass);
1724 TH1F *fPrimaryAntiProtonsExtCov33Pass = new TH1F("fPrimaryAntiProtonsExtCov33Pass",
1725 ";#sigma_{sin(#phi)};Entries",
1727 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov33Pass);
1728 TH1F *fPrimaryAntiProtonsExtCov44Pass = new TH1F("fPrimaryAntiProtonsExtCov44Pass",
1729 ";#sigma_{tan(#lambda)};Entries",
1731 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov44Pass);
1732 TH1F *fPrimaryAntiProtonsExtCov55Pass = new TH1F("fPrimaryAntiProtonsExtCov55Pass",
1733 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1735 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsExtCov55Pass);
1736 TH1F *fPrimaryAntiProtonsSigmaToVertexPass = new TH1F("fPrimaryAntiProtonsSigmaToVertexPass",
1737 ";#sigma_{Vertex};Entries",
1739 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsSigmaToVertexPass);
1740 TH1F *fPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("fPrimaryAntiProtonsSigmaToVertexTPCPass",
1741 ";#sigma_{Vertex};Entries",
1743 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsSigmaToVertexTPCPass);
1744 TH1F *fPrimaryAntiProtonsDCAXYPass = new TH1F("fPrimaryAntiProtonsDCAXYPass",
1745 ";DCA_{xy} [cm];Entries",
1747 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsDCAXYPass);
1748 TH1F *fPrimaryAntiProtonsDCAXYTPCPass = new TH1F("fPrimaryAntiProtonsDCAXYTPCPass",
1749 ";DCA_{xy} [cm];Entries",
1751 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsDCAXYTPCPass);
1752 TH1F *fPrimaryAntiProtonsDCAZPass = new TH1F("fPrimaryAntiProtonsDCAZPass",
1753 ";DCA_{z} [cm];Entries",
1755 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsDCAZPass);
1756 TH1F *fPrimaryAntiProtonsDCAZTPCPass = new TH1F("fPrimaryAntiProtonsDCAZTPCPass",
1757 ";DCA_{z} [cm];Entries",
1759 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsDCAZTPCPass);
1760 TH1F *fPrimaryAntiProtonsConstrainChi2Pass = new TH1F("fPrimaryAntiProtonsConstrainChi2Pass",
1761 ";Log_{10}(#chi^{2});Entries",
1763 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsConstrainChi2Pass);
1764 TH1F *fPrimaryAntiProtonsITSRefitPass = new TH1F("fPrimaryAntiProtonsITSRefitPass",
1766 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsITSRefitPass);
1767 TH1F *fPrimaryAntiProtonsTPCRefitPass = new TH1F("fPrimaryAntiProtonsTPCRefitPass",
1769 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsTPCRefitPass);
1770 TH1F *fPrimaryAntiProtonsESDpidPass = new TH1F("fPrimaryAntiProtonsESDpidPass",
1772 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsESDpidPass);
1773 TH1F *fPrimaryAntiProtonsTPCpidPass = new TH1F("fPrimaryAntiProtonsTPCpidPass",
1775 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsTPCpidPass);
1776 TH1F *fPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("fPrimaryAntiProtonsPointOnITSLayer1Pass",
1778 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsPointOnITSLayer1Pass);
1779 TH1F *fPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("fPrimaryAntiProtonsPointOnITSLayer2Pass",
1781 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsPointOnITSLayer2Pass);
1782 TH1F *fPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("fPrimaryAntiProtonsPointOnITSLayer3Pass",
1784 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsPointOnITSLayer3Pass);
1785 TH1F *fPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("fPrimaryAntiProtonsPointOnITSLayer4Pass",
1787 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsPointOnITSLayer4Pass);
1788 TH1F *fPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("fPrimaryAntiProtonsPointOnITSLayer5Pass",
1790 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsPointOnITSLayer5Pass);
1791 TH1F *fPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("fPrimaryAntiProtonsPointOnITSLayer6Pass",
1793 fQAPrimaryAntiProtonsAcceptedList->Add(fPrimaryAntiProtonsPointOnITSLayer6Pass);
1795 //Rejected primary antiprotons
1796 /*gDirectory->cd("../");
1797 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
1798 dirAntiProtonsPrimaryRejected->cd();*/
1800 TH1F *fPrimaryAntiProtonsITSClustersReject = new TH1F("fPrimaryAntiProtonsITSClustersReject",
1801 ";N_{clusters} (ITS);Entries",
1803 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsITSClustersReject);
1804 TH1F *fPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("fPrimaryAntiProtonsChi2PerClusterITSReject",
1805 ";x^{2}/N_{clusters} (ITS);Entries",
1807 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsChi2PerClusterITSReject);
1808 TH1F *fPrimaryAntiProtonsTPCClustersReject = new TH1F("fPrimaryAntiProtonsTPCClustersReject",
1809 ";N_{clusters} (TPC);Entries",
1811 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsTPCClustersReject);
1812 TH1F *fPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("fPrimaryAntiProtonsChi2PerClusterTPCReject",
1813 ";x^{2}/N_{clusters} (TPC);Entries",
1815 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsChi2PerClusterTPCReject);
1816 TH1F *fPrimaryAntiProtonsExtCov11Reject = new TH1F("fPrimaryAntiProtonsExtCov11Reject",
1817 ";#sigma_{y} [cm];Entries",
1819 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov11Reject);
1820 TH1F *fPrimaryAntiProtonsExtCov22Reject = new TH1F("fPrimaryAntiProtonsExtCov22Reject",
1821 ";#sigma_{z} [cm];Entries",
1823 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov22Reject);
1824 TH1F *fPrimaryAntiProtonsExtCov33Reject = new TH1F("fPrimaryAntiProtonsExtCov33Reject",
1825 ";#sigma_{sin(#phi)};Entries",
1827 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov33Reject);
1828 TH1F *fPrimaryAntiProtonsExtCov44Reject = new TH1F("fPrimaryAntiProtonsExtCov44Reject",
1829 ";#sigma_{tan(#lambda)};Entries",
1831 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov44Reject);
1832 TH1F *fPrimaryAntiProtonsExtCov55Reject = new TH1F("fPrimaryAntiProtonsExtCov55Reject",
1833 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1835 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsExtCov55Reject);
1836 TH1F *fPrimaryAntiProtonsSigmaToVertexReject = new TH1F("fPrimaryAntiProtonsSigmaToVertexReject",
1837 ";#sigma_{Vertex};Entries",
1839 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsSigmaToVertexReject);
1840 TH1F *fPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("fPrimaryAntiProtonsSigmaToVertexTPCReject",
1841 ";#sigma_{Vertex};Entries",
1843 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsSigmaToVertexTPCReject);
1844 TH1F *fPrimaryAntiProtonsDCAXYReject = new TH1F("fPrimaryAntiProtonsDCAXYReject",
1845 ";DCA_{xy} [cm];Entries",
1847 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsDCAXYReject);
1848 TH1F *fPrimaryAntiProtonsDCAXYTPCReject = new TH1F("fPrimaryAntiProtonsDCAXYTPCReject",
1849 ";DCA_{xy} [cm];Entries",
1851 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsDCAXYTPCReject);
1852 TH1F *fPrimaryAntiProtonsDCAZReject = new TH1F("fPrimaryAntiProtonsDCAZReject",
1853 ";DCA_{z} [cm];Entries",
1855 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsDCAZReject);
1856 TH1F *fPrimaryAntiProtonsDCAZTPCReject = new TH1F("fPrimaryAntiProtonsDCAZTPCReject",
1857 ";DCA_{z} [cm];Entries",
1859 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsDCAZTPCReject);
1860 TH1F *fPrimaryAntiProtonsConstrainChi2Reject = new TH1F("fPrimaryAntiProtonsConstrainChi2Reject",
1861 ";Log_{10}(#chi^{2});Entries",
1863 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsConstrainChi2Reject);
1864 TH1F *fPrimaryAntiProtonsITSRefitReject = new TH1F("fPrimaryAntiProtonsITSRefitReject",
1866 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsITSRefitReject);
1867 TH1F *fPrimaryAntiProtonsTPCRefitReject = new TH1F("fPrimaryAntiProtonsTPCRefitReject",
1869 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsTPCRefitReject);
1870 TH1F *fPrimaryAntiProtonsESDpidReject = new TH1F("fPrimaryAntiProtonsESDpidReject",
1872 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsESDpidReject);
1873 TH1F *fPrimaryAntiProtonsTPCpidReject = new TH1F("fPrimaryAntiProtonsTPCpidReject",
1875 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsTPCpidReject);
1876 TH1F *fPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("fPrimaryAntiProtonsPointOnITSLayer1Reject",
1878 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsPointOnITSLayer1Reject);
1879 TH1F *fPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("fPrimaryAntiProtonsPointOnITSLayer2Reject",
1881 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsPointOnITSLayer2Reject);
1882 TH1F *fPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("fPrimaryAntiProtonsPointOnITSLayer3Reject",
1884 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsPointOnITSLayer3Reject);
1885 TH1F *fPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("fPrimaryAntiProtonsPointOnITSLayer4Reject",
1887 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsPointOnITSLayer4Reject);
1888 TH1F *fPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("fPrimaryAntiProtonsPointOnITSLayer5Reject",
1890 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsPointOnITSLayer5Reject);
1891 TH1F *fPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("fPrimaryAntiProtonsPointOnITSLayer6Reject",
1893 fQAPrimaryAntiProtonsRejectedList->Add(fPrimaryAntiProtonsPointOnITSLayer6Reject);
1895 //________________________________________________________________//
1896 /*gDirectory->cd("../../");
1898 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
1899 dirAntiProtonsSecondary->cd();
1900 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
1901 dirAntiProtonsSecondaryAccepted->cd();*/
1903 //Accepted secondary antiprotons
1904 TH1F *fSecondaryAntiProtonsITSClustersPass = new TH1F("fSecondaryAntiProtonsITSClustersPass",
1905 ";N_{clusters} (ITS);Entries",
1907 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsITSClustersPass);
1908 TH1F *fSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("fSecondaryAntiProtonsChi2PerClusterITSPass",
1909 ";x^{2}/N_{clusters} (ITS);Entries",
1911 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsChi2PerClusterITSPass);
1912 TH1F *fSecondaryAntiProtonsTPCClustersPass = new TH1F("fSecondaryAntiProtonsTPCClustersPass",
1913 ";N_{clusters} (TPC);Entries",
1915 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsTPCClustersPass);
1916 TH1F *fSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("fSecondaryAntiProtonsChi2PerClusterTPCPass",
1917 ";x^{2}/N_{clusters} (TPC);Entries",
1919 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsChi2PerClusterTPCPass);
1920 TH1F *fSecondaryAntiProtonsExtCov11Pass = new TH1F("fSecondaryAntiProtonsExtCov11Pass",
1921 ";#sigma_{y} [cm];Entries",
1923 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov11Pass);
1924 TH1F *fSecondaryAntiProtonsExtCov22Pass = new TH1F("fSecondaryAntiProtonsExtCov22Pass",
1925 ";#sigma_{z} [cm];Entries",
1927 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov22Pass);
1928 TH1F *fSecondaryAntiProtonsExtCov33Pass = new TH1F("fSecondaryAntiProtonsExtCov33Pass",
1929 ";#sigma_{sin(#phi)};Entries",
1931 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov33Pass);
1932 TH1F *fSecondaryAntiProtonsExtCov44Pass = new TH1F("fSecondaryAntiProtonsExtCov44Pass",
1933 ";#sigma_{tan(#lambda)};Entries",
1935 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov44Pass);
1936 TH1F *fSecondaryAntiProtonsExtCov55Pass = new TH1F("fSecondaryAntiProtonsExtCov55Pass",
1937 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1939 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsExtCov55Pass);
1940 TH1F *fSecondaryAntiProtonsSigmaToVertexPass = new TH1F("fSecondaryAntiProtonsSigmaToVertexPass",
1941 ";#sigma_{Vertex};Entries",
1943 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsSigmaToVertexPass);
1944 TH1F *fSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("fSecondaryAntiProtonsSigmaToVertexTPCPass",
1945 ";#sigma_{Vertex};Entries",
1947 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsSigmaToVertexTPCPass);
1948 TH1F *fSecondaryAntiProtonsDCAXYPass = new TH1F("fSecondaryAntiProtonsDCAXYPass",
1949 ";DCA_{xy} [cm];Entries",
1951 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsDCAXYPass);
1952 TH1F *fSecondaryAntiProtonsDCAXYTPCPass = new TH1F("fSecondaryAntiProtonsDCAXYTPCPass",
1953 ";DCA_{xy} [cm];Entries",
1955 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsDCAXYTPCPass);
1956 TH1F *fSecondaryAntiProtonsDCAZPass = new TH1F("fSecondaryAntiProtonsDCAZPass",
1957 ";DCA_{z} [cm];Entries",
1959 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsDCAZPass);
1960 TH1F *fSecondaryAntiProtonsDCAZTPCPass = new TH1F("fSecondaryAntiProtonsDCAZTPCPass",
1961 ";DCA_{z} [cm];Entries",
1963 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsDCAZTPCPass);
1964 TH1F *fSecondaryAntiProtonsConstrainChi2Pass = new TH1F("fSecondaryAntiProtonsConstrainChi2Pass",
1965 ";Log_{10}(#chi^{2});Entries",
1967 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsConstrainChi2Pass);
1968 TH1F *fSecondaryAntiProtonsITSRefitPass = new TH1F("fSecondaryAntiProtonsITSRefitPass",
1970 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsITSRefitPass);
1971 TH1F *fSecondaryAntiProtonsTPCRefitPass = new TH1F("fSecondaryAntiProtonsTPCRefitPass",
1973 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsTPCRefitPass);
1974 TH1F *fSecondaryAntiProtonsESDpidPass = new TH1F("fSecondaryAntiProtonsESDpidPass",
1976 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsESDpidPass);
1977 TH1F *fSecondaryAntiProtonsTPCpidPass = new TH1F("fSecondaryAntiProtonsTPCpidPass",
1979 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsTPCpidPass);
1980 TH1F *fSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("fSecondaryAntiProtonsPointOnITSLayer1Pass",
1982 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsPointOnITSLayer1Pass);
1983 TH1F *fSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("fSecondaryAntiProtonsPointOnITSLayer2Pass",
1985 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsPointOnITSLayer2Pass);
1986 TH1F *fSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("fSecondaryAntiProtonsPointOnITSLayer3Pass",
1988 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsPointOnITSLayer3Pass);
1989 TH1F *fSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("fSecondaryAntiProtonsPointOnITSLayer4Pass",
1991 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsPointOnITSLayer4Pass);
1992 TH1F *fSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("fSecondaryAntiProtonsPointOnITSLayer5Pass",
1994 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsPointOnITSLayer5Pass);
1995 TH1F *fSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("fSecondaryAntiProtonsPointOnITSLayer6Pass",
1997 fQASecondaryAntiProtonsAcceptedList->Add(fSecondaryAntiProtonsPointOnITSLayer6Pass);
1999 //Rejected secondary antiprotons
2000 /*gDirectory->cd("../");
2001 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2002 dirAntiProtonsSecondaryRejected->cd();*/
2004 TH1F *fSecondaryAntiProtonsITSClustersReject = new TH1F("fSecondaryAntiProtonsITSClustersReject",
2005 ";N_{clusters} (ITS);Entries",
2007 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsITSClustersReject);
2008 TH1F *fSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("fSecondaryAntiProtonsChi2PerClusterITSReject",
2009 ";x^{2}/N_{clusters} (ITS);Entries",
2011 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsChi2PerClusterITSReject);
2012 TH1F *fSecondaryAntiProtonsTPCClustersReject = new TH1F("fSecondaryAntiProtonsTPCClustersReject",
2013 ";N_{clusters} (TPC);Entries",
2015 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsTPCClustersReject);
2016 TH1F *fSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("fSecondaryAntiProtonsChi2PerClusterTPCReject",
2017 ";x^{2}/N_{clusters} (TPC);Entries",
2019 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsChi2PerClusterTPCReject);
2020 TH1F *fSecondaryAntiProtonsExtCov11Reject = new TH1F("fSecondaryAntiProtonsExtCov11Reject",
2021 ";#sigma_{y} [cm];Entries",
2023 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov11Reject);
2024 TH1F *fSecondaryAntiProtonsExtCov22Reject = new TH1F("fSecondaryAntiProtonsExtCov22Reject",
2025 ";#sigma_{z} [cm];Entries",
2027 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov22Reject);
2028 TH1F *fSecondaryAntiProtonsExtCov33Reject = new TH1F("fSecondaryAntiProtonsExtCov33Reject",
2029 ";#sigma_{sin(#phi)};Entries",
2031 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov33Reject);
2032 TH1F *fSecondaryAntiProtonsExtCov44Reject = new TH1F("fSecondaryAntiProtonsExtCov44Reject",
2033 ";#sigma_{tan(#lambda)};Entries",
2035 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov44Reject);
2036 TH1F *fSecondaryAntiProtonsExtCov55Reject = new TH1F("fSecondaryAntiProtonsExtCov55Reject",
2037 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2039 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsExtCov55Reject);
2040 TH1F *fSecondaryAntiProtonsSigmaToVertexReject = new TH1F("fSecondaryAntiProtonsSigmaToVertexReject",
2041 ";#sigma_{Vertex};Entries",
2043 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsSigmaToVertexReject);
2044 TH1F *fSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("fSecondaryAntiProtonsSigmaToVertexTPCReject",
2045 ";#sigma_{Vertex};Entries",
2047 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsSigmaToVertexTPCReject);
2048 TH1F *fSecondaryAntiProtonsDCAXYReject = new TH1F("fSecondaryAntiProtonsDCAXYReject",
2049 ";DCA_{xy} [cm];Entries",
2051 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsDCAXYReject);
2052 TH1F *fSecondaryAntiProtonsDCAXYTPCReject = new TH1F("fSecondaryAntiProtonsDCAXYTPCReject",
2053 ";DCA_{xy} [cm];Entries",
2055 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsDCAXYTPCReject);
2056 TH1F *fSecondaryAntiProtonsDCAZReject = new TH1F("fSecondaryAntiProtonsDCAZReject",
2057 ";DCA_{z} [cm];Entries",
2059 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsDCAZReject);
2060 TH1F *fSecondaryAntiProtonsDCAZTPCReject = new TH1F("fSecondaryAntiProtonsDCAZTPCReject",
2061 ";DCA_{z} [cm];Entries",
2063 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsDCAZTPCReject);
2064 TH1F *fSecondaryAntiProtonsConstrainChi2Reject = new TH1F("fSecondaryAntiProtonsConstrainChi2Reject",
2065 ";Log_{10}(#chi^{2});Entries",
2067 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsConstrainChi2Reject);
2068 TH1F *fSecondaryAntiProtonsITSRefitReject = new TH1F("fSecondaryAntiProtonsITSRefitReject",
2070 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsITSRefitReject);
2071 TH1F *fSecondaryAntiProtonsTPCRefitReject = new TH1F("fSecondaryAntiProtonsTPCRefitReject",
2073 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsTPCRefitReject);
2074 TH1F *fSecondaryAntiProtonsESDpidReject = new TH1F("fSecondaryAntiProtonsESDpidReject",
2076 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsESDpidReject);
2077 TH1F *fSecondaryAntiProtonsTPCpidReject = new TH1F("fSecondaryAntiProtonsTPCpidReject",
2079 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsTPCpidReject);
2080 TH1F *fSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("fSecondaryAntiProtonsPointOnITSLayer1Reject",
2082 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsPointOnITSLayer1Reject);
2083 TH1F *fSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("fSecondaryAntiProtonsPointOnITSLayer2Reject",
2085 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsPointOnITSLayer2Reject);
2086 TH1F *fSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("fSecondaryAntiProtonsPointOnITSLayer3Reject",
2088 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsPointOnITSLayer3Reject);
2089 TH1F *fSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("fSecondaryAntiProtonsPointOnITSLayer4Reject",
2091 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsPointOnITSLayer4Reject);
2092 TH1F *fSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("fSecondaryAntiProtonsPointOnITSLayer5Reject",
2094 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsPointOnITSLayer5Reject);
2095 TH1F *fSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("fSecondaryAntiProtonsPointOnITSLayer6Reject",
2097 fQASecondaryAntiProtonsRejectedList->Add(fSecondaryAntiProtonsPointOnITSLayer6Reject);
2100 //____________________________________________________________________//
2101 void AliProtonQAAnalysis::RunQA(AliStack *stack, AliESDEvent *fESD) {
2103 Int_t nGoodTracks = fESD->GetNumberOfTracks();
2104 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
2105 AliESDtrack* track = fESD->GetTrack(iTracks);
2106 Int_t label = TMath::Abs(track->GetLabel());
2107 Double_t Pt = 0.0, P = 0.0;
2108 Double_t probability[5];
2111 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
2112 if(!tpcTrack) continue;
2113 Pt = tpcTrack->Pt();
2117 track->GetTPCpid(probability);
2119 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2120 rcc += probability[i]*GetParticleFraction(i,P);
2121 if(rcc == 0.0) continue;
2123 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2124 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2125 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2126 if(fParticleType == 4) {
2127 FillQA(track, stack);
2128 if(IsAccepted(track)) {
2129 if(label <= stack->GetNprimary()) {
2130 if(track->Charge() > 0)
2131 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2135 else if(track->Charge() < 0)
2136 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2140 }//primary particles
2141 else if(label > stack->GetNprimary()) {
2142 if(track->Charge() > 0)
2143 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
2147 else if(track->Charge() < 0)
2148 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
2152 }//secondary particles
2154 else if(!IsAccepted(track)) {
2155 if(label <= stack->GetNprimary()) {
2156 if(track->Charge() > 0)
2157 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
2161 else if(track->Charge() < 0)
2162 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
2166 }//primary particles
2167 else if(label > stack->GetNprimary()) {
2168 if(track->Charge() > 0)
2169 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
2173 else if(track->Charge() < 0)
2174 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
2178 }//secondary particles
2182 else if(!fUseTPCOnly) {
2187 track->GetESDpid(probability);
2189 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2190 rcc += probability[i]*GetParticleFraction(i,P);
2191 if(rcc == 0.0) continue;
2193 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
2194 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
2195 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
2196 if(fParticleType == 4) {
2197 FillQA(track, stack);
2198 if(IsAccepted(track)) {
2199 if(label <= stack->GetNprimary()) {
2200 if(track->Charge() > 0)
2201 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
2205 else if(track->Charge() < 0)
2206 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
2210 }//primary particles
2211 else if(label > stack->GetNprimary()) {
2212 if(track->Charge() > 0)
2213 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
2217 else if(track->Charge() < 0)
2218 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
2222 }//secondary particles
2224 else if(!IsAccepted(track)) {
2225 if(label <= stack->GetNprimary()) {
2226 if(track->Charge() > 0)
2227 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
2231 else if(track->Charge() < 0)
2232 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
2236 }//primary particles
2237 else if(label > stack->GetNprimary()) {
2238 if(track->Charge() > 0)
2239 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
2243 else if(track->Charge() < 0)
2244 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
2248 }//secondary particles
2251 }//combined tracking
2256 //____________________________________________________________________//
2257 void AliProtonQAAnalysis::InitMCAnalysis() {
2258 //MC analysis - 3D histograms: y-pT-pdg
2259 fPDGList = new TList();
2260 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
2261 ";y;P_{T} [GeV/c];PDG",
2262 fNBinsY,fMinY,fMaxY,
2263 fNBinsPt,fMinPt,fMaxPt,
2265 fPDGList->Add(gHistYPtPDGProtons);
2266 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
2267 ";y;P_{T} [GeV/c];PDG",
2268 fNBinsY,fMinY,fMaxY,
2269 fNBinsPt,fMinPt,fMaxPt,
2271 fPDGList->Add(gHistYPtPDGAntiProtons);
2274 fMCProcessesList = new TList();
2275 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
2276 fMCProcessesList->Add(gHistProtonsFromKLProcess);
2277 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
2278 fMCProcessesList->Add(gHistProtonsFromPionProcess);
2279 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
2280 fMCProcessesList->Add(gHistProtonsFromKSProcess);
2281 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
2282 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
2283 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
2284 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
2285 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
2286 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
2287 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
2288 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
2289 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
2290 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
2291 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
2292 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
2293 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
2294 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
2295 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
2296 fMCProcessesList->Add(gHistProtonsFromXi0Process);
2297 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
2298 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
2300 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
2301 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
2302 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
2303 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
2304 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
2305 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
2306 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
2307 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
2308 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
2309 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
2310 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
2311 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
2312 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
2313 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
2314 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
2315 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
2318 //____________________________________________________________________//
2319 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
2320 //Main analysis part - MC
2321 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
2322 TParticle *particle = stack->Particle(iParticle);
2323 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2324 Int_t pdgcode = particle->GetPdgCode();
2325 if(pdgcode == 2212) {
2326 if(iParticle <= stack->GetNprimary())
2327 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
2331 else if(iParticle > stack->GetNprimary()) {
2332 Int_t lPartMother = particle->GetFirstMother();
2333 TParticle *motherParticle = stack->Particle(lPartMother);
2334 if(!motherParticle) continue;
2335 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
2339 ConvertPDGToInt(motherParticle->GetPdgCode()));
2341 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
2342 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
2343 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
2344 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
2345 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
2346 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
2347 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
2348 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
2349 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
2350 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
2351 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
2352 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
2353 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
2354 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
2355 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
2356 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
2357 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
2358 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
2359 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
2360 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
2361 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
2362 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
2363 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
2364 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
2366 }//pdgcode of proton
2368 if(pdgcode == -2212) {
2369 if(iParticle <= stack->GetNprimary())
2370 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
2374 else if(iParticle > stack->GetNprimary()) {
2375 Int_t lPartMother = particle->GetFirstMother();
2376 TParticle *motherParticle = stack->Particle(lPartMother);
2377 if(!motherParticle) continue;
2378 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
2382 ConvertPDGToInt(motherParticle->GetPdgCode()));
2385 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
2386 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
2387 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
2388 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
2389 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
2390 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
2391 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
2392 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
2393 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
2394 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
2395 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
2396 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
2397 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
2398 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
2399 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
2400 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
2401 }//secondary antiproton
2402 }//pdgcode of antiproton
2407 //____________________________________________________________________//
2408 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
2409 //Converts the pdg code to an int based on the following scheme:
2410 //1: PDG code: 130 - Name: K_L0
2411 //2: PDG code: 211 - Name: pi+
2412 //3: PDG code: 310 - Name: K_S0
2413 //4: PDG code: 321 - Name: K+
2414 //5: PDG code: 2112 - Name: neutron
2415 //6: PDG code: 2212 - Name: proton
2416 //7: PDG code: 3112 - Name: Sigma-
2417 //8: PDG code: 3122 - Name: Lambda0
2418 //9: PDG code: 3222 - Name: Sigma+
2419 //10: PDG code: 3312 - Name: Xi-
2420 //11: PDG code: 3322 - Name: Xi0
2421 //12: PDG code: 3334 - Name: Omega-
2423 switch (TMath::Abs(pdgCode)) {