1 /**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
5 * Permission to use, copy, modify and distribute this software and its *
6 * documentation strictly for non-commercial purposes is hereby granted *
7 * without fee, provided that the above copyright notice appears in all *
8 * copies and that both the copyright notice and this permission notice *
9 * appear in the supporting documentation. The authors make no claims *
10 * about the suitability of this software for any purpose. It is *
11 * provided "as is" without express or implied warranty. *
12 **************************************************************************/
14 /* $Id: AliProtonQAAnalysis.cxx 29114 2008-10-03 16:49:02Z pchrist $ */
16 //-----------------------------------------------------------------
17 // AliProtonQAAnalysis class
18 // This is the class to deal with the proton analysis
19 // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
21 #include <Riostream.h>
28 #include <TParticle.h>
30 #include "AliProtonQAAnalysis.h"
31 #include "AliProtonAnalysisBase.h"
33 #include <AliExternalTrackParam.h>
34 #include <AliESDEvent.h>
38 #include <AliESDVertex.h>
39 #include <AliGenEventHeader.h>
40 #include <AliMCEvent.h>
42 ClassImp(AliProtonQAAnalysis)
44 //____________________________________________________________________//
45 AliProtonQAAnalysis::AliProtonQAAnalysis() :
46 TObject(), fProtonAnalysisBase(0),
47 fNBinsY(0), fMinY(0), fMaxY(0), fY(0),
48 fNBinsPt(0), fMinPt(0), fMaxPt(0), fPt(0), fUseAsymmetricBinning(kFALSE),
49 fGlobalQAList(0), fQAVertexList(0), fQA2DList(0),
50 fQAPrimaryProtonsAcceptedList(0),
51 fQAPrimaryProtonsRejectedList(0),
52 fQASecondaryProtonsAcceptedList(0),
53 fQASecondaryProtonsRejectedList(0),
54 fQAPrimaryAntiProtonsAcceptedList(0),
55 fQAPrimaryAntiProtonsRejectedList(0),
56 fQASecondaryAntiProtonsAcceptedList(0),
57 fQASecondaryAntiProtonsRejectedList(0),
58 fPDGList(0), fMCProcessesList(0),
59 fRunMCAnalysis(kFALSE),
60 fMCProcessIdFlag(kFALSE), fMCProcessId(0),
61 fMotherParticlePDGCodeFlag(kFALSE), fMotherParticlePDGCode(0),
62 fAcceptedCutList(0), fRejectedCutList(0),
63 fAcceptedDCAList(0), fRejectedDCAList(0),
64 fRunEfficiencyAnalysis(kFALSE),
65 fUseCutsInEfficiency(kFALSE),
66 fEfficiencyList(0), fCutEfficiencyList(0) {
70 //____________________________________________________________________//
71 AliProtonQAAnalysis::~AliProtonQAAnalysis() {
73 if(fProtonAnalysisBase) delete fProtonAnalysisBase;
74 if(fGlobalQAList) delete fGlobalQAList;
75 if(fQAVertexList) delete fQAVertexList;
76 if(fQA2DList) delete fQA2DList;
77 if(fQAPrimaryProtonsAcceptedList) delete fQAPrimaryProtonsAcceptedList;
78 if(fQAPrimaryProtonsRejectedList) delete fQAPrimaryProtonsRejectedList;
79 if(fQASecondaryProtonsAcceptedList) delete fQASecondaryProtonsAcceptedList;
80 if(fQASecondaryProtonsRejectedList) delete fQASecondaryProtonsRejectedList;
81 if(fQAPrimaryAntiProtonsAcceptedList)
82 delete fQAPrimaryAntiProtonsAcceptedList;
83 if(fQAPrimaryAntiProtonsRejectedList)
84 delete fQAPrimaryAntiProtonsRejectedList;
85 if(fQASecondaryAntiProtonsAcceptedList)
86 delete fQASecondaryAntiProtonsAcceptedList;
87 if(fQASecondaryAntiProtonsRejectedList)
88 delete fQASecondaryAntiProtonsRejectedList;
90 if(fPDGList) delete fPDGList;
91 if(fMCProcessesList) delete fMCProcessesList;
93 if(fAcceptedCutList) delete fAcceptedCutList;
94 if(fRejectedCutList) delete fRejectedCutList;
95 if(fAcceptedDCAList) delete fAcceptedDCAList;
96 if(fRejectedDCAList) delete fRejectedDCAList;
98 if(fEfficiencyList) delete fEfficiencyList;
99 if(fCutEfficiencyList) delete fCutEfficiencyList;
102 //____________________________________________________________________//
103 void AliProtonQAAnalysis::FillQA(AliStack *const stack,
105 const AliESDVertex *vertex,
106 AliESDtrack* track) {
107 // Checks if the track is excluded from the cuts
108 Int_t nPrimaries = stack->GetNprimary();
109 Int_t label = TMath::Abs(track->GetLabel());
111 Double_t gPt = 0.0, gPx = 0.0, gPy = 0.0, gPz = 0.0;
112 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0}; //The impact parameters and their covariance.
114 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
115 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
117 gPt = 0.0; gPx = 0.0; gPy = 0.0; gPz = 0.0;
118 dca[0] = -100.; dca[1] = -100.;
119 cov[0] = -100.; cov[1] = -100.; cov[2] = -100.;
122 gPt = tpcTrack->Pt();
123 gPx = tpcTrack->Px();
124 gPy = tpcTrack->Py();
125 gPz = tpcTrack->Pz();
126 tpcTrack->PropagateToDCA(vertex,
127 esd->GetMagneticField(),
136 track->PropagateToDCA(vertex,
137 esd->GetMagneticField(),
141 //TParticle *particle = stack->Particle(label);
143 //Int_t pdgcode = particle->GetPdgCode();
144 //Int_t gProcess = particle->GetUniqueID();
146 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
147 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
149 Float_t chi2PerClusterITS = -1;
151 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
152 Float_t chi2PerClusterTPC = -1;
154 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
157 track->GetExternalCovariance(extCov);
160 if(track->Charge() > 0) {
162 if(label <= nPrimaries) {
163 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
164 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
165 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
167 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
168 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
170 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
171 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
172 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
174 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
175 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
176 }//chi2 per ITS cluster
177 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
178 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
179 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
181 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
182 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
185 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
186 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
187 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
189 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
190 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
191 }//chi2 per TPC cluster
192 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
193 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
194 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
196 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
197 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
199 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
200 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
201 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
203 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
204 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
206 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
207 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
208 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
210 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
211 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
213 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
214 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
215 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
217 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
218 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
220 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
221 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
222 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
224 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
225 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
227 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
228 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
229 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
231 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
232 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
234 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
235 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
236 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
238 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
239 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
240 }//sigma to vertex TPC
241 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
242 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
243 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
245 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
246 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
247 }//DCA xy global tracking
248 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
249 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
250 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
252 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
253 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
254 }//DCA xy TPC tracking
255 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
256 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
257 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
259 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
260 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
261 }//DCA z global tracking
262 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
263 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
264 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
266 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
267 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
268 }//DCA z TPC tracking
269 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
270 if(track->GetConstrainedChi2() > 0) {
271 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
272 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
274 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
275 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
277 }//constrain chi2 - vertex
278 if(fProtonAnalysisBase->IsUsedITSRefit()) {
279 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
280 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(16)))->Fill(0);
282 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
283 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(16)))->Fill(0);
285 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
286 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
287 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(17)))->Fill(0);
289 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
290 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(17)))->Fill(0);
292 if(fProtonAnalysisBase->IsUsedESDpid()) {
293 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
294 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(18)))->Fill(0);
296 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
297 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(18)))->Fill(0);
299 if(fProtonAnalysisBase->IsUsedTPCpid()) {
300 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
301 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(19)))->Fill(0);
303 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
304 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
306 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
307 if(!track->HasPointOnITSLayer(0)) {
308 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
310 else if(track->HasPointOnITSLayer(0))
311 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
313 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
314 if(!track->HasPointOnITSLayer(1)) {
315 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
317 else if(track->HasPointOnITSLayer(1))
318 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
320 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
321 if(!track->HasPointOnITSLayer(2)) {
322 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
324 else if(track->HasPointOnITSLayer(2))
325 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
327 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
328 if(!track->HasPointOnITSLayer(3)) {
329 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
331 else if(track->HasPointOnITSLayer(3))
332 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
334 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
335 if(!track->HasPointOnITSLayer(4)) {
336 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
338 else if(track->HasPointOnITSLayer(4))
339 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
341 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
342 if(!track->HasPointOnITSLayer(5)) {
343 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
345 else if(track->HasPointOnITSLayer(5))
346 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
348 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
349 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
350 ((TH1F *)(fQAPrimaryProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
352 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
353 ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
354 }//number of TPC points for the dE/dx
356 /*if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
357 ((TH2F *)(fQAPrimaryProtonsRejectedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
359 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
360 ((TH2F *)(fQAPrimaryProtonsAcceptedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
361 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
362 ((TH2F *)(fQAPrimaryProtonsRejectedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));
364 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
365 ((TH2F *)(fQAPrimaryProtonsAcceptedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));*/
366 }//primary particle cut
369 if(label > nPrimaries) {
370 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
371 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
372 ((TH1F *)(fQASecondaryProtonsRejectedList->At(0)))->Fill(nClustersITS);
374 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
375 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(0)))->Fill(nClustersITS);
377 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
378 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
379 ((TH1F *)(fQASecondaryProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
381 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
382 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
383 }//chi2 per ITS cluster
384 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
385 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
386 //cout<<"Secondary proton rejected"<<endl;
387 ((TH1F *)(fQASecondaryProtonsRejectedList->At(2)))->Fill(nClustersTPC);
389 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
390 //cout<<"Secondary proton accepted"<<endl;
391 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
394 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
395 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
396 ((TH1F *)(fQASecondaryProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
398 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
399 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
400 }//chi2 per TPC cluster
401 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
402 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
403 ((TH1F *)(fQASecondaryProtonsRejectedList->At(4)))->Fill(extCov[0]);
405 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
406 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(4)))->Fill(extCov[0]);
408 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
409 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
410 ((TH1F *)(fQASecondaryProtonsRejectedList->At(5)))->Fill(extCov[2]);
412 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
413 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(5)))->Fill(extCov[2]);
415 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
416 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
417 ((TH1F *)(fQASecondaryProtonsRejectedList->At(6)))->Fill(extCov[5]);
419 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
420 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(6)))->Fill(extCov[5]);
422 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
423 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
424 ((TH1F *)(fQASecondaryProtonsRejectedList->At(7)))->Fill(extCov[9]);
426 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
427 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(7)))->Fill(extCov[9]);
429 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
430 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
431 ((TH1F *)(fQASecondaryProtonsRejectedList->At(8)))->Fill(extCov[14]);
433 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
434 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(8)))->Fill(extCov[14]);
436 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
437 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
438 ((TH1F *)(fQASecondaryProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
440 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
441 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
443 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
444 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
445 ((TH1F *)(fQASecondaryProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
447 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
448 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
449 }//sigma to vertex TPC
450 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
451 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
452 ((TH1F *)(fQASecondaryProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
454 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
455 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
456 }//DCA xy global tracking
457 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
458 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
459 ((TH1F *)(fQASecondaryProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
461 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
462 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
463 }//DCA xy TPC tracking
464 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
465 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
466 ((TH1F *)(fQASecondaryProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
468 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
469 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
470 }//DCA z global tracking
471 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
472 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
473 ((TH1F *)(fQASecondaryProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
475 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
476 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
477 }//DCA z TPC tracking
478 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
479 if(track->GetConstrainedChi2() > 0) {
480 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
481 ((TH1F *)(fQASecondaryProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
483 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
484 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
486 }//constrain chi2 - vertex
487 if(fProtonAnalysisBase->IsUsedITSRefit()) {
488 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
489 ((TH1F *)(fQASecondaryProtonsRejectedList->At(16)))->Fill(0);
491 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
492 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(16)))->Fill(0);
494 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
495 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
496 ((TH1F *)(fQASecondaryProtonsRejectedList->At(17)))->Fill(0);
498 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
499 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(17)))->Fill(0);
501 if(fProtonAnalysisBase->IsUsedESDpid()) {
502 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
503 ((TH1F *)(fQASecondaryProtonsRejectedList->At(18)))->Fill(0);
505 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
506 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(18)))->Fill(0);
508 if(fProtonAnalysisBase->IsUsedTPCpid()) {
509 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
510 ((TH1F *)(fQASecondaryProtonsRejectedList->At(19)))->Fill(0);
512 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
513 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
515 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
516 if(!track->HasPointOnITSLayer(0)) {
517 ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
519 else if(track->HasPointOnITSLayer(0))
520 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
522 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
523 if(!track->HasPointOnITSLayer(1)) {
524 ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
526 else if(track->HasPointOnITSLayer(1))
527 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
529 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
530 if(!track->HasPointOnITSLayer(2)) {
531 ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
533 else if(track->HasPointOnITSLayer(2))
534 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
536 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
537 if(!track->HasPointOnITSLayer(3)) {
538 ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
540 else if(track->HasPointOnITSLayer(3))
541 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
543 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
544 if(!track->HasPointOnITSLayer(4)) {
545 ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
547 else if(track->HasPointOnITSLayer(4))
548 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
550 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
551 if(!track->HasPointOnITSLayer(5)) {
552 ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
554 else if(track->HasPointOnITSLayer(5))
555 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
557 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
558 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
559 ((TH1F *)(fQASecondaryProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
561 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
562 ((TH1F *)(fQASecondaryProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
563 }//number of TPC points for the dE/dx
565 /*if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
567 ((TH2F *)(fQASecondaryProtonsRejectedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
569 ((TH2F *)(fQASecondaryProtonsRejectedList->At(29)))->Fill(gPt,TMath::Abs(dca[0]));
571 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) {
573 ((TH2F *)(fQASecondaryProtonsAcceptedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
575 ((TH2F *)(fQASecondaryProtonsAcceptedList->At(29)))->Fill(gPt,TMath::Abs(dca[0]));
577 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
579 ((TH2F *)(fQASecondaryProtonsRejectedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));
581 ((TH2F *)(fQASecondaryProtonsRejectedList->At(30)))->Fill(gPt,TMath::Abs(dca[1]));
583 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) {
585 ((TH2F *)(fQASecondaryProtonsAcceptedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));
587 ((TH2F *)(fQASecondaryProtonsAcceptedList->At(30)))->Fill(gPt,TMath::Abs(dca[1]));
589 }//secondary particle cut
593 if(track->Charge() < 0) {
595 if(label <= nPrimaries) {
596 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
597 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
598 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
600 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
601 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
603 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
604 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
605 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
607 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
608 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
609 }//chi2 per ITS cluster
610 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
611 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
612 //cout<<"Primary antiproton rejected"<<endl;
613 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
615 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
616 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
619 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
620 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
621 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
623 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
624 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
625 }//chi2 per TPC cluster
626 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
627 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
628 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
630 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
631 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
633 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
634 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
635 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
637 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
638 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
640 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
641 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
642 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
644 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
645 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
647 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
648 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
649 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
651 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
652 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
654 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
655 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
656 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
658 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
659 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
661 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
662 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
663 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
665 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
666 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
668 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
669 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
670 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
672 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
673 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
674 }//sigma to vertex TPC
675 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
676 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
677 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
679 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
680 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
681 }//DCA xy global tracking
682 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
683 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
684 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
686 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
687 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
688 }//DCA xy TPC tracking
689 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
690 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
691 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
693 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
694 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
695 }//DCA z global tracking
696 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
697 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
698 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
700 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
701 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
702 }//DCA z TPC tracking
703 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
704 if(track->GetConstrainedChi2() > 0) {
705 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
706 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
708 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
709 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
711 }//constrain chi2 - vertex
712 if(fProtonAnalysisBase->IsUsedITSRefit()) {
713 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
714 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(16)))->Fill(0);
716 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
717 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(16)))->Fill(0);
719 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
720 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
721 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(17)))->Fill(0);
723 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
724 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(17)))->Fill(0);
726 if(fProtonAnalysisBase->IsUsedESDpid()) {
727 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
728 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(18)))->Fill(0);
730 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
731 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(18)))->Fill(0);
733 if(fProtonAnalysisBase->IsUsedTPCpid()) {
734 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
735 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(19)))->Fill(0);
737 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
738 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
740 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
741 if(!track->HasPointOnITSLayer(0)) {
742 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
744 else if(track->HasPointOnITSLayer(0))
745 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
747 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
748 if(!track->HasPointOnITSLayer(1)) {
749 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
751 else if(track->HasPointOnITSLayer(1))
752 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
754 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
755 if(!track->HasPointOnITSLayer(2)) {
756 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
758 else if(track->HasPointOnITSLayer(2))
759 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
761 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
762 if(!track->HasPointOnITSLayer(3)) {
763 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
765 else if(track->HasPointOnITSLayer(3))
766 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
768 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
769 if(!track->HasPointOnITSLayer(4)) {
770 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
772 else if(track->HasPointOnITSLayer(4))
773 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
775 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
776 if(!track->HasPointOnITSLayer(5)) {
777 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
779 else if(track->HasPointOnITSLayer(5))
780 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
782 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
783 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
784 ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
786 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
787 ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
788 }//number of TPC points for the dE/dx
790 /*if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
791 ((TH2F *)(fQAPrimaryAntiProtonsRejectedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
793 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
794 ((TH2F *)(fQAPrimaryAntiProtonsAcceptedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
795 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
796 ((TH2F *)(fQAPrimaryAntiProtonsRejectedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));
798 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
799 ((TH2F *)(fQAPrimaryAntiProtonsAcceptedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));*/
800 }//primary particle cut
803 if(label > nPrimaries) {
804 if(fProtonAnalysisBase->IsUsedMinITSClusters()) {
805 if(nClustersITS < fProtonAnalysisBase->GetMinITSClusters()) {
806 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(0)))->Fill(nClustersITS);
808 else if(nClustersITS >= fProtonAnalysisBase->GetMinITSClusters())
809 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(0)))->Fill(nClustersITS);
811 if(fProtonAnalysisBase->IsUsedMaxChi2PerITSCluster()) {
812 if(chi2PerClusterITS > fProtonAnalysisBase->GetMaxChi2PerITSCluster()) {
813 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(1)))->Fill(chi2PerClusterITS);
815 else if(chi2PerClusterITS <= fProtonAnalysisBase->GetMaxChi2PerITSCluster())
816 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(1)))->Fill(chi2PerClusterITS);
817 }//chi2 per ITS cluster
818 if(fProtonAnalysisBase->IsUsedMinTPCClusters()) {
819 if(nClustersTPC < fProtonAnalysisBase->GetMinTPCClusters()) {
820 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(2)))->Fill(nClustersTPC);
822 else if(nClustersTPC >= fProtonAnalysisBase->GetMinTPCClusters()) {
823 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(2)))->Fill(nClustersTPC);
826 if(fProtonAnalysisBase->IsUsedMaxChi2PerTPCCluster()) {
827 if(chi2PerClusterTPC > fProtonAnalysisBase->GetMaxChi2PerTPCCluster()) {
828 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(3)))->Fill(chi2PerClusterTPC);
830 else if(chi2PerClusterTPC <= fProtonAnalysisBase->GetMaxChi2PerTPCCluster())
831 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(3)))->Fill(chi2PerClusterTPC);
832 }//chi2 per TPC cluster
833 if(fProtonAnalysisBase->IsUsedMaxCov11()) {
834 if(extCov[0] > fProtonAnalysisBase->GetMaxCov11()) {
835 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(4)))->Fill(extCov[0]);
837 else if(extCov[0] <= fProtonAnalysisBase->GetMaxCov11())
838 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(4)))->Fill(extCov[0]);
840 if(fProtonAnalysisBase->IsUsedMaxCov22()) {
841 if(extCov[2] > fProtonAnalysisBase->GetMaxCov22()) {
842 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(5)))->Fill(extCov[2]);
844 else if(extCov[2] <= fProtonAnalysisBase->GetMaxCov22())
845 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(5)))->Fill(extCov[2]);
847 if(fProtonAnalysisBase->IsUsedMaxCov33()) {
848 if(extCov[5] > fProtonAnalysisBase->GetMaxCov33()) {
849 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(6)))->Fill(extCov[5]);
851 else if(extCov[5] <= fProtonAnalysisBase->GetMaxCov33())
852 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(6)))->Fill(extCov[5]);
854 if(fProtonAnalysisBase->IsUsedMaxCov44()) {
855 if(extCov[9] > fProtonAnalysisBase->GetMaxCov44()) {
856 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(7)))->Fill(extCov[9]);
858 else if(extCov[9] <= fProtonAnalysisBase->GetMaxCov44())
859 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(7)))->Fill(extCov[9]);
861 if(fProtonAnalysisBase->IsUsedMaxCov55()) {
862 if(extCov[14] > fProtonAnalysisBase->GetMaxCov55()) {
863 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(8)))->Fill(extCov[14]);
865 else if(extCov[14] <= fProtonAnalysisBase->GetMaxCov55())
866 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(8)))->Fill(extCov[14]);
868 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertex()) {
869 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertex()) {
870 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
872 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertex())
873 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(9)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
875 if(fProtonAnalysisBase->IsUsedMaxSigmaToVertexTPC()) {
876 if(fProtonAnalysisBase->GetSigmaToVertex(track) > fProtonAnalysisBase->GetMaxSigmaToVertexTPC()) {
877 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
879 else if(fProtonAnalysisBase->GetSigmaToVertex(track) <= fProtonAnalysisBase->GetMaxSigmaToVertexTPC())
880 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(10)))->Fill(fProtonAnalysisBase->GetSigmaToVertex(track));
881 }//sigma to vertex TPC
882 if(fProtonAnalysisBase->IsUsedMaxDCAXY()) {
883 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
884 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(11)))->Fill(TMath::Abs(dca[0]));
886 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY())
887 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(11)))->Fill(TMath::Abs(dca[0]));
888 }//DCA xy global tracking
889 if(fProtonAnalysisBase->IsUsedMaxDCAXYTPC()) {
890 if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXYTPC()) {
891 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(12)))->Fill(TMath::Abs(dca[0]));
893 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXYTPC())
894 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(12)))->Fill(TMath::Abs(dca[0]));
895 }//DCA xy TPC tracking
896 if(fProtonAnalysisBase->IsUsedMaxDCAZ()) {
897 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
898 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(13)))->Fill(TMath::Abs(dca[1]));
900 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ())
901 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(13)))->Fill(TMath::Abs(dca[1]));
902 }//DCA z global tracking
903 if(fProtonAnalysisBase->IsUsedMaxDCAZTPC()) {
904 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZTPC()) {
905 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(14)))->Fill(TMath::Abs(dca[1]));
907 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZTPC())
908 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(14)))->Fill(TMath::Abs(dca[1]));
909 }//DCA z TPC tracking
910 if(fProtonAnalysisBase->IsUsedMaxConstrainChi2()) {
911 if(track->GetConstrainedChi2() > 0) {
912 if(TMath::Log(track->GetConstrainedChi2()) > fProtonAnalysisBase->GetMaxConstrainChi2()) {
913 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
915 else if(TMath::Log(track->GetConstrainedChi2()) <= fProtonAnalysisBase->GetMaxConstrainChi2())
916 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(15)))->Fill(TMath::Log(track->GetConstrainedChi2()));
918 }//constrain chi2 - vertex
919 if(fProtonAnalysisBase->IsUsedITSRefit()) {
920 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) {
921 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(16)))->Fill(0);
923 else if((track->GetStatus() & AliESDtrack::kITSrefit) != 0)
924 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(16)))->Fill(0);
926 if(fProtonAnalysisBase->IsUsedTPCRefit()) {
927 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) {
928 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(17)))->Fill(0);
930 else if((track->GetStatus() & AliESDtrack::kTPCrefit) != 0)
931 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(17)))->Fill(0);
933 if(fProtonAnalysisBase->IsUsedESDpid()) {
934 if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) {
935 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(18)))->Fill(0);
937 else if((track->GetStatus() & AliESDtrack::kESDpid) != 0)
938 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(18)))->Fill(0);
940 if(fProtonAnalysisBase->IsUsedTPCpid()) {
941 if ((track->GetStatus() & AliESDtrack::kTPCpid) == 0) {
942 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(19)))->Fill(0);
944 else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
945 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
947 if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
948 if(!track->HasPointOnITSLayer(0)) {
949 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
951 else if(track->HasPointOnITSLayer(0))
952 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
954 if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
955 if(!track->HasPointOnITSLayer(1)) {
956 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
958 else if(track->HasPointOnITSLayer(1))
959 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
961 if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
962 if(!track->HasPointOnITSLayer(2)) {
963 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
965 else if(track->HasPointOnITSLayer(2))
966 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
968 if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
969 if(!track->HasPointOnITSLayer(3)) {
970 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
972 else if(track->HasPointOnITSLayer(3))
973 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
975 if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
976 if(!track->HasPointOnITSLayer(4)) {
977 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
979 else if(track->HasPointOnITSLayer(4))
980 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
982 if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
983 if(!track->HasPointOnITSLayer(5)) {
984 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
986 else if(track->HasPointOnITSLayer(5))
987 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
989 if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
990 if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
991 ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
993 if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
994 ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
995 }//number of TPC points for the dE/dx
997 /*if(TMath::Abs(dca[0]) > fProtonAnalysisBase->GetMaxDCAXY()) {
999 ((TH2F *)(fQASecondaryAntiProtonsRejectedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
1001 ((TH2F *)(fQASecondaryAntiProtonsRejectedList->At(29)))->Fill(gPt,TMath::Abs(dca[0]));
1003 else if(TMath::Abs(dca[0]) <= fProtonAnalysisBase->GetMaxDCAXY()) {
1005 ((TH2F *)(fQASecondaryAntiProtonsAcceptedList->At(27)))->Fill(gPt,TMath::Abs(dca[0]));
1007 ((TH2F *)(fQASecondaryAntiProtonsAcceptedList->At(29)))->Fill(gPt,TMath::Abs(dca[0]));
1009 if(TMath::Abs(dca[1]) > fProtonAnalysisBase->GetMaxDCAZ()) {
1011 ((TH2F *)(fQASecondaryAntiProtonsRejectedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));
1013 ((TH2F *)(fQASecondaryAntiProtonsRejectedList->At(30)))->Fill(gPt,TMath::Abs(dca[1]));
1015 else if(TMath::Abs(dca[1]) <= fProtonAnalysisBase->GetMaxDCAZ()) {
1017 ((TH2F *)(fQASecondaryAntiProtonsAcceptedList->At(28)))->Fill(gPt,TMath::Abs(dca[1]));
1019 ((TH2F *)(fQASecondaryAntiProtonsAcceptedList->At(30)))->Fill(gPt,TMath::Abs(dca[1]));
1021 }//secondary particle cut
1026 //____________________________________________________________________//
1027 void AliProtonQAAnalysis::SetRunQAAnalysis() {
1028 //initializes the QA lists
1029 //fQAHistograms = kTRUE;
1030 fGlobalQAList = new TList();
1032 fQA2DList = new TList();
1033 fQA2DList->SetName("fQA2DList");
1034 fGlobalQAList->Add(fQA2DList);
1036 fQAPrimaryProtonsAcceptedList = new TList();
1037 fQAPrimaryProtonsAcceptedList->SetName("fQAPrimaryProtonsAcceptedList");
1038 fGlobalQAList->Add(fQAPrimaryProtonsAcceptedList);
1040 fQAPrimaryProtonsRejectedList = new TList();
1041 fQAPrimaryProtonsRejectedList->SetName("fQAPrimaryProtonsRejectedList");
1042 fGlobalQAList->Add(fQAPrimaryProtonsRejectedList);
1044 fQASecondaryProtonsAcceptedList = new TList();
1045 fQASecondaryProtonsAcceptedList->SetName("fQASecondaryProtonsAcceptedList");
1046 fGlobalQAList->Add(fQASecondaryProtonsAcceptedList);
1048 fQASecondaryProtonsRejectedList = new TList();
1049 fQASecondaryProtonsRejectedList->SetName("fQASecondaryProtonsRejectedList");
1050 fGlobalQAList->Add(fQASecondaryProtonsRejectedList);
1052 fQAPrimaryAntiProtonsAcceptedList = new TList();
1053 fQAPrimaryAntiProtonsAcceptedList->SetName("fQAPrimaryAntiProtonsAcceptedList");
1054 fGlobalQAList->Add(fQAPrimaryAntiProtonsAcceptedList);
1056 fQAPrimaryAntiProtonsRejectedList = new TList();
1057 fQAPrimaryAntiProtonsRejectedList->SetName("fQAPrimaryAntiProtonsRejectedList");
1058 fGlobalQAList->Add(fQAPrimaryAntiProtonsRejectedList);
1060 fQASecondaryAntiProtonsAcceptedList = new TList();
1061 fQASecondaryAntiProtonsAcceptedList->SetName("fQASecondaryAntiProtonsAcceptedList");
1062 fGlobalQAList->Add(fQASecondaryAntiProtonsAcceptedList);
1064 fQASecondaryAntiProtonsRejectedList = new TList();
1065 fQASecondaryAntiProtonsRejectedList->SetName("fQASecondaryAntiProtonsRejectedList");
1066 fGlobalQAList->Add(fQASecondaryAntiProtonsRejectedList);
1069 //____________________________________________________________________//
1070 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY,
1071 Double_t minY, Double_t maxY,
1073 Double_t minPt, Double_t maxPt) {
1074 //Initializes the QA binning
1076 fMinY = minY; fMaxY = maxY;
1078 fMinPt = minPt; fMaxPt = maxPt;
1082 if(fRunMCAnalysis) InitMCAnalysis();
1083 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1086 //____________________________________________________________________//
1087 void AliProtonQAAnalysis::SetQAYPtBins(Int_t nbinsY, Double_t *gY,
1088 Int_t nbinsPt, Double_t *gPt) {
1089 //Initializes the QA binning - asymmetric binning case
1090 fUseAsymmetricBinning = kTRUE;
1092 for(Int_t i = 0; i < nbinsY; i++) fY[i] = gY[i];
1093 fMinY = gY[0]; fMaxY = gY[nbinsPt];
1095 for(Int_t i = 0; i < nbinsPt; i++) fPt[i] = gPt[i];
1096 fMinPt = gPt[0]; fMaxPt = gPt[nbinsPt];
1100 if(fRunMCAnalysis) InitMCAnalysis();
1101 if(fRunEfficiencyAnalysis) InitEfficiencyAnalysis();
1104 //____________________________________________________________________//
1105 void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
1106 //Initialization of the efficiency list - reconstruction & PID & cut
1108 //Adding each monitored object in the list
1109 fEfficiencyList = new TList();
1111 //MC primary protons and antiprotons for the reconstruction efficiency
1112 TH2D *gHistMCYPtProtons = 0x0;
1113 if(fUseAsymmetricBinning)
1114 gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1116 fNBinsY,fY,fNBinsPt,fPt);
1118 gHistMCYPtProtons = new TH2D("gHistMCYPtProtons",
1120 fNBinsY,fMinY,fMaxY,
1121 fNBinsPt,fMinPt,fMaxPt);
1122 if(fProtonAnalysisBase->GetEtaMode())
1123 gHistMCYPtProtons->GetXaxis()->SetTitle("#eta");
1125 gHistMCYPtProtons->GetXaxis()->SetTitle("y");
1126 gHistMCYPtProtons->SetStats(kTRUE);
1127 gHistMCYPtProtons->GetXaxis()->SetTitleColor(1);
1128 fEfficiencyList->Add(gHistMCYPtProtons);
1129 TH2D *gHistMCYPtAntiProtons = 0x0;
1130 if(fUseAsymmetricBinning)
1131 gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1133 fNBinsY,fY,fNBinsPt,fPt);
1135 gHistMCYPtAntiProtons = new TH2D("gHistMCYPtAntiProtons",
1137 fNBinsY,fMinY,fMaxY,
1138 fNBinsPt,fMinPt,fMaxPt);
1139 if(fProtonAnalysisBase->GetEtaMode())
1140 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1142 gHistMCYPtAntiProtons->GetXaxis()->SetTitle("y");
1143 gHistMCYPtAntiProtons->SetStats(kTRUE);
1144 gHistMCYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1145 fEfficiencyList->Add(gHistMCYPtAntiProtons);
1147 //MC secondary protons and antiprotons that come from weak decay for the reconstruction efficiency
1148 TH2D *gHistMCYPtProtonsFromWeak = 0x0;
1149 if(fUseAsymmetricBinning)
1150 gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1152 fNBinsY,fY,fNBinsPt,fPt);
1154 gHistMCYPtProtonsFromWeak = new TH2D("gHistMCYPtProtonsFromWeak",
1156 fNBinsY,fMinY,fMaxY,
1157 fNBinsPt,fMinPt,fMaxPt);
1158 if(fProtonAnalysisBase->GetEtaMode())
1159 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1161 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1162 gHistMCYPtProtonsFromWeak->SetStats(kTRUE);
1163 gHistMCYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1164 fEfficiencyList->Add(gHistMCYPtProtonsFromWeak);
1165 TH2D *gHistMCYPtAntiProtonsFromWeak = 0x0;
1166 if(fUseAsymmetricBinning)
1167 gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1169 fNBinsY,fY,fNBinsPt,fPt);
1171 gHistMCYPtAntiProtonsFromWeak = new TH2D("gHistMCYPtAntiProtonsFromWeak",
1173 fNBinsY,fMinY,fMaxY,
1174 fNBinsPt,fMinPt,fMaxPt);
1175 if(fProtonAnalysisBase->GetEtaMode())
1176 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1178 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1179 gHistMCYPtAntiProtonsFromWeak->SetStats(kTRUE);
1180 gHistMCYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1181 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromWeak);
1183 //MC secondary protons and antiprotons that come from hadronic interactions for the reconstruction efficiency
1184 TH2D *gHistMCYPtProtonsFromHadronic = 0x0;
1185 if(fUseAsymmetricBinning)
1186 gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1188 fNBinsY,fY,fNBinsPt,fPt);
1190 gHistMCYPtProtonsFromHadronic = new TH2D("gHistMCYPtProtonsFromHadronic",
1192 fNBinsY,fMinY,fMaxY,
1193 fNBinsPt,fMinPt,fMaxPt);
1194 if(fProtonAnalysisBase->GetEtaMode())
1195 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1197 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1198 gHistMCYPtProtonsFromHadronic->SetStats(kTRUE);
1199 gHistMCYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1200 fEfficiencyList->Add(gHistMCYPtProtonsFromHadronic);
1201 TH2D *gHistMCYPtAntiProtonsFromHadronic = 0x0;
1202 if(fUseAsymmetricBinning)
1203 gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1205 fNBinsY,fY,fNBinsPt,fPt);
1207 gHistMCYPtAntiProtonsFromHadronic = new TH2D("gHistMCYPtAntiProtonsFromHadronic",
1209 fNBinsY,fMinY,fMaxY,
1210 fNBinsPt,fMinPt,fMaxPt);
1211 if(fProtonAnalysisBase->GetEtaMode())
1212 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1214 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1215 gHistMCYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1216 gHistMCYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1217 fEfficiencyList->Add(gHistMCYPtAntiProtonsFromHadronic);
1219 //ESD primary protons and antiprotons for the reconstruction efficiency
1220 TH2D *gHistESDYPtProtons = 0x0;
1221 if(fUseAsymmetricBinning)
1222 gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1224 fNBinsY,fY,fNBinsPt,fPt);
1226 gHistESDYPtProtons = new TH2D("gHistESDYPtProtons",
1228 fNBinsY,fMinY,fMaxY,
1229 fNBinsPt,fMinPt,fMaxPt);
1230 if(fProtonAnalysisBase->GetEtaMode())
1231 gHistESDYPtProtons->GetXaxis()->SetTitle("#eta");
1233 gHistESDYPtProtons->GetXaxis()->SetTitle("y");
1234 gHistESDYPtProtons->SetStats(kTRUE);
1235 gHistESDYPtProtons->GetXaxis()->SetTitleColor(1);
1236 fEfficiencyList->Add(gHistESDYPtProtons);
1237 TH2D *gHistESDYPtAntiProtons = 0x0;
1238 if(fUseAsymmetricBinning)
1239 gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1241 fNBinsY,fY,fNBinsPt,fPt);
1243 gHistESDYPtAntiProtons = new TH2D("gHistESDYPtAntiProtons",
1245 fNBinsY,fMinY,fMaxY,
1246 fNBinsPt,fMinPt,fMaxPt);
1247 if(fProtonAnalysisBase->GetEtaMode())
1248 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("#eta");
1250 gHistESDYPtAntiProtons->GetXaxis()->SetTitle("y");
1251 gHistESDYPtAntiProtons->SetStats(kTRUE);
1252 gHistESDYPtAntiProtons->GetXaxis()->SetTitleColor(1);
1253 fEfficiencyList->Add(gHistESDYPtAntiProtons);
1255 //ESD (anti)protons from weak decays for the reconstruction efficiency
1256 TH2D *gHistESDYPtProtonsFromWeak = 0x0;
1257 if(fUseAsymmetricBinning)
1258 gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1260 fNBinsY,fY,fNBinsPt,fPt);
1262 gHistESDYPtProtonsFromWeak = new TH2D("gHistESDYPtProtonsFromWeak",
1264 fNBinsY,fMinY,fMaxY,
1265 fNBinsPt,fMinPt,fMaxPt);
1266 if(fProtonAnalysisBase->GetEtaMode())
1267 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1269 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitle("y");
1270 gHistESDYPtProtonsFromWeak->SetStats(kTRUE);
1271 gHistESDYPtProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1272 fEfficiencyList->Add(gHistESDYPtProtonsFromWeak);
1273 TH2D *gHistESDYPtAntiProtonsFromWeak = 0x0;
1274 if(fUseAsymmetricBinning)
1275 gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1277 fNBinsY,fY,fNBinsPt,fPt);
1279 gHistESDYPtAntiProtonsFromWeak = new TH2D("gHistESDYPtAntiProtonsFromWeak",
1281 fNBinsY,fMinY,fMaxY,
1282 fNBinsPt,fMinPt,fMaxPt);
1283 if(fProtonAnalysisBase->GetEtaMode())
1284 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("#eta");
1286 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitle("y");
1287 gHistESDYPtAntiProtonsFromWeak->SetStats(kTRUE);
1288 gHistESDYPtAntiProtonsFromWeak->GetXaxis()->SetTitleColor(1);
1289 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromWeak);
1291 //ESD (anti)protons from hadronic interactions for the reconstruction efficiency
1292 TH2D *gHistESDYPtProtonsFromHadronic = 0x0;
1293 if(fUseAsymmetricBinning)
1294 gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1296 fNBinsY,fY,fNBinsPt,fPt);
1298 gHistESDYPtProtonsFromHadronic = new TH2D("gHistESDYPtProtonsFromHadronic",
1300 fNBinsY,fMinY,fMaxY,
1301 fNBinsPt,fMinPt,fMaxPt);
1302 if(fProtonAnalysisBase->GetEtaMode())
1303 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1305 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitle("y");
1306 gHistESDYPtProtonsFromHadronic->SetStats(kTRUE);
1307 gHistESDYPtProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1308 fEfficiencyList->Add(gHistESDYPtProtonsFromHadronic);
1309 TH2D *gHistESDYPtAntiProtonsFromHadronic = 0x0;
1310 if(fUseAsymmetricBinning)
1311 gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1313 fNBinsY,fY,fNBinsPt,fPt);
1315 gHistESDYPtAntiProtonsFromHadronic = new TH2D("gHistESDYPtAntiProtonsFromHadronic",
1317 fNBinsY,fMinY,fMaxY,
1318 fNBinsPt,fMinPt,fMaxPt);
1319 if(fProtonAnalysisBase->GetEtaMode())
1320 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("#eta");
1322 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitle("y");
1323 gHistESDYPtAntiProtonsFromHadronic->SetStats(kTRUE);
1324 gHistESDYPtAntiProtonsFromHadronic->GetXaxis()->SetTitleColor(1);
1325 fEfficiencyList->Add(gHistESDYPtAntiProtonsFromHadronic);
1327 //ESD reconstructed tracks that were initially protons for the PID efficiency
1328 TH3D *gHistESDInitYPtProtons = 0x0;
1329 if(fUseAsymmetricBinning) {
1330 Double_t gNPoints[51];
1331 for(Int_t i = 0; i < 51; i++)
1333 gHistESDInitYPtProtons = new TH3D("gHistESDInitYPtProtons",
1334 ";;P_{T} [GeV/c];N_{points}",
1335 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1338 gHistESDInitYPtProtons = new TH3D("gHistESDInitYPtProtons",
1339 ";;P_{T} [GeV/c];N_{points}",
1340 fNBinsY,fMinY,fMaxY,
1341 fNBinsPt,fMinPt,fMaxPt,
1343 if(fProtonAnalysisBase->GetEtaMode())
1344 gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
1346 gHistESDInitYPtProtons->GetXaxis()->SetTitle("y");
1347 gHistESDInitYPtProtons->SetStats(kTRUE);
1348 gHistESDInitYPtProtons->GetXaxis()->SetTitleColor(1);
1349 fEfficiencyList->Add(gHistESDInitYPtProtons);
1351 //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
1352 TH3D *gHistESDIdYPtProtons = 0x0;
1353 if(fUseAsymmetricBinning) {
1354 Double_t gNPoints[51];
1355 for(Int_t i = 0; i < 51; i++)
1357 gHistESDIdYPtProtons = new TH3D("gHistESDIdYPtProtons",
1358 ";;P_{T} [GeV/c];N_{points}",
1359 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1362 gHistESDIdYPtProtons = new TH3D("gHistESDIdYPtProtons",
1363 ";;P_{T} [GeV/c];N_{points}",
1364 fNBinsY,fMinY,fMaxY,
1365 fNBinsPt,fMinPt,fMaxPt,
1367 if(fProtonAnalysisBase->GetEtaMode())
1368 gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
1370 gHistESDIdYPtProtons->GetXaxis()->SetTitle("y");
1371 gHistESDIdYPtProtons->SetStats(kTRUE);
1372 gHistESDIdYPtProtons->GetXaxis()->SetTitleColor(1);
1373 fEfficiencyList->Add(gHistESDIdYPtProtons);
1375 //ESD reconstructed tracks that were identified as protons for the PID contamination
1376 TH3D *gHistESDRecIdYPtProtons = 0x0;
1377 if(fUseAsymmetricBinning) {
1378 Double_t gNPoints[51];
1379 for(Int_t i = 0; i < 51; i++)
1381 gHistESDRecIdYPtProtons = new TH3D("gHistESDRecIdYPtProtons",
1382 ";;P_{T} [GeV/c];N_{points}",
1383 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1386 gHistESDRecIdYPtProtons = new TH3D("gHistESDRecIdYPtProtons",
1387 ";;P_{T} [GeV/c];N_{points}",
1388 fNBinsY,fMinY,fMaxY,
1389 fNBinsPt,fMinPt,fMaxPt,
1391 if(fProtonAnalysisBase->GetEtaMode())
1392 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
1394 gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("y");
1395 gHistESDRecIdYPtProtons->SetStats(kTRUE);
1396 gHistESDRecIdYPtProtons->GetXaxis()->SetTitleColor(1);
1397 fEfficiencyList->Add(gHistESDRecIdYPtProtons);
1399 //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
1400 TH3D *gHistESDContamYPtProtons = 0x0;
1401 if(fUseAsymmetricBinning) {
1402 Double_t gNPoints[51];
1403 for(Int_t i = 0; i < 51; i++)
1405 gHistESDContamYPtProtons = new TH3D("gHistESDContamYPtProtons",
1406 ";;P_{T} [GeV/c];N_{points}",
1407 fNBinsY,fY,fNBinsPt,fPt,50,gNPoints);
1410 gHistESDContamYPtProtons = new TH3D("gHistESDContamYPtProtons",
1411 ";;P_{T} [GeV/c];N_{points}",
1412 fNBinsY,fMinY,fMaxY,
1413 fNBinsPt,fMinPt,fMaxPt,
1415 if(fProtonAnalysisBase->GetEtaMode())
1416 gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
1418 gHistESDContamYPtProtons->GetXaxis()->SetTitle("y");
1419 gHistESDContamYPtProtons->SetStats(kTRUE);
1420 gHistESDContamYPtProtons->GetXaxis()->SetTitleColor(1);
1421 fEfficiencyList->Add(gHistESDContamYPtProtons);
1426 fCutEfficiencyList = new TList();
1427 //Reconstructed primary tracks that were identified as protons
1428 TH2D *gHistESDYPtProtonsTotal = 0x0;
1429 if(fUseAsymmetricBinning)
1430 gHistESDYPtProtonsTotal = new TH2D("gHistESDYPtProtonsTotal",
1432 fNBinsY,fY,fNBinsPt,fPt);
1434 gHistESDYPtProtonsTotal = new TH2D("gHistESDYPtProtonsTotal",
1436 fNBinsY,fMinY,fMaxY,
1437 fNBinsPt,fMinPt,fMaxPt);
1438 if(fProtonAnalysisBase->GetEtaMode())
1439 gHistESDYPtProtonsTotal->GetXaxis()->SetTitle("#eta");
1441 gHistESDYPtProtonsTotal->GetXaxis()->SetTitle("y");
1442 gHistESDYPtProtonsTotal->SetStats(kTRUE);
1443 gHistESDYPtProtonsTotal->GetXaxis()->SetTitleColor(1);
1444 fCutEfficiencyList->Add(gHistESDYPtProtonsTotal);
1446 //Reconstructed primary tracks that were identified as antiprotons
1447 TH2D *gHistESDYPtAntiProtonsTotal = 0x0;
1448 if(fUseAsymmetricBinning)
1449 gHistESDYPtAntiProtonsTotal = new TH2D("gHistESDYPtAntiProtonsTotal",
1451 fNBinsY,fY,fNBinsPt,fPt);
1453 gHistESDYPtAntiProtonsTotal = new TH2D("gHistESDYPtAntiProtonsTotal",
1455 fNBinsY,fMinY,fMaxY,
1456 fNBinsPt,fMinPt,fMaxPt);
1457 if(fProtonAnalysisBase->GetEtaMode())
1458 gHistESDYPtAntiProtonsTotal->GetXaxis()->SetTitle("#eta");
1460 gHistESDYPtAntiProtonsTotal->GetXaxis()->SetTitle("y");
1461 gHistESDYPtAntiProtonsTotal->SetStats(kTRUE);
1462 gHistESDYPtAntiProtonsTotal->GetXaxis()->SetTitleColor(1);
1463 fCutEfficiencyList->Add(gHistESDYPtAntiProtonsTotal);
1465 //Reconstructed, survived primary tracks that were identified as protons
1466 TH2D *gHistESDYPtProtonsSurvived = 0x0;
1467 if(fUseAsymmetricBinning)
1468 gHistESDYPtProtonsSurvived = new TH2D("gHistESDYPtProtonsSurvived",
1470 fNBinsY,fY,fNBinsPt,fPt);
1472 gHistESDYPtProtonsSurvived = new TH2D("gHistESDYPtProtonsSurvived",
1474 fNBinsY,fMinY,fMaxY,
1475 fNBinsPt,fMinPt,fMaxPt);
1476 if(fProtonAnalysisBase->GetEtaMode())
1477 gHistESDYPtProtonsSurvived->GetXaxis()->SetTitle("#eta");
1479 gHistESDYPtProtonsSurvived->GetXaxis()->SetTitle("y");
1480 gHistESDYPtProtonsSurvived->SetStats(kTRUE);
1481 gHistESDYPtProtonsSurvived->GetXaxis()->SetTitleColor(1);
1482 fCutEfficiencyList->Add(gHistESDYPtProtonsSurvived);
1484 //Reconstructed, survived primary tracks that were identified as antiprotons
1485 TH2D *gHistESDYPtAntiProtonsSurvived = 0x0;
1486 if(fUseAsymmetricBinning)
1487 gHistESDYPtAntiProtonsSurvived = new TH2D("gHistESDYPtAntiProtonsSurvived",
1489 fNBinsY,fY,fNBinsPt,fPt);
1491 gHistESDYPtAntiProtonsSurvived = new TH2D("gHistESDYPtAntiProtonsSurvived",
1493 fNBinsY,fMinY,fMaxY,
1494 fNBinsPt,fMinPt,fMaxPt);
1495 if(fProtonAnalysisBase->GetEtaMode())
1496 gHistESDYPtAntiProtonsSurvived->GetXaxis()->SetTitle("#eta");
1498 gHistESDYPtAntiProtonsSurvived->GetXaxis()->SetTitle("y");
1499 gHistESDYPtAntiProtonsSurvived->SetStats(kTRUE);
1500 gHistESDYPtAntiProtonsSurvived->GetXaxis()->SetTitleColor(1);
1501 fCutEfficiencyList->Add(gHistESDYPtAntiProtonsSurvived);
1504 //____________________________________________________________________//
1505 void AliProtonQAAnalysis::InitCutLists() {
1506 //Initialization of the cut lists
1507 //Adding each monitored object in each list
1510 fAcceptedCutList = new TList();
1511 TH1F *gPrimaryProtonsClustersOnITSLayers = new TH1F("gPrimaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1512 fAcceptedCutList->Add(gPrimaryProtonsClustersOnITSLayers);
1513 TH1F *gPrimaryAntiProtonsClustersOnITSLayers = new TH1F("gPrimaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1514 fAcceptedCutList->Add(gPrimaryAntiProtonsClustersOnITSLayers);
1515 TH1F *gSecondaryProtonsClustersOnITSLayers = new TH1F("gSecondaryProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1516 fAcceptedCutList->Add(gSecondaryProtonsClustersOnITSLayers);
1517 TH1F *gSecondaryAntiProtonsClustersOnITSLayers = new TH1F("gSecondaryAntiProtonsClustersOnITSLayers",";ITS Layer;Entries",6,0.5,6.5);
1518 fAcceptedCutList->Add(gSecondaryAntiProtonsClustersOnITSLayers);
1520 TH1F *gPrimaryProtonsNClustersITS = new TH1F("gPrimaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1521 fAcceptedCutList->Add(gPrimaryProtonsNClustersITS);
1522 TH1F *gPrimaryAntiProtonsNClustersITS = new TH1F("gPrimaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1523 fAcceptedCutList->Add(gPrimaryAntiProtonsNClustersITS);
1524 TH1F *gSecondaryProtonsNClustersITS = new TH1F("gSecondaryProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1525 fAcceptedCutList->Add(gSecondaryProtonsNClustersITS);
1526 TH1F *gSecondaryAntiProtonsNClustersITS = new TH1F("gSecondaryAntiProtonsNClustersITS",";ITS Layer;Entries",6,0.5,6.5);
1527 fAcceptedCutList->Add(gSecondaryAntiProtonsNClustersITS);
1529 TH1F *gPrimaryProtonsChi2PerClusterITS = new TH1F("gPrimaryProtonsChi2PerClusterITS",
1530 ";x^{2}/N_{clusters} (ITS);Entries",
1532 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterITS);
1533 TH1F *gPrimaryAntiProtonsChi2PerClusterITS = new TH1F("gPrimaryAntiProtonsChi2PerClusterITS",
1534 ";x^{2}/N_{clusters} (ITS);Entries",
1536 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterITS);
1537 TH1F *gSecondaryProtonsChi2PerClusterITS = new TH1F("gSecondaryProtonsChi2PerClusterITS",
1538 ";x^{2}/N_{clusters} (ITS);Entries",
1540 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterITS);
1541 TH1F *gSecondaryAntiProtonsChi2PerClusterITS = new TH1F("gSecondaryAntiProtonsChi2PerClusterITS",
1542 ";x^{2}/N_{clusters} (ITS);Entries",
1544 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterITS);
1546 TH1F *gPrimaryProtonsConstrainChi2 = new TH1F("gPrimaryProtonsConstrainChi2",
1547 ";Log_{10}(#chi^{2});Entries",
1549 fAcceptedCutList->Add(gPrimaryProtonsConstrainChi2);
1550 TH1F *gPrimaryAntiProtonsConstrainChi2 = new TH1F("gPrimaryAntiProtonsConstrainChi2",
1551 ";Log_{10}(#chi^{2});Entries",
1553 fAcceptedCutList->Add(gPrimaryAntiProtonsConstrainChi2);
1554 TH1F *gSecondaryProtonsConstrainChi2 = new TH1F("gSecondaryProtonsConstrainChi2",
1555 ";Log_{10}(#chi^{2});Entries",
1557 fAcceptedCutList->Add(gSecondaryProtonsConstrainChi2);
1558 TH1F *gSecondaryAntiProtonsConstrainChi2 = new TH1F("gSecondaryAntiProtonsConstrainChi2",
1559 ";Log_{10}(#chi^{2});Entries",
1561 fAcceptedCutList->Add(gSecondaryAntiProtonsConstrainChi2);
1563 TH1F *gPrimaryProtonsTPCClusters = new TH1F("gPrimaryProtonsTPCClusters",
1564 ";N_{clusters} (TPC);Entries",
1566 fAcceptedCutList->Add(gPrimaryProtonsTPCClusters);
1567 TH1F *gPrimaryAntiProtonsTPCClusters = new TH1F("gPrimaryAntiProtonsTPCClusters",
1568 ";N_{clusters} (TPC);Entries",
1570 fAcceptedCutList->Add(gPrimaryAntiProtonsTPCClusters);
1571 TH1F *gSecondaryProtonsTPCClusters = new TH1F("gSecondaryProtonsTPCClusters",
1572 ";N_{clusters} (TPC);Entries",
1574 fAcceptedCutList->Add(gSecondaryProtonsTPCClusters);
1575 TH1F *gSecondaryAntiProtonsTPCClusters = new TH1F("gSecondaryAntiProtonsTPCClusters",
1576 ";N_{clusters} (TPC);Entries",
1578 fAcceptedCutList->Add(gSecondaryAntiProtonsTPCClusters);
1580 TH1F *gPrimaryProtonsChi2PerClusterTPC = new TH1F("gPrimaryProtonsChi2PerClusterTPC",
1581 ";x^{2}/N_{clusters} (TPC);Entries",
1583 fAcceptedCutList->Add(gPrimaryProtonsChi2PerClusterTPC);
1584 TH1F *gPrimaryAntiProtonsChi2PerClusterTPC = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPC",
1585 ";x^{2}/N_{clusters} (TPC);Entries",
1587 fAcceptedCutList->Add(gPrimaryAntiProtonsChi2PerClusterTPC);
1588 TH1F *gSecondaryProtonsChi2PerClusterTPC = new TH1F("gSecondaryProtonsChi2PerClusterTPC",
1589 ";x^{2}/N_{clusters} (TPC);Entries",
1591 fAcceptedCutList->Add(gSecondaryProtonsChi2PerClusterTPC);
1592 TH1F *gSecondaryAntiProtonsChi2PerClusterTPC = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPC",
1593 ";x^{2}/N_{clusters} (TPC);Entries",
1595 fAcceptedCutList->Add(gSecondaryAntiProtonsChi2PerClusterTPC);
1597 TH1F *gPrimaryProtonsExtCov11 = new TH1F("gPrimaryProtonsExtCov11",
1598 ";#sigma_{y} [cm];Entries",
1600 fAcceptedCutList->Add(gPrimaryProtonsExtCov11);
1601 TH1F *gPrimaryAntiProtonsExtCov11 = new TH1F("gPrimaryAntiProtonsExtCov11",
1602 ";#sigma_{y} [cm];Entries",
1604 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov11);
1605 TH1F *gSecondaryProtonsExtCov11 = new TH1F("gSecondaryProtonsExtCov11",
1606 ";#sigma_{y} [cm];Entries",
1608 fAcceptedCutList->Add(gSecondaryProtonsExtCov11);
1609 TH1F *gSecondaryAntiProtonsExtCov11 = new TH1F("gSecondaryAntiProtonsExtCov11",
1610 ";#sigma_{y} [cm];Entries",
1612 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov11);
1615 TH1F *gPrimaryProtonsExtCov22 = new TH1F("gPrimaryProtonsExtCov22",
1616 ";#sigma_{z} [cm];Entries",
1618 fAcceptedCutList->Add(gPrimaryProtonsExtCov22);
1619 TH1F *gPrimaryAntiProtonsExtCov22 = new TH1F("gPrimaryAntiProtonsExtCov22",
1620 ";#sigma_{z} [cm];Entries",
1622 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov22);
1623 TH1F *gSecondaryProtonsExtCov22 = new TH1F("gSecondaryProtonsExtCov22",
1624 ";#sigma_{z} [cm];Entries",
1626 fAcceptedCutList->Add(gSecondaryProtonsExtCov22);
1627 TH1F *gSecondaryAntiProtonsExtCov22 = new TH1F("gSecondaryAntiProtonsExtCov22",
1628 ";#sigma_{z} [cm];Entries",
1630 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov22);
1633 TH1F *gPrimaryProtonsExtCov33 = new TH1F("gPrimaryProtonsExtCov33",
1634 ";#sigma_{sin(#phi)};Entries",
1636 fAcceptedCutList->Add(gPrimaryProtonsExtCov33);
1637 TH1F *gPrimaryAntiProtonsExtCov33 = new TH1F("gPrimaryAntiProtonsExtCov33",
1638 ";#sigma_{sin(#phi)};Entries",
1640 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov33);
1641 TH1F *gSecondaryProtonsExtCov33 = new TH1F("gSecondaryProtonsExtCov33",
1642 ";#sigma_{sin(#phi)};Entries",
1644 fAcceptedCutList->Add(gSecondaryProtonsExtCov33);
1645 TH1F *gSecondaryAntiProtonsExtCov33 = new TH1F("gSecondaryAntiProtonsExtCov33",
1646 ";#sigma_{sin(#phi)};Entries",
1648 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov33);
1651 TH1F *gPrimaryProtonsExtCov44 = new TH1F("gPrimaryProtonsExtCov44",
1652 ";#sigma_{tan(#lambda)};Entries",
1654 fAcceptedCutList->Add(gPrimaryProtonsExtCov44);
1655 TH1F *gPrimaryAntiProtonsExtCov44 = new TH1F("gPrimaryAntiProtonsExtCov44",
1656 ";#sigma_{tan(#lambda)};Entries",
1658 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov44);
1659 TH1F *gSecondaryProtonsExtCov44 = new TH1F("gSecondaryProtonsExtCov44",
1660 ";#sigma_{tan(#lambda)};Entries",
1662 fAcceptedCutList->Add(gSecondaryProtonsExtCov44);
1663 TH1F *gSecondaryAntiProtonsExtCov44 = new TH1F("gSecondaryAntiProtonsExtCov44",
1664 ";#sigma_{tan(#lambda)};Entries",
1666 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov44);
1669 TH1F *gPrimaryProtonsExtCov55 = new TH1F("gPrimaryProtonsExtCov55",
1670 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1672 fAcceptedCutList->Add(gPrimaryProtonsExtCov55);
1673 TH1F *gPrimaryAntiProtonsExtCov55 = new TH1F("gPrimaryAntiProtonsExtCov55",
1674 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1676 fAcceptedCutList->Add(gPrimaryAntiProtonsExtCov55);
1677 TH1F *gSecondaryProtonsExtCov55 = new TH1F("gSecondaryProtonsExtCov55",
1678 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1680 fAcceptedCutList->Add(gSecondaryProtonsExtCov55);
1681 TH1F *gSecondaryAntiProtonsExtCov55 = new TH1F("gSecondaryAntiProtonsExtCov55",
1682 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
1684 fAcceptedCutList->Add(gSecondaryAntiProtonsExtCov55);
1686 TH3D *gHistEtaPhiNClustersPrimaryProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryProtonsPass",
1687 "Accepted primary protons;#eta;#phi;N_{clusters}(TPC)",
1688 fNBinsY,fMinY,fMaxY,
1691 gHistEtaPhiNClustersPrimaryProtonsPass->SetStats(kTRUE);
1692 gHistEtaPhiNClustersPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1693 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1694 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsPass",
1695 "Accepted primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1696 fNBinsY,fMinY,fMaxY,
1699 gHistEtaPhiNClustersPrimaryAntiProtonsPass->SetStats(kTRUE);
1700 gHistEtaPhiNClustersPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1701 fAcceptedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1702 TH3D *gHistEtaPhiNClustersSecondaryProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryProtonsPass",
1703 "Accepted secondary protons;#eta;#phi;N_{clusters}(TPC)",
1704 fNBinsY,fMinY,fMaxY,
1707 gHistEtaPhiNClustersSecondaryProtonsPass->SetStats(kTRUE);
1708 gHistEtaPhiNClustersSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1709 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1710 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsPass",
1711 "Accepted secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1712 fNBinsY,fMinY,fMaxY,
1715 gHistEtaPhiNClustersSecondaryAntiProtonsPass->SetStats(kTRUE);
1716 gHistEtaPhiNClustersSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1717 fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1718 //eta-phi-chi^2 per TPC cluster
1719 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass",
1720 "Accepted primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1721 fNBinsY,fMinY,fMaxY,
1724 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->SetStats(kTRUE);
1725 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1726 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1727 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass",
1728 "Accepted primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1729 fNBinsY,fMinY,fMaxY,
1732 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->SetStats(kTRUE);
1733 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1734 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1735 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass",
1736 "Accepted secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1737 fNBinsY,fMinY,fMaxY,
1740 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->SetStats(kTRUE);
1741 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1742 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1743 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass",
1744 "Accepted secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1745 fNBinsY,fMinY,fMaxY,
1748 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->SetStats(kTRUE);
1749 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1750 fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1751 //eta-phi-number of TPC points for the dE/dx
1752 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass",
1753 "Accepted primary protons;#eta;#phi;N_{points}(TPC)",
1754 fNBinsY,fMinY,fMaxY,
1757 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->SetStats(kTRUE);
1758 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
1759 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
1760 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass",
1761 "Accepted primary antiprotons;#eta;#phi;N_{points}(TPC)",
1762 fNBinsY,fMinY,fMaxY,
1765 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->SetStats(kTRUE);
1766 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1767 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
1768 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass",
1769 "Accepted secondary protons;#eta;#phi;N_{points}(TPC)",
1770 fNBinsY,fMinY,fMaxY,
1773 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->SetStats(kTRUE);
1774 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
1775 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
1776 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass",
1777 "Accepted secondary antiprotons;#eta;#phi;N_{points}(TPC)",
1778 fNBinsY,fMinY,fMaxY,
1781 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->SetStats(kTRUE);
1782 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
1783 fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
1785 TH1F *gPrimaryProtonsNPointsTPCdEdx = new TH1F("gPrimaryProtonsNPointsTPCdEdx",
1786 ";N_{points} (TPC-dE/dx);Entries",
1788 fAcceptedCutList->Add(gPrimaryProtonsNPointsTPCdEdx);
1789 TH1F *gPrimaryAntiProtonsNPointsTPCdEdx = new TH1F("gPrimaryAntiProtonsNPointsTPCdEdx",
1790 ";N_{points} (TPC-dE/dx);Entries",
1792 fAcceptedCutList->Add(gPrimaryAntiProtonsNPointsTPCdEdx);
1793 TH1F *gSecondaryProtonsNPointsTPCdEdx = new TH1F("gSecondaryProtonsNPointsTPCdEdx",
1794 ";N_{points} (TPC-dE/dx);Entries",
1796 fAcceptedCutList->Add(gSecondaryProtonsNPointsTPCdEdx);
1797 TH1F *gSecondaryAntiProtonsNPointsTPCdEdx = new TH1F("gSecondaryAntiProtonsNPointsTPCdEdx",
1798 ";N_{points} (TPC-dE/dx);Entries",
1800 fAcceptedCutList->Add(gSecondaryAntiProtonsNPointsTPCdEdx);
1803 fRejectedCutList = new TList();
1805 TH3D *gHistEtaPhiNClustersPrimaryProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryProtonsReject",
1806 "Rejected primary protons;#eta;#phi;N_{clusters}(TPC)",
1807 fNBinsY,fMinY,fMaxY,
1810 gHistEtaPhiNClustersPrimaryProtonsReject->SetStats(kTRUE);
1811 gHistEtaPhiNClustersPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1812 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1813 TH3D *gHistEtaPhiNClustersPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersPrimaryAntiProtonsReject",
1814 "Rejected primary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1815 fNBinsY,fMinY,fMaxY,
1818 gHistEtaPhiNClustersPrimaryAntiProtonsReject->SetStats(kTRUE);
1819 gHistEtaPhiNClustersPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1820 fRejectedCutList->Add(gHistEtaPhiNClustersPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1821 TH3D *gHistEtaPhiNClustersSecondaryProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryProtonsReject",
1822 "Rejected secondary protons;#eta;#phi;N_{clusters}(TPC)",
1823 fNBinsY,fMinY,fMaxY,
1826 gHistEtaPhiNClustersSecondaryProtonsReject->SetStats(kTRUE);
1827 gHistEtaPhiNClustersSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1828 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1829 TH3D *gHistEtaPhiNClustersSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiNClustersSecondaryAntiProtonsReject",
1830 "Rejected secondary antiprotons;#eta;#phi;N_{clusters}(TPC)",
1831 fNBinsY,fMinY,fMaxY,
1834 gHistEtaPhiNClustersSecondaryAntiProtonsReject->SetStats(kTRUE);
1835 gHistEtaPhiNClustersSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1836 fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1837 //eta-phi-chi^2 per TPC cluster
1838 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject",
1839 "Rejected primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1840 fNBinsY,fMinY,fMaxY,
1843 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject->SetStats(kTRUE);
1844 gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1845 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1846 TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject",
1847 "Rejected primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1848 fNBinsY,fMinY,fMaxY,
1851 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject->SetStats(kTRUE);
1852 gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1853 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1854 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject",
1855 "Rejected secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1856 fNBinsY,fMinY,fMaxY,
1859 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject->SetStats(kTRUE);
1860 gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1861 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1862 TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject",
1863 "Rejected secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
1864 fNBinsY,fMinY,fMaxY,
1867 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject->SetStats(kTRUE);
1868 gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1869 fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1870 //eta-phi-number of TPC points for the dE/dx
1871 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject",
1872 "Rejected primary protons;#eta;#phi;N_{points}(TPC)",
1873 fNBinsY,fMinY,fMaxY,
1876 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject->SetStats(kTRUE);
1877 gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
1878 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
1879 TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject",
1880 "Rejected primary antiprotons;#eta;#phi;N_{points}(TPC)",
1881 fNBinsY,fMinY,fMaxY,
1884 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject->SetStats(kTRUE);
1885 gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1886 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
1887 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject",
1888 "Rejected secondary protons;#eta;#phi;N_{points}(TPC)",
1889 fNBinsY,fMinY,fMaxY,
1892 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject->SetStats(kTRUE);
1893 gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
1894 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
1895 TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject",
1896 "Rejected secondary antiprotons;#eta;#phi;N_{points}(TPC)",
1897 fNBinsY,fMinY,fMaxY,
1900 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject->SetStats(kTRUE);
1901 gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
1902 fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
1905 fAcceptedDCAList = new TList();
1906 TH1F *gPrimaryProtonsDCAXY = new TH1F("gPrimaryProtonsDCAXY",
1907 ";DCA_{xy} [cm];Entries",
1909 fAcceptedDCAList->Add(gPrimaryProtonsDCAXY);
1910 TH1F *gPrimaryAntiProtonsDCAXY = new TH1F("gPrimaryAntiProtonsDCAXY",
1911 ";DCA_{xy} [cm];Entries",
1913 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAXY);
1914 TH1F *gSecondaryProtonsDCAXY = new TH1F("gSecondaryProtonsDCAXY",
1915 ";DCA_{xy} [cm];Entries",
1917 fAcceptedDCAList->Add(gSecondaryProtonsDCAXY);
1918 TH1F *gSecondaryAntiProtonsDCAXY = new TH1F("gSecondaryAntiProtonsDCAXY",
1919 ";DCA_{xy} [cm];Entries",
1922 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAXY);
1923 TH1F *gPrimaryProtonsDCAZ = new TH1F("gPrimaryProtonsDCAZ",
1924 ";DCA_{z} [cm];Entries",
1926 fAcceptedDCAList->Add(gPrimaryProtonsDCAZ);
1927 TH1F *gPrimaryAntiProtonsDCAZ = new TH1F("gPrimaryAntiProtonsDCAZ",
1928 ";DCA_{z} [cm];Entries",
1930 fAcceptedDCAList->Add(gPrimaryAntiProtonsDCAZ);
1931 TH1F *gSecondaryProtonsDCAZ = new TH1F("gSecondaryProtonsDCAZ",
1932 ";DCA_{z} [cm];Entries",
1934 fAcceptedDCAList->Add(gSecondaryProtonsDCAZ);
1935 TH1F *gSecondaryAntiProtonsDCAZ = new TH1F("gSecondaryAntiProtonsDCAZ",
1936 ";DCA_{z} [cm];Entries",
1938 fAcceptedDCAList->Add(gSecondaryAntiProtonsDCAZ);
1940 TH1F *gPrimaryProtonsSigmaToVertex = new TH1F("gPrimaryProtonsSigmaToVertex",
1941 ";#sigma_{Vertex};Entries",
1943 fAcceptedDCAList->Add(gPrimaryProtonsSigmaToVertex);
1944 TH1F *gPrimaryAntiProtonsSigmaToVertex = new TH1F("gPrimaryAntiProtonsSigmaToVertex",
1945 ";#sigma_{Vertex};Entries",
1947 fAcceptedDCAList->Add(gPrimaryAntiProtonsSigmaToVertex);
1948 TH1F *gSecondaryProtonsSigmaToVertex = new TH1F("gSecondaryProtonsSigmaToVertex",
1949 ";#sigma_{Vertex};Entries",
1951 fAcceptedDCAList->Add(gSecondaryProtonsSigmaToVertex);
1952 TH1F *gSecondaryAntiProtonsSigmaToVertex = new TH1F("gSecondaryAntiProtonsSigmaToVertex",
1953 ";#sigma_{Vertex};Entries",
1955 fAcceptedDCAList->Add(gSecondaryAntiProtonsSigmaToVertex);
1957 //2D DCA vs pT plots
1958 TH2F *gHistPrimaryProtonsDCAxyPt = new TH2F("gHistPrimaryProtonsDCAxyPt",
1959 ";P_{T} [GeV/c];dca_{xy} [cm]",
1962 gHistPrimaryProtonsDCAxyPt->SetStats(kFALSE);
1963 fAcceptedDCAList->Add(gHistPrimaryProtonsDCAxyPt);
1964 TH2F *gHistPrimaryAntiProtonsDCAxyPt = new TH2F("gHistPrimaryAntiProtonsDCAxyPt",
1965 ";P_{T} [GeV/c];dca_{xy} [cm]",
1968 gHistPrimaryAntiProtonsDCAxyPt->SetStats(kFALSE);
1969 fAcceptedDCAList->Add(gHistPrimaryAntiProtonsDCAxyPt);
1970 TH2F *gHistSecondaryProtonsFromWeakDCAxyPt = new TH2F("gHistSecondaryProtonsFromWeakDCAxyPt",
1971 ";P_{T} [GeV/c];dca_{xy} [cm]",
1974 gHistSecondaryProtonsFromWeakDCAxyPt->SetStats(kFALSE);
1975 fAcceptedDCAList->Add(gHistSecondaryProtonsFromWeakDCAxyPt);
1976 TH2F *gHistSecondaryAntiProtonsFromWeakDCAxyPt = new TH2F("gHistSecondaryAntiProtonsFromWeakDCAxyPt",
1977 ";P_{T} [GeV/c];dca_{xy} [cm]",
1980 gHistSecondaryAntiProtonsFromWeakDCAxyPt->SetStats(kFALSE);
1981 fAcceptedDCAList->Add(gHistSecondaryAntiProtonsFromWeakDCAxyPt);
1982 TH2F *gHistSecondaryProtonsFromHadronicDCAxyPt = new TH2F("gHistSecondaryProtonsFromHadronicDCAxyPt",
1983 ";P_{T} [GeV/c];dca_{xy} [cm]",
1986 gHistSecondaryProtonsFromHadronicDCAxyPt->SetStats(kFALSE);
1987 fAcceptedDCAList->Add(gHistSecondaryProtonsFromHadronicDCAxyPt);
1988 TH2F *gHistSecondaryAntiProtonsFromHadronicDCAxyPt = new TH2F("gHistSecondaryAntiProtonsFromHadronicDCAxyPt",
1989 ";P_{T} [GeV/c];dca_{xy} [cm]",
1992 gHistSecondaryAntiProtonsFromHadronicDCAxyPt->SetStats(kFALSE);
1993 fAcceptedDCAList->Add(gHistSecondaryAntiProtonsFromHadronicDCAxyPt);
1995 TH2F *gHistPrimaryProtonsDCAzPt = new TH2F("gHistPrimaryProtonsDCAzPt",
1996 ";P_{T} [GeV/c];dca_{z} [cm]",
1999 gHistPrimaryProtonsDCAzPt->SetStats(kFALSE);
2000 fAcceptedDCAList->Add(gHistPrimaryProtonsDCAzPt);
2001 TH2F *gHistPrimaryAntiProtonsDCAzPt = new TH2F("gHistPrimaryAntiProtonsDCAzPt",
2002 ";P_{T} [GeV/c];dca_{z} [cm]",
2005 gHistPrimaryAntiProtonsDCAzPt->SetStats(kFALSE);
2006 fAcceptedDCAList->Add(gHistPrimaryAntiProtonsDCAzPt);
2007 TH2F *gHistSecondaryProtonsFromWeakDCAzPt = new TH2F("gHistSecondaryProtonsFromWeakDCAzPt",
2008 ";P_{T} [GeV/c];dca_{z} [cm]",
2011 gHistSecondaryProtonsFromWeakDCAzPt->SetStats(kFALSE);
2012 fAcceptedDCAList->Add(gHistSecondaryProtonsFromWeakDCAzPt);
2013 TH2F *gHistSecondaryAntiProtonsFromWeakDCAzPt = new TH2F("gHistSecondaryAntiProtonsFromWeakDCAzPt",
2014 ";P_{T} [GeV/c];dca_{z} [cm]",
2017 gHistSecondaryAntiProtonsFromWeakDCAzPt->SetStats(kFALSE);
2018 fAcceptedDCAList->Add(gHistSecondaryAntiProtonsFromWeakDCAzPt);
2019 TH2F *gHistSecondaryProtonsFromHadronicDCAzPt = new TH2F("gHistSecondaryProtonsFromHadronicDCAzPt",
2020 ";P_{T} [GeV/c];dca_{z} [cm]",
2023 gHistSecondaryProtonsFromHadronicDCAzPt->SetStats(kFALSE);
2024 fAcceptedDCAList->Add(gHistSecondaryProtonsFromHadronicDCAzPt);
2025 TH2F *gHistSecondaryAntiProtonsFromHadronicDCAzPt = new TH2F("gHistSecondaryAntiProtonsFromHadronicDCAzPt",
2026 ";P_{T} [GeV/c];dca_{z} [cm]",
2029 gHistSecondaryAntiProtonsFromHadronicDCAzPt->SetStats(kFALSE);
2030 fAcceptedDCAList->Add(gHistSecondaryAntiProtonsFromHadronicDCAzPt);
2033 //____________________________________________________________________//
2034 void AliProtonQAAnalysis::InitVertexQA() {
2035 //Initializes the Vertex QA histograms
2036 fQAVertexList = new TList();
2037 fQAVertexList->SetName("fQAVertexList");
2039 //Gen. multiplicity bins
2040 //Float_t xBins[24] = {0,1,2,4,6,8,10,15,20,30,40,50,75,100,
2041 //200,300,400,500,750,1000,1500,2000,2500,3000};
2042 //MC primary multiplicity (vertex efficiency calculation)
2043 TH1F *gHistMCPrimaryVz = new TH1F("gHistMCPrimaryVz",
2044 ";V_{z} (gen.) [cm];Entries",
2046 fQAVertexList->Add(gHistMCPrimaryVz);
2047 //TH1F *gHistMCPrimaryMultiplicity = new TH1F("gHistMCPrimaryMultiplicity",
2048 //";N_{prim. gen.};Entries",
2050 //fQAVertexList->Add(gHistMCPrimaryMultiplicity);
2053 TH1F *gHistTPCVz = new TH1F("gHistTPCVz",
2054 ";V_{z} (gen.) [cm];Entries",
2056 fQAVertexList->Add(gHistTPCVz);
2057 //TH1F *gHistMCPrimaryMultiplicityTPC = new TH1F("gHistMCPrimaryMultiplicityTPC",
2058 //"Vertex TPC;N_{prim. gen.};Entries",
2060 //fQAVertexList->Add(gHistMCPrimaryMultiplicityTPC);
2061 TH2F *gHistTPCESDVxN = new TH2F("gHistTPCESDVxN",
2062 "Primary vertex TPC;V_{x} [cm];N_{contributors}",
2063 100,-10.,10.,1000,0,5000);
2064 fQAVertexList->Add(gHistTPCESDVxN);
2065 TH2F *gHistTPCESDVyN = new TH2F("gHistTPCESDVyN",
2066 "Primary vertex TPC;V_{y} [cm];N_{contributors}",
2067 100,-10.,10.,1000,0,5000);
2068 fQAVertexList->Add(gHistTPCESDVyN);
2069 TH2F *gHistTPCESDVzN = new TH2F("gHistTPCESDVzN",
2070 "Primary vertex TPC;V_{z} [cm];N_{contributors}",
2071 100,-20.,20.,1000,0,5000);
2072 fQAVertexList->Add(gHistTPCESDVzN);
2073 TH1F *gHistTPCDiffVx = new TH1F("gHistTPCDiffVx",
2074 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
2075 100,-10000.,10000.);
2076 fQAVertexList->Add(gHistTPCDiffVx);
2077 TH1F *gHistTPCDiffVy = new TH1F("gHistTPCDiffVy",
2078 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
2079 100,-10000.,10000.);
2080 fQAVertexList->Add(gHistTPCDiffVy);
2081 TH1F *gHistTPCDiffVz = new TH1F("gHistTPCDiffVz",
2082 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
2083 100,-10000.,10000.);
2084 fQAVertexList->Add(gHistTPCDiffVz);
2085 TH1F *gHistTPCResolutionVx = new TH1F("gHistTPCResolutionVx",
2086 ";#sigma_{x} [#mu m];Entries",
2088 fQAVertexList->Add(gHistTPCResolutionVx);
2089 TH1F *gHistTPCResolutionVy = new TH1F("gHistTPCResolutionVy",
2090 ";#sigma_{y} [#mu m];Entries",
2092 fQAVertexList->Add(gHistTPCResolutionVy);
2093 TH1F *gHistTPCResolutionVz = new TH1F("gHistTPCResolutionVz",
2094 ";#sigma_{z} [#mu m];Entries",
2096 fQAVertexList->Add(gHistTPCResolutionVz);
2099 TH1F *gHistSPDVz = new TH1F("gHistSPDVz",
2100 ";V_{z} (gen.) [cm];Entries",
2102 fQAVertexList->Add(gHistSPDVz);
2103 //TH1F *gHistMCPrimaryMultiplicitySPD = new TH1F("gHistMCPrimaryMultiplicitySPD",
2104 //"Vertex SPD;N_{prim. gen.};Entries",
2106 //fQAVertexList->Add(gHistMCPrimaryMultiplicitySPD);
2107 TH2F *gHistSPDESDVxN = new TH2F("gHistSPDESDVxN",
2108 "Primary vertex SPD;V_{x} [cm];N_{contributors}",
2109 100,-10.,10.,1000,0,5000);
2110 fQAVertexList->Add(gHistSPDESDVxN);
2111 TH2F *gHistSPDESDVyN = new TH2F("gHistSPDESDVyN",
2112 "Primary vertex SPD;V_{y} [cm];N_{contributors}",
2113 100,-10.,10.,1000,0,5000);
2114 fQAVertexList->Add(gHistSPDESDVyN);
2115 TH2F *gHistSPDESDVzN = new TH2F("gHistSPDESDVzN",
2116 "Primary vertex SPD;V_{z} [cm];N_{contributors}",
2117 100,-20.,20.,1000,0,5000);
2118 fQAVertexList->Add(gHistSPDESDVzN);
2119 TH1F *gHistSPDDiffVx = new TH1F("gHistSPDDiffVx",
2120 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
2121 100,-10000.,10000.);
2122 fQAVertexList->Add(gHistSPDDiffVx);
2123 TH1F *gHistSPDDiffVy = new TH1F("gHistSPDDiffVy",
2124 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
2125 100,-10000.,10000.);
2126 fQAVertexList->Add(gHistSPDDiffVy);
2127 TH1F *gHistSPDDiffVz = new TH1F("gHistSPDDiffVz",
2128 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
2129 100,-10000.,10000.);
2130 fQAVertexList->Add(gHistSPDDiffVz);
2131 TH1F *gHistSPDResolutionVx = new TH1F("gHistSPDResolutionVx",
2132 ";#sigma_{x} [#mu m];Entries",
2134 fQAVertexList->Add(gHistSPDResolutionVx);
2135 TH1F *gHistSPDResolutionVy = new TH1F("gHistSPDResolutionVy",
2136 ";#sigma_{y} [#mu m];Entries",
2138 fQAVertexList->Add(gHistSPDResolutionVy);
2139 TH1F *gHistSPDResolutionVz = new TH1F("gHistSPDResolutionVz",
2140 ";#sigma_{z} [#mu m];Entries",
2142 fQAVertexList->Add(gHistSPDResolutionVz);
2145 TH1F *gHistTracksVz = new TH1F("gHistTracksVz",
2146 ";V_{z} (gen.) [cm];Entries",
2148 fQAVertexList->Add(gHistTracksVz);
2149 //TH1F *gHistMCPrimaryMultiplicityTracks = new TH1F("gHistMCPrimaryMultiplicityTracks",
2150 //"Vertex Tracks;N_{prim. gen.};Entries",
2152 //fQAVertexList->Add(gHistMCPrimaryMultiplicityTracks);
2153 TH2F *gHistTracksESDVxN = new TH2F("gHistTracksESDVxN",
2154 "Primary vertex Tracks;V_{x} [cm];N_{contributors}",
2155 100,-10.,10.,1000,0,5000);
2156 fQAVertexList->Add(gHistTracksESDVxN);
2157 TH2F *gHistTracksESDVyN = new TH2F("gHistTracksESDVyN",
2158 "Primary vertex Tracks;V_{y} [cm];N_{contributors}",
2159 100,-10.,10.,1000,0,5000);
2160 fQAVertexList->Add(gHistTracksESDVyN);
2161 TH2F *gHistTracksESDVzN = new TH2F("gHistTracksESDVzN",
2162 "Primary vertex Tracks;V_{z} [cm];N_{contributors}",
2163 100,-20.,20.,1000,0,5000);
2164 fQAVertexList->Add(gHistTracksESDVzN);
2165 TH1F *gHistTracksDiffVx = new TH1F("gHistTracksDiffVx",
2166 ";V_{x}(rec.) - V_{x}(true) [#mu m];Entries",
2167 100,-10000.,10000.);
2168 fQAVertexList->Add(gHistTracksDiffVx);
2169 TH1F *gHistTracksDiffVy = new TH1F("gHistTracksDiffVy",
2170 ";V_{y}(rec.) - V_{y}(true) [#mu m];Entries",
2171 100,-10000.,10000.);
2172 fQAVertexList->Add(gHistTracksDiffVy);
2173 TH1F *gHistTracksDiffVz = new TH1F("gHistTracksDiffVz",
2174 ";V_{z}(rec.) - V_{z}(true) [#mu m];Entries",
2175 100,-10000.,10000.);
2176 fQAVertexList->Add(gHistTracksDiffVz);
2177 TH1F *gHistTracksResolutionVx = new TH1F("gHistTracksResolutionVx",
2178 ";#sigma_{x} [#mu m];Entries",
2180 fQAVertexList->Add(gHistTracksResolutionVx);
2181 TH1F *gHistTracksResolutionVy = new TH1F("gHistTracksResolutionVy",
2182 ";#sigma_{y} [#mu m];Entries",
2184 fQAVertexList->Add(gHistTracksResolutionVy);
2185 TH1F *gHistTracksResolutionVz = new TH1F("gHistTracksResolutionVz",
2186 ";#sigma_{z} [#mu m];Entries",
2188 fQAVertexList->Add(gHistTracksResolutionVz);
2191 //____________________________________________________________________//
2192 void AliProtonQAAnalysis::InitQA() {
2193 //Initializes the QA histograms
2194 //if(!fQAHistograms)
2198 //TDirectory *dir2D = gDirectory->mkdir("2D");
2199 //fGlobalQAList->Add(dir2D); dir2D->cd();
2200 TH2D *gHistYPtPrimaryProtonsPass = 0x0;
2201 if(fUseAsymmetricBinning)
2202 gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
2204 fNBinsY,fY,fNBinsPt,fPt);
2206 gHistYPtPrimaryProtonsPass = new TH2D("gHistYPtPrimaryProtonsPass",
2208 fNBinsY,fMinY,fMaxY,
2209 fNBinsPt,fMinPt,fMaxPt);
2210 if(fProtonAnalysisBase->GetEtaMode())
2211 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("#eta");
2213 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitle("y");
2214 gHistYPtPrimaryProtonsPass->SetStats(kTRUE);
2215 gHistYPtPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
2216 fQA2DList->Add(gHistYPtPrimaryProtonsPass);//y-pT of primary accepted ESD protons
2217 TH2D *gHistYPtPrimaryProtonsReject = 0x0;
2218 if(fUseAsymmetricBinning)
2219 gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
2221 fNBinsY,fY,fNBinsPt,fPt);
2223 gHistYPtPrimaryProtonsReject = new TH2D("gHistYPtPrimaryProtonsReject",
2225 fNBinsY,fMinY,fMaxY,
2226 fNBinsPt,fMinPt,fMaxPt);
2227 if(fProtonAnalysisBase->GetEtaMode())
2228 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("#eta");
2230 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitle("y");
2231 gHistYPtPrimaryProtonsReject->SetStats(kTRUE);
2232 gHistYPtPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
2233 fQA2DList->Add(gHistYPtPrimaryProtonsReject);//y-pT of primary rejected ESD protons
2235 TH2D *gHistYPtSecondaryProtonsPass = 0x0;
2236 if(fUseAsymmetricBinning)
2237 gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
2239 fNBinsY,fY,fNBinsPt,fPt);
2241 gHistYPtSecondaryProtonsPass = new TH2D("gHistYPtSecondaryProtonsPass",
2243 fNBinsY,fMinY,fMaxY,
2244 fNBinsPt,fMinPt,fMaxPt);
2245 if(fProtonAnalysisBase->GetEtaMode())
2246 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("#eta");
2248 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitle("y");
2249 gHistYPtSecondaryProtonsPass->SetStats(kTRUE);
2250 gHistYPtSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
2251 fQA2DList->Add(gHistYPtSecondaryProtonsPass);//y-pT of secondary accepted ESD protons
2252 TH2D *gHistYPtSecondaryProtonsReject = 0x0;
2253 if(fUseAsymmetricBinning)
2254 gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
2256 fNBinsY,fY,fNBinsPt,fPt);
2258 gHistYPtSecondaryProtonsReject = new TH2D("gHistYPtSecondaryProtonsReject",
2260 fNBinsY,fMinY,fMaxY,
2261 fNBinsPt,fMinPt,fMaxPt);
2262 if(fProtonAnalysisBase->GetEtaMode())
2263 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("#eta");
2265 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitle("y");
2266 gHistYPtSecondaryProtonsReject->SetStats(kTRUE);
2267 gHistYPtSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
2268 fQA2DList->Add(gHistYPtSecondaryProtonsReject);//y-pT of secondary rejected ESD protons
2270 TH2D *gHistYPtPrimaryAntiProtonsPass = 0x0;
2271 if(fUseAsymmetricBinning)
2272 gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
2274 fNBinsY,fY,fNBinsPt,fPt);
2276 gHistYPtPrimaryAntiProtonsPass = new TH2D("gHistYPtPrimaryAntiProtonsPass",
2278 fNBinsY,fMinY,fMaxY,
2279 fNBinsPt,fMinPt,fMaxPt);
2280 if(fProtonAnalysisBase->GetEtaMode())
2281 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2283 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitle("y");
2284 gHistYPtPrimaryAntiProtonsPass->SetStats(kTRUE);
2285 gHistYPtPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2286 fQA2DList->Add(gHistYPtPrimaryAntiProtonsPass);//y-pT of primary accepted ESD antiprotons
2287 TH2D *gHistYPtPrimaryAntiProtonsReject = 0x0;
2288 if(fUseAsymmetricBinning)
2289 gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
2291 fNBinsY,fY,fNBinsPt,fPt);
2293 gHistYPtPrimaryAntiProtonsReject = new TH2D("gHistYPtPrimaryAntiProtonsReject",
2295 fNBinsY,fMinY,fMaxY,
2296 fNBinsPt,fMinPt,fMaxPt);
2297 if(fProtonAnalysisBase->GetEtaMode())
2298 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2300 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2301 gHistYPtPrimaryAntiProtonsReject->SetStats(kTRUE);
2302 gHistYPtPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2303 fQA2DList->Add(gHistYPtPrimaryAntiProtonsReject);//y-pT of primary rejected ESD antiprotons
2305 TH2D *gHistYPtSecondaryAntiProtonsPass = 0x0;
2306 if(fUseAsymmetricBinning)
2307 gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
2309 fNBinsY,fY,fNBinsPt,fPt);
2311 gHistYPtSecondaryAntiProtonsPass = new TH2D("gHistYPtSecondaryAntiProtonsPass",
2313 fNBinsY,fMinY,fMaxY,
2314 fNBinsPt,fMinPt,fMaxPt);
2315 if(fProtonAnalysisBase->GetEtaMode())
2316 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2318 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitle("y");
2319 gHistYPtSecondaryAntiProtonsPass->SetStats(kTRUE);
2320 gHistYPtSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
2321 fQA2DList->Add(gHistYPtSecondaryAntiProtonsPass);//y-pT of secondary accepted ESD antiprotons
2322 TH2D *gHistYPtSecondaryAntiProtonsReject = 0x0;
2323 if(fUseAsymmetricBinning)
2324 gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
2326 fNBinsY,fY,fNBinsPt,fPt);
2328 gHistYPtSecondaryAntiProtonsReject = new TH2D("gHistYPtSecondaryAntiProtonsReject",
2330 fNBinsY,fMinY,fMaxY,
2331 fNBinsPt,fMinPt,fMaxPt);
2332 if(fProtonAnalysisBase->GetEtaMode())
2333 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("#eta");
2335 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitle("y");
2336 gHistYPtSecondaryAntiProtonsReject->SetStats(kTRUE);
2337 gHistYPtSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
2338 fQA2DList->Add(gHistYPtSecondaryAntiProtonsReject);//y-pT of secondary rejected ESD antiprotons
2340 TH2D *gHistYPtPrimaryProtonsMC = 0x0;
2341 if(fUseAsymmetricBinning)
2342 gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
2344 fNBinsY,fY,fNBinsPt,fPt);
2346 gHistYPtPrimaryProtonsMC = new TH2D("gHistYPtPrimaryProtonsMC",
2348 fNBinsY,fMinY,fMaxY,
2349 fNBinsPt,fMinPt,fMaxPt);
2350 if(fProtonAnalysisBase->GetEtaMode())
2351 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("#eta");
2353 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitle("y");
2354 gHistYPtPrimaryProtonsMC->SetStats(kTRUE);
2355 gHistYPtPrimaryProtonsMC->GetXaxis()->SetTitleColor(1);
2356 fQA2DList->Add(gHistYPtPrimaryProtonsMC);//y-pT of primary MC protons
2357 TH2D *gHistYPtPrimaryAntiProtonsMC = 0x0;
2358 if(fUseAsymmetricBinning)
2359 gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
2361 fNBinsY,fY,fNBinsPt,fPt);
2363 gHistYPtPrimaryAntiProtonsMC = new TH2D("gHistYPtPrimaryAntiProtonsMC",
2365 fNBinsY,fMinY,fMaxY,
2366 fNBinsPt,fMinPt,fMaxPt);
2367 if(fProtonAnalysisBase->GetEtaMode())
2368 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("#eta");
2370 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitle("y");
2371 gHistYPtPrimaryAntiProtonsMC->SetStats(kTRUE);
2372 gHistYPtPrimaryAntiProtonsMC->GetXaxis()->SetTitleColor(1);
2373 fQA2DList->Add(gHistYPtPrimaryAntiProtonsMC);//y-pT of primary MC antiprotons
2375 TH3F *gHistYPtPDGProtonsPass = 0x0;
2376 if(fUseAsymmetricBinning) {
2377 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
2378 gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
2379 ";;P_{T} [GeV/c];PDG",
2380 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
2383 gHistYPtPDGProtonsPass = new TH3F("gHistYPtPDGProtonsPass",
2384 ";;P_{T} [GeV/c];PDG",
2385 fNBinsY,fMinY,fMaxY,
2386 fNBinsPt,fMinPt,fMaxPt,
2388 if(fProtonAnalysisBase->GetEtaMode())
2389 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("#eta");
2391 gHistYPtPDGProtonsPass->GetXaxis()->SetTitle("y");
2392 fQA2DList->Add(gHistYPtPDGProtonsPass);//composition of secondary protons
2393 TH3F *gHistYPtPDGAntiProtonsPass = 0x0;
2394 if(fUseAsymmetricBinning) {
2395 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
2396 gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
2397 ";;P_{T} [GeV/c];PDG",
2398 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
2401 gHistYPtPDGAntiProtonsPass = new TH3F("gHistYPtPDGAntiProtonsPass",
2402 ";;P_{T} [GeV/c];PDG",
2403 fNBinsY,fMinY,fMaxY,
2404 fNBinsPt,fMinPt,fMaxPt,
2406 if(fProtonAnalysisBase->GetEtaMode())
2407 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("#eta");
2409 gHistYPtPDGAntiProtonsPass->GetXaxis()->SetTitle("y");
2410 fQA2DList->Add(gHistYPtPDGAntiProtonsPass);//composition of secondary antiprotons
2412 /*gDirectory->cd("../");
2414 TDirectory *dirProtons = gDirectory->mkdir("Protons");
2415 fGlobalQAList->Add(dirProtons); dirProtons->cd();*/
2417 //________________________________________________________________//
2418 /*TDirectory *dirProtonsPrimary = gDirectory->mkdir("Primaries");
2419 dirProtonsPrimary->cd();
2420 TDirectory *dirProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2421 dirProtonsPrimaryAccepted->cd();*/
2423 //Accepted primary protons
2424 TH1F *gPrimaryProtonsITSClustersPass = new TH1F("gPrimaryProtonsITSClustersPass",
2425 ";N_{clusters} (ITS);Entries",
2427 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSClustersPass);
2428 TH1F *gPrimaryProtonsChi2PerClusterITSPass = new TH1F("gPrimaryProtonsChi2PerClusterITSPass",
2429 ";x^{2}/N_{clusters} (ITS);Entries",
2431 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterITSPass);
2432 TH1F *gPrimaryProtonsTPCClustersPass = new TH1F("gPrimaryProtonsTPCClustersPass",
2433 ";N_{clusters} (TPC);Entries",
2435 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCClustersPass);
2436 TH1F *gPrimaryProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryProtonsChi2PerClusterTPCPass",
2437 ";x^{2}/N_{clusters} (TPC);Entries",
2439 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsChi2PerClusterTPCPass);
2440 TH1F *gPrimaryProtonsExtCov11Pass = new TH1F("gPrimaryProtonsExtCov11Pass",
2441 ";#sigma_{y} [cm];Entries",
2443 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov11Pass);
2444 TH1F *gPrimaryProtonsExtCov22Pass = new TH1F("gPrimaryProtonsExtCov22Pass",
2445 ";#sigma_{z} [cm];Entries",
2447 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov22Pass);
2448 TH1F *gPrimaryProtonsExtCov33Pass = new TH1F("gPrimaryProtonsExtCov33Pass",
2449 ";#sigma_{sin(#phi)};Entries",
2451 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov33Pass);
2452 TH1F *gPrimaryProtonsExtCov44Pass = new TH1F("gPrimaryProtonsExtCov44Pass",
2453 ";#sigma_{tan(#lambda)};Entries",
2455 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov44Pass);
2456 TH1F *gPrimaryProtonsExtCov55Pass = new TH1F("gPrimaryProtonsExtCov55Pass",
2457 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2459 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsExtCov55Pass);
2460 TH1F *gPrimaryProtonsSigmaToVertexPass = new TH1F("gPrimaryProtonsSigmaToVertexPass",
2461 ";#sigma_{Vertex};Entries",
2463 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexPass);
2464 TH1F *gPrimaryProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryProtonsSigmaToVertexTPCPass",
2465 ";#sigma_{Vertex};Entries",
2467 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsSigmaToVertexTPCPass);
2468 TH1F *gPrimaryProtonsDCAXYPass = new TH1F("gPrimaryProtonsDCAXYPass",
2469 ";DCA_{xy} [cm];Entries",
2471 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYPass);
2472 TH1F *gPrimaryProtonsDCAXYTPCPass = new TH1F("gPrimaryProtonsDCAXYTPCPass",
2473 ";DCA_{xy} [cm];Entries",
2475 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAXYTPCPass);
2476 TH1F *gPrimaryProtonsDCAZPass = new TH1F("gPrimaryProtonsDCAZPass",
2477 ";DCA_{z} [cm];Entries",
2479 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZPass);
2480 TH1F *gPrimaryProtonsDCAZTPCPass = new TH1F("gPrimaryProtonsDCAZTPCPass",
2481 ";DCA_{z} [cm];Entries",
2483 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsDCAZTPCPass);
2484 TH1F *gPrimaryProtonsConstrainChi2Pass = new TH1F("gPrimaryProtonsConstrainChi2Pass",
2485 ";Log_{10}(#chi^{2});Entries",
2487 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsConstrainChi2Pass);
2488 TH1F *gPrimaryProtonsITSRefitPass = new TH1F("gPrimaryProtonsITSRefitPass",
2490 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsITSRefitPass);
2491 TH1F *gPrimaryProtonsTPCRefitPass = new TH1F("gPrimaryProtonsTPCRefitPass",
2493 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCRefitPass);
2494 TH1F *gPrimaryProtonsESDpidPass = new TH1F("gPrimaryProtonsESDpidPass",
2496 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsESDpidPass);
2497 TH1F *gPrimaryProtonsTPCpidPass = new TH1F("gPrimaryProtonsTPCpidPass",
2499 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsTPCpidPass);
2500 TH1F *gPrimaryProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryProtonsPointOnITSLayer1Pass",
2502 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer1Pass);
2503 TH1F *gPrimaryProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryProtonsPointOnITSLayer2Pass",
2505 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer2Pass);
2506 TH1F *gPrimaryProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryProtonsPointOnITSLayer3Pass",
2508 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer3Pass);
2509 TH1F *gPrimaryProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryProtonsPointOnITSLayer4Pass",
2511 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer4Pass);
2512 TH1F *gPrimaryProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryProtonsPointOnITSLayer5Pass",
2514 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer5Pass);
2515 TH1F *gPrimaryProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryProtonsPointOnITSLayer6Pass",
2517 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsPointOnITSLayer6Pass);
2518 TH1F *gPrimaryProtonsNumberOfTPCdEdxPointsPass = new TH1F("gPrimaryProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2519 fQAPrimaryProtonsAcceptedList->Add(gPrimaryProtonsNumberOfTPCdEdxPointsPass);
2521 //Rejected primary protons
2522 /*gDirectory->cd("../");
2523 TDirectory *dirProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2524 dirProtonsPrimaryRejected->cd();*/
2526 TH1F *gPrimaryProtonsITSClustersReject = new TH1F("gPrimaryProtonsITSClustersReject",
2527 ";N_{clusters} (ITS);Entries",
2529 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSClustersReject);
2530 TH1F *gPrimaryProtonsChi2PerClusterITSReject = new TH1F("gPrimaryProtonsChi2PerClusterITSReject",
2531 ";x^{2}/N_{clusters} (ITS);Entries",
2533 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterITSReject);
2534 TH1F *gPrimaryProtonsTPCClustersReject = new TH1F("gPrimaryProtonsTPCClustersReject",
2535 ";N_{clusters} (TPC);Entries",
2537 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCClustersReject);
2538 TH1F *gPrimaryProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryProtonsChi2PerClusterTPCReject",
2539 ";x^{2}/N_{clusters} (TPC);Entries",
2541 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsChi2PerClusterTPCReject);
2542 TH1F *gPrimaryProtonsExtCov11Reject = new TH1F("gPrimaryProtonsExtCov11Reject",
2543 ";#sigma_{y} [cm];Entries",
2545 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov11Reject);
2546 TH1F *gPrimaryProtonsExtCov22Reject = new TH1F("gPrimaryProtonsExtCov22Reject",
2547 ";#sigma_{z} [cm];Entries",
2549 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov22Reject);
2550 TH1F *gPrimaryProtonsExtCov33Reject = new TH1F("gPrimaryProtonsExtCov33Reject",
2551 ";#sigma_{sin(#phi)};Entries",
2553 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov33Reject);
2554 TH1F *gPrimaryProtonsExtCov44Reject = new TH1F("gPrimaryProtonsExtCov44Reject",
2555 ";#sigma_{tan(#lambda)};Entries",
2557 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov44Reject);
2558 TH1F *gPrimaryProtonsExtCov55Reject = new TH1F("gPrimaryProtonsExtCov55Reject",
2559 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2561 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsExtCov55Reject);
2562 TH1F *gPrimaryProtonsSigmaToVertexReject = new TH1F("gPrimaryProtonsSigmaToVertexReject",
2563 ";#sigma_{Vertex};Entries",
2565 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexReject);
2566 TH1F *gPrimaryProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryProtonsSigmaToVertexTPCReject",
2567 ";#sigma_{Vertex};Entries",
2569 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsSigmaToVertexTPCReject);
2570 TH1F *gPrimaryProtonsDCAXYReject = new TH1F("gPrimaryProtonsDCAXYReject",
2571 ";DCA_{xy} [cm];Entries",
2573 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYReject);
2574 TH1F *gPrimaryProtonsDCAXYTPCReject = new TH1F("gPrimaryProtonsDCAXYTPCReject",
2575 ";DCA_{xy} [cm];Entries",
2577 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAXYTPCReject);
2578 TH1F *gPrimaryProtonsDCAZReject = new TH1F("gPrimaryProtonsDCAZReject",
2579 ";DCA_{z} [cm];Entries",
2581 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZReject);
2582 TH1F *gPrimaryProtonsDCAZTPCReject = new TH1F("gPrimaryProtonsDCAZTPCReject",
2583 ";DCA_{z} [cm];Entries",
2585 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsDCAZTPCReject);
2586 TH1F *gPrimaryProtonsConstrainChi2Reject = new TH1F("gPrimaryProtonsConstrainChi2Reject",
2587 ";Log_{10}(#chi^{2});Entries",
2589 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsConstrainChi2Reject);
2590 TH1F *gPrimaryProtonsITSRefitReject = new TH1F("gPrimaryProtonsITSRefitReject",
2592 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsITSRefitReject);
2593 TH1F *gPrimaryProtonsTPCRefitReject = new TH1F("gPrimaryProtonsTPCRefitReject",
2595 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCRefitReject);
2596 TH1F *gPrimaryProtonsESDpidReject = new TH1F("gPrimaryProtonsESDpidReject",
2598 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsESDpidReject);
2599 TH1F *gPrimaryProtonsTPCpidReject = new TH1F("gPrimaryProtonsTPCpidReject",
2601 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsTPCpidReject);
2602 TH1F *gPrimaryProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryProtonsPointOnITSLayer1Reject",
2604 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer1Reject);
2605 TH1F *gPrimaryProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryProtonsPointOnITSLayer2Reject",
2607 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer2Reject);
2608 TH1F *gPrimaryProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryProtonsPointOnITSLayer3Reject",
2610 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer3Reject);
2611 TH1F *gPrimaryProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryProtonsPointOnITSLayer4Reject",
2613 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer4Reject);
2614 TH1F *gPrimaryProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryProtonsPointOnITSLayer5Reject",
2616 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer5Reject);
2617 TH1F *gPrimaryProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryProtonsPointOnITSLayer6Reject",
2619 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsPointOnITSLayer6Reject);
2620 TH1F *gPrimaryProtonsNumberOfTPCdEdxPointsReject = new TH1F("gPrimaryProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
2621 fQAPrimaryProtonsRejectedList->Add(gPrimaryProtonsNumberOfTPCdEdxPointsReject);
2622 /*TH2F *gHistPrimaryProtonsDCAxyPtReject = new TH2F("gHistPrimaryProtonsDCAxyPtReject",
2623 ";P_{T} [GeV/c];dca_{xy} [cm]",
2626 gHistPrimaryProtonsDCAxyPtReject->SetStats(kFALSE);
2627 fQAPrimaryProtonsRejectedList->Add(gHistPrimaryProtonsDCAxyPtReject);
2628 TH2F *gHistPrimaryProtonsDCAzPtReject = new TH2F("gHistPrimaryProtonsDCAzPtReject",
2629 ";P_{T} [GeV/c];dca_{z} [cm]",
2632 gHistPrimaryProtonsDCAzPtReject->SetStats(kFALSE);
2633 fQAPrimaryProtonsRejectedList->Add(gHistPrimaryProtonsDCAzPtReject);*/
2635 //________________________________________________________________//
2636 /*gDirectory->cd("../../");
2638 TDirectory *dirProtonsSecondary = gDirectory->mkdir("Secondaries");
2639 dirProtonsSecondary->cd();
2640 TDirectory *dirProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
2641 dirProtonsSecondaryAccepted->cd();*/
2643 //Accepted secondary protons
2644 TH1F *gSecondaryProtonsITSClustersPass = new TH1F("gSecondaryProtonsITSClustersPass",
2645 ";N_{clusters} (ITS);Entries",
2647 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSClustersPass);
2648 TH1F *gSecondaryProtonsChi2PerClusterITSPass = new TH1F("gSecondaryProtonsChi2PerClusterITSPass",
2649 ";x^{2}/N_{clusters} (ITS);Entries",
2651 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterITSPass);
2652 TH1F *gSecondaryProtonsTPCClustersPass = new TH1F("gSecondaryProtonsTPCClustersPass",
2653 ";N_{clusters} (TPC);Entries",
2655 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCClustersPass);
2656 TH1F *gSecondaryProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryProtonsChi2PerClusterTPCPass",
2657 ";x^{2}/N_{clusters} (TPC);Entries",
2659 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsChi2PerClusterTPCPass);
2660 TH1F *gSecondaryProtonsExtCov11Pass = new TH1F("gSecondaryProtonsExtCov11Pass",
2661 ";#sigma_{y} [cm];Entries",
2663 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov11Pass);
2664 TH1F *gSecondaryProtonsExtCov22Pass = new TH1F("gSecondaryProtonsExtCov22Pass",
2665 ";#sigma_{z} [cm];Entries",
2667 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov22Pass);
2668 TH1F *gSecondaryProtonsExtCov33Pass = new TH1F("gSecondaryProtonsExtCov33Pass",
2669 ";#sigma_{sin(#phi)};Entries",
2671 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov33Pass);
2672 TH1F *gSecondaryProtonsExtCov44Pass = new TH1F("gSecondaryProtonsExtCov44Pass",
2673 ";#sigma_{tan(#lambda)};Entries",
2675 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov44Pass);
2676 TH1F *gSecondaryProtonsExtCov55Pass = new TH1F("gSecondaryProtonsExtCov55Pass",
2677 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2679 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsExtCov55Pass);
2680 TH1F *gSecondaryProtonsSigmaToVertexPass = new TH1F("gSecondaryProtonsSigmaToVertexPass",
2681 ";#sigma_{Vertex};Entries",
2683 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexPass);
2684 TH1F *gSecondaryProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryProtonsSigmaToVertexTPCPass",
2685 ";#sigma_{Vertex};Entries",
2687 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsSigmaToVertexTPCPass);
2688 TH1F *gSecondaryProtonsDCAXYPass = new TH1F("gSecondaryProtonsDCAXYPass",
2689 ";DCA_{xy} [cm];Entries",
2691 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYPass);
2692 TH1F *gSecondaryProtonsDCAXYTPCPass = new TH1F("gSecondaryProtonsDCAXYTPCPass",
2693 ";DCA_{xy} [cm];Entries",
2695 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAXYTPCPass);
2696 TH1F *gSecondaryProtonsDCAZPass = new TH1F("gSecondaryProtonsDCAZPass",
2697 ";DCA_{z} [cm];Entries",
2699 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZPass);
2700 TH1F *gSecondaryProtonsDCAZTPCPass = new TH1F("gSecondaryProtonsDCAZTPCPass",
2701 ";DCA_{z} [cm];Entries",
2703 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsDCAZTPCPass);
2704 TH1F *gSecondaryProtonsConstrainChi2Pass = new TH1F("gSecondaryProtonsConstrainChi2Pass",
2705 ";Log_{10}(#chi^{2});Entries",
2707 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsConstrainChi2Pass);
2708 TH1F *gSecondaryProtonsITSRefitPass = new TH1F("gSecondaryProtonsITSRefitPass",
2710 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsITSRefitPass);
2711 TH1F *gSecondaryProtonsTPCRefitPass = new TH1F("gSecondaryProtonsTPCRefitPass",
2713 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCRefitPass);
2714 TH1F *gSecondaryProtonsESDpidPass = new TH1F("gSecondaryProtonsESDpidPass",
2716 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsESDpidPass);
2717 TH1F *gSecondaryProtonsTPCpidPass = new TH1F("gSecondaryProtonsTPCpidPass",
2719 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsTPCpidPass);
2720 TH1F *gSecondaryProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryProtonsPointOnITSLayer1Pass",
2722 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer1Pass);
2723 TH1F *gSecondaryProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryProtonsPointOnITSLayer2Pass",
2725 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer2Pass);
2726 TH1F *gSecondaryProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryProtonsPointOnITSLayer3Pass",
2728 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer3Pass);
2729 TH1F *gSecondaryProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryProtonsPointOnITSLayer4Pass",
2731 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer4Pass);
2732 TH1F *gSecondaryProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryProtonsPointOnITSLayer5Pass",
2734 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer5Pass);
2735 TH1F *gSecondaryProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryProtonsPointOnITSLayer6Pass",
2737 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsPointOnITSLayer6Pass);
2738 TH1F *gSecondaryProtonsNumberOfTPCdEdxPointsPass = new TH1F("gSecondaryProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2739 fQASecondaryProtonsAcceptedList->Add(gSecondaryProtonsNumberOfTPCdEdxPointsPass);
2741 //Rejected secondary protons
2742 /*gDirectory->cd("../");
2743 TDirectory *dirProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
2744 dirProtonsSecondaryRejected->cd();*/
2746 TH1F *gSecondaryProtonsITSClustersReject = new TH1F("gSecondaryProtonsITSClustersReject",
2747 ";N_{clusters} (ITS);Entries",
2749 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSClustersReject);
2750 TH1F *gSecondaryProtonsChi2PerClusterITSReject = new TH1F("gSecondaryProtonsChi2PerClusterITSReject",
2751 ";x^{2}/N_{clusters} (ITS);Entries",
2753 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterITSReject);
2754 TH1F *gSecondaryProtonsTPCClustersReject = new TH1F("gSecondaryProtonsTPCClustersReject",
2755 ";N_{clusters} (TPC);Entries",
2757 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCClustersReject);
2758 TH1F *gSecondaryProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryProtonsChi2PerClusterTPCReject",
2759 ";x^{2}/N_{clusters} (TPC);Entries",
2761 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsChi2PerClusterTPCReject);
2762 TH1F *gSecondaryProtonsExtCov11Reject = new TH1F("gSecondaryProtonsExtCov11Reject",
2763 ";#sigma_{y} [cm];Entries",
2765 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov11Reject);
2766 TH1F *gSecondaryProtonsExtCov22Reject = new TH1F("gSecondaryProtonsExtCov22Reject",
2767 ";#sigma_{z} [cm];Entries",
2769 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov22Reject);
2770 TH1F *gSecondaryProtonsExtCov33Reject = new TH1F("gSecondaryProtonsExtCov33Reject",
2771 ";#sigma_{sin(#phi)};Entries",
2773 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov33Reject);
2774 TH1F *gSecondaryProtonsExtCov44Reject = new TH1F("gSecondaryProtonsExtCov44Reject",
2775 ";#sigma_{tan(#lambda)};Entries",
2777 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov44Reject);
2778 TH1F *gSecondaryProtonsExtCov55Reject = new TH1F("gSecondaryProtonsExtCov55Reject",
2779 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2781 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsExtCov55Reject);
2782 TH1F *gSecondaryProtonsSigmaToVertexReject = new TH1F("gSecondaryProtonsSigmaToVertexReject",
2783 ";#sigma_{Vertex};Entries",
2785 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexReject);
2786 TH1F *gSecondaryProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryProtonsSigmaToVertexTPCReject",
2787 ";#sigma_{Vertex};Entries",
2789 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsSigmaToVertexTPCReject);
2790 TH1F *gSecondaryProtonsDCAXYReject = new TH1F("gSecondaryProtonsDCAXYReject",
2791 ";DCA_{xy} [cm];Entries",
2793 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYReject);
2794 TH1F *gSecondaryProtonsDCAXYTPCReject = new TH1F("gSecondaryProtonsDCAXYTPCReject",
2795 ";DCA_{xy} [cm];Entries",
2797 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAXYTPCReject);
2798 TH1F *gSecondaryProtonsDCAZReject = new TH1F("gSecondaryProtonsDCAZReject",
2799 ";DCA_{z} [cm];Entries",
2801 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZReject);
2802 TH1F *gSecondaryProtonsDCAZTPCReject = new TH1F("gSecondaryProtonsDCAZTPCReject",
2803 ";DCA_{z} [cm];Entries",
2805 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsDCAZTPCReject);
2806 TH1F *gSecondaryProtonsConstrainChi2Reject = new TH1F("gSecondaryProtonsConstrainChi2Reject",
2807 ";Log_{10}(#chi^{2});Entries",
2809 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsConstrainChi2Reject);
2810 TH1F *gSecondaryProtonsITSRefitReject = new TH1F("gSecondaryProtonsITSRefitReject",
2812 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsITSRefitReject);
2813 TH1F *gSecondaryProtonsTPCRefitReject = new TH1F("gSecondaryProtonsTPCRefitReject",
2815 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCRefitReject);
2816 TH1F *gSecondaryProtonsESDpidReject = new TH1F("gSecondaryProtonsESDpidReject",
2818 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsESDpidReject);
2819 TH1F *gSecondaryProtonsTPCpidReject = new TH1F("gSecondaryProtonsTPCpidReject",
2821 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsTPCpidReject);
2822 TH1F *gSecondaryProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryProtonsPointOnITSLayer1Reject",
2824 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer1Reject);
2825 TH1F *gSecondaryProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryProtonsPointOnITSLayer2Reject",
2827 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer2Reject);
2828 TH1F *gSecondaryProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryProtonsPointOnITSLayer3Reject",
2830 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer3Reject);
2831 TH1F *gSecondaryProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryProtonsPointOnITSLayer4Reject",
2833 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer4Reject);
2834 TH1F *gSecondaryProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryProtonsPointOnITSLayer5Reject",
2836 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer5Reject);
2837 TH1F *gSecondaryProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryProtonsPointOnITSLayer6Reject",
2839 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsPointOnITSLayer6Reject);
2840 TH1F *gSecondaryProtonsNumberOfTPCdEdxPointsReject = new TH1F("gSecondaryProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
2841 fQASecondaryProtonsRejectedList->Add(gSecondaryProtonsNumberOfTPCdEdxPointsReject);
2842 /*TH2F *gHistSecondaryProtonsFromWeakDCAxyPtReject = new TH2F("gHistSecondaryProtonsFromWeakDCAxyPtReject",
2843 ";P_{T} [GeV/c];dca_{xy} [cm]",
2846 gHistSecondaryProtonsFromWeakDCAxyPtReject->SetStats(kFALSE);
2847 fQASecondaryProtonsRejectedList->Add(gHistSecondaryProtonsFromWeakDCAxyPtReject);
2848 TH2F *gHistSecondaryProtonsFromWeakDCAzPtReject = new TH2F("gHistSecondaryProtonsFromWeakDCAzPtReject",
2849 ";P_{T} [GeV/c];dca_{z} [cm]",
2852 gHistSecondaryProtonsFromWeakDCAzPtReject->SetStats(kFALSE);
2853 fQASecondaryProtonsRejectedList->Add(gHistSecondaryProtonsFromWeakDCAzPtReject);
2854 TH2F *gHistSecondaryProtonsFromHadronicDCAxyPtReject = new TH2F("gHistSecondaryProtonsFromHadronicDCAxyPtReject",
2855 ";P_{T} [GeV/c];dca_{xy} [cm]",
2858 gHistSecondaryProtonsFromHadronicDCAxyPtReject->SetStats(kFALSE);
2859 fQASecondaryProtonsRejectedList->Add(gHistSecondaryProtonsFromHadronicDCAxyPtReject);
2860 TH2F *gHistSecondaryProtonsFromHadronicDCAzPtReject = new TH2F("gHistSecondaryProtonsFromHadronicDCAzPtReject",
2861 ";P_{T} [GeV/c];dca_{z} [cm]",
2864 gHistSecondaryProtonsFromHadronicDCAzPtReject->SetStats(kFALSE);
2865 fQASecondaryProtonsRejectedList->Add(gHistSecondaryProtonsFromHadronicDCAzPtReject);*/
2867 /*gDirectory->cd("../../../");
2870 TDirectory *dirAntiProtons = gDirectory->mkdir("AntiProtons");
2871 fGlobalQAList->Add(dirAntiProtons); dirAntiProtons->cd();*/
2873 //________________________________________________________________//
2874 /*TDirectory *dirAntiProtonsPrimary = gDirectory->mkdir("Primaries");
2875 dirAntiProtonsPrimary->cd();
2876 TDirectory *dirAntiProtonsPrimaryAccepted = gDirectory->mkdir("Accepted");
2877 dirAntiProtonsPrimaryAccepted->cd();*/
2879 //Accepted primary antiprotons
2880 TH1F *gPrimaryAntiProtonsITSClustersPass = new TH1F("gPrimaryAntiProtonsITSClustersPass",
2881 ";N_{clusters} (ITS);Entries",
2883 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSClustersPass);
2884 TH1F *gPrimaryAntiProtonsChi2PerClusterITSPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSPass",
2885 ";x^{2}/N_{clusters} (ITS);Entries",
2887 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterITSPass);
2888 TH1F *gPrimaryAntiProtonsTPCClustersPass = new TH1F("gPrimaryAntiProtonsTPCClustersPass",
2889 ";N_{clusters} (TPC);Entries",
2891 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCClustersPass);
2892 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCPass",
2893 ";x^{2}/N_{clusters} (TPC);Entries",
2895 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCPass);
2896 TH1F *gPrimaryAntiProtonsExtCov11Pass = new TH1F("gPrimaryAntiProtonsExtCov11Pass",
2897 ";#sigma_{y} [cm];Entries",
2899 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov11Pass);
2900 TH1F *gPrimaryAntiProtonsExtCov22Pass = new TH1F("gPrimaryAntiProtonsExtCov22Pass",
2901 ";#sigma_{z} [cm];Entries",
2903 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov22Pass);
2904 TH1F *gPrimaryAntiProtonsExtCov33Pass = new TH1F("gPrimaryAntiProtonsExtCov33Pass",
2905 ";#sigma_{sin(#phi)};Entries",
2907 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov33Pass);
2908 TH1F *gPrimaryAntiProtonsExtCov44Pass = new TH1F("gPrimaryAntiProtonsExtCov44Pass",
2909 ";#sigma_{tan(#lambda)};Entries",
2911 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov44Pass);
2912 TH1F *gPrimaryAntiProtonsExtCov55Pass = new TH1F("gPrimaryAntiProtonsExtCov55Pass",
2913 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
2915 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsExtCov55Pass);
2916 TH1F *gPrimaryAntiProtonsSigmaToVertexPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexPass",
2917 ";#sigma_{Vertex};Entries",
2919 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexPass);
2920 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCPass",
2921 ";#sigma_{Vertex};Entries",
2923 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCPass);
2924 TH1F *gPrimaryAntiProtonsDCAXYPass = new TH1F("gPrimaryAntiProtonsDCAXYPass",
2925 ";DCA_{xy} [cm];Entries",
2927 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYPass);
2928 TH1F *gPrimaryAntiProtonsDCAXYTPCPass = new TH1F("gPrimaryAntiProtonsDCAXYTPCPass",
2929 ";DCA_{xy} [cm];Entries",
2931 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAXYTPCPass);
2932 TH1F *gPrimaryAntiProtonsDCAZPass = new TH1F("gPrimaryAntiProtonsDCAZPass",
2933 ";DCA_{z} [cm];Entries",
2935 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZPass);
2936 TH1F *gPrimaryAntiProtonsDCAZTPCPass = new TH1F("gPrimaryAntiProtonsDCAZTPCPass",
2937 ";DCA_{z} [cm];Entries",
2939 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsDCAZTPCPass);
2940 TH1F *gPrimaryAntiProtonsConstrainChi2Pass = new TH1F("gPrimaryAntiProtonsConstrainChi2Pass",
2941 ";Log_{10}(#chi^{2});Entries",
2943 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsConstrainChi2Pass);
2944 TH1F *gPrimaryAntiProtonsITSRefitPass = new TH1F("gPrimaryAntiProtonsITSRefitPass",
2946 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsITSRefitPass);
2947 TH1F *gPrimaryAntiProtonsTPCRefitPass = new TH1F("gPrimaryAntiProtonsTPCRefitPass",
2949 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCRefitPass);
2950 TH1F *gPrimaryAntiProtonsESDpidPass = new TH1F("gPrimaryAntiProtonsESDpidPass",
2952 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsESDpidPass);
2953 TH1F *gPrimaryAntiProtonsTPCpidPass = new TH1F("gPrimaryAntiProtonsTPCpidPass",
2955 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsTPCpidPass);
2956 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Pass",
2958 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Pass);
2959 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Pass",
2961 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Pass);
2962 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Pass",
2964 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Pass);
2965 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Pass",
2967 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Pass);
2968 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Pass",
2970 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Pass);
2971 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Pass",
2973 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Pass);
2974 TH1F *gPrimaryAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gPrimaryAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
2975 fQAPrimaryAntiProtonsAcceptedList->Add(gPrimaryAntiProtonsNumberOfTPCdEdxPointsPass);
2976 /*TH2F *gHistPrimaryAntiProtonsDCAxyPtPass = new TH2F("gHistPrimaryAntiProtonsDCAxyPtPass",
2977 ";P_{T} [GeV/c];dca_{xy} [cm]",
2980 gHistPrimaryAntiProtonsDCAxyPtPass->SetStats(kFALSE);
2981 fQAPrimaryAntiProtonsAcceptedList->Add(gHistPrimaryAntiProtonsDCAxyPtPass);
2982 TH2F *gHistPrimaryAntiProtonsDCAzPtPass = new TH2F("gHistPrimaryAntiProtonsDCAzPtPass",
2983 ";P_{T} [GeV/c];dca_{z} [cm]",
2986 gHistPrimaryAntiProtonsDCAzPtPass->SetStats(kFALSE);
2987 fQAPrimaryAntiProtonsAcceptedList->Add(gHistPrimaryAntiProtonsDCAzPtPass);*/
2989 //Rejected primary antiprotons
2990 /*gDirectory->cd("../");
2991 TDirectory *dirAntiProtonsPrimaryRejected = gDirectory->mkdir("Rejected");
2992 dirAntiProtonsPrimaryRejected->cd();*/
2994 TH1F *gPrimaryAntiProtonsITSClustersReject = new TH1F("gPrimaryAntiProtonsITSClustersReject",
2995 ";N_{clusters} (ITS);Entries",
2997 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSClustersReject);
2998 TH1F *gPrimaryAntiProtonsChi2PerClusterITSReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterITSReject",
2999 ";x^{2}/N_{clusters} (ITS);Entries",
3001 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterITSReject);
3002 TH1F *gPrimaryAntiProtonsTPCClustersReject = new TH1F("gPrimaryAntiProtonsTPCClustersReject",
3003 ";N_{clusters} (TPC);Entries",
3005 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCClustersReject);
3006 TH1F *gPrimaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gPrimaryAntiProtonsChi2PerClusterTPCReject",
3007 ";x^{2}/N_{clusters} (TPC);Entries",
3009 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsChi2PerClusterTPCReject);
3010 TH1F *gPrimaryAntiProtonsExtCov11Reject = new TH1F("gPrimaryAntiProtonsExtCov11Reject",
3011 ";#sigma_{y} [cm];Entries",
3013 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov11Reject);
3014 TH1F *gPrimaryAntiProtonsExtCov22Reject = new TH1F("gPrimaryAntiProtonsExtCov22Reject",
3015 ";#sigma_{z} [cm];Entries",
3017 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov22Reject);
3018 TH1F *gPrimaryAntiProtonsExtCov33Reject = new TH1F("gPrimaryAntiProtonsExtCov33Reject",
3019 ";#sigma_{sin(#phi)};Entries",
3021 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov33Reject);
3022 TH1F *gPrimaryAntiProtonsExtCov44Reject = new TH1F("gPrimaryAntiProtonsExtCov44Reject",
3023 ";#sigma_{tan(#lambda)};Entries",
3025 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov44Reject);
3026 TH1F *gPrimaryAntiProtonsExtCov55Reject = new TH1F("gPrimaryAntiProtonsExtCov55Reject",
3027 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
3029 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsExtCov55Reject);
3030 TH1F *gPrimaryAntiProtonsSigmaToVertexReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexReject",
3031 ";#sigma_{Vertex};Entries",
3033 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexReject);
3034 TH1F *gPrimaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gPrimaryAntiProtonsSigmaToVertexTPCReject",
3035 ";#sigma_{Vertex};Entries",
3037 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsSigmaToVertexTPCReject);
3038 TH1F *gPrimaryAntiProtonsDCAXYReject = new TH1F("gPrimaryAntiProtonsDCAXYReject",
3039 ";DCA_{xy} [cm];Entries",
3041 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYReject);
3042 TH1F *gPrimaryAntiProtonsDCAXYTPCReject = new TH1F("gPrimaryAntiProtonsDCAXYTPCReject",
3043 ";DCA_{xy} [cm];Entries",
3045 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAXYTPCReject);
3046 TH1F *gPrimaryAntiProtonsDCAZReject = new TH1F("gPrimaryAntiProtonsDCAZReject",
3047 ";DCA_{z} [cm];Entries",
3049 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZReject);
3050 TH1F *gPrimaryAntiProtonsDCAZTPCReject = new TH1F("gPrimaryAntiProtonsDCAZTPCReject",
3051 ";DCA_{z} [cm];Entries",
3053 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsDCAZTPCReject);
3054 TH1F *gPrimaryAntiProtonsConstrainChi2Reject = new TH1F("gPrimaryAntiProtonsConstrainChi2Reject",
3055 ";Log_{10}(#chi^{2});Entries",
3057 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsConstrainChi2Reject);
3058 TH1F *gPrimaryAntiProtonsITSRefitReject = new TH1F("gPrimaryAntiProtonsITSRefitReject",
3060 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsITSRefitReject);
3061 TH1F *gPrimaryAntiProtonsTPCRefitReject = new TH1F("gPrimaryAntiProtonsTPCRefitReject",
3063 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCRefitReject);
3064 TH1F *gPrimaryAntiProtonsESDpidReject = new TH1F("gPrimaryAntiProtonsESDpidReject",
3066 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsESDpidReject);
3067 TH1F *gPrimaryAntiProtonsTPCpidReject = new TH1F("gPrimaryAntiProtonsTPCpidReject",
3069 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsTPCpidReject);
3070 TH1F *gPrimaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer1Reject",
3072 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer1Reject);
3073 TH1F *gPrimaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer2Reject",
3075 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer2Reject);
3076 TH1F *gPrimaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer3Reject",
3078 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer3Reject);
3079 TH1F *gPrimaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer4Reject",
3081 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer4Reject);
3082 TH1F *gPrimaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer5Reject",
3084 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer5Reject);
3085 TH1F *gPrimaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gPrimaryAntiProtonsPointOnITSLayer6Reject",
3087 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsPointOnITSLayer6Reject);
3088 TH1F *gPrimaryAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gPrimaryAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
3089 fQAPrimaryAntiProtonsRejectedList->Add(gPrimaryAntiProtonsNumberOfTPCdEdxPointsReject);
3090 /*TH2F *gHistPrimaryAntiProtonsDCAxyPtReject = new TH2F("gHistPrimaryAntiProtonsDCAxyPtReject",
3091 ";P_{T} [GeV/c];dca_{xy} [cm]",
3094 gHistPrimaryAntiProtonsDCAxyPtReject->SetStats(kFALSE);
3095 fQAPrimaryAntiProtonsRejectedList->Add(gHistPrimaryAntiProtonsDCAxyPtReject);
3096 TH2F *gHistPrimaryAntiProtonsDCAzPtReject = new TH2F("gHistPrimaryAntiProtonsDCAzPtReject",
3097 ";P_{T} [GeV/c];dca_{z} [cm]",
3100 gHistPrimaryAntiProtonsDCAzPtReject->SetStats(kFALSE);
3101 fQAPrimaryAntiProtonsRejectedList->Add(gHistPrimaryAntiProtonsDCAzPtReject);*/
3103 //________________________________________________________________//
3104 /*gDirectory->cd("../../");
3106 TDirectory *dirAntiProtonsSecondary = gDirectory->mkdir("Secondaries");
3107 dirAntiProtonsSecondary->cd();
3108 TDirectory *dirAntiProtonsSecondaryAccepted = gDirectory->mkdir("Accepted");
3109 dirAntiProtonsSecondaryAccepted->cd();*/
3111 //Accepted secondary antiprotons
3112 TH1F *gSecondaryAntiProtonsITSClustersPass = new TH1F("gSecondaryAntiProtonsITSClustersPass",
3113 ";N_{clusters} (ITS);Entries",
3115 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSClustersPass);
3116 TH1F *gSecondaryAntiProtonsChi2PerClusterITSPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSPass",
3117 ";x^{2}/N_{clusters} (ITS);Entries",
3119 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterITSPass);
3120 TH1F *gSecondaryAntiProtonsTPCClustersPass = new TH1F("gSecondaryAntiProtonsTPCClustersPass",
3121 ";N_{clusters} (TPC);Entries",
3123 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCClustersPass);
3124 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCPass = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCPass",
3125 ";x^{2}/N_{clusters} (TPC);Entries",
3127 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCPass);
3128 TH1F *gSecondaryAntiProtonsExtCov11Pass = new TH1F("gSecondaryAntiProtonsExtCov11Pass",
3129 ";#sigma_{y} [cm];Entries",
3131 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov11Pass);
3132 TH1F *gSecondaryAntiProtonsExtCov22Pass = new TH1F("gSecondaryAntiProtonsExtCov22Pass",
3133 ";#sigma_{z} [cm];Entries",
3135 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov22Pass);
3136 TH1F *gSecondaryAntiProtonsExtCov33Pass = new TH1F("gSecondaryAntiProtonsExtCov33Pass",
3137 ";#sigma_{sin(#phi)};Entries",
3139 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov33Pass);
3140 TH1F *gSecondaryAntiProtonsExtCov44Pass = new TH1F("gSecondaryAntiProtonsExtCov44Pass",
3141 ";#sigma_{tan(#lambda)};Entries",
3143 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov44Pass);
3144 TH1F *gSecondaryAntiProtonsExtCov55Pass = new TH1F("gSecondaryAntiProtonsExtCov55Pass",
3145 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
3147 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsExtCov55Pass);
3148 TH1F *gSecondaryAntiProtonsSigmaToVertexPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexPass",
3149 ";#sigma_{Vertex};Entries",
3151 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexPass);
3152 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCPass = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCPass",
3153 ";#sigma_{Vertex};Entries",
3155 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCPass);
3156 TH1F *gSecondaryAntiProtonsDCAXYPass = new TH1F("gSecondaryAntiProtonsDCAXYPass",
3157 ";DCA_{xy} [cm];Entries",
3159 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYPass);
3160 TH1F *gSecondaryAntiProtonsDCAXYTPCPass = new TH1F("gSecondaryAntiProtonsDCAXYTPCPass",
3161 ";DCA_{xy} [cm];Entries",
3163 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAXYTPCPass);
3164 TH1F *gSecondaryAntiProtonsDCAZPass = new TH1F("gSecondaryAntiProtonsDCAZPass",
3165 ";DCA_{z} [cm];Entries",
3167 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZPass);
3168 TH1F *gSecondaryAntiProtonsDCAZTPCPass = new TH1F("gSecondaryAntiProtonsDCAZTPCPass",
3169 ";DCA_{z} [cm];Entries",
3171 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsDCAZTPCPass);
3172 TH1F *gSecondaryAntiProtonsConstrainChi2Pass = new TH1F("gSecondaryAntiProtonsConstrainChi2Pass",
3173 ";Log_{10}(#chi^{2});Entries",
3175 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsConstrainChi2Pass);
3176 TH1F *gSecondaryAntiProtonsITSRefitPass = new TH1F("gSecondaryAntiProtonsITSRefitPass",
3178 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsITSRefitPass);
3179 TH1F *gSecondaryAntiProtonsTPCRefitPass = new TH1F("gSecondaryAntiProtonsTPCRefitPass",
3181 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCRefitPass);
3182 TH1F *gSecondaryAntiProtonsESDpidPass = new TH1F("gSecondaryAntiProtonsESDpidPass",
3184 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsESDpidPass);
3185 TH1F *gSecondaryAntiProtonsTPCpidPass = new TH1F("gSecondaryAntiProtonsTPCpidPass",
3187 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsTPCpidPass);
3188 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Pass",
3190 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Pass);
3191 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Pass",
3193 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Pass);
3194 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Pass",
3196 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Pass);
3197 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Pass",
3199 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Pass);
3200 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Pass",
3202 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Pass);
3203 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Pass = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Pass",
3205 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Pass);
3206 TH1F *gSecondaryAntiProtonsNumberOfTPCdEdxPointsPass = new TH1F("gSecondaryAntiProtonsNumberOfTPCdEdxPointsPass","",100,0,200);
3207 fQASecondaryAntiProtonsAcceptedList->Add(gSecondaryAntiProtonsNumberOfTPCdEdxPointsPass);
3208 /*TH2F *gHistSecondaryAntiProtonsFromWeakDCAxyPtPass = new TH2F("gHistSecondaryAntiProtonsFromWeakDCAxyPtPass",
3209 ";P_{T} [GeV/c];dca_{xy} [cm]",
3212 gHistSecondaryAntiProtonsFromWeakDCAxyPtPass->SetStats(kFALSE);
3213 fQASecondaryAntiProtonsAcceptedList->Add(gHistSecondaryAntiProtonsFromWeakDCAxyPtPass);
3214 TH2F *gHistSecondaryAntiProtonsFromWeakDCAzPtPass = new TH2F("gHistSecondaryAntiProtonsFromWeakDCAzPtPass",
3215 ";P_{T} [GeV/c];dca_{z} [cm]",
3218 gHistSecondaryAntiProtonsFromWeakDCAzPtPass->SetStats(kFALSE);
3219 fQASecondaryAntiProtonsAcceptedList->Add(gHistSecondaryAntiProtonsFromWeakDCAzPtPass);
3220 TH2F *gHistSecondaryAntiProtonsFromHadronicDCAxyPtPass = new TH2F("gHistSecondaryAntiProtonsFromHadronicDCAxyPtPass",
3221 ";P_{T} [GeV/c];dca_{xy} [cm]",
3224 gHistSecondaryAntiProtonsFromHadronicDCAxyPtPass->SetStats(kFALSE);
3225 fQASecondaryAntiProtonsAcceptedList->Add(gHistSecondaryAntiProtonsFromHadronicDCAxyPtPass);
3226 TH2F *gHistSecondaryAntiProtonsFromHadronicDCAzPtPass = new TH2F("gHistSecondaryAntiProtonsFromHadronicDCAzPtPass",
3227 ";P_{T} [GeV/c];dca_{z} [cm]",
3230 gHistSecondaryAntiProtonsFromHadronicDCAzPtPass->SetStats(kFALSE);
3231 fQASecondaryAntiProtonsAcceptedList->Add(gHistSecondaryAntiProtonsFromHadronicDCAzPtPass);*/
3233 //Rejected secondary antiprotons
3234 /*gDirectory->cd("../");
3235 TDirectory *dirAntiProtonsSecondaryRejected = gDirectory->mkdir("Rejected");
3236 dirAntiProtonsSecondaryRejected->cd();*/
3238 TH1F *gSecondaryAntiProtonsITSClustersReject = new TH1F("gSecondaryAntiProtonsITSClustersReject",
3239 ";N_{clusters} (ITS);Entries",
3241 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSClustersReject);
3242 TH1F *gSecondaryAntiProtonsChi2PerClusterITSReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterITSReject",
3243 ";x^{2}/N_{clusters} (ITS);Entries",
3245 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterITSReject);
3246 TH1F *gSecondaryAntiProtonsTPCClustersReject = new TH1F("gSecondaryAntiProtonsTPCClustersReject",
3247 ";N_{clusters} (TPC);Entries",
3249 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCClustersReject);
3250 TH1F *gSecondaryAntiProtonsChi2PerClusterTPCReject = new TH1F("gSecondaryAntiProtonsChi2PerClusterTPCReject",
3251 ";x^{2}/N_{clusters} (TPC);Entries",
3253 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsChi2PerClusterTPCReject);
3254 TH1F *gSecondaryAntiProtonsExtCov11Reject = new TH1F("gSecondaryAntiProtonsExtCov11Reject",
3255 ";#sigma_{y} [cm];Entries",
3257 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov11Reject);
3258 TH1F *gSecondaryAntiProtonsExtCov22Reject = new TH1F("gSecondaryAntiProtonsExtCov22Reject",
3259 ";#sigma_{z} [cm];Entries",
3261 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov22Reject);
3262 TH1F *gSecondaryAntiProtonsExtCov33Reject = new TH1F("gSecondaryAntiProtonsExtCov33Reject",
3263 ";#sigma_{sin(#phi)};Entries",
3265 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov33Reject);
3266 TH1F *gSecondaryAntiProtonsExtCov44Reject = new TH1F("gSecondaryAntiProtonsExtCov44Reject",
3267 ";#sigma_{tan(#lambda)};Entries",
3269 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov44Reject);
3270 TH1F *gSecondaryAntiProtonsExtCov55Reject = new TH1F("gSecondaryAntiProtonsExtCov55Reject",
3271 ";#sigma_{1/P_{T}} [GeV/c]^{-1};Entries",
3273 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsExtCov55Reject);
3274 TH1F *gSecondaryAntiProtonsSigmaToVertexReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexReject",
3275 ";#sigma_{Vertex};Entries",
3277 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexReject);
3278 TH1F *gSecondaryAntiProtonsSigmaToVertexTPCReject = new TH1F("gSecondaryAntiProtonsSigmaToVertexTPCReject",
3279 ";#sigma_{Vertex};Entries",
3281 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsSigmaToVertexTPCReject);
3282 TH1F *gSecondaryAntiProtonsDCAXYReject = new TH1F("gSecondaryAntiProtonsDCAXYReject",
3283 ";DCA_{xy} [cm];Entries",
3285 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYReject);
3286 TH1F *gSecondaryAntiProtonsDCAXYTPCReject = new TH1F("gSecondaryAntiProtonsDCAXYTPCReject",
3287 ";DCA_{xy} [cm];Entries",
3289 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAXYTPCReject);
3290 TH1F *gSecondaryAntiProtonsDCAZReject = new TH1F("gSecondaryAntiProtonsDCAZReject",
3291 ";DCA_{z} [cm];Entries",
3293 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZReject);
3294 TH1F *gSecondaryAntiProtonsDCAZTPCReject = new TH1F("gSecondaryAntiProtonsDCAZTPCReject",
3295 ";DCA_{z} [cm];Entries",
3297 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsDCAZTPCReject);
3298 TH1F *gSecondaryAntiProtonsConstrainChi2Reject = new TH1F("gSecondaryAntiProtonsConstrainChi2Reject",
3299 ";Log_{10}(#chi^{2});Entries",
3301 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsConstrainChi2Reject);
3302 TH1F *gSecondaryAntiProtonsITSRefitReject = new TH1F("gSecondaryAntiProtonsITSRefitReject",
3304 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsITSRefitReject);
3305 TH1F *gSecondaryAntiProtonsTPCRefitReject = new TH1F("gSecondaryAntiProtonsTPCRefitReject",
3307 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCRefitReject);
3308 TH1F *gSecondaryAntiProtonsESDpidReject = new TH1F("gSecondaryAntiProtonsESDpidReject",
3310 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsESDpidReject);
3311 TH1F *gSecondaryAntiProtonsTPCpidReject = new TH1F("gSecondaryAntiProtonsTPCpidReject",
3313 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsTPCpidReject);
3314 TH1F *gSecondaryAntiProtonsPointOnITSLayer1Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer1Reject",
3316 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer1Reject);
3317 TH1F *gSecondaryAntiProtonsPointOnITSLayer2Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer2Reject",
3319 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer2Reject);
3320 TH1F *gSecondaryAntiProtonsPointOnITSLayer3Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer3Reject",
3322 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer3Reject);
3323 TH1F *gSecondaryAntiProtonsPointOnITSLayer4Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer4Reject",
3325 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer4Reject);
3326 TH1F *gSecondaryAntiProtonsPointOnITSLayer5Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer5Reject",
3328 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer5Reject);
3329 TH1F *gSecondaryAntiProtonsPointOnITSLayer6Reject = new TH1F("gSecondaryAntiProtonsPointOnITSLayer6Reject",
3331 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsPointOnITSLayer6Reject);
3332 TH1F *gSecondaryAntiProtonsNumberOfTPCdEdxPointsReject = new TH1F("gSecondaryAntiProtonsNumberOfTPCdEdxPointsReject","",100,0,200);
3333 fQASecondaryAntiProtonsRejectedList->Add(gSecondaryAntiProtonsNumberOfTPCdEdxPointsReject);
3334 /*TH2F *gHistSecondaryAntiProtonsFromWeakDCAxyPtReject = new TH2F("gHistSecondaryAntiProtonsFromWeakDCAxyPtReject",
3335 ";P_{T} [GeV/c];dca_{xy} [cm]",
3338 gHistSecondaryAntiProtonsFromWeakDCAxyPtReject->SetStats(kFALSE);
3339 fQASecondaryAntiProtonsRejectedList->Add(gHistSecondaryAntiProtonsFromWeakDCAxyPtReject);
3340 TH2F *gHistSecondaryAntiProtonsFromWeakDCAzPtReject = new TH2F("gHistSecondaryAntiProtonsFromWeakDCAzPtReject",
3341 ";P_{T} [GeV/c];dca_{z} [cm]",
3344 gHistSecondaryAntiProtonsFromWeakDCAzPtReject->SetStats(kFALSE);
3345 fQASecondaryAntiProtonsRejectedList->Add(gHistSecondaryAntiProtonsFromWeakDCAzPtReject);
3346 TH2F *gHistSecondaryAntiProtonsFromHadronicDCAxyPtReject = new TH2F("gHistSecondaryAntiProtonsFromHadronicDCAxyPtReject",
3347 ";P_{T} [GeV/c];dca_{xy} [cm]",
3350 gHistSecondaryAntiProtonsFromHadronicDCAxyPtReject->SetStats(kFALSE);
3351 fQASecondaryAntiProtonsRejectedList->Add(gHistSecondaryAntiProtonsFromHadronicDCAxyPtReject);
3352 TH2F *gHistSecondaryAntiProtonsFromHadronicDCAzPtReject = new TH2F("gHistSecondaryAntiProtonsFromHadronicDCAzPtReject",
3353 ";P_{T} [GeV/c];dca_{z} [cm]",
3356 gHistSecondaryAntiProtonsFromHadronicDCAzPtReject->SetStats(kFALSE);
3357 fQASecondaryAntiProtonsRejectedList->Add(gHistSecondaryAntiProtonsFromHadronicDCAzPtReject);*/
3360 //____________________________________________________________________//
3361 void AliProtonQAAnalysis::RunReconstructionEfficiencyAnalysis(AliMCEvent *const mcEvent,
3363 const AliESDVertex *vertex) {
3364 //Run the reconstruction efficiency code (primaries & secondaries)
3365 AliStack *stack = mcEvent->Stack();
3367 Int_t nMCParticles = mcEvent->GetNumberOfTracks();
3368 Int_t nMCLabelCounter = 0;
3369 TArrayI labelMCArray(nMCParticles);
3371 for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
3372 AliMCParticle *mcTrack = (AliMCParticle*) mcEvent->GetTrack(iTracks);
3374 Printf("ERROR: Could not receive track %d (mc loop)", iTracks);
3378 Double_t vz = mcTrack->Zv();
3379 if (TMath::Abs(vz) > 50.) continue;//exclude particles generated out of the acceptance
3381 if(TMath::Abs(mcTrack->Eta()) > 1.0) continue;//acceptance
3382 if((mcTrack->Pt() > fMaxPt)||(mcTrack->Pt() < fMinPt)) continue;
3383 if(fProtonAnalysisBase->GetEtaMode()) {
3384 if((mcTrack->Eta() > fMaxY)|| (mcTrack->Eta() < fMinY)) continue;
3387 if((fProtonAnalysisBase->Rapidity(mcTrack->Px(),mcTrack->Py(),mcTrack->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(mcTrack->Px(),mcTrack->Py(),mcTrack->Pz()) < fMinY)) continue;
3389 // Loop over Track References
3390 Bool_t labelTPC = kFALSE;
3391 AliTrackReference* trackRef = 0;
3392 for (Int_t iTrackRef = 0; iTrackRef < mcTrack->GetNumberOfTrackReferences(); iTrackRef++) {
3393 trackRef = mcTrack->GetTrackReference(iTrackRef);
3395 Int_t detectorId = trackRef->DetectorId();
3396 if (detectorId == AliTrackReference::kTPC) {
3405 TParticle* particle = mcTrack->Particle();
3406 if(!particle) continue;
3407 Int_t pdgcode = particle->GetPdgCode();
3408 if(TMath::Abs(pdgcode) != 2212) continue;
3410 labelMCArray.AddAt(iTracks,nMCLabelCounter);
3411 nMCLabelCounter += 1;
3413 if(iTracks <= stack->GetNprimary()) {
3414 if(pdgcode == 2212) {
3415 if(fProtonAnalysisBase->GetEtaMode())
3416 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
3419 ((TH2D *)(fEfficiencyList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3424 if(pdgcode == -2212) {
3425 if(fProtonAnalysisBase->GetEtaMode())
3426 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
3429 ((TH2D *)(fEfficiencyList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3437 Int_t lPartMother = -1;
3438 Int_t motherPDGCode = -1;
3439 lPartMother = particle->GetFirstMother();
3440 AliMCParticle *mcMotherTrack = (AliMCParticle*) mcEvent->GetTrack(lPartMother);
3441 TParticle *motherParticle = mcMotherTrack->Particle();
3442 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3444 if(pdgcode == 2212) {
3445 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3446 if(fProtonAnalysisBase->GetEtaMode())
3447 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3450 ((TH2D *)(fEfficiencyList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3455 if((particle->GetUniqueID() == 13)) {
3456 if(fProtonAnalysisBase->GetEtaMode())
3457 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3460 ((TH2D *)(fEfficiencyList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3464 }//hadronic interactions
3466 if(pdgcode == -2212) {
3467 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3468 if(fProtonAnalysisBase->GetEtaMode())
3469 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3472 ((TH2D *)(fEfficiencyList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3477 if((particle->GetUniqueID() == 13)) {
3478 if(fProtonAnalysisBase->GetEtaMode())
3479 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3482 ((TH2D *)(fEfficiencyList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3486 }//hadronic interactions
3489 //}//findable tracks
3493 Bool_t iFound = kFALSE;
3494 Int_t mcGoods = nMCLabelCounter;
3495 for (Int_t k = 0; k < mcGoods; k++) {
3496 Int_t mcLabel = labelMCArray.At(k);
3499 Int_t nGoodTracks = esd->GetNumberOfTracks();
3500 TArrayI labelArray(nGoodTracks);
3501 Int_t labelCounter = 0;
3502 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3503 AliESDtrack* track = esd->GetTrack(iTracks);
3504 if(!track) continue;
3507 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3508 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3509 if(!tpcTrack) continue;
3511 Int_t label = TMath::Abs(track->GetTPCLabel());
3512 if(IsLabelUsed(labelArray,label)) continue;
3513 labelArray.AddAt(label,labelCounter);
3516 if (mcLabel != TMath::Abs(label)) continue;
3517 if(mcLabel != label) continue;
3519 TParticle *particle = stack->Particle(label);
3520 if(!particle) continue;
3521 Int_t pdgcode = particle->GetPdgCode();
3522 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3523 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3524 if(fProtonAnalysisBase->GetEtaMode()) {
3525 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3528 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3530 if(fUseCutsInEfficiency) {
3531 if(!fProtonAnalysisBase->IsPrimary(esd,vertex,track)) continue;
3532 if(!fProtonAnalysisBase->IsAccepted(track)) continue;
3534 //reconstructed primary (anti)protons
3535 if(pdgcode == 2212) {
3536 if(label <= stack->GetNprimary()) {
3537 if(fProtonAnalysisBase->GetEtaMode())
3538 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3541 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3546 if(label > stack->GetNprimary()) {
3547 Int_t lPartMother = -1;
3548 Int_t motherPDGCode = -1;
3549 lPartMother = particle->GetFirstMother();
3550 TParticle *motherParticle = stack->Particle(lPartMother);
3551 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3553 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3554 if(fProtonAnalysisBase->GetEtaMode())
3555 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3558 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3563 if((particle->GetUniqueID() == 13)) {
3564 if(fProtonAnalysisBase->GetEtaMode())
3565 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3568 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3572 }//hadronic interactions
3575 if(pdgcode == -2212) {
3576 if(label <= stack->GetNprimary()) {
3577 if(fProtonAnalysisBase->GetEtaMode())
3578 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3581 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3586 if(label > stack->GetNprimary()) {
3587 Int_t lPartMother = -1;
3588 Int_t motherPDGCode = -1;
3589 lPartMother = particle->GetFirstMother();
3590 TParticle *motherParticle = stack->Particle(lPartMother);
3591 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3593 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3594 if(fProtonAnalysisBase->GetEtaMode())
3595 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3598 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3603 if((particle->GetUniqueID() == 13)) {
3604 if(fProtonAnalysisBase->GetEtaMode())
3605 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3608 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3612 }//hadronic interactions
3614 }//initial antiprotons
3617 Int_t label = TMath::Abs(track->GetLabel());
3618 if(IsLabelUsed(labelArray,label)) continue;
3619 labelArray.AddAt(label,labelCounter);
3622 if (mcLabel != TMath::Abs(label)) continue;
3623 if(mcLabel != label) continue;
3625 TParticle *particle = stack->Particle(label);
3626 if(!particle) continue;
3627 Int_t pdgcode = particle->GetPdgCode();
3628 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3629 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3630 if(fProtonAnalysisBase->GetEtaMode()) {
3631 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3634 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3636 //Double_t probability[5];
3638 if(fUseCutsInEfficiency) {
3639 if(!fProtonAnalysisBase->IsPrimary(esd,vertex,track)) continue;
3640 if(!fProtonAnalysisBase->IsAccepted(track)) continue;
3642 //reconstructed primary (anti)protons
3643 if(pdgcode == 2212) {
3644 if(label <= stack->GetNprimary()) {
3645 if(fProtonAnalysisBase->GetEtaMode())
3646 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
3649 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3654 if(label > stack->GetNprimary()) {
3655 Int_t lPartMother = -1;
3656 Int_t motherPDGCode = -1;
3657 lPartMother = particle->GetFirstMother();
3658 TParticle *motherParticle = stack->Particle(lPartMother);
3659 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3661 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3662 if(fProtonAnalysisBase->GetEtaMode())
3663 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
3666 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3671 if((particle->GetUniqueID() == 13)) {
3672 if(fProtonAnalysisBase->GetEtaMode())
3673 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
3676 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3680 }//hadronic interactions
3683 if(pdgcode == -2212) {
3684 if(label <= stack->GetNprimary()) {
3685 if(fProtonAnalysisBase->GetEtaMode())
3686 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
3689 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3694 if(label > stack->GetNprimary()) {
3695 Int_t lPartMother = -1;
3696 Int_t motherPDGCode = -1;
3697 lPartMother = particle->GetFirstMother();
3698 TParticle *motherParticle = stack->Particle(lPartMother);
3699 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3701 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3702 if(fProtonAnalysisBase->GetEtaMode())
3703 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
3706 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3711 if((particle->GetUniqueID() == 13)) {
3712 if(fProtonAnalysisBase->GetEtaMode())
3713 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
3716 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3720 }//hadronic interactions
3722 }//initial antiprotons
3726 }//loop over findable tracks
3728 labelMCArray.Reset();
3731 //____________________________________________________________________//
3732 void AliProtonQAAnalysis::RunPIDEfficiencyAnalysis(AliStack *const stack,
3734 const AliESDVertex *vertex) {
3735 //Runs the PID efficiency analysis
3736 Int_t nGoodTracks = esd->GetNumberOfTracks();
3737 TArrayI labelArray(nGoodTracks);
3738 Int_t labelCounter = 0;
3739 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3740 AliESDtrack* track = esd->GetTrack(iTracks);
3741 if(!track) continue;
3744 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3745 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3746 if(!tpcTrack) continue;
3749 Int_t label = TMath::Abs(track->GetLabel());
3750 if(IsLabelUsed(labelArray,label)) continue;
3751 labelArray.AddAt(label,labelCounter);
3754 TParticle *particle = stack->Particle(label);
3755 if(!particle) continue;
3756 Int_t pdgcode = particle->GetPdgCode();
3758 Int_t nTPCpoints = track->GetTPCsignalN();
3760 if(fUseCutsInEfficiency) {
3761 if(!fProtonAnalysisBase->IsPrimary(esd,vertex,track)) continue;
3762 if(!fProtonAnalysisBase->IsAccepted(track)) continue;
3764 if(TMath::Abs(pdgcode) == 2212) {
3765 if(fProtonAnalysisBase->GetEtaMode())
3766 ((TH3D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
3767 particle->Pt(),nTPCpoints);
3769 ((TH3D *)(fEfficiencyList->At(12)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3773 if(fProtonAnalysisBase->IsProton(track)) {
3774 if(fProtonAnalysisBase->GetEtaMode())
3775 ((TH3D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
3776 particle->Pt(),nTPCpoints);
3777 else ((TH3D *)(fEfficiencyList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3778 if(TMath::Abs(pdgcode) == 2212) {
3779 if(fProtonAnalysisBase->GetEtaMode())
3780 ((TH3D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
3781 particle->Pt(),nTPCpoints);
3783 ((TH3D *)(fEfficiencyList->At(13)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3784 }//properly identified as proton
3786 if(fProtonAnalysisBase->GetEtaMode())
3787 ((TH3D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
3788 particle->Pt(),nTPCpoints);
3790 ((TH3D *)(fEfficiencyList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
3792 }//identified as proton
3797 //____________________________________________________________________//
3798 void AliProtonQAAnalysis::RunCutEfficiencyAnalysis(AliStack *const stack,
3800 const AliESDVertex *vertex) {
3801 //Runs the cut efficiency analysis
3802 Int_t nGoodTracks = esd->GetNumberOfTracks();
3803 TArrayI labelArray(nGoodTracks);
3804 Int_t labelCounter = 0;
3805 Int_t nPrimaries = stack->GetNprimary();
3806 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3807 AliESDtrack* track = esd->GetTrack(iTracks);
3808 if(!track) continue;
3811 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3812 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3813 if(!tpcTrack) continue;
3816 Int_t label = TMath::Abs(track->GetLabel());
3817 if(IsLabelUsed(labelArray,label)) continue;
3818 labelArray.AddAt(label,labelCounter);
3821 TParticle *particle = stack->Particle(label);
3822 if(!particle) continue;
3825 if(label > nPrimaries) continue;
3826 //select identified protons
3827 if(!fProtonAnalysisBase->IsProton(track)) continue;
3829 if(track->Charge() > 0) {
3830 if(fProtonAnalysisBase->GetEtaMode())
3831 ((TH2F *)(fCutEfficiencyList->At(0)))->Fill(particle->Eta(),
3834 ((TH2F *)(fCutEfficiencyList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
3837 if(track->Charge() < 0) {
3838 if(fProtonAnalysisBase->GetEtaMode())
3839 ((TH2F *)(fCutEfficiencyList->At(1)))->Fill(particle->Eta(),
3842 ((TH2F *)(fCutEfficiencyList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
3846 if(!fProtonAnalysisBase->IsPrimary(esd,vertex,track)) continue;
3847 if(!fProtonAnalysisBase->IsAccepted(track)) continue;
3848 if(track->Charge() > 0) {
3849 if(fProtonAnalysisBase->GetEtaMode())
3850 ((TH2F *)(fCutEfficiencyList->At(2)))->Fill(particle->Eta(),
3853 ((TH2F *)(fCutEfficiencyList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
3856 if(track->Charge() < 0) {
3857 if(fProtonAnalysisBase->GetEtaMode())
3858 ((TH2F *)(fCutEfficiencyList->At(3)))->Fill(particle->Eta(),
3861 ((TH2F *)(fCutEfficiencyList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
3867 //____________________________________________________________________//
3868 void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliStack *const stack,
3870 const AliESDVertex *vertex) {
3871 //Runs the efficiency code
3873 Int_t nMCProtons = 0, nESDProtons = 0;
3874 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
3875 TParticle *particle = stack->Particle(iParticle);
3876 if(!particle) continue;
3878 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3879 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3880 if(fProtonAnalysisBase->GetEtaMode()) {
3881 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
3884 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
3886 Int_t pdgcode = particle->GetPdgCode();
3887 if(TMath::Abs(pdgcode) != 2212) continue;
3889 if(iParticle <= stack->GetNprimary()) {
3890 if(pdgcode == 2212) {
3892 if(fProtonAnalysisBase->GetEtaMode())
3893 ((TH2D *)(fEfficiencyList->At(0)))->Fill(particle->Eta(),
3896 ((TH2D *)(fEfficiencyList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3901 if(pdgcode == -2212) {
3902 if(fProtonAnalysisBase->GetEtaMode())
3903 ((TH2D *)(fEfficiencyList->At(1)))->Fill(particle->Eta(),
3906 ((TH2D *)(fEfficiencyList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3914 Int_t lPartMother = -1;
3915 Int_t motherPDGCode = -1;
3916 lPartMother = particle->GetFirstMother();
3917 TParticle *motherParticle = stack->Particle(lPartMother);
3918 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
3920 if(pdgcode == 2212) {
3921 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3922 if(fProtonAnalysisBase->GetEtaMode())
3923 ((TH2D *)(fEfficiencyList->At(2)))->Fill(particle->Eta(),
3926 ((TH2D *)(fEfficiencyList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3931 if((particle->GetUniqueID() == 13)) {
3932 if(fProtonAnalysisBase->GetEtaMode())
3933 ((TH2D *)(fEfficiencyList->At(4)))->Fill(particle->Eta(),
3936 ((TH2D *)(fEfficiencyList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3940 }//hadronic interactions
3942 if(pdgcode == -2212) {
3943 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
3944 if(fProtonAnalysisBase->GetEtaMode())
3945 ((TH2D *)(fEfficiencyList->At(3)))->Fill(particle->Eta(),
3948 ((TH2D *)(fEfficiencyList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3953 if((particle->GetUniqueID() == 13)) {
3954 if(fProtonAnalysisBase->GetEtaMode())
3955 ((TH2D *)(fEfficiencyList->At(5)))->Fill(particle->Eta(),
3958 ((TH2D *)(fEfficiencyList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
3962 }//hadronic interactions
3969 Int_t nGoodTracks = esd->GetNumberOfTracks();
3970 TArrayI labelArray(nGoodTracks);
3971 Int_t labelCounter = 0;
3972 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
3973 AliESDtrack* track = esd->GetTrack(iTracks);
3974 if(!track) continue;
3976 Int_t label = TMath::Abs(track->GetLabel());
3977 if(IsLabelUsed(labelArray,label)) continue;
3978 labelArray.AddAt(label,labelCounter);
3981 TParticle *particle = stack->Particle(label);
3982 if(!particle) continue;
3983 Int_t pdgcode = particle->GetPdgCode();
3984 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
3986 Double_t gPt = 0.0, gP = 0.0;
3989 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
3990 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
3991 if(!tpcTrack) continue;
3992 gPt = tpcTrack->Pt();
3995 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
3996 if(fProtonAnalysisBase->GetEtaMode()) {
3997 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
4000 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4002 if(fUseCutsInEfficiency) {
4003 if(!fProtonAnalysisBase->IsPrimary(esd,vertex,track)) continue;
4004 if(!fProtonAnalysisBase->IsAccepted(track)) continue;
4006 //reconstructed primary (anti)protons
4007 if(pdgcode == 2212) {
4008 if(label <= stack->GetNprimary()) {
4010 if(fProtonAnalysisBase->GetEtaMode())
4011 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
4014 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4019 if(label > stack->GetNprimary()) {
4020 Int_t lPartMother = -1;
4021 Int_t motherPDGCode = -1;
4022 lPartMother = particle->GetFirstMother();
4023 TParticle *motherParticle = stack->Particle(lPartMother);
4024 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4026 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
4027 if(fProtonAnalysisBase->GetEtaMode())
4028 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
4031 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4036 if((particle->GetUniqueID() == 13)) {
4037 if(fProtonAnalysisBase->GetEtaMode())
4038 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
4041 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4045 }//hadronic interactions
4048 if(pdgcode == -2212) {
4049 if(label <= stack->GetNprimary()) {
4050 if(fProtonAnalysisBase->GetEtaMode())
4051 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
4054 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4059 if(label > stack->GetNprimary()) {
4060 Int_t lPartMother = -1;
4061 Int_t motherPDGCode = -1;
4062 lPartMother = particle->GetFirstMother();
4063 TParticle *motherParticle = stack->Particle(lPartMother);
4064 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4066 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
4067 if(fProtonAnalysisBase->GetEtaMode())
4068 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
4071 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4076 if((particle->GetUniqueID() == 13)) {
4077 if(fProtonAnalysisBase->GetEtaMode())
4078 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
4081 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4085 }//hadronic interactions
4087 }//initial antiprotons
4090 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
4091 if(fProtonAnalysisBase->GetEtaMode()) {
4092 if((particle->Eta() > fMaxY)|| (particle->Eta() < fMinY)) continue;
4095 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4098 if(fUseCutsInEfficiency) {
4099 if(!fProtonAnalysisBase->IsPrimary(esd,vertex,track)) continue;
4100 if(!fProtonAnalysisBase->IsAccepted(track)) continue;
4102 //reconstructed primary (anti)protons
4103 if(pdgcode == 2212) {
4104 if(label <= stack->GetNprimary()) {
4106 if(fProtonAnalysisBase->GetEtaMode())
4107 ((TH2D *)(fEfficiencyList->At(6)))->Fill(particle->Eta(),
4110 ((TH2D *)(fEfficiencyList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4115 if(label > stack->GetNprimary()) {
4116 Int_t lPartMother = -1;
4117 Int_t motherPDGCode = -1;
4118 lPartMother = particle->GetFirstMother();
4119 TParticle *motherParticle = stack->Particle(lPartMother);
4120 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4122 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
4123 if(fProtonAnalysisBase->GetEtaMode())
4124 ((TH2D *)(fEfficiencyList->At(8)))->Fill(particle->Eta(),
4127 ((TH2D *)(fEfficiencyList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4132 if((particle->GetUniqueID() == 13)) {
4133 if(fProtonAnalysisBase->GetEtaMode())
4134 ((TH2D *)(fEfficiencyList->At(10)))->Fill(particle->Eta(),
4137 ((TH2D *)(fEfficiencyList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4141 }//hadronic interactions
4144 if(pdgcode == -2212) {
4145 if(fProtonAnalysisBase->GetEtaMode())
4146 ((TH2D *)(fEfficiencyList->At(12)))->Fill(particle->Eta(),
4149 ((TH2D *)(fEfficiencyList->At(12)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4153 if(label <= stack->GetNprimary()) {
4154 if(fProtonAnalysisBase->GetEtaMode())
4155 ((TH2D *)(fEfficiencyList->At(7)))->Fill(particle->Eta(),
4158 ((TH2D *)(fEfficiencyList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4163 if(label > stack->GetNprimary()) {
4164 Int_t lPartMother = -1;
4165 Int_t motherPDGCode = -1;
4166 lPartMother = particle->GetFirstMother();
4167 TParticle *motherParticle = stack->Particle(lPartMother);
4168 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4170 if((particle->GetUniqueID() == 4)&&(TMath::Abs(motherPDGCode) == 3122)) {
4171 if(fProtonAnalysisBase->GetEtaMode())
4172 ((TH2D *)(fEfficiencyList->At(9)))->Fill(particle->Eta(),
4175 ((TH2D *)(fEfficiencyList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4180 if((particle->GetUniqueID() == 13)) {
4181 if(fProtonAnalysisBase->GetEtaMode())
4182 ((TH2D *)(fEfficiencyList->At(11)))->Fill(particle->Eta(),
4185 ((TH2D *)(fEfficiencyList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4189 }//hadronic interactions
4191 }//initial antiprotons
4195 //Printf("MC protons: %d - ESD protons: %d",nMCProtons,nESDProtons);
4198 //____________________________________________________________________//
4199 Bool_t AliProtonQAAnalysis::IsLabelUsed(TArrayI labelArray,
4201 //Checks if the label is used already
4202 Bool_t status = kFALSE;
4203 for(Int_t i = 0; i < labelArray.GetSize(); i++) {
4204 if(labelArray.At(i) == label)
4211 //____________________________________________________________________//
4212 void AliProtonQAAnalysis::RunVertexQA(AliGenEventHeader *header,
4213 AliESDEvent *const esd) {
4214 //Runs the vertex QA
4216 TArrayF primaryVertex(3);
4217 header->PrimaryVertex(primaryVertex);
4219 //Int_t nPrimaries = stack->GetNprimary();
4220 ((TH1F *)(fQAVertexList->At(0)))->Fill(primaryVertex[2]);
4223 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
4225 Printf("ERROR: Could not retrieve the TPC vertex");
4228 if(vertexTPC->GetNContributors() > 0) {
4229 ((TH1F *)(fQAVertexList->At(1)))->Fill(primaryVertex[2]);
4230 ((TH2F *)(fQAVertexList->At(2)))->Fill(vertexTPC->GetXv(),
4231 vertexTPC->GetNContributors());
4232 ((TH2F *)(fQAVertexList->At(3)))->Fill(vertexTPC->GetYv(),
4233 vertexTPC->GetNContributors());
4234 ((TH2F *)(fQAVertexList->At(4)))->Fill(vertexTPC->GetZv(),
4235 vertexTPC->GetNContributors());
4236 ((TH1F *)(fQAVertexList->At(5)))->Fill((vertexTPC->GetXv()-primaryVertex[0])*10000.);
4237 ((TH1F *)(fQAVertexList->At(6)))->Fill((vertexTPC->GetYv()-primaryVertex[1])*10000.);
4238 ((TH1F *)(fQAVertexList->At(7)))->Fill((vertexTPC->GetZv()-primaryVertex[2])*10000.);
4239 ((TH1F *)(fQAVertexList->At(8)))->Fill(vertexTPC->GetXRes()*10000.);
4240 ((TH1F *)(fQAVertexList->At(9)))->Fill(vertexTPC->GetYRes()*10000.);
4241 ((TH1F *)(fQAVertexList->At(10)))->Fill(vertexTPC->GetZRes()*10000.);
4245 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
4247 Printf("ERROR: Could not retrieve the SPD vertex");
4250 if(vertexSPD->GetNContributors() > 0) {
4251 ((TH1F *)(fQAVertexList->At(11)))->Fill(primaryVertex[2]);
4252 ((TH2F *)(fQAVertexList->At(12)))->Fill(vertexSPD->GetXv(),
4253 vertexSPD->GetNContributors());
4254 ((TH2F *)(fQAVertexList->At(13)))->Fill(vertexSPD->GetYv(),
4255 vertexSPD->GetNContributors());
4256 ((TH2F *)(fQAVertexList->At(14)))->Fill(vertexSPD->GetZv(),
4257 vertexSPD->GetNContributors());
4258 ((TH1F *)(fQAVertexList->At(15)))->Fill((vertexSPD->GetXv()-primaryVertex[0])*10000.);
4259 ((TH1F *)(fQAVertexList->At(16)))->Fill((vertexSPD->GetYv()-primaryVertex[1])*10000.);
4260 ((TH1F *)(fQAVertexList->At(17)))->Fill((vertexSPD->GetZv()-primaryVertex[2])*10000.);
4261 ((TH1F *)(fQAVertexList->At(18)))->Fill(vertexSPD->GetXRes()*10000.);
4262 ((TH1F *)(fQAVertexList->At(19)))->Fill(vertexSPD->GetYRes()*10000.);
4263 ((TH1F *)(fQAVertexList->At(20)))->Fill(vertexSPD->GetZRes()*10000.);
4267 const AliESDVertex *vertexTracks = esd->GetPrimaryVertex();
4269 Printf("ERROR: Could not retrieve the Tracks vertex");
4272 if(vertexTracks->GetNContributors() > 0) {
4273 ((TH1F *)(fQAVertexList->At(21)))->Fill(primaryVertex[2]);
4274 ((TH2F *)(fQAVertexList->At(22)))->Fill(vertexTracks->GetXv(),
4275 vertexTracks->GetNContributors());
4276 ((TH2F *)(fQAVertexList->At(23)))->Fill(vertexTracks->GetYv(),
4277 vertexTracks->GetNContributors());
4278 ((TH2F *)(fQAVertexList->At(24)))->Fill(vertexTracks->GetZv(),
4279 vertexTracks->GetNContributors());
4280 ((TH1F *)(fQAVertexList->At(25)))->Fill((vertexTracks->GetXv()-primaryVertex[0])*10000.);
4281 ((TH1F *)(fQAVertexList->At(26)))->Fill((vertexTracks->GetYv()-primaryVertex[1])*10000.);
4282 ((TH1F *)(fQAVertexList->At(27)))->Fill((vertexTracks->GetZv()-primaryVertex[2])*10000.);
4283 ((TH1F *)(fQAVertexList->At(28)))->Fill(vertexTracks->GetXRes()*10000.);
4284 ((TH1F *)(fQAVertexList->At(29)))->Fill(vertexTracks->GetYRes()*10000.);
4285 ((TH1F *)(fQAVertexList->At(30)))->Fill(vertexTracks->GetZRes()*10000.);
4290 //____________________________________________________________________//
4291 void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
4293 const AliESDVertex *vertex) {
4296 for(Int_t iParticle = 0; iParticle < stack->GetNprimary(); iParticle++) {
4297 TParticle *particle = stack->Particle(iParticle);
4298 if(!particle) continue;
4300 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
4301 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
4302 if(fProtonAnalysisBase->GetEtaMode()) {
4303 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
4306 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
4308 Int_t pdgcode = particle->GetPdgCode();
4309 if(pdgcode == 2212) {
4310 if(fProtonAnalysisBase->GetEtaMode())
4311 ((TH2D *)(fQA2DList->At(8)))->Fill(particle->Eta(),
4314 ((TH2D *)(fQA2DList->At(8)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4319 if(pdgcode == -2212) {
4320 if(fProtonAnalysisBase->GetEtaMode())
4321 ((TH2D *)(fQA2DList->At(9)))->Fill(particle->Eta(),
4324 ((TH2D *)(fQA2DList->At(9)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
4331 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0};
4333 Int_t nGoodTracks = esd->GetNumberOfTracks();
4334 TArrayI labelArray(nGoodTracks);
4335 Int_t labelCounter = 0;
4336 for(Int_t iTracks = 0; iTracks < nGoodTracks; iTracks++) {
4337 AliESDtrack* track = esd->GetTrack(iTracks);
4338 if(!track) continue;
4340 Int_t label = TMath::Abs(track->GetLabel());
4341 if(IsLabelUsed(labelArray,label)) continue;
4342 labelArray.AddAt(label,labelCounter);
4345 TParticle *particle = stack->Particle(label);
4346 if(!particle) continue;
4347 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
4349 AliESDtrack trackTPC;
4351 //in case it's a TPC only track relate it to the proper vertex
4352 //if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)&&(!fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
4353 //if((fUseTPCOnly)&&(!fUseHybridTPC)) {
4354 /*track->GetImpactParametersTPC(dca,cov);
4355 if (dca[0]==0 && dca[1]==0)
4356 track->RelateToVertexTPC(((AliESDEvent*)esd)->GetPrimaryVertexTPC(),esd->GetMagneticField(),kVeryBig);
4357 if (!track->FillTPCOnlyTrack(trackTPC)) {
4360 track = &trackTPC ;*/
4363 Double_t gPt = 0.0, gP = 0.0;
4364 //Double_t probability[5];
4365 //Float_t dcaXY = 0.0, dcaZ = 0.0;
4366 Double_t nSigmaToVertex = fProtonAnalysisBase->GetSigmaToVertex(track);
4368 Int_t nClustersITS = track->GetITSclusters(fIdxInt);
4369 Int_t nClustersTPC = track->GetTPCclusters(fIdxInt);
4371 Float_t chi2PerClusterITS = -1;
4372 if (nClustersITS!=0)
4373 chi2PerClusterITS = track->GetITSchi2()/Float_t(nClustersITS);
4374 Float_t chi2PerClusterTPC = -1;
4375 if (nClustersTPC!=0)
4376 chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);
4377 Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());
4378 Double_t extCov[15];
4379 track->GetExternalCovariance(extCov);
4380 Int_t npointsTPCdEdx = track->GetTPCsignalN();
4383 if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
4384 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
4385 if(!tpcTrack) continue;
4386 gPt = tpcTrack->Pt();
4388 /*if(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)
4389 track->GetImpactParameters(dcaXY,dcaZ);
4390 else track->GetImpactParametersTPC(dcaXY,dcaZ);*/
4391 tpcTrack->PropagateToDCA(vertex,
4392 esd->GetMagneticField(),
4396 if(fProtonAnalysisBase->IsProton(track)) {
4397 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
4399 FillQA(stack,esd,vertex,track);
4400 if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) {
4401 if(fProtonAnalysisBase->IsAccepted(track)) {
4402 if(label <= stack->GetNprimary()) {
4403 if(track->Charge() > 0) {
4404 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4405 if(track->HasPointOnITSLayer(iLayer))
4406 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
4408 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
4409 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
4410 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
4411 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
4412 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
4413 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
4414 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
4415 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
4416 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
4417 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
4418 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(tpcTrack->Eta(),
4419 tpcTrack->Phi()*180./TMath::Pi(),
4421 ((TH3D *)(fAcceptedCutList->At(48)))->Fill(tpcTrack->Eta(),
4422 tpcTrack->Phi()*180./TMath::Pi(),
4424 ((TH3D *)(fAcceptedCutList->At(52)))->Fill(tpcTrack->Eta(),
4425 tpcTrack->Phi()*180./TMath::Pi(),
4427 ((TH1D *)(fAcceptedCutList->At(56)))->Fill(npointsTPCdEdx);
4429 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dca[0]));
4430 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dca[1]));
4431 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
4432 ((TH2F *)(fAcceptedDCAList->At(12)))->Fill(gPt,TMath::Abs(dca[0]));
4433 ((TH2F *)(fAcceptedDCAList->At(18)))->Fill(gPt,TMath::Abs(dca[1]));
4434 if(fProtonAnalysisBase->GetEtaMode())
4435 ((TH2D *)(fQA2DList->At(0)))->Fill(tpcTrack->Eta(),gPt);
4437 ((TH2D *)(fQA2DList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4441 }//accepted primary protons
4442 else if(track->Charge() < 0) {
4443 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4444 if(track->HasPointOnITSLayer(iLayer))
4445 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
4447 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
4448 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
4449 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
4450 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
4451 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
4452 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
4453 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
4454 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
4455 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
4456 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
4457 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(tpcTrack->Eta(),
4458 tpcTrack->Phi()*180./TMath::Pi(),
4460 ((TH3D *)(fAcceptedCutList->At(49)))->Fill(tpcTrack->Eta(),
4461 tpcTrack->Phi()*180./TMath::Pi(),
4463 ((TH3D *)(fAcceptedCutList->At(53)))->Fill(tpcTrack->Eta(),
4464 tpcTrack->Phi()*180./TMath::Pi(),
4466 ((TH1D *)(fAcceptedCutList->At(57)))->Fill(npointsTPCdEdx);
4468 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dca[0]));
4469 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dca[1]));
4470 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
4471 ((TH2F *)(fAcceptedDCAList->At(13)))->Fill(gPt,TMath::Abs(dca[0]));
4472 ((TH2F *)(fAcceptedDCAList->At(19)))->Fill(gPt,TMath::Abs(dca[1]));
4473 if(fProtonAnalysisBase->GetEtaMode())
4474 ((TH2D *)(fQA2DList->At(4)))->Fill(tpcTrack->Eta(),gPt);
4476 ((TH2D *)(fQA2DList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4480 }//accepted primary antiprotons
4481 }//accepted primary particles
4482 else if(label > stack->GetNprimary()) {
4483 Int_t lPartMother = -1;
4484 Int_t motherPDGCode = -1;
4486 lPartMother = particle->GetFirstMother();
4487 TParticle *motherParticle = stack->Particle(lPartMother);
4488 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4491 if(fMCProcessIdFlag)
4492 if(particle->GetUniqueID() != fMCProcessId) continue;
4493 if(fMotherParticlePDGCodeFlag)
4494 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4496 if(track->Charge() > 0) {
4497 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4498 if(track->HasPointOnITSLayer(iLayer))
4499 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
4501 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
4502 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
4503 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
4504 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
4505 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
4506 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
4507 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
4508 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
4509 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
4510 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
4511 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(tpcTrack->Eta(),
4512 tpcTrack->Phi()*180./TMath::Pi(),
4514 ((TH3D *)(fAcceptedCutList->At(50)))->Fill(tpcTrack->Eta(),
4515 tpcTrack->Phi()*180./TMath::Pi(),
4517 ((TH3D *)(fAcceptedCutList->At(54)))->Fill(tpcTrack->Eta(),
4518 tpcTrack->Phi()*180./TMath::Pi(),
4520 ((TH1D *)(fAcceptedCutList->At(58)))->Fill(npointsTPCdEdx);
4522 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dca[0]));
4523 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dca[1]));
4524 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
4525 if(particle->GetUniqueID() == 4) {
4526 ((TH2F *)(fAcceptedDCAList->At(14)))->Fill(gPt,TMath::Abs(dca[0]));
4527 ((TH2F *)(fAcceptedDCAList->At(20)))->Fill(gPt,TMath::Abs(dca[1]));
4529 if(particle->GetUniqueID() == 13) {
4530 ((TH2F *)(fAcceptedDCAList->At(16)))->Fill(gPt,TMath::Abs(dca[0]));
4531 ((TH2F *)(fAcceptedDCAList->At(22)))->Fill(gPt,TMath::Abs(dca[1]));
4533 if(fProtonAnalysisBase->GetEtaMode())
4534 ((TH2D *)(fQA2DList->At(2)))->Fill(tpcTrack->Eta(),gPt);
4536 ((TH2D *)(fQA2DList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4540 if(fProtonAnalysisBase->GetEtaMode())
4541 ((TH3F *)(fQA2DList->At(10)))->Fill(tpcTrack->Eta(),gPt,
4542 ConvertPDGToInt(motherPDGCode));
4544 ((TH3F *)(fQA2DList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4548 ConvertPDGToInt(motherPDGCode));
4549 }//accepted secondary protons
4550 else if(track->Charge() < 0) {
4551 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4552 if(track->HasPointOnITSLayer(iLayer))
4553 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
4555 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
4556 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
4557 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
4558 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
4559 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
4560 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
4561 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
4562 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
4563 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
4564 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
4565 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(tpcTrack->Eta(),
4566 tpcTrack->Phi()*180./TMath::Pi(),
4568 ((TH3D *)(fAcceptedCutList->At(51)))->Fill(tpcTrack->Eta(),
4569 tpcTrack->Phi()*180./TMath::Pi(),
4571 ((TH3D *)(fAcceptedCutList->At(55)))->Fill(tpcTrack->Eta(),
4572 tpcTrack->Phi()*180./TMath::Pi(),
4574 ((TH1F *)(fAcceptedCutList->At(59)))->Fill(npointsTPCdEdx);
4576 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dca[0]));
4577 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dca[1]));
4578 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
4579 if(particle->GetUniqueID() == 4) {
4580 ((TH2F *)(fAcceptedDCAList->At(15)))->Fill(gPt,TMath::Abs(dca[0]));
4581 ((TH2F *)(fAcceptedDCAList->At(21)))->Fill(gPt,TMath::Abs(dca[1]));
4583 if(particle->GetUniqueID() == 13) {
4584 ((TH2F *)(fAcceptedDCAList->At(17)))->Fill(gPt,TMath::Abs(dca[0]));
4585 ((TH2F *)(fAcceptedDCAList->At(23)))->Fill(gPt,TMath::Abs(dca[1]));
4587 if(fProtonAnalysisBase->GetEtaMode())
4588 ((TH2D *)(fQA2DList->At(6)))->Fill(tpcTrack->Eta(),gPt);
4590 ((TH2D *)(fQA2DList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4594 if(fProtonAnalysisBase->GetEtaMode())
4595 ((TH3F *)(fQA2DList->At(11)))->Fill(tpcTrack->Eta(),gPt,
4596 ConvertPDGToInt(motherPDGCode));
4598 ((TH3F *)(fQA2DList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4602 ConvertPDGToInt(motherPDGCode));
4603 }//accepted secondary antiprotons
4604 }//accepted secondary particles
4605 }//accepted - track cuts
4608 if(label <= stack->GetNprimary()) {
4609 if(track->Charge() > 0) {
4610 ((TH3D *)(fRejectedCutList->At(0)))->Fill(tpcTrack->Eta(),
4611 tpcTrack->Phi()*180./TMath::Pi(),
4613 ((TH3D *)(fRejectedCutList->At(4)))->Fill(tpcTrack->Eta(),
4614 tpcTrack->Phi()*180./TMath::Pi(),
4616 ((TH3D *)(fRejectedCutList->At(8)))->Fill(tpcTrack->Eta(),
4617 tpcTrack->Phi()*180./TMath::Pi(),
4620 if(fProtonAnalysisBase->GetEtaMode())
4621 ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),gPt);
4623 ((TH2D *)(fQA2DList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4628 else if(track->Charge() < 0) {
4629 ((TH3D *)(fRejectedCutList->At(1)))->Fill(tpcTrack->Eta(),
4630 tpcTrack->Phi()*180./TMath::Pi(),
4632 ((TH3D *)(fRejectedCutList->At(5)))->Fill(tpcTrack->Eta(),
4633 tpcTrack->Phi()*180./TMath::Pi(),
4635 ((TH3D *)(fRejectedCutList->At(9)))->Fill(tpcTrack->Eta(),
4636 tpcTrack->Phi()*180./TMath::Pi(),
4638 if(fProtonAnalysisBase->GetEtaMode())
4639 ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),gPt);
4641 ((TH2D *)(fQA2DList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4646 }//rejected primary particles
4647 else if(label > stack->GetNprimary()) {
4648 if(track->Charge() > 0) {
4649 ((TH3D *)(fRejectedCutList->At(2)))->Fill(tpcTrack->Eta(),
4650 tpcTrack->Phi()*180./TMath::Pi(),
4652 ((TH3D *)(fRejectedCutList->At(6)))->Fill(tpcTrack->Eta(),
4653 tpcTrack->Phi()*180./TMath::Pi(),
4655 ((TH3D *)(fRejectedCutList->At(10)))->Fill(tpcTrack->Eta(),
4656 tpcTrack->Phi()*180./TMath::Pi(),
4658 if(fProtonAnalysisBase->GetEtaMode())
4659 ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),gPt);
4661 ((TH2D *)(fQA2DList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4666 else if(track->Charge() < 0) {
4667 ((TH3D *)(fRejectedCutList->At(3)))->Fill(tpcTrack->Eta(),
4668 tpcTrack->Phi()*180./TMath::Pi(),
4670 ((TH3D *)(fRejectedCutList->At(7)))->Fill(tpcTrack->Eta(),
4671 tpcTrack->Phi()*180./TMath::Pi(),
4673 ((TH3D *)(fRejectedCutList->At(11)))->Fill(tpcTrack->Eta(),
4674 tpcTrack->Phi()*180./TMath::Pi(),
4677 if(fProtonAnalysisBase->GetEtaMode())
4678 ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),gPt);
4680 ((TH2D *)(fQA2DList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(tpcTrack->Px(),
4685 }//rejected secondary particles
4686 }//rejected - track cuts
4693 track->PropagateToDCA(vertex,
4694 esd->GetMagneticField(),
4698 if(fProtonAnalysisBase->IsProton(track)) {
4699 if(!fProtonAnalysisBase->IsInPhaseSpace(track)) continue; //track outside the analyzed y-Pt
4701 FillQA(stack,esd,vertex,track);
4702 if(fProtonAnalysisBase->IsPrimary(esd,vertex,track)) {
4703 if(fProtonAnalysisBase->IsAccepted(track)) {
4704 if(label <= stack->GetNprimary()) {
4705 if(track->Charge() > 0) {
4706 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4707 if(track->HasPointOnITSLayer(iLayer))
4708 ((TH1F *)(fAcceptedCutList->At(0)))->Fill(iLayer+1);
4710 ((TH1F *)(fAcceptedCutList->At(4)))->Fill(nClustersITS);
4711 ((TH1F *)(fAcceptedCutList->At(8)))->Fill(chi2PerClusterITS);
4712 ((TH1F *)(fAcceptedCutList->At(12)))->Fill(chi2ConstrainVertex);
4713 ((TH1F *)(fAcceptedCutList->At(16)))->Fill(nClustersTPC);
4714 ((TH1F *)(fAcceptedCutList->At(20)))->Fill(chi2PerClusterTPC);
4715 ((TH1F *)(fAcceptedCutList->At(24)))->Fill(extCov[0]);
4716 ((TH1F *)(fAcceptedCutList->At(28)))->Fill(extCov[2]);
4717 ((TH1F *)(fAcceptedCutList->At(32)))->Fill(extCov[5]);
4718 ((TH1F *)(fAcceptedCutList->At(36)))->Fill(extCov[9]);
4719 ((TH1F *)(fAcceptedCutList->At(40)))->Fill(extCov[14]);
4720 ((TH3D *)(fAcceptedCutList->At(44)))->Fill(track->Eta(),
4721 track->Phi()*180./TMath::Pi(),
4723 ((TH3D *)(fAcceptedCutList->At(48)))->Fill(track->Eta(),
4724 track->Phi()*180./TMath::Pi(),
4726 ((TH3D *)(fAcceptedCutList->At(52)))->Fill(track->Eta(),
4727 track->Phi()*180./TMath::Pi(),
4729 ((TH1F *)(fAcceptedCutList->At(56)))->Fill(npointsTPCdEdx);
4731 ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dca[0]));
4732 ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dca[1]));
4733 ((TH1F *)(fAcceptedDCAList->At(8)))->Fill(nSigmaToVertex);
4734 ((TH1F *)(fAcceptedDCAList->At(12)))->Fill(gPt,TMath::Abs(dca[0]));
4735 ((TH1F *)(fAcceptedDCAList->At(18)))->Fill(gPt,TMath::Abs(dca[0]));
4736 if(fProtonAnalysisBase->GetEtaMode())
4737 ((TH2D *)(fQA2DList->At(0)))->Fill(track->Eta(),gPt);
4739 ((TH2D *)(fQA2DList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4744 else if(track->Charge() < 0) {
4745 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4746 if(track->HasPointOnITSLayer(iLayer))
4747 ((TH1F *)(fAcceptedCutList->At(1)))->Fill(iLayer+1);
4749 ((TH1F *)(fAcceptedCutList->At(5)))->Fill(nClustersITS);
4750 ((TH1F *)(fAcceptedCutList->At(9)))->Fill(chi2PerClusterITS);
4751 ((TH1F *)(fAcceptedCutList->At(13)))->Fill(chi2ConstrainVertex);
4752 ((TH1F *)(fAcceptedCutList->At(17)))->Fill(nClustersTPC);
4753 ((TH1F *)(fAcceptedCutList->At(21)))->Fill(chi2PerClusterTPC);
4754 ((TH1F *)(fAcceptedCutList->At(25)))->Fill(extCov[0]);
4755 ((TH1F *)(fAcceptedCutList->At(29)))->Fill(extCov[2]);
4756 ((TH1F *)(fAcceptedCutList->At(33)))->Fill(extCov[5]);
4757 ((TH1F *)(fAcceptedCutList->At(37)))->Fill(extCov[9]);
4758 ((TH1F *)(fAcceptedCutList->At(41)))->Fill(extCov[14]);
4759 ((TH3D *)(fAcceptedCutList->At(45)))->Fill(track->Eta(),
4760 track->Phi()*180./TMath::Pi(),
4762 ((TH3D *)(fAcceptedCutList->At(49)))->Fill(track->Eta(),
4763 track->Phi()*180./TMath::Pi(),
4765 ((TH3D *)(fAcceptedCutList->At(53)))->Fill(track->Eta(),
4766 track->Phi()*180./TMath::Pi(),
4768 ((TH1F *)(fAcceptedCutList->At(57)))->Fill(npointsTPCdEdx);
4770 ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dca[0]));
4771 ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dca[1]));
4772 ((TH1F *)(fAcceptedDCAList->At(9)))->Fill(nSigmaToVertex);
4773 ((TH1F *)(fAcceptedDCAList->At(13)))->Fill(gPt,TMath::Abs(dca[0]));
4774 ((TH1F *)(fAcceptedDCAList->At(19)))->Fill(gPt,TMath::Abs(dca[0]));
4775 if(fProtonAnalysisBase->GetEtaMode())
4776 ((TH2D *)(fQA2DList->At(4)))->Fill(track->Eta(),gPt);
4778 ((TH2D *)(fQA2DList->At(4)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4783 }//primary particles
4784 else if(label > stack->GetNprimary()) {
4785 Int_t lPartMother = -1;
4786 Int_t motherPDGCode = -1;
4788 lPartMother = particle->GetFirstMother();
4789 TParticle *motherParticle = stack->Particle(lPartMother);
4790 if(motherParticle) motherPDGCode = motherParticle->GetPdgCode();
4793 if(fMCProcessIdFlag)
4794 if(particle->GetUniqueID() != fMCProcessId) continue;
4795 if(fMotherParticlePDGCodeFlag)
4796 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
4798 if(track->Charge() > 0) {
4799 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4800 if(track->HasPointOnITSLayer(iLayer))
4801 ((TH1F *)(fAcceptedCutList->At(2)))->Fill(iLayer+1);
4803 ((TH1F *)(fAcceptedCutList->At(6)))->Fill(nClustersITS);
4804 ((TH1F *)(fAcceptedCutList->At(10)))->Fill(chi2PerClusterITS);
4805 ((TH1F *)(fAcceptedCutList->At(14)))->Fill(chi2ConstrainVertex);
4806 ((TH1F *)(fAcceptedCutList->At(18)))->Fill(nClustersTPC);
4807 ((TH1F *)(fAcceptedCutList->At(22)))->Fill(chi2PerClusterTPC);
4808 ((TH1F *)(fAcceptedCutList->At(26)))->Fill(extCov[0]);
4809 ((TH1F *)(fAcceptedCutList->At(30)))->Fill(extCov[2]);
4810 ((TH1F *)(fAcceptedCutList->At(34)))->Fill(extCov[5]);
4811 ((TH1F *)(fAcceptedCutList->At(38)))->Fill(extCov[9]);
4812 ((TH1F *)(fAcceptedCutList->At(42)))->Fill(extCov[14]);
4813 ((TH3D *)(fAcceptedCutList->At(46)))->Fill(track->Eta(),
4814 track->Phi()*180./TMath::Pi(),
4816 ((TH3D *)(fAcceptedCutList->At(50)))->Fill(track->Eta(),
4817 track->Phi()*180./TMath::Pi(),
4819 ((TH3D *)(fAcceptedCutList->At(54)))->Fill(track->Eta(),
4820 track->Phi()*180./TMath::Pi(),
4822 ((TH1F *)(fAcceptedCutList->At(58)))->Fill(npointsTPCdEdx);
4824 ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dca[0]));
4825 ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dca[1]));
4826 ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
4827 if(particle->GetUniqueID() == 4) {
4828 ((TH2F *)(fAcceptedDCAList->At(14)))->Fill(gPt,TMath::Abs(dca[0]));
4829 ((TH2F *)(fAcceptedDCAList->At(20)))->Fill(gPt,TMath::Abs(dca[1]));
4831 if(particle->GetUniqueID() == 13) {
4832 ((TH2F *)(fAcceptedDCAList->At(16)))->Fill(gPt,TMath::Abs(dca[0]));
4833 ((TH2F *)(fAcceptedDCAList->At(22)))->Fill(gPt,TMath::Abs(dca[1]));
4835 if(fProtonAnalysisBase->GetEtaMode())
4836 ((TH2D *)(fQA2DList->At(2)))->Fill(track->Eta(),gPt);
4838 ((TH2D *)(fQA2DList->At(2)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4842 if(fProtonAnalysisBase->GetEtaMode())
4843 ((TH3F *)(fQA2DList->At(10)))->Fill(track->Eta(),gPt,
4844 ConvertPDGToInt(motherPDGCode));
4846 ((TH3F *)(fQA2DList->At(10)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4850 ConvertPDGToInt(motherPDGCode));
4852 else if(track->Charge() < 0) {
4853 for(Int_t iLayer = 0; iLayer < 6; iLayer++) {
4854 if(track->HasPointOnITSLayer(iLayer))
4855 ((TH1F *)(fAcceptedCutList->At(3)))->Fill(iLayer+1);
4857 ((TH1F *)(fAcceptedCutList->At(7)))->Fill(nClustersITS);
4858 ((TH1F *)(fAcceptedCutList->At(11)))->Fill(chi2PerClusterITS);
4859 ((TH1F *)(fAcceptedCutList->At(15)))->Fill(chi2ConstrainVertex);
4860 ((TH1F *)(fAcceptedCutList->At(19)))->Fill(nClustersTPC);
4861 ((TH1F *)(fAcceptedCutList->At(23)))->Fill(chi2PerClusterTPC);
4862 ((TH1F *)(fAcceptedCutList->At(27)))->Fill(extCov[0]);
4863 ((TH1F *)(fAcceptedCutList->At(31)))->Fill(extCov[2]);
4864 ((TH1F *)(fAcceptedCutList->At(35)))->Fill(extCov[5]);
4865 ((TH1F *)(fAcceptedCutList->At(39)))->Fill(extCov[9]);
4866 ((TH1F *)(fAcceptedCutList->At(43)))->Fill(extCov[14]);
4867 ((TH3D *)(fAcceptedCutList->At(47)))->Fill(track->Eta(),
4868 track->Phi()*180./TMath::Pi(),
4870 ((TH3D *)(fAcceptedCutList->At(51)))->Fill(track->Eta(),
4871 track->Phi()*180./TMath::Pi(),
4873 ((TH3D *)(fAcceptedCutList->At(55)))->Fill(track->Eta(),
4874 track->Phi()*180./TMath::Pi(),
4876 ((TH1F *)(fAcceptedCutList->At(59)))->Fill(npointsTPCdEdx);
4878 ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dca[0]));
4879 ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dca[1]));
4880 ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
4881 if(particle->GetUniqueID() == 4) {
4882 ((TH2F *)(fAcceptedDCAList->At(15)))->Fill(gPt,TMath::Abs(dca[0]));
4883 ((TH2F *)(fAcceptedDCAList->At(21)))->Fill(gPt,TMath::Abs(dca[1]));
4885 if(particle->GetUniqueID() == 13) {
4886 ((TH2F *)(fAcceptedDCAList->At(17)))->Fill(gPt,TMath::Abs(dca[0]));
4887 ((TH2F *)(fAcceptedDCAList->At(23)))->Fill(gPt,TMath::Abs(dca[1]));
4889 if(fProtonAnalysisBase->GetEtaMode())
4890 ((TH2D *)(fQA2DList->At(6)))->Fill(track->Eta(),gPt);
4892 ((TH2D *)(fQA2DList->At(6)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4896 if(fProtonAnalysisBase->GetEtaMode())
4897 ((TH3F *)(fQA2DList->At(11)))->Fill(track->Eta(),gPt,
4898 ConvertPDGToInt(motherPDGCode));
4900 ((TH3F *)(fQA2DList->At(11)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4904 ConvertPDGToInt(motherPDGCode));
4906 }//secondary particles
4907 }//accepted - track cuts
4909 else if((!fProtonAnalysisBase->IsAccepted(track)) ||
4910 (!fProtonAnalysisBase->IsPrimary(esd,vertex,track))) {
4911 if(label <= stack->GetNprimary()) {
4912 if(track->Charge() > 0) {
4913 ((TH3D *)(fRejectedCutList->At(0)))->Fill(track->Eta(),
4914 track->Phi()*180./TMath::Pi(),
4916 ((TH3D *)(fRejectedCutList->At(4)))->Fill(track->Eta(),
4917 track->Phi()*180./TMath::Pi(),
4919 ((TH3D *)(fRejectedCutList->At(8)))->Fill(track->Eta(),
4920 track->Phi()*180./TMath::Pi(),
4922 if(fProtonAnalysisBase->GetEtaMode())
4923 ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),gPt);
4925 ((TH2D *)(fQA2DList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4930 else if(track->Charge() < 0) {
4931 ((TH3D *)(fRejectedCutList->At(1)))->Fill(track->Eta(),
4932 track->Phi()*180./TMath::Pi(),
4934 ((TH3D *)(fRejectedCutList->At(5)))->Fill(track->Eta(),
4935 track->Phi()*180./TMath::Pi(),
4937 ((TH3D *)(fRejectedCutList->At(9)))->Fill(track->Eta(),
4938 track->Phi()*180./TMath::Pi(),
4941 if(fProtonAnalysisBase->GetEtaMode())
4942 ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),gPt);
4944 ((TH2D *)(fQA2DList->At(5)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4949 }//primary particles
4950 else if(label > stack->GetNprimary()) {
4951 if(track->Charge() > 0) {
4952 ((TH3D *)(fRejectedCutList->At(2)))->Fill(track->Eta(),
4953 track->Phi()*180./TMath::Pi(),
4955 ((TH3D *)(fRejectedCutList->At(6)))->Fill(track->Eta(),
4956 track->Phi()*180./TMath::Pi(),
4958 ((TH3D *)(fRejectedCutList->At(10)))->Fill(track->Eta(),
4959 track->Phi()*180./TMath::Pi(),
4961 if(fProtonAnalysisBase->GetEtaMode())
4962 ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),gPt);
4964 ((TH2D *)(fQA2DList->At(3)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4969 else if(track->Charge() < 0) {
4970 ((TH3D *)(fRejectedCutList->At(3)))->Fill(track->Eta(),
4971 track->Phi()*180./TMath::Pi(),
4973 ((TH3D *)(fRejectedCutList->At(7)))->Fill(track->Eta(),
4974 track->Phi()*180./TMath::Pi(),
4976 ((TH3D *)(fRejectedCutList->At(11)))->Fill(track->Eta(),
4977 track->Phi()*180./TMath::Pi(),
4979 if(fProtonAnalysisBase->GetEtaMode())
4980 ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),gPt);
4982 ((TH2D *)(fQA2DList->At(7)))->Fill(fProtonAnalysisBase->Rapidity(track->Px(),
4987 }//secondary particles
4988 }//rejected - track cuts
4990 }//combined tracking
4995 //____________________________________________________________________//
4996 void AliProtonQAAnalysis::InitMCAnalysis() {
4997 //MC analysis - 3D histograms: y-pT-pdg
4998 fPDGList = new TList();
4999 TH3F *gHistYPtPDGProtons = 0x0;
5000 if(fUseAsymmetricBinning) {
5001 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
5002 gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
5003 ";;P_{T} [GeV/c];PDG",
5004 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
5007 gHistYPtPDGProtons = new TH3F("gHistYPtPDGProtons",
5008 ";;P_{T} [GeV/c];PDG",
5009 fNBinsY,fMinY,fMaxY,
5010 fNBinsPt,fMinPt,fMaxPt,
5012 if(fProtonAnalysisBase->GetEtaMode())
5013 gHistYPtPDGProtons->GetXaxis()->SetTitle("#eta");
5015 gHistYPtPDGProtons->GetXaxis()->SetTitle("y");
5016 fPDGList->Add(gHistYPtPDGProtons);
5017 TH3F *gHistYPtPDGAntiProtons = 0x0;
5018 if(fUseAsymmetricBinning) {
5019 Double_t gPDG[15] = {-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5};
5020 gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
5021 ";;P_{T} [GeV/c];PDG",
5022 fNBinsY,fY,fNBinsPt,fPt,14,gPDG);
5025 gHistYPtPDGAntiProtons = new TH3F("gHistYPtPDGAntiProtons",
5026 ";;P_{T} [GeV/c];PDG",
5027 fNBinsY,fMinY,fMaxY,
5028 fNBinsPt,fMinPt,fMaxPt,
5030 if(fProtonAnalysisBase->GetEtaMode())
5031 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("#eta");
5033 gHistYPtPDGAntiProtons->GetXaxis()->SetTitle("y");
5034 fPDGList->Add(gHistYPtPDGAntiProtons);
5037 fMCProcessesList = new TList();
5038 TH1F *gHistProtonsFromKLProcess = new TH1F("gHistProtonsFromKLProcess","",51,-0.5,50.5);
5039 fMCProcessesList->Add(gHistProtonsFromKLProcess);
5040 TH1F *gHistProtonsFromPionProcess = new TH1F("gHistProtonsFromPionProcess","",51,-0.5,50.5);
5041 fMCProcessesList->Add(gHistProtonsFromPionProcess);
5042 TH1F *gHistProtonsFromKSProcess = new TH1F("gHistProtonsFromKSProcess","",51,-0.5,50.5);
5043 fMCProcessesList->Add(gHistProtonsFromKSProcess);
5044 TH1F *gHistProtonsFromKaonProcess = new TH1F("gHistProtonsFromKaonProcess","",51,-0.5,50.5);
5045 fMCProcessesList->Add(gHistProtonsFromKaonProcess);
5046 TH1F *gHistProtonsFromNeutronProcess = new TH1F("gHistProtonsFromNeutronProcess","",51,-0.5,50.5);
5047 fMCProcessesList->Add(gHistProtonsFromNeutronProcess);
5048 TH1F *gHistProtonsFromProtonProcess = new TH1F("gHistProtonsFromProtonProcess","",51,-0.5,50.5);
5049 fMCProcessesList->Add(gHistProtonsFromProtonProcess);
5050 TH1F *gHistProtonsFromSigmaMinusProcess = new TH1F("gHistProtonsFromSigmaMinusProcess","",51,-0.5,50.5);
5051 fMCProcessesList->Add(gHistProtonsFromSigmaMinusProcess);
5052 TH1F *gHistProtonsFromLambda0Process = new TH1F("gHistProtonsFromLambda0Process","",51,-0.5,50.5);
5053 fMCProcessesList->Add(gHistProtonsFromLambda0Process);
5054 TH1F *gHistProtonsFromSigmaPlusProcess = new TH1F("gHistProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
5055 fMCProcessesList->Add(gHistProtonsFromSigmaPlusProcess);
5056 TH1F *gHistProtonsFromXiMinusProcess = new TH1F("gHistProtonsFromXiMinusProcess","",51,-0.5,50.5);
5057 fMCProcessesList->Add(gHistProtonsFromXiMinusProcess);
5058 TH1F *gHistProtonsFromXi0Process = new TH1F("gHistProtonsFromXi0Process","",51,-0.5,50.5);
5059 fMCProcessesList->Add(gHistProtonsFromXi0Process);
5060 TH1F *gHistProtonsFromOmegaProcess = new TH1F("gHistProtonsFromOmegaProcess","",51,-0.5,50.5);
5061 fMCProcessesList->Add(gHistProtonsFromOmegaProcess);
5063 TH1F *gHistAntiProtonsFromKLProcess = new TH1F("gHistAntiProtonsFromKLProcess","",51,-0.5,50.5);
5064 fMCProcessesList->Add(gHistAntiProtonsFromKLProcess);
5065 TH1F *gHistAntiProtonsFromPionProcess = new TH1F("gHistAntiProtonsFromPionProcess","",51,-0.5,50.5);
5066 fMCProcessesList->Add(gHistAntiProtonsFromPionProcess);
5067 TH1F *gHistAntiProtonsFromKSProcess = new TH1F("gHistAntiProtonsFromKSProcess","",51,-0.5,50.5);
5068 fMCProcessesList->Add(gHistAntiProtonsFromKSProcess);
5069 TH1F *gHistAntiProtonsFromKaonProcess = new TH1F("gHistAntiProtonsFromKaonProcess","",51,-0.5,50.5);
5070 fMCProcessesList->Add(gHistAntiProtonsFromKaonProcess);
5071 TH1F *gHistAntiProtonsFromNeutronProcess = new TH1F("gHistAntiProtonsFromNeutronProcess","",51,-0.5,50.5);
5072 fMCProcessesList->Add(gHistAntiProtonsFromNeutronProcess);
5073 TH1F *gHistAntiProtonsFromProtonProcess = new TH1F("gHistAntiProtonsFromProtonProcess","",51,-0.5,50.5);
5074 fMCProcessesList->Add(gHistAntiProtonsFromProtonProcess);
5075 TH1F *gHistAntiProtonsFromLambda0Process = new TH1F("gHistAntiProtonsFromLambda0Process","",51,-0.5,50.5);
5076 fMCProcessesList->Add(gHistAntiProtonsFromLambda0Process);
5077 TH1F *gHistAntiProtonsFromSigmaPlusProcess = new TH1F("gHistAntiProtonsFromSigmaPlusProcess","",51,-0.5,50.5);
5078 fMCProcessesList->Add(gHistAntiProtonsFromSigmaPlusProcess);
5081 //____________________________________________________________________//
5082 void AliProtonQAAnalysis::RunMCAnalysis(AliStack* const stack) {
5083 //Main analysis part - MC
5084 for(Int_t iParticle = 0; iParticle < stack->GetNtrack(); iParticle++) {
5085 TParticle *particle = stack->Particle(iParticle);
5086 if(!particle) continue;
5088 if(TMath::Abs(particle->Eta()) > 1.0) continue;//acceptance
5089 if((particle->Pt() > fMaxPt)||(particle->Pt() < fMinPt)) continue;
5090 if(fProtonAnalysisBase->GetEtaMode()) {
5091 if((particle->Eta() > fMaxY)||(particle->Eta() < fMinY)) continue;
5094 if((fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) > fMaxY)||(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()) < fMinY)) continue;
5097 Int_t pdgcode = particle->GetPdgCode();
5098 if(pdgcode == 2212) {
5099 if(iParticle <= stack->GetNprimary()) {
5100 if(fProtonAnalysisBase->GetEtaMode())
5101 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),particle->Pt(),0);
5103 ((TH3F *)(fPDGList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
5108 else if(iParticle > stack->GetNprimary()) {
5109 Int_t lPartMother = particle->GetFirstMother();
5110 TParticle *motherParticle = stack->Particle(lPartMother);
5111 if(!motherParticle) continue;
5112 Int_t motherPDGCode = motherParticle->GetPdgCode();
5113 if(fMCProcessIdFlag)
5114 if(particle->GetUniqueID() != fMCProcessId) continue;
5115 if(fMotherParticlePDGCodeFlag)
5116 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
5118 if(fProtonAnalysisBase->GetEtaMode())
5119 ((TH3F *)(fPDGList->At(0)))->Fill(particle->Eta(),
5121 ConvertPDGToInt(motherParticle->GetPdgCode()));
5123 ((TH3F *)(fPDGList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
5127 ConvertPDGToInt(motherParticle->GetPdgCode()));
5129 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
5130 ((TH1F *)(fMCProcessesList->At(0)))->Fill(particle->GetUniqueID());
5131 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
5132 ((TH1F *)(fMCProcessesList->At(1)))->Fill(particle->GetUniqueID());
5133 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
5134 ((TH1F *)(fMCProcessesList->At(2)))->Fill(particle->GetUniqueID());
5135 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
5136 ((TH1F *)(fMCProcessesList->At(3)))->Fill(particle->GetUniqueID());
5137 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
5138 ((TH1F *)(fMCProcessesList->At(4)))->Fill(particle->GetUniqueID());
5139 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
5140 ((TH1F *)(fMCProcessesList->At(5)))->Fill(particle->GetUniqueID());
5141 if(TMath::Abs(motherParticle->GetPdgCode()) == 3112)
5142 ((TH1F *)(fMCProcessesList->At(6)))->Fill(particle->GetUniqueID());
5143 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
5144 ((TH1F *)(fMCProcessesList->At(7)))->Fill(particle->GetUniqueID());
5145 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
5146 ((TH1F *)(fMCProcessesList->At(8)))->Fill(particle->GetUniqueID());
5147 if(TMath::Abs(motherParticle->GetPdgCode()) == 3312)
5148 ((TH1F *)(fMCProcessesList->At(9)))->Fill(particle->GetUniqueID());
5149 if(TMath::Abs(motherParticle->GetPdgCode()) == 3322)
5150 ((TH1F *)(fMCProcessesList->At(10)))->Fill(particle->GetUniqueID());
5151 if(TMath::Abs(motherParticle->GetPdgCode()) == 3334)
5152 ((TH1F *)(fMCProcessesList->At(11)))->Fill(particle->GetUniqueID());
5154 }//pdgcode of proton
5156 if(pdgcode == -2212) {
5157 if(iParticle <= stack->GetNprimary()) {
5158 if(fProtonAnalysisBase->GetEtaMode())
5159 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),particle->Pt(),0);
5161 ((TH3F *)(fPDGList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
5166 else if(iParticle > stack->GetNprimary()) {
5167 Int_t lPartMother = particle->GetFirstMother();
5168 TParticle *motherParticle = stack->Particle(lPartMother);
5169 if(!motherParticle) continue;
5170 Int_t motherPDGCode = motherParticle->GetPdgCode();
5171 if(fMCProcessIdFlag)
5172 if(particle->GetUniqueID() != fMCProcessId) continue;
5173 if(fMotherParticlePDGCodeFlag)
5174 if(TMath::Abs(motherPDGCode) != fMotherParticlePDGCode) continue;
5176 if(fProtonAnalysisBase->GetEtaMode())
5177 ((TH3F *)(fPDGList->At(1)))->Fill(particle->Eta(),
5179 ConvertPDGToInt(motherParticle->GetPdgCode()));
5181 ((TH3F *)(fPDGList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
5185 ConvertPDGToInt(motherParticle->GetPdgCode()));
5188 if(TMath::Abs(motherParticle->GetPdgCode()) == 130)
5189 ((TH1F *)(fMCProcessesList->At(12)))->Fill(particle->GetUniqueID());
5190 if(TMath::Abs(motherParticle->GetPdgCode()) == 211)
5191 ((TH1F *)(fMCProcessesList->At(13)))->Fill(particle->GetUniqueID());
5192 if(TMath::Abs(motherParticle->GetPdgCode()) == 310)
5193 ((TH1F *)(fMCProcessesList->At(14)))->Fill(particle->GetUniqueID());
5194 if(TMath::Abs(motherParticle->GetPdgCode()) == 321)
5195 ((TH1F *)(fMCProcessesList->At(15)))->Fill(particle->GetUniqueID());
5196 if(TMath::Abs(motherParticle->GetPdgCode()) == 2112)
5197 ((TH1F *)(fMCProcessesList->At(16)))->Fill(particle->GetUniqueID());
5198 if(TMath::Abs(motherParticle->GetPdgCode()) == 2212)
5199 ((TH1F *)(fMCProcessesList->At(17)))->Fill(particle->GetUniqueID());
5200 if(TMath::Abs(motherParticle->GetPdgCode()) == 3122)
5201 ((TH1F *)(fMCProcessesList->At(18)))->Fill(particle->GetUniqueID());
5202 if(TMath::Abs(motherParticle->GetPdgCode()) == 3222)
5203 ((TH1F *)(fMCProcessesList->At(19)))->Fill(particle->GetUniqueID());
5204 }//secondary antiproton
5205 }//pdgcode of antiproton
5210 //____________________________________________________________________//
5211 Int_t AliProtonQAAnalysis::ConvertPDGToInt(Int_t pdgCode) const {
5212 //Converts the pdg code to an int based on the following scheme:
5213 //1: PDG code: 130 - Name: K_L0
5214 //2: PDG code: 211 - Name: pi+
5215 //3: PDG code: 310 - Name: K_S0
5216 //4: PDG code: 321 - Name: K+
5217 //5: PDG code: 2112 - Name: neutron
5218 //6: PDG code: 2212 - Name: proton
5219 //7: PDG code: 3112 - Name: Sigma-
5220 //8: PDG code: 3122 - Name: Lambda0
5221 //9: PDG code: 3222 - Name: Sigma+
5222 //10: PDG code: 3312 - Name: Xi-
5223 //11: PDG code: 3322 - Name: Xi0
5224 //12: PDG code: 3334 - Name: Omega-
5226 switch (TMath::Abs(pdgCode)) {