]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/AliProtonQAAnalysis.cxx
Adding more QA histograms: eta vs phi vs Nclusters
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliProtonQAAnalysis.cxx
CommitLineData
3e6c06f4 1/**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
4 * *
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 **************************************************************************/
13
14/* $Id: AliProtonQAAnalysis.cxx 29114 2008-10-03 16:49:02Z pchrist $ */
15
16//-----------------------------------------------------------------
17// AliProtonQAAnalysis class
18// This is the class to deal with the proton analysis
dd3fa486 19// Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
3e6c06f4 20//-----------------------------------------------------------------
21#include <Riostream.h>
22#include <TFile.h>
23#include <TSystem.h>
24#include <TF1.h>
25#include <TH2D.h>
d4733690 26#include <TH3F.h>
3e6c06f4 27#include <TH1D.h>
9c0b9f24 28#include <TArrayI.h>
3e6c06f4 29#include <TParticle.h>
30
31#include "AliProtonQAAnalysis.h"
32
33#include <AliExternalTrackParam.h>
34#include <AliESDEvent.h>
35#include <AliLog.h>
36#include <AliPID.h>
37#include <AliStack.h>
6667f3a7 38#include <AliESDVertex.h>
75decd62 39#include <AliGenEventHeader.h>
3e6c06f4 40
41ClassImp(AliProtonQAAnalysis)
42
43//____________________________________________________________________//
44AliProtonQAAnalysis::AliProtonQAAnalysis() :
dd3fa486 45 TObject(), fAnalysisEtaMode(kFALSE),
3e6c06f4 46 fNBinsY(0), fMinY(0), fMaxY(0),
47 fNBinsPt(0), fMinPt(0), fMaxPt(0),
48 fMinTPCClusters(0), fMinITSClusters(0),
49 fMaxChi2PerTPCCluster(0), fMaxChi2PerITSCluster(0),
50 fMaxCov11(0), fMaxCov22(0), fMaxCov33(0), fMaxCov44(0), fMaxCov55(0),
51 fMaxSigmaToVertex(0), fMaxSigmaToVertexTPC(0),
52 fMaxDCAXY(0), fMaxDCAXYTPC(0),
53 fMaxDCAZ(0), fMaxDCAZTPC(0),
54 fMaxConstrainChi2(0),
55 fMinTPCClustersFlag(kFALSE), fMinITSClustersFlag(kFALSE),
56 fMaxChi2PerTPCClusterFlag(kFALSE), fMaxChi2PerITSClusterFlag(kFALSE),
57 fMaxCov11Flag(kFALSE), fMaxCov22Flag(kFALSE),
58 fMaxCov33Flag(kFALSE), fMaxCov44Flag(kFALSE), fMaxCov55Flag(kFALSE),
59 fMaxSigmaToVertexFlag(kFALSE), fMaxSigmaToVertexTPCFlag(kFALSE),
60 fMaxDCAXYFlag(kFALSE), fMaxDCAXYTPCFlag(kFALSE),
61 fMaxDCAZFlag(kFALSE), fMaxDCAZTPCFlag(kFALSE),
62 fMaxConstrainChi2Flag(kFALSE),
63 fITSRefitFlag(kFALSE), fTPCRefitFlag(kFALSE),
64 fESDpidFlag(kFALSE), fTPCpidFlag(kFALSE),
0008a5a6 65 fPointOnITSLayer1Flag(0), fPointOnITSLayer2Flag(0),
66 fPointOnITSLayer3Flag(0), fPointOnITSLayer4Flag(0),
67 fPointOnITSLayer5Flag(0), fPointOnITSLayer6Flag(0),
75decd62 68 fGlobalQAList(0), fQAVertexList(0), fQA2DList(0),
3e6c06f4 69 fQAPrimaryProtonsAcceptedList(0),
70 fQAPrimaryProtonsRejectedList(0),
71 fQASecondaryProtonsAcceptedList(0),
72 fQASecondaryProtonsRejectedList(0),
73 fQAPrimaryAntiProtonsAcceptedList(0),
74 fQAPrimaryAntiProtonsRejectedList(0),
75 fQASecondaryAntiProtonsAcceptedList(0),
76 fQASecondaryAntiProtonsRejectedList(0),
77 fFunctionProbabilityFlag(kFALSE),
78 fElectronFunction(0), fMuonFunction(0),
79 fPionFunction(0), fKaonFunction(0), fProtonFunction(0),
0326e385 80 fUseTPCOnly(kFALSE), fUseHybridTPC(kFALSE),
d4733690 81 fPDGList(0), fMCProcessesList(0),
5b8133c7 82 fRunMCAnalysis(kFALSE),
83 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
84 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
85 fAcceptedCutList(0), fRejectedCutList(0),
9c0b9f24 86 fAcceptedDCAList(0), fRejectedDCAList(0),
dd3fa486 87 fRunEfficiencyAnalysis(kFALSE),
e13bbda6 88 fUseCutsInEfficiency(kFALSE),
89 fEfficiencyList(0) {
3e6c06f4 90 //Default constructor
91 for(Int_t i = 0; i < 5; i++) fPartFrac[i] = 0.0;
92}
93
94//____________________________________________________________________//
95AliProtonQAAnalysis::~AliProtonQAAnalysis() {
96 //Default destructor
97 if(fGlobalQAList) delete fGlobalQAList;
75decd62 98 if(fQAVertexList) delete fQAVertexList;
3e6c06f4 99 if(fQA2DList) delete fQA2DList;
100 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
101 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
102 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
103 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
104 if(fQAPrimaryAntiProtonsAcceptedList)
105 delete fQAPrimaryAntiProtonsAcceptedList;
106 if(fQAPrimaryAntiProtonsRejectedList)
107 delete fQAPrimaryAntiProtonsRejectedList;
108 if(fQASecondaryAntiProtonsAcceptedList)
109 delete fQASecondaryAntiProtonsAcceptedList;
110 if(fQASecondaryAntiProtonsRejectedList)
111 delete fQASecondaryAntiProtonsRejectedList;
d4733690 112
113 if(fPDGList) delete fPDGList;
114 if(fMCProcessesList) delete fMCProcessesList;
5b8133c7 115
116 if(fAcceptedCutList) delete fAcceptedCutList;
117 if(fRejectedCutList) delete fRejectedCutList;
118 if(fAcceptedDCAList) delete fAcceptedDCAList;
119 if(fRejectedDCAList) delete fRejectedDCAList;
9c0b9f24 120
121 if(fEfficiencyList) delete fEfficiencyList;
3e6c06f4 122}
123
124//____________________________________________________________________//
125Double_t AliProtonQAAnalysis::GetParticleFraction(Int_t i, Double_t p) {
126 Double_t partFrac=0;
127 if(fFunctionProbabilityFlag) {
128 if(i == 0) partFrac = fElectronFunction->Eval(p);
129 if(i == 1) partFrac = fMuonFunction->Eval(p);
130 if(i == 2) partFrac = fPionFunction->Eval(p);
131 if(i == 3) partFrac = fKaonFunction->Eval(p);
132 if(i == 4) partFrac = fProtonFunction->Eval(p);
133 }
134 else partFrac = fPartFrac[i];
135
136 return partFrac;
137}
138
3e23254a 139//____________________________________________________________________//
75decd62 140Bool_t AliProtonQAAnalysis::IsInPhaseSpace(AliESDtrack* const track) {
3e23254a 141 // Checks if the track is outside the analyzed y-Pt phase space
75decd62 142 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
dd3fa486 143 Double_t eta = 0.0;
144
3e23254a 145 if(fUseTPCOnly) {
146 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
147 if(!tpcTrack) {
75decd62 148 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0; eta = -10.0;
3e23254a 149 }
150 else {
75decd62 151 gPt = tpcTrack->Pt();
152 gPx = tpcTrack->Px();
153 gPy = tpcTrack->Py();
154 gPz = tpcTrack->Pz();
dd3fa486 155 eta = tpcTrack->Eta();
3e23254a 156 }
157 }
158 else {
75decd62 159 gPt = track->Pt();
160 gPx = track->Px();
161 gPy = track->Py();
162 gPz = track->Pz();
dd3fa486 163 eta = track->Eta();
3e23254a 164 }
165
75decd62 166 if((gPt < fMinPt) || (gPt > fMaxPt)) return kFALSE;
dd3fa486 167 if(fAnalysisEtaMode) {
168 if((eta < fMinY) || (eta > fMaxY))
169 return kFALSE;
170 }
171 else {
75decd62 172 if((Rapidity(gPx,gPy,gPz) < fMinY) || (Rapidity(gPx,gPy,gPz) > fMaxY))
dd3fa486 173 return kFALSE;
174 }
3e23254a 175
176 return kTRUE;
177}
178
5b8133c7 179//____________________________________________________________________//
6667f3a7 180Bool_t AliProtonQAAnalysis::IsAccepted(AliESDEvent *esd,
181 const AliESDVertex *vertex,
182 AliESDtrack* track) {
5b8133c7 183 // Checks if the track is excluded from the cuts
75decd62 184 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
6667f3a7 185 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
186
0326e385 187 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
5b8133c7 188 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
189 if(!tpcTrack) {
75decd62 190 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
6667f3a7 191 dca[0] = -100.; dca[1] = -100.;
192 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
5b8133c7 193 }
194 else {
75decd62 195 gPt = tpcTrack->Pt();
196 gPx = tpcTrack->Px();
197 gPy = tpcTrack->Py();
198 gPz = tpcTrack->Pz();
6667f3a7 199 tpcTrack->PropagateToDCA(vertex,
200 esd->GetMagneticField(),
201 100.,dca,cov);
5b8133c7 202 }
203 }
0326e385 204 else if(fUseHybridTPC) {
205 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3e6c06f4 206 if(!tpcTrack) {
75decd62 207 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
6667f3a7 208 dca[0] = -100.; dca[1] = -100.;
209 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
3e6c06f4 210 }
211 else {
75decd62 212 gPt = tpcTrack->Pt();
213 gPx = tpcTrack->Px();
214 gPy = tpcTrack->Py();
215 gPz = tpcTrack->Pz();
6667f3a7 216 tpcTrack->PropagateToDCA(vertex,
217 esd->GetMagneticField(),
218 100.,dca,cov);
3e6c06f4 219 }
220 }
221 else{
75decd62 222 gPt = track->Pt();
223 gPx = track->Px();
224 gPy = track->Py();
225 gPz = track->Pz();
6667f3a7 226 track->PropagateToDCA(vertex,
227 esd->GetMagneticField(),
228 100.,dca,cov);
3e6c06f4 229 }
230
231 Int_t fIdxInt[200];
232 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
233 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
234
235 Float_t chi2PerClusterITS = -1;
236 if (nClustersITS!=0)
237 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
238 Float_t chi2PerClusterTPC = -1;
239 if (nClustersTPC!=0)
240 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
241
242 Double_t extCov[15];
243 track->GetExternalCovariance(extCov);
244
0008a5a6 245 if(fPointOnITSLayer1Flag)
246 if(!track->HasPointOnITSLayer(0)) return kFALSE;
247 if(fPointOnITSLayer2Flag)
248 if(!track->HasPointOnITSLayer(1)) return kFALSE;
249 if(fPointOnITSLayer3Flag)
250 if(!track->HasPointOnITSLayer(2)) return kFALSE;
251 if(fPointOnITSLayer4Flag)
252 if(!track->HasPointOnITSLayer(3)) return kFALSE;
253 if(fPointOnITSLayer5Flag)
254 if(!track->HasPointOnITSLayer(4)) return kFALSE;
255 if(fPointOnITSLayer6Flag)
256 if(!track->HasPointOnITSLayer(5)) return kFALSE;
3e6c06f4 257 if(fMinITSClustersFlag)
258 if(nClustersITS < fMinITSClusters) return kFALSE;
259 if(fMaxChi2PerITSClusterFlag)
260 if(chi2PerClusterITS > fMaxChi2PerITSCluster) return kFALSE;
261 if(fMinTPCClustersFlag)
262 if(nClustersTPC < fMinTPCClusters) return kFALSE;
263 if(fMaxChi2PerTPCClusterFlag)
264 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) return kFALSE;
265 if(fMaxCov11Flag)
266 if(extCov[0] > fMaxCov11) return kFALSE;
267 if(fMaxCov22Flag)
268 if(extCov[2] > fMaxCov22) return kFALSE;
269 if(fMaxCov33Flag)
270 if(extCov[5] > fMaxCov33) return kFALSE;
271 if(fMaxCov44Flag)
272 if(extCov[9] > fMaxCov44) return kFALSE;
273 if(fMaxCov55Flag)
274 if(extCov[14] > fMaxCov55) return kFALSE;
275 if(fMaxSigmaToVertexFlag)
276 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) return kFALSE;
277 if(fMaxSigmaToVertexTPCFlag)
278 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) return kFALSE;
5b8133c7 279 if(fMaxDCAXYFlag)
6667f3a7 280 if(TMath::Abs(dca[0]) > fMaxDCAXY) return kFALSE;
5b8133c7 281 if(fMaxDCAXYTPCFlag)
6667f3a7 282 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) return kFALSE;
5b8133c7 283 if(fMaxDCAZFlag)
6667f3a7 284 if(TMath::Abs(dca[1]) > fMaxDCAZ) return kFALSE;
5b8133c7 285 if(fMaxDCAZTPCFlag)
6667f3a7 286 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) return kFALSE;
5b8133c7 287 if(fMaxConstrainChi2Flag) {
288 if(track->GetConstrainedChi2() > 0)
289 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) return kFALSE;
290 }
3e6c06f4 291 if(fITSRefitFlag)
292 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
293 if(fTPCRefitFlag)
294 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
295 if(fESDpidFlag)
296 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) return kFALSE;
297 if(fTPCpidFlag)
298 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) return kFALSE;
299
3e6c06f4 300 return kTRUE;
301}
302
75decd62 303//____________________________________________________________________//
304Float_t AliProtonQAAnalysis::GetSigmaToVertex(AliESDtrack* esdTrack) const {
305 // Calculates the number of sigma to the vertex.
306
307 Float_t b[2];
308 Float_t bRes[2];
309 Float_t bCov[3];
310 if((fUseTPCOnly)&&(!fUseHybridTPC))
311 esdTrack->GetImpactParametersTPC(b,bCov);
312 else
313 esdTrack->GetImpactParameters(b,bCov);
314
315 if (bCov[0]<=0 || bCov[2]<=0) {
316 //AliDebug(1, "Estimated b resolution lower or equal zero!");
317 bCov[0]=0; bCov[2]=0;
318 }
319 bRes[0] = TMath::Sqrt(bCov[0]);
320 bRes[1] = TMath::Sqrt(bCov[2]);
321
322 if (bRes[0] == 0 || bRes[1] ==0) return -1;
323
324 Float_t d = TMath::Sqrt(TMath::Power(b[0]/bRes[0],2) + TMath::Power(b[1]/bRes[1],2));
325
326 if (TMath::Exp(-d * d / 2) < 1e-10) return 1000;
327
328 d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
329
330 return d;
331}
332
333//____________________________________________________________________//
334Double_t AliProtonQAAnalysis::Rapidity(Double_t gPx,
335 Double_t gPy,
336 Double_t gPz) const {
337 //returns the rapidity of the proton - to be removed
338 Double_t fMass = 9.38270000000000048e-01;
339
340 Double_t gP = TMath::Sqrt(TMath::Power(gPx,2) +
341 TMath::Power(gPy,2) +
342 TMath::Power(gPz,2));
343 Double_t energy = TMath::Sqrt(gP*gP + fMass*fMass);
344 Double_t y = -999;
345 if(energy != gPz)
346 y = 0.5*TMath::Log((energy + gPz)/(energy - gPz));
347
348 return y;
349}
350
3e6c06f4 351//____________________________________________________________________//
3e23254a 352void AliProtonQAAnalysis::FillQA(AliStack *stack,
353 AliESDEvent *esd,
354 const AliESDVertex *vertex,
355 AliESDtrack* track) {
3e6c06f4 356 // Checks if the track is excluded from the cuts
357 Int_t nPrimaries = stack->GetNprimary();
358 Int_t label = TMath::Abs(track->GetLabel());
359
360 Double_t Pt = 0.0, Px = 0.0, Py = 0.0, Pz = 0.0;
3e23254a 361 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
362
0326e385 363 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3e6c06f4 364 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
365 if(!tpcTrack) {
366 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
3e23254a 367 dca[0] = -100.; dca[1] = -100.;
368 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
3e6c06f4 369 }
370 else {
371 Pt = tpcTrack->Pt();
372 Px = tpcTrack->Px();
373 Py = tpcTrack->Py();
374 Pz = tpcTrack->Pz();
3e23254a 375 tpcTrack->PropagateToDCA(vertex,
376 esd->GetMagneticField(),
377 100.,dca,cov);
3e6c06f4 378 }
379 }
0326e385 380 else if(fUseHybridTPC) {
3e23254a 381 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
0326e385 382 if(!tpcTrack) {
383 Pt = 0.0; Px = 0.0; Py = 0.0; Pz = 0.0;
3e23254a 384 dca[0] = -100.; dca[1] = -100.;
385 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
0326e385 386 }
387 else {
388 Pt = tpcTrack->Pt();
389 Px = tpcTrack->Px();
390 Py = tpcTrack->Py();
391 Pz = tpcTrack->Pz();
3e23254a 392 tpcTrack->PropagateToDCA(vertex,
393 esd->GetMagneticField(),
394 100.,dca,cov);
0326e385 395 }
396 }
3e6c06f4 397 else{
398 Pt = track->Pt();
399 Px = track->Px();
400 Py = track->Py();
401 Pz = track->Pz();
3e23254a 402 track->PropagateToDCA(vertex,
403 esd->GetMagneticField(),
404 100.,dca,cov);
3e6c06f4 405 }
3e23254a 406
3e6c06f4 407 Int_t fIdxInt[200];
408 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
409 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
410
411 Float_t chi2PerClusterITS = -1;
412 if (nClustersITS!=0)
413 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
414 Float_t chi2PerClusterTPC = -1;
415 if (nClustersTPC!=0)
416 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
417
418 Double_t extCov[15];
419 track->GetExternalCovariance(extCov);
420
421 //cout<<"Charge: "<<track->Charge()<<
422 //" - Label/Primaries: "<<label<<"/"<<nPrimaries<<
423 //" - TPC clusters: "<<nClustersTPC<<endl;
424 //protons
425 if(track->Charge() > 0) {
426 //Primaries
427 if(label <= nPrimaries) {
428 if(fMinITSClustersFlag) {
429 if(nClustersITS < fMinITSClusters) {
430 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
431 //status = kFALSE;
432 }
433 else if(nClustersITS >= fMinITSClusters)
434 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
435 }//ITS clusters
436 if(fMaxChi2PerITSClusterFlag) {
437 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
438 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
439 //status = kFALSE;
440 }
441 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
442 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
443 }//chi2 per ITS cluster
444 if(fMinTPCClustersFlag) {
445 if(nClustersTPC < fMinTPCClusters) {
446 //cout<<"Primary proton rejected"<<endl;
447 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
448 //status = kFALSE;
449 }
450 else if(nClustersTPC >= fMinTPCClusters) {
451 //cout<<"Primary proton accepted"<<endl;
452 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
453 }
454 }//TPC clusters
455 if(fMaxChi2PerTPCClusterFlag) {
456 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
457 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
458 //status = kFALSE;
459 }
460 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
461 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
462 }//chi2 per TPC cluster
463 if(fMaxCov11Flag) {
464 if(extCov[0] > fMaxCov11) {
465 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
466 //status = kFALSE;
467 }
468 else if(extCov[0] <= fMaxCov11)
469 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
470 }//cov11
471 if(fMaxCov22Flag) {
472 if(extCov[2] > fMaxCov22) {
473 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
474 //status = kFALSE;
475 }
476 else if(extCov[2] <= fMaxCov22)
477 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
478 }//cov11
479 if(fMaxCov33Flag) {
480 if(extCov[5] > fMaxCov33) {
481 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
482 //status = kFALSE;
483 }
484 else if(extCov[5] <= fMaxCov33)
485 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
486 }//cov11
487 if(fMaxCov44Flag) {
488 if(extCov[9] > fMaxCov44) {
489 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
490 //status = kFALSE;
491 }
492 else if(extCov[9] <= fMaxCov44)
493 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
494 }//cov11
495 if(fMaxCov55Flag) {
496 if(extCov[14] > fMaxCov55) {
497 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
498 //status = kFALSE;
499 }
500 else if(extCov[14] <= fMaxCov55)
501 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
502 }//cov55
503 if(fMaxSigmaToVertexFlag) {
504 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
505 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
506 //status = kFALSE;
507 }
508 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
509 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
510 }//sigma to vertex
511 if(fMaxSigmaToVertexTPCFlag) {
512 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
513 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
514 //status = kFALSE;
515 }
516 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
517 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
518 }//sigma to vertex TPC
519 if(fMaxDCAXYFlag) {
3e23254a 520 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
521 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 522 //status = kFALSE;
523 }
3e23254a 524 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
525 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 526 }//DCA xy global tracking
527 if(fMaxDCAXYTPCFlag) {
3e23254a 528 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
529 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 530 //status = kFALSE;
531 }
3e23254a 532 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
533 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 534 }//DCA xy TPC tracking
535 if(fMaxDCAZFlag) {
3e23254a 536 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
537 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 538 //status = kFALSE;
539 }
3e23254a 540 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
541 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 542 }//DCA z global tracking
543 if(fMaxDCAZTPCFlag) {
3e23254a 544 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
545 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 546 //status = kFALSE;
547 }
3e23254a 548 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
549 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 550 }//DCA z TPC tracking
551 if(fMaxConstrainChi2Flag) {
552 if(track->GetConstrainedChi2() > 0) {
553 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
554 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
555 //status = kFALSE;
556 }
557 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
558 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
559 }
560 }//constrain chi2 - vertex
561 if(fITSRefitFlag) {
562 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
563 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
564 //status = kFALSE;
565 }
566 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
567 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
568 }//ITS refit
569 if(fTPCRefitFlag) {
570 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
571 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
572 //status = kFALSE;
573 }
574 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
575 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
576 }//TPC refit
577 if(fESDpidFlag) {
578 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
579 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
580 //status = kFALSE;
581 }
582 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
583 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
584 }//ESD pid
585 if(fTPCpidFlag) {
586 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
587 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
588 //status = kFALSE;
589 }
590 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
591 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
592 }//TPC pid
0008a5a6 593 if(fPointOnITSLayer1Flag) {
594 if(!track->HasPointOnITSLayer(0)) {
595 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
596 }
597 else if(track->HasPointOnITSLayer(0))
598 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
599 }//point on SPD1
600 if(fPointOnITSLayer2Flag) {
601 if(!track->HasPointOnITSLayer(1)) {
602 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
603 }
604 else if(track->HasPointOnITSLayer(1))
605 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
606 }//point on SPD2
607 if(fPointOnITSLayer3Flag) {
608 if(!track->HasPointOnITSLayer(2)) {
609 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
610 }
611 else if(track->HasPointOnITSLayer(2))
612 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
613 }//point on SDD1
614 if(fPointOnITSLayer4Flag) {
615 if(!track->HasPointOnITSLayer(3)) {
616 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
617 }
618 else if(track->HasPointOnITSLayer(3))
619 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
620 }//point on SDD2
621 if(fPointOnITSLayer5Flag) {
622 if(!track->HasPointOnITSLayer(4)) {
623 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
624 }
625 else if(track->HasPointOnITSLayer(4))
626 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
627 }//point on SSD1
628 if(fPointOnITSLayer6Flag) {
629 if(!track->HasPointOnITSLayer(5)) {
630 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
631 }
632 else if(track->HasPointOnITSLayer(5))
633 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
634 }//point on SSD2
3e6c06f4 635 }//primary particle cut
636
637 //Secondaries
638 if(label > nPrimaries) {
639 if(fMinITSClustersFlag) {
640 if(nClustersITS < fMinITSClusters) {
641 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
642 //status = kFALSE;
643 }
644 else if(nClustersITS >= fMinITSClusters)
645 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
646 }//ITS clusters
647 if(fMaxChi2PerITSClusterFlag) {
648 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
649 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
650 //status = kFALSE;
651 }
652 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
653 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
654 }//chi2 per ITS cluster
655 if(fMinTPCClustersFlag) {
656 if(nClustersTPC < fMinTPCClusters) {
657 //cout<<"Secondary proton rejected"<<endl;
658 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
659 //status = kFALSE;
660 }
661 else if(nClustersTPC >= fMinTPCClusters) {
662 //cout<<"Secondary proton accepted"<<endl;
663 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
664 }
665 }//TPC clusters
666 if(fMaxChi2PerTPCClusterFlag) {
667 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
668 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
669 //status = kFALSE;
670 }
671 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
672 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
673 }//chi2 per TPC cluster
674 if(fMaxCov11Flag) {
675 if(extCov[0] > fMaxCov11) {
676 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
677 //status = kFALSE;
678 }
679 else if(extCov[0] <= fMaxCov11)
680 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
681 }//cov11
682 if(fMaxCov22Flag) {
683 if(extCov[2] > fMaxCov22) {
684 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
685 //status = kFALSE;
686 }
687 else if(extCov[2] <= fMaxCov22)
688 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
689 }//cov11
690 if(fMaxCov33Flag) {
691 if(extCov[5] > fMaxCov33) {
692 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
693 //status = kFALSE;
694 }
695 else if(extCov[5] <= fMaxCov33)
696 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
697 }//cov11
698 if(fMaxCov44Flag) {
699 if(extCov[9] > fMaxCov44) {
700 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
701 //status = kFALSE;
702 }
703 else if(extCov[9] <= fMaxCov44)
704 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
705 }//cov11
706 if(fMaxCov55Flag) {
707 if(extCov[14] > fMaxCov55) {
708 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
709 //status = kFALSE;
710 }
711 else if(extCov[14] <= fMaxCov55)
712 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
713 }//cov55
714 if(fMaxSigmaToVertexFlag) {
715 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
716 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
717 //status = kFALSE;
718 }
719 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
720 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
721 }//sigma to vertex
722 if(fMaxSigmaToVertexTPCFlag) {
723 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
724 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
725 //status = kFALSE;
726 }
727 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
728 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
729 }//sigma to vertex TPC
730 if(fMaxDCAXYFlag) {
3e23254a 731 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
732 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 733 //status = kFALSE;
734 }
3e23254a 735 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
736 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 737 }//DCA xy global tracking
738 if(fMaxDCAXYTPCFlag) {
3e23254a 739 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
740 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 741 //status = kFALSE;
742 }
3e23254a 743 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
744 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 745 }//DCA xy TPC tracking
746 if(fMaxDCAZFlag) {
3e23254a 747 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
748 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 749 //status = kFALSE;
750 }
3e23254a 751 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
752 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 753 }//DCA z global tracking
754 if(fMaxDCAZTPCFlag) {
3e23254a 755 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
756 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 757 //status = kFALSE;
758 }
3e23254a 759 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
760 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 761 }//DCA z TPC tracking
762 if(fMaxConstrainChi2Flag) {
763 if(track->GetConstrainedChi2() > 0) {
764 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
765 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
766 //status = kFALSE;
767 }
768 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
769 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
770 }
771 }//constrain chi2 - vertex
772 if(fITSRefitFlag) {
773 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
774 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
775 //status = kFALSE;
776 }
777 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
778 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
779 }//ITS refit
780 if(fTPCRefitFlag) {
781 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
782 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
783 //status = kFALSE;
784 }
785 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
786 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
787 }//TPC refit
788 if(fESDpidFlag) {
789 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
790 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
791 //status = kFALSE;
792 }
793 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
794 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
795 }//ESD pid
796 if(fTPCpidFlag) {
797 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
798 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
799 //status = kFALSE;
800 }
801 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
802 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
803 }//TPC pid
0008a5a6 804 if(fPointOnITSLayer1Flag) {
805 if(!track->HasPointOnITSLayer(0)) {
806 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
807 }
808 else if(track->HasPointOnITSLayer(0))
809 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
810 }//point on SPD1
811 if(fPointOnITSLayer2Flag) {
812 if(!track->HasPointOnITSLayer(1)) {
813 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
814 }
815 else if(track->HasPointOnITSLayer(1))
816 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
817 }//point on SPD2
818 if(fPointOnITSLayer3Flag) {
819 if(!track->HasPointOnITSLayer(2)) {
820 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
821 }
822 else if(track->HasPointOnITSLayer(2))
823 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
824 }//point on SDD1
825 if(fPointOnITSLayer4Flag) {
826 if(!track->HasPointOnITSLayer(3)) {
827 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
828 }
829 else if(track->HasPointOnITSLayer(3))
830 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
831 }//point on SDD2
832 if(fPointOnITSLayer5Flag) {
833 if(!track->HasPointOnITSLayer(4)) {
834 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
835 }
836 else if(track->HasPointOnITSLayer(4))
837 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
838 }//point on SSD1
839 if(fPointOnITSLayer6Flag) {
840 if(!track->HasPointOnITSLayer(5)) {
841 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
842 }
843 else if(track->HasPointOnITSLayer(5))
844 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
845 }//point on SSD2
3e6c06f4 846 }//secondary particle cut
847 }//protons
848
849 //antiprotons
850 if(track->Charge() < 0) {
851 //Primaries
852 if(label <= nPrimaries) {
853 if(fMinITSClustersFlag) {
854 if(nClustersITS < fMinITSClusters) {
855 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
856 //status = kFALSE;
857 }
858 else if(nClustersITS >= fMinITSClusters)
859 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
860 }//ITS clusters
861 if(fMaxChi2PerITSClusterFlag) {
862 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
863 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
864 //status = kFALSE;
865 }
866 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
867 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
868 }//chi2 per ITS cluster
869 if(fMinTPCClustersFlag) {
870 if(nClustersTPC < fMinTPCClusters) {
871 //cout<<"Primary antiproton rejected"<<endl;
872 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
873 //status = kFALSE;
874 }
875 else if(nClustersTPC >= fMinTPCClusters) {
876 //cout<<"Primary antiproton accepted"<<endl;
877 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
878 }
879 }//TPC clusters
880 if(fMaxChi2PerTPCClusterFlag) {
881 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
882 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
883 //status = kFALSE;
884 }
885 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
886 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
887 }//chi2 per TPC cluster
888 if(fMaxCov11Flag) {
889 if(extCov[0] > fMaxCov11) {
890 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
891 //status = kFALSE;
892 }
893 else if(extCov[0] <= fMaxCov11)
894 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
895 }//cov11
896 if(fMaxCov22Flag) {
897 if(extCov[2] > fMaxCov22) {
898 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
899 //status = kFALSE;
900 }
901 else if(extCov[2] <= fMaxCov22)
902 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
903 }//cov11
904 if(fMaxCov33Flag) {
905 if(extCov[5] > fMaxCov33) {
906 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
907 //status = kFALSE;
908 }
909 else if(extCov[5] <= fMaxCov33)
910 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
911 }//cov11
912 if(fMaxCov44Flag) {
913 if(extCov[9] > fMaxCov44) {
914 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
915 //status = kFALSE;
916 }
917 else if(extCov[9] <= fMaxCov44)
918 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
919 }//cov11
920 if(fMaxCov55Flag) {
921 if(extCov[14] > fMaxCov55) {
922 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
923 //status = kFALSE;
924 }
925 else if(extCov[14] <= fMaxCov55)
926 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
927 }//cov55
928 if(fMaxSigmaToVertexFlag) {
929 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
930 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
931 //status = kFALSE;
932 }
933 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
934 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
935 }//sigma to vertex
936 if(fMaxSigmaToVertexTPCFlag) {
937 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
938 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
939 //status = kFALSE;
940 }
941 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
942 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
943 }//sigma to vertex TPC
944 if(fMaxDCAXYFlag) {
3e23254a 945 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
946 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 947 //status = kFALSE;
948 }
3e23254a 949 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
950 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 951 }//DCA xy global tracking
952 if(fMaxDCAXYTPCFlag) {
3e23254a 953 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
954 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 955 //status = kFALSE;
956 }
3e23254a 957 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
958 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 959 }//DCA xy TPC tracking
960 if(fMaxDCAZFlag) {
3e23254a 961 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
962 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 963 //status = kFALSE;
964 }
3e23254a 965 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
966 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 967 }//DCA z global tracking
968 if(fMaxDCAZTPCFlag) {
3e23254a 969 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
970 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 971 //status = kFALSE;
972 }
3e23254a 973 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
974 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 975 }//DCA z TPC tracking
976 if(fMaxConstrainChi2Flag) {
977 if(track->GetConstrainedChi2() > 0) {
978 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
979 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
980 //status = kFALSE;
981 }
982 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
983 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
984 }
985 }//constrain chi2 - vertex
986 if(fITSRefitFlag) {
987 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
988 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
989 //status = kFALSE;
990 }
991 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
992 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
993 }//ITS refit
994 if(fTPCRefitFlag) {
995 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
996 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
997 //status = kFALSE;
998 }
999 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1000 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1001 }//TPC refit
1002 if(fESDpidFlag) {
1003 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1004 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
1005 //status = kFALSE;
1006 }
1007 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1008 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1009 }//ESD pid
1010 if(fTPCpidFlag) {
1011 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1012 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
1013 //status = kFALSE;
1014 }
1015 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1016 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1017 }//TPC pid
0008a5a6 1018 if(fPointOnITSLayer1Flag) {
1019 if(!track->HasPointOnITSLayer(0)) {
1020 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
1021 }
1022 else if(track->HasPointOnITSLayer(0))
1023 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1024 }//point on SPD1
1025 if(fPointOnITSLayer2Flag) {
1026 if(!track->HasPointOnITSLayer(1)) {
1027 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
1028 }
1029 else if(track->HasPointOnITSLayer(1))
1030 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1031 }//point on SPD2
1032 if(fPointOnITSLayer3Flag) {
1033 if(!track->HasPointOnITSLayer(2)) {
1034 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
1035 }
1036 else if(track->HasPointOnITSLayer(2))
1037 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1038 }//point on SDD1
1039 if(fPointOnITSLayer4Flag) {
1040 if(!track->HasPointOnITSLayer(3)) {
1041 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
1042 }
1043 else if(track->HasPointOnITSLayer(3))
1044 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1045 }//point on SDD2
1046 if(fPointOnITSLayer5Flag) {
1047 if(!track->HasPointOnITSLayer(4)) {
1048 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
1049 }
1050 else if(track->HasPointOnITSLayer(4))
1051 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1052 }//point on SSD1
1053 if(fPointOnITSLayer6Flag) {
1054 if(!track->HasPointOnITSLayer(5)) {
1055 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
1056 }
1057 else if(track->HasPointOnITSLayer(5))
1058 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1059 }//point on SSD2
3e6c06f4 1060 }//primary particle cut
1061
1062 //Secondaries
1063 if(label > nPrimaries) {
1064 if(fMinITSClustersFlag) {
1065 if(nClustersITS < fMinITSClusters) {
1066 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
1067 //status = kFALSE;
1068 }
1069 else if(nClustersITS >= fMinITSClusters)
1070 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
1071 }//ITS clusters
1072 if(fMaxChi2PerITSClusterFlag) {
1073 if(chi2PerClusterITS > fMaxChi2PerITSCluster) {
1074 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
1075 //status = kFALSE;
1076 }
1077 else if(chi2PerClusterITS <= fMaxChi2PerITSCluster)
1078 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
1079 }//chi2 per ITS cluster
1080 if(fMinTPCClustersFlag) {
1081 if(nClustersTPC < fMinTPCClusters) {
1082 //cout<<"Secondary antiproton rejected"<<endl;
1083 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
1084 //status = kFALSE;
1085 }
1086 else if(nClustersTPC >= fMinTPCClusters) {
1087 //cout<<"Secondary antiproton accepted"<<endl;
1088 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
1089 }
1090 }//TPC clusters
1091 if(fMaxChi2PerTPCClusterFlag) {
1092 if(chi2PerClusterTPC > fMaxChi2PerTPCCluster) {
1093 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
1094 //status = kFALSE;
1095 }
1096 else if(chi2PerClusterTPC <= fMaxChi2PerTPCCluster)
1097 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
1098 }//chi2 per TPC cluster
1099 if(fMaxCov11Flag) {
1100 if(extCov[0] > fMaxCov11) {
1101 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
1102 //status = kFALSE;
1103 }
1104 else if(extCov[0] <= fMaxCov11)
1105 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
1106 }//cov11
1107 if(fMaxCov22Flag) {
1108 if(extCov[2] > fMaxCov22) {
1109 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
1110 //status = kFALSE;
1111 }
1112 else if(extCov[2] <= fMaxCov22)
1113 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
1114 }//cov11
1115 if(fMaxCov33Flag) {
1116 if(extCov[5] > fMaxCov33) {
1117 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
1118 //status = kFALSE;
1119 }
1120 else if(extCov[5] <= fMaxCov33)
1121 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
1122 }//cov11
1123 if(fMaxCov44Flag) {
1124 if(extCov[9] > fMaxCov44) {
1125 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
1126 //status = kFALSE;
1127 }
1128 else if(extCov[9] <= fMaxCov44)
1129 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
1130 }//cov11
1131 if(fMaxCov55Flag) {
1132 if(extCov[14] > fMaxCov55) {
1133 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
1134 //status = kFALSE;
1135 }
1136 else if(extCov[14] <= fMaxCov55)
1137 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
1138 }//cov55
1139 if(fMaxSigmaToVertexFlag) {
1140 if(GetSigmaToVertex(track) > fMaxSigmaToVertex) {
1141 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(GetSigmaToVertex(track));
1142 //status = kFALSE;
1143 }
1144 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertex)
1145 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(GetSigmaToVertex(track));
1146 }//sigma to vertex
1147 if(fMaxSigmaToVertexTPCFlag) {
1148 if(GetSigmaToVertex(track) > fMaxSigmaToVertexTPC) {
1149 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(GetSigmaToVertex(track));
1150 //status = kFALSE;
1151 }
1152 else if(GetSigmaToVertex(track) <= fMaxSigmaToVertexTPC)
1153 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(GetSigmaToVertex(track));
1154 }//sigma to vertex TPC
1155 if(fMaxDCAXYFlag) {
3e23254a 1156 if(TMath::Abs(dca[0]) > fMaxDCAXY) {
1157 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 1158 //status = kFALSE;
1159 }
3e23254a 1160 else if(TMath::Abs(dca[0]) <= fMaxDCAXY)
1161 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 1162 }//DCA xy global tracking
1163 if(fMaxDCAXYTPCFlag) {
3e23254a 1164 if(TMath::Abs(dca[0]) > fMaxDCAXYTPC) {
1165 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 1166 //status = kFALSE;
1167 }
3e23254a 1168 else if(TMath::Abs(dca[0]) <= fMaxDCAXYTPC)
1169 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
3e6c06f4 1170 }//DCA xy TPC tracking
1171 if(fMaxDCAZFlag) {
3e23254a 1172 if(TMath::Abs(dca[1]) > fMaxDCAZ) {
1173 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 1174 //status = kFALSE;
1175 }
3e23254a 1176 else if(TMath::Abs(dca[1]) <= fMaxDCAZ)
1177 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 1178 }//DCA z global tracking
1179 if(fMaxDCAZTPCFlag) {
3e23254a 1180 if(TMath::Abs(dca[1]) > fMaxDCAZTPC) {
1181 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 1182 //status = kFALSE;
1183 }
3e23254a 1184 else if(TMath::Abs(dca[1]) <= fMaxDCAZTPC)
1185 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
3e6c06f4 1186 }//DCA z TPC tracking
1187 if(fMaxConstrainChi2Flag) {
1188 if(track->GetConstrainedChi2() > 0) {
1189 if(TMath::Log(track->GetConstrainedChi2()) > fMaxConstrainChi2) {
1190 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1191 //status = kFALSE;
1192 }
1193 else if(TMath::Log(track->GetConstrainedChi2()) <= fMaxConstrainChi2)
1194 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
1195 }
1196 }//constrain chi2 - vertex
1197 if(fITSRefitFlag) {
1198 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
1199 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
1200 //status = kFALSE;
1201 }
1202 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
1203 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
1204 }//ITS refit
1205 if(fTPCRefitFlag) {
1206 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
1207 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
1208 //status = kFALSE;
1209 }
1210 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
1211 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
1212 }//TPC refit
1213 if(fESDpidFlag) {
1214 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
1215 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
1216 //status = kFALSE;
1217 }
1218 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
1219 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
1220 }//ESD pid
1221 if(fTPCpidFlag) {
1222 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
1223 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
1224 //status = kFALSE;
1225 }
1226 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
1227 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
1228 }//TPC pid
0008a5a6 1229 if(fPointOnITSLayer1Flag) {
1230 if(!track->HasPointOnITSLayer(0)) {
1231 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
1232 }
1233 else if(track->HasPointOnITSLayer(0))
1234 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
1235 }//point on SPD1
1236 if(fPointOnITSLayer2Flag) {
1237 if(!track->HasPointOnITSLayer(1)) {
1238 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
1239 }
1240 else if(track->HasPointOnITSLayer(1))
1241 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
1242 }//point on SPD2
1243 if(fPointOnITSLayer3Flag) {
1244 if(!track->HasPointOnITSLayer(2)) {
1245 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
1246 }
1247 else if(track->HasPointOnITSLayer(2))
1248 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
1249 }//point on SDD1
1250 if(fPointOnITSLayer4Flag) {
1251 if(!track->HasPointOnITSLayer(3)) {
1252 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
1253 }
1254 else if(track->HasPointOnITSLayer(3))
1255 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
1256 }//point on SDD2
1257 if(fPointOnITSLayer5Flag) {
1258 if(!track->HasPointOnITSLayer(4)) {
1259 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
1260 }
1261 else if(track->HasPointOnITSLayer(4))
1262 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
1263 }//point on SSD1
1264 if(fPointOnITSLayer6Flag) {
1265 if(!track->HasPointOnITSLayer(5)) {
1266 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
1267 }
1268 else if(track->HasPointOnITSLayer(5))
1269 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
1270 }//point on SSD2
3e6c06f4 1271 }//secondary particle cut
1272 }//antiprotons
3e6c06f4 1273}
1274
3e6c06f4 1275//____________________________________________________________________//
9c0b9f24 1276void AliProtonQAAnalysis::SetRunQAAnalysis() {
3e6c06f4 1277 //initializes the QA lists
1278 //fQAHistograms = kTRUE;
1279 fGlobalQAList = new TList();
75decd62 1280
3e6c06f4 1281 fQA2DList = new TList();
1282 fQA2DList->SetName("fQA2DList");
1283 fGlobalQAList->Add(fQA2DList);
1284
1285 fQAPrimaryProtonsAcceptedList = new TList();
1286 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1287 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1288
1289 fQAPrimaryProtonsRejectedList = new TList();
1290 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1291 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1292
1293 fQASecondaryProtonsAcceptedList = new TList();
1294 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1295 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1296
1297 fQASecondaryProtonsRejectedList = new TList();
1298 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1299 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1300
1301 fQAPrimaryAntiProtonsAcceptedList = new TList();
1302 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1303 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1304
1305 fQAPrimaryAntiProtonsRejectedList = new TList();
1306 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1307 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1308
1309 fQASecondaryAntiProtonsAcceptedList = new TList();
1310 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1311 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1312
1313 fQASecondaryAntiProtonsRejectedList = new TList();
1314 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1315 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1316}
1317
1318//____________________________________________________________________//
1319void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
1320 Int_t nbinsPt, Double_t minPt, Double_t maxPt) {
1321 //Initializes the QA binning
1322 fNBinsY = nbinsY;
1323 fMinY = minY; fMaxY = maxY;
1324 fNBinsPt = nbinsPt;
1325 fMinPt = minPt; fMaxPt = maxPt;
1326 InitQA();
5b8133c7 1327 InitCutLists();
75decd62 1328 InitVertexQA();
d4733690 1329 if(fRunMCAnalysis) InitMCAnalysis();
9c0b9f24 1330 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1331}
1332
1333//____________________________________________________________________//
1334void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1335 //Initialization of the efficiency list - reconstruction & PID efficiency
1336 //Adding each monitored object in the list
1337 fEfficiencyList = new TList();
1338
1339 //MC primary protons and antiprotons for the reconstruction efficiency
1340 TH2D *gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
e13bbda6 1341 ";;P_{T} [GeV/c]",
9c0b9f24 1342 fNBinsY,fMinY,fMaxY,
1343 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1344 if(fAnalysisEtaMode)
e13bbda6 1345 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1346 else
1347 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1348 gHistMCYPtProtons->SetStats(kTRUE);
1349 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1350 fEfficiencyList->Add(gHistMCYPtProtons);
1351 TH2D *gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1352 ";y;P_{T} [GeV/c]",
1353 fNBinsY,fMinY,fMaxY,
1354 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1355 if(fAnalysisEtaMode)
e13bbda6 1356 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1357 else
1358 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1359 gHistMCYPtAntiProtons->SetStats(kTRUE);
1360 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1361 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1362
e13bbda6 1363 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1364 TH2D *gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1365 ";;P_{T} [GeV/c]",
1366 fNBinsY,fMinY,fMaxY,
1367 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1368 if(fAnalysisEtaMode)
e13bbda6 1369 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1370 else
1371 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1372 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1373 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1374 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1375 TH2D *gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1376 ";y;P_{T} [GeV/c]",
1377 fNBinsY,fMinY,fMaxY,
1378 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1379 if(fAnalysisEtaMode)
e13bbda6 1380 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1381 else
1382 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1383 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1384 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1385 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1386
1387 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1388 TH2D *gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1389 ";;P_{T} [GeV/c]",
1390 fNBinsY,fMinY,fMaxY,
1391 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1392 if(fAnalysisEtaMode)
e13bbda6 1393 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1394 else
1395 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1396 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1397 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1398 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1399 TH2D *gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1400 ";y;P_{T} [GeV/c]",
1401 fNBinsY,fMinY,fMaxY,
1402 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1403 if(fAnalysisEtaMode)
e13bbda6 1404 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1405 else
1406 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1407 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1408 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1409 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1410
9c0b9f24 1411 //ESD primary protons and antiprotons for the reconstruction efficiency
1412 TH2D *gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
e13bbda6 1413 ";;P_{T} [GeV/c]",
9c0b9f24 1414 fNBinsY,fMinY,fMaxY,
1415 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1416 if(fAnalysisEtaMode)
e13bbda6 1417 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1418 else
1419 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1420 gHistESDYPtProtons->SetStats(kTRUE);
1421 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1422 fEfficiencyList->Add(gHistESDYPtProtons);
1423 TH2D *gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
e13bbda6 1424 ";;P_{T} [GeV/c]",
9c0b9f24 1425 fNBinsY,fMinY,fMaxY,
1426 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1427 if(fAnalysisEtaMode)
e13bbda6 1428 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1429 else
1430 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1431 gHistESDYPtAntiProtons->SetStats(kTRUE);
1432 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1433 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1434
e13bbda6 1435 //ESD (anti)protons from weak decays for the reconstruction efficiency
1436 TH2D *gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1437 ";;P_{T} [GeV/c]",
1438 fNBinsY,fMinY,fMaxY,
1439 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1440 if(fAnalysisEtaMode)
e13bbda6 1441 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1442 else
1443 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1444 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1445 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1446 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1447 TH2D *gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1448 ";;P_{T} [GeV/c]",
1449 fNBinsY,fMinY,fMaxY,
1450 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1451 if(fAnalysisEtaMode)
e13bbda6 1452 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1453 else
1454 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1455 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1456 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1457 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1458
1459 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1460 TH2D *gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1461 ";;P_{T} [GeV/c]",
1462 fNBinsY,fMinY,fMaxY,
1463 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1464 if(fAnalysisEtaMode)
e13bbda6 1465 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1466 else
1467 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1468 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1469 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1470 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1471 TH2D *gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1472 ";;P_{T} [GeV/c]",
1473 fNBinsY,fMinY,fMaxY,
1474 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1475 if(fAnalysisEtaMode)
e13bbda6 1476 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1477 else
1478 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1479 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1480 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1481 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1482
1483
9c0b9f24 1484 //ESD reconstructed tracks that were initially protons for the PID efficiency
1485 TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
e13bbda6 1486 ";;P_{T} [GeV/c]",
9c0b9f24 1487 fNBinsY,fMinY,fMaxY,
1488 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1489 if(fAnalysisEtaMode)
e13bbda6 1490 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1491 else
1492 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1493 gHistESDInitYPtProtons->SetStats(kTRUE);
1494 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1495 fEfficiencyList->Add(gHistESDInitYPtProtons);
1496
1497 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1498 TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
e13bbda6 1499 ";;P_{T} [GeV/c]",
9c0b9f24 1500 fNBinsY,fMinY,fMaxY,
1501 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1502 if(fAnalysisEtaMode)
e13bbda6 1503 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1504 else
1505 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1506 gHistESDIdYPtProtons->SetStats(kTRUE);
1507 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1508 fEfficiencyList->Add(gHistESDIdYPtProtons);
1509
1510 //ESD reconstructed tracks that were identified as protons for the PID contamination
1511 TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
e13bbda6 1512 ";;P_{T} [GeV/c]",
9c0b9f24 1513 fNBinsY,fMinY,fMaxY,
1514 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1515 if(fAnalysisEtaMode)
e13bbda6 1516 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1517 else
1518 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1519 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1520 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1521 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1522
1523 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1524 TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
e13bbda6 1525 ";;P_{T} [GeV/c]",
1526 fNBinsY,fMinY,fMaxY,
1527 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1528 if(fAnalysisEtaMode)
e13bbda6 1529 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1530 else
1531 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
9c0b9f24 1532 gHistESDContamYPtProtons->SetStats(kTRUE);
1533 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1534 fEfficiencyList->Add(gHistESDContamYPtProtons);
3e6c06f4 1535}
1536
5b8133c7 1537//____________________________________________________________________//
1538void AliProtonQAAnalysis::InitCutLists() {
1539 //Initialization of the cut lists
1540 //Adding each monitored object in each list
1541
1542 //Accepted cut list
1543 fAcceptedCutList = new TList();
1544 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1545 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1546 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1547 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1548 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1549 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1550 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1551 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1552
1553 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1554 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1555 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1556 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1557 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1558 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1559 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1560 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1561
1562 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1563 ";x^{2}/N_{clusters} (ITS);Entries",
1564 100,0,20);
1565 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1566 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1567 ";x^{2}/N_{clusters} (ITS);Entries",
1568 100,0,20);
1569 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1570 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1571 ";x^{2}/N_{clusters} (ITS);Entries",
1572 100,0,20);
1573 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1574 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1575 ";x^{2}/N_{clusters} (ITS);Entries",
1576 100,0,20);
1577 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1578
1579 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1580 ";Log_{10}(#chi^{2});Entries",
1581 100,-10,10);
1582 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1583 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1584 ";Log_{10}(#chi^{2});Entries",
1585 100,-10,10);
1586 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1587 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1588 ";Log_{10}(#chi^{2});Entries",
1589 100,-10,10);
1590 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1591 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1592 ";Log_{10}(#chi^{2});Entries",
1593 100,-10,10);
1594 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1595
1596 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1597 ";N_{clusters} (TPC);Entries",
1598 100,0,200);
1599 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1600 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1601 ";N_{clusters} (TPC);Entries",
1602 100,0,200);
1603 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1604 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1605 ";N_{clusters} (TPC);Entries",
1606 100,0,200);
1607 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1608 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1609 ";N_{clusters} (TPC);Entries",
1610 100,0,200);
1611 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1612
1613 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1614 ";x^{2}/N_{clusters} (TPC);Entries",
1615 100,0,4);
1616 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1617 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1618 ";x^{2}/N_{clusters} (TPC);Entries",
1619 100,0,4);
1620 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1621 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1622 ";x^{2}/N_{clusters} (TPC);Entries",
1623 100,0,4);
1624 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1625 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1626 ";x^{2}/N_{clusters} (TPC);Entries",
1627 100,0,4);
1628 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1629
1630 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1631 ";#sigma_{y} [cm];Entries",
1632 100,0,4);
1633 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1634 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1635 ";#sigma_{y} [cm];Entries",
1636 100,0,4);
1637 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1638 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1639 ";#sigma_{y} [cm];Entries",
1640 100,0,4);
1641 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1642 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1643 ";#sigma_{y} [cm];Entries",
1644 100,0,4);
1645 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1646
1647
1648 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1649 ";#sigma_{z} [cm];Entries",
1650 100,0,4);
1651 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1652 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1653 ";#sigma_{z} [cm];Entries",
1654 100,0,4);
1655 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1656 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1657 ";#sigma_{z} [cm];Entries",
1658 100,0,4);
1659 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1660 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1661 ";#sigma_{z} [cm];Entries",
1662 100,0,4);
1663 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1664
1665
1666 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1667 ";#sigma_{sin(#phi)};Entries",
1668 100,0,4);
1669 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1670 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1671 ";#sigma_{sin(#phi)};Entries",
1672 100,0,4);
1673 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1674 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1675 ";#sigma_{sin(#phi)};Entries",
1676 100,0,4);
1677 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1678 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1679 ";#sigma_{sin(#phi)};Entries",
1680 100,0,4);
1681 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1682
1683
1684 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1685 ";#sigma_{tan(#lambda)};Entries",
1686 100,0,4);
1687 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1688 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1689 ";#sigma_{tan(#lambda)};Entries",
1690 100,0,4);
1691 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1692 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1693 ";#sigma_{tan(#lambda)};Entries",
1694 100,0,4);
1695 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1696 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1697 ";#sigma_{tan(#lambda)};Entries",
1698 100,0,4);
1699 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1700
1701
1702 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1703 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1704 100,0,4);
1705 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1706 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1707 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1708 100,0,4);
1709 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1710 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1711 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1712 100,0,4);
1713 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1714 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1715 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1716 100,0,4);
1717 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
5661e210 1718 //eta-phi-Nclusters
1719 TH3D *gHistEtaPhiNClustersPrimaryProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryProtonsPass",
1720 "Accepted primary protons;#eta;#phi;N_{clusters}(TPC)",
1721 fNBinsY,fMinY,fMaxY,
1722 100,0,360,
1723 100,0,200);
1724 gHistEtaPhiNClustersPrimaryProtonsPass->SetStats(kTRUE);
1725 gHistEtaPhiNClustersPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1726 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1727 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsPass",
1728 "Accepted primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1729 fNBinsY,fMinY,fMaxY,
1730 100,0,360,
1731 100,0,200);
1732 gHistEtaPhiNClustersPrimaryAntiProtonsPass->SetStats(kTRUE);
1733 gHistEtaPhiNClustersPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1734 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1735 TH3D *gHistEtaPhiNClustersSecondaryProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryProtonsPass",
1736 "Accepted secondary protons;#eta;#phi;N_{clusters}(TPC)",
1737 fNBinsY,fMinY,fMaxY,
1738 100,0,360,
1739 100,0,200);
1740 gHistEtaPhiNClustersSecondaryProtonsPass->SetStats(kTRUE);
1741 gHistEtaPhiNClustersSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1742 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1743 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsPass",
1744 "Accepted secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1745 fNBinsY,fMinY,fMaxY,
1746 100,0,360,
1747 100,0,200);
1748 gHistEtaPhiNClustersSecondaryAntiProtonsPass->SetStats(kTRUE);
1749 gHistEtaPhiNClustersSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1750 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1751
1752 //Rejected cut list
1753 fRejectedCutList = new TList();
1754 //eta-phi-Nclusters
1755 TH3D *gHistEtaPhiNClustersPrimaryProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryProtonsReject",
1756 "Rejected primary protons;#eta;#phi;N_{clusters}(TPC)",
1757 fNBinsY,fMinY,fMaxY,
1758 100,0,360,
1759 100,0,200);
1760 gHistEtaPhiNClustersPrimaryProtonsReject->SetStats(kTRUE);
1761 gHistEtaPhiNClustersPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1762 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1763 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsReject",
1764 "Rejected primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1765 fNBinsY,fMinY,fMaxY,
1766 100,0,360,
1767 100,0,200);
1768 gHistEtaPhiNClustersPrimaryAntiProtonsReject->SetStats(kTRUE);
1769 gHistEtaPhiNClustersPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1770 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1771 TH3D *gHistEtaPhiNClustersSecondaryProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryProtonsReject",
1772 "Rejected secondary protons;#eta;#phi;N_{clusters}(TPC)",
1773 fNBinsY,fMinY,fMaxY,
1774 100,0,360,
1775 100,0,200);
1776 gHistEtaPhiNClustersSecondaryProtonsReject->SetStats(kTRUE);
1777 gHistEtaPhiNClustersSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1778 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1779 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsReject",
1780 "Rejected secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1781 fNBinsY,fMinY,fMaxY,
1782 100,0,360,
1783 100,0,200);
1784 gHistEtaPhiNClustersSecondaryAntiProtonsReject->SetStats(kTRUE);
1785 gHistEtaPhiNClustersSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1786 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1787
5b8133c7 1788
1789 //DCA list
1790 fAcceptedDCAList = new TList();
1791 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1792 ";DCA_{xy} [cm];Entries",
1793 100,0,20);
1794 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1795 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1796 ";DCA_{xy} [cm];Entries",
1797 100,0,20);
1798 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1799 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1800 ";DCA_{xy} [cm];Entries",
1801 100,0,20);
1802 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1803 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1804 ";DCA_{xy} [cm];Entries",
1805 100,0,20);
1806
1807 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1808 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1809 ";DCA_{z} [cm];Entries",
1810 100,0,20);
1811 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1812 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1813 ";DCA_{z} [cm];Entries",
1814 100,0,20);
1815 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1816 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1817 ";DCA_{z} [cm];Entries",
1818 100,0,20);
1819 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1820 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1821 ";DCA_{z} [cm];Entries",
1822 100,0,20);
1823 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1824
1825 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1826 ";#sigma_{Vertex};Entries",
1827 100,0,10);
1828 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1829 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1830 ";#sigma_{Vertex};Entries",
1831 100,0,10);
1832 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1833 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1834 ";#sigma_{Vertex};Entries",
1835 100,0,10);
1836 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1837 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1838 ";#sigma_{Vertex};Entries",
1839 100,0,10);
1840 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1841
1842}
1843
75decd62 1844//____________________________________________________________________//
1845void AliProtonQAAnalysis::InitVertexQA() {
1846 //Initializes the Vertex QA histograms
1847 fQAVertexList = new TList();
1848 fQAVertexList->SetName("fQAVertexList");
1849
5661e210 1850 //Gen. multiplicity bins
1851 Float_t xBins[24] = {0,1,2,4,6,8,10,15,20,30,40,50,75,100,
1852 200,300,400,500,750,1000,1500,2000,2500,3000};
75decd62 1853 //MC primary multiplicity (vertex efficiency calculation)
5661e210 1854 TH1F *gHistMCPrimaryMultiplicity = new TH1F("gHistMCPrimaryMultiplicity",
75decd62 1855 ";N_{prim. gen.};Entries",
5661e210 1856 23,xBins);
75decd62 1857 fQAVertexList->Add(gHistMCPrimaryMultiplicity);
1858
1859 //TPC
5661e210 1860 TH1F *gHistMCPrimaryMultiplicityTPC = new TH1F("gHistMCPrimaryMultiplicityTPC",
1861 "Vertex TPC;N_{prim. gen.};Entries",
1862 23,xBins);
75decd62 1863 fQAVertexList->Add(gHistMCPrimaryMultiplicityTPC);
1864 TH2F *gHistTPCESDVx = new TH2F("gHistTPCESDVx",
1865 "Primary vertex TPC;V_{x} [cm];N_{contributors}",
5661e210 1866 100,-10.,10.,1000,0,5000);
75decd62 1867 fQAVertexList->Add(gHistTPCESDVx);
1868 TH2F *gHistTPCESDVy = new TH2F("gHistTPCESDVy",
1869 "Primary vertex TPC;V_{y} [cm];N_{contributors}",
5661e210 1870 100,-10.,10.,1000,0,5000);
75decd62 1871 fQAVertexList->Add(gHistTPCESDVy);
1872 TH2F *gHistTPCESDVz = new TH2F("gHistTPCESDVz",
1873 "Primary vertex TPC;V_{z} [cm];N_{contributors}",
5661e210 1874 100,-20.,20.,1000,0,5000);
75decd62 1875 fQAVertexList->Add(gHistTPCESDVz);
1876 TH1F *gHistTPCDiffVx = new TH1F("gHistTPCDiffVx",
1877 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1878 100,-10000.,10000.);
1879 fQAVertexList->Add(gHistTPCDiffVx);
1880 TH1F *gHistTPCDiffVy = new TH1F("gHistTPCDiffVy",
1881 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1882 100,-10000.,10000.);
1883 fQAVertexList->Add(gHistTPCDiffVy);
1884 TH1F *gHistTPCDiffVz = new TH1F("gHistTPCDiffVz",
1885 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1886 100,-10000.,10000.);
1887 fQAVertexList->Add(gHistTPCDiffVz);
1888 TH1F *gHistTPCResolutionVx = new TH1F("gHistTPCResolutionVx",
1889 ";#sigma_{x} [#mu m];Entries",
1890 100,0.,1000.);
1891 fQAVertexList->Add(gHistTPCResolutionVx);
1892 TH1F *gHistTPCResolutionVy = new TH1F("gHistTPCResolutionVy",
1893 ";#sigma_{y} [#mu m];Entries",
1894 100,0.,1000.);
1895 fQAVertexList->Add(gHistTPCResolutionVy);
1896 TH1F *gHistTPCResolutionVz = new TH1F("gHistTPCResolutionVz",
1897 ";#sigma_{z} [#mu m];Entries",
1898 100,0.,500.);
1899 fQAVertexList->Add(gHistTPCResolutionVz);
1900
1901 //SPD
5661e210 1902 TH1F *gHistMCPrimaryMultiplicitySPD = new TH1F("gHistMCPrimaryMultiplicitySPD",
1903 "Vertex SPD;N_{prim. gen.};Entries",
1904 23,xBins);
75decd62 1905 fQAVertexList->Add(gHistMCPrimaryMultiplicitySPD);
1906 TH2F *gHistSPDESDVx = new TH2F("gHistSPDESDVx",
1907 "Primary vertex SPD;V_{x} [cm];N_{contributors}",
5661e210 1908 100,-10.,10.,1000,0,5000);
75decd62 1909 fQAVertexList->Add(gHistSPDESDVx);
1910 TH2F *gHistSPDESDVy = new TH2F("gHistSPDESDVy",
1911 "Primary vertex SPD;V_{y} [cm];N_{contributors}",
5661e210 1912 100,-10.,10.,1000,0,5000);
75decd62 1913 fQAVertexList->Add(gHistSPDESDVy);
1914 TH2F *gHistSPDESDVz = new TH2F("gHistSPDESDVz",
1915 "Primary vertex SPD;V_{z} [cm];N_{contributors}",
5661e210 1916 100,-20.,20.,1000,0,5000);
75decd62 1917 fQAVertexList->Add(gHistSPDESDVz);
1918 TH1F *gHistSPDDiffVx = new TH1F("gHistSPDDiffVx",
1919 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1920 100,-10000.,10000.);
1921 fQAVertexList->Add(gHistSPDDiffVx);
1922 TH1F *gHistSPDDiffVy = new TH1F("gHistSPDDiffVy",
1923 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1924 100,-10000.,10000.);
1925 fQAVertexList->Add(gHistSPDDiffVy);
1926 TH1F *gHistSPDDiffVz = new TH1F("gHistSPDDiffVz",
1927 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1928 100,-10000.,10000.);
1929 fQAVertexList->Add(gHistSPDDiffVz);
1930 TH1F *gHistSPDResolutionVx = new TH1F("gHistSPDResolutionVx",
1931 ";#sigma_{x} [#mu m];Entries",
1932 100,0.,1000.);
1933 fQAVertexList->Add(gHistSPDResolutionVx);
1934 TH1F *gHistSPDResolutionVy = new TH1F("gHistSPDResolutionVy",
1935 ";#sigma_{y} [#mu m];Entries",
1936 100,0.,1000.);
1937 fQAVertexList->Add(gHistSPDResolutionVy);
1938 TH1F *gHistSPDResolutionVz = new TH1F("gHistSPDResolutionVz",
1939 ";#sigma_{z} [#mu m];Entries",
1940 100,0.,500.);
1941 fQAVertexList->Add(gHistSPDResolutionVz);
1942
1943 //Tracks
5661e210 1944 TH1F *gHistMCPrimaryMultiplicityTracks = new TH1F("gHistMCPrimaryMultiplicityTracks",
1945 "Vertex Tracks;N_{prim. gen.};Entries",
1946 23,xBins);
75decd62 1947 fQAVertexList->Add(gHistMCPrimaryMultiplicityTracks);
1948 TH2F *gHistTracksESDVx = new TH2F("gHistTracksESDVx",
1949 "Primary vertex Tracks;V_{x} [cm];N_{contributors}",
5661e210 1950 100,-10.,10.,1000,0,5000);
75decd62 1951 fQAVertexList->Add(gHistTracksESDVx);
1952 TH2F *gHistTracksESDVy = new TH2F("gHistTracksESDVy",
1953 "Primary vertex Tracks;V_{y} [cm];N_{contributors}",
5661e210 1954 100,-10.,10.,1000,0,5000);
75decd62 1955 fQAVertexList->Add(gHistTracksESDVy);
1956 TH2F *gHistTracksESDVz = new TH2F("gHistTracksESDVz",
1957 "Primary vertex Tracks;V_{z} [cm];N_{contributors}",
5661e210 1958 100,-20.,20.,1000,0,5000);
75decd62 1959 fQAVertexList->Add(gHistTracksESDVz);
1960 TH1F *gHistTracksDiffVx = new TH1F("gHistTracksDiffVx",
1961 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
1962 100,-10000.,10000.);
1963 fQAVertexList->Add(gHistTracksDiffVx);
1964 TH1F *gHistTracksDiffVy = new TH1F("gHistTracksDiffVy",
1965 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
1966 100,-10000.,10000.);
1967 fQAVertexList->Add(gHistTracksDiffVy);
1968 TH1F *gHistTracksDiffVz = new TH1F("gHistTracksDiffVz",
1969 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
1970 100,-10000.,10000.);
1971 fQAVertexList->Add(gHistTracksDiffVz);
1972 TH1F *gHistTracksResolutionVx = new TH1F("gHistTracksResolutionVx",
1973 ";#sigma_{x} [#mu m];Entries",
5661e210 1974 100,0.,5000.);
75decd62 1975 fQAVertexList->Add(gHistTracksResolutionVx);
1976 TH1F *gHistTracksResolutionVy = new TH1F("gHistTracksResolutionVy",
1977 ";#sigma_{y} [#mu m];Entries",
5661e210 1978 100,0.,5000.);
75decd62 1979 fQAVertexList->Add(gHistTracksResolutionVy);
1980 TH1F *gHistTracksResolutionVz = new TH1F("gHistTracksResolutionVz",
1981 ";#sigma_{z} [#mu m];Entries",
5661e210 1982 100,0.,1000.);
75decd62 1983 fQAVertexList->Add(gHistTracksResolutionVz);
1984}
1985
3e6c06f4 1986//____________________________________________________________________//
1987void AliProtonQAAnalysis::InitQA() {
75decd62 1988 //Initializes the QA histograms
3e6c06f4 1989 //if(!fQAHistograms)
9c0b9f24 1990 SetRunQAAnalysis();
3e6c06f4 1991
1992 //2D histograms
1993 //TDirectory *dir2D = gDirectory->mkdir("2D");
1994 //fGlobalQAList->Add(dir2D); dir2D->cd();
1995 TH2D *gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
dd3fa486 1996 ";;P_{T} [GeV/c]",
3e6c06f4 1997 fNBinsY,fMinY,fMaxY,
1998 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 1999 if(fAnalysisEtaMode)
2000 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("#eta");
2001 else
2002 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("y");
3e6c06f4 2003 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
2004 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
9c0b9f24 2005 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
3e6c06f4 2006 TH2D *gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
dd3fa486 2007 ";;P_{T} [GeV/c]",
3e6c06f4 2008 fNBinsY,fMinY,fMaxY,
2009 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 2010 if(fAnalysisEtaMode)
2011 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("#eta");
2012 else
2013 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("y");
3e6c06f4 2014 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
2015 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
9c0b9f24 2016 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
3e6c06f4 2017
2018 TH2D *gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
dd3fa486 2019 ";;P_{T} [GeV/c]",
3e6c06f4 2020 fNBinsY,fMinY,fMaxY,
2021 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 2022 if(fAnalysisEtaMode)
2023 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("#eta");
2024 else
2025 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("y");
3e6c06f4 2026 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
2027 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
9c0b9f24 2028 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
3e6c06f4 2029 TH2D *gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
dd3fa486 2030 ";;P_{T} [GeV/c]",
3e6c06f4 2031 fNBinsY,fMinY,fMaxY,
2032 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 2033 if(fAnalysisEtaMode)
2034 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("#eta");
2035 else
2036 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("y");
3e6c06f4 2037 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
2038 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
9c0b9f24 2039 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
3e6c06f4 2040
2041 TH2D *gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
dd3fa486 2042 ";;P_{T} [GeV/c]",
3e6c06f4 2043 fNBinsY,fMinY,fMaxY,
2044 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 2045 if(fAnalysisEtaMode)
2046 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2047 else
2048 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("y");
3e6c06f4 2049 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
2050 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
9c0b9f24 2051 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
3e6c06f4 2052 TH2D *gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
dd3fa486 2053 ";;P_{T} [GeV/c]",
2054 fNBinsY,fMinY,fMaxY,
2055 fNBinsPt,fMinPt,fMaxPt);
2056 if(fAnalysisEtaMode)
2057 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2058 else
2059 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("y");
3e6c06f4 2060 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
2061 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
9c0b9f24 2062 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
3e6c06f4 2063
2064 TH2D *gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
dd3fa486 2065 ";;P_{T} [GeV/c]",
2066 fNBinsY,fMinY,fMaxY,
2067 fNBinsPt,fMinPt,fMaxPt);
2068 if(fAnalysisEtaMode)
2069 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2070 else
2071 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("y");
3e6c06f4 2072 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
2073 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
9c0b9f24 2074 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
3e6c06f4 2075 TH2D *gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
dd3fa486 2076 ";;P_{T} [GeV/c]",
2077 fNBinsY,fMinY,fMaxY,
2078 fNBinsPt,fMinPt,fMaxPt);
2079 if(fAnalysisEtaMode)
2080 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2081 else
2082 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("y");
3e6c06f4 2083 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
2084 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
9c0b9f24 2085 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
3e6c06f4 2086
1c21299a 2087 TH2D *gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
dd3fa486 2088 ";;P_{T} [GeV/c]",
1c21299a 2089 fNBinsY,fMinY,fMaxY,
2090 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 2091 if(fAnalysisEtaMode)
2092 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("#eta");
2093 else
2094 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("y");
1c21299a 2095 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
2096 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
9c0b9f24 2097 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
1c21299a 2098 TH2D *gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
dd3fa486 2099 ";;P_{T} [GeV/c]",
1c21299a 2100 fNBinsY,fMinY,fMaxY,
2101 fNBinsPt,fMinPt,fMaxPt);
dd3fa486 2102 if(fAnalysisEtaMode)
2103 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("#eta");
2104 else
2105 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("y");
1c21299a 2106 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
2107 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
9c0b9f24 2108 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
2109
2110 TH3F *gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
dd3fa486 2111 ";;P_{T} [GeV/c];PDG",
9c0b9f24 2112 fNBinsY,fMinY,fMaxY,
2113 fNBinsPt,fMinPt,fMaxPt,
2114 14,-0.5,13.5);
dd3fa486 2115 if(fAnalysisEtaMode)
2116 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("#eta");
2117 else
2118 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("y");
9c0b9f24 2119 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
2120 TH3F *gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
dd3fa486 2121 ";;P_{T} [GeV/c];PDG",
9c0b9f24 2122 fNBinsY,fMinY,fMaxY,
2123 fNBinsPt,fMinPt,fMaxPt,
2124 14,-0.5,13.5);
dd3fa486 2125 if(fAnalysisEtaMode)
2126 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2127 else
2128 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("y");
9c0b9f24 2129 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
1c21299a 2130
3e6c06f4 2131 /*gDirectory->cd("../");
2132 //protons
2133 TDirectory *dirProtons = gDirectory->mkdir("Protons");
2134 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
2135
2136 //________________________________________________________________//
2137 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
2138 dirProtonsPrimary->cd();
2139 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2140 dirProtonsPrimaryAccepted->cd();*/
2141
2142 //Accepted primary protons
a3478218 2143 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
3e6c06f4 2144 ";N_{clusters} (ITS);Entries",
2145 7,0,7);
a3478218 2146 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
2147 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
3e6c06f4 2148 ";x^{2}/N_{clusters} (ITS);Entries",
2149 100,0,4);
a3478218 2150 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
2151 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
3e6c06f4 2152 ";N_{clusters} (TPC);Entries",
2153 100,0,200);
a3478218 2154 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
2155 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
3e6c06f4 2156 ";x^{2}/N_{clusters} (TPC);Entries",
2157 100,0,4);
a3478218 2158 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
2159 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
3e6c06f4 2160 ";#sigma_{y} [cm];Entries",
2161 100,0,4);
a3478218 2162 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
2163 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
3e6c06f4 2164 ";#sigma_{z} [cm];Entries",
2165 100,0,4);
a3478218 2166 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
2167 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
3e6c06f4 2168 ";#sigma_{sin(#phi)};Entries",
2169 100,0,4);
a3478218 2170 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
2171 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
3e6c06f4 2172 ";#sigma_{tan(#lambda)};Entries",
2173 100,0,4);
a3478218 2174 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
2175 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
3e6c06f4 2176 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2177 100,0,4);
a3478218 2178 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
2179 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
3e6c06f4 2180 ";#sigma_{Vertex};Entries",
2181 100,0,10);
a3478218 2182 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
2183 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
3e6c06f4 2184 ";#sigma_{Vertex};Entries",
2185 100,0,10);
a3478218 2186 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
2187 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
3e6c06f4 2188 ";DCA_{xy} [cm];Entries",
2189 100,0,20);
a3478218 2190 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
2191 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
3e6c06f4 2192 ";DCA_{xy} [cm];Entries",
2193 100,0,20);
a3478218 2194 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
2195 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
3e6c06f4 2196 ";DCA_{z} [cm];Entries",
2197 100,0,20);
a3478218 2198 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
2199 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
3e6c06f4 2200 ";DCA_{z} [cm];Entries",
2201 100,0,20);
a3478218 2202 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
2203 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
3e6c06f4 2204 ";Log_{10}(#chi^{2});Entries",
2205 100,-10,10);
a3478218 2206 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
2207 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
3e6c06f4 2208 "",10,-1,1);
a3478218 2209 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
2210 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
3e6c06f4 2211 "",10,-1,1);
a3478218 2212 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
2213 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
3e6c06f4 2214 "",10,-1,1);
a3478218 2215 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
2216 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
3e6c06f4 2217 "",10,-1,1);
a3478218 2218 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2219 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
0008a5a6 2220 "",10,-1,1);
a3478218 2221 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2222 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
0008a5a6 2223 "",10,-1,1);
a3478218 2224 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2225 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
0008a5a6 2226 "",10,-1,1);
a3478218 2227 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2228 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
0008a5a6 2229 "",10,-1,1);
a3478218 2230 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2231 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
0008a5a6 2232 "",10,-1,1);
a3478218 2233 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2234 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
0008a5a6 2235 "",10,-1,1);
a3478218 2236 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
3e6c06f4 2237
2238 //Rejected primary protons
2239 /*gDirectory->cd("../");
2240 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2241 dirProtonsPrimaryRejected->cd();*/
2242
a3478218 2243 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
3e6c06f4 2244 ";N_{clusters} (ITS);Entries",
2245 7,0,7);
a3478218 2246 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2247 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
3e6c06f4 2248 ";x^{2}/N_{clusters} (ITS);Entries",
2249 100,0,4);
a3478218 2250 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2251 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
3e6c06f4 2252 ";N_{clusters} (TPC);Entries",
2253 100,0,200);
a3478218 2254 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2255 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
3e6c06f4 2256 ";x^{2}/N_{clusters} (TPC);Entries",
2257 100,0,4);
a3478218 2258 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2259 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
3e6c06f4 2260 ";#sigma_{y} [cm];Entries",
2261 100,0,4);
a3478218 2262 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2263 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
3e6c06f4 2264 ";#sigma_{z} [cm];Entries",
2265 100,0,4);
a3478218 2266 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2267 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
3e6c06f4 2268 ";#sigma_{sin(#phi)};Entries",
2269 100,0,4);
a3478218 2270 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2271 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
3e6c06f4 2272 ";#sigma_{tan(#lambda)};Entries",
2273 100,0,4);
a3478218 2274 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2275 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
3e6c06f4 2276 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2277 100,0,4);
a3478218 2278 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2279 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
3e6c06f4 2280 ";#sigma_{Vertex};Entries",
2281 100,0,10);
a3478218 2282 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2283 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
3e6c06f4 2284 ";#sigma_{Vertex};Entries",
2285 100,0,10);
a3478218 2286 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2287 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
3e6c06f4 2288 ";DCA_{xy} [cm];Entries",
2289 100,0,20);
a3478218 2290 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2291 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
3e6c06f4 2292 ";DCA_{xy} [cm];Entries",
2293 100,0,20);
a3478218 2294 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2295 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
3e6c06f4 2296 ";DCA_{z} [cm];Entries",
2297 100,0,20);
a3478218 2298 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2299 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
3e6c06f4 2300 ";DCA_{z} [cm];Entries",
2301 100,0,20);
a3478218 2302 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2303 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
3e6c06f4 2304 ";Log_{10}(#chi^{2});Entries",
2305 100,-10,10);
a3478218 2306 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2307 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
3e6c06f4 2308 "",10,-1,1);
a3478218 2309 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2310 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
3e6c06f4 2311 "",10,-1,1);
a3478218 2312 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2313 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
3e6c06f4 2314 "",10,-1,1);
a3478218 2315 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2316 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
3e6c06f4 2317 "",10,-1,1);
a3478218 2318 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2319 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
0008a5a6 2320 "",10,-1,1);
a3478218 2321 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2322 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
0008a5a6 2323 "",10,-1,1);
a3478218 2324 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2325 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
0008a5a6 2326 "",10,-1,1);
a3478218 2327 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2328 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
0008a5a6 2329 "",10,-1,1);
a3478218 2330 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2331 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
0008a5a6 2332 "",10,-1,1);
a3478218 2333 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2334 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
0008a5a6 2335 "",10,-1,1);
a3478218 2336 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
3e6c06f4 2337
2338 //________________________________________________________________//
2339 /*gDirectory->cd("../../");
2340
2341 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2342 dirProtonsSecondary->cd();
2343 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2344 dirProtonsSecondaryAccepted->cd();*/
2345
2346 //Accepted secondary protons
a3478218 2347 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
3e6c06f4 2348 ";N_{clusters} (ITS);Entries",
2349 7,0,7);
a3478218 2350 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2351 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
3e6c06f4 2352 ";x^{2}/N_{clusters} (ITS);Entries",
2353 100,0,4);
a3478218 2354 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2355 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
3e6c06f4 2356 ";N_{clusters} (TPC);Entries",
2357 100,0,200);
a3478218 2358 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2359 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
3e6c06f4 2360 ";x^{2}/N_{clusters} (TPC);Entries",
2361 100,0,4);
a3478218 2362 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2363 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
3e6c06f4 2364 ";#sigma_{y} [cm];Entries",
2365 100,0,4);
a3478218 2366 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2367 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
3e6c06f4 2368 ";#sigma_{z} [cm];Entries",
2369 100,0,4);
a3478218 2370 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2371 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
3e6c06f4 2372 ";#sigma_{sin(#phi)};Entries",
2373 100,0,4);
a3478218 2374 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2375 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
3e6c06f4 2376 ";#sigma_{tan(#lambda)};Entries",
2377 100,0,4);
a3478218 2378 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2379 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
3e6c06f4 2380 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2381 100,0,4);
a3478218 2382 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2383 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
3e6c06f4 2384 ";#sigma_{Vertex};Entries",
2385 100,0,10);
a3478218 2386 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2387 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
3e6c06f4 2388 ";#sigma_{Vertex};Entries",
2389 100,0,10);
a3478218 2390 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2391 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
3e6c06f4 2392 ";DCA_{xy} [cm];Entries",
2393 100,0,20);
a3478218 2394 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2395 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
3e6c06f4 2396 ";DCA_{xy} [cm];Entries",
2397 100,0,20);
a3478218 2398 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2399 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
3e6c06f4 2400 ";DCA_{z} [cm];Entries",
2401 100,0,20);
a3478218 2402 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2403 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
3e6c06f4 2404 ";DCA_{z} [cm];Entries",
2405 100,0,20);
a3478218 2406 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2407 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
3e6c06f4 2408 ";Log_{10}(#chi^{2});Entries",
2409 100,-10,10);
a3478218 2410 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2411 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
3e6c06f4 2412 "",10,-1,1);
a3478218 2413 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2414 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
3e6c06f4 2415 "",10,-1,1);
a3478218 2416 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2417 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
3e6c06f4 2418 "",10,-1,1);
a3478218 2419 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2420 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
3e6c06f4 2421 "",10,-1,1);
a3478218 2422 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2423 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
0008a5a6 2424 "",10,-1,1);
a3478218 2425 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2426 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
0008a5a6 2427 "",10,-1,1);
a3478218 2428 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2429 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
0008a5a6 2430 "",10,-1,1);
a3478218 2431 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2432 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
0008a5a6 2433 "",10,-1,1);
a3478218 2434 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2435 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
0008a5a6 2436 "",10,-1,1);
a3478218 2437 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2438 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
0008a5a6 2439 "",10,-1,1);
a3478218 2440 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
3e6c06f4 2441
2442 //Rejected secondary protons
2443 /*gDirectory->cd("../");
2444 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2445 dirProtonsSecondaryRejected->cd();*/
2446
a3478218 2447 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
3e6c06f4 2448 ";N_{clusters} (ITS);Entries",
2449 7,0,7);
a3478218 2450 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2451 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
3e6c06f4 2452 ";x^{2}/N_{clusters} (ITS);Entries",
2453 100,0,4);
a3478218 2454 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2455 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
3e6c06f4 2456 ";N_{clusters} (TPC);Entries",
2457 100,0,200);
a3478218 2458 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2459 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
3e6c06f4 2460 ";x^{2}/N_{clusters} (TPC);Entries",
2461 100,0,4);
a3478218 2462 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2463 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
3e6c06f4 2464 ";#sigma_{y} [cm];Entries",
2465 100,0,4);
a3478218 2466 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2467 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
3e6c06f4 2468 ";#sigma_{z} [cm];Entries",
2469 100,0,4);
a3478218 2470 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2471 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
3e6c06f4 2472 ";#sigma_{sin(#phi)};Entries",
2473 100,0,4);
a3478218 2474 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2475 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
3e6c06f4 2476 ";#sigma_{tan(#lambda)};Entries",
2477 100,0,4);
a3478218 2478 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2479 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
3e6c06f4 2480 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2481 100,0,4);
a3478218 2482 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2483 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
3e6c06f4 2484 ";#sigma_{Vertex};Entries",
2485 100,0,10);
a3478218 2486 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2487 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
3e6c06f4 2488 ";#sigma_{Vertex};Entries",
2489 100,0,10);
a3478218 2490 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2491 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
3e6c06f4 2492 ";DCA_{xy} [cm];Entries",
2493 100,0,20);
a3478218 2494 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2495 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
3e6c06f4 2496 ";DCA_{xy} [cm];Entries",
2497 100,0,20);
a3478218 2498 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2499 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
3e6c06f4 2500 ";DCA_{z} [cm];Entries",
2501 100,0,20);
a3478218 2502 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2503 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
3e6c06f4 2504 ";DCA_{z} [cm];Entries",
2505 100,0,20);
a3478218 2506 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2507 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
3e6c06f4 2508 ";Log_{10}(#chi^{2});Entries",
2509 100,-10,10);
a3478218 2510 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2511 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
3e6c06f4 2512 "",10,-1,1);
a3478218 2513 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2514 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
3e6c06f4 2515 "",10,-1,1);
a3478218 2516 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2517 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
3e6c06f4 2518 "",10,-1,1);
a3478218 2519 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2520 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
3e6c06f4 2521 "",10,-1,1);
a3478218 2522 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2523 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
0008a5a6 2524 "",10,-1,1);
a3478218 2525 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2526 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
0008a5a6 2527 "",10,-1,1);
a3478218 2528 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2529 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
0008a5a6 2530 "",10,-1,1);
a3478218 2531 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2532 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
0008a5a6 2533 "",10,-1,1);
a3478218 2534 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2535 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
0008a5a6 2536 "",10,-1,1);
a3478218 2537 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2538 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
0008a5a6 2539 "",10,-1,1);
a3478218 2540 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
3e6c06f4 2541
2542
2543 /*gDirectory->cd("../../../");
2544
2545 //antiprotons
2546 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2547 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2548
2549 //________________________________________________________________//
2550 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2551 dirAntiProtonsPrimary->cd();
2552 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2553 dirAntiProtonsPrimaryAccepted->cd();*/
2554
2555 //Accepted primary antiprotons
a3478218 2556 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
3e6c06f4 2557 ";N_{clusters} (ITS);Entries",
2558 7,0,7);
a3478218 2559 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2560 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
3e6c06f4 2561 ";x^{2}/N_{clusters} (ITS);Entries",
2562 100,0,4);
a3478218 2563 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2564 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
3e6c06f4 2565 ";N_{clusters} (TPC);Entries",
2566 100,0,200);
a3478218 2567 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2568 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
3e6c06f4 2569 ";x^{2}/N_{clusters} (TPC);Entries",
2570 100,0,4);
a3478218 2571 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2572 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
3e6c06f4 2573 ";#sigma_{y} [cm];Entries",
2574 100,0,4);
a3478218 2575 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2576 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
3e6c06f4 2577 ";#sigma_{z} [cm];Entries",
2578 100,0,4);
a3478218 2579 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2580 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
3e6c06f4 2581 ";#sigma_{sin(#phi)};Entries",
2582 100,0,4);
a3478218 2583 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2584 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
3e6c06f4 2585 ";#sigma_{tan(#lambda)};Entries",
2586 100,0,4);
a3478218 2587 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2588 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
3e6c06f4 2589 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2590 100,0,4);
a3478218 2591 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2592 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
3e6c06f4 2593 ";#sigma_{Vertex};Entries",
2594 100,0,10);
a3478218 2595 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2596 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
3e6c06f4 2597 ";#sigma_{Vertex};Entries",
2598 100,0,10);
a3478218 2599 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2600 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
3e6c06f4 2601 ";DCA_{xy} [cm];Entries",
2602 100,0,20);
a3478218 2603 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2604 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
3e6c06f4 2605 ";DCA_{xy} [cm];Entries",
2606 100,0,20);
a3478218 2607 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2608 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
3e6c06f4 2609 ";DCA_{z} [cm];Entries",
2610 100,0,20);
a3478218 2611 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2612 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
3e6c06f4 2613 ";DCA_{z} [cm];Entries",
2614 100,0,20);
a3478218 2615 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2616 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
3e6c06f4 2617 ";Log_{10}(#chi^{2});Entries",
2618 100,-10,10);
a3478218 2619 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2620 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
3e6c06f4 2621 "",10,-1,1);
a3478218 2622 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2623 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
3e6c06f4 2624 "",10,-1,1);
a3478218 2625 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2626 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
3e6c06f4 2627 "",10,-1,1);
a3478218 2628 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2629 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
3e6c06f4 2630 "",10,-1,1);
a3478218 2631 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2632 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
0008a5a6 2633 "",10,-1,1);
a3478218 2634 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2635 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
0008a5a6 2636 "",10,-1,1);
a3478218 2637 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2638 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
0008a5a6 2639 "",10,-1,1);
a3478218 2640 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2641 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
0008a5a6 2642 "",10,-1,1);
a3478218 2643 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2644 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
0008a5a6 2645 "",10,-1,1);
a3478218 2646 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2647 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
0008a5a6 2648 "",10,-1,1);
a3478218 2649 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
3e6c06f4 2650
2651 //Rejected primary antiprotons
2652 /*gDirectory->cd("../");
2653 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2654 dirAntiProtonsPrimaryRejected->cd();*/
2655
a3478218 2656 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
3e6c06f4 2657 ";N_{clusters} (ITS);Entries",
2658 7,0,7);
a3478218 2659 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2660 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
3e6c06f4 2661 ";x^{2}/N_{clusters} (ITS);Entries",
2662 100,0,4);
a3478218 2663 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
2664 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
3e6c06f4 2665 ";N_{clusters} (TPC);Entries",
2666 100,0,200);
a3478218 2667 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
2668 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
3e6c06f4 2669 ";x^{2}/N_{clusters} (TPC);Entries",
2670 100,0,4);
a3478218 2671 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
2672 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
3e6c06f4 2673 ";#sigma_{y} [cm];Entries",
2674 100,0,4);
a3478218 2675 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
2676 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
3e6c06f4 2677 ";#sigma_{z} [cm];Entries",
2678 100,0,4);
a3478218 2679 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
2680 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
3e6c06f4 2681 ";#sigma_{sin(#phi)};Entries",
2682 100,0,4);
a3478218 2683 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
2684 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
3e6c06f4 2685 ";#sigma_{tan(#lambda)};Entries",
2686 100,0,4);
a3478218 2687 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
2688 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
3e6c06f4 2689 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2690 100,0,4);
a3478218 2691 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
2692 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
3e6c06f4 2693 ";#sigma_{Vertex};Entries",
2694 100,0,10);
a3478218 2695 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
2696 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
3e6c06f4 2697 ";#sigma_{Vertex};Entries",
2698 100,0,10);
a3478218 2699 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
2700 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
3e6c06f4 2701 ";DCA_{xy} [cm];Entries",
2702 100,0,20);
a3478218 2703 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
2704 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
3e6c06f4 2705 ";DCA_{xy} [cm];Entries",
2706 100,0,20);
a3478218 2707 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
2708 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
3e6c06f4 2709 ";DCA_{z} [cm];Entries",
2710 100,0,20);
a3478218 2711 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
2712 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
3e6c06f4 2713 ";DCA_{z} [cm];Entries",
2714 100,0,20);
a3478218 2715 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
2716 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
3e6c06f4 2717 ";Log_{10}(#chi^{2});Entries",
2718 100,-10,10);
a3478218 2719 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
2720 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
3e6c06f4 2721 "",10,-1,1);
a3478218 2722 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
2723 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
3e6c06f4 2724 "",10,-1,1);
a3478218 2725 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
2726 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
3e6c06f4 2727 "",10,-1,1);
a3478218 2728 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
2729 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
3e6c06f4 2730 "",10,-1,1);
a3478218 2731 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
2732 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
0008a5a6 2733 "",10,-1,1);
a3478218 2734 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
2735 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
0008a5a6 2736 "",10,-1,1);
a3478218 2737 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
2738 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
0008a5a6 2739 "",10,-1,1);
a3478218 2740 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
2741 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
0008a5a6 2742 "",10,-1,1);
a3478218 2743 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
2744 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
0008a5a6 2745 "",10,-1,1);
a3478218 2746 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
2747 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
0008a5a6 2748 "",10,-1,1);
a3478218 2749 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
3e6c06f4 2750
2751 //________________________________________________________________//
2752 /*gDirectory->cd("../../");
2753
2754 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
2755 dirAntiProtonsSecondary->cd();
2756 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2757 dirAntiProtonsSecondaryAccepted->cd();*/
2758
2759 //Accepted secondary antiprotons
a3478218 2760 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
3e6c06f4 2761 ";N_{clusters} (ITS);Entries",
2762 7,0,7);
a3478218 2763 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
2764 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
3e6c06f4 2765 ";x^{2}/N_{clusters} (ITS);Entries",
2766 100,0,4);
a3478218 2767 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
2768 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
3e6c06f4 2769 ";N_{clusters} (TPC);Entries",
2770 100,0,200);
a3478218 2771 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
2772 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
3e6c06f4 2773 ";x^{2}/N_{clusters} (TPC);Entries",
2774 100,0,4);
a3478218 2775 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
2776 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
3e6c06f4 2777 ";#sigma_{y} [cm];Entries",
2778 100,0,4);
a3478218 2779 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
2780 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
3e6c06f4 2781 ";#sigma_{z} [cm];Entries",
2782 100,0,4);
a3478218 2783 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
2784 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
3e6c06f4 2785 ";#sigma_{sin(#phi)};Entries",
2786 100,0,4);
a3478218 2787 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
2788 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
3e6c06f4 2789 ";#sigma_{tan(#lambda)};Entries",
2790 100,0,4);
a3478218 2791 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
2792 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
3e6c06f4 2793 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2794 100,0,4);
a3478218 2795 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
2796 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
3e6c06f4 2797 ";#sigma_{Vertex};Entries",
2798 100,0,10);
a3478218 2799 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
2800 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
3e6c06f4 2801 ";#sigma_{Vertex};Entries",
2802 100,0,10);
a3478218 2803 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
2804 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
3e6c06f4 2805 ";DCA_{xy} [cm];Entries",
2806 100,0,20);
a3478218 2807 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
2808 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
3e6c06f4 2809 ";DCA_{xy} [cm];Entries",
2810 100,0,20);
a3478218 2811 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
2812 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
3e6c06f4 2813 ";DCA_{z} [cm];Entries",
2814 100,0,20);
a3478218 2815 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
2816 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
3e6c06f4 2817 ";DCA_{z} [cm];Entries",
2818 100,0,20);
a3478218 2819 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
2820 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
3e6c06f4 2821 ";Log_{10}(#chi^{2});Entries",
2822 100,-10,10);
a3478218 2823 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
2824 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
3e6c06f4 2825 "",10,-1,1);
a3478218 2826 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
2827 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
3e6c06f4 2828 "",10,-1,1);
a3478218 2829 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
2830 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
3e6c06f4 2831 "",10,-1,1);
a3478218 2832 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
2833 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
3e6c06f4 2834 "",10,-1,1);
a3478218 2835 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
2836 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
0008a5a6 2837 "",10,-1,1);
a3478218 2838 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
2839 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
0008a5a6 2840 "",10,-1,1);
a3478218 2841 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
2842 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
0008a5a6 2843 "",10,-1,1);
a3478218 2844 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
2845 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
0008a5a6 2846 "",10,-1,1);
a3478218 2847 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
2848 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
0008a5a6 2849 "",10,-1,1);
a3478218 2850 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
2851 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
0008a5a6 2852 "",10,-1,1);
a3478218 2853 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
3e6c06f4 2854
2855 //Rejected secondary antiprotons
2856 /*gDirectory->cd("../");
2857 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2858 dirAntiProtonsSecondaryRejected->cd();*/
2859
a3478218 2860 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
3e6c06f4 2861 ";N_{clusters} (ITS);Entries",
2862 7,0,7);
a3478218 2863 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
2864 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
3e6c06f4 2865 ";x^{2}/N_{clusters} (ITS);Entries",
2866 100,0,4);
a3478218 2867 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
2868 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
3e6c06f4 2869 ";N_{clusters} (TPC);Entries",
2870 100,0,200);
a3478218 2871 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
2872 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
3e6c06f4 2873 ";x^{2}/N_{clusters} (TPC);Entries",
2874 100,0,4);
a3478218 2875 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
2876 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
3e6c06f4 2877 ";#sigma_{y} [cm];Entries",
2878 100,0,4);
a3478218 2879 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
2880 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
3e6c06f4 2881 ";#sigma_{z} [cm];Entries",
2882 100,0,4);
a3478218 2883 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
2884 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
3e6c06f4 2885 ";#sigma_{sin(#phi)};Entries",
2886 100,0,4);
a3478218 2887 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
2888 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
3e6c06f4 2889 ";#sigma_{tan(#lambda)};Entries",
2890 100,0,4);
a3478218 2891 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
2892 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
3e6c06f4 2893 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2894 100,0,4);
a3478218 2895 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
2896 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
3e6c06f4 2897 ";#sigma_{Vertex};Entries",
2898 100,0,10);
a3478218 2899 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
2900 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
3e6c06f4 2901 ";#sigma_{Vertex};Entries",
2902 100,0,10);
a3478218 2903 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
2904 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
3e6c06f4 2905 ";DCA_{xy} [cm];Entries",
2906 100,0,20);
a3478218 2907 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
2908 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
3e6c06f4 2909 ";DCA_{xy} [cm];Entries",
2910 100,0,20);
a3478218 2911 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
2912 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
3e6c06f4 2913 ";DCA_{z} [cm];Entries",
2914 100,0,20);
a3478218 2915 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
2916 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
3e6c06f4 2917 ";DCA_{z} [cm];Entries",
2918 100,0,20);
a3478218 2919 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
2920 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
3e6c06f4 2921 ";Log_{10}(#chi^{2});Entries",
2922 100,-10,10);
a3478218 2923 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
2924 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
3e6c06f4 2925 "",10,-1,1);
a3478218 2926 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
2927 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
3e6c06f4 2928 "",10,-1,1);
a3478218 2929 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
2930 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
3e6c06f4 2931 "",10,-1,1);
a3478218 2932 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
2933 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
3e6c06f4 2934 "",10,-1,1);
a3478218 2935 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
2936 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
0008a5a6 2937 "",10,-1,1);
a3478218 2938 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
2939 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
0008a5a6 2940 "",10,-1,1);
a3478218 2941 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
2942 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
0008a5a6 2943 "",10,-1,1);
a3478218 2944 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
2945 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
0008a5a6 2946 "",10,-1,1);
a3478218 2947 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
2948 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
0008a5a6 2949 "",10,-1,1);
a3478218 2950 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
2951 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
0008a5a6 2952 "",10,-1,1);
a3478218 2953 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
3e6c06f4 2954}
2955
2956//____________________________________________________________________//
9c0b9f24 2957void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *stack,
6667f3a7 2958 AliESDEvent *esd,
2959 const AliESDVertex *vertex) {
9c0b9f24 2960 //Runs the efficiency code
2961 //MC loop
2962 Int_t nMCProtons = 0, nESDProtons = 0;
e13bbda6 2963 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
9c0b9f24 2964 TParticle *particle = stack->Particle(iParticle);
2965 if(!particle) continue;
55f9a666 2966
9c0b9f24 2967 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2968 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
dd3fa486 2969 if(fAnalysisEtaMode) {
e13bbda6 2970 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
2971 }
2972 else
2973 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
9c0b9f24 2974
2975 Int_t pdgcode = particle->GetPdgCode();
e13bbda6 2976 if(TMath::Abs(pdgcode) != 2212) continue;
2977
2978 if(iParticle <= stack->GetNprimary()) {
2979 if(pdgcode == 2212) {
2980 nMCProtons += 1;
dd3fa486 2981 if(fAnalysisEtaMode)
e13bbda6 2982 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
2983 particle->Pt());
2984 else
2985 ((TH2D *)(fEfficiencyList->At(0)))->Fill(Rapidity(particle->Px(),
2986 particle->Py(),
2987 particle->Pz()),
2988 particle->Pt());
2989 }//protons
2990 if(pdgcode == -2212) {
dd3fa486 2991 if(fAnalysisEtaMode)
e13bbda6 2992 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
2993 particle->Pt());
2994 else
2995 ((TH2D *)(fEfficiencyList->At(1)))->Fill(Rapidity(particle->Px(),
2996 particle->Py(),
2997 particle->Pz()),
2998 particle->Pt());
2999 }//antiprotons
3000 }//primaries
3001 else {
3002 //secondaries
3003 Int_t lPartMother = -1;
3004 Int_t motherPDGCode = -1;
3005 lPartMother = particle->GetFirstMother();
3006 TParticle *motherParticle = stack->Particle(lPartMother);
3007 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3008
3009 if(pdgcode == 2212) {
3010 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
dd3fa486 3011 if(fAnalysisEtaMode)
e13bbda6 3012 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3013 particle->Pt());
3014 else
3015 ((TH2D *)(fEfficiencyList->At(2)))->Fill(Rapidity(particle->Px(),
3016 particle->Py(),
3017 particle->Pz()),
3018 particle->Pt());
3019 }//weak decays
3020 if((particle->GetUniqueID() == 13)) {
dd3fa486 3021 if(fAnalysisEtaMode)
e13bbda6 3022 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3023 particle->Pt());
3024 else
3025 ((TH2D *)(fEfficiencyList->At(4)))->Fill(Rapidity(particle->Px(),
3026 particle->Py(),
3027 particle->Pz()),
3028 particle->Pt());
3029 }//hadronic interactions
3030 }//protons
3031 if(pdgcode == -2212) {
3032 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
dd3fa486 3033 if(fAnalysisEtaMode)
e13bbda6 3034 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3035 particle->Pt());
3036 else
3037 ((TH2D *)(fEfficiencyList->At(3)))->Fill(Rapidity(particle->Px(),
3038 particle->Py(),
3039 particle->Pz()),
3040 particle->Pt());
3041 }//weak decays
3042 if((particle->GetUniqueID() == 13)) {
dd3fa486 3043 if(fAnalysisEtaMode)
e13bbda6 3044 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3045 particle->Pt());
3046 else
3047 ((TH2D *)(fEfficiencyList->At(5)))->Fill(Rapidity(particle->Px(),
3048 particle->Py(),
3049 particle->Pz()),
3050 particle->Pt());
3051 }//hadronic interactions
3052 }//antiprotons
3053 }//secondaries
3054
9c0b9f24 3055 }//MC loop
3056
6667f3a7 3057 //ESD track loop
9c0b9f24 3058 Int_t nGoodTracks = esd->GetNumberOfTracks();
3059 TArrayI labelArray(nGoodTracks);
3060 Int_t labelCounter = 0;
3061 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3062 AliESDtrack* track = esd->GetTrack(iTracks);
3063 if(!track) continue;
6667f3a7 3064
9c0b9f24 3065 Int_t label = TMath::Abs(track->GetLabel());
3066 if(IsLabelUsed(labelArray,label)) continue;
3067 labelArray.AddAt(label,labelCounter);
3068 labelCounter += 1;
6667f3a7 3069
9c0b9f24 3070 TParticle *particle = stack->Particle(label);
3071 if(!particle) continue;
3072 Int_t pdgcode = particle->GetPdgCode();
e13bbda6 3073 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
9c0b9f24 3074
3075 Double_t Pt = 0.0, P = 0.0;
3076 Double_t probability[5];
3077
3078 //TPC only
3079 if(fUseTPCOnly) {
3080 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3081 if(!tpcTrack) continue;
3082 Pt = tpcTrack->Pt();
3083 P = tpcTrack->P();
6667f3a7 3084
e13bbda6 3085 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
dd3fa486 3086 if(fAnalysisEtaMode) {
e13bbda6 3087 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3088 }
3089 else
3090 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3091
3092 if(fUseCutsInEfficiency)
6667f3a7 3093 if(!IsAccepted(esd,vertex,track)) continue;
3094
9c0b9f24 3095 //reconstructed primary (anti)protons
3096 if(pdgcode == 2212) {
dd3fa486 3097 if(fAnalysisEtaMode)
e13bbda6 3098 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
5429dd65 3099 particle->Pt());
e13bbda6 3100 else
3101 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
5429dd65 3102 particle->Py(),
3103 particle->Pz()),
3104 particle->Pt());
9c0b9f24 3105 if(label <= stack->GetNprimary()) {
3106 nESDProtons += 1;
dd3fa486 3107 if(fAnalysisEtaMode)
e13bbda6 3108 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3109 particle->Pt());
3110 else
3111 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3112 particle->Py(),
3113 particle->Pz()),
3114 particle->Pt());
3115 }//primaries
3116 if(label > stack->GetNprimary()) {
3117 Int_t lPartMother = -1;
3118 Int_t motherPDGCode = -1;
3119 lPartMother = particle->GetFirstMother();
3120 TParticle *motherParticle = stack->Particle(lPartMother);
3121 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
6667f3a7 3122
e13bbda6 3123 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
dd3fa486 3124 if(fAnalysisEtaMode)
e13bbda6 3125 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3126 particle->Pt());
3127 else
3128 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3129 particle->Py(),
3130 particle->Pz()),
3131 particle->Pt());
3132 }//weak decays
3133 if((particle->GetUniqueID() == 13)) {
dd3fa486 3134 if(fAnalysisEtaMode)
e13bbda6 3135 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3136 particle->Pt());
3137 else
3138 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3139 particle->Py(),
3140 particle->Pz()),
3141 particle->Pt());
3142 }//hadronic interactions
3143 }//secondaries
9c0b9f24 3144 }//initial protons
e13bbda6 3145 if(pdgcode == -2212) {
dd3fa486 3146 if(fAnalysisEtaMode)
e13bbda6 3147 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
5429dd65 3148 particle->Pt());
e13bbda6 3149 else
3150 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
5429dd65 3151 particle->Py(),
3152 particle->Pz()),
3153 particle->Pt());
e13bbda6 3154 if(label <= stack->GetNprimary()) {
dd3fa486 3155 if(fAnalysisEtaMode)
e13bbda6 3156 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3157 particle->Pt());
3158 else
3159 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3160 particle->Py(),
3161 particle->Pz()),
3162 particle->Pt());
3163 }//primaries
3164 if(label > stack->GetNprimary()) {
3165 Int_t lPartMother = -1;
3166 Int_t motherPDGCode = -1;
3167 lPartMother = particle->GetFirstMother();
3168 TParticle *motherParticle = stack->Particle(lPartMother);
3169 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
6667f3a7 3170
e13bbda6 3171 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
dd3fa486 3172 if(fAnalysisEtaMode)
e13bbda6 3173 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3174 particle->Pt());
3175 else
3176 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3177 particle->Py(),
3178 particle->Pz()),
3179 particle->Pt());
3180 }//weak decays
3181 if((particle->GetUniqueID() == 13)) {
dd3fa486 3182 if(fAnalysisEtaMode)
e13bbda6 3183 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3184 particle->Pt());
3185 else
3186 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3187 particle->Py(),
3188 particle->Pz()),
3189 particle->Pt());
3190 }//hadronic interactions
3191 }//secondaries
9c0b9f24 3192 }//initial antiprotons
e13bbda6 3193
9c0b9f24 3194 //pid
3195 track->GetTPCpid(probability);
3196 Double_t rcc = 0.0;
3197 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3198 rcc += probability[i]*GetParticleFraction(i,P);
3199 if(rcc == 0.0) continue;
3200 Double_t w[5];
3201 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3202 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3203 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3204 if(fParticleType == 4) {
dd3fa486 3205 if(fAnalysisEtaMode)
e13bbda6 3206 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
5429dd65 3207 particle->Pt());
e13bbda6 3208 else
3209 ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
5429dd65 3210 particle->Py(),
3211 particle->Pz()),
3212 particle->Pt());
3213 if(TMath::Abs(pdgcode) == 2212) {
dd3fa486 3214 if(fAnalysisEtaMode)
e13bbda6 3215 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
5429dd65 3216 particle->Pt());
e13bbda6 3217 else
3218 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
5429dd65 3219 particle->Py(),
3220 particle->Pz()),
3221 particle->Pt());
3222 }//properly identified as proton
3223 else {
dd3fa486 3224 if(fAnalysisEtaMode)
e13bbda6 3225 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
5429dd65 3226 particle->Pt());
e13bbda6 3227 else
3228 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
5429dd65 3229 particle->Py(),
3230 particle->Pz()),
3231 particle->Pt());
3232 }//contamination
9c0b9f24 3233 }//identified as proton
3234 }//TPC only tracks
3235 else if(!fUseTPCOnly) {
e13bbda6 3236 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
dd3fa486 3237 if(fAnalysisEtaMode) {
e13bbda6 3238 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3239 }
3240 else {
3241 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3242 }
3243
3244 if(fUseCutsInEfficiency)
6667f3a7 3245 if(!IsAccepted(esd,vertex,track)) continue;
3246
9c0b9f24 3247 //reconstructed primary (anti)protons
3248 if(pdgcode == 2212) {
dd3fa486 3249 if(fAnalysisEtaMode)
e13bbda6 3250 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
6667f3a7 3251 particle->Pt());
e13bbda6 3252 else
3253 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
6667f3a7 3254 particle->Py(),
3255 particle->Pz()),
3256 particle->Pt());
e13bbda6 3257 if(label <= stack->GetNprimary()) {
3258 nESDProtons += 1;
dd3fa486 3259 if(fAnalysisEtaMode)
e13bbda6 3260 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3261 particle->Pt());
3262 else
3263 ((TH2D *)(fEfficiencyList->At(6)))->Fill(Rapidity(particle->Px(),
3264 particle->Py(),
3265 particle->Pz()),
3266 particle->Pt());
3267 }//primaries
3268 if(label > stack->GetNprimary()) {
3269 Int_t lPartMother = -1;
3270 Int_t motherPDGCode = -1;
3271 lPartMother = particle->GetFirstMother();
3272 TParticle *motherParticle = stack->Particle(lPartMother);
3273 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
6667f3a7 3274
e13bbda6 3275 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
dd3fa486 3276 if(fAnalysisEtaMode)
e13bbda6 3277 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3278 particle->Pt());
3279 else
3280 ((TH2D *)(fEfficiencyList->At(8)))->Fill(Rapidity(particle->Px(),
3281 particle->Py(),
3282 particle->Pz()),
3283 particle->Pt());
3284 }//weak decays
3285 if((particle->GetUniqueID() == 13)) {
dd3fa486 3286 if(fAnalysisEtaMode)
e13bbda6 3287 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3288 particle->Pt());
3289 else
3290 ((TH2D *)(fEfficiencyList->At(10)))->Fill(Rapidity(particle->Px(),
3291 particle->Py(),
3292 particle->Pz()),
3293 particle->Pt());
3294 }//hadronic interactions
3295 }//secondaries
9c0b9f24 3296 }//initial protons
e13bbda6 3297 if(pdgcode == -2212) {
dd3fa486 3298 if(fAnalysisEtaMode)
e13bbda6 3299 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
6667f3a7 3300 particle->Pt());
e13bbda6 3301 else
3302 ((TH2D *)(fEfficiencyList->At(12)))->Fill(Rapidity(particle->Px(),
6667f3a7 3303 particle->Py(),
3304 particle->Pz()),
3305 particle->Pt());
e13bbda6 3306 if(label <= stack->GetNprimary()) {
dd3fa486 3307 if(fAnalysisEtaMode)
e13bbda6 3308 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3309 particle->Pt());
3310 else
3311 ((TH2D *)(fEfficiencyList->At(7)))->Fill(Rapidity(particle->Px(),
3312 particle->Py(),
3313 particle->Pz()),
3314 particle->Pt());
3315 }//primaries
3316 if(label > stack->GetNprimary()) {
3317 Int_t lPartMother = -1;
3318 Int_t motherPDGCode = -1;
3319 lPartMother = particle->GetFirstMother();
3320 TParticle *motherParticle = stack->Particle(lPartMother);
3321 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
6667f3a7 3322
e13bbda6 3323 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
dd3fa486 3324 if(fAnalysisEtaMode)
e13bbda6 3325 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3326 particle->Pt());
3327 else
3328 ((TH2D *)(fEfficiencyList->At(9)))->Fill(Rapidity(particle->Px(),
3329 particle->Py(),
3330 particle->Pz()),
3331 particle->Pt());
3332 }//weak decays
3333 if((particle->GetUniqueID() == 13)) {
dd3fa486 3334 if(fAnalysisEtaMode)
e13bbda6 3335 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3336 particle->Pt());
3337 else
3338 ((TH2D *)(fEfficiencyList->At(11)))->Fill(Rapidity(particle->Px(),
3339 particle->Py(),
3340 particle->Pz()),
3341 particle->Pt());
3342 }//hadronic interactions
3343 }//secondaries
9c0b9f24 3344 }//initial antiprotons
3345
3346 //pid
3347 track->GetESDpid(probability);
3348 Double_t rcc = 0.0;
3349 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3350 rcc += probability[i]*GetParticleFraction(i,P);
3351 if(rcc == 0.0) continue;
3352 Double_t w[5];
3353 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3354 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3355 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3356 if(fParticleType == 4) {
dd3fa486 3357 if(fAnalysisEtaMode)
e13bbda6 3358 ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
5429dd65 3359 particle->Pt());
e13bbda6 3360 else ((TH2D *)(fEfficiencyList->At(14)))->Fill(Rapidity(particle->Px(),
5429dd65 3361 particle->Py(),
3362 particle->Pz()),
3363 particle->Pt());
3364 if(TMath::Abs(pdgcode) == 2212) {
dd3fa486 3365 if(fAnalysisEtaMode)
e13bbda6 3366 ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
5429dd65 3367 particle->Pt());
e13bbda6 3368 else
3369 ((TH2D *)(fEfficiencyList->At(13)))->Fill(Rapidity(particle->Px(),
5429dd65 3370 particle->Py(),
3371 particle->Pz()),
3372 particle->Pt());
3373 }//properly identified as proton
3374 else {
dd3fa486 3375 if(fAnalysisEtaMode)
e13bbda6 3376 ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
5429dd65 3377 particle->Pt());
e13bbda6 3378 else
3379 ((TH2D *)(fEfficiencyList->At(15)))->Fill(Rapidity(particle->Px(),
5429dd65 3380 particle->Py(),
3381 particle->Pz()),
3382 particle->Pt());
3383 }//contamination
9c0b9f24 3384 }//identified as proton
3385 }//global tracking
3386 }//track loop
3387
3388 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
3389}
3390
3391//____________________________________________________________________//
3392Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
3393 Int_t label) {
3394 //Checks if the label is used already
3395 Bool_t status = kFALSE;
3396 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
3397 if(labelArray.At(i) == label)
3398 status = kTRUE;
3399 }
3400
3401 return status;
3402}
3403
75decd62 3404//____________________________________________________________________//
3405void AliProtonQAAnalysis::RunVertexQA(AliGenEventHeader *header,
3406 AliStack *stack,
3407 AliESDEvent *esd) {
3408 //Runs the vertex QA
3409 //MC vertex
3410 TArrayF primaryVertex(3);
3411 header->PrimaryVertex(primaryVertex);
3412
3413 Int_t nPrimaries = stack->GetNprimary();
5661e210 3414 ((TH1F *)(fQAVertexList->At(0)))->Fill(nPrimaries);
75decd62 3415
3416 //TPC vertex
3417 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
3418 if(!vertexTPC) {
3419 Printf("ERROR: Could not retrieve the TPC vertex");
3420 return;
3421 }
3422 if(vertexTPC->GetNContributors() > 0) {
5661e210 3423 ((TH1F *)(fQAVertexList->At(1)))->Fill(nPrimaries);
75decd62 3424 ((TH2F *)(fQAVertexList->At(2)))->Fill(vertexTPC->GetXv(),
3425 vertexTPC->GetNContributors());
3426 ((TH2F *)(fQAVertexList->At(3)))->Fill(vertexTPC->GetYv(),
3427 vertexTPC->GetNContributors());
3428 ((TH2F *)(fQAVertexList->At(4)))->Fill(vertexTPC->GetZv(),
3429 vertexTPC->GetNContributors());
3430 ((TH1F *)(fQAVertexList->At(5)))->Fill((vertexTPC->GetXv()-primaryVertex[0])*10000.);
3431 ((TH1F *)(fQAVertexList->At(6)))->Fill((vertexTPC->GetYv()-primaryVertex[1])*10000.);
3432 ((TH1F *)(fQAVertexList->At(7)))->Fill((vertexTPC->GetZv()-primaryVertex[2])*10000.);
3433 ((TH1F *)(fQAVertexList->At(8)))->Fill(vertexTPC->GetXRes()*10000.);
3434 ((TH1F *)(fQAVertexList->At(9)))->Fill(vertexTPC->GetYRes()*10000.);
3435 ((TH1F *)(fQAVertexList->At(10)))->Fill(vertexTPC->GetZRes()*10000.);
3436 }//TPC vertex
3437
3438 //SPD vertex
3439 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
3440 if(!vertexSPD) {
3441 Printf("ERROR: Could not retrieve the SPD vertex");
3442 return;
3443 }
3444 if(vertexSPD->GetNContributors() > 0) {
5661e210 3445 ((TH1F *)(fQAVertexList->At(11)))->Fill(nPrimaries);
75decd62 3446 ((TH2F *)(fQAVertexList->At(12)))->Fill(vertexSPD->GetXv(),
3447 vertexSPD->GetNContributors());
3448 ((TH2F *)(fQAVertexList->At(13)))->Fill(vertexSPD->GetYv(),
3449 vertexSPD->GetNContributors());
3450 ((TH2F *)(fQAVertexList->At(14)))->Fill(vertexSPD->GetZv(),
3451 vertexSPD->GetNContributors());
3452 ((TH1F *)(fQAVertexList->At(15)))->Fill((vertexSPD->GetXv()-primaryVertex[0])*10000.);
3453 ((TH1F *)(fQAVertexList->At(16)))->Fill((vertexSPD->GetYv()-primaryVertex[1])*10000.);
3454 ((TH1F *)(fQAVertexList->At(17)))->Fill((vertexSPD->GetZv()-primaryVertex[2])*10000.);
3455 ((TH1F *)(fQAVertexList->At(18)))->Fill(vertexSPD->GetXRes()*10000.);
3456 ((TH1F *)(fQAVertexList->At(19)))->Fill(vertexSPD->GetYRes()*10000.);
3457 ((TH1F *)(fQAVertexList->At(20)))->Fill(vertexSPD->GetZRes()*10000.);
3458 }//SPD vertex
3459
3460 //Tracks vertex
3461 const AliESDVertex *vertexTracks = esd->GetPrimaryVertex();
3462 if(!vertexTracks) {
3463 Printf("ERROR: Could not retrieve the Tracks vertex");
3464 return;
3465 }
3466 if(vertexTracks->GetNContributors() > 0) {
5661e210 3467 ((TH1F *)(fQAVertexList->At(21)))->Fill(nPrimaries);
75decd62 3468 ((TH2F *)(fQAVertexList->At(22)))->Fill(vertexTracks->GetXv(),
3469 vertexTracks->GetNContributors());
3470 ((TH2F *)(fQAVertexList->At(23)))->Fill(vertexTracks->GetYv(),
3471 vertexTracks->GetNContributors());
3472 ((TH2F *)(fQAVertexList->At(24)))->Fill(vertexTracks->GetZv(),
3473 vertexTracks->GetNContributors());
3474 ((TH1F *)(fQAVertexList->At(25)))->Fill((vertexTracks->GetXv()-primaryVertex[0])*10000.);
3475 ((TH1F *)(fQAVertexList->At(26)))->Fill((vertexTracks->GetYv()-primaryVertex[1])*10000.);
3476 ((TH1F *)(fQAVertexList->At(27)))->Fill((vertexTracks->GetZv()-primaryVertex[2])*10000.);
3477 ((TH1F *)(fQAVertexList->At(28)))->Fill(vertexTracks->GetXRes()*10000.);
3478 ((TH1F *)(fQAVertexList->At(29)))->Fill(vertexTracks->GetYRes()*10000.);
3479 ((TH1F *)(fQAVertexList->At(30)))->Fill(vertexTracks->GetZRes()*10000.);
3480 }//Tracks vertex
3481
3482}
3483
9c0b9f24 3484//____________________________________________________________________//
3485void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
6667f3a7 3486 AliESDEvent *esd,
3487 const AliESDVertex *vertex) {
3e6c06f4 3488 //Runs the QA code
1c21299a 3489 //MC loop
3490 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
3491 TParticle *particle = stack->Particle(iParticle);
55f9a666 3492 if(!particle) continue;
3493
1c21299a 3494 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3495 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
dd3fa486 3496 if(fAnalysisEtaMode) {
3497 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
3498 }
3499 else {
3500 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3501 }
1c21299a 3502 Int_t pdgcode = particle->GetPdgCode();
dd3fa486 3503 if(pdgcode == 2212) {
3504 if(fAnalysisEtaMode)
3505 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
3506 particle->Pt());
3507 else
3508 ((TH2D *)(fQA2DList->At(8)))->Fill(Rapidity(particle->Px(),
3509 particle->Py(),
3510 particle->Pz()),
3511 particle->Pt());
3512 }
3513 if(pdgcode == -2212) {
3514 if(fAnalysisEtaMode)
3515 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
3516 particle->Pt());
3517 else
3518 ((TH2D *)(fQA2DList->At(9)))->Fill(Rapidity(particle->Px(),
3519 particle->Py(),
3520 particle->Pz()),
3521 particle->Pt());
3522 }
1c21299a 3523 }//MC loop
dd3fa486 3524
6667f3a7 3525 //ESD track loop
9c0b9f24 3526 Int_t nGoodTracks = esd->GetNumberOfTracks();
2b00fd2c 3527 TArrayI labelArray(nGoodTracks);
3528 Int_t labelCounter = 0;
3e6c06f4 3529 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
9c0b9f24 3530 AliESDtrack* track = esd->GetTrack(iTracks);
3531 if(!track) continue;
3532
3e6c06f4 3533 Int_t label = TMath::Abs(track->GetLabel());
2b00fd2c 3534 if(IsLabelUsed(labelArray,label)) continue;
3535 labelArray.AddAt(label,labelCounter);
3536 labelCounter += 1;
6667f3a7 3537
5b44449f 3538 TParticle *particle = stack->Particle(label);
6667f3a7 3539 if(!particle) continue;
5b44449f 3540 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3541
32a2ebb6 3542 AliESDtrack trackTPC;
3543
3544 //in case it's a TPC only track relate it to the proper vertex
3545 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
3546 Float_t p[2],cov[3];
3547 track->GetImpactParametersTPC(p,cov);
3548 if (p[0]==0 && p[1]==0)
3549 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
3550 if (!track->FillTPCOnlyTrack(trackTPC)) {
3551 continue;
3552 }
3553 track = &trackTPC ;
3554 }
6667f3a7 3555
3e6c06f4 3556 Double_t Pt = 0.0, P = 0.0;
3557 Double_t probability[5];
5b8133c7 3558 Float_t dcaXY = 0.0, dcaZ = 0.0;
3559 Double_t nSigmaToVertex = GetSigmaToVertex(track);
3560 Int_t fIdxInt[200];
3561 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
3562 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
6667f3a7 3563
5b8133c7 3564 Float_t chi2PerClusterITS = -1;
3565 if (nClustersITS!=0)
3566 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
3567 Float_t chi2PerClusterTPC = -1;
3568 if (nClustersTPC!=0)
3569 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
3570 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
3571 Double_t extCov[15];
3572 track->GetExternalCovariance(extCov);
6667f3a7 3573
5b8133c7 3574 //TPC only
3e6c06f4 3575 if(fUseTPCOnly) {
3576 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3577 if(!tpcTrack) continue;
3578 Pt = tpcTrack->Pt();
3579 P = tpcTrack->P();
0326e385 3580 if(fUseHybridTPC) track->GetImpactParameters(dcaXY,dcaZ);
3581 else track->GetImpactParametersTPC(dcaXY,dcaZ);
3e6c06f4 3582
3583 //pid
3584 track->GetTPCpid(probability);
3585 Double_t rcc = 0.0;
3586 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3587 rcc += probability[i]*GetParticleFraction(i,P);
3588 if(rcc == 0.0) continue;
3589 Double_t w[5];
3590 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3591 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3592 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3593 if(fParticleType == 4) {
3e23254a 3594 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3595
3596 FillQA(stack,esd,vertex,track);
6667f3a7 3597 if(IsAccepted(esd,vertex,track)) {
3e6c06f4 3598 if(label <= stack->GetNprimary()) {
6667f3a7 3599 if(track->Charge() > 0) {
5b8133c7 3600 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3601 if(track->HasPointOnITSLayer(iLayer))
3602 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3603 }
3604 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3605 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3606 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3607 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3608 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3609 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3610 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3611 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3612 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3613 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
5661e210 3614 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(tpcTrack->Eta(),
3615 tpcTrack->Phi()*180./TMath::Pi(),
3616 nClustersTPC);
6667f3a7 3617
5b8133c7 3618 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3619 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3620 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
dd3fa486 3621 if(fAnalysisEtaMode)
3622 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),Pt);
3623 else
3624 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(tpcTrack->Px(),
3625 tpcTrack->Py(),
3626 tpcTrack->Pz()),
3627 Pt);
3e23254a 3628 }//accepted primary protons
6667f3a7 3629 else if(track->Charge() < 0) {
5b8133c7 3630 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3631 if(track->HasPointOnITSLayer(iLayer))
3632 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3633 }
3634 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3635 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3636 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3637 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3638 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3639 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3640 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3641 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3642 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3643 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
5661e210 3644 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(tpcTrack->Eta(),
3645 tpcTrack->Phi()*180./TMath::Pi(),
3646 nClustersTPC);
6667f3a7 3647
5b8133c7 3648 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3649 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3650 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
dd3fa486 3651 if(fAnalysisEtaMode)
3652 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),Pt);
3653 else
3654 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(tpcTrack->Px(),
3655 tpcTrack->Py(),
3656 tpcTrack->Pz()),
3657 Pt);
3e23254a 3658 }//accepted primary antiprotons
3659 }//accepted primary particles
3e6c06f4 3660 else if(label > stack->GetNprimary()) {
5b8133c7 3661 Int_t lPartMother = -1;
3662 Int_t motherPDGCode = -1;
3663 if(particle) {
3664 lPartMother = particle->GetFirstMother();
3665 TParticle *motherParticle = stack->Particle(lPartMother);
3666 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3667 }
6667f3a7 3668
5b8133c7 3669 if(fMCProcessIdFlag)
3670 if(particle->GetUniqueID() != fMCProcessId) continue;
3671 if(fMotherParticlePDGCodeFlag)
3672 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
6667f3a7 3673
5b8133c7 3674 if(track->Charge() > 0) {
3675 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3676 if(track->HasPointOnITSLayer(iLayer))
3677 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3678 }
3679 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3680 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3681 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3682 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3683 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3684 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3685 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3686 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3687 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3688 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
5661e210 3689 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(tpcTrack->Eta(),
3690 tpcTrack->Phi()*180./TMath::Pi(),
3691 nClustersTPC);
6667f3a7 3692
5b8133c7 3693 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3694 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3695 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
dd3fa486 3696 if(fAnalysisEtaMode)
3697 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),Pt);
3698 else
3699 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(tpcTrack->Px(),
3700 tpcTrack->Py(),
3701 tpcTrack->Pz()),
3702 Pt);
3703 if(fAnalysisEtaMode)
3704 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),Pt,
9c0b9f24 3705 ConvertPDGToInt(motherPDGCode));
dd3fa486 3706 else
3707 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(tpcTrack->Px(),
3708 tpcTrack->Py(),
3709 tpcTrack->Pz()),
3710 Pt,
3711 ConvertPDGToInt(motherPDGCode));
3e23254a 3712 }//accepted secondary protons
6667f3a7 3713 else if(track->Charge() < 0) {
5b8133c7 3714 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3715 if(track->HasPointOnITSLayer(iLayer))
3716 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3717 }
3718 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3719 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3720 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3721 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3722 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3723 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3724 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3725 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3726 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3727 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
5661e210 3728 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(tpcTrack->Eta(),
3729 tpcTrack->Phi()*180./TMath::Pi(),
3730 nClustersTPC);
6667f3a7 3731
5b8133c7 3732 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3733 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3734 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
dd3fa486 3735 if(fAnalysisEtaMode)
3736 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),Pt);
3737 else
3738 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(tpcTrack->Px(),
3739 tpcTrack->Py(),
3740 tpcTrack->Pz()),
3741 Pt);
3742 if(fAnalysisEtaMode)
3743 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),Pt,
3744 ConvertPDGToInt(motherPDGCode));
3745 else
3746 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(tpcTrack->Px(),
3747 tpcTrack->Py(),
3748 tpcTrack->Pz()),
3749 Pt,
3750 ConvertPDGToInt(motherPDGCode));
3e23254a 3751 }//accepted secondary antiprotons
3752 }//accepted secondary particles
5b8133c7 3753 }//accepted - track cuts
8debca88 3754 else {
3e6c06f4 3755 if(label <= stack->GetNprimary()) {
dd3fa486 3756 if(track->Charge() > 0) {
5661e210 3757 ((TH3D *)(fRejectedCutList->At(0)))->Fill(tpcTrack->Eta(),
3758 tpcTrack->Phi()*180./TMath::Pi(),
3759 nClustersTPC);
dd3fa486 3760 if(fAnalysisEtaMode)
3761 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),Pt);
3762 else
3763 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(tpcTrack->Px(),
3764 tpcTrack->Py(),
3765 tpcTrack->Pz()),
3766 Pt);
3767 }
3768 else if(track->Charge() < 0) {
5661e210 3769 ((TH3D *)(fRejectedCutList->At(1)))->Fill(tpcTrack->Eta(),
3770 tpcTrack->Phi()*180./TMath::Pi(),
3771 nClustersTPC);
dd3fa486 3772 if(fAnalysisEtaMode)
3773 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),Pt);
3774 else
3775 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(tpcTrack->Px(),
3776 tpcTrack->Py(),
3777 tpcTrack->Pz()),
3778 Pt);
3779 }
3e23254a 3780 }//rejected primary particles
3e6c06f4 3781 else if(label > stack->GetNprimary()) {
dd3fa486 3782 if(track->Charge() > 0) {
5661e210 3783 ((TH3D *)(fRejectedCutList->At(2)))->Fill(tpcTrack->Eta(),
3784 tpcTrack->Phi()*180./TMath::Pi(),
3785 nClustersTPC);
dd3fa486 3786 if(fAnalysisEtaMode)
3787 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),Pt);
3788 else
3789 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(tpcTrack->Px(),
3790 tpcTrack->Py(),
3791 tpcTrack->Pz()),
3792 Pt);
3793 }
3794 else if(track->Charge() < 0) {
5661e210 3795 ((TH3D *)(fRejectedCutList->At(3)))->Fill(tpcTrack->Eta(),
3796 tpcTrack->Phi()*180./TMath::Pi(),
3797 nClustersTPC);
dd3fa486 3798 if(fAnalysisEtaMode)
3799 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),Pt);
3800 else
3801 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(tpcTrack->Px(),
3802 tpcTrack->Py(),
3803 tpcTrack->Pz()),
3804 Pt);
3805 }
3e23254a 3806 }//rejected secondary particles
5b8133c7 3807 }//rejected - track cuts
3e6c06f4 3808 }//proton check
3809 }//TPC only tracks
5b8133c7 3810 //combined tracking
3e6c06f4 3811 else if(!fUseTPCOnly) {
3812 Pt = track->Pt();
3813 P = track->P();
5b8133c7 3814 track->GetImpactParameters(dcaXY,dcaZ);
6667f3a7 3815
3e6c06f4 3816 //pid
3817 track->GetESDpid(probability);
3818 Double_t rcc = 0.0;
3819 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3820 rcc += probability[i]*GetParticleFraction(i,P);
3821 if(rcc == 0.0) continue;
3822 Double_t w[5];
3823 for(Int_t i = 0; i < AliPID::kSPECIES; i++)
3824 w[i] = probability[i]*GetParticleFraction(i,P)/rcc;
3825 Long64_t fParticleType = TMath::LocMax(AliPID::kSPECIES,w);
3826 if(fParticleType == 4) {
3e23254a 3827 if(!IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
3828
3829 FillQA(stack,esd,vertex,track);
6667f3a7 3830 if(IsAccepted(esd,vertex,track)) {
3e6c06f4 3831 if(label <= stack->GetNprimary()) {
6667f3a7 3832 if(track->Charge() > 0) {
5b8133c7 3833 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3834 if(track->HasPointOnITSLayer(iLayer))
3835 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
3836 }
3837 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
3838 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
3839 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
3840 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
3841 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
3842 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
3843 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
3844 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
3845 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
3846 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
5661e210 3847 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(track->Eta(),
3848 track->Phi()*180./TMath::Pi(),
3849 nClustersTPC);
6667f3a7 3850
5b8133c7 3851 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
3852 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
3853 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
dd3fa486 3854 if(fAnalysisEtaMode)
3855 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),Pt);
3856 else
3857 ((TH2D *)(fQA2DList->At(0)))->Fill(Rapidity(track->Px(),
3858 track->Py(),
3859 track->Pz()),
3860 Pt);
5b8133c7 3861 }
6667f3a7 3862 else if(track->Charge() < 0) {
5b8133c7 3863 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3864 if(track->HasPointOnITSLayer(iLayer))
3865 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
3866 }
3867 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
3868 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
3869 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
3870 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
3871 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
3872 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
3873 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
3874 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
3875 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
3876 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
5661e210 3877 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(track->Eta(),
3878 track->Phi()*180./TMath::Pi(),
3879 nClustersTPC);
6667f3a7 3880
5b8133c7 3881 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
3882 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
3883 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
dd3fa486 3884 if(fAnalysisEtaMode)
3885 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),Pt);
3886 else
3887 ((TH2D *)(fQA2DList->At(4)))->Fill(Rapidity(track->Px(),
3888 track->Py(),
3889 track->Pz()),
3890 Pt);
5b8133c7 3891 }
3e6c06f4 3892 }//primary particles
3893 else if(label > stack->GetNprimary()) {
5b8133c7 3894 Int_t lPartMother = -1;
3895 Int_t motherPDGCode = -1;
3896 if(particle) {
3897 lPartMother = particle->GetFirstMother();
3898 TParticle *motherParticle = stack->Particle(lPartMother);
3899 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3900 }
6667f3a7 3901
5b8133c7 3902 if(fMCProcessIdFlag)
3903 if(particle->GetUniqueID() != fMCProcessId) continue;
3904 if(fMotherParticlePDGCodeFlag)
3905 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
6667f3a7 3906
5b8133c7 3907 if(track->Charge() > 0) {
3908 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3909 if(track->HasPointOnITSLayer(iLayer))
3910 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
3911 }
3912 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
3913 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
3914 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
3915 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
3916 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
3917 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
3918 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
3919 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
3920 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
3921 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
5661e210 3922 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(track->Eta(),
3923 track->Phi()*180./TMath::Pi(),
3924 nClustersTPC);
6667f3a7 3925
5b8133c7 3926 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
3927 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
3928 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
dd3fa486 3929 if(fAnalysisEtaMode)
3930 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),Pt);
3931 else
3932 ((TH2D *)(fQA2DList->At(2)))->Fill(Rapidity(track->Px(),
3933 track->Py(),
3934 track->Pz()),
3935 Pt);
3936 if(fAnalysisEtaMode)
3937 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),Pt,
3938 ConvertPDGToInt(motherPDGCode));
3939 else
3940 ((TH3F *)(fQA2DList->At(10)))->Fill(Rapidity(track->Px(),
3941 track->Py(),
3942 track->Pz()),
3943 Pt,
3944 ConvertPDGToInt(motherPDGCode));
5b8133c7 3945 }
6667f3a7 3946 else if(track->Charge() < 0) {
5b8133c7 3947 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
3948 if(track->HasPointOnITSLayer(iLayer))
3949 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
3950 }
3951 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
3952 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
3953 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
3954 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
3955 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
3956 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
3957 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
3958 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
3959 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
3960 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
5661e210 3961 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(track->Eta(),
3962 track->Phi()*180./TMath::Pi(),
3963 nClustersTPC);
6667f3a7 3964
5b8133c7 3965 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
3966 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
3967 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
dd3fa486 3968 if(fAnalysisEtaMode)
3969 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),Pt);
3970 else
3971 ((TH2D *)(fQA2DList->At(6)))->Fill(Rapidity(track->Px(),
3972 track->Py(),
3973 track->Pz()),
3974 Pt);
dd3fa486 3975 if(fAnalysisEtaMode)
3976 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),Pt,
3977 ConvertPDGToInt(motherPDGCode));
3978 else
3979 ((TH3F *)(fQA2DList->At(11)))->Fill(Rapidity(track->Px(),
3980 track->Py(),
3981 track->Pz()),
3982 Pt,
3983 ConvertPDGToInt(motherPDGCode));
5b8133c7 3984 }
3e6c06f4 3985 }//secondary particles
5b8133c7 3986 }//accepted - track cuts
6667f3a7 3987 else if(!IsAccepted(esd,vertex,track)) {
3e6c06f4 3988 if(label <= stack->GetNprimary()) {
dd3fa486 3989 if(track->Charge() > 0) {
5661e210 3990 ((TH3D *)(fRejectedCutList->At(0)))->Fill(track->Eta(),
3991 track->Phi()*180./TMath::Pi(),
3992 nClustersTPC);
dd3fa486 3993 if(fAnalysisEtaMode)
3994 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),Pt);
3995 else
3996 ((TH2D *)(fQA2DList->At(1)))->Fill(Rapidity(track->Px(),
3997 track->Py(),
3998 track->Pz()),
3999 Pt);
4000 }
4001 else if(track->Charge() < 0) {
5661e210 4002 ((TH3D *)(fRejectedCutList->At(1)))->Fill(track->Eta(),
4003 track->Phi()*180./TMath::Pi(),
4004 nClustersTPC);
dd3fa486 4005 if(fAnalysisEtaMode)
4006 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),Pt);
4007 else
4008 ((TH2D *)(fQA2DList->At(5)))->Fill(Rapidity(track->Px(),
4009 track->Py(),
4010 track->Pz()),
4011 Pt);
4012 }
3e6c06f4 4013 }//primary particles
4014 else if(label > stack->GetNprimary()) {
dd3fa486 4015 if(track->Charge() > 0) {
5661e210 4016 ((TH3D *)(fRejectedCutList->At(2)))->Fill(track->Eta(),
4017 track->Phi()*180./TMath::Pi(),
4018 nClustersTPC);
dd3fa486 4019 if(fAnalysisEtaMode)
4020 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),Pt);
4021 else
4022 ((TH2D *)(fQA2DList->At(3)))->Fill(Rapidity(track->Px(),
4023 track->Py(),
4024 track->Pz()),
4025 Pt);
4026 }
4027 else if(track->Charge() < 0) {
5661e210 4028 ((TH3D *)(fRejectedCutList->At(3)))->Fill(track->Eta(),
4029 track->Phi()*180./TMath::Pi(),
4030 nClustersTPC);
dd3fa486 4031 if(fAnalysisEtaMode)
4032 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),Pt);
4033 else
4034 ((TH2D *)(fQA2DList->At(7)))->Fill(Rapidity(track->Px(),
4035 track->Py(),
4036 track->Pz()),
4037 Pt);
4038 }
3e6c06f4 4039 }//secondary particles
5b8133c7 4040 }//rejected - track cuts
3e6c06f4 4041 }//proton check
4042 }//combined tracking
4043 }//track loop
4044
4045}
4046
d4733690 4047//____________________________________________________________________//
4048void AliProtonQAAnalysis::InitMCAnalysis() {
4049 //MC analysis - 3D histograms: y-pT-pdg
4050 fPDGList = new TList();
4051 TH3F *gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
dd3fa486 4052 ";;P_{T} [GeV/c];PDG",
d4733690 4053 fNBinsY,fMinY,fMaxY,
4054 fNBinsPt,fMinPt,fMaxPt,
4055 14,-0.5,13.5);
dd3fa486 4056 if(fAnalysisEtaMode)
4057 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
4058 else
4059 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
d4733690 4060 fPDGList->Add(gHistYPtPDGProtons);
4061 TH3F *gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
dd3fa486 4062 ";;P_{T} [GeV/c];PDG",
d4733690 4063 fNBinsY,fMinY,fMaxY,
4064 fNBinsPt,fMinPt,fMaxPt,
4065 14,-0.5,13.5);
dd3fa486 4066 if(fAnalysisEtaMode)
4067 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
4068 else
4069 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
d4733690 4070 fPDGList->Add(gHistYPtPDGAntiProtons);
4071
4072 //MC processes
4073 fMCProcessesList = new TList();
4074 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
4075 fMCProcessesList->Add(gHistProtonsFromKLProcess);
4076 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
4077 fMCProcessesList->Add(gHistProtonsFromPionProcess);
4078 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
4079 fMCProcessesList->Add(gHistProtonsFromKSProcess);
4080 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
4081 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
4082 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
4083 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
4084 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
4085 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
4086 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
4087 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
4088 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
4089 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
4090 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4091 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
4092 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
4093 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
4094 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
4095 fMCProcessesList->Add(gHistProtonsFromXi0Process);
4096 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
4097 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
4098
4099 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
4100 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
4101 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
4102 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
4103 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
4104 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
4105 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
4106 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
4107 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
4108 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
4109 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
4110 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
4111 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
4112 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
4113 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
4114 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
4115}
4116
4117//____________________________________________________________________//
4118void AliProtonQAAnalysis::RunMCAnalysis(AliStack* stack) {
4119 //Main analysis part - MC
4120 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
4121 TParticle *particle = stack->Particle(iParticle);
55f9a666 4122 if(!particle) continue;
4123
d4733690 4124 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
2b00fd2c 4125 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
dd3fa486 4126 if(fAnalysisEtaMode) {
4127 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
4128 }
4129 else {
4130 if((Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4131 }
2b00fd2c 4132
d4733690 4133 Int_t pdgcode = particle->GetPdgCode();
4134 if(pdgcode == 2212) {
dd3fa486 4135 if(iParticle <= stack->GetNprimary()) {
4136 if(fAnalysisEtaMode)
4137 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
4138 else
4139 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
4140 particle->Py(),
4141 particle->Pz()),
4142 particle->Pt(),0);
4143 }
d4733690 4144 else if(iParticle > stack->GetNprimary()) {
4145 Int_t lPartMother = particle->GetFirstMother();
4146 TParticle *motherParticle = stack->Particle(lPartMother);
4147 if(!motherParticle) continue;
9933c613 4148 Int_t motherPDGCode = motherParticle->GetPdgCode();
4149 if(fMCProcessIdFlag)
4150 if(particle->GetUniqueID() != fMCProcessId) continue;
4151 if(fMotherParticlePDGCodeFlag)
4152 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4153
dd3fa486 4154 if(fAnalysisEtaMode)
4155 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
4156 particle->Pt(),
4157 ConvertPDGToInt(motherParticle->GetPdgCode()));
4158 else
4159 ((TH3F *)(fPDGList->At(0)))->Fill(Rapidity(particle->Px(),
4160 particle->Py(),
4161 particle->Pz()),
4162 particle->Pt(),
4163 ConvertPDGToInt(motherParticle->GetPdgCode()));
d4733690 4164 //processes
4165 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4166 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
4167 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4168 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
4169 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4170 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
4171 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4172 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
4173 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4174 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
4175 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4176 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
4177 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
4178 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
4179 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4180 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
4181 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4182 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
4183 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
4184 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
4185 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
4186 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
4187 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
4188 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
4189 }//secondary proton
4190 }//pdgcode of proton
4191
4192 if(pdgcode == -2212) {
dd3fa486 4193 if(iParticle <= stack->GetNprimary()) {
4194 if(fAnalysisEtaMode)
4195 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
4196 else
4197 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
4198 particle->Py(),
4199 particle->Pz()),
4200 particle->Pt(),0);
4201 }
d4733690 4202 else if(iParticle > stack->GetNprimary()) {
4203 Int_t lPartMother = particle->GetFirstMother();
4204 TParticle *motherParticle = stack->Particle(lPartMother);
4205 if(!motherParticle) continue;
9933c613 4206 Int_t motherPDGCode = motherParticle->GetPdgCode();
4207 if(fMCProcessIdFlag)
4208 if(particle->GetUniqueID() != fMCProcessId) continue;
4209 if(fMotherParticlePDGCodeFlag)
4210 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4211
dd3fa486 4212 if(fAnalysisEtaMode)
4213 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
4214 particle->Pt(),
4215 ConvertPDGToInt(motherParticle->GetPdgCode()));
4216 else
4217 ((TH3F *)(fPDGList->At(1)))->Fill(Rapidity(particle->Px(),
4218 particle->Py(),
4219 particle->Pz()),
4220 particle->Pt(),
4221 ConvertPDGToInt(motherParticle->GetPdgCode()));
d4733690 4222
4223 //processes
4224 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
4225 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
4226 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
4227 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
4228 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
4229 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
4230 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
4231 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
4232 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
4233 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
4234 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
4235 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
4236 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
4237 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
4238 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
4239 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
4240 }//secondary antiproton
4241 }//pdgcode of antiproton
4242
4243 }//particle loop
4244}
4245
4246//____________________________________________________________________//
4247Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) {
4248 //Converts the pdg code to an int based on the following scheme:
4249 //1: PDG code: 130 - Name: K_L0
4250 //2: PDG code: 211 - Name: pi+
4251 //3: PDG code: 310 - Name: K_S0
4252 //4: PDG code: 321 - Name: K+
4253 //5: PDG code: 2112 - Name: neutron
4254 //6: PDG code: 2212 - Name: proton
4255 //7: PDG code: 3112 - Name: Sigma-
4256 //8: PDG code: 3122 - Name: Lambda0
4257 //9: PDG code: 3222 - Name: Sigma+
4258 //10: PDG code: 3312 - Name: Xi-
4259 //11: PDG code: 3322 - Name: Xi0
4260 //12: PDG code: 3334 - Name: Omega-
4261 Int_t code = -1;
4262 switch (TMath::Abs(pdgCode)) {
4263 case 130: {
4264 code = 1;
4265 break;
4266 }
4267 case 211: {
4268 code = 2;
4269 break;
4270 }
4271 case 310: {
4272 code = 3;
4273 break;
4274 }
4275 case 321: {
4276 code = 4;
4277 break;
4278 }
4279 case 2112: {
4280 code = 5;
4281 break;
4282 }
4283 case 2212: {
4284 code = 6;
4285 break;
4286 }
4287 case 3112: {
4288 code = 7;
4289 break;
4290 }
4291 case 3122: {
4292 code = 8;
4293 break;
4294 }
4295 case 3222: {
4296 code = 9;
4297 break;
4298 }
4299 case 3312: {
4300 code = 10;
4301 break;
4302 }
4303 case 3322: {
4304 code = 11;
4305 break;
4306 }
4307 case 3334: {
4308 code = 12;
4309 break;
4310 }
4311 default: {
4312 code = -1;
4313 break;
4314 }
4315 }//switch
4316
4317 return code;
4318}
3e6c06f4 4319
6667f3a7 4320//________________________________________________________________________
4321/*const AliESDVertex* AliProtonQAAnalysis::GetVertex(AliESDEvent* esd,
4322 Double_t gVxMax,
4323 Double_t gVyMax,
4324 Double_t gVzMax) {
4325 // Get the vertex from the ESD and returns it if the vertex is valid
4326 // depending on the analysis mode: TPC - Hybrid - Global
4327 const AliESDVertex* vertex = 0;
4328 if((fUseTPCOnly)&&(!fUseHybridTPC)) {
4329 Double_t kBz = esd->GetMagneticField();
4330 AliVertexerTracks vertexer(kBz);
4331 vertexer.SetTPCMode();
4332 AliESDVertex *vTPC = vertexer.FindPrimaryVertex(esd);
4333 esd->SetPrimaryVertexTPC(vTPC);
4334 for (Int_t i=0; i<esd->GetNumberOfTracks(); i++) {
4335 AliESDtrack *t = esd->GetTrack(i);
4336 t->RelateToVertexTPC(vTPC, kBz, kVeryBig);
4337 }
4338 delete vTPC;
4339 vertex = esd->GetPrimaryVertexTPC();
4340 }
4341 else if(fUseHybridTPC)
4342 vertex = esd->GetPrimaryVertexSPD();
4343 else if(!fUseTPCOnly)
4344 vertex = esd->GetPrimaryVertex();
4345 else
4346 Printf("GetVertex: ERROR: Invalid analysis mode");
4347
4348 if(!vertex) return 0;
4349
4350 // check Ncontributors
4351 if(vertex->GetNContributors() <= 0) return 0;
4352
4353 // check resolution
4354 Double_t zRes = vertex->GetZRes();
4355 if(zRes == 0) return 0;
4356
4357 //check position
4358 if(TMath::Abs(vertex->GetXv()) > gVxMax) return 0;
4359 if(TMath::Abs(vertex->GetYv()) > gVyMax) return 0;
4360 if(TMath::Abs(vertex->GetZv()) > gVzMax) return 0;
4361
4362 return vertex;
4363 }*/
3e6c06f4 4364
4365
4366
4367
4368
4369
4370