in primary MC particle analysis, include in cone only charged or neutral if requested...
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskHFEemcQA.cxx
CommitLineData
824c6477 1#include "TChain.h"
2#include "TTree.h"
3#include "TH1F.h"
4#include "TCanvas.h"
76e813d0 5#include "THnSparse.h"
824c6477 6
7#include "AliAnalysisTask.h"
8#include "AliAnalysisManager.h"
9
10#include "AliESDEvent.h"
11#include "AliESDInputHandler.h"
12#include "AliESDtrackCuts.h"
824c6477 13#include "AliAODEvent.h"
14#include "AliAODHandler.h"
15
76e813d0 16#include "AliPID.h"
17#include "AliESDpid.h"
18#include "AliAODPid.h"
19#include "AliPIDResponse.h"
20#include "AliHFEcontainer.h"
21#include "AliHFEcuts.h"
22#include "AliHFEpid.h"
23#include "AliHFEpidBase.h"
24#include "AliHFEpidQAmanager.h"
25#include "AliHFEtools.h"
26#include "AliCFContainer.h"
27#include "AliCFManager.h"
28
824c6477 29#include "AliAnalysisTaskHFEemcQA.h"
30
31//QA task for EMCAL electron analysis
32
33ClassImp(AliAnalysisTaskHFEemcQA)
34 //________________________________________________________________________
35 AliAnalysisTaskHFEemcQA::AliAnalysisTaskHFEemcQA(const char *name)
36: AliAnalysisTaskSE(name),
37 fVevent(0),
38 fESD(0),
39 fAOD(0),
76e813d0 40 fpidResponse(0),
41 fFlagSparse(kFALSE),
824c6477 42 fOutputList(0),
43 fVtxZ(0),
44 fVtxX(0),
45 fVtxY(0),
46 fTrigMulti(0),
47 fHistClustE(0),
48 fEMCClsEtaPhi(0),
49 fNegTrkIDPt(0),
50 fTrkPt(0),
51 fTrketa(0),
52 fTrkphi(0),
53 fdEdx(0),
54 fTPCNpts(0),
76e813d0 55 fTPCnsig(0),
824c6477 56 fHistPtMatch(0),
57 fEMCTrkMatch(0),
58 fEMCTrkPt(0),
59 fEMCTrketa(0),
60 fEMCTrkphi(0),
61 fEMCdEdx(0),
62 fEMCTPCNpts(0),
63 fHistdEdxEop(0),
64 fHistEop(0),
65 fEleCanTPCNpts(0),
66 fEleCanTPCNCls(0),
67 fEleCanITSNCls(0),
68 fEleCanITShit(0),
69 fEleCanSPD1(0),
70 fEleCanSPD2(0),
71 fEleCanSPDBoth(0),
76e813d0 72 fEleCanSPDOr(0),
73 fSparseElectron(0),
74 fvalueElectron(0)
824c6477 75{
76 // Constructor
77
76e813d0 78 fvalueElectron = new Double_t[6];
824c6477 79 // Define input and output slots here
80 // Input slot #0 works with a TChain
81 DefineInput(0, TChain::Class());
82 // Output slot #0 id reserved by the base class for AOD
83 // Output slot #1 writes into a TH1 container
84 DefineOutput(1, TList::Class());
85}
76e813d0 86//________________________________________________________________________
87AliAnalysisTaskHFEemcQA::AliAnalysisTaskHFEemcQA()
88 : AliAnalysisTaskSE("DefaultTask_HfeEMCQA"),
89 fVevent(0),
90 fESD(0),
91 fAOD(0),
92 fpidResponse(0),
93 fFlagSparse(kFALSE),
94 fOutputList(0),
95 fVtxZ(0),
96 fVtxX(0),
97 fVtxY(0),
98 fTrigMulti(0),
99 fHistClustE(0),
100 fEMCClsEtaPhi(0),
101 fNegTrkIDPt(0),
102 fTrkPt(0),
103 fTrketa(0),
104 fTrkphi(0),
105 fdEdx(0),
106 fTPCNpts(0),
107 fTPCnsig(0),
108 fHistPtMatch(0),
109 fEMCTrkMatch(0),
110 fEMCTrkPt(0),
111 fEMCTrketa(0),
112 fEMCTrkphi(0),
113 fEMCdEdx(0),
114 fEMCTPCNpts(0),
115 fHistdEdxEop(0),
116 fHistEop(0),
117 fEleCanTPCNpts(0),
118 fEleCanTPCNCls(0),
119 fEleCanITSNCls(0),
120 fEleCanITShit(0),
121 fEleCanSPD1(0),
122 fEleCanSPD2(0),
123 fEleCanSPDBoth(0),
124 fEleCanSPDOr(0),
125 fSparseElectron(0),
126 fvalueElectron(0)
127{
128 //Default constructor
824c6477 129
76e813d0 130 fvalueElectron = new Double_t[6];
131 // Define input and output slots here
132 // Input slot #0 works with a TChain
133 DefineInput(0, TChain::Class());
134 // Output slot #0 id reserved by the base class for AOD
135 // Output slot #1 writes into a TH1 container
136 // DefineOutput(1, TH1I::Class());
137 DefineOutput(1, TList::Class());
138 //DefineOutput(3, TTree::Class());
139}
140//________________________________________________________________________
141AliAnalysisTaskHFEemcQA::~AliAnalysisTaskHFEemcQA()
142{
143 //Destructor
144 delete fOutputList;
145 delete fSparseElectron;
146 delete []fvalueElectron;
147}
824c6477 148//________________________________________________________________________
149void AliAnalysisTaskHFEemcQA::UserCreateOutputObjects()
150{
151 // Create histograms
152 // Called once
76e813d0 153 AliDebug(3, "Creating Output Objects");
154
155 /////////////////////////////////////////////////
156 //Automatic determination of the analysis mode//
157 ////////////////////////////////////////////////
158 AliVEventHandler *inputHandler = dynamic_cast<AliVEventHandler *>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
159 if(!TString(inputHandler->IsA()->GetName()).CompareTo("AliAODInputHandler")){
160 SetAODAnalysis();
161 } else {
162 SetESDAnalysis();
163 }
164 printf("Analysis Mode: %s Analysis\n", IsAODanalysis() ? "AOD" : "ESD");
824c6477 165
76e813d0 166 ////////////////
167 //Output list//
168 ///////////////
824c6477 169 fOutputList = new TList();
a68bbaf6 170 fOutputList->SetOwner();
824c6477 171
172 fVtxZ = new TH1F("fVtxZ","Z vertex position;Vtx_{z};counts",1000,-50,50);
173 fOutputList->Add(fVtxZ);
174
175 fVtxY = new TH1F("fVtxY","Y vertex position;Vtx_{y};counts",1000,-50,50);
176 fOutputList->Add(fVtxY);
177
178 fVtxX = new TH1F("fVtxX","X vertex position;Vtx_{x};counts",1000,-50,50);
179 fOutputList->Add(fVtxX);
180
76e813d0 181 fTrigMulti = new TH2F("fTrigMulti","Multiplicity distribution for different triggers; Trigger type; multiplicity",11,-1,10,2000,0,2000);
824c6477 182 fOutputList->Add(fTrigMulti);
183
184 fHistClustE = new TH1F("fHistClustE", "EMCAL cluster energy distribution; Cluster E;counts", 500, 0.0, 50.0);
185 fOutputList->Add(fHistClustE);
186
187 fEMCClsEtaPhi = new TH2F("fEMCClsEtaPhi","EMCAL cluster #eta and #phi distribution;#eta;#phi",100,-0.9,0.9,200,0,6.3);
188 fOutputList->Add(fEMCClsEtaPhi);
189
190 fNegTrkIDPt = new TH1F("fNegTrkIDPt", "p_{T} distribution of tracks with negative track id;p_{T} (GeV/c);counts", 500, 0.0, 50.0);
191 fOutputList->Add(fNegTrkIDPt);
192
193 fTrkPt = new TH1F("fTrkPt","p_{T} distribution of all tracks;p_{T} (GeV/c);counts",1000,0,100);
194 fOutputList->Add(fTrkPt);
195
196 fTrketa = new TH1F("fTrketa","All Track #eta distribution;#eta;counts",100,-1.5,1.5);
197 fOutputList->Add(fTrketa);
198
199 fTrkphi = new TH1F("fTrkphi","All Track #phi distribution;#phi;counts",100,0,6.3);
200 fOutputList->Add(fTrkphi);
201
76e813d0 202 fdEdx = new TH2F("fdEdx","All Track dE/dx distribution;p (GeV/c);dE/dx",200,0,20,500,0,160);
824c6477 203 fOutputList->Add(fdEdx);
204
205 fTPCNpts = new TH2F("fTPCNpts","All track TPC Npoints used for dE/dx calculation;p (GeV/c);N points",200,0,20,200,0.,200.);
206 fOutputList->Add(fTPCNpts);
207
76e813d0 208 fTPCnsig = new TH2F("fTPCnsig","All Track TPC Nsigma distribution;p (GeV/c);#sigma_{TPC-dE/dx}",1000,0,50,200,-10,10);
209 fOutputList->Add(fTPCnsig);
210
824c6477 211 fHistPtMatch = new TH1F("fHistPtMatch", "p_{T} distribution of tracks matched to EMCAL;p_{T} (GeV/c);counts",1000, 0.0, 100.0);
212 fOutputList->Add(fHistPtMatch);
213
214 fEMCTrkMatch = new TH2F("fEMCTrkMatch","Distance of EMCAL cluster to its closest track;#phi;z",100,-0.3,0.3,100,-0.3,0.3);
215 fOutputList->Add(fEMCTrkMatch);
216
217 fEMCTrkPt = new TH1F("fEMCTrkPt","p_{T} distribution of tracks with EMCAL cluster;p_{T} (GeV/c);counts",1000,0,100);
218 fOutputList->Add(fEMCTrkPt);
219
220 fEMCTrketa = new TH1F("fEMCTrketa","#eta distribution of tracks matched to EMCAL;#eta;counts",100,-1.5,1.5);
221 fOutputList->Add(fEMCTrketa);
222
223 fEMCTrkphi = new TH1F("fEMCTrkphi","#phi distribution of tracks matched to EMCAL;#phi;counts",100,0,6.3);
224 fOutputList->Add(fEMCTrkphi);
225
76e813d0 226 fEMCdEdx = new TH2F("fEMCdEdx","dE/dx distribution of tracks matched to EMCAL;p (GeV/c);dE/dx",200,0,20,500,0,160);
824c6477 227 fOutputList->Add(fEMCdEdx);
228
229 fEMCTPCNpts = new TH2F("fEMCTPCNpts","TPC Npoints used for dE/dx for tracks matched to EMCAL;p (GeV/c);N points",200,0,20,200,0.,200.);
230 fOutputList->Add(fEMCTPCNpts);
231
232 fHistEop = new TH2F("fHistEop", "E/p distribution;p_{T} (GeV/c);E/p", 200,0,20,60, 0.0, 3.0);
233 fOutputList->Add(fHistEop);
234
76e813d0 235 fHistdEdxEop = new TH2F("fHistdEdxEop", "E/p vs. dE/dx;E/p;dE/dx", 60, 0.0, 3.0, 500,0,160);
824c6477 236 fOutputList->Add(fHistdEdxEop);
237
238 fEleCanTPCNpts = new TH2F("fEleCanTPCNpts","TPC Npoints used for dE/dx for electron candidates;p_{T} (GeV/c);N points",200,0,20,200,0,200);
239 fOutputList->Add(fEleCanTPCNpts);
240
241 fEleCanTPCNCls = new TH2F("fEleCanTPCNCls","TPC N clusters for electron candidates;p_{T} (GeV/c);N TPC clusters",200,0,20,171,-0.5,170.5);
242 fOutputList->Add(fEleCanTPCNCls);
243
244 fEleCanITSNCls = new TH2F("fEleCanITSNCls","ITS N clusters for electron candidates;p_{T} (GeV/c);N ITS clusters",200,0,20,8,-0.5,7.5);
245 fOutputList->Add(fEleCanITSNCls);
246
247 fEleCanITShit = new TH1F("fEleCanITShit","ITS hit map;ITS layer;counts",7,-0.5,6.5);
248 fOutputList->Add(fEleCanITShit);
249
250 fEleCanSPD1 = new TH2F("fEleCanSPD1","Hit on SPD layer 1;p_{T} (GeV/c);Hit",200,0,20,1,0,1);
251 fOutputList->Add(fEleCanSPD1);
252
253 fEleCanSPD2 = new TH2F("fEleCanSPD2","Hit on SPD layer 2;p_{T} (GeV/c);Hit",200,0,20,1,0,1);
254 fOutputList->Add(fEleCanSPD2);
255
256 fEleCanSPDBoth = new TH2F("fEleCanSPDBoth","Tracks with hits on both SPD layer;p_{T} (GeV/c);Hit",200,0,20,1,0,1);
257 fOutputList->Add(fEleCanSPDBoth);
258
259 fEleCanSPDOr = new TH2F("fEleCanSPDOr","Tracks with hits on both SPD layer;p_{T} (GeV/c);Hit",200,0,20,1,0,1);
260 fOutputList->Add(fEleCanSPDOr);
261
76e813d0 262 Int_t bins[6]={6,500,200,100,100,100}; //trigger, pt, TPCnsig, E/p, M20, M02
263 Double_t xmin[6]={-1.5,0,-10,0,0,0};
264 Double_t xmax[6]={4.5,25,10,2,2,2};
265 fSparseElectron = new THnSparseD ("Electron","Electron",6,bins,xmin,xmax);
266 fOutputList->Add(fSparseElectron);
267
824c6477 268 PostData(1,fOutputList);
269}
270
271//________________________________________________________________________
272void AliAnalysisTaskHFEemcQA::UserExec(Option_t *)
273{
274 // Main loop
275 // Called for each event
276 // Post output data.
277
278 UInt_t evSelMask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
279
280 fVevent = dynamic_cast<AliVEvent*>(InputEvent());
281 if (!fVevent) {
282 printf("ERROR: fVEvent not available\n");
283 return;
284 }
285
286 fESD = dynamic_cast<AliESDEvent*>(InputEvent());
287 if (fESD) {
76e813d0 288 // printf("fESD available\n");
824c6477 289 //return;
290 }
291
76e813d0 292 ////////////////////
293 //cuts initialised//
294 ///////////////////
824c6477 295 AliESDtrackCuts* esdTrackCutsH = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE);
296 esdTrackCutsH->SetMaxDCAToVertexXY(2.4);
297 esdTrackCutsH->SetMaxDCAToVertexZ(3.2);
298 esdTrackCutsH->SetDCAToVertex2D(kTRUE);
299
300 fAOD = dynamic_cast<AliAODEvent*>(InputEvent());
301 if (fAOD) {
76e813d0 302 // printf("fAOD available\n");
824c6477 303 //return;
304 }
305
76e813d0 306 ///////////////////
307 //PID initialised//
308 //////////////////
309 fpidResponse = fInputHandler->GetPIDResponse();
310
311 ////////////////
312 //Event vertex//
313 ///////////////
314 Int_t ntracks;
824c6477 315 ntracks = fVevent->GetNumberOfTracks();
316 printf("There are %d tracks in this event\n",ntracks);
824c6477 317
76e813d0 318 Double_t Zvertex = -100, Xvertex = -100, Yvertex = -100;
824c6477 319 const AliVVertex *pVtx = fVevent->GetPrimaryVertex();
76e813d0 320 Double_t NcontV = pVtx->GetNContributors();
321 if(NcontV<2)return;
322
824c6477 323 Zvertex = pVtx->GetZ();
324 Yvertex = pVtx->GetY();
325 Xvertex = pVtx->GetX();
326 fVtxZ->Fill(Zvertex);
327 fVtxX->Fill(Xvertex);
328 fVtxY->Fill(Yvertex);
76e813d0 329
330 /////////////////
331 //trigger check//
332 /////////////////
824c6477 333 TString firedTrigger;
334 TString TriggerEG1("EG1");
335 TString TriggerEG2("EG2");
336 fVevent->GetFiredTriggerClasses();
824c6477 337
338 Bool_t EG1tr = kFALSE;
339 Bool_t EG2tr = kFALSE;
340
341 if(firedTrigger.Contains(TriggerEG1))EG1tr = kTRUE;
342 if(firedTrigger.Contains(TriggerEG2))EG2tr = kTRUE;
824c6477 343
76e813d0 344 Int_t trigger = -1;
824c6477 345 if (fAOD){
346 Double_t multiplicity=fAOD->GetHeader()->GetRefMultiplicity();
347 fTrigMulti->Fill(-0.5, multiplicity);
348 if(evSelMask & AliVEvent::kAny) fTrigMulti->Fill(0.5, multiplicity);
349 if(evSelMask & AliVEvent::kMB) fTrigMulti->Fill(1.5, multiplicity);
76e813d0 350 if(evSelMask & AliVEvent::kINT7) fTrigMulti->Fill(2.5, multiplicity);
351 if(evSelMask & AliVEvent::kINT8) fTrigMulti->Fill(3.5, multiplicity);
352 if(evSelMask & AliVEvent::kEMC1) fTrigMulti->Fill(4.5, multiplicity);
353 if(evSelMask & AliVEvent::kEMC7) fTrigMulti->Fill(5.5, multiplicity);
354 if(evSelMask & AliVEvent::kEMC8) fTrigMulti->Fill(6.5, multiplicity);
355 if(evSelMask & AliVEvent::kEMCEJE) fTrigMulti->Fill(7.5, multiplicity);
356 if(evSelMask & AliVEvent::kEMCEGA) fTrigMulti->Fill(8.5, multiplicity);
357 if(evSelMask & AliVEvent::kEMCEGA & EG2tr) fTrigMulti->Fill(9.5, multiplicity);
358
359 if((evSelMask & AliVEvent::kMB) || (evSelMask & AliVEvent::kINT7) || (evSelMask & AliVEvent::kINT8)) trigger =0;
360 if(evSelMask & AliVEvent::kEMC1) trigger =1;
361 if(evSelMask & AliVEvent::kEMC8) trigger =2;
362 if(evSelMask & AliVEvent::kEMCEJE) trigger =3;
363 if(evSelMask & AliVEvent::kEMCEGA) trigger =4;
824c6477 364 }
365
76e813d0 366 ////////////////////
367 //event selection//
368 ///////////////////
824c6477 369 if(fabs(Zvertex>10.0))return;
76e813d0 370
371 /////////////////////////////
372 //EMCAL cluster information//
373 ////////////////////////////
374 Int_t Nclust = 0;
824c6477 375 Nclust = fVevent->GetNumberOfCaloClusters();
824c6477 376 for(Int_t icl=0; icl<Nclust; icl++)
377 {
378 AliVCluster *clust = 0x0;
379 clust = fVevent->GetCaloCluster(icl);
824c6477 380 if(clust && clust->IsEMCAL())
381 {
76e813d0 382 Double_t clustE = clust->E();
383 Float_t emcx[3]; // cluster pos
824c6477 384 clust->GetPosition(emcx);
385 TVector3 clustpos(emcx[0],emcx[1],emcx[2]);
76e813d0 386 Double_t emcphi = clustpos.Phi();
387 Double_t emceta = clustpos.Eta();
824c6477 388 fHistClustE->Fill(clustE);
389 fEMCClsEtaPhi->Fill(emceta,emcphi);
390 }
391 }
392
76e813d0 393 /////////////////////////////////
394 //Look for kink mother for AOD//
395 /////////////////////////////////
396 Int_t numberofvertices = fAOD->GetNumberOfVertices();
397 Double_t listofmotherkink[numberofvertices];
398 Int_t numberofmotherkink = 0;
399 if(IsAODanalysis()){
400 for(Int_t ivertex=0; ivertex < numberofvertices; ivertex++) {
401 AliAODVertex *aodvertex = fAOD->GetVertex(ivertex);
402 if(!aodvertex) continue;
403 if(aodvertex->GetType()==AliAODVertex::kKink) {
404 AliAODTrack *mother = (AliAODTrack *) aodvertex->GetParent();
405 if(!mother) continue;
406 Int_t idmother = mother->GetID();
407 listofmotherkink[numberofmotherkink] = idmother;
408 numberofmotherkink++;
409 }
410 }
411 }
412
413 ///////////////
414 //Track loop//
415 ///////////////
824c6477 416 for (Int_t iTracks = 0; iTracks < ntracks; iTracks++) {
76e813d0 417
824c6477 418 AliVParticle* Vtrack = fVevent->GetTrack(iTracks);
419 if (!Vtrack) {
420 printf("ERROR: Could not receive track %d\n", iTracks);
421 continue;
422 }
423 AliVTrack *track = dynamic_cast<AliVTrack*>(Vtrack);
424 AliESDtrack *etrack = dynamic_cast<AliESDtrack*>(Vtrack);
425 AliAODTrack *atrack = dynamic_cast<AliAODTrack*>(Vtrack);
426
76e813d0 427 ////////////////////
428 //Apply track cuts//
429 ////////////////////
824c6477 430 if(fAOD)
431 if(!atrack->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)) continue;
432
433 if(fESD)
434 if(!esdTrackCutsH->AcceptTrack(etrack))continue;
435
76e813d0 436 if(IsAODanalysis()){
437 Bool_t kinkmotherpass = kTRUE;
438 for(Int_t kinkmother = 0; kinkmother < numberofmotherkink; kinkmother++) {
439 if(track->GetID() == listofmotherkink[kinkmother]) {
440 kinkmotherpass = kFALSE;
441 continue;
442 }
443 }
444 if(!kinkmotherpass) continue;
445 }
446 else{
447 if(etrack->GetKinkIndex(0) != 0) continue;
448 }
449
450 ////////////////////
451 //Track properties//
452 ///////////////////
453 Double_t dEdx =-999, fTPCnSigma=-999;
454 dEdx = track->GetTPCsignal();
455 fTPCnSigma = fpidResponse->NumberOfSigmasTPC(track, AliPID::kElectron);
824c6477 456 if(track->GetID()<0) fNegTrkIDPt->Fill(track->Pt());
457 fTrkPt->Fill(track->Pt());
458 fTrketa->Fill(track->Eta());
459 fTrkphi->Fill(track->Phi());
460 fdEdx->Fill(track->P(),dEdx);
461 fTPCNpts->Fill(track->P(),track->GetTPCsignalN());
76e813d0 462 fTPCnsig->Fill(track->P(),fTPCnSigma);
824c6477 463
76e813d0 464 ///////////////////////////
465 //Track matching to EMCAL//
466 //////////////////////////
467 Int_t EMCalIndex = -1;
824c6477 468 EMCalIndex = track->GetEMCALcluster();
469 if(EMCalIndex < 0) continue;
470 fHistPtMatch->Fill(track->Pt());
471
76e813d0 472 AliVCluster *clustMatch = (AliVCluster*)fVevent->GetCaloCluster(EMCalIndex);
473 if(clustMatch && clustMatch->IsEMCAL())
824c6477 474 {
76e813d0 475 /////////////////////////////////////////////
476 //Properties of tracks matched to the EMCAL//
477 /////////////////////////////////////////////
824c6477 478 fEMCTrkMatch->Fill(clustMatch->GetTrackDx(),clustMatch->GetTrackDz());
824c6477 479 fEMCTrkPt->Fill(track->Pt());
480 fEMCTrketa->Fill(track->Eta());
481 fEMCTrkphi->Fill(track->Phi());
482 fEMCdEdx->Fill(track->P(),dEdx);
483 fEMCTPCNpts->Fill(track->P(),track->GetTPCsignalN());
484
485 //E/p distribution
76e813d0 486 Double_t clustMatchE = clustMatch->E();
487 Double_t eop = -1.0;
824c6477 488 if(track->P()>0)eop = clustMatchE/track->P();
489
76e813d0 490 if(track->Pt()>1.0)fHistdEdxEop->Fill(eop,dEdx);
824c6477 491 fHistEop->Fill(track->Pt(),eop);
492
76e813d0 493 //EID THnsparse
494 fvalueElectron[0] = trigger;
495 fvalueElectron[1] = track->Pt();
496 fvalueElectron[2] = fTPCnSigma;
497 fvalueElectron[3] = eop;
498 fvalueElectron[4] = clustMatch->GetM20();
499 fvalueElectron[5] = clustMatch->GetM02();
500
501 cout << "flag for sparse: " << GetElecIDsparse() <<endl;
502 if(fFlagSparse){
503 cout << "filling sparse"<<endl;
504 fSparseElectron->Fill(fvalueElectron);
505 }
506
507 ////////////////////////////////////////////////
508 //Track properties of EMCAL electron cadidates//
509 ///////////////////////////////////////////////
824c6477 510 if(eop>0.8 and eop<1.2){
511 fEleCanTPCNpts->Fill(track->Pt(),track->GetTPCsignalN());
512 fEleCanTPCNCls->Fill(track->Pt(),track->GetTPCNcls());
513
514 Int_t fITSncls=0;
515 for(Int_t l=0;l<6;l++) {
516 if(TESTBIT(track->GetITSClusterMap(),l)) {
517 fEleCanITShit->Fill(l);
518 if(l==0) fEleCanSPD1->Fill(track->Pt(),0.5);
519 if(l==1) fEleCanSPD2->Fill(track->Pt(),0.5);
520 if(l==0 && l==1) fEleCanSPDBoth->Fill(track->Pt(),0.5);
521 if(l==0 || l==1) fEleCanSPDOr->Fill(track->Pt(),0.5);
522 fITSncls++;
523 }
524 }
525 fEleCanITSNCls->Fill(track->Pt(),fITSncls++);
526 }
527 }
528 } //track loop
529
530 PostData(1, fOutputList);
531}
532//________________________________________________________________________
533void AliAnalysisTaskHFEemcQA::Terminate(Option_t *)
534{
535 // Draw result to the screen
536 // Called once at the end of the query
537
538 fOutputList = dynamic_cast<TList*> (GetOutputData(1));
539 if (!fOutputList) {
540 printf("ERROR: Output list not available\n");
541 return;
542 }
543
544}