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