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