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