Small update
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskHFEQA.cxx
CommitLineData
b758ccbe 1/**************************************************************************\r
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
3* *\r
4* Author: The ALICE Off-line Project. *\r
5* Contributors are mentioned in the code where appropriate. *\r
6* *\r
7* Permission to use, copy, modify and distribute this software and its *\r
8* documentation strictly for non-commercial purposes is hereby granted *\r
9* without fee, provided that the above copyright notice appears in all *\r
10* copies and that both the copyright notice and this permission notice *\r
11* appear in the supporting documentation. The authors make no claims *\r
12* about the suitability of this software for any purpose. It is *\r
13* provided "as is" without express or implied warranty. *\r
14**************************************************************************/\r
15//\r
16// QA task\r
17// \r
18// Authors:\r
19// Raphaelle Bailhache <R.Bailhache@gsi.de>\r
20//\r
21#include "TROOT.h"\r
22#include "TChain.h"\r
23#include "TMath.h"\r
24#include <TString.h>\r
25#include <TBits.h>\r
26#include <TH1F.h>\r
27\r
28#include <TDirectory.h>\r
29#include <TTreeStream.h>\r
30\r
31#include "AliVEventHandler.h"\r
32#include "AliMCEventHandler.h"\r
33#include "AliAnalysisTaskSE.h"\r
34#include "AliAnalysisManager.h"\r
35\r
36#include "AliVEvent.h"\r
37#include "AliESDInputHandler.h"\r
38#include "AliMCEvent.h"\r
39#include "AliESD.h"\r
40#include "AliESDEvent.h"\r
41#include "AliPID.h"\r
42#include "AliPIDResponse.h"\r
43#include "AliESDUtils.h"\r
44#include "AliMCParticle.h"\r
45#include "AliAODMCParticle.h"\r
46#include "AliAODEvent.h"\r
47#include "AliAODVertex.h"\r
48#include "AliAODTrack.h"\r
49#include "AliVTrack.h"\r
50#include "AliESDtrack.h"\r
51#include "AliESDtrackCuts.h"\r
52#include "AliAODTrack.h"\r
53#include "AliStack.h"\r
54#include "AliMCEvent.h"\r
55\r
56#include "AliHFEcuts.h"\r
57#include "AliHFEpid.h"\r
58#include "AliHFEpidQAmanager.h"\r
59#include "AliHFEtools.h"\r
60\r
61#include "AliCentrality.h"\r
62#include "AliEventplane.h"\r
63#include "AliAnalysisTaskHFEQA.h"\r
64#include "AliAODMCHeader.h"\r
65\r
66\r
67ClassImp(AliAnalysisTaskHFEQA)\r
68\r
69//____________________________________________________________________\r
70AliAnalysisTaskHFEQA::AliAnalysisTaskHFEQA() :\r
71 AliAnalysisTaskSE(),\r
72 fListHist(0x0), \r
73 fAODAnalysis(kFALSE),\r
74 fAODMCHeader(NULL),\r
75 fAODArrayMCInfo(NULL),\r
76 fHFECuts(0),\r
77 fPIDTPConly(0),\r
78 fPIDTOFTPC(0),\r
79 fPIDTPCTRD(0),\r
80 fPIDTPCEMCal(0),\r
81 fPIDqaTOFTPC(0),\r
82 fPIDqaTPCTRD(0),\r
83 fPIDqaTPCEMCal(0),\r
84 fCentralityEstimator("V0M"),\r
85 fCollisionSystem(3),\r
86 fTPConly(0),\r
87 fTOFTPC(0),\r
88 fTPCTRD(0),\r
89 fTPCEMCal(0)\r
90{\r
91 // Constructor\r
92 \r
93}\r
94//______________________________________________________________________________\r
95AliAnalysisTaskHFEQA:: AliAnalysisTaskHFEQA(const char *name) :\r
96 AliAnalysisTaskSE(name),\r
97 fListHist(0x0),\r
98 fAODAnalysis(kFALSE),\r
99 fAODMCHeader(NULL),\r
100 fAODArrayMCInfo(NULL),\r
101 fHFECuts(0),\r
102 fPIDTPConly(0),\r
103 fPIDTOFTPC(0),\r
104 fPIDTPCTRD(0),\r
105 fPIDTPCEMCal(0),\r
106 fPIDqaTOFTPC(0),\r
107 fPIDqaTPCTRD(0),\r
108 fPIDqaTPCEMCal(0),\r
109 fCentralityEstimator("V0M"),\r
110 fCollisionSystem(3),\r
111 fTPConly(0),\r
112 fTOFTPC(0),\r
113 fTPCTRD(0),\r
114 fTPCEMCal(0)\r
115{\r
116 //\r
117 // named ctor\r
118 //\r
119 \r
120 fPIDTPConly = new AliHFEpid("hfePidTPConly");\r
121 fPIDTOFTPC = new AliHFEpid("hfePidTOFTPC");\r
122 fPIDTPCTRD = new AliHFEpid("hfePidTPCTRD");\r
123 fPIDTPCEMCal = new AliHFEpid("hfePidTPCEMCal");\r
124\r
125 fPIDqaTOFTPC = new AliHFEpidQAmanager;\r
126 fPIDqaTPCTRD = new AliHFEpidQAmanager;\r
127 fPIDqaTPCEMCal = new AliHFEpidQAmanager;\r
128\r
129 SetPbPbAnalysis();\r
130\r
131 DefineInput(0,TChain::Class());\r
132 DefineOutput(1, TList::Class());\r
133 \r
134}\r
135//____________________________________________________________\r
136AliAnalysisTaskHFEQA::AliAnalysisTaskHFEQA(const AliAnalysisTaskHFEQA &ref):\r
137 AliAnalysisTaskSE(ref),\r
138 fListHist(NULL),\r
139 fAODAnalysis(ref.fAODAnalysis), \r
140 fAODMCHeader(ref.fAODMCHeader),\r
141 fAODArrayMCInfo(ref.fAODArrayMCInfo),\r
142 fHFECuts(NULL),\r
143 fPIDTPConly(0),\r
144 fPIDTOFTPC(0),\r
145 fPIDTPCTRD(0),\r
146 fPIDTPCEMCal(0),\r
147 fPIDqaTOFTPC(0),\r
148 fPIDqaTPCTRD(0),\r
149 fPIDqaTPCEMCal(0),\r
150 fCentralityEstimator(ref.fCentralityEstimator),\r
151 fCollisionSystem(ref.fCollisionSystem),\r
152 fTPConly(ref.fTPConly),\r
153 fTOFTPC(ref.fTOFTPC),\r
154 fTPCTRD(ref.fTPCTRD),\r
155 fTPCEMCal(ref.fTPCEMCal)\r
156{\r
157 //\r
158 // Copy Constructor\r
159 //\r
160\r
161 ref.Copy(*this);\r
162}\r
163\r
164//____________________________________________________________\r
165AliAnalysisTaskHFEQA &AliAnalysisTaskHFEQA::operator=(const AliAnalysisTaskHFEQA &ref){\r
166 //\r
167 // Assignment operator\r
168 //\r
169 if(this == &ref) \r
170 ref.Copy(*this);\r
171 return *this;\r
172}\r
173\r
174//____________________________________________________________\r
175void AliAnalysisTaskHFEQA::Copy(TObject &o) const {\r
176 // \r
177 // Copy into object o\r
178 //\r
179 AliAnalysisTaskHFEQA &target = dynamic_cast<AliAnalysisTaskHFEQA &>(o);\r
180 target.fListHist = fListHist;\r
181 target.fAODAnalysis = fAODAnalysis;\r
182 target.fAODMCHeader = fAODMCHeader;\r
183 target.fAODArrayMCInfo = fAODArrayMCInfo;\r
184 target.fHFECuts = fHFECuts;\r
185 target.fPIDTPConly = fPIDTPConly;\r
186 target.fPIDTOFTPC = fPIDTOFTPC;\r
187 target.fPIDTPCTRD = fPIDTPCTRD;\r
188 target.fPIDTPCEMCal = fPIDTPCEMCal;\r
189 target.fPIDqaTOFTPC = fPIDqaTOFTPC;\r
190 target.fPIDqaTPCTRD = fPIDqaTPCTRD;\r
191 target.fPIDqaTPCEMCal = fPIDqaTPCEMCal;\r
192 target.fCentralityEstimator = fCentralityEstimator;\r
193 target.fCollisionSystem = fCollisionSystem;\r
194 target.fTPConly = fTPConly;\r
195 target.fTOFTPC = fTOFTPC;\r
196 target.fTPCTRD = fTPCTRD;\r
197 target.fTPCEMCal = fTPCEMCal;\r
198 \r
199\r
200}\r
201//____________________________________________________________\r
202AliAnalysisTaskHFEQA::~AliAnalysisTaskHFEQA(){\r
203 //\r
204 // Destructor\r
205 //\r
206 \r
207\r
208 if(fListHist) delete fListHist;\r
209 if(fHFECuts) delete fHFECuts;\r
210 if(fPIDTPConly) delete fPIDTPConly;\r
211 if(fPIDTOFTPC) delete fPIDTOFTPC;\r
212 if(fPIDTPCTRD) delete fPIDTPCTRD;\r
213 if(fPIDTPCEMCal) delete fPIDTPCEMCal;\r
214\r
215 \r
216}\r
217//________________________________________________________________________\r
218void AliAnalysisTaskHFEQA::UserCreateOutputObjects()\r
219{\r
220\r
221 //********************\r
222 // Create histograms\r
223 //********************\r
224 AliDebug(2,"AliAnalysisTaskHFEQA: User create output objects");\r
225\r
226\r
227 // AOD or ESD\r
228 AliVEventHandler *inputHandler = dynamic_cast<AliVEventHandler *>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());\r
229 if(!TString(inputHandler->IsA()->GetName()).CompareTo("AliAODInputHandler")){\r
230 SetAODAnalysis(kTRUE);\r
231 AliDebug(2,"Put AOD analysis on");\r
232 } else {\r
233 SetAODAnalysis(kFALSE);\r
234 }\r
235\r
236 AliDebug(2,"AliAnalysisTaskHFEQA: AOD ESD");\r
237\r
238 // HFE cuts\r
239\r
240 if(!fHFECuts){\r
241 fHFECuts = new AliHFEcuts;\r
242 fHFECuts->CreateStandardCuts();\r
243 }\r
244 fHFECuts->Initialize();\r
245 if(fAODAnalysis) {\r
246 fHFECuts->SetAOD();\r
247 } \r
248\r
249 AliDebug(2,"AliAnalysisTaskHFEQA: HFE cuts");\r
250\r
251\r
252 // PIDTPConly HFE\r
253 if(!fPIDTPConly) {\r
254 fPIDTPConly =new AliHFEpid("hfePidTPC");\r
255 }\r
256 if(!fPIDTPConly->GetNumberOfPIDdetectors()) fPIDTPConly->AddDetector("TPC", 0);\r
257 fPIDTPConly->InitializePID();\r
258 fPIDTPConly->SortDetectors();\r
259\r
260 // PIDTOFTPC HFE\r
261 if(!fPIDTOFTPC) {\r
262 fPIDTOFTPC =new AliHFEpid("hfePidTOFTPC");\r
263 }\r
264 if(!fPIDTOFTPC->GetNumberOfPIDdetectors()) {\r
265 fPIDTOFTPC->AddDetector("TOF", 0);\r
266 fPIDTOFTPC->AddDetector("TPC", 1);\r
267 }\r
268 fPIDTOFTPC->InitializePID();\r
269 fPIDqaTOFTPC->Initialize(fPIDTOFTPC);\r
270 fPIDTOFTPC->SortDetectors();\r
271\r
272\r
273 // PIDTPCTRD HFE\r
274 if(!fPIDTPCTRD) {\r
275 fPIDTPCTRD =new AliHFEpid("hfePidTPCTRD");\r
276 }\r
277 if(!fPIDTPCTRD->GetNumberOfPIDdetectors()) {\r
278 fPIDTPCTRD->AddDetector("TPC", 0);\r
279 fPIDTPCTRD->AddDetector("TRD", 1);\r
280 }\r
281 fPIDTPCTRD->InitializePID();\r
282 fPIDqaTPCTRD->Initialize(fPIDTPCTRD);\r
283 fPIDTPCTRD->SortDetectors();\r
284\r
285 // PIDTPCEMCal HFE\r
286 if(!fPIDTPCEMCal) {\r
287 fPIDTPCEMCal =new AliHFEpid("hfePidTPCEMCal");\r
288 }\r
289 if(!fPIDTPCEMCal->GetNumberOfPIDdetectors()) {\r
290 fPIDTPCEMCal->AddDetector("TPC", 0);\r
291 fPIDTPCEMCal->AddDetector("EMCal", 1);\r
292 }\r
293 fPIDTPCEMCal->InitializePID();\r
294 fPIDqaTPCEMCal->Initialize(fPIDTPCEMCal);\r
295 fPIDTPCEMCal->SortDetectors();\r
296 \r
297 // Histograms\r
298 Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};\r
299 fTPConly = new TH1F("TPCOnly", "",35,&ptbinning[0]);\r
300 fTPConly->Sumw2();\r
301 fTOFTPC = new TH1F("TOFTPC", "",35,&ptbinning[0]);\r
302 fTOFTPC->Sumw2();\r
303 fTPCTRD = new TH1F("TPCTRD", "",35,&ptbinning[0]);\r
304 fTPCTRD->Sumw2();\r
305 fTPCEMCal = new TH1F("TPCEMCal", "",35,&ptbinning[0]);\r
306 fTPCEMCal->Sumw2();\r
307\r
308\r
309 // List\r
310 \r
311 fListHist = new TList();\r
312 fListHist->SetOwner();\r
313\r
314 fListHist->Add(fPIDqaTOFTPC->MakeList("HFEpidQATOFTPC"));\r
315 fListHist->Add(fPIDqaTPCTRD->MakeList("HFEpidQATPCTRD"));\r
316 fListHist->Add(fPIDqaTPCEMCal->MakeList("HFEpidQATPCEMCal"));\r
317\r
318 fListHist->Add(fTPConly);\r
319 fListHist->Add(fTOFTPC);\r
320 fListHist->Add(fTPCTRD);\r
321 fListHist->Add(fTPCEMCal);\r
322\r
323 AliDebug(2,"AliAnalysisTaskHFEQA: list");\r
324\r
325\r
326 fListHist->Print();\r
327\r
328 PostData(1, fListHist);\r
329\r
330 AliDebug(2,"AliAnalysisTaskHFEQA: post");\r
331\r
332\r
333}\r
334 \r
335//________________________________________________________________________\r
336void AliAnalysisTaskHFEQA::UserExec(Option_t */*option*/)\r
337{\r
338 //\r
339 // Loop over event\r
340 //\r
341 \r
342 Double_t binct = 11.5;\r
343\r
344 AliMCEvent *mcEvent = MCEvent();\r
345 \r
3cd4d968 346\r
347 AliDebug(2,"MC info");\r
b758ccbe 348 // MC info\r
349 Bool_t mcthere = kTRUE;\r
350 if(fAODAnalysis) {\r
351 AliAODEvent *aodE = dynamic_cast<AliAODEvent *>(fInputEvent);\r
352 if(!aodE){\r
353 AliError("No AOD Event");\r
354 return;\r
355 }\r
356 fAODMCHeader = dynamic_cast<AliAODMCHeader *>(fInputEvent->FindListObject(AliAODMCHeader::StdBranchName()));\r
357 if(!fAODMCHeader){ \r
358 mcthere = kFALSE;\r
359 }\r
360 fAODArrayMCInfo = dynamic_cast<TClonesArray *>(fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));\r
361 if(!fAODArrayMCInfo){ \r
362 mcthere = kFALSE;\r
363 }\r
364 else {\r
365 fHFECuts->SetMCEvent(aodE);\r
366 }\r
367 }\r
368 else {\r
369 AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler *>(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());\r
370 if(!mcH){\r
371 mcthere=kFALSE;\r
372 }\r
373 if(mcEvent) fHFECuts->SetMCEvent(mcEvent);\r
374 }\r
375\r
376\r
377 ////////////////////////////////////\r
378 // Number of contributors\r
379 ///////////////////////////////////\r
3cd4d968 380 AliDebug(2,"Number of contributors");\r
b758ccbe 381 Int_t ncontribVtx = 0;\r
382 if(fAODAnalysis) {\r
383 AliAODEvent *fAOD = dynamic_cast<AliAODEvent *>(fInputEvent);\r
384 if(!fAOD){\r
385 AliError("AOD Event required for AOD Analysis");\r
386 return;\r
387 } \r
388 AliAODVertex *priVtx = fAOD->GetPrimaryVertex();\r
389 if(priVtx){\r
390 ncontribVtx = priVtx->GetNContributors();\r
391 }\r
392 }\r
393 else {\r
394 AliESDEvent *fESD = dynamic_cast<AliESDEvent *>(fInputEvent);\r
395 if(!fESD){\r
396 AliError("ESD Event required for ESD Analysis");\r
397 return;\r
398 }\r
399 const AliESDVertex *priVtx = fESD->GetPrimaryVertexTracks();\r
400 if(priVtx){\r
401 ncontribVtx = priVtx->GetNContributors();\r
402 }\r
403 }\r
3cd4d968 404 AliDebug(2,Form("Number of contributors %d",ncontribVtx));\r
b758ccbe 405\r
406\r
407 /////////////////////////////////\r
408 // centrality\r
409 ////////////////////////////////\r
410\r
411 //printf("Centrality \n");\r
412 AliCentrality *centrality = fInputEvent->GetCentrality();\r
413 AliDebug(2,"Got the centrality");\r
414 Float_t cntr = 0.;\r
415 if(centrality && (! Ispp())) { \r
416 cntr = centrality->GetCentralityPercentile(fCentralityEstimator.Data());\r
417 if((0.0< cntr) && (cntr<5.0)) binct = 0.5;\r
418 if((5.0< cntr) && (cntr<10.0)) binct = 1.5;\r
419 if((10.0< cntr) && (cntr<20.0)) binct = 2.5;\r
420 if((20.0< cntr) && (cntr<30.0)) binct = 3.5;\r
421 if((30.0< cntr) && (cntr<40.0)) binct = 4.5;\r
422 if((40.0< cntr) && (cntr<50.0)) binct = 5.5;\r
423 if((50.0< cntr) && (cntr<60.0)) binct = 6.5;\r
424 if((60.0< cntr) && (cntr<70.0)) binct = 7.5;\r
425 if((70.0< cntr) && (cntr<80.0)) binct = 8.5;\r
426 if((80.0< cntr) && (cntr<90.0)) binct = 9.5;\r
427 if((90.0< cntr) && (cntr<100.0)) binct = 10.5;\r
428 if(binct > 11.0) return;\r
429 }\r
3cd4d968 430 AliDebug(2,Form("Centrality %f with %s",binct,fCentralityEstimator.Data()));\r
b758ccbe 431 \r
432 //////////////////////\r
433 // run number\r
434 //////////////////////\r
435\r
436 Int_t runnumber = fInputEvent->GetRunNumber();\r
437 AliDebug(2,Form("Run number %d",runnumber));\r
438 \r
439 if(!fPIDTPConly->IsInitialized()){\r
440 fPIDTPConly->InitializePID(runnumber);\r
441 }\r
442 if(!fPIDTOFTPC->IsInitialized()){\r
443 fPIDTOFTPC->InitializePID(runnumber);\r
444 }\r
445 if(!fPIDTPCTRD->IsInitialized()){\r
446 fPIDTPCTRD->InitializePID(runnumber);\r
447 }\r
448 if(!fPIDTPCEMCal->IsInitialized()){\r
449 fPIDTPCEMCal->InitializePID(runnumber);\r
450 }\r
451\r
452 //\r
453 fHFECuts->SetRecEvent(fInputEvent);\r
454 \r
455\r
456\r
457 //////////\r
458 // PID\r
459 //////////\r
3cd4d968 460 AliDebug(2,"PID response");\r
b758ccbe 461 AliPIDResponse *pidResponse = fInputHandler->GetPIDResponse();\r
462 if(!pidResponse){\r
463 AliDebug(2,"No PID response set");\r
464 return;\r
465 }\r
466 fPIDTPConly->SetPIDResponse(pidResponse);\r
467 fPIDTOFTPC->SetPIDResponse(pidResponse);\r
468 fPIDTPCTRD->SetPIDResponse(pidResponse);\r
469 fPIDTPCEMCal->SetPIDResponse(pidResponse);\r
470 \r
471 //////////////////\r
472 // Event cut\r
473 //////////////////\r
3cd4d968 474 AliDebug(2,"Event cut");\r
b758ccbe 475 if(!fHFECuts->CheckEventCuts("fEvRecCuts", fInputEvent)) {\r
476 AliDebug(2,"Does not pass the event cut");\r
477 PostData(1, fListHist);\r
478 return;\r
479 }\r
480 \r
481 //////////////////////////\r
482 // Loop over track\r
483 //////////////////////////\r
484 Int_t nbtracks = fInputEvent->GetNumberOfTracks();\r
3cd4d968 485 AliDebug(2,Form("Number of tracks %d",nbtracks));\r
b758ccbe 486 for(Int_t k = 0; k < nbtracks; k++){\r
487 \r
488 AliVTrack *track = (AliVTrack *) fInputEvent->GetTrack(k);\r
489 if(!track) continue;\r
490 Double_t pt = track->Pt(); \r
491\r
3cd4d968 492 AliDebug(2,"test 0\n");\r
b758ccbe 493 \r
494 // RecKine: ITSTPC cuts \r
495 if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepRecKineITSTPC + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
3cd4d968 496 AliDebug(2,"test 1\n");\r
b758ccbe 497\r
498 // RecPrim\r
499 if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepRecPrim + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
3cd4d968 500 AliDebug(2,"test 2\n");\r
b758ccbe 501\r
502 // HFEcuts: ITS layers cuts\r
503 if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsITS + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
3cd4d968 504 AliDebug(2,"test 3\n");\r
b758ccbe 505\r
506 // HFE cuts: TOF and mismatch flag\r
507 if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTOF + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
3cd4d968 508 AliDebug(2,"test 4\n");\r
b758ccbe 509\r
510 // HFE cuts: TPC PID cleanup\r
511 if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTPC + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
3cd4d968 512 AliDebug(2,"test 5\n");\r
b758ccbe 513\r
514 // HFEcuts: Nb of tracklets TRD0\r
515 if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTRD + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
3cd4d968 516 \r
b758ccbe 517 AliDebug(2,"Survived");\r
3cd4d968 518 \r
b758ccbe 519\r
520 ////////////////////////\r
521 // Apply PID\r
522 ////////////////////////\r
523 AliHFEpidObject hfetrack;\r
524 if(!fAODAnalysis) hfetrack.SetAnalysisType(AliHFEpidObject::kESDanalysis);\r
525 else hfetrack.SetAnalysisType(AliHFEpidObject::kAODanalysis);\r
526 hfetrack.SetRecTrack(track);\r
527 hfetrack.SetCentrality((Int_t)binct);\r
528 hfetrack.SetMulitplicity(ncontribVtx); // for correction\r
529 if(IsPbPb()) hfetrack.SetPbPb();\r
530 else{\r
531 if(IspPb()) hfetrack.SetpPb();\r
532 else {\r
533 hfetrack.SetPP();\r
534 //printf("pp\n");\r
535 }\r
536 }\r
537 AliDebug(2,Form("centrality %f and %d",binct,hfetrack.GetCentrality()));\r
538 \r
539 //printf("test 7\n");\r
540\r
541 // Complete PID TPC alone\r
542 if(fPIDTPConly->IsSelected(&hfetrack,0x0,"recTrackCont",0x0)) {\r
543 fTPConly->Fill(pt);\r
544 }\r
3cd4d968 545 AliDebug(2,"TPC only PID\n");\r
546 \r
b758ccbe 547 \r
548 // Complete PID TPC TOF \r
549 if(fPIDTOFTPC->IsSelected(&hfetrack,0x0,"recTrackCont",fPIDqaTOFTPC)) {\r
550 fTOFTPC->Fill(pt);\r
3cd4d968 551 AliDebug(2,"TOF TPC PID\n");\r
b758ccbe 552 }\r
553 \r
554 // Complete PID TPC TRD \r
555 if(fPIDTPCTRD->IsSelected(&hfetrack,0x0,"recTrackCont",fPIDqaTPCTRD)) {\r
556 fTPCTRD->Fill(pt);\r
557 }\r
3cd4d968 558 AliDebug(2,"TPC TRD PID\n");\r
b758ccbe 559\r
560\r
561\r
562 if(!fAODAnalysis) {\r
563 // Complete PID TPC TRD \r
564 if(fPIDTPCEMCal->IsSelected(&hfetrack,0x0,"recTrackCont",fPIDqaTPCEMCal)) {\r
565 fTPCEMCal->Fill(pt);\r
566 }\r
567 }\r
3cd4d968 568 AliDebug(2,"TPC EMCal PID\n");\r
b758ccbe 569 \r
570 \r
571 }\r
572 \r
573 PostData(1, fListHist);\r
574 \r
575}\r