AliPhysics  master (3d17d9d)
AliAnalysisTaskSEHFQA.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 /* $Id$ */
17 
19 //
20 // AliAnalysisTaskSE for HF quality assurance
21 //
22 // Author: Chiara Bianchin, chiara.bianchin@pd.infn.it
24 
25 #include <Riostream.h>
26 #include <TClonesArray.h>
27 #include <TCanvas.h>
28 #include <TList.h>
29 #include <TH1F.h>
30 #include <TH2F.h>
31 #include <TH3F.h>
32 #include <TProfile2D.h>
33 #include <TDatabasePDG.h>
34 
35 #include <AliAnalysisDataSlot.h>
36 #include <AliAnalysisDataContainer.h>
37 #include "AliAnalysisManager.h"
38 #include "AliESDtrack.h"
39 #include "AliESDVertex.h"
40 #include "AliVertexerTracks.h"
41 #include "AliPID.h"
42 #include "AliPIDResponse.h"
43 #include "AliTPCPIDResponse.h"
44 #include "AliAODHandler.h"
45 #include "AliAODEvent.h"
46 #include "AliAODVertex.h"
47 #include "AliAODTrack.h"
48 #include "AliAODMCParticle.h"
49 #include "AliAODMCHeader.h"
51 #include "AliAODRecoCascadeHF.h"
52 #include "AliAnalysisVertexingHF.h"
53 #include "AliAnalysisTaskSE.h"
54 #include "AliCounterCollection.h"
55 #include "AliRDHFCuts.h"
57 #include "AliRDHFCutsD0toKpipipi.h"
58 #include "AliRDHFCutsDstoKKpi.h"
60 #include "AliRDHFCutsD0toKpi.h"
61 #include "AliRDHFCutsLctopKpi.h"
62 #include "AliRDHFCutsLctoV0.h"
63 #include "AliVertexingHFUtils.h"
64 #include "AliInputEventHandler.h"
65 #include "AliMultSelection.h"
66 
67 //#include "AliTRDTriggerAnalysis.h"
68 
69 #include "AliAnalysisTaskSEHFQA.h"
70 
71 using std::cout;
72 using std::endl;
73 
74 
76 ClassImp(AliAnalysisTaskSEHFQA);
78 
79 //____________________________________________________________________________
80 
82  , fOutputEntries(0x0)
83  , fOutputPID(0x0)
84  , fOutputTrack(0x0)
85  , fOutputCounters(0x0)
86  , fOutputCheckCentrality(0x0)
87  , fOutputEvSelection(0x0)
88  , fDecayChannel(AliAnalysisTaskSEHFQA::kD0toKpi)
89  , fCuts(0x0)
90  , fEstimator(AliRDHFCuts::kCentTRK)
91  , fReadMC(kFALSE)
92  , fSimpleMode(kFALSE)
93  , fUseSelectionBit(kTRUE)
94  , fOnOff()
95  , fFillDistrTrackEffChecks(kFALSE)
96  , fAODProtection(1)
97  , fHisNentries(0)
98  , fHisNentriesSelBit(0)
99  , fHisTOFflags(0)
100  , fHisTOFsig(0)
101  , fHisTOFstartTimeMask(0)
102  , fHisTOFstartTimeRes(0)
103  , fHisTOFstartTimeDistrib(0)
104  , fHisTOFtime(0)
105  , fHisTOFtimeKaonHyptime(0)
106  , fHisTOFtimeKaonHyptimeAC(0)
107  , fHisTOFsigmaKSigPid(0)
108  , fHisTOFsigmaPionSigPid(0)
109  , fHisTOFsigmaProtonSigPid(0)
110  , fHisTOFsigPid3sigPion(0)
111  , fHisTOFsigPid3sigKaon(0)
112  , fHisTOFsigPid3sigProton(0)
113  , fHisTPCsig(0)
114  , fHisTPCsigvsp(0)
115  , fHisTPCsigvspAC(0)
116  , fHisTPCsigmaK(0)
117  , fHisTPCsigmaPion(0)
118  , fHisTPCsigmaProton(0)
119  , fHisTPCsigNvsPtAllTracks(0)
120  , fHisTPCsigNvsPhiAllTracks(0)
121  , fHisTPCsigNvsEtaAllTracks(0)
122  , fHisTPCsigNvsPtDaughters(0)
123  , fHisTPCsigNvsPhiDaughters(0)
124  , fHisTPCsigNvsEtaDaughters(0)
125  , fHisTOFsigmaMCKSigPid(0)
126  , fHisTOFsigmaMCPionSigPid(0)
127  , fHisTOFsigmaMCProtonSigPid(0)
128  , fHisTPCsigmaMCK(0)
129  , fHisTPCsigmaMCPion(0)
130  , fHisTPCsigmaMCProton(0)
131  , fHisnClsITS(0)
132  , fHisnClsITSselTr(0)
133  , fHisnClsITSSA(0)
134  , fHisnClsITSSAspdAny(0)
135  , fHisnClsITSSAspdIn(0)
136  , fHisnClsITSSAspdOut(0)
137  , fHisnLayerITS(0)
138  , fHisnLayerITSselTr(0)
139  , fHisnLayerITSsa(0)
140  , fHisnClsSPD(0)
141  , fHisptGoodTr(0)
142  , fHisptGoodTrFromDaugh(0)
143  , fHisptGoodTrFromDaugh_filt(0)
144  , fHisdistrGoodTr(0)
145  , fHisdistrSelTr(0)
146  , fHisd0dau(0)
147  , fHisd0dau_filt(0)
148  , fHisd0dauphi(0)
149  , fHisd0dauphi_filt(0)
150  , fHisd0zdau(0)
151  , fHisd0zdau_filt(0)
152  , fHisd0zdauphi(0)
153  , fHisd0zdauphi_filt(0)
154  , fHisd0TracksSPDin(0)
155  , fHisd0TracksSPDany(0)
156  , fHisd0TracksFilterBit4(0)
157  , fHisd0TracksTPCITSSPDany(0)
158  , fHisPtDaughters(0)
159  , fHisPhiDaughters(0)
160  , fHisEtaDaughters(0)
161  , fHisEtavsPhiDaughters(0)
162  , fHisNTPCclsvsPtDaughters(0)
163  , fHisNTPCclsvsPhiDaughters(0)
164  , fHisNTPCclsvsEtaDaughters(0)
165  , fHisNTPCCrossedRowsvsPtDaughters(0)
166  , fHisNTPCCrossedRowsvsPhiDaughters(0)
167  , fHisNTPCCrossedRowsvsEtaDaughters(0)
168  , fHisRatioCRowsOverFclsvsPtDaughters(0)
169  , fHisRatioCRowsOverFclsvsPhiDaughters(0)
170  , fHisRatioCRowsOverFclsvsEtaDaughters(0)
171  , fHisNITSclsvsPtDaughters(0)
172  , fHisNITSclsvsPhiDaughters(0)
173  , fHisNITSclsvsEtaDaughters(0)
174  , fHisSPDclsDaughters(0)
175  , fHisPtAllTracks(0)
176  , fHisPhiAllTracks(0)
177  , fHisEtaAllTracks(0)
178  , fHisEtavsPhiAllTracks(0)
179  , fHisNTPCclsvsPtAllTracks(0)
180  , fHisNTPCclsvsPhiAllTracks(0)
181  , fHisNTPCclsvsEtaAllTracks(0)
182  , fHisNTPCCrossedRowsvsPtAllTracks(0)
183  , fHisNTPCCrossedRowsvsPhiAllTracks(0)
184  , fHisNTPCCrossedRowsvsEtaAllTracks(0)
185  , fHisRatioCRowsOverFclsvsPtAllTracks(0)
186  , fHisRatioCRowsOverFclsvsPhiAllTracks(0)
187  , fHisRatioCRowsOverFclsvsEtaAllTracks(0)
188  , fHisNITSclsvsPtAllTracks(0)
189  , fHisNITSclsvsPhiAllTracks(0)
190  , fHisNITSclsvsEtaAllTracks(0)
191  , fHisSPDclsAllTracks(0)
192  , fHisdistrFakeTr(0)
193  , fHisd0f(0)
194  , fHisd0f_filt(0)
195  , fHisptFakeTr(0)
196  , fHisptFakeTrFromDaugh(0)
197  , fHisptFakeTrFromDaughFilt(0)
198  , fHisNtracklets(0)
199  , fHisNtracklets01(0)
200  , fHisNtracklets01AllEv(0)
201  , fHisMult(0)
202  , fHisMultFBit4(0)
203  , fHisMultComb05(0)
204  , fHisMultComb08(0)
205  , fHisNtrackletsIn(0)
206  , fHisMultIn(0)
207  , fHisNtrackletsOut(0)
208  , fHisMultOut(0)
209  , fHisMultvsPercentile(0)
210  , fHisntrklvsPercentile(0)
211  , fHisntrklvsPercentile01(0)
212  , fHisntrklvsPercentile01AllEv(0)
213  , fHisnTPCTracksvsPercentile(0)
214  , fHisnTPCITSTracksvsPercentile(0)
215  , fHisnTPCITS1SPDTracksvsPercentile(0)
216  , fHisStdEstimSignalPercentile(0)
217  , fHisStdEstimSignalNtrackletsIn(0)
218  , fHisStdEstimSignal(0)
219  , fHisStdPercentileSecondPercentile(0)
220  , fHisStdSignalSecondSignal(0)
221  , fHisStdPercentileOldFrwPercentile(0)
222  , fHisStdPercentileOldFrwPercentileDev(0)
223  , fHisxvtx(0)
224  , fHisyvtx(0)
225  , fHiszvtx(0)
226  , fHisxvtxSelEv(0)
227  , fHisyvtxSelEv(0)
228  , fHiszvtxSelEv(0)
229  , fHisxvtxSelEvWithD(0)
230  , fHisyvtxSelEvWithD(0)
231  , fHiszvtxSelEvWithD(0)
232  , fHisWhichVert(0)
233  , fHisWhichVertSelEv(0)
234  , fHisTrigCent(0)
235  , fHisTrigMul(0)
236  , fHisTrigCentSel(0)
237  , fHisTrigMulSel(0)
238  , fHisWhyEvRejected(0)
239  , fHisnClsITSvsNtrackletsSel(0)
240  , fHiszvtxvsSPDzvtx(0)
241  , fHiszvtxvsSPDzvtxSel(0)
242  , fHiszvtxvsSPDzvtxSelWithD(0)
243 {
245  fOnOff[0]=kTRUE;
246  fOnOff[1]=kTRUE;
247  fOnOff[2]=kTRUE;
248  fOnOff[3]=kTRUE;
249 
250 }
251 
252 //____________________________________________________________________________
254  AliAnalysisTaskSE(name)
255  , fOutputEntries(0x0)
256  , fOutputPID(0x0)
257  , fOutputTrack(0x0)
258  , fOutputCounters(0x0)
260  , fOutputEvSelection(0x0)
261  , fDecayChannel(ch)
262  , fCuts(0x0)
263  , fEstimator(AliRDHFCuts::kCentTRK)
264  , fReadMC(kFALSE)
265  , fSimpleMode(kFALSE)
266  , fUseSelectionBit(kTRUE)
267  , fOnOff()
268  , fFillDistrTrackEffChecks(kFALSE)
269  , fAODProtection(1)
270  , fHisNentries(0)
271  , fHisNentriesSelBit(0)
272  , fHisTOFflags(0)
273  , fHisTOFsig(0)
277  , fHisTOFtime(0)
286  , fHisTPCsig(0)
287  , fHisTPCsigvsp(0)
288  , fHisTPCsigvspAC(0)
289  , fHisTPCsigmaK(0)
290  , fHisTPCsigmaPion(0)
291  , fHisTPCsigmaProton(0)
301  , fHisTPCsigmaMCK(0)
302  , fHisTPCsigmaMCPion(0)
304  , fHisnClsITS(0)
305  , fHisnClsITSselTr(0)
306  , fHisnClsITSSA(0)
308  , fHisnClsITSSAspdIn(0)
310  , fHisnLayerITS(0)
311  , fHisnLayerITSselTr(0)
312  , fHisnLayerITSsa(0)
313  , fHisnClsSPD(0)
314  , fHisptGoodTr(0)
317  , fHisdistrGoodTr(0)
318  , fHisdistrSelTr(0)
319  , fHisd0dau(0)
320  , fHisd0dau_filt(0)
321  , fHisd0dauphi(0)
322  , fHisd0dauphi_filt(0)
323  , fHisd0zdau(0)
324  , fHisd0zdau_filt(0)
325  , fHisd0zdauphi(0)
326  , fHisd0zdauphi_filt(0)
327  , fHisd0TracksSPDin(0)
328  , fHisd0TracksSPDany(0)
331  , fHisPtDaughters(0)
332  , fHisPhiDaughters(0)
333  , fHisEtaDaughters(0)
348  , fHisPtAllTracks(0)
349  , fHisPhiAllTracks(0)
350  , fHisEtaAllTracks(0)
365  , fHisdistrFakeTr(0)
366  , fHisd0f(0)
367  , fHisd0f_filt(0)
368  , fHisptFakeTr(0)
371  , fHisNtracklets(0)
372  , fHisNtracklets01(0)
374  , fHisMult(0)
375  , fHisMultFBit4(0)
376  , fHisMultComb05(0)
377  , fHisMultComb08(0)
378  , fHisNtrackletsIn(0)
379  , fHisMultIn(0)
380  , fHisNtrackletsOut(0)
381  , fHisMultOut(0)
391  , fHisStdEstimSignal(0)
396  , fHisxvtx(0)
397  , fHisyvtx(0)
398  , fHiszvtx(0)
399  , fHisxvtxSelEv(0)
400  , fHisyvtxSelEv(0)
401  , fHiszvtxSelEv(0)
402  , fHisxvtxSelEvWithD(0)
403  , fHisyvtxSelEvWithD(0)
404  , fHiszvtxSelEvWithD(0)
405  , fHisWhichVert(0)
406  , fHisWhichVertSelEv(0)
407  , fHisTrigCent(0)
408  , fHisTrigMul(0)
409  , fHisTrigCentSel(0)
410  , fHisTrigMulSel(0)
411  , fHisWhyEvRejected(0)
413  , fHiszvtxvsSPDzvtx(0)
416 {
418 
419  //SetCutObject(cuts);
420  fCuts=cuts;
421 
422  fOnOff[0]=kTRUE;
423  fOnOff[1]=kTRUE;
424  fOnOff[2]=kTRUE;
425  fOnOff[3]=kTRUE;
426 
427 
428  // Output slot #1 writes into a TList container (number of events)
429  DefineOutput(1,TList::Class());
430  // Output slot #2 writes into a TList container (PID)
431  if (fOnOff[1]) DefineOutput(2,TList::Class()); //My private output
432  // Output slot #3 writes into a TList container (Tracks)
433  if (fOnOff[0]) DefineOutput(3,TList::Class()); //My private output
434  // Output slot #4 writes into a AliRDHFCuts container (cuts)
435  switch(fDecayChannel){
436  case 0:
437  DefineOutput(4,AliRDHFCutsDplustoKpipi::Class()); //My private output
438  break;
439  case 1:
440  DefineOutput(4,AliRDHFCutsD0toKpi::Class()); //My private output
441  break;
442  case 2:
443  DefineOutput(4,AliRDHFCutsDStartoKpipi::Class()); //My private output
444  break;
445  case 3:
446  DefineOutput(4,AliRDHFCutsDstoKKpi::Class()); //My private output
447  break;
448  case 4:
449  DefineOutput(4,AliRDHFCutsD0toKpipipi::Class()); //My private output
450  break;
451  case 5:
452  DefineOutput(4,AliRDHFCutsLctopKpi::Class()); //My private output
453  break;
454  case kLambdactoV0:
455  DefineOutput(4,AliRDHFCutsLctoV0::Class()); //My private output
456  break;
457  }
458  if (fOnOff[2]) {
459  // Output slot #5 writes into a TList container (AliCounterCollection)
460  DefineOutput(5,TList::Class()); //My private output
461  // Output slot #6 writes into a TList container (TH1F)
462  DefineOutput(6,TList::Class()); //My private output
463  }
464 
465  if(fOnOff[3]) DefineOutput(7,TList::Class()); //My private output
466 
467 }
468 
469 //___________________________________________________________________________
471 {
473 
474  delete fOutputEntries;
475 
476  delete fOutputPID;
477 
478  delete fOutputTrack;
479 
480  delete fOutputCounters;
481 
482  delete fOutputCheckCentrality;
483 
484  delete fOutputEvSelection;
485 
486 }
487 
488 //___________________________________________________________________________
490 
492  if(fDebug > 1) printf("AnalysisTaskSEHFQA::Init() \n");
493  AliRDHFCuts *copycut = 0x0;
494 
495  switch(fDecayChannel){
496  case 0:
497  {
498  copycut=new AliRDHFCutsDplustoKpipi(*(static_cast<AliRDHFCutsDplustoKpipi*>(fCuts)));
499  }
500  break;
501  case 1:
502  {
503  copycut=new AliRDHFCutsD0toKpi(*(static_cast<AliRDHFCutsD0toKpi*>(fCuts)));
504  }
505  break;
506  case 2:
507  {
508  copycut=new AliRDHFCutsDStartoKpipi(*(static_cast<AliRDHFCutsDStartoKpipi*>(fCuts)));
509  }
510  break;
511  case 3:
512  {
513  copycut=new AliRDHFCutsDstoKKpi(*(static_cast<AliRDHFCutsDstoKKpi*>(fCuts)));
514  }
515  break;
516  case 4:
517  {
518  copycut=new AliRDHFCutsD0toKpipipi(*(static_cast<AliRDHFCutsD0toKpipipi*>(fCuts)));
519  }
520  break;
521  case 5:
522  {
523  copycut=new AliRDHFCutsLctopKpi(*(static_cast<AliRDHFCutsLctopKpi*>(fCuts)));
524  }
525  break;
526  case kLambdactoV0:
527  {
528  copycut=new AliRDHFCutsLctoV0(*(static_cast<AliRDHFCutsLctoV0*>(fCuts)));
529  }
530  break;
531  default:
532  AliFatal("Bad initialization for the decay channe - Exiting...");
533  break;
534  }
535 
536  const char* nameoutput=GetOutputSlot(4)->GetContainer()->GetName();
537  if (copycut){
538  copycut->SetName(nameoutput);
539 
540  // Post the data
541  PostData(4,copycut);
542  }else{
543  AliFatal("Failing initializing AliRDHFCuts object - Exiting...");
544  }
545 
546  return;
547 
548 }
549 
550 //___________________________________________________________________________
552 {
553 
555  if(fDebug > 1) printf("AnalysisTaskSEHFQA::UserCreateOutputObjects() \n");
556 
557  //count events
558  fOutputEntries=new TList();
559  fOutputEntries->SetOwner();
560  fOutputEntries->SetName(GetOutputSlot(1)->GetContainer()->GetName());
561 
562 
563  TString hnameEntries="hNentries";
564  fHisNentries=new TH1F(hnameEntries.Data(), "Counts the number of events", 15,-0.5,14.5);
565  fHisNentries->GetXaxis()->SetBinLabel(1,"nEventsRead");
566  fHisNentries->GetXaxis()->SetBinLabel(2,"nEvents Matched dAOD");
567  fHisNentries->GetXaxis()->SetBinLabel(3,"Mismatched dAOD (Event numbers)");
568  fHisNentries->GetXaxis()->SetBinLabel(4,"Mismatched dAOD (TProcessID)");
569  fHisNentries->GetXaxis()->SetBinLabel(5,"Mismatched Old New Centrality");
570  fHisNentries->GetXaxis()->SetBinLabel(6,"nEventsAnal");
571  fHisNentries->GetXaxis()->SetBinLabel(7,"Pile-up Rej");
572  fHisNentries->GetXaxis()->SetBinLabel(8,"No VertexingHF");
573  fHisNentries->GetXaxis()->SetBinLabel(9,"nCandidates(AnCuts)");
574  fHisNentries->GetXaxis()->SetBinLabel(10,"EventsWithGoodVtx");
575  fHisNentries->GetXaxis()->SetBinLabel(11,"N candidates");
576  if(fReadMC){
577  fHisNentries->GetXaxis()->SetBinLabel(12,"MC Cand from c");
578  fHisNentries->GetXaxis()->SetBinLabel(13,"MC Cand from b");
579  fHisNentries->GetXaxis()->SetBinLabel(14,"N fake Trks");
580  fHisNentries->GetXaxis()->SetBinLabel(15,"N true Trks");
581  }
582 
583  fHisNentries->GetXaxis()->SetNdivisions(1,kFALSE);
584 
585  hnameEntries="HasSelBit";
586  fHisNentriesSelBit=new TH2F(hnameEntries.Data(), "Counts the number of events with SelectionBit", 5,0.,5.,100,0.,30.);
587  fHisNentriesSelBit->GetXaxis()->SetBinLabel(1,"Dplus");
588  fHisNentriesSelBit->GetXaxis()->SetBinLabel(2,"Ds");
589  fHisNentriesSelBit->GetXaxis()->SetBinLabel(3,"LcKpi");
590  fHisNentriesSelBit->GetXaxis()->SetBinLabel(4,"D0toKpi");
591  fHisNentriesSelBit->GetXaxis()->SetBinLabel(5,"Dstar");
592 
595 
596 
597  //PID
598  if(fOnOff[1]){
599  fOutputPID=new TList();
600  fOutputPID->SetOwner();
601  fOutputPID->SetName(GetOutputSlot(2)->GetContainer()->GetName());
602 
603  //TOF pid
604  fHisTOFflags=new TH1F("hTOFflags","TOF flags",7,-0.5,6.5);
605  fHisTOFflags->SetMinimum(0.);
606  fHisTOFflags->GetXaxis()->SetBinLabel(1,"All Tracks");
607  fHisTOFflags->GetXaxis()->SetBinLabel(2,"kTPCout");
608  fHisTOFflags->GetXaxis()->SetBinLabel(3,"kTOFout");
609  fHisTOFflags->GetXaxis()->SetBinLabel(4,"kTIME");
610  fHisTOFflags->GetXaxis()->SetBinLabel(5,"kTOFpid");
611  fHisTOFflags->GetXaxis()->SetBinLabel(6,"kTOFmismatch");
612  fHisTOFflags->GetXaxis()->SetBinLabel(7,"kDetPidOK");
613 
614  TString hname="hTOFsig";
615  fHisTOFsig=new TH1F(hname.Data(),"Distribution of TOF signal;TOF time [ps];Entries", 100, -2.e3,40.e3);
616 
617  hname="hTOFstartTimeMask";
618  fHisTOFstartTimeMask=new TH1F(hname.Data(),"TOF start time mask; Mask ;Entries", 8, -0.5,7.5);
619  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(1,"FILL");
620  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(2,"TOF");
621  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(3,"T0A");
622  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(4,"TOF.and.T0A");
623  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(5,"T0C");
624  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(6,"TOF.and.T0C");
625  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(7,"T0AC");
626  fHisTOFstartTimeMask->GetXaxis()->SetBinLabel(8,"TOF.and.T0AC");
627 
628  hname="hTOFstartTimeRes";
629  fHisTOFstartTimeRes=new TH1F(hname.Data(),"TOF start time resolution; Resolution (ps) ;Entries", 100, 0.,300.);
630 
631  hname="hTOFstartTimeDistrib";
632  fHisTOFstartTimeDistrib=new TH1F(hname.Data(),"TOF start time distribution; Start time ;Entries", 400, -1000.,1000.);
633 
634  hname="hTOFtime";
635  fHisTOFtime=new TH1F(hname.Data(),"Distribution of TOF time Kaon;TOF time(Kaon) [ps];Entries", 1000, 0.,50000.);
636 
637  hname="hTOFtimeKaonHyptime";
638  fHisTOFtimeKaonHyptime=new TH2F(hname.Data(),"TOFtime - timeHypothesisForKaon;p[GeV/c];TOFtime - timeHypothesisForKaon [ps]",500,0.,10.,1000,-20000.,20000.);
639 
640  hname="hTOFtimeKaonHyptimeAC";
641  fHisTOFtimeKaonHyptimeAC=new TH2F(hname.Data(),"TOFtime - timeHypothesisForKaon;p[GeV/c];TOFtime - timeHypothesisForKaon [ps]",500,0.,10.,1000,-20000.,20000.);
642 
643  hname="hTOFsigmaKSigPid";
644  fHisTOFsigmaKSigPid=new TH2F(hname.Data(),"(TOFsignal-timeK)/tofSigPid;p[GeV/c];(TOFsignal-timeK)/tofSigPid",500,0.,10.,400,-20,20);
645 
646  hname="hTOFsigmaPionSigPid";
647  fHisTOFsigmaPionSigPid=new TH2F(hname.Data(),"(TOFsignal-time#pi)/tofSigPid;p[GeV/c];(TOFsignal-time#pi)/tofSigPid",500,0.,10.,400,-20,20);
648 
649  hname="hTOFsigmaProtonSigPid";
650  fHisTOFsigmaProtonSigPid=new TH2F(hname.Data(),"(TOFsignal-timep)/tofSigPid;p[GeV/c];(TOFsignal-time p)/tofSigPid",500,0.,10.,400,-20,20);
651 
652  hname="hTOFsigPid3sigPion";
653  fHisTOFsigPid3sigPion=new TH1F(hname.Data(),"TOF PID resolution (#pi) [ps]",500,0.,1000.);
654 
655  hname="hTOFsigPid3sigKaon";
656  fHisTOFsigPid3sigKaon=new TH1F(hname.Data(),"TOF PID resolution (K) [ps]",500,0.,1000.);
657 
658  hname="hTOFsigPid3sigProton";
659  fHisTOFsigPid3sigProton=new TH1F(hname.Data(),"TOF PID resolution (p) [ps]",500,0.,1000.);
660 
661 
662  //TPC pid
663  hname="hTPCsig";
664  fHisTPCsig=new TH1F(hname.Data(),"Distribution of TPC signal;TPC sig;Entries", 100, 35.,100.);
665 
666  hname="hTPCsigvsp";
667  fHisTPCsigvsp=new TH2F(hname.Data(),"TPCsig vs p;TPC p[GeV/c];TPCsig",500,0.,10.,1000,35.,100.);
668 
669  hname="hTPCsigvspAC";
670  fHisTPCsigvspAC=new TH2F(hname.Data(),"TPCsig vs p;TPCp[GeV/c];TPCsig",500,0.,10.,1000,35.,100.);
671 
672  hname="hTPCsigmaK";
673  fHisTPCsigmaK=new TH2F(hname.Data(),"TPC Sigma for K as a function of momentum;p[GeV/c];Sigma Kaon",500,0.,10.,400,-20,20);
674 
675  hname="hTPCsigmaPion";
676  fHisTPCsigmaPion=new TH2F(hname.Data(),"TPC Sigma for #pi as a function of momentum;p[GeV/c];Sigma #pi",500,0.,10.,400,-20,20);
677 
678  hname="hTPCsigmaProton";
679  fHisTPCsigmaProton=new TH2F(hname.Data(),"TPC Sigma for proton as a function of momentum;p[GeV/c];Sigma Proton",500,0.,10.,400,-20,20);
680 
681 
682  fOutputPID->Add(fHisTOFflags);
683  fOutputPID->Add(fHisTOFsig);
684  fOutputPID->Add(fHisTPCsig);
688  fOutputPID->Add(fHisTOFtime);
702 
704 
705  hname="hTPCsigNvsPtAllTracks";
706  fHisTPCsigNvsPtAllTracks=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. p_{T};p_{T} [GeV/c]; n. points", 200, 0.,20.,161,-0.5,160.5);
707 
708  hname="hTPCsigNvsPhiAllTracks";
709  fHisTPCsigNvsPhiAllTracks=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #phi;#phi [rad]; n. points", 100, 0.,2*TMath::Pi(),161,-0.5,160.5);
710 
711  hname="hTPCsigNvsEtaAllTracks";
712  fHisTPCsigNvsEtaAllTracks=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #eta;eta; n. points", 80,-2.,2.,161,-0.5,160.5);
713 
714  hname="hTPCsigNvsPtDaughters";
715  fHisTPCsigNvsPtDaughters=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. p_{T};p_{T} [GeV/c]; n. points", 200, 0.,20.,161,-0.5,160.5);
716 
717  hname="hTPCsigNvsPhiDaughters";
718  fHisTPCsigNvsPhiDaughters=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #phi;#phi [rad]; n. points", 100, 0.,2*TMath::Pi(),161,-0.5,160.5);
719 
720  hname="hTPCsigNvsEtaDaughters";
721  fHisTPCsigNvsEtaDaughters=new TH2F(hname.Data(),"Distribution of n. points used for TPC dE/dx vs. #eta;eta; n. points", 80,-2.,2.,161,-0.5,160.5);
722 
729  }
730 
731 
732  if(fReadMC){
733  //TOF
734  hname="hTOFsigmaMCKSigPid";
735  fHisTOFsigmaMCKSigPid=new TH2F(hname.Data(),"(TOFsignal-timeK)/tofSigPid;p[GeV/c];(TOFsignal-timeK)/tofSigPid",500,0.,10.,400,-20,20);
736 
737  hname="hTOFsigmaMCPionSigPid";
738  fHisTOFsigmaMCPionSigPid=new TH2F(hname.Data(),"(TOFsignal-time#pi)/tofSigPid;p[GeV/c];(TOFsignal-time#pi)/tofSigPid",500,0.,10.,400,-20,20);
739 
740  hname="hTOFsigmaMCProtonSigPid";
741  fHisTOFsigmaMCProtonSigPid=new TH2F(hname.Data(),"(TOFsignal-timep)/tofSigPid;p[GeV/c];(TOFsignal-time p)/tofSigPid",500,0.,10.,400,-20,20);
742 
743  //TPC
744  hname="hTPCsigmaMCK";
745  fHisTPCsigmaMCK=new TH2F(hname.Data(),"TPC Sigma for K as a function of momentum;p[GeV/c];Sigma Kaon",500,0.,10.,400,-20,20);
746 
747  hname="hTPCsigmaMCPion";
748  fHisTPCsigmaMCPion=new TH2F(hname.Data(),"TPC Sigma for #pi as a function of momentum;p[GeV/c];Sigma #pi",500,0.,10.,400,-20,20);
749 
750  hname="hTPCsigmaMCProton";
751  fHisTPCsigmaMCProton=new TH2F(hname.Data(),"TPC Sigma for proton as a function of momentum;p[GeV/c];Sigma Proton",500,0.,10.,400,-20,20);
752 
759 
760  }
761  }
762 
763  //quality of the tracks
764  if(fOnOff[0]){
765  fOutputTrack=new TList();
766  fOutputTrack->SetOwner();
767  fOutputTrack->SetName(GetOutputSlot(3)->GetContainer()->GetName());
768 
769  TString hname="hnClsITS";
770  fHisnClsITS=new TH1F(hname.Data(),"Distribution of number of ITS clusters;nITScls;Entries",7,-0.5,6.5);
771 
772  hname="hnClsITSselTr";
773  fHisnClsITSselTr=new TH1F(hname.Data(),"Distribution of number of ITS clusters selected tracks;nITScls;Entries",7,-0.5,6.5);
774 
775  hname="hnClsITS-SA";
776  fHisnClsITSSA=new TH1F(hname.Data(),"Distribution of number of ITS clusters(ITS-SA);nITScls;Entries",7,-0.5,6.5);
777  hname="hnClsITS-SA-SPDAny";
778  fHisnClsITSSAspdAny=new TH1F(hname.Data(),"Distribution of number of ITS clusters(ITS-SA) - SPD kAny;nITScls;Entries",7,-0.5,6.5);
779  hname="hnClsITS-SA-SPDIn";
780  fHisnClsITSSAspdIn=new TH1F(hname.Data(),"Distribution of number of ITS clusters(ITS-SA) - SPDin;nITScls;Entries",7,-0.5,6.5);
781  hname="hnClsITS-SA-SPDOut";
782  fHisnClsITSSAspdOut=new TH1F(hname.Data(),"Distribution of number of ITS clusters(ITS-SA) - SPDout;nITScls;Entries",7,-0.5,6.5);
783 
784 
785  hname="hnLayerITS";
786  fHisnLayerITS=new TH1F(hname.Data(),"Number of tracks with point in layer;ITS layer;",7,-1.5,5.5);
787  fHisnLayerITS->GetXaxis()->SetBinLabel(1,"n tracks");
788  fHisnLayerITS->GetXaxis()->SetBinLabel(2,"SPDin");
789  fHisnLayerITS->GetXaxis()->SetBinLabel(3,"SPDout");
790  fHisnLayerITS->GetXaxis()->SetBinLabel(4,"SDDin");
791  fHisnLayerITS->GetXaxis()->SetBinLabel(5,"SDDout");
792  fHisnLayerITS->GetXaxis()->SetBinLabel(6,"SSDin");
793  fHisnLayerITS->GetXaxis()->SetBinLabel(7,"SSDout");
794 
795  hname="hnLayerITSselTr";
796  fHisnLayerITSselTr=new TH1F(hname.Data(),"Number of selected tracks with point in layer;ITS layer;",7,-1.5,5.5);
797  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(1,"n tracks");
798  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(2,"SPDin");
799  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(3,"SPDout");
800  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(4,"SDDin");
801  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(5,"SDDout");
802  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(6,"SSDin");
803  fHisnLayerITSselTr->GetXaxis()->SetBinLabel(7,"SSDout");
804 
805  hname="hnLayerITSsa";
806  fHisnLayerITSsa=new TH1F(hname.Data(),"Number of ITSsa tracks with point in layer;ITS layer;",7,-1.5,5.5);
807  fHisnLayerITSsa->GetXaxis()->SetBinLabel(1,"n tracks");
808  fHisnLayerITSsa->GetXaxis()->SetBinLabel(2,"SPDin");
809  fHisnLayerITSsa->GetXaxis()->SetBinLabel(3,"SPDout");
810  fHisnLayerITSsa->GetXaxis()->SetBinLabel(4,"SDDin");
811  fHisnLayerITSsa->GetXaxis()->SetBinLabel(5,"SDDout");
812  fHisnLayerITSsa->GetXaxis()->SetBinLabel(6,"SSDin");
813  fHisnLayerITSsa->GetXaxis()->SetBinLabel(7,"SSDout");
814 
815  hname="hnClsSPD";
816  fHisnClsSPD=new TH1F(hname.Data(),"Distribution of number of SPD clusters;nSPDcls;Entries",3,-0.5,2.5);
817 
818  hname="hptGoodTr";
819  fHisptGoodTr=new TH1F(hname.Data(),"Pt distribution of 'good' tracks;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
820  fHisptGoodTr->SetTitleOffset(1.3,"Y");
821 
822  if(!fSimpleMode){
823  hname="hptGoodTrFromDaugh";
824  fHisptGoodTrFromDaugh=new TH1F(hname.Data(),"Pt distribution of 'good' candidate's daughters;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
825  fHisptGoodTrFromDaugh->SetTitleOffset(1.3,"Y");
827  hname="hptGoodTrFromDaugh_filt";
828  fHisptGoodTrFromDaugh_filt=new TH1F(hname.Data(),"Pt distribution of 'good' candidate's daughters, cuts level;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
829  fHisptGoodTrFromDaugh_filt->SetTitleOffset(1.3,"Y");
831  }
832 
833  hname="hdistrGoodTr";
834  fHisdistrGoodTr=new TH1F(hname.Data(),"Distribution of number of 'good' candidate's daughters per event;no.good-tracks/ev;Entries",4000,-0.5,3999.5);
835  fHisdistrGoodTr->SetTitleOffset(1.3,"Y");
836 
837  hname="hdistrSelTr";
838  fHisdistrSelTr=new TH1F(hname.Data(),"Distribution of number of Selected tracks per event;no.good-tracks/ev;Entries",4000,-0.5,3999.5);
839  fHisdistrSelTr->SetTitleOffset(1.3,"Y");
840 
841  hname="hd0dau";
842  fHisd0dau=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of D daughter tracks;d_{0rphi}[cm];Entries/10^{3} cm",200,-0.1,0.1);
843 
844  hname="hd0dau_filt";
845  fHisd0dau_filt=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of D daughter tracks, cut level;d_{0rphi}[cm];Entries/10^{3} cm",200,-0.1,0.1);
846 
847  hname="hd0dauphi";
848  fHisd0dauphi=new TH2F(hname.Data(), "Impact parameter (rphi) distribution of D daughter tracks versus #phi; #phi [rad]; d_{0rphi} [cm]",400,0,6.3,200,-0.1,0.1);
849 
850  hname="hd0dauphi_filt";
851  fHisd0dauphi_filt=new TH2F(hname.Data(), "Impact parameter (rphi) distribution of D daughter tracks versus #phi, cut level; #phi [rad]; d_{0rphi} [cm]",400,0,6.3,200,-0.1,0.1);
852 
853  hname="hd0zdau";
854  fHisd0zdau=new TH1F(hname.Data(),"Impact parameter (z) distribution of D daughter tracks;d_{0z}[cm];Entries/10^{3} cm",200,-0.1,0.1);
855 
856  hname="hd0zdau_filt";
857  fHisd0zdau_filt=new TH1F(hname.Data(),"Impact parameter (z) distribution of D daughter tracks, cut level;d_{0z}[cm];Entries/10^{3} cm",200,-0.1,0.1);
858 
859 
860  hname="hd0zdauphi";
861  fHisd0zdauphi=new TH2F(hname.Data(), "Impact parameter (z) distribution of D daughter tracks versus #phi; #phi [rad]; d_{0z} [cm]",400,0,6.3,200,-0.1,0.1);
862 
863  hname="hd0zdauphi_filt";
864  fHisd0zdauphi_filt=new TH2F(hname.Data(), "Impact parameter (z) distribution of D daughter tracks versus #phi, filtering level; #phi [rad]; d_{0z} [cm]",400,0,6.3,200,-0.1,0.1);
865 
866  hname="hd0TracksSPDin";
867  fHisd0TracksSPDin=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks kITSrefit, SPDinner; d_{0rphi}[cm];Entries",200,-0.5,0.5);
868 
869  hname="hd0TracksSPDany";
870  fHisd0TracksSPDany=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks kITSrefit, SPDany; d_{0rphi}[cm];Entries",200,-0.5,0.5);
871 
872  hname="hd0TracksFilterBit4";
873  fHisd0TracksFilterBit4=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks FilterBit4; d_{0rphi}[cm];Entries",200,-0.5,0.5);
874 
875  hname="hd0TracksTPCITSSPDany";
876  fHisd0TracksTPCITSSPDany=new TH1F(hname.Data(),"Impact parameter (rphi) distribution of AOD tracks TPC+ITScuts+SPDany; d_{0rphi}[cm];Entries",200,-0.5,0.5);
877 
878 
880  hname="hPtDaughters";
881  fHisPtDaughters=new TH1F(hname.Data(),"p_{T} distributions of the daughter tracks;p_{T} [GeV/c];Entries",200,0.,20.);
882 
883  hname="hPhiDaughters";
884  fHisPhiDaughters=new TH1F(hname.Data(),"#phi distribution of the daughter tracks;#phi [rad];Entries",100,0.,2*(TMath::Pi()));
885 
886  hname="hEtaDaughters";
887  fHisEtaDaughters=new TH1F(hname.Data(),"#eta distribution of the daughter tracks;#eta;Entries",80,-2.,2.);
888 
889  hname="hEtavsPhiDaughters";
890  fHisEtavsPhiDaughters=new TH2F(hname.Data(),"#eta vs #phi distribution of the daughter tracks;#phi;#eta",100,0.,2*(TMath::Pi()),80,-2.,2.);
891 
892  hname="hNTPCclsvsPtDaughters";
893  fHisNTPCclsvsPtDaughters=new TH2F(hname.Data(),"N TPC clusters vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];N TPC cls",200,0.,20.,85,-0.5,169.5);
894 
895  hname="hNTPCclsvsPhiDaughters";
896  fHisNTPCclsvsPhiDaughters=new TH2F(hname.Data(),"N TPC clusters vs #phi distribution of the daughter tracks;#phi [rad];N TPC cls",100,0.,2*(TMath::Pi()),85,-0.5,169.5);
897 
898  hname="hNTPCclsvsEtaDaughters";
899  fHisNTPCclsvsEtaDaughters=new TH2F(hname.Data(),"N TPC clusters vs #eta distribution of the daughter tracks;#eta;N TPC cls",80,-2.,2.,85,-0.5,169.5);
900 
901  hname="hNTPCCrossedRowsvsPtDaughters";
902  fHisNTPCCrossedRowsvsPtDaughters=new TH2F(hname.Data(),"N TPC crossed rows vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];N TPC cros. rows",200,0.,20.,100,-0.5,199.5);
903 
904  hname="hNTPCCrossedRowsvsPhiDaughters";
905  fHisNTPCCrossedRowsvsPhiDaughters=new TH2F(hname.Data(),"N TPC crossed rows vs #phi distribution of the daughter tracks;#phi [rad];N TPC cros. rows",100,0.,2*(TMath::Pi()),100,-0.5,199.5);
906 
907  hname="hNTPCCrossedRowsvsEtaDaughters";
908  fHisNTPCCrossedRowsvsEtaDaughters=new TH2F(hname.Data(),"N TPC crossed rows vs #eta distribution of the daughter tracks;#eta;N TPC cros. rows",80,-2.,2.,100,-0.5,199.5);
909 
910  hname="hRatioCRowsOverFclsvsPtDaughters";
911  fHisRatioCRowsOverFclsvsPtDaughters=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];CRows/FCls",200,0.,20,100,0.,1.);
912 
913  hname="hRatioCRowsOverFclsvsPhiDaughters";
914  fHisRatioCRowsOverFclsvsPhiDaughters=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #phi distribution of the daughter tracks;#phi [rad];CRows/FCls",100,0.,2*(TMath::Pi()),100,0.,1.);
915 
916  hname="hRatioCRowsOverFclsvsEtaDaughters";
917  fHisRatioCRowsOverFclsvsEtaDaughters=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #eta distribution of the daughter tracks;#eta;CRows/FCls",80,-2.,2.,100,0.,1.);
918 
919  hname="hNITSclsvsPtDaughters";
920  fHisNITSclsvsPtDaughters=new TH2F(hname.Data(),"N ITS clusters vs p_{T} distribution of the daughter tracks;p_{T} [GeV/c];N ITS cls",200,0.,20,7,-0.5,6.5);
921 
922  hname="hNITSclsvsPhiDaughters";
923  fHisNITSclsvsPhiDaughters=new TH2F(hname.Data(),"N ITS clusters vs #phi distribution of the daughter tracks;#phi [rad];N ITS cls",100,0.,2*(TMath::Pi()),7,-0.5,6.5);
924 
925  hname="hNITSclsvsEtaDaughters";
926  fHisNITSclsvsEtaDaughters=new TH2F(hname.Data(),"N ITS clusters vs #eta distribution of the daughter tracks;#eta;N ITS cls",80,-2.,2.,7,-0.5,6.5);
927 
928  hname="hSPDclsDaughters";
929  fHisSPDclsDaughters = new TH1F(hname.Data(),"N SPD points distribution;;Entries",4,-0.5,3.5);
930  fHisSPDclsDaughters->GetXaxis()->SetBinLabel(1, "no SPD");
931  fHisSPDclsDaughters->GetXaxis()->SetBinLabel(2, "kOnlyFirst");
932  fHisSPDclsDaughters->GetXaxis()->SetBinLabel(3, "kOnlySecond");
933  fHisSPDclsDaughters->GetXaxis()->SetBinLabel(4, "kBoth");
934 
935  hname="hPtAllTracks";
936  fHisPtAllTracks=new TH1F(hname.Data(),"p_{T} distributions of the AOD tracks (ID>0);p_{T} [GeV/c];Entries",200,0.,20.);
937 
938  hname="hPhiAllTracks";
939  fHisPhiAllTracks=new TH1F(hname.Data(),"#phi distribution of the AOD tracks (ID>0);#phi [rad];Entries",100,0.,2*(TMath::Pi()));
940 
941  hname="hEtaAllTracks";
942  fHisEtaAllTracks=new TH1F(hname.Data(),"#eta distribution of the AOD tracks (ID>0);#eta;Entries",80,-2.,2.);
943 
944  hname="hEtavsPhiAllTracks";
945  fHisEtavsPhiAllTracks=new TH2F(hname.Data(),"#eta vs #phi distribution of the AOD tracks (ID>0);#phi;#eta",100,0.,2*(TMath::Pi()),80,-2.,2.);
946 
947  hname="hNTPCclsvsPtAllTracks";
948  fHisNTPCclsvsPtAllTracks=new TH2F(hname.Data(),"N TPC clusters vs p_{T} distribution of the AOD tracks (ID>0);p_{T} [GeV/c];N TPC cls",200,0.,20,85,-0.5,169.5);
949 
950  hname="hNTPCclsvsPhiAllTracks";
951  fHisNTPCclsvsPhiAllTracks=new TH2F(hname.Data(),"N TPC clusters vs #phi distribution of the AOD tracks (ID>0);#phi [rad];N TPC cls",100,0.,2*(TMath::Pi()),85,-0.5,169.5);
952 
953  hname="hNTPCclsvsEtaAllTracks";
954  fHisNTPCclsvsEtaAllTracks=new TH2F(hname.Data(),"N TPC clusters vs #eta distribution of the AOD tracks (ID>0);#eta;N TPC cls",80,-2.,2.,85,-0.5,169.5);
955 
956  hname="hNTPCCrossedRowsvsPtAllTracks";
957  fHisNTPCCrossedRowsvsPtAllTracks=new TH2F(hname.Data(),"N TPC crossed rows vs p_{T} distribution of the AOD tracks;p_{T} [GeV/c];N TPC cros. rows",200,0.,20.,100,-0.5,199.5);
958 
959  hname="hNTPCCrossedRowsvsPhiAllTracks";
960  fHisNTPCCrossedRowsvsPhiAllTracks=new TH2F(hname.Data(),"N TPC crossed rows vs #phi distribution of the AOD tracks;#phi [rad];N TPC cros. rows",100,0.,2*(TMath::Pi()),100,-0.5,199.5);
961 
962  hname="hNTPCCrossedRowsvsEtaAllTracks";
963  fHisNTPCCrossedRowsvsEtaAllTracks=new TH2F(hname.Data(),"N TPC crossed rows vs #eta distribution of the AOD tracks;#eta;N TPC cros. rows",80,-2.,2.,100,-0.5,199.5);
964 
965  hname="hRatioCRowsOverFclsvsPtAllTracks";
966  fHisRatioCRowsOverFclsvsPtAllTracks=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs p_{T} distribution of the AOD tracks (ID>0);p_{T} [GeV/c];CRows/FCls",200,0.,20,100,0.,1.);
967 
968  hname="hRatioCRowsOverFclsvsPhiAllTracks";
969  fHisRatioCRowsOverFclsvsPhiAllTracks=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #phi distribution of the AOD tracks (ID>0);#phi [rad];CRows/FCls",100,0.,2*(TMath::Pi()),100,0.,1.);
970 
971  hname="hRatioCRowsOverFclsvsEtaAllTracks";
972  fHisRatioCRowsOverFclsvsEtaAllTracks=new TH2F(hname.Data(),"CrossedRows/FindableClusters vs #eta distribution of the AOD tracks (ID>0);#eta;CRows/FCls",80,-2.,2.,100,0.,1.);
973 
974  hname="hNITSclsvsPtAllTracks";
975  fHisNITSclsvsPtAllTracks=new TH2F(hname.Data(),"N ITS clusters vs p_{T} distribution of the AOD tracks (ID>0);p_{T} [GeV/c];N ITS cls",200,0.,20,7,-0.5,6.5);
976 
977  hname="hNITSclsvsPhiAllTracks";
978  fHisNITSclsvsPhiAllTracks=new TH2F(hname.Data(),"N ITS clusters vs #phi distribution of the AOD tracks (ID>0);#phi [rad];N ITS cls",100,0.,2*(TMath::Pi()),7,-0.5,6.5);
979 
980  hname="hNITSclsvsEtaAllTracks";
981  fHisNITSclsvsEtaAllTracks=new TH2F(hname.Data(),"N ITS clusters vs #eta distribution of the AOD tracks (ID>0);#eta;N ITS cls",80,-2.,2.,7,-0.5,6.5);
982 
983  hname="hSPDclsAllTracks";
984  fHisSPDclsAllTracks = new TH1F(hname.Data(),"N SPD points distribution AOD tracks (ID>0);;Entries",4,-0.5,3.5);
985  fHisSPDclsAllTracks->GetXaxis()->SetBinLabel(1, "no SPD");
986  fHisSPDclsAllTracks->GetXaxis()->SetBinLabel(2, "kOnlyFirst");
987  fHisSPDclsAllTracks->GetXaxis()->SetBinLabel(3, "kOnlySecond");
988  fHisSPDclsAllTracks->GetXaxis()->SetBinLabel(4, "kBoth");
989 
990 
1025 
1026  }
1027 
1028  fOutputTrack->Add(fHisnClsITS);
1037  fOutputTrack->Add(fHisnClsSPD);
1038  fOutputTrack->Add(fHisptGoodTr);
1045  fOutputTrack->Add(fHisd0dau);
1046  fOutputTrack->Add(fHisd0dauphi);
1047  fOutputTrack->Add(fHisd0zdau);
1053 
1054 
1055  if(fReadMC){
1056  hname="hdistrFakeTr";
1057  fHisdistrFakeTr=new TH1F(hname.Data(),"Distribution of number of fake tracks per event;no.fake-tracks/ev;Entries",4000,-0.5,3999.5);
1058  fHisdistrFakeTr->SetTitleOffset(1.3,"Y");
1059 
1060  hname="hd0f";
1061  fHisd0f=new TH1F(hname.Data(),"Impact parameter distribution of fake tracks;d_{0}[cm];Entries/10^{3} cm",200,-0.1,0.1);
1062 
1063  hname="hd0f_filt";
1064  fHisd0f_filt=new TH1F(hname.Data(),"Impact parameter distribution of fake tracks, cut level;d_{0}[cm];Entries/10^{3} cm",200,-0.1,0.1);
1065 
1066 
1067  hname="hptFakeTr";
1068  fHisptFakeTr=new TH1F(hname.Data(),"Pt distribution of fake tracks;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
1069  fHisptFakeTr->SetTitleOffset(1.3,"Y");
1070  if(!fSimpleMode){
1071  hname="hptFakeTrFromDaugh";
1072  fHisptFakeTrFromDaugh=new TH1F(hname.Data(),"Pt distribution of fake tracks from daughters;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
1073  fHisptFakeTrFromDaugh->SetTitleOffset(1.3,"Y");
1075 
1076  hname="hptFakeTrFromDaugh_filt";
1077  fHisptFakeTrFromDaughFilt=new TH1F(hname.Data(),"Pt distribution of fake tracks from daughters, cut level;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
1078  fHisptFakeTrFromDaughFilt->SetTitleOffset(1.3,"Y");
1080  }
1081 
1082  fOutputTrack->Add(fHisptFakeTr);
1084  fOutputTrack->Add(fHisd0f);
1085  fOutputTrack->Add(fHisd0f_filt);
1086  }
1087  }
1088 
1089 
1090  if(fOnOff[2] && fCuts->GetUseCentrality()){
1091 
1092  //Centrality (Counters)
1093  fOutputCounters=new TList();
1094  fOutputCounters->SetOwner();
1095  fOutputCounters->SetName(GetOutputSlot(5)->GetContainer()->GetName());
1096 
1097  AliCounterCollection *stdEstimator=new AliCounterCollection("stdEstimator");
1098  stdEstimator->AddRubric("run",500000);
1099  stdEstimator->AddRubric("centralityclass","-10_0/0_10/10_20/20_30/30_40/40_50/50_60/60_70/70_80/80_90/90_100/-990_-980");
1100  stdEstimator->Init();
1101  AliCounterCollection *secondEstimator=new AliCounterCollection("secondEstimator");
1102  secondEstimator->AddRubric("run",500000);
1103  secondEstimator->AddRubric("centralityclass","-10_0/0_10/10_20/20_30/30_40/40_50/50_60/60_70/70_80/80_90/90_100/-990_-980");
1104  secondEstimator->Init();
1105 
1106  fOutputCounters->Add(stdEstimator);
1107  fOutputCounters->Add(secondEstimator);
1108 
1109  //Centrality (Checks)
1111  fOutputCheckCentrality->SetOwner();
1112  fOutputCheckCentrality->SetName(GetOutputSlot(6)->GetContainer()->GetName());
1113 
1114  TString hname="hNtrackletsIn";
1115  fHisNtrackletsIn=new TH1F(hname.Data(),"Number of tracklets in Centrality range;ntracklets;Entries",5000,-0.5,4999.5);
1116 
1117  hname="hMultIn";
1118  fHisMultIn=new TH1F(hname.Data(),"Multiplicity;multiplicity in Centrality range;Entries",10000,-0.5,9999.5);
1119 
1120  hname="hNtrackletsOut";
1121  fHisNtrackletsOut=new TH1F(hname.Data(),"Number of tracklets out of Centrality range;ntracklets;Entries",5000,-0.5,4999.5);
1122 
1123  hname="hMultOut";
1124  fHisMultOut=new TH1F(hname.Data(),"Multiplicity out of Centrality range;multiplicity;Entries",10000,-0.5,9999.5);
1125 
1126  hname="hMultvsPercentile";
1127  fHisMultvsPercentile=new TH2F(hname.Data(),"Multiplicity vs Percentile;multiplicity;percentile",10000,-0.5,9999.5,240,-10.,110);
1128 
1129  hname="hntrklvsPercentile";
1130  fHisntrklvsPercentile=new TH2F(hname.Data(),"N tracklets vs Percentile;ntracklets;percentile",5000,-0.5,4999.5,240,-10.,110);
1131 
1132  hname="hntrklvsPercentile01";
1133  fHisntrklvsPercentile01=new TH2F(hname.Data(),"N tracklets vs Percentile |#eta|<1;ntracklets;percentile",5000,-0.5,4999.5,240,-10.,110);
1134 
1135  hname="hntrklvsPercentile01AllEv";
1136  fHisntrklvsPercentile01AllEv=new TH2F(hname.Data(),"N tracklets vs Percentile |#eta|<1 - All Events;ntracklets;percentile",5000,-0.5,4999.5,240,-10.,110);
1137 
1138  hname="hnTPCTracksvsPercentile";
1139  fHisnTPCTracksvsPercentile=new TH2F(hname.Data(),"N TPC tracks vs Percentile;nTPCTracks;percentile",5000,-0.5,9999.5,240,-10.,110);
1140 
1141  hname="hnTPCITSTracksvsPercentile";
1142  fHisnTPCITSTracksvsPercentile=new TH2F(hname.Data(),"N TPC+ITS tracks vs Percentile;nTPCITSTracks;percentile",5000,-0.5,9999.5,240,-10.,110);
1143 
1144  hname="hnTPCITS1SPDTracksvsPercentile";
1145  fHisnTPCITS1SPDTracksvsPercentile=new TH2F(hname.Data(),"N TPC+ITS+1SPD tracks vs Percentile;nTPCITS1SPDTracks;percentile",5000,-0.5,9999.5,240,-10.,110);
1146 
1147  hname="hStdEstimSignalPercentile";
1148  fHisStdEstimSignalPercentile = new TH2F(hname.Data(),"Std estimator signal vs Percentile;Std estimator signal;percentile",1000,-0.5,9999.5,120,-10.,110);
1149 
1150  hname="hStdEstimSignalNtrackletsIn";
1151  fHisStdEstimSignalNtrackletsIn = new TH2F(hname.Data(),"Std estimator signal vs Number of tracklets in the CC;Std estimator signal;number of tracklets",1000,-0.5,9999.5,5000,-0.5,4999.5);
1152 
1153  hname="hStdEstimSignal";
1154  fHisStdEstimSignal = new TH1F(hname.Data(),"Std estimator signal",700,0,1400);
1155 
1156  hname="hStdPercentileSecondPercentile";
1157  fHisStdPercentileSecondPercentile = new TH2F(hname.Data(),"Std estimator Percentile Vs Second Estimator Percentile;Std estimator percentile;Second estimator percentile",120,-10.,110,120,-10.,110);
1158 
1159  hname="hStdSignalSecondSignal";
1160  fHisStdSignalSecondSignal = new TH2F(hname.Data(),"Std estimator signal Vs Second Estimator signal;Std estimator;Second estimator",1000,-0.5,9999.5,1000,-0.5,9999.5);
1161 
1162  hname="hStdPercentileOldFrwPercentile";
1163  fHisStdPercentileOldFrwPercentile = new TH2F(hname.Data(),"Std estimator Percentile Vs Old Framework estimator Percentile;Std estimator percentile;Old framework estimator percentile",120,-10.,110,120,-10.,110);
1164 
1165  hname="hStdPercentileOldFrwPercentileDev";
1166  fHisStdPercentileOldFrwPercentileDev = new TH1F(hname.Data(),"Std estimator Percentile Vs Old Framework estimator Percentile deviation",5,-0.5,4.5);
1167  fHisStdPercentileOldFrwPercentileDev->GetXaxis()->SetBinLabel(1, "nEvts with >1% difference");
1168  fHisStdPercentileOldFrwPercentileDev->GetXaxis()->SetBinLabel(2, "nEvts with >0.5% difference");
1169  fHisStdPercentileOldFrwPercentileDev->GetXaxis()->SetBinLabel(3, "nEvts default <20, new >20");
1170  fHisStdPercentileOldFrwPercentileDev->GetXaxis()->SetBinLabel(4, "nEvts default >20, new <20");
1171  fHisStdPercentileOldFrwPercentileDev->GetXaxis()->SetBinLabel(5, "nEvts rejected due to centrality mismatch");
1172 
1173 
1192 
1193  PostData(6,fOutputCheckCentrality);
1194 
1195  } else{
1196  if(fOnOff[0]){
1197  TString hname="hNtracklets";
1198  fHisNtracklets=new TH1F(hname.Data(),"Number of tracklets;ntracklets;Entries",5000,-0.5,4999.5);
1199  hname="hNtracklets01";
1200  fHisNtracklets01=new TH1F(hname.Data(),"Number of tracklets |#eta|<1;ntracklets;Entries",5000,-0.5,4999.5);
1201  hname="hNtracklets01AllEv";
1202  fHisNtracklets01AllEv=new TH1F(hname.Data(),"Number of tracklets |#eta|<1 - All events;ntracklets;Entries",5000,-0.5,4999.5);
1203  hname="hMult";
1204  fHisMult=new TH1F(hname.Data(),"Multiplicity;multiplicity;Entries",10000,-0.5,9999.5);
1205  hname="hMultFBit4";
1206  fHisMultFBit4=new TH1F(hname.Data(),"Multiplicity (global+tracklet) with filter bit 4;multiplicity;Entries",10000,-0.5,9999.5);
1207  hname="hMultComb05";
1208  fHisMultComb05=new TH1F(hname.Data(),"Multiplicity (global+tracklet) in |#eta|<0.5;multiplicity;Entries",10000,-0.5,9999.5);
1209  hname="hMultComb08";
1210  fHisMultComb08=new TH1F(hname.Data(),"Multiplicity (global+tracklet) in |#eta|<0.8;multiplicity;Entries",10000,-0.5,9999.5);
1211 
1215  fOutputTrack->Add(fHisMult);
1219  }
1220  }
1221 
1222  //event selection (z vertex for the moment)
1223  if(fOnOff[3]){
1224  fOutputEvSelection=new TList();
1225  fOutputEvSelection->SetOwner();
1226  fOutputEvSelection->SetName(GetOutputSlot(7)->GetContainer()->GetName());
1227  AliCounterCollection *evselection=new AliCounterCollection("evselection");
1228  evselection->AddRubric("run",500000);
1229  evselection->AddRubric("evnonsel","zvtx");
1230  evselection->Init();
1231 
1232  fHisxvtx=new TH1F("hxvtx", "Distribution of x_{VTX};x_{VTX} [cm];Entries",800,-1,1);
1233  fHisyvtx=new TH1F("hyvtx", "Distribution of y_{VTX};y_{VTX} [cm];Entries",800,-1,1);
1234  fHiszvtx=new TH1F("hzvtx", "Distribution of z_{VTX};z_{VTX} [cm];Entries",800,-30,30);
1235  fHisxvtxSelEv=new TH1F("hxvtxSelEv", "Distribution of x_{VTX} Selected Ev;x_{VTX} [cm];Entries",800,-1,1);
1236  fHisyvtxSelEv=new TH1F("hyvtxSelEv", "Distribution of y_{VTX} Selected Ev;y_{VTX} [cm];Entries",800,-1,1);
1237  fHiszvtxSelEv=new TH1F("hzvtxSelEv", "Distribution of z_{VTX} Selected Ev;z_{VTX} [cm];Entries",800,-30,30);
1238  fHisxvtxSelEvWithD=new TH1F("hxvtxSelEvWithD", "Distribution of x_{VTX} Selected Ev w/ D mesons;x_{VTX} [cm];Entries",800,-1,1);
1239  fHisyvtxSelEvWithD=new TH1F("hyvtxSelEvWithD", "Distribution of y_{VTX} Selected Ev w/ D mesons;y_{VTX} [cm];Entries",800,-1,1);
1240  fHiszvtxSelEvWithD=new TH1F("hzvtxSelEvWithD", "Distribution of z_{VTX} Selected Ev w/ D mesons;z_{VTX} [cm];Entries",800,-30,30);
1241  fHisWhichVert=new TH1F("hWhichVert","Vertex Type",4,-1.5,2.5);
1242  fHisWhichVert->GetXaxis()->SetBinLabel(1,"Not found");
1243  fHisWhichVert->GetXaxis()->SetBinLabel(2,"Track");
1244  fHisWhichVert->GetXaxis()->SetBinLabel(3,"SPD-3D");
1245  fHisWhichVert->GetXaxis()->SetBinLabel(4,"SPD-z");
1246  fHisWhichVertSelEv=new TH1F("hWhichVertSelEv","Vertex Type",4,-1.5,2.5);
1247  fHisWhichVertSelEv->GetXaxis()->SetBinLabel(1,"Not found");
1248  fHisWhichVertSelEv->GetXaxis()->SetBinLabel(2,"Track");
1249  fHisWhichVertSelEv->GetXaxis()->SetBinLabel(3,"SPD-3D");
1250  fHisWhichVertSelEv->GetXaxis()->SetBinLabel(4,"SPD-z");
1251 
1252  fHisnClsITSvsNtrackletsSel=new TH2F("hnClsITSvsNtrackletsSel","number of SPD clusters vs number of SPD tracklets; n. SPD clusters; Ntracklets",200,0,6000,500,0,20000); // max values should be changed for pp data to about 200 and 1000 respectively
1253  fHiszvtxvsSPDzvtx=new TH2F("hzvtxvsSPDzvtx","event primary z-vertex vs SPD z-vertex - before event selection; PV z-vertex [cm]; SPD z-vertex [cm]",800,-30,30,800,-30,30);
1254  fHiszvtxvsSPDzvtxSel=new TH2F("hzvtxvsSPDzvtxSel","event primary z-vertex vs SPD z-vertex - after event selection; PV z-vertex [cm]; SPD z-vertex [cm]",800,-30,30,800,-30,30);
1255  fHiszvtxvsSPDzvtxSelWithD=new TH2F("hzvtxvsSPDzvtxSelWithD","event primary z-vertex vs SPD z-vertex - after event selection w/ D mesons; PV z-vertex [cm]; SPD z-vertex [cm]",800,-30,30,800,-30,30);
1256 
1257  fHisTrigCent=new TH2F("hTrigCent","Centrality vs. Trigger types",24,-1.5,22.5,12,-10,110);
1258  fHisTrigCent->GetXaxis()->SetBinLabel(1,"All");
1259  fHisTrigCent->GetXaxis()->SetBinLabel(2,"kAny");
1260  fHisTrigCent->GetXaxis()->SetBinLabel(3,"kMB");
1261  fHisTrigCent->GetXaxis()->SetBinLabel(4,"kINT7");
1262  fHisTrigCent->GetXaxis()->SetBinLabel(5,"kINT8");
1263  fHisTrigCent->GetXaxis()->SetBinLabel(6,"kCINT5");
1264  fHisTrigCent->GetXaxis()->SetBinLabel(7,"kCent");
1265  fHisTrigCent->GetXaxis()->SetBinLabel(8,"kSemiCent");
1266  fHisTrigCent->GetXaxis()->SetBinLabel(9,"kEMC1");
1267  fHisTrigCent->GetXaxis()->SetBinLabel(10,"kEMC7");
1268  fHisTrigCent->GetXaxis()->SetBinLabel(11,"kEMC8");
1269  fHisTrigCent->GetXaxis()->SetBinLabel(12,"kEMCJET7");
1270  fHisTrigCent->GetXaxis()->SetBinLabel(13,"kEMCGAMMA7");
1271  fHisTrigCent->GetXaxis()->SetBinLabel(14,"kEMCJET8");
1272  fHisTrigCent->GetXaxis()->SetBinLabel(15,"kEMCGAMMA8");
1273  fHisTrigCent->GetXaxis()->SetBinLabel(16,"Muons");
1274  fHisTrigCent->GetXaxis()->SetBinLabel(17,"PHOS");
1275  fHisTrigCent->GetXaxis()->SetBinLabel(18,"TRD");
1276  fHisTrigCent->GetXaxis()->SetBinLabel(19,"TRDHJT");
1277  fHisTrigCent->GetXaxis()->SetBinLabel(20,"TRDHSE");
1278  fHisTrigCent->GetXaxis()->SetBinLabel(21,"HighMult");
1279  fHisTrigCent->GetXaxis()->SetBinLabel(22,"SPI7");
1280  fHisTrigCent->GetXaxis()->SetBinLabel(23,"SPI8");
1281  fHisTrigCent->GetXaxis()->SetBinLabel(24,"Others");
1282 
1283  fHisTrigMul=new TH2F("hTrigMul","Multiplicity vs. Trigger types",24,-1.5,22.5,1000,0.,10000.);
1284  fHisTrigMul->GetXaxis()->SetBinLabel(1,"All");
1285  fHisTrigMul->GetXaxis()->SetBinLabel(2,"kAny");
1286  fHisTrigMul->GetXaxis()->SetBinLabel(3,"kMB");
1287  fHisTrigMul->GetXaxis()->SetBinLabel(4,"kINT7");
1288  fHisTrigMul->GetXaxis()->SetBinLabel(5,"kINT8");
1289  fHisTrigMul->GetXaxis()->SetBinLabel(6,"kCINT5");
1290  fHisTrigMul->GetXaxis()->SetBinLabel(7,"kCent");
1291  fHisTrigMul->GetXaxis()->SetBinLabel(8,"kSemiCent");
1292  fHisTrigMul->GetXaxis()->SetBinLabel(9,"kEMC1");
1293  fHisTrigMul->GetXaxis()->SetBinLabel(10,"kEMC7");
1294  fHisTrigMul->GetXaxis()->SetBinLabel(11,"kEMC8");
1295  fHisTrigMul->GetXaxis()->SetBinLabel(12,"kEMCJET7");
1296  fHisTrigMul->GetXaxis()->SetBinLabel(13,"kEMCGAMMA7");
1297  fHisTrigMul->GetXaxis()->SetBinLabel(14,"kEMCJET8");
1298  fHisTrigMul->GetXaxis()->SetBinLabel(15,"kEMCGAMMA8");
1299  fHisTrigMul->GetXaxis()->SetBinLabel(16,"Muons");
1300  fHisTrigMul->GetXaxis()->SetBinLabel(17,"PHOS");
1301  fHisTrigMul->GetXaxis()->SetBinLabel(18,"TRD");
1302  fHisTrigMul->GetXaxis()->SetBinLabel(19,"TRDHJT");
1303  fHisTrigMul->GetXaxis()->SetBinLabel(20,"TRDHSE");
1304  fHisTrigMul->GetXaxis()->SetBinLabel(21,"HighMult");
1305  fHisTrigMul->GetXaxis()->SetBinLabel(22,"SPI7");
1306  fHisTrigMul->GetXaxis()->SetBinLabel(23,"SPI8");
1307  fHisTrigMul->GetXaxis()->SetBinLabel(24,"Others");
1308 
1309  fHisTrigCentSel=new TH2F("hTrigCentSel","Trigger types",24,-1.5,22.5,12,-10,110);
1310  fHisTrigCentSel->GetXaxis()->SetBinLabel(1,"All");
1311  fHisTrigCentSel->GetXaxis()->SetBinLabel(2,"kAny");
1312  fHisTrigCentSel->GetXaxis()->SetBinLabel(3,"kMB");
1313  fHisTrigCentSel->GetXaxis()->SetBinLabel(4,"kINT7");
1314  fHisTrigCentSel->GetXaxis()->SetBinLabel(5,"kINT8");
1315  fHisTrigCentSel->GetXaxis()->SetBinLabel(6,"kCINT5");
1316  fHisTrigCentSel->GetXaxis()->SetBinLabel(7,"kCent");
1317  fHisTrigCentSel->GetXaxis()->SetBinLabel(8,"kSemiCent");
1318  fHisTrigCentSel->GetXaxis()->SetBinLabel(9,"kEMC1");
1319  fHisTrigCentSel->GetXaxis()->SetBinLabel(10,"kEMC7");
1320  fHisTrigCentSel->GetXaxis()->SetBinLabel(11,"kEMC8");
1321  fHisTrigCentSel->GetXaxis()->SetBinLabel(12,"kEMCJET7");
1322  fHisTrigCentSel->GetXaxis()->SetBinLabel(13,"kEMCGAMMA7");
1323  fHisTrigCentSel->GetXaxis()->SetBinLabel(14,"kEMCJET8");
1324  fHisTrigCentSel->GetXaxis()->SetBinLabel(15,"kEMCGAMMA8");
1325  fHisTrigCentSel->GetXaxis()->SetBinLabel(16,"Muons");
1326  fHisTrigCentSel->GetXaxis()->SetBinLabel(17,"PHOS");
1327  fHisTrigCentSel->GetXaxis()->SetBinLabel(18,"TRD");
1328  fHisTrigCentSel->GetXaxis()->SetBinLabel(19,"TRDHJT");
1329  fHisTrigCentSel->GetXaxis()->SetBinLabel(20,"TRDHSE");
1330  fHisTrigCentSel->GetXaxis()->SetBinLabel(21,"HighMult");
1331  fHisTrigCentSel->GetXaxis()->SetBinLabel(22,"SPI7");
1332  fHisTrigCentSel->GetXaxis()->SetBinLabel(23,"SPI8");
1333  fHisTrigCentSel->GetXaxis()->SetBinLabel(24,"Others");
1334 
1335  fHisTrigMulSel=new TH2F("hTrigMulSel","Multiplicity after selection vs. Trigger types",24,-1.5,22.5,1000,0.,10000.);
1336  fHisTrigMulSel->GetXaxis()->SetBinLabel(1,"All");
1337  fHisTrigMulSel->GetXaxis()->SetBinLabel(2,"kAny");
1338  fHisTrigMulSel->GetXaxis()->SetBinLabel(3,"kMB");
1339  fHisTrigMulSel->GetXaxis()->SetBinLabel(4,"kINT7");
1340  fHisTrigMulSel->GetXaxis()->SetBinLabel(5,"kINT8");
1341  fHisTrigMulSel->GetXaxis()->SetBinLabel(6,"kCINT5");
1342  fHisTrigMulSel->GetXaxis()->SetBinLabel(7,"kCent");
1343  fHisTrigMulSel->GetXaxis()->SetBinLabel(8,"kSemiCent");
1344  fHisTrigMulSel->GetXaxis()->SetBinLabel(9,"kEMC1");
1345  fHisTrigMulSel->GetXaxis()->SetBinLabel(10,"kEMC7");
1346  fHisTrigMulSel->GetXaxis()->SetBinLabel(11,"kEMC8");
1347  fHisTrigMulSel->GetXaxis()->SetBinLabel(12,"kEMCJET7");
1348  fHisTrigMulSel->GetXaxis()->SetBinLabel(13,"kEMCGAMMA7");
1349  fHisTrigMulSel->GetXaxis()->SetBinLabel(14,"kEMCJET8");
1350  fHisTrigMulSel->GetXaxis()->SetBinLabel(15,"kEMCGAMMA8");
1351  fHisTrigMulSel->GetXaxis()->SetBinLabel(16,"Muons");
1352  fHisTrigMulSel->GetXaxis()->SetBinLabel(17,"PHOS");
1353  fHisTrigMulSel->GetXaxis()->SetBinLabel(18,"TRD");
1354  fHisTrigMulSel->GetXaxis()->SetBinLabel(19,"TRDHJT");
1355  fHisTrigMulSel->GetXaxis()->SetBinLabel(20,"TRDHSE");
1356  fHisTrigMulSel->GetXaxis()->SetBinLabel(21,"HighMult");
1357  fHisTrigMulSel->GetXaxis()->SetBinLabel(22,"SPI7");
1358  fHisTrigMulSel->GetXaxis()->SetBinLabel(23,"SPI8");
1359  fHisTrigMulSel->GetXaxis()->SetBinLabel(24,"Others");
1360 
1361  AliCounterCollection *trigCounter=new AliCounterCollection("trigCounter");
1362  trigCounter->AddRubric("run",500000);
1363  trigCounter->AddRubric("triggerType","All/Any/MB/Cent/SemiCent/EMCAL/MUON/NoPhysSelMUON/NoPhysSelEvNot7/NoPhysSelCMUP1/NoPhysSelMB/NoPhysSelCent/NoPhysSelSemiCent/CINT7/INT8");
1364  trigCounter->Init();
1365 
1366  AliCounterCollection *trigCounter2=new AliCounterCollection("trigCounter2");
1367  trigCounter2->AddRubric("run",500000);
1368  trigCounter2->AddRubric("triggerType","All/Any/MB/CINT7/INT8/NoPhysSelEvNot7/NoPhysSelMB/HighMult/SPI7/SPI8/EMC1/EMC7/EMC8/EMCJET7/EMCJET8/EMCGAMMA/TRD/TRDHJT/TRDHSE");
1369  trigCounter2->Init();
1370 
1371  fHisWhyEvRejected=new TH1F("hWhyEvRejected", "Why Event rejected",7,-1.5,5.5);
1372 
1373  fHisWhyEvRejected->GetXaxis()->SetBinLabel(1,"N events");
1374  fHisWhyEvRejected->GetXaxis()->SetBinLabel(2,"pileup");
1375  fHisWhyEvRejected->GetXaxis()->SetBinLabel(3,"centrality");
1376  fHisWhyEvRejected->GetXaxis()->SetBinLabel(4,"Vertex not found");
1377  fHisWhyEvRejected->GetXaxis()->SetBinLabel(5,"trigger");
1378  fHisWhyEvRejected->GetXaxis()->SetBinLabel(6,"z vertex out of 10 cm");
1379  fHisWhyEvRejected->GetXaxis()->SetBinLabel(7,"physics sel");
1380 
1381 
1382  fOutputEvSelection->Add(evselection);
1398  fOutputEvSelection->Add(trigCounter);
1399  fOutputEvSelection->Add(trigCounter2);
1405 
1406  }
1407 
1408  // Post the data
1409  PostData(1,fOutputEntries);
1410 
1411  if(fOnOff[1]) PostData(2,fOutputPID);
1412  if(fOnOff[0]) PostData(3,fOutputTrack);
1413  PostData(4,fCuts);
1414  if(fOnOff[2]) PostData(5,fOutputCounters);
1415  if(fOnOff[3]) PostData(7,fOutputEvSelection);
1416 
1417  if(!fOnOff[0] && !fOnOff[1] && !fOnOff[2]) AliError("Nothing will be filled!");
1418 }
1419 
1420 //___________________________________________________________________________
1422 {
1424 
1425  AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
1426  if(fDebug>2) printf("Analysing decay %d\n",fDecayChannel);
1427  // Post the data already here
1428  PostData(1,fOutputEntries);
1429  if(fOnOff[1]) PostData(2,fOutputPID);
1430  if(fOnOff[0]) PostData(3,fOutputTrack);
1431  PostData(4,fCuts);
1432  if(fOnOff[2]) {
1433  PostData(5,fOutputCounters);
1434  if(fCuts->GetUseCentrality()) PostData(6,fOutputCheckCentrality);
1435  }
1436 
1437 
1438  fHisNentries->Fill(0);
1439  if(fAODProtection>=0){
1440  // Protection against different number of events in the AOD and deltaAOD
1441  // In case of discrepancy the event is rejected.
1442  Int_t matchingAODdeltaAODlevel = AliRDHFCuts::CheckMatchingAODdeltaAODevents();
1443  if (matchingAODdeltaAODlevel==-1) fHisNentries->Fill(2);
1444  if (matchingAODdeltaAODlevel==0) fHisNentries->Fill(3);
1445  if (matchingAODdeltaAODlevel<0 || (matchingAODdeltaAODlevel==0 && fAODProtection==1)) {
1446  // AOD/deltaAOD trees have different number of entries || TProcessID do not match while it was required
1447  return;
1448  }
1449  fHisNentries->Fill(1);
1450  }
1451 
1453 
1454 
1455  TClonesArray *arrayProng =0;
1456 
1457  // Load all the branches of the DeltaAOD - needed for SelectionBit counting
1458  TClonesArray *arrayProngD0toKpi =0;
1459  TClonesArray *arrayProng3Prong =0;
1460  TClonesArray *arrayProng4Prong =0;
1461  TClonesArray *arrayProngDstar =0;
1462  TClonesArray *arrayProngCascades =0;
1463 
1464  Int_t pdg=0;
1465  Int_t *pdgdaughters=0x0;
1467 
1468  if(!aod && AODEvent() && IsStandardAOD()) {
1469  // In case there is an AOD handler writing a standard AOD, use the AOD
1470  // event in memory rather than the input (ESD) event.
1471  aod = dynamic_cast<AliAODEvent*> (AODEvent());
1472  // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
1473  // have to taken from the AOD event hold by the AliAODExtension
1474  AliAODHandler* aodHandler = (AliAODHandler*)
1475  ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
1476  if(aodHandler->GetExtensions()) {
1477 
1478  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
1479  AliAODEvent *aodFromExt = ext->GetAOD();
1480 
1481  arrayProng3Prong =(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
1482  arrayProng4Prong =(TClonesArray*)aodFromExt->GetList()->FindObject("Charm4Prong");
1483  arrayProngD0toKpi =(TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi");
1484  arrayProngDstar =(TClonesArray*)aodFromExt->GetList()->FindObject("Dstar");
1485  arrayProngCascades=(TClonesArray*)aodFromExt->GetList()->FindObject("CascadesHF");
1486 
1487  switch(fDecayChannel){
1488 
1489  case 0:
1490  arrayProng=arrayProng3Prong;
1491  pdg=411;
1492  if(fReadMC){
1493  pdgdaughters =new Int_t[3];
1494  pdgdaughters[0]=211;//pi
1495  pdgdaughters[1]=321;//K
1496  pdgdaughters[2]=211;//pi
1497  }
1498  break;
1499  case 1:
1500  arrayProng=arrayProngD0toKpi;
1501  pdg=421;
1502  if(fReadMC){
1503  pdgdaughters =new Int_t[2];
1504  pdgdaughters[0]=211;//pi
1505  pdgdaughters[1]=321;//K
1506  }
1507  break;
1508  case 2:
1509  arrayProng=arrayProngDstar;
1510  pdg=413;
1511  if(fReadMC){
1512  pdgdaughters =new Int_t[3];
1513  pdgdaughters[1]=211;//pi
1514  pdgdaughters[0]=321;//K
1515  pdgdaughters[2]=211;//pi (soft?)
1516  }
1517  break;
1518  case 3:
1519  arrayProng=arrayProng3Prong;
1520  pdg=431;
1521  if(fReadMC){
1522  pdgdaughters =new Int_t[3];
1523  pdgdaughters[0]=321;//K
1524  pdgdaughters[1]=321;//K
1525  pdgdaughters[2]=211;//pi
1526  }
1527  break;
1528  case 4:
1529  arrayProng=arrayProng4Prong;
1530  pdg=421;
1531  if(fReadMC){
1532  pdgdaughters =new Int_t[4];
1533  pdgdaughters[0]=321;
1534  pdgdaughters[1]=211;
1535  pdgdaughters[2]=211;
1536  pdgdaughters[3]=211;
1537  }
1538  break;
1539  case 5:
1540  arrayProng=arrayProng3Prong;
1541  pdg=4122;
1542  if(fReadMC){
1543  pdgdaughters =new Int_t[3];
1544  pdgdaughters[0]=2212;//p
1545  pdgdaughters[1]=321;//K
1546  pdgdaughters[2]=211;//pi
1547  }
1548  break;
1549  case kLambdactoV0:
1550  arrayProng=arrayProngCascades;
1551  pdg=4122;
1552  if(fReadMC){
1553  pdgdaughters =new Int_t[3];
1554  pdgdaughters[0]=2212;//p
1555  pdgdaughters[1]=211;//pi
1556  pdgdaughters[2]=211;//pi
1557  }
1558  break;
1559  }
1560  }
1561  } else if(aod) {
1562 
1563  arrayProng3Prong =(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
1564  arrayProng4Prong =(TClonesArray*)aod->GetList()->FindObject("Charm4Prong");
1565  arrayProngD0toKpi =(TClonesArray*)aod->GetList()->FindObject("D0toKpi");
1566  arrayProngDstar =(TClonesArray*)aod->GetList()->FindObject("Dstar");
1567  arrayProngCascades=(TClonesArray*)aod->GetList()->FindObject("CascadesHF");
1568 
1569  switch(fDecayChannel){
1570 
1571  case 0:
1572  arrayProng=arrayProng3Prong;
1573  pdg=411;
1574  if(fReadMC){
1575  pdgdaughters =new Int_t[3];
1576  pdgdaughters[0]=211;//pi
1577  pdgdaughters[1]=321;//K
1578  pdgdaughters[2]=211;//pi
1579  }
1580  break;
1581  case 1:
1582  arrayProng=arrayProngD0toKpi;
1583  pdg=421;
1584  if(fReadMC){
1585  pdgdaughters =new Int_t[2];
1586  pdgdaughters[0]=211;//pi
1587  pdgdaughters[1]=321;//K
1588  }
1589  break;
1590  case 2:
1591  arrayProng=arrayProngDstar;
1592  pdg=413;
1593  if(fReadMC){
1594  pdgdaughters =new Int_t[3];
1595  pdgdaughters[1]=211;//pi
1596  pdgdaughters[0]=321;//K
1597  pdgdaughters[2]=211;//pi (soft?)
1598  }
1599  break;
1600  case 3:
1601  arrayProng=arrayProng3Prong;
1602  pdg=431;
1603  if(fReadMC){
1604  pdgdaughters =new Int_t[3];
1605  pdgdaughters[0]=321;//K
1606  pdgdaughters[1]=321;//K
1607  pdgdaughters[2]=211;//pi
1608  }
1609  break;
1610  case 4:
1611  arrayProng=arrayProng4Prong;
1612  pdg=421;
1613  if(fReadMC){
1614  pdgdaughters =new Int_t[4];
1615  pdgdaughters[0]=321;
1616  pdgdaughters[1]=211;
1617  pdgdaughters[2]=211;
1618  pdgdaughters[3]=211;
1619  }
1620  break;
1621  case 5:
1622  arrayProng=arrayProng3Prong;
1623  pdg=4122;
1624  if(fReadMC){
1625  pdgdaughters =new Int_t[3];
1626  pdgdaughters[0]=2212;//p
1627  pdgdaughters[1]=321;//K
1628  pdgdaughters[2]=211;//pi
1629  }
1630  break;
1631  case kLambdactoV0:
1632  arrayProng=arrayProngCascades;
1633  pdg=4122;
1634  if(fReadMC){
1635  pdgdaughters =new Int_t[3];
1636  pdgdaughters[0]=2212;//p
1637  pdgdaughters[1]=211;//pi
1638  pdgdaughters[2]=211;//pi
1639  }
1640  break;
1641  }
1642  }
1643  Bool_t isSimpleMode=fSimpleMode;
1644  if(!arrayProng) {
1645  AliInfo("Branch not found! The output will contain only track related histograms\n");
1646  isSimpleMode=kTRUE;
1647  fHisNentries->Fill(7);
1648  }
1649 
1650  TClonesArray *mcArray = 0;
1651  AliAODMCHeader *mcHeader = 0;
1652 
1653  if(!aod) {
1654  delete [] pdgdaughters;
1655  return;
1656  }
1657 
1658  //check if MC
1659  if(fReadMC) {
1660  // load MC particles
1661  mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
1662  if(!mcArray) {
1663  printf("AliAnalysisTaskSEHFQA::UserExec: MC particles branch not found!\n");
1664  delete [] pdgdaughters;
1665  return;
1666  }
1667 
1668  // load MC header
1669  mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1670  if(!mcHeader) {
1671  printf("AliAnalysisTaskSEHFQA::UserExec: MC header branch not found!\n");
1672  delete [] pdgdaughters;
1673  return;
1674  }
1675  }
1676 
1677 
1678  UInt_t evSelMask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1680  AliAODHeader * header = dynamic_cast<AliAODHeader*>(aod->GetHeader());
1681  if(!header) AliFatal("Not a standard AOD");
1682 
1683  Double_t multiplicity=header->GetRefMultiplicity();
1684  Int_t runNumber = aod->GetRunNumber();
1685  TString trigClass=aod->GetFiredTriggerClasses();
1686  Int_t nAODtracks=aod->GetNumberOfTracks();
1687  Int_t nSelTracksTPCOnly=0;
1688  Int_t nSelTracksTPCITS=0;
1689  Int_t nSelTracksTPCITS1SPD=0;
1690  Int_t ntracksFBit4=0;
1691 
1692  // AliTRDTriggerAnalysis trdSelection;
1693  // trdSelection.CalcTriggers(aod);
1694 
1695  if(fReadMC) {
1696  if(aod->GetTriggerMask()==0 &&
1697  (runNumber>=195344 && runNumber<=195677)){
1698  AliDebug(3,"Event rejected because of null trigger mask");
1699  delete [] pdgdaughters;
1700  return;
1701  }
1702  }
1703 
1704  for (Int_t k=0;k<nAODtracks;k++){
1705  AliAODTrack* track=dynamic_cast<AliAODTrack*>(aod->GetTrack(k));
1706  if(!track) AliFatal("Not a standard AOD");
1707  if(track->GetID()<0) continue;
1708  Int_t nclsTot=0,nclsSPD=0;
1709  for(Int_t l=0;l<6;l++) {
1710  if(TESTBIT(track->GetITSClusterMap(),l)) {
1711  nclsTot++; if(l<2) nclsSPD++;
1712  }
1713  }
1714  UShort_t nTPCClus=track->GetTPCClusterMap().CountBits();
1715  if(TMath::Abs(track->Eta())<0.8 && nTPCClus>=70 && track->GetStatus()&AliESDtrack::kTPCrefit){
1716  if(track->TestFilterBit(1)) nSelTracksTPCOnly++;
1717  if(track->GetStatus()&AliESDtrack::kITSrefit){
1718  nSelTracksTPCITS++;
1719  if(nclsSPD>0) nSelTracksTPCITS1SPD++;
1720  }
1721  }
1722  if(track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){
1723  ntracksFBit4++;
1724  }
1725  }
1726 
1727  if(fOnOff[3]){
1728  AliCounterCollection* trigCount=(AliCounterCollection*)fOutputEvSelection->FindObject("trigCounter");
1729  AliCounterCollection* trigCount2=(AliCounterCollection*)fOutputEvSelection->FindObject("trigCounter2");
1730 
1731  fHisTrigCent->Fill(-1.,centrality);
1732  fHisTrigMul->Fill(-1.,multiplicity);
1733  trigCount->Count(Form("triggerType:All/Run:%d",runNumber));
1734  trigCount2->Count(Form("triggerType:All/Run:%d",runNumber));
1735  if(evSelMask==0){
1736  if(aod->GetEventType()!=7 || trigClass.Contains("BEAMB")){
1737  trigCount->Count(Form("triggerType:NoPhysSelEvNot7/Run:%d",runNumber));
1738  trigCount2->Count(Form("triggerType:NoPhysSelEvNot7/Run:%d",runNumber));
1739  }else if(trigClass.Contains("CMUP1")){
1740  trigCount->Count(Form("triggerType:NoPhysSelCMUP1/Run:%d",runNumber));
1741  }else if(trigClass.Contains("MUON")){
1742  trigCount->Count(Form("triggerType:NoPhysSelMUON/Run:%d",runNumber));
1743  }else if(trigClass.Contains("CPBI2_B1-B") || trigClass.Contains(" CPBI2WU_B1-B")){
1744  trigCount->Count(Form("triggerType:NoPhysSelMB/Run:%d",runNumber));
1745  trigCount2->Count(Form("triggerType:NoPhysSelMB/Run:%d",runNumber));
1746  }else if(trigClass.Contains("CCENT") || trigClass.Contains("CVHN")){
1747  trigCount->Count(Form("triggerType:NoPhysSelCent/Run:%d",runNumber));
1748  }else if(trigClass.Contains("CSEMI") || trigClass.Contains("CVLN")){
1749  trigCount->Count(Form("triggerType:NoPhysSelSemiCent/Run:%d",runNumber));
1750  }
1751  }
1752  if(evSelMask & AliVEvent::kAny){
1753  fHisTrigCent->Fill(0.,centrality);
1754  fHisTrigMul->Fill(0.,multiplicity);
1755  trigCount->Count(Form("triggerType:Any/Run:%d",runNumber));
1756  trigCount2->Count(Form("triggerType:Any/Run:%d",runNumber));
1757  }
1758  if(evSelMask & AliVEvent::kMB){
1759  fHisTrigCent->Fill(1.,centrality);
1760  fHisTrigMul->Fill(1.,multiplicity);
1761  trigCount->Count(Form("triggerType:MB/Run:%d",runNumber));
1762  trigCount2->Count(Form("triggerType:MB/Run:%d",runNumber));
1763  }
1764  if(evSelMask & AliVEvent::kINT7){
1765  fHisTrigCent->Fill(2.,centrality);
1766  fHisTrigMul->Fill(2.,multiplicity);
1767  trigCount->Count(Form("triggerType:CINT7/Run:%d",runNumber));
1768  trigCount2->Count(Form("triggerType:CINT7/Run:%d",runNumber));
1769  }
1770  if(evSelMask & AliVEvent::kINT8){
1771  fHisTrigCent->Fill(3.,centrality);
1772  fHisTrigMul->Fill(3.,multiplicity);
1773  trigCount->Count(Form("triggerType:INT8/Run:%d",runNumber));
1774  trigCount2->Count(Form("triggerType:INT8/Run:%d",runNumber));
1775  }
1776  if(evSelMask & AliVEvent::kCINT5){
1777  fHisTrigCent->Fill(4.,centrality);
1778  fHisTrigMul->Fill(4.,multiplicity);
1779  }
1780  if(evSelMask & AliVEvent::kCentral){
1781  fHisTrigCent->Fill(5.,centrality);
1782  fHisTrigMul->Fill(5.,multiplicity);
1783  trigCount->Count(Form("triggerType:Cent/Run:%d",runNumber));
1784  }
1785  if(evSelMask & AliVEvent::kSemiCentral){
1786  fHisTrigCent->Fill(6.,centrality);
1787  fHisTrigMul->Fill(6.,multiplicity);
1788  trigCount->Count(Form("triggerType:SemiCent/Run:%d",runNumber));
1789  }
1790 
1791  if(evSelMask & AliVEvent::kEMC1){
1792  fHisTrigCent->Fill(7.,centrality);
1793  fHisTrigMul->Fill(7.,multiplicity);
1794  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1795  trigCount2->Count(Form("triggerType:EMC1/Run:%d",runNumber));
1796  }
1797  if((evSelMask & AliVEvent::kEMC7) && trigClass.Contains("CEMC7")){
1798  fHisTrigCent->Fill(8.,centrality);
1799  fHisTrigMul->Fill(8.,multiplicity);
1800  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1801  trigCount2->Count(Form("triggerType:EMC7/Run:%d",runNumber));
1802  }
1803  if((evSelMask & AliVEvent::kEMC8) && trigClass.Contains("CEMC8")){
1804  fHisTrigCent->Fill(9.,centrality);
1805  fHisTrigMul->Fill(9.,multiplicity);
1806  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1807  trigCount2->Count(Form("triggerType:EMC8/Run:%d",runNumber));
1808  }
1809  if(evSelMask & AliVEvent::kEMCEJE){
1810  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1811  if(trigClass.Contains("CEMC7EJE")) {
1812  trigCount2->Count(Form("triggerType:EMCJET7/Run:%d",runNumber));
1813  fHisTrigCent->Fill(10.,centrality);
1814  fHisTrigMul->Fill(10.,multiplicity);
1815 
1816  }
1817  else if(trigClass.Contains("CEMC8EJE")) {
1818  trigCount2->Count(Form("triggerType:EMCJET8/Run:%d",runNumber));
1819  fHisTrigCent->Fill(12.,centrality);
1820  fHisTrigMul->Fill(12.,multiplicity);
1821  }
1822  }
1823  if(evSelMask & AliVEvent::kEMCEGA){
1824  if(trigClass.Contains("CEMC7EGA")) {
1825  fHisTrigCent->Fill(11.,centrality);
1826  fHisTrigMul->Fill(11.,multiplicity);
1827  } else if (trigClass.Contains("CEMC8EGA")){
1828  fHisTrigCent->Fill(13.,centrality);
1829  fHisTrigMul->Fill(13.,multiplicity);
1830 
1831  }
1832  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1833  trigCount2->Count(Form("triggerType:EMCGAMMA/Run:%d",runNumber));
1834  }
1835  if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){
1836  fHisTrigCent->Fill(14.,centrality);
1837  fHisTrigMul->Fill(14.,multiplicity);
1838  trigCount->Count(Form("triggerType:MUON/Run:%d",runNumber));
1839  }
1840  if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){
1841  fHisTrigCent->Fill(15.,centrality);
1842  fHisTrigMul->Fill(15.,multiplicity);
1843  }
1844  if(evSelMask & (AliVEvent::kTRD)){
1845  fHisTrigCent->Fill(16.,centrality);
1846  fHisTrigMul->Fill(16.,multiplicity);
1847  trigCount2->Count(Form("triggerType:TRD/Run:%d",runNumber));
1848  }
1849  if((evSelMask & AliVEvent::kTRD) && trigClass.Contains("HJT")){ // trdSelection.IsFired(AliTRDTriggerAnalysis::kHJT)){
1850  fHisTrigCent->Fill(17.,centrality);
1851  fHisTrigMul->Fill(17.,multiplicity);
1852  trigCount2->Count(Form("triggerType:TRDHJT/Run:%d",runNumber));
1853  }
1854  if((evSelMask & AliVEvent::kTRD) && trigClass.Contains("HSE")){ //trdSelection.IsFired(AliTRDTriggerAnalysis::kHSE)){
1855  fHisTrigCent->Fill(18.,centrality);
1856  fHisTrigMul->Fill(18.,multiplicity);
1857  trigCount2->Count(Form("triggerType:TRDHSE/Run:%d",runNumber));
1858  }
1859  if(evSelMask & (AliVEvent::kHighMult)){
1860  fHisTrigCent->Fill(19.,centrality);
1861  fHisTrigMul->Fill(19.,multiplicity);
1862  trigCount2->Count(Form("triggerType:HighMult/Run:%d",runNumber));
1863  }
1864  if(evSelMask & AliVEvent::kSPI7){
1865  if(trigClass.Contains("CSPI7")) {
1866  fHisTrigCent->Fill(20.,centrality);
1867  fHisTrigMul->Fill(20.,multiplicity);
1868  trigCount2->Count(Form("triggerType:SPI7/Run:%d",runNumber));
1869  }
1870  }
1871  if(evSelMask & AliVEvent::kSPI){
1872  if(trigClass.Contains("CSPI8")) {
1873  fHisTrigCent->Fill(21.,centrality);
1874  fHisTrigMul->Fill(21.,multiplicity);
1875  trigCount2->Count(Form("triggerType:SPI8/Run:%d",runNumber));
1876  }
1877  }
1878  if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){
1879  fHisTrigCent->Fill(22.,centrality);
1880  fHisTrigMul->Fill(22.,multiplicity);
1881  }
1882  }
1883 
1884 
1885  // fix for temporary bug in ESDfilter
1886  // the AODs with null vertex pointer didn't pass the PhysSel
1887  Double_t magField = aod->GetMagneticField();
1888  if(!aod->GetPrimaryVertex() || TMath::Abs(magField)<0.001) {
1889  delete [] pdgdaughters;
1890  return;
1891  }
1892 
1893  // count event
1894  fHisNentries->Fill(5);
1895  //count events with good vertex
1896  // AOD primary vertex
1897  AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
1898  Double_t pos[3],cov[6];
1899  vtx1->GetXYZ(pos);
1900  vtx1->GetCovarianceMatrix(cov);
1901  const AliESDVertex vESD(pos,cov,100.,100);
1902 
1903  TString primTitle = vtx1->GetTitle();
1904  if(primTitle.Contains("VertexerTracks") && vtx1->GetNContributors()>0) fHisNentries->Fill(9);
1905 
1906  // trigger class for PbPb C0SMH-B-NOPF-ALLNOTRD, C0SMH-B-NOPF-ALL
1907  //TString trigclass=aod->GetFiredTriggerClasses();
1908  //if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL")) fHisNentries->Fill(9); //tmp
1909 
1910 
1911 
1912 
1913  Bool_t evSelbyCentrality=kTRUE,evSelected=kTRUE,evSelByVertex=kTRUE,evselByPileup=kTRUE,evSelByPS=kTRUE;
1914 
1915  if(fOnOff[3]){
1916  fHisWhyEvRejected->Fill(-1);
1917  }
1918 
1919  //select event
1920  if(!fCuts->IsEventSelected(aod)) {
1921  evSelected=kFALSE;
1923  fHisWhyEvRejected->Fill(0);
1924  evselByPileup=kFALSE;
1925  }// rejected for pileup
1927  fHisWhyEvRejected->Fill(1);
1928  evSelbyCentrality=kFALSE; //rejected by centrality
1929  }
1932  evSelByVertex=kFALSE;
1933  fHisWhyEvRejected->Fill(2);
1934  }
1936  fHisWhyEvRejected->Fill(3);
1937  }
1939  evSelByVertex=kFALSE;
1940  if(fOnOff[3]) ((AliCounterCollection*)fOutputEvSelection->FindObject("evselection"))->Count(Form("evnonsel:zvtx/Run:%d",runNumber));
1941  fHisWhyEvRejected->Fill(4);
1942  }
1944  evSelByPS=kFALSE;
1945  fHisWhyEvRejected->Fill(5);
1946  }
1947  }
1948  if(evSelected && fOnOff[3]){
1949  fHisTrigCentSel->Fill(-1.,centrality);
1950  fHisTrigMulSel->Fill(-1.,multiplicity);
1951  if(evSelMask & AliVEvent::kAny) {
1952  fHisTrigCentSel->Fill(0.,centrality);
1953  fHisTrigMulSel->Fill(0.,multiplicity);}
1954  if(evSelMask & AliVEvent::kMB) {
1955  fHisTrigCentSel->Fill(1.,centrality);
1956  fHisTrigMulSel->Fill(1.,multiplicity);}
1957  if(evSelMask & AliVEvent::kINT7){
1958  fHisTrigCentSel->Fill(2.,centrality);
1959  fHisTrigMulSel->Fill(2.,multiplicity);}
1960  if(evSelMask & AliVEvent::kINT8){
1961  fHisTrigCentSel->Fill(3.,centrality);
1962  fHisTrigMulSel->Fill(3.,multiplicity);}
1963  if(evSelMask & AliVEvent::kCINT5){
1964  fHisTrigCentSel->Fill(4.,centrality);
1965  fHisTrigMulSel->Fill(4.,multiplicity);}
1966  if(evSelMask & AliVEvent::kCentral){
1967  fHisTrigCentSel->Fill(5.,centrality);
1968  fHisTrigMulSel->Fill(5.,multiplicity);}
1969  if(evSelMask & AliVEvent::kSemiCentral){
1970  fHisTrigCentSel->Fill(6.,centrality);
1971  fHisTrigMulSel->Fill(6.,multiplicity);}
1972  if(evSelMask & AliVEvent::kEMC1){
1973  fHisTrigCentSel->Fill(7.,centrality);
1974  fHisTrigMulSel->Fill(7.,multiplicity);
1975  }
1976  if((evSelMask & AliVEvent::kEMC7) && trigClass.Contains("CEMC7")){
1977  fHisTrigCentSel->Fill(8.,centrality);
1978  fHisTrigMulSel->Fill(8.,multiplicity);
1979  }
1980  if((evSelMask & AliVEvent::kEMC8) && trigClass.Contains("CEMC8")){
1981  fHisTrigCentSel->Fill(9.,centrality);
1982  fHisTrigMulSel->Fill(9.,multiplicity);
1983  }
1984  if((evSelMask & AliVEvent::kEMCEJE) && trigClass.Contains("CEMC7EJE")){
1985  fHisTrigCentSel->Fill(10.,centrality);
1986  fHisTrigMulSel->Fill(10.,multiplicity);
1987  }
1988  if((evSelMask & AliVEvent::kEMCEGA) && trigClass.Contains("CEMC7EGA")){
1989  fHisTrigCentSel->Fill(11.,centrality);
1990  fHisTrigMulSel->Fill(11.,multiplicity);
1991  }
1992  if((evSelMask & AliVEvent::kEMCEJE) && trigClass.Contains("CEMC8EJE")){
1993  fHisTrigCentSel->Fill(12.,centrality);
1994  fHisTrigMulSel->Fill(12.,multiplicity);
1995  }
1996  if((evSelMask & AliVEvent::kEMCEGA) && trigClass.Contains("CEMC8EGA")){
1997  fHisTrigCentSel->Fill(13.,centrality);
1998  fHisTrigMulSel->Fill(13.,multiplicity);
1999  }
2000  if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){
2001  fHisTrigCentSel->Fill(14.,centrality);
2002  fHisTrigMulSel->Fill(14.,multiplicity);}
2003  if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){
2004  fHisTrigCentSel->Fill(15.,centrality);
2005  fHisTrigMulSel->Fill(15.,multiplicity);}
2006  if(evSelMask & (AliVEvent::kTRD)){
2007  fHisTrigCentSel->Fill(16.,centrality);
2008  fHisTrigMulSel->Fill(16.,multiplicity);
2009  }
2010  if((evSelMask & AliVEvent::kTRD) && trigClass.Contains("HJT")){ //trdSelection.IsFired(AliTRDTriggerAnalysis::kHJT)){
2011  fHisTrigCentSel->Fill(17.,centrality);
2012  fHisTrigMulSel->Fill(17.,multiplicity);
2013  }
2014  if((evSelMask & AliVEvent::kTRD) && trigClass.Contains("HSE")){ // trdSelection.IsFired(AliTRDTriggerAnalysis::kHSE)){
2015  fHisTrigCentSel->Fill(18.,centrality);
2016  fHisTrigMulSel->Fill(18.,multiplicity);
2017  }
2018  if(evSelMask & (AliVEvent::kHighMult)){
2019  fHisTrigCentSel->Fill(19.,centrality);
2020  fHisTrigMulSel->Fill(19.,multiplicity);}
2021  if(evSelMask & AliVEvent::kSPI7){
2022  if(trigClass.Contains("CSPI7")) {
2023  fHisTrigCentSel->Fill(20.,centrality);
2024  fHisTrigMulSel->Fill(20.,multiplicity);
2025  }
2026  }
2027  if(evSelMask & AliVEvent::kSPI){
2028  if(trigClass.Contains("CSPI8")) {
2029  fHisTrigCentSel->Fill(21.,centrality);
2030  fHisTrigMulSel->Fill(21.,multiplicity);
2031  }
2032  }
2033  if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){
2034  fHisTrigCentSel->Fill(22.,centrality);
2035  fHisTrigMulSel->Fill(22.,multiplicity);}
2036  }
2037 
2038  if(evSelected || (!evSelbyCentrality && evSelByVertex && evselByPileup && evSelByPS)){ //events selected or not selected because of centrality
2039  if(fOnOff[2] && fCuts->GetUseCentrality()){
2040 
2041  Float_t stdCentf=fCuts->GetCentrality(aod);
2042  Int_t stdCent = (Int_t)(stdCentf+0.5);
2043  Float_t secondCentf =fCuts->GetCentrality(aod,fEstimator);
2044  Int_t secondCent = (Int_t)(secondCentf+0.5);
2045  Int_t mincent=stdCent-stdCent%10;
2046  Float_t stdSignal = 0.;
2047  Float_t secondSignal = 0.;
2048  AliAODVZERO *vzeroAOD = (AliAODVZERO*)aod->GetVZEROData();
2049  AliAODZDC *zdcAOD = (AliAODZDC*)aod->GetZDCData();
2050  const Double_t *towerZNASignal = zdcAOD->GetZNATowerEnergy();
2051  switch(fCuts->GetUseCentrality())
2052  {
2053  case AliRDHFCuts::kCentV0M:
2054  stdSignal = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C();
2055  break;
2056  case AliRDHFCuts::kCentV0A:
2057  stdSignal = vzeroAOD->GetMTotV0A();
2058  break;
2059  case AliRDHFCuts::kCentZNA:
2060  stdSignal = towerZNASignal[0];
2061  break;
2062  default:
2063  stdSignal = 0.;
2064  break;
2065  }
2066  switch(fEstimator)
2067  {
2068  case AliRDHFCuts::kCentV0M:
2069  secondSignal = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C();
2070  break;
2071  case AliRDHFCuts::kCentV0A:
2072  secondSignal = vzeroAOD->GetMTotV0A();
2073  break;
2074  case AliRDHFCuts::kCentZNA:
2075  secondSignal = towerZNASignal[0];
2076  break;
2077  default:
2078  secondSignal = 0.;
2079  break;
2080  }
2081  //AliCentrality *aodcent = aod->GetCentrality();
2082  // Float_t spdCentf = aodcent->GetCentralityPercentile("CL1");
2083  if(stdCentf==-1) {
2084  mincent=-10;
2085  stdCent=-1;
2086  }
2087  if(mincent==100)mincent--;
2088  ((AliCounterCollection*)fOutputCounters->FindObject("stdEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber));
2089 
2090  mincent=secondCent-secondCent%10;
2091  if(secondCentf==-1) {
2092  mincent=-10;
2093  secondCent=-1;
2094  }
2095  if(mincent==100)mincent--;
2096  ((AliCounterCollection*)fOutputCounters->FindObject("secondEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber));
2097 
2098  if(stdCent<fCuts->GetMinCentrality() || stdCent>fCuts->GetMaxCentrality()){
2099  fHisNtrackletsOut->Fill(aod->GetTracklets()->GetNumberOfTracklets());
2100  fHisMultOut->Fill(header->GetRefMultiplicity());
2101  }else{
2102  fHisNtrackletsIn->Fill(aod->GetTracklets()->GetNumberOfTracklets());
2103  fHisMultIn->Fill(header->GetRefMultiplicity());
2104  }
2105  fHisMultvsPercentile->Fill(header->GetRefMultiplicity(),stdCentf);
2106  fHisntrklvsPercentile->Fill(aod->GetTracklets()->GetNumberOfTracklets(),stdCentf);
2108  fHisnTPCTracksvsPercentile->Fill(nSelTracksTPCOnly,stdCentf);
2109  fHisnTPCITSTracksvsPercentile->Fill(nSelTracksTPCITS,stdCentf);
2110  fHisnTPCITS1SPDTracksvsPercentile->Fill(nSelTracksTPCITS1SPD,stdCentf);
2111  fHisStdEstimSignalPercentile->Fill(stdSignal,stdCentf);
2112  fHisStdEstimSignal->Fill(stdSignal);
2113  fHisStdEstimSignalNtrackletsIn->Fill(stdSignal,aod->GetTracklets()->GetNumberOfTracklets());
2114  fHisStdPercentileSecondPercentile->Fill(stdCentf,secondCentf);
2115  fHisStdSignalSecondSignal->Fill(stdSignal,secondSignal);
2116 
2117  if( (fCuts->GetMultSelectionObjectName()).CompareTo("MultSelection")!=0 ){
2118  AliMultSelection *multSelectionOld = (AliMultSelection*) aod -> FindListObject("MultSelection");
2119  Float_t oldFrmwCent = multSelectionOld ? multSelectionOld->GetMultiplicityPercentile("V0M") : -1;
2120  // Printf(" HFQA task: new centrality %3.3f vs old centrality %3.2f \n",stdCentf,oldFrmwCent);
2121  fHisStdPercentileOldFrwPercentile->Fill(stdCentf,oldFrmwCent);
2122  //
2123  Double_t differenceCent = TMath::Abs( stdCentf - oldFrmwCent );
2124  if(differenceCent>1) fHisStdPercentileOldFrwPercentileDev->Fill(0.);
2125  if(differenceCent>0.5) fHisStdPercentileOldFrwPercentileDev->Fill(1.);
2126  if( (stdCentf<20) && (oldFrmwCent>20) ) fHisStdPercentileOldFrwPercentileDev->Fill(2.);
2127  if( (stdCentf>20) && (oldFrmwCent<20) ) fHisStdPercentileOldFrwPercentileDev->Fill(3.);
2129  }
2130 
2131  PostData(6,fOutputCheckCentrality);
2132 
2133  } else{
2134  if(fOnOff[0]){
2135  fHisNtracklets->Fill(aod->GetTracklets()->GetNumberOfTracklets());
2137  fHisMult->Fill(header->GetRefMultiplicity());
2138  fHisMultFBit4->Fill(ntracksFBit4);
2139  fHisMultComb05->Fill(header->GetRefMultiplicityComb05());
2140  fHisMultComb08->Fill(header->GetRefMultiplicityComb08());
2141  }
2142  }
2143  }
2144 
2145  if(evSelected || (!evSelbyCentrality && evSelByVertex && evselByPileup && evSelByPS) || (!evSelByVertex && evselByPileup && evSelByPS)){ //events selected or not selected because of centrality
2146  if(fOnOff[2] && fCuts->GetUseCentrality()){
2148  }else{
2149  if(fOnOff[0]){
2151  }
2152  }
2153  }
2154 
2155  if(fOnOff[3]){
2156  const AliVVertex *vertex = aod->GetPrimaryVertex();
2157  Double_t xvtx=vertex->GetX();
2158  Double_t yvtx=vertex->GetY();
2159  Double_t zvtx=vertex->GetZ();
2160  Int_t vtxTyp=0;
2161  if(vertex->GetNContributors()<=0) vtxTyp=-1;
2162  TString title=vertex->GetTitle();
2163  if(title.Contains("Z")) vtxTyp=2;
2164  if(title.Contains("3D")) vtxTyp=1;
2165  fHisxvtx->Fill(xvtx);
2166  fHisyvtx->Fill(yvtx);
2167  fHiszvtx->Fill(zvtx);
2168  fHisWhichVert->Fill(vtxTyp);
2169  const AliVVertex *vSPD = aod->GetPrimaryVertexSPD();
2170  fHiszvtxvsSPDzvtx->Fill(vSPD->GetZ(),zvtx);
2171  if(evSelected){
2172  fHisxvtxSelEv->Fill(xvtx);
2173  fHisyvtxSelEv->Fill(yvtx);
2174  fHiszvtxSelEv->Fill(zvtx);
2175  fHisWhichVertSelEv->Fill(vtxTyp);
2176  fHiszvtxvsSPDzvtxSel->Fill(vSPD->GetZ(),zvtx);
2177  }
2178 
2179  Int_t nCls = aod->GetNumberOfITSClusters(0) + aod->GetNumberOfITSClusters(1);
2180  fHisnClsITSvsNtrackletsSel->Fill(nCls,aod->GetTracklets()->GetNumberOfTracklets());
2181 
2182  }
2183 
2184  if(!evSelected) {
2185  delete [] pdgdaughters;
2186  return; //discard all events not selected (vtx and/or centrality)
2187  }
2188 
2189 
2190  AliAODPidHF* pidHF=fCuts->GetPidHF();
2191  if(!pidHF) {
2192  delete [] pdgdaughters;
2193  return;
2194  }
2195  //load all the branches, re-fill the candidates and fill the SelectionBit histo
2196 
2197  Int_t nCand3Prong = arrayProng3Prong->GetEntriesFast();
2198  Int_t nCandD0toKpi = arrayProngD0toKpi->GetEntriesFast();
2199  Int_t nCandDstar = arrayProngDstar->GetEntriesFast();
2200  Int_t nCandCasc=0;
2201  // Int_t n4Prong=0;
2202  if(arrayProngCascades)nCandCasc = arrayProngCascades->GetEntriesFast();
2203  // if(arrayProng4Prong)n4Prong = arrayProng4Prong->GetEntriesFast();
2204  // D+, Ds and Lc
2205  AliAODRecoDecayHF *d;
2206  for (Int_t iCand = 0; iCand < nCand3Prong; iCand++) {
2207  d = (AliAODRecoDecayHF*)arrayProng3Prong->UncheckedAt(iCand);
2208  if(!vHF->FillRecoCand(aod,(AliAODRecoDecayHF3Prong*)d))continue;
2209 
2210  if(fUseSelectionBit){
2211  Double_t ptCand_selBit = d->Pt();
2212  if(fUseSelectionBit && d->GetSelectionMap()) {
2213  if(d->HasSelectionBit(AliRDHFCuts::kDplusCuts)) fHisNentriesSelBit->Fill(0.0,ptCand_selBit);
2214  if(d->HasSelectionBit(AliRDHFCuts::kDsCuts)) fHisNentriesSelBit->Fill(1.0,ptCand_selBit);
2215  if(d->HasSelectionBit(AliRDHFCuts::kLcCuts)) fHisNentriesSelBit->Fill(2.0,ptCand_selBit);
2216  }
2217  }
2218  }
2219  // D0kpi
2220  for (Int_t iCand = 0; iCand < nCandD0toKpi; iCand++) {
2221  d = (AliAODRecoDecayHF*)arrayProngD0toKpi->UncheckedAt(iCand);
2222  if(!vHF->FillRecoCand(aod,(AliAODRecoDecayHF2Prong*)d))continue;
2223  if(fUseSelectionBit){
2224  Double_t ptCand_selBit = d->Pt();
2225  if(fUseSelectionBit && d->GetSelectionMap()) {
2226  if(d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) fHisNentriesSelBit->Fill(3.0,ptCand_selBit);
2227  }
2228  }
2229  }
2230  // Dstar
2231  for (Int_t iCand = 0; iCand < nCandDstar; iCand++) {
2232  d = (AliAODRecoDecayHF*)arrayProngDstar->UncheckedAt(iCand);
2233  if(!vHF->FillRecoCasc(aod,((AliAODRecoCascadeHF*)d),kTRUE))continue;
2234  if(fUseSelectionBit){
2235  Double_t ptCand_selBit = d->Pt();
2236  if(fUseSelectionBit && d->GetSelectionMap()) {
2237  if(d->HasSelectionBit(AliRDHFCuts::kDstarCuts)) fHisNentriesSelBit->Fill(4.0,ptCand_selBit);
2238  }
2239  }
2240  }
2241 // //Cascade
2242  if(arrayProngCascades){
2243  for (Int_t iCand = 0; iCand < nCandCasc; iCand++) {
2244  d=(AliAODRecoDecayHF*)arrayProngCascades->UncheckedAt(iCand);
2245  if(!vHF->FillRecoCasc(aod,((AliAODRecoCascadeHF*)d),kFALSE))continue;
2246  }
2247  }
2248  //end refill
2249 
2250  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
2251  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
2252  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
2253 
2254  //AliPIDResponse* respF=pidHF->GetPidResponse();
2255  AliTPCPIDResponse* tpcres=new AliTPCPIDResponse();
2256  Bool_t oldPID=pidHF->GetOldPid();
2257  if(oldPID){
2258  Double_t alephParameters[5];
2259  pidHF->GetTPCBetheBlochParams(alephParameters);
2260  tpcres->SetBetheBlochParameters(alephParameters[0],alephParameters[1],alephParameters[2],alephParameters[3],alephParameters[4]);
2261  }
2262 
2263 
2264  Int_t ntracks=0;
2265  Int_t isGoodTrack=0, isFakeTrack=0, isSelTrack=0;
2266 
2267  if(aod) ntracks=aod->GetNumberOfTracks();
2268 
2269  if(fOnOff[0] || fOnOff[1]){
2270  //loop on tracks in the event
2271  for (Int_t k=0;k<ntracks;k++){
2272  AliAODTrack* track=dynamic_cast<AliAODTrack*>(aod->GetTrack(k));
2273  if(!track) AliFatal("Not a standard AOD");
2274  // Track selection cuts
2275  if(track->GetID()<0) continue;
2276  Double_t d0z0[2],covd0z0[3];
2277  if(!track->PropagateToDCA(vtx1,magField,99999.,d0z0,covd0z0)) continue;
2278  if(track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){
2279  fHisd0TracksFilterBit4->Fill(d0z0[0]);
2280  }
2281  ULong_t trStatus=track->GetStatus();
2282  if(trStatus&AliESDtrack::kITSrefit){
2283  if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){
2284  fHisd0TracksSPDany->Fill(d0z0[0]);
2285  if(track->HasPointOnITSLayer(0)){
2286  fHisd0TracksSPDin->Fill(d0z0[0]);
2287  }
2288  }
2289  }
2290 
2291  Bool_t selTrack=kTRUE;
2292  if (!((trStatus & AliVTrack::kTPCrefit) == AliVTrack::kTPCrefit) ||
2293  !((trStatus & AliVTrack::kITSrefit) == AliVTrack::kITSrefit)){
2294  selTrack=kFALSE;
2295  }
2296  if(!track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){ // BIT(4) standard cuts with very loose DCA
2297  selTrack=kFALSE;
2298  }
2299  if(TMath::Abs(track->Eta())>0.9){
2300  selTrack=kFALSE;
2301  }
2302  Float_t nCrossedRowsTPC = track->GetTPCClusterInfo(2,1);
2303  Float_t ratioCrossedRowsOverFindableClustersTPC = 1.0;
2304  if (track->GetTPCNclsF()>0) {
2305  ratioCrossedRowsOverFindableClustersTPC = nCrossedRowsTPC/track->GetTPCNclsF();
2306  }
2307 
2308  Bool_t selTrackNoSPD=selTrack;
2309  if(selTrack){
2310  if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){
2311  fHisd0TracksTPCITSSPDany->Fill(d0z0[0]);
2312  }
2313  }
2314 
2315  AliAODPid *pid = track->GetDetPid();
2316  if(!pid && fDebug>1) cout<<"No AliAODPid found"<<endl;
2317 
2318  if(pid && fOnOff[1]){
2319  Double_t times[AliPID::kSPECIES];
2320  pid->GetIntegratedTimes(times);
2321 
2322  Double_t tofRes[AliPID::kSPECIES];
2323  pid->GetTOFpidResolution(tofRes);
2324 
2325  //check TOF
2326  fHisTOFflags->Fill(0.);
2327  if (trStatus&AliESDtrack::kTPCout) fHisTOFflags->Fill(1.);
2328  if (trStatus&AliESDtrack::kTOFout) fHisTOFflags->Fill(2.);
2329  if (trStatus&AliESDtrack::kTIME) fHisTOFflags->Fill(3.);
2330  if (trStatus&AliESDtrack::kTOFpid) fHisTOFflags->Fill(4.);
2331  if (trStatus&AliESDtrack::kTOFmismatch) fHisTOFflags->Fill(5.);
2332 
2333  Bool_t isTOFok=kFALSE;
2334  if(pidResp){
2335  Double_t prob[AliPID::kSPECIES];
2336  if(pidResp->ComputeTOFProbability(track,AliPID::kSPECIES,prob)==AliPIDResponse::kDetPidOk){
2337  isTOFok=kTRUE;
2338  fHisTOFflags->Fill(6.);
2339  }
2340  }
2341 
2342  if(selTrack && isTOFok){
2343  Double_t tofTime=pid->GetTOFsignal();
2344  AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader();
2345  if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD
2346  // with new AOD we need to retrieve startTime, subtract it and retrieve correctly TOF PID resolutions *PA*
2347  AliTOFPIDResponse tofResp=pidResp->GetTOFResponse();
2348  Double_t startTime = tofResp.GetStartTime(track->P());
2349  Float_t startTimeRes = tofResp.GetStartTimeRes(track->P());
2350  Int_t startTimeMask = tofResp.GetStartTimeMask(track->P());
2351  fHisTOFstartTimeDistrib->Fill(startTime);
2352  fHisTOFstartTimeMask->Fill(startTimeMask);
2353  fHisTOFstartTimeRes->Fill(startTimeRes);
2354  tofTime-=startTime;
2355  for (Int_t type=0;type<AliPID::kSPECIES;type++) tofRes[type]=tofResp.GetExpectedSigma(track->P(),times[type],AliPID::ParticleMassZ(type));
2356  }
2357  fHisTOFtime->Fill(times[AliPID::kKaon]);
2358  fHisTOFtimeKaonHyptime->Fill(track->P(),tofTime-times[3]); //3 is kaon
2359  fHisTOFsig->Fill(tofTime);
2360  if (pid->GetTOFsignal()< 0) fHisTOFsig->Fill(-1);
2361 
2362  Double_t nsigma[3]={-10,-10,-10};
2363  nsigma[0]=pidResp->NumberOfSigmasTOF(track,AliPID::kPion);
2364  nsigma[1]=pidResp->NumberOfSigmasTOF(track,AliPID::kKaon);
2365  nsigma[2]=pidResp->NumberOfSigmasTOF(track,AliPID::kProton);
2366 
2367  fHisTOFsigmaKSigPid->Fill(track->P(),nsigma[1]);
2368  fHisTOFsigmaPionSigPid->Fill(track->P(),nsigma[0]);
2369  fHisTOFsigmaProtonSigPid->Fill(track->P(),nsigma[2]);
2370  if(fReadMC){
2371  Int_t label=track->GetLabel();
2372  if(label<=0) continue;
2373  AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label);
2374  if(mcpart){
2375  Int_t abspdgcode=TMath::Abs(mcpart->PdgCode());
2376  if(abspdgcode==211) fHisTOFsigmaMCPionSigPid->Fill(track->P(),nsigma[0]);
2377  if(abspdgcode==321) fHisTOFsigmaMCKSigPid->Fill(track->P(),nsigma[1]);
2378  if(abspdgcode==2212) fHisTOFsigmaMCProtonSigPid->Fill(track->P(),nsigma[2]);
2379 
2380  }
2381  }
2382 
2383  for (Int_t iS=2; iS<5; iS++){ //we plot TOF Pid resolution for 3-sigma identified particles
2384  if ( TMath::Abs(nsigma[iS-2])<3.){
2385  switch (iS) {
2386  case AliPID::kPion:
2387  fHisTOFsigPid3sigPion->Fill(tofRes[iS]);
2388  break;
2389  case AliPID::kKaon:
2390  fHisTOFsigPid3sigKaon->Fill(tofRes[iS]);
2391  break;
2392  case AliPID::kProton:
2393  fHisTOFsigPid3sigProton->Fill(tofRes[iS]);
2394  break;
2395  default:
2396  break;
2397  }
2398  }
2399  }
2400  }//if TOF status
2401  //}
2402 
2403  if(pidHF && pidHF->CheckStatus(track,"TPC") && selTrack){
2404 
2405  Double_t TPCp=pid->GetTPCmomentum();
2406  Double_t TPCsignal=pid->GetTPCsignal();
2407  UShort_t TPCsignalN=pid->GetTPCsignalN();
2408  fHisTPCsig->Fill(TPCsignal);
2409  fHisTPCsigvsp->Fill(TPCp,TPCsignal);
2410  //if (pidHF->IsKaonRaw(track, "TOF"))
2411  Double_t nsigma[3]={-10,-10,-10};
2412  pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kPion,nsigma[0]);
2413  pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kKaon,nsigma[1]);
2414  pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kProton,nsigma[2]);
2415 
2416  fHisTPCsigmaK->Fill(TPCp,nsigma[1]);
2417 
2418  fHisTPCsigmaPion->Fill(TPCp,nsigma[0]);
2419  fHisTPCsigmaProton->Fill(TPCp,nsigma[2]);
2420 
2421  if(fReadMC){
2422  Int_t label=track->GetLabel();
2423  if(label<=0) continue;
2424  AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label);
2425  if(mcpart){
2426  Int_t abspdgcode=TMath::Abs(mcpart->PdgCode());
2427  if(abspdgcode==211) fHisTPCsigmaMCPion->Fill(track->P(),nsigma[0]);
2428  if(abspdgcode==321) fHisTPCsigmaMCK->Fill(track->P(),nsigma[1]);
2429  if(abspdgcode==2212) fHisTPCsigmaMCProton->Fill(track->P(),nsigma[2]);
2430 
2431  }
2432 
2433  }
2434  if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){
2435  fHisTPCsigNvsPtAllTracks->Fill(track->Pt(),(Float_t)TPCsignalN);
2436  fHisTPCsigNvsPhiAllTracks->Fill(track->Phi(),(Float_t)TPCsignalN);
2437  fHisTPCsigNvsEtaAllTracks->Fill(track->Eta(),(Float_t)TPCsignalN);
2438  }
2439 
2440  }//if TPC status
2441  } //end PID histograms
2442 
2443  Int_t nclsTot=0,nclsSPD=0;
2444 
2445  //check clusters of the tracks
2446  if(fOnOff[0]){
2447 
2448  fHisnLayerITS->Fill(-1);
2449  if(selTrackNoSPD) fHisnLayerITSselTr->Fill(-1);
2450  for(Int_t l=0;l<6;l++) {
2451  if(TESTBIT(track->GetITSClusterMap(),l)) {
2452  fHisnLayerITS->Fill(l);
2453  if(selTrackNoSPD) fHisnLayerITSselTr->Fill(l);
2454  nclsTot++; if(l<2) nclsSPD++;
2455  }
2456  }
2457  fHisnClsITS->Fill(nclsTot);
2458  fHisnClsSPD->Fill(nclsSPD);
2459 
2460  if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){
2461 
2462  fHisPtAllTracks->Fill(track->Pt());
2463  fHisPhiAllTracks->Fill(track->Phi());
2464  fHisEtaAllTracks->Fill(track->Eta());
2465  fHisEtavsPhiAllTracks->Fill(track->Phi(),track->Eta());
2466  fHisNTPCclsvsPtAllTracks->Fill(track->Pt(),track->GetTPCNcls());
2467  fHisNTPCclsvsPhiAllTracks->Fill(track->Phi(),track->GetTPCNcls());
2468  fHisNTPCclsvsEtaAllTracks->Fill(track->Eta(),track->GetTPCNcls());
2469 
2470  fHisNTPCCrossedRowsvsPtAllTracks->Fill(track->Pt(),nCrossedRowsTPC);
2471  fHisNTPCCrossedRowsvsPhiAllTracks->Fill(track->Phi(),nCrossedRowsTPC);
2472  fHisNTPCCrossedRowsvsEtaAllTracks->Fill(track->Eta(),nCrossedRowsTPC);
2473 
2474  fHisRatioCRowsOverFclsvsPtAllTracks->Fill(track->Pt(),ratioCrossedRowsOverFindableClustersTPC);
2475  fHisRatioCRowsOverFclsvsPhiAllTracks->Fill(track->Phi(),ratioCrossedRowsOverFindableClustersTPC);
2476  fHisRatioCRowsOverFclsvsEtaAllTracks->Fill(track->Eta(),ratioCrossedRowsOverFindableClustersTPC);
2477 
2478  if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points
2479  fHisSPDclsAllTracks->Fill(0);
2480  }
2481  if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst
2482  fHisSPDclsAllTracks->Fill(1);
2483  }
2484  if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond
2485  fHisSPDclsAllTracks->Fill(2);
2486  }
2487  if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth
2488  fHisSPDclsAllTracks->Fill(3);
2489  }
2490  fHisNITSclsvsPtAllTracks->Fill(track->Pt(), nclsTot);
2491  fHisNITSclsvsPhiAllTracks->Fill(track->Phi(), nclsTot);
2492  fHisNITSclsvsEtaAllTracks->Fill(track->Eta(), nclsTot);
2493 
2494  }
2495 
2496  if(track->Pt()>0.3 &&
2497  TMath::Abs(track->Eta())<0.8 &&
2498  track->GetStatus()&AliESDtrack::kITSrefit &&
2499  track->GetStatus()&AliESDtrack::kTPCrefit &&
2500  nclsSPD>0){
2501  fHisnClsITSselTr->Fill(nclsTot);
2502  }
2503  if(!(track->GetStatus()&AliESDtrack::kTPCin) && track->GetStatus()&AliESDtrack::kITSrefit && !(track->GetStatus()&AliESDtrack::kITSpureSA)){//tracks retrieved in the ITS and not reconstructed in the TPC
2504  fHisnClsITSSA->Fill(nclsTot);
2505  if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1))
2506  fHisnClsITSSAspdAny->Fill(nclsTot);
2507  if(track->HasPointOnITSLayer(0))
2508  fHisnClsITSSAspdIn->Fill(nclsTot);
2509  if(track->HasPointOnITSLayer(1))
2510  fHisnClsITSSAspdOut->Fill(nclsTot);
2511  fHisnLayerITSsa->Fill(-1);
2512  for(Int_t l=0;l<6;l++) {
2513  if(TESTBIT(track->GetITSClusterMap(),l)) {
2514  fHisnLayerITSsa->Fill(l);
2515  }
2516  }
2517  }
2518  Int_t label=0;
2519  if(fReadMC){
2520  label=track->GetLabel();
2521  if (label<0) fHisNentries->Fill(13);
2522  else fHisNentries->Fill(14);
2523  }
2524 
2525 
2526  if (track->Pt()>0.3 &&
2527  track->GetStatus()&AliESDtrack::kTPCrefit &&
2528  track->GetStatus()&AliESDtrack::kITSrefit &&
2529  /*nclsTot>3 &&*/
2530  nclsSPD>0) {//count good tracks
2531 
2532 
2533  if(fReadMC && label<0) {
2534  fHisptFakeTr->Fill(track->Pt());
2535  isFakeTrack++;
2536  } else {
2537  fHisptGoodTr->Fill(track->Pt());
2538  isGoodTrack++;
2539  }
2540 
2541  if(fCuts->IsDaughterSelected(track,&vESD,fCuts->GetTrackCuts(),aod)){
2542  isSelTrack++;
2543  }//select tracks for our analyses
2544 
2545  }
2546  } //fill track histos
2547  } //end loop on tracks
2548 
2549  //fill once per event
2550  if(fOnOff[0]){
2551  if (fReadMC) fHisdistrFakeTr->Fill(isFakeTrack);
2552  fHisdistrGoodTr->Fill(isGoodTrack);
2553  fHisdistrSelTr->Fill(isSelTrack);
2554  }
2555 
2556  if(!isSimpleMode){
2557  // loop over candidates
2558  Int_t nCand = arrayProng->GetEntriesFast();
2559  Int_t ndaugh=3;
2562 
2563  for (Int_t iCand = 0; iCand < nCand; iCand++) {
2564  AliAODRecoDecayHF *d = (AliAODRecoDecayHF*)arrayProng->UncheckedAt(iCand);
2565  if(d->GetIsFilled()<1) continue;//0 = not refilled. or refill failed. 1 = standard dAODs. 2 = succesfully refilled
2566  if(fUseSelectionBit && d->GetSelectionMap()) {
2567  if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpi && !d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) continue; //skip the D0 from Dstar
2569  }
2570  if(fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && !((dynamic_cast<AliAODRecoCascadeHF*>(d))->CheckCascadeFlags())) continue;
2571 
2572  if(fReadMC){
2573 
2574  Int_t labD = -1;
2575  if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) {
2576 
2577  Int_t pdgDgLctoV0bachelor[2]={2212,310};
2578  Int_t pdgDgV0toDaughters[2]={211,211};
2579  Int_t mcLabelK0S = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->K0S+p and cc
2580  pdgDgLctoV0bachelor[1]=3122, pdgDgLctoV0bachelor[0]=211;
2581  pdgDgV0toDaughters[0]=2212, pdgDgV0toDaughters[1]=211;
2582  Int_t mcLabelLambda = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->Lambda+pi and cc
2583  if (mcLabelK0S!=-1 || mcLabelLambda!=-1) AliInfo(Form("mcLabelK0S=%d - mcLabelLambda=%d",mcLabelK0S,mcLabelLambda));
2584 
2585  if (mcLabelK0S!=-1 && mcLabelLambda!=-1)
2586  AliInfo("Strange: current Lc->V0+bachelor candidate has two MC different labels!");
2587  else if (mcLabelK0S>-1 && mcLabelLambda==-1)
2588  labD = mcLabelK0S;
2589  else if (mcLabelLambda>-1 && mcLabelK0S==-1)
2590  labD = mcLabelLambda;
2591  }
2592  else
2593  labD = d->MatchToMC(pdg,mcArray,ndaugh,pdgdaughters);
2594 
2595  if(labD>=0){
2596  AliAODMCParticle *partD = (AliAODMCParticle*)mcArray->At(labD);
2597  Int_t label=partD->GetMother();
2598  AliAODMCParticle *mot = (AliAODMCParticle*)mcArray->At(label);
2599  while(label>=0){//get first mother
2600  mot = (AliAODMCParticle*)mcArray->At(label);
2601  label=mot->GetMother();
2602  }
2603  if(mot){
2604  Int_t pdgMotCode = mot->GetPdgCode();
2605 
2606  if(TMath::Abs(pdgMotCode)==4) fHisNentries->Fill(11); //from primary charm
2607  if(TMath::Abs(pdgMotCode)==5) fHisNentries->Fill(12); //from beauty
2608  }
2609  // Primary vertex position for selected events with true generated (not necessarily reconstructed) D mesons
2610  const AliVVertex *vertex = aod->GetPrimaryVertex();
2611  const AliVVertex *vSPD = aod->GetPrimaryVertexSPD();
2612  fHisxvtxSelEvWithD->Fill( vertex->GetX() );
2613  fHisyvtxSelEvWithD->Fill( vertex->GetY() );
2614  fHiszvtxSelEvWithD->Fill( vertex->GetZ() );
2615  fHiszvtxvsSPDzvtxSelWithD->Fill(vSPD->GetZ(), vertex->GetZ());
2616  }
2617  }//end MC
2618  fHisNentries->Fill(10);//count the candidates (data and MC)
2619 
2620  for(Int_t id=0;id<ndaugh;id++){
2621  //other histograms to be filled when the cut object is given
2622  AliAODTrack* track=0;
2623 
2624  if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) {
2625  if (id==0)
2626  track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->GetBachelor();
2627  else if (id==1)
2628  track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0PositiveTrack();
2629  else if (id==2)
2630  track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0NegativeTrack();
2631  }
2632  else
2633  track=(AliAODTrack*)d->GetDaughter(id);
2634 
2635 
2636  // filtering cut level
2637  Int_t isSelectedCand = fCuts->IsSelected(d, AliRDHFCuts::kAll, aod);
2638 
2639  if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && isSelectedCand) {
2640 
2641  Int_t label=0;
2642  if(fReadMC)label=track->GetLabel();
2643  if(fOnOff[0]){
2644 
2645  if(fReadMC && label<0) {
2646  isFakeTrack++;
2647  fHisptFakeTrFromDaughFilt->Fill(track->Pt());
2648 
2649  fHisd0f_filt->Fill(d->Getd0Prong(id));
2650  } else {
2651  fHisptGoodTrFromDaugh_filt->Fill(track->Pt());
2652  fHisd0dau_filt->Fill(d->Getd0Prong(id));
2653  Double_t phidaughter = d->PhiProng(id);
2654  if(phidaughter<0) phidaughter=2.0*TMath::Pi()+phidaughter;
2655  fHisd0dauphi_filt->Fill(phidaughter, d->Getd0Prong(id));
2656  Double_t d0rphiz[2],covd0[3];
2657  Bool_t isDCA=track->PropagateToDCA(vtx1,magField,9999.,d0rphiz,covd0);
2658  if(isDCA){
2659  fHisd0zdau_filt->Fill(d0rphiz[1]);
2660  fHisd0zdauphi_filt->Fill(phidaughter,d0rphiz[1]);
2661  }
2662  }
2663  }
2664 
2665  // If the reconstructed candidate is within mPDG +/- 40 MeV/c2, then it is considered as a good candidate
2666  Bool_t isGoodCandidate = kFALSE;
2667  Double_t pdgMass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
2668 
2669  if (fDecayChannel==kD0toKpi) {
2670  if (isSelectedCand==1 || isSelectedCand==3) { // D0
2671  if (TMath::Abs((dynamic_cast<AliAODRecoDecayHF2Prong*>(d))->InvMassD0() - pdgMass) < 0.04) isGoodCandidate=kTRUE;
2672  }
2673  if (isSelectedCand==2 || isSelectedCand==3) { // D0bar
2674  if (TMath::Abs((dynamic_cast<AliAODRecoDecayHF2Prong*>(d))->InvMassD0bar() - pdgMass) < 0.04) isGoodCandidate=kTRUE;
2675  }
2676  } else if (fDecayChannel==kDplustoKpipi) {
2677  if (TMath::Abs((dynamic_cast<AliAODRecoDecayHF3Prong*>(d))->InvMassDplus() - pdgMass) < 0.04) isGoodCandidate=kTRUE;
2678  }
2679 
2680  if (isGoodCandidate) {
2681  const AliVVertex *vertex = aod->GetPrimaryVertex();
2682  const AliVVertex *vSPD = aod->GetPrimaryVertexSPD();
2683  fHisxvtxSelEvWithD->Fill( vertex->GetX() );
2684  fHisyvtxSelEvWithD->Fill( vertex->GetY() );
2685  fHiszvtxSelEvWithD->Fill( vertex->GetZ() );
2686  fHiszvtxvsSPDzvtxSelWithD->Fill(vSPD->GetZ(), vertex->GetZ());
2687  }
2688  }
2689 
2690 
2691 
2692  //track quality
2693 
2694  if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && fCuts->IsSelected(d,AliRDHFCuts::kTracks,aod)) {
2695 
2696  Int_t label=0;
2697  if(fReadMC)label=track->GetLabel();
2698  if(fOnOff[0]){
2699 
2700  if(fReadMC && label<0) {
2701  isFakeTrack++;
2702  fHisptFakeTrFromDaugh->Fill(track->Pt());
2703 
2704  fHisd0f->Fill(d->Getd0Prong(id));
2705  } else {
2706  fHisptGoodTrFromDaugh->Fill(track->Pt());
2707  fHisd0dau->Fill(d->Getd0Prong(id));
2708  Double_t phidaughter = d->PhiProng(id);
2709  if(phidaughter<0) phidaughter=2.0*TMath::Pi()+phidaughter;
2710  fHisd0dauphi->Fill(phidaughter, d->Getd0Prong(id));
2711  Double_t d0rphiz[2],covd0[3];
2712  Bool_t isDCA=track->PropagateToDCA(vtx1,magField,9999.,d0rphiz,covd0);
2713  if(isDCA){
2714  fHisd0zdau->Fill(d0rphiz[1]);
2715  fHisd0zdauphi->Fill(phidaughter,d0rphiz[1]);
2716  }
2717  }
2718  }
2719 
2720 
2722  Int_t nITScls = 0;
2723  Double_t nTPCCrossedRows = track->GetTPCClusterInfo(2,1);
2724  Double_t ratioCrossedRowsOverFcls = 1.0;
2725  if(track->GetTPCNclsF()>0){
2726  ratioCrossedRowsOverFcls = (nTPCCrossedRows)/(track->GetTPCNclsF());
2727  }
2728  for(Int_t l=0;l<6;l++) {
2729  if(TESTBIT(track->GetITSClusterMap(),l)) {
2730  nITScls++;
2731  }
2732  }
2733 
2734  fHisPtDaughters->Fill(track->Pt());
2735  fHisPhiDaughters->Fill(track->Phi());
2736  fHisEtaDaughters->Fill(track->Eta());
2737  fHisEtavsPhiDaughters->Fill(track->Phi(),track->Eta());
2738 
2739  fHisNTPCclsvsPtDaughters->Fill(track->Pt(),track->GetTPCNcls());
2740  fHisNTPCclsvsPhiDaughters->Fill(track->Phi(),track->GetTPCNcls());
2741  fHisNTPCclsvsEtaDaughters->Fill(track->Eta(),track->GetTPCNcls());
2742 
2743  fHisNTPCCrossedRowsvsPtDaughters->Fill(track->Pt(),nTPCCrossedRows);
2744  fHisNTPCCrossedRowsvsPhiDaughters->Fill(track->Phi(),nTPCCrossedRows);
2745  fHisNTPCCrossedRowsvsEtaDaughters->Fill(track->Eta(),nTPCCrossedRows);
2746 
2747  fHisRatioCRowsOverFclsvsPtDaughters->Fill(track->Pt(),ratioCrossedRowsOverFcls);
2748  fHisRatioCRowsOverFclsvsPhiDaughters->Fill(track->Phi(),ratioCrossedRowsOverFcls);
2749  fHisRatioCRowsOverFclsvsEtaDaughters->Fill(track->Eta(),ratioCrossedRowsOverFcls);
2750 
2751  fHisNITSclsvsPtDaughters->Fill(track->Pt(), nITScls);
2752  fHisNITSclsvsPhiDaughters->Fill(track->Phi(), nITScls);
2753  fHisNITSclsvsEtaDaughters->Fill(track->Eta(), nITScls);
2754  if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points
2755  fHisSPDclsDaughters->Fill(0);
2756  }
2757  if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst
2758  fHisSPDclsDaughters->Fill(1);
2759  }
2760  if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond
2761  fHisSPDclsDaughters->Fill(2);
2762  }
2763  if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth
2764  fHisSPDclsDaughters->Fill(3);
2765  }
2766 
2767 
2768  if(fOnOff[1]){
2769  AliAODPid *pid = track->GetDetPid();
2770  if(pid){
2771  if(pidHF && pidHF->CheckStatus(track,"TPC")){
2772  fHisTPCsigNvsPtDaughters->Fill(track->Pt(),pid->GetTPCsignalN());
2773  fHisTPCsigNvsPhiDaughters->Fill(track->Phi(),pid->GetTPCsignalN());
2774  fHisTPCsigNvsEtaDaughters->Fill(track->Eta(),pid->GetTPCsignalN());
2775  }
2776  }
2777  }
2778  }
2779 
2780 
2781  if (isSelectedCand && fOnOff[1]){
2782  fHisNentries->Fill(8); //candidates passing analysis cuts
2783 
2784  AliAODPid *pid = track->GetDetPid();
2785  if(pid){
2786  Double_t times[5];
2787  pid->GetIntegratedTimes(times);
2788  if(pidHF && pidHF->CheckStatus(track,"TOF")){
2789  Double_t tofTime=pid->GetTOFsignal();
2790  AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader();
2791  Double_t tofRes[AliPID::kSPECIES];
2792  pid->GetTOFpidResolution(tofRes);
2793  if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD
2794  AliTOFPIDResponse tofResp=pidHF->GetPidResponse()->GetTOFResponse();
2795  Double_t startTime=tofResp.GetStartTime(track->P());
2796  tofTime-=startTime;
2797  }
2798  fHisTOFtimeKaonHyptimeAC->Fill(track->P(),tofTime-times[AliPID::kKaon]);
2799  }
2800  if(pidHF && pidHF->CheckStatus(track,"TPC")) fHisTPCsigvspAC->Fill(pid->GetTPCmomentum(),pid->GetTPCsignal());
2801  }
2802 
2803  } //end analysis cuts
2804  } //end acceptance and track cuts
2805  } //end loop on tracks in the candidate
2806  } //end loop on candidates
2807 
2808  }
2809  } //end if on pid or track histograms
2810  delete vHF;
2811  delete tpcres;
2812  delete [] pdgdaughters;
2813  PostData(1,fOutputEntries);
2814  if(fOnOff[1]) PostData(2,fOutputPID);
2815  if(fOnOff[0]) PostData(3,fOutputTrack);
2816  PostData(4,fCuts);
2817  if(fOnOff[2]) PostData(5,fOutputCounters);
2818  //Post data 6 done in case of centrality on
2819 }
2820 
2821 //____________________________________________________________________________
2824 
2825  fOutputEntries = dynamic_cast<TList*> (GetOutputData(1));
2826  if (!fOutputEntries && fOnOff[1]) {
2827  printf("ERROR: %s not available\n",GetOutputSlot(1)->GetContainer()->GetName());
2828  return;
2829  }
2830 
2831  fOutputPID = dynamic_cast<TList*> (GetOutputData(2));
2832  if (!fOutputPID && fOnOff[1]) {
2833  printf("ERROR: %s not available\n",GetOutputSlot(2)->GetContainer()->GetName());
2834  return;
2835  }
2836 
2837  fOutputTrack = dynamic_cast<TList*> (GetOutputData(3));
2838  if (!fOutputTrack && fOnOff[0]) {
2839  printf("ERROR: %s not available\n",GetOutputSlot(3)->GetContainer()->GetName());
2840  return;
2841  }
2842 
2843 }
2844 
2845 
2846 
Float_t GetMaxCentrality() const
Definition: AliRDHFCuts.h:299
TH2F * fHisTPCsigNvsEtaAllTracks
! Histo. of output slot #2 (fOutputPID)
Bool_t IsEventRejectedDueToCentrality() const
Definition: AliRDHFCuts.h:361
TH2F * fHiszvtxvsSPDzvtxSel
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisd0dau_filt
! Histo. of output slot #3 (fOutputTrack)
Int_t pdg
TH1F * fHisd0zdau
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDueToZVertexOutsideFiducialRegion() const
Definition: AliRDHFCuts.h:355
TH2F * fHisNTPCCrossedRowsvsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisRatioCRowsOverFclsvsPtDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisRatioCRowsOverFclsvsEtaDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisnClsITSvsNtrackletsSel
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisRatioCRowsOverFclsvsEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDueToNotRecoVertex() const
Definition: AliRDHFCuts.h:346
TH2F * fHisNentriesSelBit
! Histo. of output slot #1 (fOutputEntries)
TH1F * fHisNtracklets
! Histo. of output slot #3 (fOutputTrack)
double Double_t
Definition: External.C:58
TH1F * fHisMultComb08
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTPCsigmaMCPion
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisd0TracksSPDin
! Histo. of output slot #3 (fOutputTrack)
TList * fOutputCounters
! list sent on output slot 5
TH1F * fHisNtrackletsIn
! Histo. of output slot #6 (fOutputCheckCentrality)
Definition: External.C:236
TH2F * fHisRatioCRowsOverFclsvsPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
Bool_t fUseSelectionBit
if true, don&#39;t do candidates (much faster in PbPb)
const char * title
Definition: MakeQAPdf.C:27
TH1F * fHisnClsITSSAspdOut
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisTOFstartTimeRes
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisntrklvsPercentile01AllEv
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisMultComb05
! Histo. of output slot #3 (fOutputTrack)
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TH2F * fHisnTPCITS1SPDTracksvsPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
Bool_t HasSelectionBit(Int_t i) const
TH2F * fHisTPCsigmaProton
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisNTPCclsvsPtDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTPCsigNvsPhiAllTracks
! Histo. of output slot #2 (fOutputPID)
Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const
TH2F * fHisStdEstimSignalNtrackletsIn
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisdistrFakeTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTPCsigNvsPhiDaughters
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisStdSignalSecondSignal
! Histo. of output slot #6 (fOutputCheckCentrality)
centrality
static Int_t CheckMatchingAODdeltaAODevents()
TH2F * fHisNTPCCrossedRowsvsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisRatioCRowsOverFclsvsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisptGoodTr
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisnClsITS
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDueToVertexContributors() const
Definition: AliRDHFCuts.h:349
TList * fOutputEvSelection
! list sent on output slot 7
TH1F * fHisdistrGoodTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNTPCclsvsEtaDaughters
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisnClsITSSAspdIn
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisd0TracksSPDany
! Histo. of output slot #3 (fOutputTrack)
TString GetMultSelectionObjectName() const
Definition: AliRDHFCuts.h:300
TH1F * fHiszvtxSelEvWithD
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHiszvtx
! Histo. of output slot #7 (fOutputEvSelection)
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
TH1F * fHisNentries
! Histo. of output slot #1 (fOutputEntries)
TH2F * fHisTPCsigmaK
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisEtavsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
ULong_t GetSelectionMap() const
TH1F * fHisyvtx
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisntrklvsPercentile01
! Histo. of output slot #6 (fOutputCheckCentrality)
TH2F * fHisnTPCITSTracksvsPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisMultFBit4
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisyvtxSelEvWithD
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisEtaDaughters
! Histo. of output slot #3 (fOutputTrack)
Bool_t FillRecoCasc(AliVEvent *event, AliAODRecoCascadeHF *rc, Bool_t isDStar, Bool_t recoSecVtx=kFALSE)
TH2F * fHisEtavsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisd0zdau_filt
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTPCsigvsp
! Histo. of output slot #2 (fOutputPID)
Bool_t GetOldPid()
Definition: AliAODPidHF.h:170
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:264
TH1F * fHisNtracklets01
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisptFakeTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisStdEstimSignalPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisxvtxSelEv
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisNTPCCrossedRowsvsEtaDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTOFsigmaMCProtonSigPid
! Histo. of output slot #2 (fOutputPID)
Class for cuts on AOD reconstructed D+->Kpipi.
AliRDHFCuts::ECentrality fEstimator
TH2F * fHisTrigCentSel
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisd0f_filt
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNTPCCrossedRowsvsPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
static Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent *ev, Double_t mineta, Double_t maxeta)
TH2F * fHisd0dauphi_filt
! Histo. of output slot #3 (fOutputTrack)
int Int_t
Definition: External.C:63
TH1F * fHisTOFtime
! Histo. of output slot #2 (fOutputPID)
unsigned int UInt_t
Definition: External.C:33
Int_t GetIsFilled() const
float Float_t
Definition: External.C:68
void GetTPCBetheBlochParams(Double_t alephParameters[5]) const
TH2F * fHisNITSclsvsEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisStdPercentileOldFrwPercentileDev
! Histo. of output slot #6 (fOutputCheckCentrality)
Bool_t fOnOff[4]
flag to use or not the selection bit
TH2F * fHisTOFsigmaPionSigPid
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisptFakeTrFromDaugh
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisStdPercentileOldFrwPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
TH2F * fHisTrigCent
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisNITSclsvsPtDaughters
! Histo. of output slot #3 (fOutputTrack)
TList * fOutputPID
! list sent on output slot 2
Bool_t CheckStatus(AliAODTrack *track, TString detectors) const
TList * fOutputCheckCentrality
! list sent on output slot 6
TList * fOutputEntries
! list sent on output slot 1
TH2F * fHisNTPCCrossedRowsvsPtDaughters
! Histo. of output slot #3 (fOutputTrack)
virtual void UserExec(Option_t *option)
TH1F * fHisPtDaughters
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisTOFsigPid3sigKaon
! Histo. of output slot #2 (fOutputPID)
AliESDtrackCuts * GetTrackCuts() const
Definition: AliRDHFCuts.h:279
TH1F * fHisxvtx
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisnClsSPD
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisdistrSelTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNITSclsvsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisTOFsigPid3sigPion
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisMult
! Histo. of output slot #3 (fOutputTrack)
Float_t GetCentrality(AliAODEvent *aodEvent)
Definition: AliRDHFCuts.h:275
Bool_t IsEventRejectedDueToPileup() const
Definition: AliRDHFCuts.h:358
TH2F * fHisTPCsigmaMCProton
! Histo. of output slot #2 (fOutputPID)
TH1F * fHiszvtxSelEv
! Histo. of output slot #7 (fOutputEvSelection)
Double_t nsigma
unsigned long ULong_t
Definition: External.C:38
TH2F * fHisTOFsigmaMCKSigPid
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisTOFsig
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisTrigMulSel
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisTPCsigmaMCK
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisNTPCclsvsEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:173
TH1F * fHisnLayerITSselTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisd0dauphi
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisWhichVert
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisTOFstartTimeMask
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisnClsITSSA
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisd0zdauphi_filt
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDuePhysicsSelection() const
Definition: AliRDHFCuts.h:379
TH2F * fHisNTPCclsvsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTrigMul
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisTOFsigPid3sigProton
! Histo. of output slot #2 (fOutputPID)
Bool_t fSimpleMode
flag to read MC
TH2F * fHisNITSclsvsPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisnLayerITS
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHiszvtxvsSPDzvtx
! Histo. of output slot #7 (fOutputEvSelection)
Bool_t IsEventRejectedDueToMismatchOldNewCentrality() const
Definition: AliRDHFCuts.h:376
TH2F * fHisntrklvsPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
TH2F * fHiszvtxvsSPDzvtxSelWithD
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisTOFstartTimeDistrib
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisStdPercentileSecondPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
Bool_t IsEventSelected(AliVEvent *event)
TH2F * fHisNITSclsvsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNTPCclsvsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTOFtimeKaonHyptimeAC
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisptGoodTrFromDaugh
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisd0TracksTPCITSSPDany
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisWhyEvRejected
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisTOFsigmaKSigPid
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisyvtxSelEv
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisMultIn
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisptGoodTrFromDaugh_filt
! Histo. of output slot #3 (fOutputTrack)
TList * fOutputTrack
! list sent on output slot 3
Bool_t IsSelected(TObject *obj)
Definition: AliRDHFCuts.h:312
TH1F * fHisTOFflags
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisnClsITSSAspdAny
! Histo. of output slot #3 (fOutputTrack)
unsigned short UShort_t
Definition: External.C:28
TH1F * fHisnLayerITSsa
! Histo. of output slot #3 (fOutputTrack)
const char Option_t
Definition: External.C:48
TH2F * fHisTOFsigmaProtonSigPid
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisMultOut
! Histo. of output slot #6 (fOutputCheckCentrality)
TH2F * fHisnTPCTracksvsPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisStdEstimSignal
! Histo. of output slot #6 (fOutputCheckCentrality)
TH2F * fHisRatioCRowsOverFclsvsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDueToTrigger() const
Definition: AliRDHFCuts.h:343
TH2F * fHisNTPCclsvsPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisd0zdauphi
! Histo. of output slot #3 (fOutputTrack)
bool Bool_t
Definition: External.C:53
TH2F * fHisMultvsPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
virtual void Terminate(Option_t *option)
TH1F * fHisTPCsig
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisd0dau
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisSPDclsDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTOFtimeKaonHyptime
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisTPCsigmaPion
! Histo. of output slot #2 (fOutputPID)
virtual Bool_t IsInFiducialAcceptance(Double_t, Double_t) const
Definition: AliRDHFCuts.h:338
Int_t GetUseCentrality() const
Definition: AliRDHFCuts.h:297
TH1F * fHisNtrackletsOut
! Histo. of output slot #6 (fOutputCheckCentrality)
TH2F * fHisTPCsigNvsPtDaughters
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisTPCsigvspAC
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisd0TracksFilterBit4
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisWhichVertSelEv
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisNtracklets01AllEv
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisnClsITSselTr
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisptFakeTrFromDaughFilt
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsDaughterSelected(AliAODTrack *track, const AliESDVertex *primary, AliESDtrackCuts *cuts, const AliAODEvent *aod=0x0) const
TH2F * fHisNTPCCrossedRowsvsEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTPCsigNvsPtAllTracks
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisTOFsigmaMCPionSigPid
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisTPCsigNvsEtaDaughters
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisxvtxSelEvWithD
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisd0f
! Histo. of output slot #3 (fOutputTrack)
Bool_t fFillDistrTrackEffChecks
on-off the QA on tracks (0), PID (1), centrality (2), event selection (3) – default is {kTRUE...
TH1F * fHisSPDclsAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNITSclsvsEtaDaughters
! Histo. of output slot #3 (fOutputTrack)