1 /**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
5 * Permission to use, copy, modify and distribute this software and its *
6 * documentation strictly for non-commercial purposes is hereby granted *
7 * without fee, provided that the above copyright notice appears in all *
8 * copies and that both the copyright notice and this permission notice *
9 * appear in the supporting documentation. The authors make no claims *
10 * about the suitability of this software for any purpose. It is *
11 * provided "as is" without express or implied warranty. *
12 **************************************************************************/
14 /* $Id: AliProtonQAAnalysis.cxx 29114 2008-10-03 16:49:02Z pchrist $ */
16 //-----------------------------------------------------------------
17 // AliProtonQAAnalysis class
18 // This is the class to deal with the proton analysis
19 // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
21 #include <Riostream.h>
28 #include <TParticle.h>
30 #include "AliProtonQAAnalysis.h"
31 #include "AliProtonAnalysisBase.h"
33 #include <AliExternalTrackParam.h>
34 #include <AliESDEvent.h>
38 #include <AliESDVertex.h>
39 #include <AliGenEventHeader.h>
40 #include <AliMCEvent.h>
42 ClassImp(AliProtonQAAnalysis)
44 //____________________________________________________________________//
45 AliProtonQAAnalysis::AliProtonQAAnalysis() :
46 TObject(), fProtonAnalysisBase(0),
47 fNBinsY(0), fMinY(0), fMaxY(0), fY(0),
48 fNBinsPt(0), fMinPt(0), fMaxPt(0), fPt(0), fUseAsymmetricBinning(kFALSE),
49 fGlobalQAList(0), fQAVertexList(0), fQA2DList(0),
50 fQAPrimaryProtonsAcceptedList(0),
51 fQAPrimaryProtonsRejectedList(0),
52 fQASecondaryProtonsAcceptedList(0),
53 fQASecondaryProtonsRejectedList(0),
54 fQAPrimaryAntiProtonsAcceptedList(0),
55 fQAPrimaryAntiProtonsRejectedList(0),
56 fQASecondaryAntiProtonsAcceptedList(0),
57 fQASecondaryAntiProtonsRejectedList(0),
58 fPDGList(0), fMCProcessesList(0),
59 fRunMCAnalysis(kFALSE),
60 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
61 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
62 fAcceptedCutList(0), fRejectedCutList(0),
63 fAcceptedDCAList(0), fRejectedDCAList(0),
64 fRunEfficiencyAnalysis(kFALSE),
65 fUseCutsInEfficiency(kFALSE),
70 //____________________________________________________________________//
71 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
73 if(fProtonAnalysisBase) delete fProtonAnalysisBase;
74 if(fGlobalQAList) delete fGlobalQAList;
75 if(fQAVertexList) delete fQAVertexList;
76 if(fQA2DList) delete fQA2DList;
77 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
78 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
79 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
80 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
81 if(fQAPrimaryAntiProtonsAcceptedList)
82 delete fQAPrimaryAntiProtonsAcceptedList;
83 if(fQAPrimaryAntiProtonsRejectedList)
84 delete fQAPrimaryAntiProtonsRejectedList;
85 if(fQASecondaryAntiProtonsAcceptedList)
86 delete fQASecondaryAntiProtonsAcceptedList;
87 if(fQASecondaryAntiProtonsRejectedList)
88 delete fQASecondaryAntiProtonsRejectedList;
90 if(fPDGList) delete fPDGList;
91 if(fMCProcessesList) delete fMCProcessesList;
93 if(fAcceptedCutList) delete fAcceptedCutList;
94 if(fRejectedCutList) delete fRejectedCutList;
95 if(fAcceptedDCAList) delete fAcceptedDCAList;
96 if(fRejectedDCAList) delete fRejectedDCAList;
98 if(fEfficiencyList) delete fEfficiencyList;
101 //____________________________________________________________________//
102 void AliProtonQAAnalysis::FillQA(AliStack *const stack,
104 const AliESDVertex *vertex,
105 AliESDtrack* track) {
106 // Checks if the track is excluded from the cuts
107 Int_t nPrimaries = stack->GetNprimary();
108 Int_t label = TMath::Abs(track->GetLabel());
110 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
111 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
113 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
114 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
116 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
117 dca[0] = -100.; dca[1] = -100.;
118 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
121 gPt = tpcTrack->Pt();
122 gPx = tpcTrack->Px();
123 gPy = tpcTrack->Py();
124 gPz = tpcTrack->Pz();
125 tpcTrack->PropagateToDCA(vertex,
126 esd->GetMagneticField(),
135 track->PropagateToDCA(vertex,
136 esd->GetMagneticField(),
141 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
142 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
144 Float_t chi2PerClusterITS = -1;
146 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
147 Float_t chi2PerClusterTPC = -1;
149 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
152 track->GetExternalCovariance(extCov);
155 if(track->Charge() > 0) {
157 if(label <= nPrimaries) {
158 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
159 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
160 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
162 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
163 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
165 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
166 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
167 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
169 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
170 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
171 }//chi2 per ITS cluster
172 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
173 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
174 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
176 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
177 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
180 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
181 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
182 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
184 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
185 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
186 }//chi2 per TPC cluster
187 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
188 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
189 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
191 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
192 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
194 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
195 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
196 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
198 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
199 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
201 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
202 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
203 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
205 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
206 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
208 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
209 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
210 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
212 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
213 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
215 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
216 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
217 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
219 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
220 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
222 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
223 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
224 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
226 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
227 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
229 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
230 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
231 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
233 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
234 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
235 }//sigma to vertex TPC
236 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
237 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
238 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
240 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
241 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
242 }//DCA xy global tracking
243 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
244 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
245 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
247 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
248 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
249 }//DCA xy TPC tracking
250 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
251 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
252 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
254 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
255 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
256 }//DCA z global tracking
257 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
258 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
259 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
261 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
262 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
263 }//DCA z TPC tracking
264 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
265 if(track->GetConstrainedChi2() > 0) {
266 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
267 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
269 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
270 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
272 }//constrain chi2 - vertex
273 if(fProtonAnalysisBase->IsUsedITSRefit()) {
274 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
275 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
277 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
278 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
280 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
281 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
282 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
284 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
285 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
287 if(fProtonAnalysisBase->IsUsedESDpid()) {
288 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
289 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
291 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
292 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
294 if(fProtonAnalysisBase->IsUsedTPCpid()) {
295 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
296 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
298 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
299 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
301 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
302 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
303 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
305 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
306 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
307 }//number of TPC points for the dE/dx
308 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
309 if(!track->HasPointOnITSLayer(0)) {
310 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
312 else if(track->HasPointOnITSLayer(0))
313 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
315 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
316 if(!track->HasPointOnITSLayer(1)) {
317 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
319 else if(track->HasPointOnITSLayer(1))
320 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
322 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
323 if(!track->HasPointOnITSLayer(2)) {
324 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
326 else if(track->HasPointOnITSLayer(2))
327 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
329 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
330 if(!track->HasPointOnITSLayer(3)) {
331 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
333 else if(track->HasPointOnITSLayer(3))
334 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
336 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
337 if(!track->HasPointOnITSLayer(4)) {
338 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
340 else if(track->HasPointOnITSLayer(4))
341 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
343 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
344 if(!track->HasPointOnITSLayer(5)) {
345 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(26)))->Fill(0);
347 else if(track->HasPointOnITSLayer(5))
348 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(26)))->Fill(0);
350 }//primary particle cut
353 if(label > nPrimaries) {
354 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
355 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
356 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
358 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
359 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
361 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
362 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
363 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
365 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
366 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
367 }//chi2 per ITS cluster
368 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
369 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
370 //cout<<"Secondary proton rejected"<<endl;
371 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
373 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
374 //cout<<"Secondary proton accepted"<<endl;
375 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
378 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
379 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
380 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
382 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
383 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
384 }//chi2 per TPC cluster
385 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
386 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
387 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
389 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
390 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
392 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
393 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
394 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
396 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
397 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
399 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
400 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
401 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
403 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
404 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
406 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
407 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
408 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
410 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
411 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
413 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
414 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
415 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
417 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
418 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
420 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
421 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
422 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
424 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
425 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
427 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
428 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
429 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
431 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
432 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
433 }//sigma to vertex TPC
434 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
435 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
436 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
438 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
439 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
440 }//DCA xy global tracking
441 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
442 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
443 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
445 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
446 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
447 }//DCA xy TPC tracking
448 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
449 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
450 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
452 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
453 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
454 }//DCA z global tracking
455 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
456 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
457 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
459 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
460 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
461 }//DCA z TPC tracking
462 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
463 if(track->GetConstrainedChi2() > 0) {
464 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
465 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
467 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
468 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
470 }//constrain chi2 - vertex
471 if(fProtonAnalysisBase->IsUsedITSRefit()) {
472 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
473 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
475 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
476 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
478 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
479 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
480 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
482 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
483 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
485 if(fProtonAnalysisBase->IsUsedESDpid()) {
486 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
487 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
489 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
490 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
492 if(fProtonAnalysisBase->IsUsedTPCpid()) {
493 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
494 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
496 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
497 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
499 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
500 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
501 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
503 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
504 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
505 }//number of TPC points for the dE/dx
506 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
507 if(!track->HasPointOnITSLayer(0)) {
508 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
510 else if(track->HasPointOnITSLayer(0))
511 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
513 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
514 if(!track->HasPointOnITSLayer(1)) {
515 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
517 else if(track->HasPointOnITSLayer(1))
518 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
520 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
521 if(!track->HasPointOnITSLayer(2)) {
522 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
524 else if(track->HasPointOnITSLayer(2))
525 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
527 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
528 if(!track->HasPointOnITSLayer(3)) {
529 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
531 else if(track->HasPointOnITSLayer(3))
532 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
534 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
535 if(!track->HasPointOnITSLayer(4)) {
536 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
538 else if(track->HasPointOnITSLayer(4))
539 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
541 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
542 if(!track->HasPointOnITSLayer(5)) {
543 ((TH1F *)(fQASecondaryProtonsRejectedList->At(26)))->Fill(0);
545 else if(track->HasPointOnITSLayer(5))
546 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(26)))->Fill(0);
548 }//secondary particle cut
552 if(track->Charge() < 0) {
554 if(label <= nPrimaries) {
555 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
556 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
557 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
559 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
560 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
562 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
563 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
564 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
566 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
567 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
568 }//chi2 per ITS cluster
569 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
570 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
571 //cout<<"Primary antiproton rejected"<<endl;
572 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
574 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
575 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
578 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
579 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
580 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
582 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
583 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
584 }//chi2 per TPC cluster
585 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
586 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
587 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
589 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
590 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
592 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
593 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
594 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
596 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
597 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
599 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
600 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
601 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
603 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
604 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
606 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
607 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
608 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
610 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
611 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
613 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
614 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
615 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
617 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
618 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
620 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
621 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
622 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
624 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
625 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
627 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
628 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
629 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
631 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
632 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
633 }//sigma to vertex TPC
634 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
635 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
636 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
638 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
639 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
640 }//DCA xy global tracking
641 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
642 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
643 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
645 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
646 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
647 }//DCA xy TPC tracking
648 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
649 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
650 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
652 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
653 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
654 }//DCA z global tracking
655 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
656 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
657 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
659 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
660 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
661 }//DCA z TPC tracking
662 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
663 if(track->GetConstrainedChi2() > 0) {
664 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
665 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
667 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
668 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
670 }//constrain chi2 - vertex
671 if(fProtonAnalysisBase->IsUsedITSRefit()) {
672 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
673 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
675 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
676 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
678 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
679 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
680 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
682 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
683 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
685 if(fProtonAnalysisBase->IsUsedESDpid()) {
686 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
687 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
689 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
690 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
692 if(fProtonAnalysisBase->IsUsedTPCpid()) {
693 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
694 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
696 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
697 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
699 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
700 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
701 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
703 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
704 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
705 }//number of TPC points for the dE/dx
706 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
707 if(!track->HasPointOnITSLayer(0)) {
708 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
710 else if(track->HasPointOnITSLayer(0))
711 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
713 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
714 if(!track->HasPointOnITSLayer(1)) {
715 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
717 else if(track->HasPointOnITSLayer(1))
718 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
720 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
721 if(!track->HasPointOnITSLayer(2)) {
722 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
724 else if(track->HasPointOnITSLayer(2))
725 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
727 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
728 if(!track->HasPointOnITSLayer(3)) {
729 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
731 else if(track->HasPointOnITSLayer(3))
732 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
734 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
735 if(!track->HasPointOnITSLayer(4)) {
736 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
738 else if(track->HasPointOnITSLayer(4))
739 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
741 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
742 if(!track->HasPointOnITSLayer(5)) {
743 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(26)))->Fill(0);
745 else if(track->HasPointOnITSLayer(5))
746 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(26)))->Fill(0);
748 }//primary particle cut
751 if(label > nPrimaries) {
752 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
753 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
754 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
756 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
757 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
759 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
760 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
761 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
763 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
764 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
765 }//chi2 per ITS cluster
766 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
767 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
768 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
770 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
771 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
774 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
775 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
776 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
778 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
779 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
780 }//chi2 per TPC cluster
781 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
782 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
783 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
785 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
786 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
788 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
789 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
790 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
792 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
793 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
795 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
796 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
797 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
799 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
800 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
802 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
803 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
804 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
806 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
807 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
809 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
810 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
811 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
813 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
814 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
816 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
817 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
818 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
820 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
821 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
823 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
824 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
825 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
827 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
828 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
829 }//sigma to vertex TPC
830 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
831 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
832 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
834 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
835 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
836 }//DCA xy global tracking
837 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
838 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
839 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
841 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
842 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
843 }//DCA xy TPC tracking
844 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
845 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
846 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
848 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
849 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
850 }//DCA z global tracking
851 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
852 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
853 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
855 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
856 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
857 }//DCA z TPC tracking
858 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
859 if(track->GetConstrainedChi2() > 0) {
860 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
861 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
863 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
864 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
866 }//constrain chi2 - vertex
867 if(fProtonAnalysisBase->IsUsedITSRefit()) {
868 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
869 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
871 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
872 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
874 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
875 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
876 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
878 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
879 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
881 if(fProtonAnalysisBase->IsUsedESDpid()) {
882 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
883 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
885 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
886 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
888 if(fProtonAnalysisBase->IsUsedTPCpid()) {
889 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
890 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
892 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
893 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
895 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
896 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
897 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
899 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
900 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
901 }//number of TPC points for the dE/dx
902 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
903 if(!track->HasPointOnITSLayer(0)) {
904 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
906 else if(track->HasPointOnITSLayer(0))
907 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
909 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
910 if(!track->HasPointOnITSLayer(1)) {
911 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
913 else if(track->HasPointOnITSLayer(1))
914 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
916 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
917 if(!track->HasPointOnITSLayer(2)) {
918 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
920 else if(track->HasPointOnITSLayer(2))
921 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
923 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
924 if(!track->HasPointOnITSLayer(3)) {
925 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
927 else if(track->HasPointOnITSLayer(3))
928 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
930 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
931 if(!track->HasPointOnITSLayer(4)) {
932 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
934 else if(track->HasPointOnITSLayer(4))
935 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
937 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
938 if(!track->HasPointOnITSLayer(5)) {
939 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(26)))->Fill(0);
941 else if(track->HasPointOnITSLayer(5))
942 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(26)))->Fill(0);
944 }//secondary particle cut
948 //____________________________________________________________________//
949 void AliProtonQAAnalysis::SetRunQAAnalysis() {
950 //initializes the QA lists
951 //fQAHistograms = kTRUE;
952 fGlobalQAList = new TList();
954 fQA2DList = new TList();
955 fQA2DList->SetName("fQA2DList");
956 fGlobalQAList->Add(fQA2DList);
958 fQAPrimaryProtonsAcceptedList = new TList();
959 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
960 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
962 fQAPrimaryProtonsRejectedList = new TList();
963 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
964 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
966 fQASecondaryProtonsAcceptedList = new TList();
967 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
968 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
970 fQASecondaryProtonsRejectedList = new TList();
971 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
972 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
974 fQAPrimaryAntiProtonsAcceptedList = new TList();
975 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
976 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
978 fQAPrimaryAntiProtonsRejectedList = new TList();
979 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
980 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
982 fQASecondaryAntiProtonsAcceptedList = new TList();
983 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
984 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
986 fQASecondaryAntiProtonsRejectedList = new TList();
987 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
988 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
991 //____________________________________________________________________//
992 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY,
993 Double_t minY, Double_t maxY,
995 Double_t minPt, Double_t maxPt) {
996 //Initializes the QA binning
998 fMinY = minY; fMaxY = maxY;
1000 fMinPt = minPt; fMaxPt = maxPt;
1004 if(fRunMCAnalysis) InitMCAnalysis();
1005 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1008 //____________________________________________________________________//
1009 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t *gY,
1010 Int_t nbinsPt, Double_t *gPt) {
1011 //Initializes the QA binning - asymmetric binning case
1012 fUseAsymmetricBinning = kTRUE;
1014 for(Int_t i = 0; i < nbinsY; i++) fY[i] = gY[i];
1015 fMinY = gY[0]; fMaxY = gY[nbinsPt];
1017 for(Int_t i = 0; i < nbinsPt; i++) fPt[i] = gPt[i];
1018 fMinPt = gPt[0]; fMaxPt = gPt[nbinsPt];
1022 if(fRunMCAnalysis) InitMCAnalysis();
1023 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1026 //____________________________________________________________________//
1027 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1028 //Initialization of the efficiency list - reconstruction & PID efficiency
1029 //Adding each monitored object in the list
1030 fEfficiencyList = new TList();
1032 //MC primary protons and antiprotons for the reconstruction efficiency
1033 TH2D *gHistMCYPtProtons = 0x0;
1034 if(fUseAsymmetricBinning)
1035 gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1037 fNBinsY,fY,fNBinsPt,fPt);
1039 gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1041 fNBinsY,fMinY,fMaxY,
1042 fNBinsPt,fMinPt,fMaxPt);
1043 if(fProtonAnalysisBase->GetEtaMode())
1044 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1046 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
1047 gHistMCYPtProtons->SetStats(kTRUE);
1048 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1049 fEfficiencyList->Add(gHistMCYPtProtons);
1050 TH2D *gHistMCYPtAntiProtons = 0x0;
1051 if(fUseAsymmetricBinning)
1052 gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1054 fNBinsY,fY,fNBinsPt,fPt);
1056 gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1058 fNBinsY,fMinY,fMaxY,
1059 fNBinsPt,fMinPt,fMaxPt);
1060 if(fProtonAnalysisBase->GetEtaMode())
1061 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1063 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
1064 gHistMCYPtAntiProtons->SetStats(kTRUE);
1065 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1066 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1068 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1069 TH2D *gHistMCYPtProtonsFromWeak = 0x0;
1070 if(fUseAsymmetricBinning)
1071 gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1073 fNBinsY,fY,fNBinsPt,fPt);
1075 gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1077 fNBinsY,fMinY,fMaxY,
1078 fNBinsPt,fMinPt,fMaxPt);
1079 if(fProtonAnalysisBase->GetEtaMode())
1080 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1082 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1083 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1084 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1085 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1086 TH2D *gHistMCYPtAntiProtonsFromWeak = 0x0;
1087 if(fUseAsymmetricBinning)
1088 gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1090 fNBinsY,fY,fNBinsPt,fPt);
1092 gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1094 fNBinsY,fMinY,fMaxY,
1095 fNBinsPt,fMinPt,fMaxPt);
1096 if(fProtonAnalysisBase->GetEtaMode())
1097 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1099 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1100 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1101 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1102 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1104 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1105 TH2D *gHistMCYPtProtonsFromHadronic = 0x0;
1106 if(fUseAsymmetricBinning)
1107 gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1109 fNBinsY,fY,fNBinsPt,fPt);
1111 gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1113 fNBinsY,fMinY,fMaxY,
1114 fNBinsPt,fMinPt,fMaxPt);
1115 if(fProtonAnalysisBase->GetEtaMode())
1116 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1118 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1119 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1120 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1121 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1122 TH2D *gHistMCYPtAntiProtonsFromHadronic = 0x0;
1123 if(fUseAsymmetricBinning)
1124 gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1126 fNBinsY,fY,fNBinsPt,fPt);
1128 gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1130 fNBinsY,fMinY,fMaxY,
1131 fNBinsPt,fMinPt,fMaxPt);
1132 if(fProtonAnalysisBase->GetEtaMode())
1133 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1135 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1136 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1137 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1138 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1140 //ESD primary protons and antiprotons for the reconstruction efficiency
1141 TH2D *gHistESDYPtProtons = 0x0;
1142 if(fUseAsymmetricBinning)
1143 gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1145 fNBinsY,fY,fNBinsPt,fPt);
1147 gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1149 fNBinsY,fMinY,fMaxY,
1150 fNBinsPt,fMinPt,fMaxPt);
1151 if(fProtonAnalysisBase->GetEtaMode())
1152 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1154 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
1155 gHistESDYPtProtons->SetStats(kTRUE);
1156 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1157 fEfficiencyList->Add(gHistESDYPtProtons);
1158 TH2D *gHistESDYPtAntiProtons = 0x0;
1159 if(fUseAsymmetricBinning)
1160 gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1162 fNBinsY,fY,fNBinsPt,fPt);
1164 gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1166 fNBinsY,fMinY,fMaxY,
1167 fNBinsPt,fMinPt,fMaxPt);
1168 if(fProtonAnalysisBase->GetEtaMode())
1169 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1171 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
1172 gHistESDYPtAntiProtons->SetStats(kTRUE);
1173 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1174 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1176 //ESD (anti)protons from weak decays for the reconstruction efficiency
1177 TH2D *gHistESDYPtProtonsFromWeak = 0x0;
1178 if(fUseAsymmetricBinning)
1179 gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1181 fNBinsY,fY,fNBinsPt,fPt);
1183 gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1185 fNBinsY,fMinY,fMaxY,
1186 fNBinsPt,fMinPt,fMaxPt);
1187 if(fProtonAnalysisBase->GetEtaMode())
1188 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1190 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1191 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1192 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1193 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1194 TH2D *gHistESDYPtAntiProtonsFromWeak = 0x0;
1195 if(fUseAsymmetricBinning)
1196 gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1198 fNBinsY,fY,fNBinsPt,fPt);
1200 gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1202 fNBinsY,fMinY,fMaxY,
1203 fNBinsPt,fMinPt,fMaxPt);
1204 if(fProtonAnalysisBase->GetEtaMode())
1205 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1207 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1208 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1209 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1210 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1212 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1213 TH2D *gHistESDYPtProtonsFromHadronic = 0x0;
1214 if(fUseAsymmetricBinning)
1215 gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1217 fNBinsY,fY,fNBinsPt,fPt);
1219 gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1221 fNBinsY,fMinY,fMaxY,
1222 fNBinsPt,fMinPt,fMaxPt);
1223 if(fProtonAnalysisBase->GetEtaMode())
1224 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1226 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1227 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1228 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1229 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1230 TH2D *gHistESDYPtAntiProtonsFromHadronic = 0x0;
1231 if(fUseAsymmetricBinning)
1232 gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1234 fNBinsY,fY,fNBinsPt,fPt);
1236 gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1238 fNBinsY,fMinY,fMaxY,
1239 fNBinsPt,fMinPt,fMaxPt);
1240 if(fProtonAnalysisBase->GetEtaMode())
1241 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1243 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1244 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1245 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1246 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1248 //ESD reconstructed tracks that were initially protons for the PID efficiency
1249 TH3D *gHistESDInitYPtProtons = 0x0;
1250 if(fUseAsymmetricBinning) {
1251 Double_t gNPoints[51];
1252 for(Int_t i = 0; i < 51; i++)
1254 gHistESDInitYPtProtons = new TH3D("gHistESDInitYPtProtons",
1255 ";;P_{T} [GeV/c];N_{points}",
1256 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1259 gHistESDInitYPtProtons = new TH3D("gHistESDInitYPtProtons",
1260 ";;P_{T} [GeV/c];N_{points}",
1261 fNBinsY,fMinY,fMaxY,
1262 fNBinsPt,fMinPt,fMaxPt,
1264 if(fProtonAnalysisBase->GetEtaMode())
1265 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1267 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
1268 gHistESDInitYPtProtons->SetStats(kTRUE);
1269 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1270 fEfficiencyList->Add(gHistESDInitYPtProtons);
1272 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1273 TH3D *gHistESDIdYPtProtons = 0x0;
1274 if(fUseAsymmetricBinning) {
1275 Double_t gNPoints[51];
1276 for(Int_t i = 0; i < 51; i++)
1278 gHistESDIdYPtProtons = new TH3D("gHistESDIdYPtProtons",
1279 ";;P_{T} [GeV/c];N_{points}",
1280 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1283 gHistESDIdYPtProtons = new TH3D("gHistESDIdYPtProtons",
1284 ";;P_{T} [GeV/c];N_{points}",
1285 fNBinsY,fMinY,fMaxY,
1286 fNBinsPt,fMinPt,fMaxPt,
1288 if(fProtonAnalysisBase->GetEtaMode())
1289 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1291 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
1292 gHistESDIdYPtProtons->SetStats(kTRUE);
1293 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1294 fEfficiencyList->Add(gHistESDIdYPtProtons);
1296 //ESD reconstructed tracks that were identified as protons for the PID contamination
1297 TH3D *gHistESDRecIdYPtProtons = 0x0;
1298 if(fUseAsymmetricBinning) {
1299 Double_t gNPoints[51];
1300 for(Int_t i = 0; i < 51; i++)
1302 gHistESDRecIdYPtProtons = new TH3D("gHistESDRecIdYPtProtons",
1303 ";;P_{T} [GeV/c];N_{points}",
1304 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1307 gHistESDRecIdYPtProtons = new TH3D("gHistESDRecIdYPtProtons",
1308 ";;P_{T} [GeV/c];N_{points}",
1309 fNBinsY,fMinY,fMaxY,
1310 fNBinsPt,fMinPt,fMaxPt,
1312 if(fProtonAnalysisBase->GetEtaMode())
1313 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1315 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
1316 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1317 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1318 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1320 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1321 TH3D *gHistESDContamYPtProtons = 0x0;
1322 if(fUseAsymmetricBinning) {
1323 Double_t gNPoints[51];
1324 for(Int_t i = 0; i < 51; i++)
1326 gHistESDContamYPtProtons = new TH3D("gHistESDContamYPtProtons",
1327 ";;P_{T} [GeV/c];N_{points}",
1328 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1331 gHistESDContamYPtProtons = new TH3D("gHistESDContamYPtProtons",
1332 ";;P_{T} [GeV/c];N_{points}",
1333 fNBinsY,fMinY,fMaxY,
1334 fNBinsPt,fMinPt,fMaxPt,
1336 if(fProtonAnalysisBase->GetEtaMode())
1337 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1339 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
1340 gHistESDContamYPtProtons->SetStats(kTRUE);
1341 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1342 fEfficiencyList->Add(gHistESDContamYPtProtons);
1345 //____________________________________________________________________//
1346 void AliProtonQAAnalysis::InitCutLists() {
1347 //Initialization of the cut lists
1348 //Adding each monitored object in each list
1351 fAcceptedCutList = new TList();
1352 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1353 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1354 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1355 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1356 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1357 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1358 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1359 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1361 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1362 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1363 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1364 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1365 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1366 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1367 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1368 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1370 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1371 ";x^{2}/N_{clusters} (ITS);Entries",
1373 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1374 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1375 ";x^{2}/N_{clusters} (ITS);Entries",
1377 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1378 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1379 ";x^{2}/N_{clusters} (ITS);Entries",
1381 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1382 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1383 ";x^{2}/N_{clusters} (ITS);Entries",
1385 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1387 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1388 ";Log_{10}(#chi^{2});Entries",
1390 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1391 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1392 ";Log_{10}(#chi^{2});Entries",
1394 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1395 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1396 ";Log_{10}(#chi^{2});Entries",
1398 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1399 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1400 ";Log_{10}(#chi^{2});Entries",
1402 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1404 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1405 ";N_{clusters} (TPC);Entries",
1407 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1408 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1409 ";N_{clusters} (TPC);Entries",
1411 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1412 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1413 ";N_{clusters} (TPC);Entries",
1415 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1416 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1417 ";N_{clusters} (TPC);Entries",
1419 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1421 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1422 ";x^{2}/N_{clusters} (TPC);Entries",
1424 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1425 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1426 ";x^{2}/N_{clusters} (TPC);Entries",
1428 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1429 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1430 ";x^{2}/N_{clusters} (TPC);Entries",
1432 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1433 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1434 ";x^{2}/N_{clusters} (TPC);Entries",
1436 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1438 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1439 ";#sigma_{y} [cm];Entries",
1441 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1442 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1443 ";#sigma_{y} [cm];Entries",
1445 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1446 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1447 ";#sigma_{y} [cm];Entries",
1449 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1450 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1451 ";#sigma_{y} [cm];Entries",
1453 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1456 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1457 ";#sigma_{z} [cm];Entries",
1459 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1460 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1461 ";#sigma_{z} [cm];Entries",
1463 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1464 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1465 ";#sigma_{z} [cm];Entries",
1467 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1468 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1469 ";#sigma_{z} [cm];Entries",
1471 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1474 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1475 ";#sigma_{sin(#phi)};Entries",
1477 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1478 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1479 ";#sigma_{sin(#phi)};Entries",
1481 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1482 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1483 ";#sigma_{sin(#phi)};Entries",
1485 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1486 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1487 ";#sigma_{sin(#phi)};Entries",
1489 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1492 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1493 ";#sigma_{tan(#lambda)};Entries",
1495 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1496 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1497 ";#sigma_{tan(#lambda)};Entries",
1499 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1500 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1501 ";#sigma_{tan(#lambda)};Entries",
1503 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1504 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1505 ";#sigma_{tan(#lambda)};Entries",
1507 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1510 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1511 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1513 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1514 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1515 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1517 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1518 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1519 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1521 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1522 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1523 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1525 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1527 TH3D *gHistEtaPhiNClustersPrimaryProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryProtonsPass",
1528 "Accepted primary protons;#eta;#phi;N_{clusters}(TPC)",
1529 fNBinsY,fMinY,fMaxY,
1532 gHistEtaPhiNClustersPrimaryProtonsPass->SetStats(kTRUE);
1533 gHistEtaPhiNClustersPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1534 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1535 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsPass",
1536 "Accepted primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1537 fNBinsY,fMinY,fMaxY,
1540 gHistEtaPhiNClustersPrimaryAntiProtonsPass->SetStats(kTRUE);
1541 gHistEtaPhiNClustersPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1542 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1543 TH3D *gHistEtaPhiNClustersSecondaryProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryProtonsPass",
1544 "Accepted secondary protons;#eta;#phi;N_{clusters}(TPC)",
1545 fNBinsY,fMinY,fMaxY,
1548 gHistEtaPhiNClustersSecondaryProtonsPass->SetStats(kTRUE);
1549 gHistEtaPhiNClustersSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1550 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1551 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsPass",
1552 "Accepted secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1553 fNBinsY,fMinY,fMaxY,
1556 gHistEtaPhiNClustersSecondaryAntiProtonsPass->SetStats(kTRUE);
1557 gHistEtaPhiNClustersSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1558 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1559 //eta-phi-chi^2 per TPC cluster
1560 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass",
1561 "Accepted primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1562 fNBinsY,fMinY,fMaxY,
1565 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->SetStats(kTRUE);
1566 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1567 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1568 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass",
1569 "Accepted primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1570 fNBinsY,fMinY,fMaxY,
1573 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->SetStats(kTRUE);
1574 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1575 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1576 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass",
1577 "Accepted secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1578 fNBinsY,fMinY,fMaxY,
1581 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->SetStats(kTRUE);
1582 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1583 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1584 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass",
1585 "Accepted secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1586 fNBinsY,fMinY,fMaxY,
1589 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->SetStats(kTRUE);
1590 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1591 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1592 //eta-phi-number of TPC points for the dE/dx
1593 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass",
1594 "Accepted primary protons;#eta;#phi;N_{points}(TPC)",
1595 fNBinsY,fMinY,fMaxY,
1598 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->SetStats(kTRUE);
1599 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1600 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1601 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass",
1602 "Accepted primary antiprotons;#eta;#phi;N_{points}(TPC)",
1603 fNBinsY,fMinY,fMaxY,
1606 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->SetStats(kTRUE);
1607 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1608 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1609 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass",
1610 "Accepted secondary protons;#eta;#phi;N_{points}(TPC)",
1611 fNBinsY,fMinY,fMaxY,
1614 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->SetStats(kTRUE);
1615 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1616 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1617 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass",
1618 "Accepted secondary antiprotons;#eta;#phi;N_{points}(TPC)",
1619 fNBinsY,fMinY,fMaxY,
1622 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->SetStats(kTRUE);
1623 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1624 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1626 TH1F *gPrimaryProtonsNPointsTPCdEdx = new TH1F("gPrimaryProtonsNPointsTPCdEdx",
1627 ";N_{points} (TPC-dE/dx);Entries",
1629 fAcceptedCutList->Add(gPrimaryProtonsNPointsTPCdEdx);
1630 TH1F *gPrimaryAntiProtonsNPointsTPCdEdx = new TH1F("gPrimaryAntiProtonsNPointsTPCdEdx",
1631 ";N_{points} (TPC-dE/dx);Entries",
1633 fAcceptedCutList->Add(gPrimaryAntiProtonsNPointsTPCdEdx);
1634 TH1F *gSecondaryProtonsNPointsTPCdEdx = new TH1F("gSecondaryProtonsNPointsTPCdEdx",
1635 ";N_{points} (TPC-dE/dx);Entries",
1637 fAcceptedCutList->Add(gSecondaryProtonsNPointsTPCdEdx);
1638 TH1F *gSecondaryAntiProtonsNPointsTPCdEdx = new TH1F("gSecondaryAntiProtonsNPointsTPCdEdx",
1639 ";N_{points} (TPC-dE/dx);Entries",
1641 fAcceptedCutList->Add(gSecondaryAntiProtonsNPointsTPCdEdx);
1644 fRejectedCutList = new TList();
1646 TH3D *gHistEtaPhiNClustersPrimaryProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryProtonsReject",
1647 "Rejected primary protons;#eta;#phi;N_{clusters}(TPC)",
1648 fNBinsY,fMinY,fMaxY,
1651 gHistEtaPhiNClustersPrimaryProtonsReject->SetStats(kTRUE);
1652 gHistEtaPhiNClustersPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1653 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1654 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsReject",
1655 "Rejected primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1656 fNBinsY,fMinY,fMaxY,
1659 gHistEtaPhiNClustersPrimaryAntiProtonsReject->SetStats(kTRUE);
1660 gHistEtaPhiNClustersPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1661 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1662 TH3D *gHistEtaPhiNClustersSecondaryProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryProtonsReject",
1663 "Rejected secondary protons;#eta;#phi;N_{clusters}(TPC)",
1664 fNBinsY,fMinY,fMaxY,
1667 gHistEtaPhiNClustersSecondaryProtonsReject->SetStats(kTRUE);
1668 gHistEtaPhiNClustersSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1669 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1670 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsReject",
1671 "Rejected secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1672 fNBinsY,fMinY,fMaxY,
1675 gHistEtaPhiNClustersSecondaryAntiProtonsReject->SetStats(kTRUE);
1676 gHistEtaPhiNClustersSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1677 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1678 //eta-phi-chi^2 per TPC cluster
1679 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject",
1680 "Rejected primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1681 fNBinsY,fMinY,fMaxY,
1684 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject->SetStats(kTRUE);
1685 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1686 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1687 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject",
1688 "Rejected primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1689 fNBinsY,fMinY,fMaxY,
1692 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject->SetStats(kTRUE);
1693 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1694 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1695 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject",
1696 "Rejected secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1697 fNBinsY,fMinY,fMaxY,
1700 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject->SetStats(kTRUE);
1701 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1702 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1703 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject",
1704 "Rejected secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1705 fNBinsY,fMinY,fMaxY,
1708 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject->SetStats(kTRUE);
1709 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1710 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1711 //eta-phi-number of TPC points for the dE/dx
1712 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject",
1713 "Rejected primary protons;#eta;#phi;N_{points}(TPC)",
1714 fNBinsY,fMinY,fMaxY,
1717 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject->SetStats(kTRUE);
1718 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1719 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1720 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject",
1721 "Rejected primary antiprotons;#eta;#phi;N_{points}(TPC)",
1722 fNBinsY,fMinY,fMaxY,
1725 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject->SetStats(kTRUE);
1726 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1727 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1728 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject",
1729 "Rejected secondary protons;#eta;#phi;N_{points}(TPC)",
1730 fNBinsY,fMinY,fMaxY,
1733 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject->SetStats(kTRUE);
1734 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1735 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1736 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject",
1737 "Rejected secondary antiprotons;#eta;#phi;N_{points}(TPC)",
1738 fNBinsY,fMinY,fMaxY,
1741 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject->SetStats(kTRUE);
1742 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1743 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1746 fAcceptedDCAList = new TList();
1747 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1748 ";DCA_{xy} [cm];Entries",
1750 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1751 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1752 ";DCA_{xy} [cm];Entries",
1754 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1755 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1756 ";DCA_{xy} [cm];Entries",
1758 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1759 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1760 ";DCA_{xy} [cm];Entries",
1763 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1764 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1765 ";DCA_{z} [cm];Entries",
1767 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1768 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1769 ";DCA_{z} [cm];Entries",
1771 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1772 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1773 ";DCA_{z} [cm];Entries",
1775 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1776 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1777 ";DCA_{z} [cm];Entries",
1779 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1781 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1782 ";#sigma_{Vertex};Entries",
1784 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1785 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1786 ";#sigma_{Vertex};Entries",
1788 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1789 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1790 ";#sigma_{Vertex};Entries",
1792 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1793 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1794 ";#sigma_{Vertex};Entries",
1796 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1800 //____________________________________________________________________//
1801 void AliProtonQAAnalysis::InitVertexQA() {
1802 //Initializes the Vertex QA histograms
1803 fQAVertexList = new TList();
1804 fQAVertexList->SetName("fQAVertexList");
1806 //Gen. multiplicity bins
1807 //Float_t xBins[24] = {0,1,2,4,6,8,10,15,20,30,40,50,75,100,
1808 //200,300,400,500,750,1000,1500,2000,2500,3000};
1809 //MC primary multiplicity (vertex efficiency calculation)
1810 TH1F *gHistMCPrimaryVz = new TH1F("gHistMCPrimaryVz",
1811 ";V_{z} (gen.) [cm];Entries",
1813 fQAVertexList->Add(gHistMCPrimaryVz);
1814 //TH1F *gHistMCPrimaryMultiplicity = new TH1F("gHistMCPrimaryMultiplicity",
1815 //";N_{prim. gen.};Entries",
1817 //fQAVertexList->Add(gHistMCPrimaryMultiplicity);
1820 TH1F *gHistTPCVz = new TH1F("gHistTPCVz",
1821 ";V_{z} (gen.) [cm];Entries",
1823 fQAVertexList->Add(gHistTPCVz);
1824 //TH1F *gHistMCPrimaryMultiplicityTPC = new TH1F("gHistMCPrimaryMultiplicityTPC",
1825 //"Vertex TPC;N_{prim. gen.};Entries",
1827 //fQAVertexList->Add(gHistMCPrimaryMultiplicityTPC);
1828 TH2F *gHistTPCESDVxN = new TH2F("gHistTPCESDVxN",
1829 "Primary vertex TPC;V_{x} [cm];N_{contributors}",
1830 100,-10.,10.,1000,0,5000);
1831 fQAVertexList->Add(gHistTPCESDVxN);
1832 TH2F *gHistTPCESDVyN = new TH2F("gHistTPCESDVyN",
1833 "Primary vertex TPC;V_{y} [cm];N_{contributors}",
1834 100,-10.,10.,1000,0,5000);
1835 fQAVertexList->Add(gHistTPCESDVyN);
1836 TH2F *gHistTPCESDVzN = new TH2F("gHistTPCESDVzN",
1837 "Primary vertex TPC;V_{z} [cm];N_{contributors}",
1838 100,-20.,20.,1000,0,5000);
1839 fQAVertexList->Add(gHistTPCESDVzN);
1840 TH1F *gHistTPCDiffVx = new TH1F("gHistTPCDiffVx",
1841 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1842 100,-10000.,10000.);
1843 fQAVertexList->Add(gHistTPCDiffVx);
1844 TH1F *gHistTPCDiffVy = new TH1F("gHistTPCDiffVy",
1845 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1846 100,-10000.,10000.);
1847 fQAVertexList->Add(gHistTPCDiffVy);
1848 TH1F *gHistTPCDiffVz = new TH1F("gHistTPCDiffVz",
1849 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1850 100,-10000.,10000.);
1851 fQAVertexList->Add(gHistTPCDiffVz);
1852 TH1F *gHistTPCResolutionVx = new TH1F("gHistTPCResolutionVx",
1853 ";#sigma_{x} [#mu m];Entries",
1855 fQAVertexList->Add(gHistTPCResolutionVx);
1856 TH1F *gHistTPCResolutionVy = new TH1F("gHistTPCResolutionVy",
1857 ";#sigma_{y} [#mu m];Entries",
1859 fQAVertexList->Add(gHistTPCResolutionVy);
1860 TH1F *gHistTPCResolutionVz = new TH1F("gHistTPCResolutionVz",
1861 ";#sigma_{z} [#mu m];Entries",
1863 fQAVertexList->Add(gHistTPCResolutionVz);
1866 TH1F *gHistSPDVz = new TH1F("gHistSPDVz",
1867 ";V_{z} (gen.) [cm];Entries",
1869 fQAVertexList->Add(gHistSPDVz);
1870 //TH1F *gHistMCPrimaryMultiplicitySPD = new TH1F("gHistMCPrimaryMultiplicitySPD",
1871 //"Vertex SPD;N_{prim. gen.};Entries",
1873 //fQAVertexList->Add(gHistMCPrimaryMultiplicitySPD);
1874 TH2F *gHistSPDESDVxN = new TH2F("gHistSPDESDVxN",
1875 "Primary vertex SPD;V_{x} [cm];N_{contributors}",
1876 100,-10.,10.,1000,0,5000);
1877 fQAVertexList->Add(gHistSPDESDVxN);
1878 TH2F *gHistSPDESDVyN = new TH2F("gHistSPDESDVyN",
1879 "Primary vertex SPD;V_{y} [cm];N_{contributors}",
1880 100,-10.,10.,1000,0,5000);
1881 fQAVertexList->Add(gHistSPDESDVyN);
1882 TH2F *gHistSPDESDVzN = new TH2F("gHistSPDESDVzN",
1883 "Primary vertex SPD;V_{z} [cm];N_{contributors}",
1884 100,-20.,20.,1000,0,5000);
1885 fQAVertexList->Add(gHistSPDESDVzN);
1886 TH1F *gHistSPDDiffVx = new TH1F("gHistSPDDiffVx",
1887 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1888 100,-10000.,10000.);
1889 fQAVertexList->Add(gHistSPDDiffVx);
1890 TH1F *gHistSPDDiffVy = new TH1F("gHistSPDDiffVy",
1891 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1892 100,-10000.,10000.);
1893 fQAVertexList->Add(gHistSPDDiffVy);
1894 TH1F *gHistSPDDiffVz = new TH1F("gHistSPDDiffVz",
1895 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1896 100,-10000.,10000.);
1897 fQAVertexList->Add(gHistSPDDiffVz);
1898 TH1F *gHistSPDResolutionVx = new TH1F("gHistSPDResolutionVx",
1899 ";#sigma_{x} [#mu m];Entries",
1901 fQAVertexList->Add(gHistSPDResolutionVx);
1902 TH1F *gHistSPDResolutionVy = new TH1F("gHistSPDResolutionVy",
1903 ";#sigma_{y} [#mu m];Entries",
1905 fQAVertexList->Add(gHistSPDResolutionVy);
1906 TH1F *gHistSPDResolutionVz = new TH1F("gHistSPDResolutionVz",
1907 ";#sigma_{z} [#mu m];Entries",
1909 fQAVertexList->Add(gHistSPDResolutionVz);
1912 TH1F *gHistTracksVz = new TH1F("gHistTracksVz",
1913 ";V_{z} (gen.) [cm];Entries",
1915 fQAVertexList->Add(gHistTracksVz);
1916 //TH1F *gHistMCPrimaryMultiplicityTracks = new TH1F("gHistMCPrimaryMultiplicityTracks",
1917 //"Vertex Tracks;N_{prim. gen.};Entries",
1919 //fQAVertexList->Add(gHistMCPrimaryMultiplicityTracks);
1920 TH2F *gHistTracksESDVxN = new TH2F("gHistTracksESDVxN",
1921 "Primary vertex Tracks;V_{x} [cm];N_{contributors}",
1922 100,-10.,10.,1000,0,5000);
1923 fQAVertexList->Add(gHistTracksESDVxN);
1924 TH2F *gHistTracksESDVyN = new TH2F("gHistTracksESDVyN",
1925 "Primary vertex Tracks;V_{y} [cm];N_{contributors}",
1926 100,-10.,10.,1000,0,5000);
1927 fQAVertexList->Add(gHistTracksESDVyN);
1928 TH2F *gHistTracksESDVzN = new TH2F("gHistTracksESDVzN",
1929 "Primary vertex Tracks;V_{z} [cm];N_{contributors}",
1930 100,-20.,20.,1000,0,5000);
1931 fQAVertexList->Add(gHistTracksESDVzN);
1932 TH1F *gHistTracksDiffVx = new TH1F("gHistTracksDiffVx",
1933 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1934 100,-10000.,10000.);
1935 fQAVertexList->Add(gHistTracksDiffVx);
1936 TH1F *gHistTracksDiffVy = new TH1F("gHistTracksDiffVy",
1937 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1938 100,-10000.,10000.);
1939 fQAVertexList->Add(gHistTracksDiffVy);
1940 TH1F *gHistTracksDiffVz = new TH1F("gHistTracksDiffVz",
1941 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1942 100,-10000.,10000.);
1943 fQAVertexList->Add(gHistTracksDiffVz);
1944 TH1F *gHistTracksResolutionVx = new TH1F("gHistTracksResolutionVx",
1945 ";#sigma_{x} [#mu m];Entries",
1947 fQAVertexList->Add(gHistTracksResolutionVx);
1948 TH1F *gHistTracksResolutionVy = new TH1F("gHistTracksResolutionVy",
1949 ";#sigma_{y} [#mu m];Entries",
1951 fQAVertexList->Add(gHistTracksResolutionVy);
1952 TH1F *gHistTracksResolutionVz = new TH1F("gHistTracksResolutionVz",
1953 ";#sigma_{z} [#mu m];Entries",
1955 fQAVertexList->Add(gHistTracksResolutionVz);
1958 //____________________________________________________________________//
1959 void AliProtonQAAnalysis::InitQA() {
1960 //Initializes the QA histograms
1961 //if(!fQAHistograms)
1965 //TDirectory *dir2D = gDirectory->mkdir("2D");
1966 //fGlobalQAList->Add(dir2D); dir2D->cd();
1967 TH2D *gHistYPtPrimaryProtonsPass = 0x0;
1968 if(fUseAsymmetricBinning)
1969 gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1971 fNBinsY,fY,fNBinsPt,fPt);
1973 gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
1975 fNBinsY,fMinY,fMaxY,
1976 fNBinsPt,fMinPt,fMaxPt);
1977 if(fProtonAnalysisBase->GetEtaMode())
1978 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("#eta");
1980 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("y");
1981 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
1982 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1983 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
1984 TH2D *gHistYPtPrimaryProtonsReject = 0x0;
1985 if(fUseAsymmetricBinning)
1986 gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1988 fNBinsY,fY,fNBinsPt,fPt);
1990 gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
1992 fNBinsY,fMinY,fMaxY,
1993 fNBinsPt,fMinPt,fMaxPt);
1994 if(fProtonAnalysisBase->GetEtaMode())
1995 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("#eta");
1997 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("y");
1998 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
1999 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
2000 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
2002 TH2D *gHistYPtSecondaryProtonsPass = 0x0;
2003 if(fUseAsymmetricBinning)
2004 gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
2006 fNBinsY,fY,fNBinsPt,fPt);
2008 gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
2010 fNBinsY,fMinY,fMaxY,
2011 fNBinsPt,fMinPt,fMaxPt);
2012 if(fProtonAnalysisBase->GetEtaMode())
2013 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("#eta");
2015 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("y");
2016 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
2017 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
2018 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
2019 TH2D *gHistYPtSecondaryProtonsReject = 0x0;
2020 if(fUseAsymmetricBinning)
2021 gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
2023 fNBinsY,fY,fNBinsPt,fPt);
2025 gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
2027 fNBinsY,fMinY,fMaxY,
2028 fNBinsPt,fMinPt,fMaxPt);
2029 if(fProtonAnalysisBase->GetEtaMode())
2030 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("#eta");
2032 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("y");
2033 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
2034 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
2035 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
2037 TH2D *gHistYPtPrimaryAntiProtonsPass = 0x0;
2038 if(fUseAsymmetricBinning)
2039 gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
2041 fNBinsY,fY,fNBinsPt,fPt);
2043 gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
2045 fNBinsY,fMinY,fMaxY,
2046 fNBinsPt,fMinPt,fMaxPt);
2047 if(fProtonAnalysisBase->GetEtaMode())
2048 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2050 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("y");
2051 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
2052 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2053 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
2054 TH2D *gHistYPtPrimaryAntiProtonsReject = 0x0;
2055 if(fUseAsymmetricBinning)
2056 gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
2058 fNBinsY,fY,fNBinsPt,fPt);
2060 gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
2062 fNBinsY,fMinY,fMaxY,
2063 fNBinsPt,fMinPt,fMaxPt);
2064 if(fProtonAnalysisBase->GetEtaMode())
2065 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2067 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2068 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
2069 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2070 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
2072 TH2D *gHistYPtSecondaryAntiProtonsPass = 0x0;
2073 if(fUseAsymmetricBinning)
2074 gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
2076 fNBinsY,fY,fNBinsPt,fPt);
2078 gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
2080 fNBinsY,fMinY,fMaxY,
2081 fNBinsPt,fMinPt,fMaxPt);
2082 if(fProtonAnalysisBase->GetEtaMode())
2083 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2085 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("y");
2086 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
2087 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2088 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
2089 TH2D *gHistYPtSecondaryAntiProtonsReject = 0x0;
2090 if(fUseAsymmetricBinning)
2091 gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
2093 fNBinsY,fY,fNBinsPt,fPt);
2095 gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
2097 fNBinsY,fMinY,fMaxY,
2098 fNBinsPt,fMinPt,fMaxPt);
2099 if(fProtonAnalysisBase->GetEtaMode())
2100 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2102 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2103 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
2104 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2105 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
2107 TH2D *gHistYPtPrimaryProtonsMC = 0x0;
2108 if(fUseAsymmetricBinning)
2109 gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
2111 fNBinsY,fY,fNBinsPt,fPt);
2113 gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
2115 fNBinsY,fMinY,fMaxY,
2116 fNBinsPt,fMinPt,fMaxPt);
2117 if(fProtonAnalysisBase->GetEtaMode())
2118 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("#eta");
2120 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("y");
2121 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
2122 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
2123 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
2124 TH2D *gHistYPtPrimaryAntiProtonsMC = 0x0;
2125 if(fUseAsymmetricBinning)
2126 gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
2128 fNBinsY,fY,fNBinsPt,fPt);
2130 gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
2132 fNBinsY,fMinY,fMaxY,
2133 fNBinsPt,fMinPt,fMaxPt);
2134 if(fProtonAnalysisBase->GetEtaMode())
2135 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("#eta");
2137 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("y");
2138 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
2139 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
2140 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
2142 TH3F *gHistYPtPDGProtonsPass = 0x0;
2143 if(fUseAsymmetricBinning) {
2144 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
2145 gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
2146 ";;P_{T} [GeV/c];PDG",
2147 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
2150 gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
2151 ";;P_{T} [GeV/c];PDG",
2152 fNBinsY,fMinY,fMaxY,
2153 fNBinsPt,fMinPt,fMaxPt,
2155 if(fProtonAnalysisBase->GetEtaMode())
2156 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("#eta");
2158 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("y");
2159 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
2160 TH3F *gHistYPtPDGAntiProtonsPass = 0x0;
2161 if(fUseAsymmetricBinning) {
2162 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
2163 gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
2164 ";;P_{T} [GeV/c];PDG",
2165 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
2168 gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
2169 ";;P_{T} [GeV/c];PDG",
2170 fNBinsY,fMinY,fMaxY,
2171 fNBinsPt,fMinPt,fMaxPt,
2173 if(fProtonAnalysisBase->GetEtaMode())
2174 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2176 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("y");
2177 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
2179 /*gDirectory->cd("../");
2181 TDirectory *dirProtons = gDirectory->mkdir("Protons");
2182 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
2184 //________________________________________________________________//
2185 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
2186 dirProtonsPrimary->cd();
2187 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2188 dirProtonsPrimaryAccepted->cd();*/
2190 //Accepted primary protons
2191 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
2192 ";N_{clusters} (ITS);Entries",
2194 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
2195 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
2196 ";x^{2}/N_{clusters} (ITS);Entries",
2198 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
2199 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
2200 ";N_{clusters} (TPC);Entries",
2202 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
2203 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
2204 ";x^{2}/N_{clusters} (TPC);Entries",
2206 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
2207 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
2208 ";#sigma_{y} [cm];Entries",
2210 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
2211 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
2212 ";#sigma_{z} [cm];Entries",
2214 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
2215 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
2216 ";#sigma_{sin(#phi)};Entries",
2218 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
2219 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
2220 ";#sigma_{tan(#lambda)};Entries",
2222 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
2223 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
2224 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2226 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
2227 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
2228 ";#sigma_{Vertex};Entries",
2230 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
2231 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
2232 ";#sigma_{Vertex};Entries",
2234 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
2235 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
2236 ";DCA_{xy} [cm];Entries",
2238 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
2239 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
2240 ";DCA_{xy} [cm];Entries",
2242 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
2243 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
2244 ";DCA_{z} [cm];Entries",
2246 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
2247 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
2248 ";DCA_{z} [cm];Entries",
2250 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
2251 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
2252 ";Log_{10}(#chi^{2});Entries",
2254 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
2255 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
2257 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
2258 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
2260 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
2261 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
2263 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
2264 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
2266 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2267 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
2269 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2270 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
2272 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2273 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
2275 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2276 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
2278 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2279 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
2281 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2282 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
2284 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
2285 TH1F *gPrimaryProtonsNumberOfTPCdEdxPointsPass = new TH1F("gPrimaryProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2286 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsNumberOfTPCdEdxPointsPass);
2288 //Rejected primary protons
2289 /*gDirectory->cd("../");
2290 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2291 dirProtonsPrimaryRejected->cd();*/
2293 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
2294 ";N_{clusters} (ITS);Entries",
2296 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2297 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
2298 ";x^{2}/N_{clusters} (ITS);Entries",
2300 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2301 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
2302 ";N_{clusters} (TPC);Entries",
2304 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2305 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
2306 ";x^{2}/N_{clusters} (TPC);Entries",
2308 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2309 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
2310 ";#sigma_{y} [cm];Entries",
2312 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2313 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
2314 ";#sigma_{z} [cm];Entries",
2316 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2317 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
2318 ";#sigma_{sin(#phi)};Entries",
2320 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2321 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
2322 ";#sigma_{tan(#lambda)};Entries",
2324 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2325 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2326 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2328 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2329 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2330 ";#sigma_{Vertex};Entries",
2332 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2333 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2334 ";#sigma_{Vertex};Entries",
2336 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2337 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2338 ";DCA_{xy} [cm];Entries",
2340 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2341 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2342 ";DCA_{xy} [cm];Entries",
2344 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2345 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2346 ";DCA_{z} [cm];Entries",
2348 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2349 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2350 ";DCA_{z} [cm];Entries",
2352 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2353 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2354 ";Log_{10}(#chi^{2});Entries",
2356 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2357 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2359 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2360 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2362 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2363 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2365 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2366 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2368 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2369 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2371 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2372 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2374 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2375 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2377 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2378 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2380 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2381 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2383 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2384 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2386 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2387 TH1F *gPrimaryProtonsNumberOfTPCdEdxPointsReject = new TH1F("gPrimaryProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
2388 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsNumberOfTPCdEdxPointsReject);
2390 //________________________________________________________________//
2391 /*gDirectory->cd("../../");
2393 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2394 dirProtonsSecondary->cd();
2395 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2396 dirProtonsSecondaryAccepted->cd();*/
2398 //Accepted secondary protons
2399 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2400 ";N_{clusters} (ITS);Entries",
2402 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2403 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2404 ";x^{2}/N_{clusters} (ITS);Entries",
2406 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2407 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2408 ";N_{clusters} (TPC);Entries",
2410 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2411 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2412 ";x^{2}/N_{clusters} (TPC);Entries",
2414 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2415 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2416 ";#sigma_{y} [cm];Entries",
2418 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2419 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2420 ";#sigma_{z} [cm];Entries",
2422 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2423 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2424 ";#sigma_{sin(#phi)};Entries",
2426 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2427 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2428 ";#sigma_{tan(#lambda)};Entries",
2430 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2431 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2432 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2434 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2435 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2436 ";#sigma_{Vertex};Entries",
2438 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2439 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2440 ";#sigma_{Vertex};Entries",
2442 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2443 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2444 ";DCA_{xy} [cm];Entries",
2446 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2447 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2448 ";DCA_{xy} [cm];Entries",
2450 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2451 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2452 ";DCA_{z} [cm];Entries",
2454 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2455 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2456 ";DCA_{z} [cm];Entries",
2458 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2459 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2460 ";Log_{10}(#chi^{2});Entries",
2462 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2463 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2465 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2466 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2468 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2469 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2471 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2472 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2474 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2475 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2477 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2478 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2480 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2481 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2483 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2484 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2486 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2487 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2489 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2490 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2492 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2493 TH1F *gSecondaryProtonsNumberOfTPCdEdxPointsPass = new TH1F("gSecondaryProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2494 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsNumberOfTPCdEdxPointsPass);
2496 //Rejected secondary protons
2497 /*gDirectory->cd("../");
2498 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2499 dirProtonsSecondaryRejected->cd();*/
2501 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2502 ";N_{clusters} (ITS);Entries",
2504 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2505 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2506 ";x^{2}/N_{clusters} (ITS);Entries",
2508 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2509 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2510 ";N_{clusters} (TPC);Entries",
2512 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2513 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2514 ";x^{2}/N_{clusters} (TPC);Entries",
2516 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2517 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2518 ";#sigma_{y} [cm];Entries",
2520 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2521 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2522 ";#sigma_{z} [cm];Entries",
2524 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2525 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2526 ";#sigma_{sin(#phi)};Entries",
2528 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2529 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2530 ";#sigma_{tan(#lambda)};Entries",
2532 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2533 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2534 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2536 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2537 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2538 ";#sigma_{Vertex};Entries",
2540 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2541 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2542 ";#sigma_{Vertex};Entries",
2544 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2545 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2546 ";DCA_{xy} [cm];Entries",
2548 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2549 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2550 ";DCA_{xy} [cm];Entries",
2552 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2553 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2554 ";DCA_{z} [cm];Entries",
2556 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2557 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2558 ";DCA_{z} [cm];Entries",
2560 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2561 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2562 ";Log_{10}(#chi^{2});Entries",
2564 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2565 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2567 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2568 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2570 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2571 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2573 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2574 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2576 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2577 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2579 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2580 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2582 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2583 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2585 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2586 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2588 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2589 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2591 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2592 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2594 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2595 TH1F *gSecondaryProtonsNumberOfTPCdEdxPointsReject = new TH1F("gSecondaryProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
2596 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsNumberOfTPCdEdxPointsReject);
2598 /*gDirectory->cd("../../../");
2601 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2602 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2604 //________________________________________________________________//
2605 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2606 dirAntiProtonsPrimary->cd();
2607 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2608 dirAntiProtonsPrimaryAccepted->cd();*/
2610 //Accepted primary antiprotons
2611 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2612 ";N_{clusters} (ITS);Entries",
2614 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2615 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2616 ";x^{2}/N_{clusters} (ITS);Entries",
2618 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2619 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2620 ";N_{clusters} (TPC);Entries",
2622 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2623 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2624 ";x^{2}/N_{clusters} (TPC);Entries",
2626 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2627 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2628 ";#sigma_{y} [cm];Entries",
2630 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2631 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2632 ";#sigma_{z} [cm];Entries",
2634 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2635 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2636 ";#sigma_{sin(#phi)};Entries",
2638 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2639 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2640 ";#sigma_{tan(#lambda)};Entries",
2642 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2643 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2644 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2646 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2647 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2648 ";#sigma_{Vertex};Entries",
2650 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2651 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2652 ";#sigma_{Vertex};Entries",
2654 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2655 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2656 ";DCA_{xy} [cm];Entries",
2658 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2659 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2660 ";DCA_{xy} [cm];Entries",
2662 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2663 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2664 ";DCA_{z} [cm];Entries",
2666 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2667 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2668 ";DCA_{z} [cm];Entries",
2670 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2671 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2672 ";Log_{10}(#chi^{2});Entries",
2674 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2675 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2677 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2678 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2680 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2681 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2683 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2684 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2686 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2687 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2689 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2690 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2692 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2693 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2695 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2696 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2698 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2699 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2701 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2702 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2704 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2705 TH1F *gPrimaryAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gPrimaryAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2706 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsNumberOfTPCdEdxPointsPass);
2708 //Rejected primary antiprotons
2709 /*gDirectory->cd("../");
2710 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2711 dirAntiProtonsPrimaryRejected->cd();*/
2713 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2714 ";N_{clusters} (ITS);Entries",
2716 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2717 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2718 ";x^{2}/N_{clusters} (ITS);Entries",
2720 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2721 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
2722 ";N_{clusters} (TPC);Entries",
2724 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2725 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
2726 ";x^{2}/N_{clusters} (TPC);Entries",
2728 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2729 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
2730 ";#sigma_{y} [cm];Entries",
2732 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2733 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
2734 ";#sigma_{z} [cm];Entries",
2736 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2737 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
2738 ";#sigma_{sin(#phi)};Entries",
2740 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2741 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
2742 ";#sigma_{tan(#lambda)};Entries",
2744 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2745 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
2746 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2748 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2749 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
2750 ";#sigma_{Vertex};Entries",
2752 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2753 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
2754 ";#sigma_{Vertex};Entries",
2756 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2757 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
2758 ";DCA_{xy} [cm];Entries",
2760 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2761 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
2762 ";DCA_{xy} [cm];Entries",
2764 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2765 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
2766 ";DCA_{z} [cm];Entries",
2768 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2769 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
2770 ";DCA_{z} [cm];Entries",
2772 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2773 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
2774 ";Log_{10}(#chi^{2});Entries",
2776 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2777 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
2779 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2780 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
2782 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2783 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
2785 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2786 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
2788 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2789 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
2791 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2792 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
2794 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2795 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
2797 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2798 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
2800 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2801 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
2803 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2804 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
2806 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
2807 TH1F *gPrimaryAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gPrimaryAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
2808 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsNumberOfTPCdEdxPointsReject);
2810 //________________________________________________________________//
2811 /*gDirectory->cd("../../");
2813 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2814 dirAntiProtonsSecondary->cd();
2815 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2816 dirAntiProtonsSecondaryAccepted->cd();*/
2818 //Accepted secondary antiprotons
2819 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
2820 ";N_{clusters} (ITS);Entries",
2822 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2823 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
2824 ";x^{2}/N_{clusters} (ITS);Entries",
2826 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2827 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
2828 ";N_{clusters} (TPC);Entries",
2830 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2831 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
2832 ";x^{2}/N_{clusters} (TPC);Entries",
2834 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2835 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
2836 ";#sigma_{y} [cm];Entries",
2838 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2839 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
2840 ";#sigma_{z} [cm];Entries",
2842 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2843 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
2844 ";#sigma_{sin(#phi)};Entries",
2846 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2847 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
2848 ";#sigma_{tan(#lambda)};Entries",
2850 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2851 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
2852 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2854 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2855 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
2856 ";#sigma_{Vertex};Entries",
2858 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2859 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
2860 ";#sigma_{Vertex};Entries",
2862 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2863 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
2864 ";DCA_{xy} [cm];Entries",
2866 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2867 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
2868 ";DCA_{xy} [cm];Entries",
2870 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2871 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
2872 ";DCA_{z} [cm];Entries",
2874 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2875 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
2876 ";DCA_{z} [cm];Entries",
2878 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2879 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
2880 ";Log_{10}(#chi^{2});Entries",
2882 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2883 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
2885 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2886 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
2888 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2889 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
2891 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2892 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
2894 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2895 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
2897 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2898 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
2900 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2901 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
2903 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2904 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
2906 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2907 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
2909 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2910 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
2912 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
2913 TH1F *gSecondaryAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gSecondaryAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2914 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsNumberOfTPCdEdxPointsPass);
2916 //Rejected secondary antiprotons
2917 /*gDirectory->cd("../");
2918 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2919 dirAntiProtonsSecondaryRejected->cd();*/
2921 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
2922 ";N_{clusters} (ITS);Entries",
2924 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2925 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
2926 ";x^{2}/N_{clusters} (ITS);Entries",
2928 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2929 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
2930 ";N_{clusters} (TPC);Entries",
2932 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2933 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
2934 ";x^{2}/N_{clusters} (TPC);Entries",
2936 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2937 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
2938 ";#sigma_{y} [cm];Entries",
2940 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2941 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
2942 ";#sigma_{z} [cm];Entries",
2944 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2945 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
2946 ";#sigma_{sin(#phi)};Entries",
2948 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2949 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
2950 ";#sigma_{tan(#lambda)};Entries",
2952 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2953 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
2954 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2956 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2957 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
2958 ";#sigma_{Vertex};Entries",
2960 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2961 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
2962 ";#sigma_{Vertex};Entries",
2964 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2965 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
2966 ";DCA_{xy} [cm];Entries",
2968 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2969 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
2970 ";DCA_{xy} [cm];Entries",
2972 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2973 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
2974 ";DCA_{z} [cm];Entries",
2976 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2977 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
2978 ";DCA_{z} [cm];Entries",
2980 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2981 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
2982 ";Log_{10}(#chi^{2});Entries",
2984 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2985 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
2987 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2988 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
2990 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2991 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
2993 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2994 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
2996 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2997 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
2999 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
3000 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
3002 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
3003 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
3005 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
3006 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
3008 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
3009 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
3011 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
3012 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
3014 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
3015 TH1F *gSecondaryAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gSecondaryAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
3016 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsNumberOfTPCdEdxPointsReject);
3019 //____________________________________________________________________//
3020 void AliProtonQAAnalysis::RunReconstructionEfficiencyAnalysis(AliMCEvent *const mcEvent,
3022 const AliESDVertex *vertex) {
3023 //Run the reconstruction efficiency code (primaries & secondaries)
3024 AliStack *stack = mcEvent->Stack();
3026 Int_t nMCParticles = mcEvent->GetNumberOfTracks();
3027 Int_t nMCLabelCounter = 0;
3028 TArrayI labelMCArray(nMCParticles);
3030 for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
3031 AliMCParticle *mcTrack = mcEvent->GetTrack(iTracks);
3033 Printf("ERROR: Could not receive track %d (mc loop)", iTracks);
3037 Double_t vz = mcTrack->Zv();
3038 if (TMath::Abs(vz) > 50.) continue;//exclude particles generated out of the acceptance
3040 if(TMath::Abs(mcTrack->Eta()) > 1.0) continue;//acceptance
3041 if((mcTrack->Pt() > fMaxPt)||(mcTrack->Pt() < fMinPt)) continue;
3042 if(fProtonAnalysisBase->GetEtaMode()) {
3043 if((mcTrack->Eta() > fMaxY)|| (mcTrack->Eta() < fMinY)) continue;
3046 if((fProtonAnalysisBase->Rapidity(mcTrack->Px(),mcTrack->Py(),mcTrack->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(mcTrack->Px(),mcTrack->Py(),mcTrack->Pz()) < fMinY)) continue;
3048 // Loop over Track References
3049 Bool_t labelTPC = kFALSE;
3050 AliTrackReference* trackRef = 0;
3051 for (Int_t iTrackRef = 0; iTrackRef < mcTrack->GetNumberOfTrackReferences(); iTrackRef++) {
3052 trackRef = mcTrack->GetTrackReference(iTrackRef);
3054 Int_t detectorId = trackRef->DetectorId();
3055 if (detectorId == AliTrackReference::kTPC) {
3064 TParticle* particle = mcTrack->Particle();
3065 if(!particle) continue;
3066 Int_t pdgcode = particle->GetPdgCode();
3067 if(TMath::Abs(pdgcode) != 2212) continue;
3069 labelMCArray.AddAt(iTracks,nMCLabelCounter);
3070 nMCLabelCounter += 1;
3072 if(iTracks <= stack->GetNprimary()) {
3073 if(pdgcode == 2212) {
3074 if(fProtonAnalysisBase->GetEtaMode())
3075 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
3078 ((TH2D *)(fEfficiencyList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3083 if(pdgcode == -2212) {
3084 if(fProtonAnalysisBase->GetEtaMode())
3085 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
3088 ((TH2D *)(fEfficiencyList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3096 Int_t lPartMother = -1;
3097 Int_t motherPDGCode = -1;
3098 lPartMother = particle->GetFirstMother();
3099 AliMCParticle *mcMotherTrack = mcEvent->GetTrack(lPartMother);
3100 TParticle *motherParticle = mcMotherTrack->Particle();
3101 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3103 if(pdgcode == 2212) {
3104 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3105 if(fProtonAnalysisBase->GetEtaMode())
3106 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3109 ((TH2D *)(fEfficiencyList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3114 if((particle->GetUniqueID() == 13)) {
3115 if(fProtonAnalysisBase->GetEtaMode())
3116 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3119 ((TH2D *)(fEfficiencyList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3123 }//hadronic interactions
3125 if(pdgcode == -2212) {
3126 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3127 if(fProtonAnalysisBase->GetEtaMode())
3128 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3131 ((TH2D *)(fEfficiencyList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3136 if((particle->GetUniqueID() == 13)) {
3137 if(fProtonAnalysisBase->GetEtaMode())
3138 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3141 ((TH2D *)(fEfficiencyList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3145 }//hadronic interactions
3152 Bool_t iFound = kFALSE;
3153 Int_t mcGoods = nMCLabelCounter;
3154 for (Int_t k = 0; k < mcGoods; k++) {
3155 Int_t mcLabel = labelMCArray.At(k);
3158 Int_t nGoodTracks = esd->GetNumberOfTracks();
3159 TArrayI labelArray(nGoodTracks);
3160 Int_t labelCounter = 0;
3161 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3162 AliESDtrack* track = esd->GetTrack(iTracks);
3163 if(!track) continue;
3166 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3167 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3168 if(!tpcTrack) continue;
3170 Int_t label = TMath::Abs(track->GetTPCLabel());
3171 if(IsLabelUsed(labelArray,label)) continue;
3172 labelArray.AddAt(label,labelCounter);
3175 if (mcLabel != TMath::Abs(label)) continue;
3176 if(mcLabel != label) continue;
3178 TParticle *particle = stack->Particle(label);
3179 if(!particle) continue;
3180 Int_t pdgcode = particle->GetPdgCode();
3181 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3182 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3183 if(fProtonAnalysisBase->GetEtaMode()) {
3184 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3187 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3189 if(fUseCutsInEfficiency)
3190 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;
3192 //reconstructed primary (anti)protons
3193 if(pdgcode == 2212) {
3194 if(label <= stack->GetNprimary()) {
3195 if(fProtonAnalysisBase->GetEtaMode())
3196 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3199 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3204 if(label > stack->GetNprimary()) {
3205 Int_t lPartMother = -1;
3206 Int_t motherPDGCode = -1;
3207 lPartMother = particle->GetFirstMother();
3208 TParticle *motherParticle = stack->Particle(lPartMother);
3209 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3211 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3212 if(fProtonAnalysisBase->GetEtaMode())
3213 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3216 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3221 if((particle->GetUniqueID() == 13)) {
3222 if(fProtonAnalysisBase->GetEtaMode())
3223 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3226 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3230 }//hadronic interactions
3233 if(pdgcode == -2212) {
3234 if(label <= stack->GetNprimary()) {
3235 if(fProtonAnalysisBase->GetEtaMode())
3236 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3239 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3244 if(label > stack->GetNprimary()) {
3245 Int_t lPartMother = -1;
3246 Int_t motherPDGCode = -1;
3247 lPartMother = particle->GetFirstMother();
3248 TParticle *motherParticle = stack->Particle(lPartMother);
3249 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3251 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3252 if(fProtonAnalysisBase->GetEtaMode())
3253 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3256 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3261 if((particle->GetUniqueID() == 13)) {
3262 if(fProtonAnalysisBase->GetEtaMode())
3263 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3266 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3270 }//hadronic interactions
3272 }//initial antiprotons
3275 Int_t label = TMath::Abs(track->GetLabel());
3276 if(IsLabelUsed(labelArray,label)) continue;
3277 labelArray.AddAt(label,labelCounter);
3280 if (mcLabel != TMath::Abs(label)) continue;
3281 if(mcLabel != label) continue;
3283 TParticle *particle = stack->Particle(label);
3284 if(!particle) continue;
3285 Int_t pdgcode = particle->GetPdgCode();
3286 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3287 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3288 if(fProtonAnalysisBase->GetEtaMode()) {
3289 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3292 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3294 //Double_t probability[5];
3296 if(fUseCutsInEfficiency)
3297 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;
3299 //reconstructed primary (anti)protons
3300 if(pdgcode == 2212) {
3301 if(label <= stack->GetNprimary()) {
3302 if(fProtonAnalysisBase->GetEtaMode())
3303 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3306 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3311 if(label > stack->GetNprimary()) {
3312 Int_t lPartMother = -1;
3313 Int_t motherPDGCode = -1;
3314 lPartMother = particle->GetFirstMother();
3315 TParticle *motherParticle = stack->Particle(lPartMother);
3316 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3318 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3319 if(fProtonAnalysisBase->GetEtaMode())
3320 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3323 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3328 if((particle->GetUniqueID() == 13)) {
3329 if(fProtonAnalysisBase->GetEtaMode())
3330 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3333 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3337 }//hadronic interactions
3340 if(pdgcode == -2212) {
3341 if(label <= stack->GetNprimary()) {
3342 if(fProtonAnalysisBase->GetEtaMode())
3343 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3346 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3351 if(label > stack->GetNprimary()) {
3352 Int_t lPartMother = -1;
3353 Int_t motherPDGCode = -1;
3354 lPartMother = particle->GetFirstMother();
3355 TParticle *motherParticle = stack->Particle(lPartMother);
3356 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3358 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3359 if(fProtonAnalysisBase->GetEtaMode())
3360 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3363 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3368 if((particle->GetUniqueID() == 13)) {
3369 if(fProtonAnalysisBase->GetEtaMode())
3370 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3373 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3377 }//hadronic interactions
3379 }//initial antiprotons
3383 }//loop over findable tracks
3385 labelMCArray.Reset();
3388 //____________________________________________________________________//
3389 void AliProtonQAAnalysis::RunPIDEfficiencyAnalysis(AliStack *const stack,
3391 const AliESDVertex *vertex) {
3392 Int_t nGoodTracks = esd->GetNumberOfTracks();
3393 TArrayI labelArray(nGoodTracks);
3394 Int_t labelCounter = 0;
3395 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3396 AliESDtrack* track = esd->GetTrack(iTracks);
3397 if(!track) continue;
3400 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3401 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3402 if(!tpcTrack) continue;
3405 Int_t label = TMath::Abs(track->GetLabel());
3406 if(IsLabelUsed(labelArray,label)) continue;
3407 labelArray.AddAt(label,labelCounter);
3410 TParticle *particle = stack->Particle(label);
3411 if(!particle) continue;
3412 Int_t pdgcode = particle->GetPdgCode();
3414 Int_t nTPCpoints = track->GetTPCsignalN();
3416 if(fUseCutsInEfficiency)
3417 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;
3419 if(TMath::Abs(pdgcode) == 2212) {
3420 if(fProtonAnalysisBase->GetEtaMode())
3421 ((TH3D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3422 particle->Pt(),nTPCpoints);
3424 ((TH3D *)(fEfficiencyList->At(12)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3428 if(fProtonAnalysisBase->IsProton(track)) {
3429 if(fProtonAnalysisBase->GetEtaMode())
3430 ((TH3D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3431 particle->Pt(),nTPCpoints);
3432 else ((TH3D *)(fEfficiencyList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3433 if(TMath::Abs(pdgcode) == 2212) {
3434 if(fProtonAnalysisBase->GetEtaMode())
3435 ((TH3D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3436 particle->Pt(),nTPCpoints);
3438 ((TH3D *)(fEfficiencyList->At(13)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3439 }//properly identified as proton
3441 if(fProtonAnalysisBase->GetEtaMode())
3442 ((TH3D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3443 particle->Pt(),nTPCpoints);
3445 ((TH3D *)(fEfficiencyList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3447 }//identified as proton
3452 //____________________________________________________________________//
3453 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *const stack,
3455 const AliESDVertex *vertex) {
3456 //Runs the efficiency code
3458 Int_t nMCProtons = 0, nESDProtons = 0;
3459 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3460 TParticle *particle = stack->Particle(iParticle);
3461 if(!particle) continue;
3463 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3464 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3465 if(fProtonAnalysisBase->GetEtaMode()) {
3466 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3469 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3471 Int_t pdgcode = particle->GetPdgCode();
3472 if(TMath::Abs(pdgcode) != 2212) continue;
3474 if(iParticle <= stack->GetNprimary()) {
3475 if(pdgcode == 2212) {
3477 if(fProtonAnalysisBase->GetEtaMode())
3478 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
3481 ((TH2D *)(fEfficiencyList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3486 if(pdgcode == -2212) {
3487 if(fProtonAnalysisBase->GetEtaMode())
3488 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
3491 ((TH2D *)(fEfficiencyList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3499 Int_t lPartMother = -1;
3500 Int_t motherPDGCode = -1;
3501 lPartMother = particle->GetFirstMother();
3502 TParticle *motherParticle = stack->Particle(lPartMother);
3503 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3505 if(pdgcode == 2212) {
3506 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3507 if(fProtonAnalysisBase->GetEtaMode())
3508 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3511 ((TH2D *)(fEfficiencyList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3516 if((particle->GetUniqueID() == 13)) {
3517 if(fProtonAnalysisBase->GetEtaMode())
3518 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3521 ((TH2D *)(fEfficiencyList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3525 }//hadronic interactions
3527 if(pdgcode == -2212) {
3528 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3529 if(fProtonAnalysisBase->GetEtaMode())
3530 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3533 ((TH2D *)(fEfficiencyList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3538 if((particle->GetUniqueID() == 13)) {
3539 if(fProtonAnalysisBase->GetEtaMode())
3540 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3543 ((TH2D *)(fEfficiencyList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3547 }//hadronic interactions
3554 Int_t nGoodTracks = esd->GetNumberOfTracks();
3555 TArrayI labelArray(nGoodTracks);
3556 Int_t labelCounter = 0;
3557 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3558 AliESDtrack* track = esd->GetTrack(iTracks);
3559 if(!track) continue;
3561 Int_t label = TMath::Abs(track->GetLabel());
3562 if(IsLabelUsed(labelArray,label)) continue;
3563 labelArray.AddAt(label,labelCounter);
3566 TParticle *particle = stack->Particle(label);
3567 if(!particle) continue;
3568 Int_t pdgcode = particle->GetPdgCode();
3569 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3571 Double_t gPt = 0.0, gP = 0.0;
3574 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3575 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3576 if(!tpcTrack) continue;
3577 gPt = tpcTrack->Pt();
3580 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3581 if(fProtonAnalysisBase->GetEtaMode()) {
3582 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3585 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3587 if(fUseCutsInEfficiency)
3588 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;
3590 //reconstructed primary (anti)protons
3591 if(pdgcode == 2212) {
3592 if(label <= stack->GetNprimary()) {
3594 if(fProtonAnalysisBase->GetEtaMode())
3595 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3598 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3603 if(label > stack->GetNprimary()) {
3604 Int_t lPartMother = -1;
3605 Int_t motherPDGCode = -1;
3606 lPartMother = particle->GetFirstMother();
3607 TParticle *motherParticle = stack->Particle(lPartMother);
3608 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3610 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3611 if(fProtonAnalysisBase->GetEtaMode())
3612 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3615 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3620 if((particle->GetUniqueID() == 13)) {
3621 if(fProtonAnalysisBase->GetEtaMode())
3622 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3625 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3629 }//hadronic interactions
3632 if(pdgcode == -2212) {
3633 if(label <= stack->GetNprimary()) {
3634 if(fProtonAnalysisBase->GetEtaMode())
3635 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3638 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3643 if(label > stack->GetNprimary()) {
3644 Int_t lPartMother = -1;
3645 Int_t motherPDGCode = -1;
3646 lPartMother = particle->GetFirstMother();
3647 TParticle *motherParticle = stack->Particle(lPartMother);
3648 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3650 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3651 if(fProtonAnalysisBase->GetEtaMode())
3652 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3655 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3660 if((particle->GetUniqueID() == 13)) {
3661 if(fProtonAnalysisBase->GetEtaMode())
3662 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3665 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3669 }//hadronic interactions
3671 }//initial antiprotons
3674 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3675 if(fProtonAnalysisBase->GetEtaMode()) {
3676 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3679 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3682 if(fUseCutsInEfficiency)
3683 if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) continue;
3685 //reconstructed primary (anti)protons
3686 if(pdgcode == 2212) {
3687 if(label <= stack->GetNprimary()) {
3689 if(fProtonAnalysisBase->GetEtaMode())
3690 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3693 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3698 if(label > stack->GetNprimary()) {
3699 Int_t lPartMother = -1;
3700 Int_t motherPDGCode = -1;
3701 lPartMother = particle->GetFirstMother();
3702 TParticle *motherParticle = stack->Particle(lPartMother);
3703 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3705 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3706 if(fProtonAnalysisBase->GetEtaMode())
3707 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3710 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3715 if((particle->GetUniqueID() == 13)) {
3716 if(fProtonAnalysisBase->GetEtaMode())
3717 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3720 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3724 }//hadronic interactions
3727 if(pdgcode == -2212) {
3728 if(fProtonAnalysisBase->GetEtaMode())
3729 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3732 ((TH2D *)(fEfficiencyList->At(12)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3736 if(label <= stack->GetNprimary()) {
3737 if(fProtonAnalysisBase->GetEtaMode())
3738 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3741 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3746 if(label > stack->GetNprimary()) {
3747 Int_t lPartMother = -1;
3748 Int_t motherPDGCode = -1;
3749 lPartMother = particle->GetFirstMother();
3750 TParticle *motherParticle = stack->Particle(lPartMother);
3751 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3753 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3754 if(fProtonAnalysisBase->GetEtaMode())
3755 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3758 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3763 if((particle->GetUniqueID() == 13)) {
3764 if(fProtonAnalysisBase->GetEtaMode())
3765 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3768 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3772 }//hadronic interactions
3774 }//initial antiprotons
3778 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3781 //____________________________________________________________________//
3782 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3784 //Checks if the label is used already
3785 Bool_t status = kFALSE;
3786 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3787 if(labelArray.At(i) == label)
3794 //____________________________________________________________________//
3795 void AliProtonQAAnalysis::RunVertexQA(AliGenEventHeader *header,
3796 AliESDEvent *const esd) {
3797 //Runs the vertex QA
3799 TArrayF primaryVertex(3);
3800 header->PrimaryVertex(primaryVertex);
3802 //Int_t nPrimaries = stack->GetNprimary();
3803 ((TH1F *)(fQAVertexList->At(0)))->Fill(primaryVertex[2]);
3806 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
3808 Printf("ERROR: Could not retrieve the TPC vertex");
3811 if(vertexTPC->GetNContributors() > 0) {
3812 ((TH1F *)(fQAVertexList->At(1)))->Fill(primaryVertex[2]);
3813 ((TH2F *)(fQAVertexList->At(2)))->Fill(vertexTPC->GetXv(),
3814 vertexTPC->GetNContributors());
3815 ((TH2F *)(fQAVertexList->At(3)))->Fill(vertexTPC->GetYv(),
3816 vertexTPC->GetNContributors());
3817 ((TH2F *)(fQAVertexList->At(4)))->Fill(vertexTPC->GetZv(),
3818 vertexTPC->GetNContributors());
3819 ((TH1F *)(fQAVertexList->At(5)))->Fill((vertexTPC->GetXv()-primaryVertex[0])*10000.);
3820 ((TH1F *)(fQAVertexList->At(6)))->Fill((vertexTPC->GetYv()-primaryVertex[1])*10000.);
3821 ((TH1F *)(fQAVertexList->At(7)))->Fill((vertexTPC->GetZv()-primaryVertex[2])*10000.);
3822 ((TH1F *)(fQAVertexList->At(8)))->Fill(vertexTPC->GetXRes()*10000.);
3823 ((TH1F *)(fQAVertexList->At(9)))->Fill(vertexTPC->GetYRes()*10000.);
3824 ((TH1F *)(fQAVertexList->At(10)))->Fill(vertexTPC->GetZRes()*10000.);
3828 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
3830 Printf("ERROR: Could not retrieve the SPD vertex");
3833 if(vertexSPD->GetNContributors() > 0) {
3834 ((TH1F *)(fQAVertexList->At(11)))->Fill(primaryVertex[2]);
3835 ((TH2F *)(fQAVertexList->At(12)))->Fill(vertexSPD->GetXv(),
3836 vertexSPD->GetNContributors());
3837 ((TH2F *)(fQAVertexList->At(13)))->Fill(vertexSPD->GetYv(),
3838 vertexSPD->GetNContributors());
3839 ((TH2F *)(fQAVertexList->At(14)))->Fill(vertexSPD->GetZv(),
3840 vertexSPD->GetNContributors());
3841 ((TH1F *)(fQAVertexList->At(15)))->Fill((vertexSPD->GetXv()-primaryVertex[0])*10000.);
3842 ((TH1F *)(fQAVertexList->At(16)))->Fill((vertexSPD->GetYv()-primaryVertex[1])*10000.);
3843 ((TH1F *)(fQAVertexList->At(17)))->Fill((vertexSPD->GetZv()-primaryVertex[2])*10000.);
3844 ((TH1F *)(fQAVertexList->At(18)))->Fill(vertexSPD->GetXRes()*10000.);
3845 ((TH1F *)(fQAVertexList->At(19)))->Fill(vertexSPD->GetYRes()*10000.);
3846 ((TH1F *)(fQAVertexList->At(20)))->Fill(vertexSPD->GetZRes()*10000.);
3850 const AliESDVertex *vertexTracks = esd->GetPrimaryVertex();
3852 Printf("ERROR: Could not retrieve the Tracks vertex");
3855 if(vertexTracks->GetNContributors() > 0) {
3856 ((TH1F *)(fQAVertexList->At(21)))->Fill(primaryVertex[2]);
3857 ((TH2F *)(fQAVertexList->At(22)))->Fill(vertexTracks->GetXv(),
3858 vertexTracks->GetNContributors());
3859 ((TH2F *)(fQAVertexList->At(23)))->Fill(vertexTracks->GetYv(),
3860 vertexTracks->GetNContributors());
3861 ((TH2F *)(fQAVertexList->At(24)))->Fill(vertexTracks->GetZv(),
3862 vertexTracks->GetNContributors());
3863 ((TH1F *)(fQAVertexList->At(25)))->Fill((vertexTracks->GetXv()-primaryVertex[0])*10000.);
3864 ((TH1F *)(fQAVertexList->At(26)))->Fill((vertexTracks->GetYv()-primaryVertex[1])*10000.);
3865 ((TH1F *)(fQAVertexList->At(27)))->Fill((vertexTracks->GetZv()-primaryVertex[2])*10000.);
3866 ((TH1F *)(fQAVertexList->At(28)))->Fill(vertexTracks->GetXRes()*10000.);
3867 ((TH1F *)(fQAVertexList->At(29)))->Fill(vertexTracks->GetYRes()*10000.);
3868 ((TH1F *)(fQAVertexList->At(30)))->Fill(vertexTracks->GetZRes()*10000.);
3873 //____________________________________________________________________//
3874 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
3876 const AliESDVertex *vertex) {
3879 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3880 TParticle *particle = stack->Particle(iParticle);
3881 if(!particle) continue;
3883 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3884 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3885 if(fProtonAnalysisBase->GetEtaMode()) {
3886 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3889 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3891 Int_t pdgcode = particle->GetPdgCode();
3892 if(pdgcode == 2212) {
3893 if(fProtonAnalysisBase->GetEtaMode())
3894 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
3897 ((TH2D *)(fQA2DList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3902 if(pdgcode == -2212) {
3903 if(fProtonAnalysisBase->GetEtaMode())
3904 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
3907 ((TH2D *)(fQA2DList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3915 Int_t nGoodTracks = esd->GetNumberOfTracks();
3916 TArrayI labelArray(nGoodTracks);
3917 Int_t labelCounter = 0;
3918 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3919 AliESDtrack* track = esd->GetTrack(iTracks);
3920 if(!track) continue;
3922 Int_t label = TMath::Abs(track->GetLabel());
3923 if(IsLabelUsed(labelArray,label)) continue;
3924 labelArray.AddAt(label,labelCounter);
3927 TParticle *particle = stack->Particle(label);
3928 if(!particle) continue;
3929 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3931 AliESDtrack trackTPC;
3933 //in case it's a TPC only track relate it to the proper vertex
3934 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)&&(!fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3935 //if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3936 Float_t p[2],cov[3];
3937 track->GetImpactParametersTPC(p,cov);
3938 if (p[0]==0 && p[1]==0)
3939 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3940 if (!track->FillTPCOnlyTrack(trackTPC)) {
3946 Double_t gPt = 0.0, gP = 0.0;
3947 //Double_t probability[5];
3948 Float_t dcaXY = 0.0, dcaZ = 0.0;
3949 Double_t nSigmaToVertex = fProtonAnalysisBase->GetSigmaToVertex(track);
3951 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3952 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
3954 Float_t chi2PerClusterITS = -1;
3955 if (nClustersITS!=0)
3956 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3957 Float_t chi2PerClusterTPC = -1;
3958 if (nClustersTPC!=0)
3959 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3960 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3961 Double_t extCov[15];
3962 track->GetExternalCovariance(extCov);
3963 Int_t npointsTPCdEdx = track->GetTPCsignalN();
3966 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3967 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3968 if(!tpcTrack) continue;
3969 gPt = tpcTrack->Pt();
3971 if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)
3972 track->GetImpactParameters(dcaXY,dcaZ);
3973 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3976 if(fProtonAnalysisBase->IsProton(track)) {
3977 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3979 FillQA(stack,esd,vertex,track);
3980 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
3981 if(label <= stack->GetNprimary()) {
3982 if(track->Charge() > 0) {
3983 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3984 if(track->HasPointOnITSLayer(iLayer))
3985 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3987 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3988 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3989 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3990 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3991 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3992 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3993 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3994 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3995 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3996 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
3997 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(tpcTrack->Eta(),
3998 tpcTrack->Phi()*180./TMath::Pi(),
4000 ((TH3D *)(fAcceptedCutList->At(48)))->Fill(tpcTrack->Eta(),
4001 tpcTrack->Phi()*180./TMath::Pi(),
4003 ((TH3D *)(fAcceptedCutList->At(52)))->Fill(tpcTrack->Eta(),
4004 tpcTrack->Phi()*180./TMath::Pi(),
4006 ((TH1D *)(fAcceptedCutList->At(56)))->Fill(npointsTPCdEdx);
4008 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
4009 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
4010 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
4011 if(fProtonAnalysisBase->GetEtaMode())
4012 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),gPt);
4014 ((TH2D *)(fQA2DList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4018 }//accepted primary protons
4019 else if(track->Charge() < 0) {
4020 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4021 if(track->HasPointOnITSLayer(iLayer))
4022 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
4024 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
4025 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
4026 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
4027 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
4028 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
4029 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
4030 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
4031 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
4032 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
4033 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
4034 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(tpcTrack->Eta(),
4035 tpcTrack->Phi()*180./TMath::Pi(),
4037 ((TH3D *)(fAcceptedCutList->At(49)))->Fill(tpcTrack->Eta(),
4038 tpcTrack->Phi()*180./TMath::Pi(),
4040 ((TH3D *)(fAcceptedCutList->At(53)))->Fill(tpcTrack->Eta(),
4041 tpcTrack->Phi()*180./TMath::Pi(),
4043 ((TH1D *)(fAcceptedCutList->At(57)))->Fill(npointsTPCdEdx);
4045 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
4046 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
4047 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
4048 if(fProtonAnalysisBase->GetEtaMode())
4049 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),gPt);
4051 ((TH2D *)(fQA2DList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4055 }//accepted primary antiprotons
4056 }//accepted primary particles
4057 else if(label > stack->GetNprimary()) {
4058 Int_t lPartMother = -1;
4059 Int_t motherPDGCode = -1;
4061 lPartMother = particle->GetFirstMother();
4062 TParticle *motherParticle = stack->Particle(lPartMother);
4063 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4066 if(fMCProcessIdFlag)
4067 if(particle->GetUniqueID() != fMCProcessId) continue;
4068 if(fMotherParticlePDGCodeFlag)
4069 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4071 if(track->Charge() > 0) {
4072 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4073 if(track->HasPointOnITSLayer(iLayer))
4074 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
4076 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
4077 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
4078 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
4079 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
4080 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
4081 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
4082 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
4083 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
4084 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
4085 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
4086 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(tpcTrack->Eta(),
4087 tpcTrack->Phi()*180./TMath::Pi(),
4089 ((TH3D *)(fAcceptedCutList->At(50)))->Fill(tpcTrack->Eta(),
4090 tpcTrack->Phi()*180./TMath::Pi(),
4092 ((TH3D *)(fAcceptedCutList->At(54)))->Fill(tpcTrack->Eta(),
4093 tpcTrack->Phi()*180./TMath::Pi(),
4095 ((TH1D *)(fAcceptedCutList->At(58)))->Fill(npointsTPCdEdx);
4097 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
4098 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
4099 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
4100 if(fProtonAnalysisBase->GetEtaMode())
4101 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),gPt);
4103 ((TH2D *)(fQA2DList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4107 if(fProtonAnalysisBase->GetEtaMode())
4108 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),gPt,
4109 ConvertPDGToInt(motherPDGCode));
4111 ((TH3F *)(fQA2DList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4115 ConvertPDGToInt(motherPDGCode));
4116 }//accepted secondary protons
4117 else if(track->Charge() < 0) {
4118 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4119 if(track->HasPointOnITSLayer(iLayer))
4120 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
4122 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
4123 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
4124 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
4125 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
4126 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
4127 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
4128 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
4129 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
4130 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
4131 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
4132 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(tpcTrack->Eta(),
4133 tpcTrack->Phi()*180./TMath::Pi(),
4135 ((TH3D *)(fAcceptedCutList->At(51)))->Fill(tpcTrack->Eta(),
4136 tpcTrack->Phi()*180./TMath::Pi(),
4138 ((TH3D *)(fAcceptedCutList->At(55)))->Fill(tpcTrack->Eta(),
4139 tpcTrack->Phi()*180./TMath::Pi(),
4141 ((TH1F *)(fAcceptedCutList->At(59)))->Fill(npointsTPCdEdx);
4143 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
4144 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
4145 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
4146 if(fProtonAnalysisBase->GetEtaMode())
4147 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),gPt);
4149 ((TH2D *)(fQA2DList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4153 if(fProtonAnalysisBase->GetEtaMode())
4154 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),gPt,
4155 ConvertPDGToInt(motherPDGCode));
4157 ((TH3F *)(fQA2DList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4161 ConvertPDGToInt(motherPDGCode));
4162 }//accepted secondary antiprotons
4163 }//accepted secondary particles
4164 }//accepted - track cuts
4166 if(label <= stack->GetNprimary()) {
4167 if(track->Charge() > 0) {
4168 ((TH3D *)(fRejectedCutList->At(0)))->Fill(tpcTrack->Eta(),
4169 tpcTrack->Phi()*180./TMath::Pi(),
4171 ((TH3D *)(fRejectedCutList->At(4)))->Fill(tpcTrack->Eta(),
4172 tpcTrack->Phi()*180./TMath::Pi(),
4174 ((TH3D *)(fRejectedCutList->At(8)))->Fill(tpcTrack->Eta(),
4175 tpcTrack->Phi()*180./TMath::Pi(),
4178 if(fProtonAnalysisBase->GetEtaMode())
4179 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),gPt);
4181 ((TH2D *)(fQA2DList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4186 else if(track->Charge() < 0) {
4187 ((TH3D *)(fRejectedCutList->At(1)))->Fill(tpcTrack->Eta(),
4188 tpcTrack->Phi()*180./TMath::Pi(),
4190 ((TH3D *)(fRejectedCutList->At(5)))->Fill(tpcTrack->Eta(),
4191 tpcTrack->Phi()*180./TMath::Pi(),
4193 ((TH3D *)(fRejectedCutList->At(9)))->Fill(tpcTrack->Eta(),
4194 tpcTrack->Phi()*180./TMath::Pi(),
4196 if(fProtonAnalysisBase->GetEtaMode())
4197 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),gPt);
4199 ((TH2D *)(fQA2DList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4204 }//rejected primary particles
4205 else if(label > stack->GetNprimary()) {
4206 if(track->Charge() > 0) {
4207 ((TH3D *)(fRejectedCutList->At(2)))->Fill(tpcTrack->Eta(),
4208 tpcTrack->Phi()*180./TMath::Pi(),
4210 ((TH3D *)(fRejectedCutList->At(6)))->Fill(tpcTrack->Eta(),
4211 tpcTrack->Phi()*180./TMath::Pi(),
4213 ((TH3D *)(fRejectedCutList->At(10)))->Fill(tpcTrack->Eta(),
4214 tpcTrack->Phi()*180./TMath::Pi(),
4216 if(fProtonAnalysisBase->GetEtaMode())
4217 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),gPt);
4219 ((TH2D *)(fQA2DList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4224 else if(track->Charge() < 0) {
4225 ((TH3D *)(fRejectedCutList->At(3)))->Fill(tpcTrack->Eta(),
4226 tpcTrack->Phi()*180./TMath::Pi(),
4228 ((TH3D *)(fRejectedCutList->At(7)))->Fill(tpcTrack->Eta(),
4229 tpcTrack->Phi()*180./TMath::Pi(),
4231 ((TH3D *)(fRejectedCutList->At(11)))->Fill(tpcTrack->Eta(),
4232 tpcTrack->Phi()*180./TMath::Pi(),
4235 if(fProtonAnalysisBase->GetEtaMode())
4236 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),gPt);
4238 ((TH2D *)(fQA2DList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4243 }//rejected secondary particles
4244 }//rejected - track cuts
4251 track->GetImpactParameters(dcaXY,dcaZ);
4254 if(fProtonAnalysisBase->IsProton(track)) {
4255 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
4257 FillQA(stack,esd,vertex,track);
4258 if(fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
4259 if(label <= stack->GetNprimary()) {
4260 if(track->Charge() > 0) {
4261 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4262 if(track->HasPointOnITSLayer(iLayer))
4263 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
4265 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
4266 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
4267 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
4268 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
4269 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
4270 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
4271 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
4272 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
4273 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
4274 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
4275 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(track->Eta(),
4276 track->Phi()*180./TMath::Pi(),
4278 ((TH3D *)(fAcceptedCutList->At(48)))->Fill(track->Eta(),
4279 track->Phi()*180./TMath::Pi(),
4281 ((TH3D *)(fAcceptedCutList->At(52)))->Fill(track->Eta(),
4282 track->Phi()*180./TMath::Pi(),
4284 ((TH1F *)(fAcceptedCutList->At(56)))->Fill(npointsTPCdEdx);
4286 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
4287 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
4288 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
4289 if(fProtonAnalysisBase->GetEtaMode())
4290 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),gPt);
4292 ((TH2D *)(fQA2DList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4297 else if(track->Charge() < 0) {
4298 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4299 if(track->HasPointOnITSLayer(iLayer))
4300 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
4302 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
4303 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
4304 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
4305 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
4306 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
4307 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
4308 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
4309 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
4310 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
4311 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
4312 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(track->Eta(),
4313 track->Phi()*180./TMath::Pi(),
4315 ((TH3D *)(fAcceptedCutList->At(49)))->Fill(track->Eta(),
4316 track->Phi()*180./TMath::Pi(),
4318 ((TH3D *)(fAcceptedCutList->At(53)))->Fill(track->Eta(),
4319 track->Phi()*180./TMath::Pi(),
4321 ((TH1F *)(fAcceptedCutList->At(57)))->Fill(npointsTPCdEdx);
4323 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
4324 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
4325 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
4326 if(fProtonAnalysisBase->GetEtaMode())
4327 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),gPt);
4329 ((TH2D *)(fQA2DList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4334 }//primary particles
4335 else if(label > stack->GetNprimary()) {
4336 Int_t lPartMother = -1;
4337 Int_t motherPDGCode = -1;
4339 lPartMother = particle->GetFirstMother();
4340 TParticle *motherParticle = stack->Particle(lPartMother);
4341 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4344 if(fMCProcessIdFlag)
4345 if(particle->GetUniqueID() != fMCProcessId) continue;
4346 if(fMotherParticlePDGCodeFlag)
4347 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4349 if(track->Charge() > 0) {
4350 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4351 if(track->HasPointOnITSLayer(iLayer))
4352 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
4354 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
4355 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
4356 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
4357 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
4358 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
4359 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
4360 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
4361 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
4362 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
4363 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
4364 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(track->Eta(),
4365 track->Phi()*180./TMath::Pi(),
4367 ((TH3D *)(fAcceptedCutList->At(50)))->Fill(track->Eta(),
4368 track->Phi()*180./TMath::Pi(),
4370 ((TH3D *)(fAcceptedCutList->At(54)))->Fill(track->Eta(),
4371 track->Phi()*180./TMath::Pi(),
4373 ((TH1F *)(fAcceptedCutList->At(58)))->Fill(npointsTPCdEdx);
4375 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
4376 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
4377 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
4378 if(fProtonAnalysisBase->GetEtaMode())
4379 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),gPt);
4381 ((TH2D *)(fQA2DList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4385 if(fProtonAnalysisBase->GetEtaMode())
4386 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),gPt,
4387 ConvertPDGToInt(motherPDGCode));
4389 ((TH3F *)(fQA2DList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4393 ConvertPDGToInt(motherPDGCode));
4395 else if(track->Charge() < 0) {
4396 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4397 if(track->HasPointOnITSLayer(iLayer))
4398 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
4400 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
4401 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
4402 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
4403 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
4404 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
4405 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
4406 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
4407 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
4408 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
4409 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
4410 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(track->Eta(),
4411 track->Phi()*180./TMath::Pi(),
4413 ((TH3D *)(fAcceptedCutList->At(51)))->Fill(track->Eta(),
4414 track->Phi()*180./TMath::Pi(),
4416 ((TH3D *)(fAcceptedCutList->At(55)))->Fill(track->Eta(),
4417 track->Phi()*180./TMath::Pi(),
4419 ((TH1F *)(fAcceptedCutList->At(59)))->Fill(npointsTPCdEdx);
4421 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
4422 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
4423 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
4424 if(fProtonAnalysisBase->GetEtaMode())
4425 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),gPt);
4427 ((TH2D *)(fQA2DList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4431 if(fProtonAnalysisBase->GetEtaMode())
4432 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),gPt,
4433 ConvertPDGToInt(motherPDGCode));
4435 ((TH3F *)(fQA2DList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4439 ConvertPDGToInt(motherPDGCode));
4441 }//secondary particles
4442 }//accepted - track cuts
4443 else if(!fProtonAnalysisBase->IsAccepted(esd,vertex,track)) {
4444 if(label <= stack->GetNprimary()) {
4445 if(track->Charge() > 0) {
4446 ((TH3D *)(fRejectedCutList->At(0)))->Fill(track->Eta(),
4447 track->Phi()*180./TMath::Pi(),
4449 ((TH3D *)(fRejectedCutList->At(4)))->Fill(track->Eta(),
4450 track->Phi()*180./TMath::Pi(),
4452 ((TH3D *)(fRejectedCutList->At(8)))->Fill(track->Eta(),
4453 track->Phi()*180./TMath::Pi(),
4455 if(fProtonAnalysisBase->GetEtaMode())
4456 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),gPt);
4458 ((TH2D *)(fQA2DList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4463 else if(track->Charge() < 0) {
4464 ((TH3D *)(fRejectedCutList->At(1)))->Fill(track->Eta(),
4465 track->Phi()*180./TMath::Pi(),
4467 ((TH3D *)(fRejectedCutList->At(5)))->Fill(track->Eta(),
4468 track->Phi()*180./TMath::Pi(),
4470 ((TH3D *)(fRejectedCutList->At(9)))->Fill(track->Eta(),
4471 track->Phi()*180./TMath::Pi(),
4474 if(fProtonAnalysisBase->GetEtaMode())
4475 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),gPt);
4477 ((TH2D *)(fQA2DList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4482 }//primary particles
4483 else if(label > stack->GetNprimary()) {
4484 if(track->Charge() > 0) {
4485 ((TH3D *)(fRejectedCutList->At(2)))->Fill(track->Eta(),
4486 track->Phi()*180./TMath::Pi(),
4488 ((TH3D *)(fRejectedCutList->At(6)))->Fill(track->Eta(),
4489 track->Phi()*180./TMath::Pi(),
4491 ((TH3D *)(fRejectedCutList->At(10)))->Fill(track->Eta(),
4492 track->Phi()*180./TMath::Pi(),
4494 if(fProtonAnalysisBase->GetEtaMode())
4495 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),gPt);
4497 ((TH2D *)(fQA2DList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4502 else if(track->Charge() < 0) {
4503 ((TH3D *)(fRejectedCutList->At(3)))->Fill(track->Eta(),
4504 track->Phi()*180./TMath::Pi(),
4506 ((TH3D *)(fRejectedCutList->At(7)))->Fill(track->Eta(),
4507 track->Phi()*180./TMath::Pi(),
4509 ((TH3D *)(fRejectedCutList->At(11)))->Fill(track->Eta(),
4510 track->Phi()*180./TMath::Pi(),
4512 if(fProtonAnalysisBase->GetEtaMode())
4513 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),gPt);
4515 ((TH2D *)(fQA2DList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4520 }//secondary particles
4521 }//rejected - track cuts
4523 }//combined tracking
4528 //____________________________________________________________________//
4529 void AliProtonQAAnalysis::InitMCAnalysis() {
4530 //MC analysis - 3D histograms: y-pT-pdg
4531 fPDGList = new TList();
4532 TH3F *gHistYPtPDGProtons = 0x0;
4533 if(fUseAsymmetricBinning) {
4534 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
4535 gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
4536 ";;P_{T} [GeV/c];PDG",
4537 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
4540 gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
4541 ";;P_{T} [GeV/c];PDG",
4542 fNBinsY,fMinY,fMaxY,
4543 fNBinsPt,fMinPt,fMaxPt,
4545 if(fProtonAnalysisBase->GetEtaMode())
4546 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
4548 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
4549 fPDGList->Add(gHistYPtPDGProtons);
4550 TH3F *gHistYPtPDGAntiProtons = 0x0;
4551 if(fUseAsymmetricBinning) {
4552 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
4553 gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
4554 ";;P_{T} [GeV/c];PDG",
4555 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
4558 gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
4559 ";;P_{T} [GeV/c];PDG",
4560 fNBinsY,fMinY,fMaxY,
4561 fNBinsPt,fMinPt,fMaxPt,
4563 if(fProtonAnalysisBase->GetEtaMode())
4564 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
4566 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
4567 fPDGList->Add(gHistYPtPDGAntiProtons);
4570 fMCProcessesList = new TList();
4571 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
4572 fMCProcessesList->Add(gHistProtonsFromKLProcess);
4573 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
4574 fMCProcessesList->Add(gHistProtonsFromPionProcess);
4575 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
4576 fMCProcessesList->Add(gHistProtonsFromKSProcess);
4577 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
4578 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
4579 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
4580 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
4581 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
4582 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
4583 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
4584 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
4585 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
4586 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
4587 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4588 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
4589 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
4590 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
4591 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
4592 fMCProcessesList->Add(gHistProtonsFromXi0Process);
4593 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
4594 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
4596 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
4597 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
4598 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
4599 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
4600 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
4601 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
4602 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
4603 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
4604 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
4605 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
4606 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
4607 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
4608 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
4609 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
4610 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4611 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
4614 //____________________________________________________________________//
4615 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* const stack) {
4616 //Main analysis part - MC
4617 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
4618 TParticle *particle = stack->Particle(iParticle);
4619 if(!particle) continue;
4621 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
4622 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
4623 if(fProtonAnalysisBase->GetEtaMode()) {
4624 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
4627 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4630 Int_t pdgcode = particle->GetPdgCode();
4631 if(pdgcode == 2212) {
4632 if(iParticle <= stack->GetNprimary()) {
4633 if(fProtonAnalysisBase->GetEtaMode())
4634 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
4636 ((TH3F *)(fPDGList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4641 else if(iParticle > stack->GetNprimary()) {
4642 Int_t lPartMother = particle->GetFirstMother();
4643 TParticle *motherParticle = stack->Particle(lPartMother);
4644 if(!motherParticle) continue;
4645 Int_t motherPDGCode = motherParticle->GetPdgCode();
4646 if(fMCProcessIdFlag)
4647 if(particle->GetUniqueID() != fMCProcessId) continue;
4648 if(fMotherParticlePDGCodeFlag)
4649 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4651 if(fProtonAnalysisBase->GetEtaMode())
4652 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
4654 ConvertPDGToInt(motherParticle->GetPdgCode()));
4656 ((TH3F *)(fPDGList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4660 ConvertPDGToInt(motherParticle->GetPdgCode()));
4662 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4663 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
4664 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4665 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
4666 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4667 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
4668 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4669 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
4670 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4671 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
4672 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4673 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
4674 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
4675 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
4676 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4677 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
4678 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4679 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
4680 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
4681 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
4682 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
4683 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
4684 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
4685 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
4687 }//pdgcode of proton
4689 if(pdgcode == -2212) {
4690 if(iParticle <= stack->GetNprimary()) {
4691 if(fProtonAnalysisBase->GetEtaMode())
4692 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
4694 ((TH3F *)(fPDGList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4699 else if(iParticle > stack->GetNprimary()) {
4700 Int_t lPartMother = particle->GetFirstMother();
4701 TParticle *motherParticle = stack->Particle(lPartMother);
4702 if(!motherParticle) continue;
4703 Int_t motherPDGCode = motherParticle->GetPdgCode();
4704 if(fMCProcessIdFlag)
4705 if(particle->GetUniqueID() != fMCProcessId) continue;
4706 if(fMotherParticlePDGCodeFlag)
4707 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4709 if(fProtonAnalysisBase->GetEtaMode())
4710 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
4712 ConvertPDGToInt(motherParticle->GetPdgCode()));
4714 ((TH3F *)(fPDGList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4718 ConvertPDGToInt(motherParticle->GetPdgCode()));
4721 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4722 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
4723 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4724 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
4725 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4726 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
4727 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4728 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
4729 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4730 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
4731 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4732 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
4733 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4734 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
4735 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4736 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
4737 }//secondary antiproton
4738 }//pdgcode of antiproton
4743 //____________________________________________________________________//
4744 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) const {
4745 //Converts the pdg code to an int based on the following scheme:
4746 //1: PDG code: 130 - Name: K_L0
4747 //2: PDG code: 211 - Name: pi+
4748 //3: PDG code: 310 - Name: K_S0
4749 //4: PDG code: 321 - Name: K+
4750 //5: PDG code: 2112 - Name: neutron
4751 //6: PDG code: 2212 - Name: proton
4752 //7: PDG code: 3112 - Name: Sigma-
4753 //8: PDG code: 3122 - Name: Lambda0
4754 //9: PDG code: 3222 - Name: Sigma+
4755 //10: PDG code: 3312 - Name: Xi-
4756 //11: PDG code: 3322 - Name: Xi0
4757 //12: PDG code: 3334 - Name: Omega-
4759 switch (TMath::Abs(pdgCode)) {