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