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