AliPhysics  f05a842 (f05a842)
 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  // Protection against the mismatch of candidate TRefs:
1467  // Check if AOD and corresponding deltaAOD files contain the same number of events.
1468  // In case of discrepancy the event is rejected.
1469  fHisNentries->Fill(0);
1470  AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
1471  TTree *treeAOD = aodHandler->GetTree();
1472  TTree *treeDeltaAOD = treeAOD->GetFriend("aodTree");
1473  if(treeAOD->GetEntries()!=treeDeltaAOD->GetEntries()){
1474  AliWarning("Difference in number of entries in main and friend tree, skipping event");
1475  fHisNentries->Fill(2);
1476  return;
1477  }
1478  fHisNentries->Fill(1);
1479 
1480 
1481  TClonesArray *arrayProng =0;
1482 
1483  // Load all the branches of the DeltaAOD - needed for SelectionBit counting
1484  TClonesArray *arrayProngD0toKpi =0;
1485  TClonesArray *arrayProng3Prong =0;
1486  TClonesArray *arrayProng4Prong =0;
1487  TClonesArray *arrayProngDstar =0;
1488  TClonesArray *arrayProngCascades =0;
1489 
1490  Int_t pdg=0;
1491  Int_t *pdgdaughters=0x0;
1493 
1494  if(!aod && AODEvent() && IsStandardAOD()) {
1495  // In case there is an AOD handler writing a standard AOD, use the AOD
1496  // event in memory rather than the input (ESD) event.
1497  aod = dynamic_cast<AliAODEvent*> (AODEvent());
1498  // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
1499  // have to taken from the AOD event hold by the AliAODExtension
1500  AliAODHandler* aodHandler = (AliAODHandler*)
1501  ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
1502  if(aodHandler->GetExtensions()) {
1503 
1504  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
1505  AliAODEvent *aodFromExt = ext->GetAOD();
1506 
1507  arrayProng3Prong =(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong");
1508  arrayProng4Prong =(TClonesArray*)aodFromExt->GetList()->FindObject("Charm4Prong");
1509  arrayProngD0toKpi =(TClonesArray*)aodFromExt->GetList()->FindObject("D0toKpi");
1510  arrayProngDstar =(TClonesArray*)aodFromExt->GetList()->FindObject("Dstar");
1511  arrayProngCascades=(TClonesArray*)aodFromExt->GetList()->FindObject("CascadesHF");
1512 
1513  switch(fDecayChannel){
1514 
1515  case 0:
1516  arrayProng=arrayProng3Prong;
1517  pdg=411;
1518  if(fReadMC){
1519  pdgdaughters =new Int_t[3];
1520  pdgdaughters[0]=211;//pi
1521  pdgdaughters[1]=321;//K
1522  pdgdaughters[2]=211;//pi
1523  }
1524  break;
1525  case 1:
1526  arrayProng=arrayProngD0toKpi;
1527  pdg=421;
1528  if(fReadMC){
1529  pdgdaughters =new Int_t[2];
1530  pdgdaughters[0]=211;//pi
1531  pdgdaughters[1]=321;//K
1532  }
1533  break;
1534  case 2:
1535  arrayProng=arrayProngDstar;
1536  pdg=413;
1537  if(fReadMC){
1538  pdgdaughters =new Int_t[3];
1539  pdgdaughters[1]=211;//pi
1540  pdgdaughters[0]=321;//K
1541  pdgdaughters[2]=211;//pi (soft?)
1542  }
1543  break;
1544  case 3:
1545  arrayProng=arrayProng3Prong;
1546  pdg=431;
1547  if(fReadMC){
1548  pdgdaughters =new Int_t[3];
1549  pdgdaughters[0]=321;//K
1550  pdgdaughters[1]=321;//K
1551  pdgdaughters[2]=211;//pi
1552  }
1553  break;
1554  case 4:
1555  arrayProng=arrayProng4Prong;
1556  pdg=421;
1557  if(fReadMC){
1558  pdgdaughters =new Int_t[4];
1559  pdgdaughters[0]=321;
1560  pdgdaughters[1]=211;
1561  pdgdaughters[2]=211;
1562  pdgdaughters[3]=211;
1563  }
1564  break;
1565  case 5:
1566  arrayProng=arrayProng3Prong;
1567  pdg=4122;
1568  if(fReadMC){
1569  pdgdaughters =new Int_t[3];
1570  pdgdaughters[0]=2212;//p
1571  pdgdaughters[1]=321;//K
1572  pdgdaughters[2]=211;//pi
1573  }
1574  break;
1575  case kLambdactoV0:
1576  arrayProng=arrayProngCascades;
1577  pdg=4122;
1578  if(fReadMC){
1579  pdgdaughters =new Int_t[3];
1580  pdgdaughters[0]=2212;//p
1581  pdgdaughters[1]=211;//pi
1582  pdgdaughters[2]=211;//pi
1583  }
1584  break;
1585  }
1586  }
1587  } else if(aod) {
1588 
1589  arrayProng3Prong =(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
1590  arrayProng4Prong =(TClonesArray*)aod->GetList()->FindObject("Charm4Prong");
1591  arrayProngD0toKpi =(TClonesArray*)aod->GetList()->FindObject("D0toKpi");
1592  arrayProngDstar =(TClonesArray*)aod->GetList()->FindObject("Dstar");
1593  arrayProngCascades=(TClonesArray*)aod->GetList()->FindObject("CascadesHF");
1594 
1595  switch(fDecayChannel){
1596 
1597  case 0:
1598  arrayProng=arrayProng3Prong;
1599  pdg=411;
1600  if(fReadMC){
1601  pdgdaughters =new Int_t[3];
1602  pdgdaughters[0]=211;//pi
1603  pdgdaughters[1]=321;//K
1604  pdgdaughters[2]=211;//pi
1605  }
1606  break;
1607  case 1:
1608  arrayProng=arrayProngD0toKpi;
1609  pdg=421;
1610  if(fReadMC){
1611  pdgdaughters =new Int_t[2];
1612  pdgdaughters[0]=211;//pi
1613  pdgdaughters[1]=321;//K
1614  }
1615  break;
1616  case 2:
1617  arrayProng=arrayProngDstar;
1618  pdg=413;
1619  if(fReadMC){
1620  pdgdaughters =new Int_t[3];
1621  pdgdaughters[1]=211;//pi
1622  pdgdaughters[0]=321;//K
1623  pdgdaughters[2]=211;//pi (soft?)
1624  }
1625  break;
1626  case 3:
1627  arrayProng=arrayProng3Prong;
1628  pdg=431;
1629  if(fReadMC){
1630  pdgdaughters =new Int_t[3];
1631  pdgdaughters[0]=321;//K
1632  pdgdaughters[1]=321;//K
1633  pdgdaughters[2]=211;//pi
1634  }
1635  break;
1636  case 4:
1637  arrayProng=arrayProng4Prong;
1638  pdg=421;
1639  if(fReadMC){
1640  pdgdaughters =new Int_t[4];
1641  pdgdaughters[0]=321;
1642  pdgdaughters[1]=211;
1643  pdgdaughters[2]=211;
1644  pdgdaughters[3]=211;
1645  }
1646  break;
1647  case 5:
1648  arrayProng=arrayProng3Prong;
1649  pdg=4122;
1650  if(fReadMC){
1651  pdgdaughters =new Int_t[3];
1652  pdgdaughters[0]=2212;//p
1653  pdgdaughters[1]=321;//K
1654  pdgdaughters[2]=211;//pi
1655  }
1656  break;
1657  case kLambdactoV0:
1658  arrayProng=arrayProngCascades;
1659  pdg=4122;
1660  if(fReadMC){
1661  pdgdaughters =new Int_t[3];
1662  pdgdaughters[0]=2212;//p
1663  pdgdaughters[1]=211;//pi
1664  pdgdaughters[2]=211;//pi
1665  }
1666  break;
1667  }
1668  }
1669  Bool_t isSimpleMode=fSimpleMode;
1670  if(!arrayProng) {
1671  AliInfo("Branch not found! The output will contain only track related histograms\n");
1672  isSimpleMode=kTRUE;
1673  fHisNentries->Fill(5);
1674  }
1675 
1676  TClonesArray *mcArray = 0;
1677  AliAODMCHeader *mcHeader = 0;
1678 
1679  if(!aod) {
1680  delete [] pdgdaughters;
1681  return;
1682  }
1683 
1684  //check if MC
1685  if(fReadMC) {
1686  // load MC particles
1687  mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
1688  if(!mcArray) {
1689  printf("AliAnalysisTaskSEHFQA::UserExec: MC particles branch not found!\n");
1690  delete [] pdgdaughters;
1691  return;
1692  }
1693 
1694  // load MC header
1695  mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1696  if(!mcHeader) {
1697  printf("AliAnalysisTaskSEHFQA::UserExec: MC header branch not found!\n");
1698  delete [] pdgdaughters;
1699  return;
1700  }
1701  }
1702 
1703 
1704  UInt_t evSelMask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1706  AliAODHeader * header = dynamic_cast<AliAODHeader*>(aod->GetHeader());
1707  if(!header) AliFatal("Not a standard AOD");
1708 
1709  Double_t multiplicity=header->GetRefMultiplicity();
1710  Int_t runNumber = aod->GetRunNumber();
1711  TString trigClass=aod->GetFiredTriggerClasses();
1712  Int_t nAODtracks=aod->GetNumberOfTracks();
1713  Int_t nSelTracksTPCOnly=0;
1714  Int_t nSelTracksTPCITS=0;
1715  Int_t nSelTracksTPCITS1SPD=0;
1716  Int_t ntracksFBit4=0;
1717 
1718  AliTRDTriggerAnalysis trdSelection;
1719  trdSelection.CalcTriggers(aod);
1720 
1721  if(fReadMC) {
1722  if(aod->GetTriggerMask()==0 &&
1723  (runNumber>=195344 && runNumber<=195677)){
1724  AliDebug(3,"Event rejected because of null trigger mask");
1725  delete [] pdgdaughters;
1726  return;
1727  }
1728  }
1729 
1730  for (Int_t k=0;k<nAODtracks;k++){
1731  AliAODTrack* track=dynamic_cast<AliAODTrack*>(aod->GetTrack(k));
1732  if(!track) AliFatal("Not a standard AOD");
1733  if(track->GetID()<0) continue;
1734  Int_t nclsTot=0,nclsSPD=0;
1735  for(Int_t l=0;l<6;l++) {
1736  if(TESTBIT(track->GetITSClusterMap(),l)) {
1737  nclsTot++; if(l<2) nclsSPD++;
1738  }
1739  }
1740  UShort_t nTPCClus=track->GetTPCClusterMap().CountBits();
1741  if(TMath::Abs(track->Eta())<0.8 && nTPCClus>=70 && track->GetStatus()&AliESDtrack::kTPCrefit){
1742  if(track->TestFilterBit(1)) nSelTracksTPCOnly++;
1743  if(track->GetStatus()&AliESDtrack::kITSrefit){
1744  nSelTracksTPCITS++;
1745  if(nclsSPD>0) nSelTracksTPCITS1SPD++;
1746  }
1747  }
1748  if(track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){
1749  ntracksFBit4++;
1750  }
1751  }
1752 
1753  if(fOnOff[4]) {
1754  FillFlowObs(aod);
1755  PostData(8,fOutputFlowObs);
1756  }
1757  if(fOnOff[3]){
1758  AliCounterCollection* trigCount=(AliCounterCollection*)fOutputEvSelection->FindObject("trigCounter");
1759  AliCounterCollection* trigCount2=(AliCounterCollection*)fOutputEvSelection->FindObject("trigCounter2");
1760 
1761  fHisTrigCent->Fill(-1.,centrality);
1762  fHisTrigMul->Fill(-1.,multiplicity);
1763  trigCount->Count(Form("triggerType:All/Run:%d",runNumber));
1764  trigCount2->Count(Form("triggerType:All/Run:%d",runNumber));
1765  if(evSelMask==0){
1766  if(aod->GetEventType()!=7 || trigClass.Contains("BEAMB")){
1767  trigCount->Count(Form("triggerType:NoPhysSelEvNot7/Run:%d",runNumber));
1768  trigCount2->Count(Form("triggerType:NoPhysSelEvNot7/Run:%d",runNumber));
1769  }else if(trigClass.Contains("CMUP1")){
1770  trigCount->Count(Form("triggerType:NoPhysSelCMUP1/Run:%d",runNumber));
1771  }else if(trigClass.Contains("MUON")){
1772  trigCount->Count(Form("triggerType:NoPhysSelMUON/Run:%d",runNumber));
1773  }else if(trigClass.Contains("CPBI2_B1-B") || trigClass.Contains(" CPBI2WU_B1-B")){
1774  trigCount->Count(Form("triggerType:NoPhysSelMB/Run:%d",runNumber));
1775  trigCount2->Count(Form("triggerType:NoPhysSelMB/Run:%d",runNumber));
1776  }else if(trigClass.Contains("CCENT") || trigClass.Contains("CVHN")){
1777  trigCount->Count(Form("triggerType:NoPhysSelCent/Run:%d",runNumber));
1778  }else if(trigClass.Contains("CSEMI") || trigClass.Contains("CVLN")){
1779  trigCount->Count(Form("triggerType:NoPhysSelSemiCent/Run:%d",runNumber));
1780  }
1781  }
1782  if(evSelMask & AliVEvent::kAny){
1783  fHisTrigCent->Fill(0.,centrality);
1784  fHisTrigMul->Fill(0.,multiplicity);
1785  trigCount->Count(Form("triggerType:Any/Run:%d",runNumber));
1786  trigCount2->Count(Form("triggerType:Any/Run:%d",runNumber));
1787  }
1788  if(evSelMask & AliVEvent::kMB){
1789  fHisTrigCent->Fill(1.,centrality);
1790  fHisTrigMul->Fill(1.,multiplicity);
1791  trigCount->Count(Form("triggerType:MB/Run:%d",runNumber));
1792  trigCount2->Count(Form("triggerType:MB/Run:%d",runNumber));
1793  }
1794  if(evSelMask & AliVEvent::kINT7){
1795  fHisTrigCent->Fill(2.,centrality);
1796  fHisTrigMul->Fill(2.,multiplicity);
1797  trigCount->Count(Form("triggerType:CINT7/Run:%d",runNumber));
1798  trigCount2->Count(Form("triggerType:CINT7/Run:%d",runNumber));
1799  }
1800  if(evSelMask & AliVEvent::kINT8){
1801  fHisTrigCent->Fill(3.,centrality);
1802  fHisTrigMul->Fill(3.,multiplicity);
1803  trigCount->Count(Form("triggerType:INT8/Run:%d",runNumber));
1804  trigCount2->Count(Form("triggerType:INT8/Run:%d",runNumber));
1805  }
1806  if(evSelMask & AliVEvent::kCINT5){
1807  fHisTrigCent->Fill(4.,centrality);
1808  fHisTrigMul->Fill(4.,multiplicity);
1809  }
1810  if(evSelMask & AliVEvent::kCentral){
1811  fHisTrigCent->Fill(5.,centrality);
1812  fHisTrigMul->Fill(5.,multiplicity);
1813  trigCount->Count(Form("triggerType:Cent/Run:%d",runNumber));
1814  }
1815  if(evSelMask & AliVEvent::kSemiCentral){
1816  fHisTrigCent->Fill(6.,centrality);
1817  fHisTrigMul->Fill(6.,multiplicity);
1818  trigCount->Count(Form("triggerType:SemiCent/Run:%d",runNumber));
1819  }
1820 
1821  if(evSelMask & AliVEvent::kEMC1){
1822  fHisTrigCent->Fill(7.,centrality);
1823  fHisTrigMul->Fill(7.,multiplicity);
1824  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1825  trigCount2->Count(Form("triggerType:EMC1/Run:%d",runNumber));
1826  }
1827  if((evSelMask & AliVEvent::kEMC7) && trigClass.Contains("CEMC7")){
1828  fHisTrigCent->Fill(8.,centrality);
1829  fHisTrigMul->Fill(8.,multiplicity);
1830  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1831  trigCount2->Count(Form("triggerType:EMC7/Run:%d",runNumber));
1832  }
1833  if((evSelMask & AliVEvent::kEMC8) && trigClass.Contains("CEMC8")){
1834  fHisTrigCent->Fill(9.,centrality);
1835  fHisTrigMul->Fill(9.,multiplicity);
1836  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1837  trigCount2->Count(Form("triggerType:EMC8/Run:%d",runNumber));
1838  }
1839  if(evSelMask & AliVEvent::kEMCEJE){
1840  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1841  if(trigClass.Contains("CEMC7EJE")) {
1842  trigCount2->Count(Form("triggerType:EMCJET7/Run:%d",runNumber));
1843  fHisTrigCent->Fill(10.,centrality);
1844  fHisTrigMul->Fill(10.,multiplicity);
1845 
1846  }
1847  else if(trigClass.Contains("CEMC8EJE")) {
1848  trigCount2->Count(Form("triggerType:EMCJET8/Run:%d",runNumber));
1849  fHisTrigCent->Fill(12.,centrality);
1850  fHisTrigMul->Fill(12.,multiplicity);
1851  }
1852  }
1853  if(evSelMask & AliVEvent::kEMCEGA){
1854  if(trigClass.Contains("CEMC7EGA")) {
1855  fHisTrigCent->Fill(11.,centrality);
1856  fHisTrigMul->Fill(11.,multiplicity);
1857  } else if (trigClass.Contains("CEMC8EGA")){
1858  fHisTrigCent->Fill(13.,centrality);
1859  fHisTrigMul->Fill(13.,multiplicity);
1860 
1861  }
1862  trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
1863  trigCount2->Count(Form("triggerType:EMCGAMMA/Run:%d",runNumber));
1864  }
1865  if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){
1866  fHisTrigCent->Fill(14.,centrality);
1867  fHisTrigMul->Fill(14.,multiplicity);
1868  trigCount->Count(Form("triggerType:MUON/Run:%d",runNumber));
1869  }
1870  if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){
1871  fHisTrigCent->Fill(15.,centrality);
1872  fHisTrigMul->Fill(15.,multiplicity);
1873  }
1874  if(evSelMask & (AliVEvent::kTRD)){
1875  fHisTrigCent->Fill(16.,centrality);
1876  fHisTrigMul->Fill(16.,multiplicity);
1877  trigCount2->Count(Form("triggerType:TRD/Run:%d",runNumber));
1878  }
1879  if((evSelMask & AliVEvent::kTRD) && trdSelection.IsFired(AliTRDTriggerAnalysis::kHJT)){
1880  fHisTrigCent->Fill(17.,centrality);
1881  fHisTrigMul->Fill(17.,multiplicity);
1882  trigCount2->Count(Form("triggerType:TRDHJT/Run:%d",runNumber));
1883  }
1884  if((evSelMask & AliVEvent::kTRD) && trdSelection.IsFired(AliTRDTriggerAnalysis::kHSE)){
1885  fHisTrigCent->Fill(18.,centrality);
1886  fHisTrigMul->Fill(18.,multiplicity);
1887  trigCount2->Count(Form("triggerType:TRDHSE/Run:%d",runNumber));
1888  }
1889  if(evSelMask & (AliVEvent::kHighMult)){
1890  fHisTrigCent->Fill(19.,centrality);
1891  fHisTrigMul->Fill(19.,multiplicity);
1892  trigCount2->Count(Form("triggerType:HighMult/Run:%d",runNumber));
1893  }
1894  if(evSelMask & AliVEvent::kSPI7){
1895  if(trigClass.Contains("CSPI7")) {
1896  fHisTrigCent->Fill(20.,centrality);
1897  fHisTrigMul->Fill(20.,multiplicity);
1898  trigCount2->Count(Form("triggerType:SPI7/Run:%d",runNumber));
1899  }
1900  }
1901  if(evSelMask & AliVEvent::kSPI){
1902  if(trigClass.Contains("CSPI8")) {
1903  fHisTrigCent->Fill(21.,centrality);
1904  fHisTrigMul->Fill(21.,multiplicity);
1905  trigCount2->Count(Form("triggerType:SPI8/Run:%d",runNumber));
1906  }
1907  }
1908  if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){
1909  fHisTrigCent->Fill(22.,centrality);
1910  fHisTrigMul->Fill(22.,multiplicity);
1911  }
1912  }
1913 
1914 
1915  // fix for temporary bug in ESDfilter
1916  // the AODs with null vertex pointer didn't pass the PhysSel
1917  Double_t magField = aod->GetMagneticField();
1918  if(!aod->GetPrimaryVertex() || TMath::Abs(magField)<0.001) {
1919  delete [] pdgdaughters;
1920  return;
1921  }
1922 
1923  // count event
1924  fHisNentries->Fill(3);
1925  //count events with good vertex
1926  // AOD primary vertex
1927  AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
1928  Double_t pos[3],cov[6];
1929  vtx1->GetXYZ(pos);
1930  vtx1->GetCovarianceMatrix(cov);
1931  const AliESDVertex vESD(pos,cov,100.,100);
1932 
1933  TString primTitle = vtx1->GetTitle();
1934  if(primTitle.Contains("VertexerTracks") && vtx1->GetNContributors()>0) fHisNentries->Fill(7);
1935 
1936  // trigger class for PbPb C0SMH-B-NOPF-ALLNOTRD, C0SMH-B-NOPF-ALL
1937  //TString trigclass=aod->GetFiredTriggerClasses();
1938  //if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL")) fHisNentries->Fill(8); //tmp
1939 
1940 
1941 
1942 
1943  Bool_t evSelbyCentrality=kTRUE,evSelected=kTRUE,evSelByVertex=kTRUE,evselByPileup=kTRUE,evSelByPS=kTRUE;
1944 
1945  if(fOnOff[3]){
1946  fHisWhyEvRejected->Fill(-1);
1947  }
1948 
1949  //select event
1950  if(!fCuts->IsEventSelected(aod)) {
1951  evSelected=kFALSE;
1953  fHisWhyEvRejected->Fill(0);
1954  evselByPileup=kFALSE;
1955  }// rejected for pileup
1957  fHisWhyEvRejected->Fill(1);
1958  evSelbyCentrality=kFALSE; //rejected by centrality
1959  }
1962  evSelByVertex=kFALSE;
1963  fHisWhyEvRejected->Fill(2);
1964  }
1966  fHisWhyEvRejected->Fill(3);
1967  }
1969  evSelByVertex=kFALSE;
1970  if(fOnOff[3]) ((AliCounterCollection*)fOutputEvSelection->FindObject("evselection"))->Count(Form("evnonsel:zvtx/Run:%d",runNumber));
1971  fHisWhyEvRejected->Fill(4);
1972  }
1974  evSelByPS=kFALSE;
1975  fHisWhyEvRejected->Fill(5);
1976  }
1977  }
1978  if(evSelected && fOnOff[3]){
1979  fHisTrigCentSel->Fill(-1.,centrality);
1980  fHisTrigMulSel->Fill(-1.,multiplicity);
1981  if(evSelMask & AliVEvent::kAny) {
1982  fHisTrigCentSel->Fill(0.,centrality);
1983  fHisTrigMulSel->Fill(0.,multiplicity);}
1984  if(evSelMask & AliVEvent::kMB) {
1985  fHisTrigCentSel->Fill(1.,centrality);
1986  fHisTrigMulSel->Fill(1.,multiplicity);}
1987  if(evSelMask & AliVEvent::kINT7){
1988  fHisTrigCentSel->Fill(2.,centrality);
1989  fHisTrigMulSel->Fill(2.,multiplicity);}
1990  if(evSelMask & AliVEvent::kINT8){
1991  fHisTrigCentSel->Fill(3.,centrality);
1992  fHisTrigMulSel->Fill(3.,multiplicity);}
1993  if(evSelMask & AliVEvent::kCINT5){
1994  fHisTrigCentSel->Fill(4.,centrality);
1995  fHisTrigMulSel->Fill(4.,multiplicity);}
1996  if(evSelMask & AliVEvent::kCentral){
1997  fHisTrigCentSel->Fill(5.,centrality);
1998  fHisTrigMulSel->Fill(5.,multiplicity);}
1999  if(evSelMask & AliVEvent::kSemiCentral){
2000  fHisTrigCentSel->Fill(6.,centrality);
2001  fHisTrigMulSel->Fill(6.,multiplicity);}
2002  if(evSelMask & AliVEvent::kEMC1){
2003  fHisTrigCentSel->Fill(7.,centrality);
2004  fHisTrigMulSel->Fill(7.,multiplicity);
2005  }
2006  if((evSelMask & AliVEvent::kEMC7) && trigClass.Contains("CEMC7")){
2007  fHisTrigCentSel->Fill(8.,centrality);
2008  fHisTrigMulSel->Fill(8.,multiplicity);
2009  }
2010  if((evSelMask & AliVEvent::kEMC8) && trigClass.Contains("CEMC8")){
2011  fHisTrigCentSel->Fill(9.,centrality);
2012  fHisTrigMulSel->Fill(9.,multiplicity);
2013  }
2014  if((evSelMask & AliVEvent::kEMCEJE) && trigClass.Contains("CEMC7EJE")){
2015  fHisTrigCentSel->Fill(10.,centrality);
2016  fHisTrigMulSel->Fill(10.,multiplicity);
2017  }
2018  if((evSelMask & AliVEvent::kEMCEGA) && trigClass.Contains("CEMC7EGA")){
2019  fHisTrigCentSel->Fill(11.,centrality);
2020  fHisTrigMulSel->Fill(11.,multiplicity);
2021  }
2022  if((evSelMask & AliVEvent::kEMCEJE) && trigClass.Contains("CEMC8EJE")){
2023  fHisTrigCentSel->Fill(12.,centrality);
2024  fHisTrigMulSel->Fill(12.,multiplicity);
2025  }
2026  if((evSelMask & AliVEvent::kEMCEGA) && trigClass.Contains("CEMC8EGA")){
2027  fHisTrigCentSel->Fill(13.,centrality);
2028  fHisTrigMulSel->Fill(13.,multiplicity);
2029  }
2030  if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) | (AliVEvent::kMUS7 | AliVEvent::kMUON))){
2031  fHisTrigCentSel->Fill(14.,centrality);
2032  fHisTrigMulSel->Fill(14.,multiplicity);}
2033  if(evSelMask & (AliVEvent::kPHI1 | AliVEvent::kPHI7)){
2034  fHisTrigCentSel->Fill(15.,centrality);
2035  fHisTrigMulSel->Fill(15.,multiplicity);}
2036  if(evSelMask & (AliVEvent::kTRD)){
2037  fHisTrigCentSel->Fill(16.,centrality);
2038  fHisTrigMulSel->Fill(16.,multiplicity);
2039  }
2040  if((evSelMask & AliVEvent::kTRD) && trdSelection.IsFired(AliTRDTriggerAnalysis::kHJT)){
2041  fHisTrigCentSel->Fill(17.,centrality);
2042  fHisTrigMulSel->Fill(17.,multiplicity);
2043  }
2044  if((evSelMask & AliVEvent::kTRD) && trdSelection.IsFired(AliTRDTriggerAnalysis::kHSE)){
2045  fHisTrigCentSel->Fill(18.,centrality);
2046  fHisTrigMulSel->Fill(18.,multiplicity);
2047  }
2048  if(evSelMask & (AliVEvent::kHighMult)){
2049  fHisTrigCentSel->Fill(19.,centrality);
2050  fHisTrigMulSel->Fill(19.,multiplicity);}
2051  if(evSelMask & AliVEvent::kSPI7){
2052  if(trigClass.Contains("CSPI7")) {
2053  fHisTrigCentSel->Fill(20.,centrality);
2054  fHisTrigMulSel->Fill(20.,multiplicity);
2055  }
2056  }
2057  if(evSelMask & AliVEvent::kSPI){
2058  if(trigClass.Contains("CSPI8")) {
2059  fHisTrigCentSel->Fill(21.,centrality);
2060  fHisTrigMulSel->Fill(21.,multiplicity);
2061  }
2062  }
2063  if(evSelMask & (AliVEvent::kDG5 | AliVEvent::kZED)){
2064  fHisTrigCentSel->Fill(22.,centrality);
2065  fHisTrigMulSel->Fill(22.,multiplicity);}
2066  }
2067 
2068  if(evSelected || (!evSelbyCentrality && evSelByVertex && evselByPileup && evSelByPS)){ //events selected or not selected because of centrality
2069  if(fOnOff[2] && fCuts->GetUseCentrality()){
2070 
2071  Float_t stdCentf=fCuts->GetCentrality(aod);
2072  Int_t stdCent = (Int_t)(stdCentf+0.5);
2073  Float_t secondCentf =fCuts->GetCentrality(aod,fEstimator);
2074  Int_t secondCent = (Int_t)(secondCentf+0.5);
2075  Int_t mincent=stdCent-stdCent%10;
2076  Float_t stdSignal = 0.;
2077  Float_t secondSignal = 0.;
2078  AliAODVZERO *vzeroAOD = (AliAODVZERO*)aod->GetVZEROData();
2079  AliAODZDC *zdcAOD = (AliAODZDC*)aod->GetZDCData();
2080  const Double_t *towerZNASignal = zdcAOD->GetZNATowerEnergy();
2081  switch(fCuts->GetUseCentrality())
2082  {
2083  case AliRDHFCuts::kCentV0M:
2084  stdSignal = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C();
2085  break;
2086  case AliRDHFCuts::kCentV0A:
2087  stdSignal = vzeroAOD->GetMTotV0A();
2088  break;
2089  case AliRDHFCuts::kCentZNA:
2090  stdSignal = towerZNASignal[0];
2091  break;
2092  default:
2093  stdSignal = 0.;
2094  break;
2095  }
2096  switch(fEstimator)
2097  {
2098  case AliRDHFCuts::kCentV0M:
2099  secondSignal = vzeroAOD->GetMTotV0A() + vzeroAOD->GetMTotV0C();
2100  break;
2101  case AliRDHFCuts::kCentV0A:
2102  secondSignal = vzeroAOD->GetMTotV0A();
2103  break;
2104  case AliRDHFCuts::kCentZNA:
2105  secondSignal = towerZNASignal[0];
2106  break;
2107  default:
2108  secondSignal = 0.;
2109  break;
2110  }
2111  //AliCentrality *aodcent = aod->GetCentrality();
2112  // Float_t spdCentf = aodcent->GetCentralityPercentile("CL1");
2113  if(stdCentf==-1) {
2114  mincent=-10;
2115  stdCent=-1;
2116  }
2117  if(mincent==100)mincent--;
2118  ((AliCounterCollection*)fOutputCounters->FindObject("stdEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber));
2119 
2120  mincent=secondCent-secondCent%10;
2121  if(secondCentf==-1) {
2122  mincent=-10;
2123  secondCent=-1;
2124  }
2125  if(mincent==100)mincent--;
2126  ((AliCounterCollection*)fOutputCounters->FindObject("secondEstimator"))->Count(Form("centralityclass:%d_%d/Run:%d",mincent,mincent+10,runNumber));
2127 
2128  if(stdCent<fCuts->GetMinCentrality() || stdCent>fCuts->GetMaxCentrality()){
2129  fHisNtrackletsOut->Fill(aod->GetTracklets()->GetNumberOfTracklets());
2130  fHisMultOut->Fill(header->GetRefMultiplicity());
2131  }else{
2132  fHisNtrackletsIn->Fill(aod->GetTracklets()->GetNumberOfTracklets());
2133  fHisMultIn->Fill(header->GetRefMultiplicity());
2134  }
2135  fHisMultvsPercentile->Fill(header->GetRefMultiplicity(),stdCentf);
2136  fHisntrklvsPercentile->Fill(aod->GetTracklets()->GetNumberOfTracklets(),stdCentf);
2138  fHisnTPCTracksvsPercentile->Fill(nSelTracksTPCOnly,stdCentf);
2139  fHisnTPCITSTracksvsPercentile->Fill(nSelTracksTPCITS,stdCentf);
2140  fHisnTPCITS1SPDTracksvsPercentile->Fill(nSelTracksTPCITS1SPD,stdCentf);
2141  fHisStdEstimSignalPercentile->Fill(stdSignal,stdCentf);
2142  fHisStdEstimSignal->Fill(stdSignal);
2143  fHisStdEstimSignalNtrackletsIn->Fill(stdSignal,aod->GetTracklets()->GetNumberOfTracklets());
2144  fHisStdPercentileSecondPercentile->Fill(stdCentf,secondCentf);
2145  fHisStdSignalSecondSignal->Fill(stdSignal,secondSignal);
2146 
2147  PostData(6,fOutputCheckCentrality);
2148 
2149  } else{
2150  if(fOnOff[0]){
2151  fHisNtracklets->Fill(aod->GetTracklets()->GetNumberOfTracklets());
2153  fHisMult->Fill(header->GetRefMultiplicity());
2154  fHisMultFBit4->Fill(ntracksFBit4);
2155  fHisMultComb05->Fill(header->GetRefMultiplicityComb05());
2156  fHisMultComb08->Fill(header->GetRefMultiplicityComb08());
2157  }
2158  }
2159  }
2160 
2161  if(evSelected || (!evSelbyCentrality && evSelByVertex && evselByPileup && evSelByPS) || (!evSelByVertex && evselByPileup && evSelByPS)){ //events selected or not selected because of centrality
2162  if(fOnOff[2] && fCuts->GetUseCentrality()){
2164  }else{
2165  if(fOnOff[0]){
2167  }
2168  }
2169  }
2170 
2171  if(fOnOff[3]){
2172  const AliVVertex *vertex = aod->GetPrimaryVertex();
2173  Double_t xvtx=vertex->GetX();
2174  Double_t yvtx=vertex->GetY();
2175  Double_t zvtx=vertex->GetZ();
2176  Int_t vtxTyp=0;
2177  if(vertex->GetNContributors()<=0) vtxTyp=-1;
2178  TString title=vertex->GetTitle();
2179  if(title.Contains("Z")) vtxTyp=2;
2180  if(title.Contains("3D")) vtxTyp=1;
2181  fHisxvtx->Fill(xvtx);
2182  fHisyvtx->Fill(yvtx);
2183  fHiszvtx->Fill(zvtx);
2184  fHisWhichVert->Fill(vtxTyp);
2185  if(evSelected){
2186  fHisxvtxSelEv->Fill(xvtx);
2187  fHisyvtxSelEv->Fill(yvtx);
2188  fHiszvtxSelEv->Fill(zvtx);
2189  fHisWhichVertSelEv->Fill(vtxTyp);
2190  }
2191  }
2192 
2193  if(!evSelected) {
2194  delete [] pdgdaughters;
2195  return; //discard all events not selected (vtx and/or centrality)
2196  }
2197 
2198 
2199  AliAODPidHF* pidHF=fCuts->GetPidHF();
2200  if(!pidHF) {
2201  delete [] pdgdaughters;
2202  return;
2203  }
2204  //load all the branches, re-fill the candidates and fill the SelectionBit histo
2205 
2206  Int_t nCand3Prong = arrayProng3Prong->GetEntriesFast();
2207  Int_t nCandD0toKpi = arrayProngD0toKpi->GetEntriesFast();
2208  Int_t nCandDstar = arrayProngDstar->GetEntriesFast();
2209  Int_t nCandCasc=0;
2210  Int_t n4Prong=0;
2211  if(arrayProngCascades)nCandCasc = arrayProngCascades->GetEntriesFast();
2212  if(arrayProng4Prong)n4Prong = arrayProng4Prong->GetEntriesFast();
2213  // D+, Ds and Lc
2214  AliAODRecoDecayHF *d;
2215  for (Int_t iCand = 0; iCand < nCand3Prong; iCand++) {
2216  d = (AliAODRecoDecayHF*)arrayProng3Prong->UncheckedAt(iCand);
2217  vHF->FillRecoCand(aod,(AliAODRecoDecayHF3Prong*)d);
2218 
2219  if(fUseSelectionBit && !isSimpleMode){
2220  Double_t ptCand_selBit = d->Pt();
2221  if(fUseSelectionBit && d->GetSelectionMap()) {
2222  if(d->HasSelectionBit(AliRDHFCuts::kDplusCuts)) fHisNentriesSelBit->Fill(0.0,ptCand_selBit);
2223  if(d->HasSelectionBit(AliRDHFCuts::kDsCuts)) fHisNentriesSelBit->Fill(1.0,ptCand_selBit);
2224  if(d->HasSelectionBit(AliRDHFCuts::kLcCuts)) fHisNentriesSelBit->Fill(2.0,ptCand_selBit);
2225  }
2226  }
2227  }
2228  // D0kpi
2229  for (Int_t iCand = 0; iCand < nCandD0toKpi; iCand++) {
2230  d = (AliAODRecoDecayHF*)arrayProngD0toKpi->UncheckedAt(iCand);
2231  vHF->FillRecoCand(aod,(AliAODRecoDecayHF2Prong*)d);
2232  if(fUseSelectionBit && !isSimpleMode){
2233  Double_t ptCand_selBit = d->Pt();
2234  if(fUseSelectionBit && d->GetSelectionMap()) {
2235  if(d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) fHisNentriesSelBit->Fill(3.0,ptCand_selBit);
2236  }
2237  }
2238  }
2239  // Dstar
2240  for (Int_t iCand = 0; iCand < nCandDstar; iCand++) {
2241  d = (AliAODRecoDecayHF*)arrayProngDstar->UncheckedAt(iCand);
2242  vHF->FillRecoCasc(aod,((AliAODRecoCascadeHF*)d),kTRUE);
2243  if(fUseSelectionBit && !isSimpleMode){
2244  Double_t ptCand_selBit = d->Pt();
2245  if(fUseSelectionBit && d->GetSelectionMap()) {
2246  if(d->HasSelectionBit(AliRDHFCuts::kDstarCuts)) fHisNentriesSelBit->Fill(4.0,ptCand_selBit);
2247  }
2248  }
2249  }
2250 // //Cascade
2251  if(arrayProngCascades){
2252  for (Int_t iCand = 0; iCand < nCandCasc; iCand++) {
2253  d=(AliAODRecoDecayHF*)arrayProngCascades->UncheckedAt(iCand);
2254  vHF->FillRecoCasc(aod,((AliAODRecoCascadeHF*)d),kFALSE);
2255  }
2256  }
2257  //end refill
2258 
2259  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
2260  AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
2261  AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
2262 
2263  //AliPIDResponse* respF=pidHF->GetPidResponse();
2264  AliTPCPIDResponse* tpcres=new AliTPCPIDResponse();
2265  Bool_t oldPID=pidHF->GetOldPid();
2266  if(oldPID){
2267  Double_t alephParameters[5];
2268  pidHF->GetTPCBetheBlochParams(alephParameters);
2269  tpcres->SetBetheBlochParameters(alephParameters[0],alephParameters[1],alephParameters[2],alephParameters[3],alephParameters[4]);
2270  }
2271 
2272 
2273  Int_t ntracks=0;
2274  Int_t isGoodTrack=0, isFakeTrack=0, isSelTrack=0;
2275 
2276  if(aod) ntracks=aod->GetNumberOfTracks();
2277 
2278  if(fOnOff[0] || fOnOff[1]){
2279  //loop on tracks in the event
2280  for (Int_t k=0;k<ntracks;k++){
2281  AliAODTrack* track=dynamic_cast<AliAODTrack*>(aod->GetTrack(k));
2282  if(!track) AliFatal("Not a standard AOD");
2283  // Track selection cuts
2284  if(track->GetID()<0) continue;
2285  Double_t d0z0[2],covd0z0[3];
2286  if(!track->PropagateToDCA(vtx1,magField,99999.,d0z0,covd0z0)) continue;
2287  if(track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){
2288  fHisd0TracksFilterBit4->Fill(d0z0[0]);
2289  }
2290  ULong_t trStatus=track->GetStatus();
2291  if(trStatus&AliESDtrack::kITSrefit){
2292  if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){
2293  fHisd0TracksSPDany->Fill(d0z0[0]);
2294  if(track->HasPointOnITSLayer(0)){
2295  fHisd0TracksSPDin->Fill(d0z0[0]);
2296  }
2297  }
2298  }
2299 
2300  Bool_t selTrack=kTRUE;
2301  if (!((trStatus & AliVTrack::kTPCrefit) == AliVTrack::kTPCrefit) ||
2302  !((trStatus & AliVTrack::kITSrefit) == AliVTrack::kITSrefit)){
2303  selTrack=kFALSE;
2304  }
2305  if(!track->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){ // BIT(4) standard cuts with very loose DCA
2306  selTrack=kFALSE;
2307  }
2308  if(TMath::Abs(track->Eta())>0.9){
2309  selTrack=kFALSE;
2310  }
2311  Float_t nCrossedRowsTPC = track->GetTPCClusterInfo(2,1);
2312  Float_t ratioCrossedRowsOverFindableClustersTPC = 1.0;
2313  if (track->GetTPCNclsF()>0) {
2314  ratioCrossedRowsOverFindableClustersTPC = nCrossedRowsTPC/track->GetTPCNclsF();
2315  }
2316 
2317  Bool_t selTrackNoSPD=selTrack;
2318  if(selTrack){
2319  if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)){
2320  fHisd0TracksTPCITSSPDany->Fill(d0z0[0]);
2321  }
2322  }
2323 
2324  AliAODPid *pid = track->GetDetPid();
2325  if(!pid && fDebug>1) cout<<"No AliAODPid found"<<endl;
2326 
2327  if(pid && fOnOff[1]){
2328  Double_t times[AliPID::kSPECIES];
2329  pid->GetIntegratedTimes(times);
2330 
2331  Double_t tofRes[AliPID::kSPECIES];
2332  pid->GetTOFpidResolution(tofRes);
2333 
2334  //check TOF
2335  fHisTOFflags->Fill(0.);
2336  if (trStatus&AliESDtrack::kTPCout) fHisTOFflags->Fill(1.);
2337  if (trStatus&AliESDtrack::kTOFout) fHisTOFflags->Fill(2.);
2338  if (trStatus&AliESDtrack::kTIME) fHisTOFflags->Fill(3.);
2339  if (trStatus&AliESDtrack::kTOFpid) fHisTOFflags->Fill(4.);
2340  if (trStatus&AliESDtrack::kTOFmismatch) fHisTOFflags->Fill(5.);
2341 
2342  Bool_t isTOFok=kFALSE;
2343  if(pidResp){
2344  Double_t prob[AliPID::kSPECIES];
2345  if(pidResp->ComputeTOFProbability(track,AliPID::kSPECIES,prob)==AliPIDResponse::kDetPidOk){
2346  isTOFok=kTRUE;
2347  fHisTOFflags->Fill(6.);
2348  }
2349  }
2350 
2351  if(selTrack && isTOFok){
2352  Double_t tofTime=pid->GetTOFsignal();
2353  AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader();
2354  if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD
2355  // with new AOD we need to retrieve startTime, subtract it and retrieve correctly TOF PID resolutions *PA*
2356  AliTOFPIDResponse tofResp=pidResp->GetTOFResponse();
2357  Double_t startTime = tofResp.GetStartTime(track->P());
2358  Float_t startTimeRes = tofResp.GetStartTimeRes(track->P());
2359  Int_t startTimeMask = tofResp.GetStartTimeMask(track->P());
2360  fHisTOFstartTimeDistrib->Fill(startTime);
2361  fHisTOFstartTimeMask->Fill(startTimeMask);
2362  fHisTOFstartTimeRes->Fill(startTimeRes);
2363  tofTime-=startTime;
2364  for (Int_t type=0;type<AliPID::kSPECIES;type++) tofRes[type]=tofResp.GetExpectedSigma(track->P(),times[type],AliPID::ParticleMassZ(type));
2365  }
2366  fHisTOFtime->Fill(times[AliPID::kProton]);
2367  fHisTOFtimeKaonHyptime->Fill(track->P(),tofTime-times[3]); //3 is kaon
2368  fHisTOFsig->Fill(tofTime);
2369  if (pid->GetTOFsignal()< 0) fHisTOFsig->Fill(-1);
2370 
2371  Double_t nsigma[3]={-10,-10,-10};
2372  nsigma[0]=pidResp->NumberOfSigmasTOF(track,AliPID::kPion);
2373  nsigma[1]=pidResp->NumberOfSigmasTOF(track,AliPID::kKaon);
2374  nsigma[2]=pidResp->NumberOfSigmasTOF(track,AliPID::kProton);
2375 
2376  fHisTOFsigmaKSigPid->Fill(track->P(),nsigma[1]);
2377  fHisTOFsigmaPionSigPid->Fill(track->P(),nsigma[0]);
2378  fHisTOFsigmaProtonSigPid->Fill(track->P(),nsigma[2]);
2379  if(fReadMC){
2380  Int_t label=track->GetLabel();
2381  if(label<=0) continue;
2382  AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label);
2383  if(mcpart){
2384  Int_t abspdgcode=TMath::Abs(mcpart->PdgCode());
2385  if(abspdgcode==211) fHisTOFsigmaMCPionSigPid->Fill(track->P(),nsigma[0]);
2386  if(abspdgcode==321) fHisTOFsigmaMCKSigPid->Fill(track->P(),nsigma[1]);
2387  if(abspdgcode==2212) fHisTOFsigmaMCProtonSigPid->Fill(track->P(),nsigma[2]);
2388 
2389  }
2390  }
2391 
2392  for (Int_t iS=2; iS<5; iS++){ //we plot TOF Pid resolution for 3-sigma identified particles
2393  if ( TMath::Abs(nsigma[iS-2])<3.){
2394  switch (iS) {
2395  case AliPID::kPion:
2396  fHisTOFsigPid3sigPion->Fill(tofRes[iS]);
2397  break;
2398  case AliPID::kKaon:
2399  fHisTOFsigPid3sigKaon->Fill(tofRes[iS]);
2400  break;
2401  case AliPID::kProton:
2402  fHisTOFsigPid3sigProton->Fill(tofRes[iS]);
2403  break;
2404  default:
2405  break;
2406  }
2407  }
2408  }
2409  }//if TOF status
2410  //}
2411 
2412  if(pidHF && pidHF->CheckStatus(track,"TPC") && selTrack){
2413 
2414  Double_t TPCp=pid->GetTPCmomentum();
2415  Double_t TPCsignal=pid->GetTPCsignal();
2416  UShort_t TPCsignalN=pid->GetTPCsignalN();
2417  fHisTPCsig->Fill(TPCsignal);
2418  fHisTPCsigvsp->Fill(TPCp,TPCsignal);
2419  //if (pidHF->IsKaonRaw(track, "TOF"))
2420  Double_t nsigma[3]={-10,-10,-10};
2421  pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kPion,nsigma[0]);
2422  pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kKaon,nsigma[1]);
2423  pidHF->GetnSigmaTPC(track,(Int_t)AliPID::kProton,nsigma[2]);
2424 
2425  fHisTPCsigmaK->Fill(TPCp,nsigma[1]);
2426 
2427  fHisTPCsigmaPion->Fill(TPCp,nsigma[0]);
2428  fHisTPCsigmaProton->Fill(TPCp,nsigma[2]);
2429 
2430  if(fReadMC){
2431  Int_t label=track->GetLabel();
2432  if(label<=0) continue;
2433  AliMCParticle* mcpart=(AliMCParticle*)mcArray->At(label);
2434  if(mcpart){
2435  Int_t abspdgcode=TMath::Abs(mcpart->PdgCode());
2436  if(abspdgcode==211) fHisTPCsigmaMCPion->Fill(track->P(),nsigma[0]);
2437  if(abspdgcode==321) fHisTPCsigmaMCK->Fill(track->P(),nsigma[1]);
2438  if(abspdgcode==2212) fHisTPCsigmaMCProton->Fill(track->P(),nsigma[2]);
2439 
2440  }
2441 
2442  }
2443  if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){
2444  fHisTPCsigNvsPtAllTracks->Fill(track->Pt(),(Float_t)TPCsignalN);
2445  fHisTPCsigNvsPhiAllTracks->Fill(track->Phi(),(Float_t)TPCsignalN);
2446  fHisTPCsigNvsEtaAllTracks->Fill(track->Eta(),(Float_t)TPCsignalN);
2447  }
2448 
2449  }//if TPC status
2450  } //end PID histograms
2451 
2452  Int_t nclsTot=0,nclsSPD=0;
2453 
2454  //check clusters of the tracks
2455  if(fOnOff[0]){
2456 
2457  fHisnLayerITS->Fill(-1);
2458  if(selTrackNoSPD) fHisnLayerITSselTr->Fill(-1);
2459  for(Int_t l=0;l<6;l++) {
2460  if(TESTBIT(track->GetITSClusterMap(),l)) {
2461  fHisnLayerITS->Fill(l);
2462  if(selTrackNoSPD) fHisnLayerITSselTr->Fill(l);
2463  nclsTot++; if(l<2) nclsSPD++;
2464  }
2465  }
2466  fHisnClsITS->Fill(nclsTot);
2467  fHisnClsSPD->Fill(nclsSPD);
2468 
2469  if(fFillDistrTrackEffChecks && track->GetStatus()&AliESDtrack::kITSrefit && track->GetStatus()&AliESDtrack::kTPCrefit){
2470 
2471  fHisPtAllTracks->Fill(track->Pt());
2472  fHisPhiAllTracks->Fill(track->Phi());
2473  fHisEtaAllTracks->Fill(track->Eta());
2474  fHisEtavsPhiAllTracks->Fill(track->Phi(),track->Eta());
2475  fHisNTPCclsvsPtAllTracks->Fill(track->Pt(),track->GetTPCNcls());
2476  fHisNTPCclsvsPhiAllTracks->Fill(track->Phi(),track->GetTPCNcls());
2477  fHisNTPCclsvsEtaAllTracks->Fill(track->Eta(),track->GetTPCNcls());
2478 
2479  fHisNTPCCrossedRowsvsPtAllTracks->Fill(track->Pt(),nCrossedRowsTPC);
2480  fHisNTPCCrossedRowsvsPhiAllTracks->Fill(track->Phi(),nCrossedRowsTPC);
2481  fHisNTPCCrossedRowsvsEtaAllTracks->Fill(track->Eta(),nCrossedRowsTPC);
2482 
2483  fHisRatioCRowsOverFclsvsPtAllTracks->Fill(track->Pt(),ratioCrossedRowsOverFindableClustersTPC);
2484  fHisRatioCRowsOverFclsvsPhiAllTracks->Fill(track->Phi(),ratioCrossedRowsOverFindableClustersTPC);
2485  fHisRatioCRowsOverFclsvsEtaAllTracks->Fill(track->Eta(),ratioCrossedRowsOverFindableClustersTPC);
2486 
2487  if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points
2488  fHisSPDclsAllTracks->Fill(0);
2489  }
2490  if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst
2491  fHisSPDclsAllTracks->Fill(1);
2492  }
2493  if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond
2494  fHisSPDclsAllTracks->Fill(2);
2495  }
2496  if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth
2497  fHisSPDclsAllTracks->Fill(3);
2498  }
2499  fHisNITSclsvsPtAllTracks->Fill(track->Pt(), nclsTot);
2500  fHisNITSclsvsPhiAllTracks->Fill(track->Phi(), nclsTot);
2501  fHisNITSclsvsEtaAllTracks->Fill(track->Eta(), nclsTot);
2502 
2503  }
2504 
2505  if(track->Pt()>0.3 &&
2506  TMath::Abs(track->Eta())<0.8 &&
2507  track->GetStatus()&AliESDtrack::kITSrefit &&
2508  track->GetStatus()&AliESDtrack::kTPCrefit &&
2509  nclsSPD>0){
2510  fHisnClsITSselTr->Fill(nclsTot);
2511  }
2512  if(!(track->GetStatus()&AliESDtrack::kTPCin) && track->GetStatus()&AliESDtrack::kITSrefit && !(track->GetStatus()&AliESDtrack::kITSpureSA)){//tracks retrieved in the ITS and not reconstructed in the TPC
2513  fHisnClsITSSA->Fill(nclsTot);
2514  fHisnLayerITSsa->Fill(-1);
2515  for(Int_t l=0;l<6;l++) {
2516  if(TESTBIT(track->GetITSClusterMap(),l)) {
2517  fHisnLayerITSsa->Fill(l);
2518  }
2519  }
2520  }
2521  Int_t label=0;
2522  if(fReadMC){
2523  label=track->GetLabel();
2524  if (label<0) fHisNentries->Fill(11);
2525  else fHisNentries->Fill(12);
2526  }
2527 
2528 
2529  if (track->Pt()>0.3 &&
2530  track->GetStatus()&AliESDtrack::kTPCrefit &&
2531  track->GetStatus()&AliESDtrack::kITSrefit &&
2532  /*nclsTot>3 &&*/
2533  nclsSPD>0) {//count good tracks
2534 
2535 
2536  if(fReadMC && label<0) {
2537  fHisptFakeTr->Fill(track->Pt());
2538  isFakeTrack++;
2539  } else {
2540  fHisptGoodTr->Fill(track->Pt());
2541  isGoodTrack++;
2542  }
2543 
2544  if(fCuts->IsDaughterSelected(track,&vESD,fCuts->GetTrackCuts(),aod)){
2545  isSelTrack++;
2546  }//select tracks for our analyses
2547 
2548  }
2549  } //fill track histos
2550  } //end loop on tracks
2551 
2552  //fill once per event
2553  if(fOnOff[0]){
2554  if (fReadMC) fHisdistrFakeTr->Fill(isFakeTrack);
2555  fHisdistrGoodTr->Fill(isGoodTrack);
2556  fHisdistrSelTr->Fill(isSelTrack);
2557  }
2558 
2559  if(!isSimpleMode){
2560  // loop over candidates
2561  Int_t nCand = arrayProng->GetEntriesFast();
2562  Int_t ndaugh=3;
2565 
2566  for (Int_t iCand = 0; iCand < nCand; iCand++) {
2567  AliAODRecoDecayHF *d = (AliAODRecoDecayHF*)arrayProng->UncheckedAt(iCand);
2568  if(d->GetIsFilled()<1) continue;//0 = not refilled. or refill failed. 1 = standard dAODs. 2 = succesfully refilled
2569  if(fUseSelectionBit && d->GetSelectionMap()) {
2570  if(fDecayChannel==AliAnalysisTaskSEHFQA::kD0toKpi && !d->HasSelectionBit(AliRDHFCuts::kD0toKpiCuts)) continue; //skip the D0 from Dstar
2572  }
2573  if(fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && !((dynamic_cast<AliAODRecoCascadeHF*>(d))->CheckCascadeFlags())) continue;
2574 
2575  if(fReadMC){
2576 
2577  Int_t labD = -1;
2578  if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) {
2579 
2580  Int_t pdgDgLctoV0bachelor[2]={2212,310};
2581  Int_t pdgDgV0toDaughters[2]={211,211};
2582  Int_t mcLabelK0S = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->K0S+p and cc
2583  pdgDgLctoV0bachelor[1]=3122, pdgDgLctoV0bachelor[0]=211;
2584  pdgDgV0toDaughters[0]=2212, pdgDgV0toDaughters[1]=211;
2585  Int_t mcLabelLambda = (dynamic_cast<AliAODRecoCascadeHF*>(d))->MatchToMC(pdg,pdgDgLctoV0bachelor[1],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); // Lc->Lambda+pi and cc
2586  if (mcLabelK0S!=-1 || mcLabelLambda!=-1) AliInfo(Form("mcLabelK0S=%d - mcLabelLambda=%d",mcLabelK0S,mcLabelLambda));
2587 
2588  if (mcLabelK0S!=-1 && mcLabelLambda!=-1)
2589  AliInfo("Strange: current Lc->V0+bachelor candidate has two MC different labels!");
2590  else if (mcLabelK0S>-1 && mcLabelLambda==-1)
2591  labD = mcLabelK0S;
2592  else if (mcLabelLambda>-1 && mcLabelK0S==-1)
2593  labD = mcLabelLambda;
2594  }
2595  else
2596  labD = d->MatchToMC(pdg,mcArray,ndaugh,pdgdaughters);
2597 
2598  if(labD>=0){
2599  AliAODMCParticle *partD = (AliAODMCParticle*)mcArray->At(labD);
2600  Int_t label=partD->GetMother();
2601  AliAODMCParticle *mot = (AliAODMCParticle*)mcArray->At(label);
2602  while(label>=0){//get first mother
2603  mot = (AliAODMCParticle*)mcArray->At(label);
2604  label=mot->GetMother();
2605  }
2606  if(mot){
2607  Int_t pdgMotCode = mot->GetPdgCode();
2608 
2609  if(TMath::Abs(pdgMotCode)==4) fHisNentries->Fill(9); //from primary charm
2610  if(TMath::Abs(pdgMotCode)==5) fHisNentries->Fill(10); //from beauty
2611  }
2612  }
2613  }//end MC
2614  fHisNentries->Fill(8);//count the candidates (data and MC)
2615 
2616  for(Int_t id=0;id<ndaugh;id++){
2617  //other histograms to be filled when the cut object is given
2618  AliAODTrack* track=0;
2619 
2620  if (fDecayChannel==AliAnalysisTaskSEHFQA::kLambdactoV0 && (dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0()) {
2621  if (id==0)
2622  track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->GetBachelor();
2623  else if (id==1)
2624  track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0PositiveTrack();
2625  else if (id==2)
2626  track=(AliAODTrack*)(dynamic_cast<AliAODRecoCascadeHF*>(d))->Getv0NegativeTrack();
2627  }
2628  else
2629  track=(AliAODTrack*)d->GetDaughter(id);
2630 
2631 
2632  // filtering cut level
2633 
2634  if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && fCuts->IsSelected(d,AliRDHFCuts::kAll,aod)) {
2635 
2636  Int_t label=0;
2637  if(fReadMC)label=track->GetLabel();
2638  if(fOnOff[0]){
2639 
2640  if(fReadMC && label<0) {
2641  isFakeTrack++;
2642  fHisptFakeTrFromDaughFilt->Fill(track->Pt());
2643 
2644  fHisd0f_filt->Fill(d->Getd0Prong(id));
2645  } else {
2646  fHisptGoodTrFromDaugh_filt->Fill(track->Pt());
2647  fHisd0dau_filt->Fill(d->Getd0Prong(id));
2648  Double_t phidaughter = d->PhiProng(id);
2649  if(phidaughter<0) phidaughter=2.0*TMath::Pi()+phidaughter;
2650  fHisd0dauphi_filt->Fill(phidaughter, d->Getd0Prong(id));
2651  Double_t d0rphiz[2],covd0[3];
2652  Bool_t isDCA=track->PropagateToDCA(vtx1,magField,9999.,d0rphiz,covd0);
2653  if(isDCA){
2654  fHisd0zdau_filt->Fill(d0rphiz[1]);
2655  fHisd0zdauphi_filt->Fill(phidaughter,d0rphiz[1]);
2656  }
2657  }
2658  }
2659  }
2660 
2661 
2662 
2663  //track quality
2664 
2665  if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && fCuts->IsSelected(d,AliRDHFCuts::kTracks,aod)) {
2666 
2667  Int_t label=0;
2668  if(fReadMC)label=track->GetLabel();
2669  if(fOnOff[0]){
2670 
2671  if(fReadMC && label<0) {
2672  isFakeTrack++;
2673  fHisptFakeTrFromDaugh->Fill(track->Pt());
2674 
2675  fHisd0f->Fill(d->Getd0Prong(id));
2676  } else {
2677  fHisptGoodTrFromDaugh->Fill(track->Pt());
2678  fHisd0dau->Fill(d->Getd0Prong(id));
2679  Double_t phidaughter = d->PhiProng(id);
2680  if(phidaughter<0) phidaughter=2.0*TMath::Pi()+phidaughter;
2681  fHisd0dauphi->Fill(phidaughter, d->Getd0Prong(id));
2682  Double_t d0rphiz[2],covd0[3];
2683  Bool_t isDCA=track->PropagateToDCA(vtx1,magField,9999.,d0rphiz,covd0);
2684  if(isDCA){
2685  fHisd0zdau->Fill(d0rphiz[1]);
2686  fHisd0zdauphi->Fill(phidaughter,d0rphiz[1]);
2687  }
2688  }
2689  }
2690 
2691 
2693  Int_t nITScls = 0;
2694  Double_t nTPCCrossedRows = track->GetTPCClusterInfo(2,1);
2695  Double_t ratioCrossedRowsOverFcls = 1.0;
2696  if(track->GetTPCNclsF()>0){
2697  ratioCrossedRowsOverFcls = (nTPCCrossedRows)/(track->GetTPCNclsF());
2698  }
2699  for(Int_t l=0;l<6;l++) {
2700  if(TESTBIT(track->GetITSClusterMap(),l)) {
2701  nITScls++;
2702  }
2703  }
2704 
2705  fHisPtDaughters->Fill(track->Pt());
2706  fHisPhiDaughters->Fill(track->Phi());
2707  fHisEtaDaughters->Fill(track->Eta());
2708  fHisEtavsPhiDaughters->Fill(track->Phi(),track->Eta());
2709 
2710  fHisNTPCclsvsPtDaughters->Fill(track->Pt(),track->GetTPCNcls());
2711  fHisNTPCclsvsPhiDaughters->Fill(track->Phi(),track->GetTPCNcls());
2712  fHisNTPCclsvsEtaDaughters->Fill(track->Eta(),track->GetTPCNcls());
2713 
2714  fHisNTPCCrossedRowsvsPtDaughters->Fill(track->Pt(),nTPCCrossedRows);
2715  fHisNTPCCrossedRowsvsPhiDaughters->Fill(track->Phi(),nTPCCrossedRows);
2716  fHisNTPCCrossedRowsvsEtaDaughters->Fill(track->Eta(),nTPCCrossedRows);
2717 
2718  fHisRatioCRowsOverFclsvsPtDaughters->Fill(track->Pt(),ratioCrossedRowsOverFcls);
2719  fHisRatioCRowsOverFclsvsPhiDaughters->Fill(track->Phi(),ratioCrossedRowsOverFcls);
2720  fHisRatioCRowsOverFclsvsEtaDaughters->Fill(track->Eta(),ratioCrossedRowsOverFcls);
2721 
2722  fHisNITSclsvsPtDaughters->Fill(track->Pt(), nITScls);
2723  fHisNITSclsvsPhiDaughters->Fill(track->Phi(), nITScls);
2724  fHisNITSclsvsEtaDaughters->Fill(track->Eta(), nITScls);
2725  if(!(track->HasPointOnITSLayer(0)) && !(track->HasPointOnITSLayer(1))){ //no SPD points
2726  fHisSPDclsDaughters->Fill(0);
2727  }
2728  if(track->HasPointOnITSLayer(0) && !(track->HasPointOnITSLayer(1))){ //kOnlyFirst
2729  fHisSPDclsDaughters->Fill(1);
2730  }
2731  if(!(track->HasPointOnITSLayer(0)) && track->HasPointOnITSLayer(1)){ //kOnlySecond
2732  fHisSPDclsDaughters->Fill(2);
2733  }
2734  if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)){ //kBoth
2735  fHisSPDclsDaughters->Fill(3);
2736  }
2737 
2738 
2739  if(fOnOff[1]){
2740  AliAODPid *pid = track->GetDetPid();
2741  if(pid){
2742  if(pidHF && pidHF->CheckStatus(track,"TPC")){
2743  fHisTPCsigNvsPtDaughters->Fill(track->Pt(),pid->GetTPCsignalN());
2744  fHisTPCsigNvsPhiDaughters->Fill(track->Phi(),pid->GetTPCsignalN());
2745  fHisTPCsigNvsEtaDaughters->Fill(track->Eta(),pid->GetTPCsignalN());
2746  }
2747  }
2748  }
2749  }
2750 
2751 
2752  if (fCuts->IsSelected(d,AliRDHFCuts::kAll,aod) && fOnOff[1]){
2753  fHisNentries->Fill(6); //candidates passing analysis cuts
2754 
2755  AliAODPid *pid = track->GetDetPid();
2756  if(pid){
2757  Double_t times[5];
2758  pid->GetIntegratedTimes(times);
2759  if(pidHF && pidHF->CheckStatus(track,"TOF")){
2760  Double_t tofTime=pid->GetTOFsignal();
2761  AliTOFHeader* tofH=(AliTOFHeader*)aod->GetTOFHeader();
2762  Double_t tofRes[AliPID::kSPECIES];
2763  pid->GetTOFpidResolution(tofRes);
2764  if (tofH && (TMath::Abs(tofRes[0]) <= 1.E-16) ) { // new AOD
2765  AliTOFPIDResponse tofResp=pidHF->GetPidResponse()->GetTOFResponse();
2766  Double_t startTime=tofResp.GetStartTime(track->P());
2767  tofTime-=startTime;
2768  }
2769  fHisTOFtimeKaonHyptimeAC->Fill(track->P(),tofTime-times[AliPID::kKaon]);
2770  }
2771  if(pidHF && pidHF->CheckStatus(track,"TPC")) fHisTPCsigvspAC->Fill(pid->GetTPCmomentum(),pid->GetTPCsignal());
2772  }
2773 
2774  } //end analysis cuts
2775  } //end acceptance and track cuts
2776  } //end loop on tracks in the candidate
2777  } //end loop on candidates
2778 
2779  }
2780  } //end if on pid or track histograms
2781  delete vHF;
2782  delete tpcres;
2783  delete [] pdgdaughters;
2784  PostData(1,fOutputEntries);
2785  if(fOnOff[1]) PostData(2,fOutputPID);
2786  if(fOnOff[0]) PostData(3,fOutputTrack);
2787  PostData(4,fCuts);
2788  if(fOnOff[2]) PostData(5,fOutputCounters);
2789  //Post data 6 done in case of centrality on
2790 }
2791 
2792 //____________________________________________________________________________
2795  Double_t cc;
2796  cc = fCuts->GetCentrality(aod);
2797  fHisFEvents->Fill(0., cc);
2798 
2799  UInt_t mask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
2800  UInt_t trigger=AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral;
2801  if(mask & trigger) {
2802  fHisFEvents->Fill(1.,cc); // fired
2803  if (mask & AliVEvent::kMB) fHisFEvents->Fill(2.,cc);
2804  if (mask & AliVEvent::kCentral) fHisFEvents->Fill(3.,cc);
2805  if (mask & AliVEvent::kSemiCentral) fHisFEvents->Fill(4.,cc);
2806  Bool_t rejected=false;
2807  if(cc<0 || cc>60) rejected=true;
2808  const AliVVertex *vertex = aod->GetPrimaryVertex();
2809  Double_t zvtx=vertex->GetZ();
2810  if(TMath::Abs(zvtx)>fCuts->GetMaxVtxZ()) rejected=true;
2811  if(rejected) return; //not interesting for flow QA
2812  } else {
2813  return;
2814  }
2815 
2816  // event accepted
2817  fHisFEvents->Fill(5.,cc);
2819  fRFPcuts->SetPtRange(0.2,5.);
2820  fRFPcuts->SetEtaRange(-0.8,0.8);
2825  fRFPcuts->SetEvent(aod);
2826 
2827  // "FB1" (i=0), "FB128" (i=1), "VZE" (i=2)
2828  Double_t psi[3];
2829  for(Int_t i=0; i!=3; ++i) {
2830  if(i==0) { // switching to bit 1
2833  } else { // switching to bit 128
2835  fRFPcuts->SetAODfilterBit(128);
2836  }
2837  if(i>1) {
2839  fRFPcuts->SetEtaRange(-5,+5);
2840  fRFPcuts->SetPhiMin(0);
2841  fRFPcuts->SetPhiMax(TMath::TwoPi());
2842  }
2844  fFlowEvent->TagSubeventsInEta(-5,0,0,+5);
2845  // getting informationt
2846  AliFlowVector vQ, vQaQb[2];
2847  fFlowEvent->Get2Qsub(vQaQb,2);
2848  vQ = vQaQb[0]+vQaQb[1];
2849  Double_t dMa=vQaQb[0].GetMult();
2850  Double_t dMb=vQaQb[1].GetMult();
2851  if( dMa<2 || dMb<2 ) {
2852  fHisFEvents->Fill(6.,cc); //???
2853  continue;
2854  }
2855  psi[i] = vQ.Phi()/2;
2856  // publishing
2857  fHisQ[i]->Fill(0,cc,vQaQb[0].X()/dMa,dMa); // Qx-
2858  fHisQ[i]->Fill(1,cc,vQaQb[0].Y()/dMa,dMa); // Qy-
2859  fHisQ[i]->Fill(2,cc,vQaQb[1].X()/dMb,dMb); // Qx+
2860  fHisQ[i]->Fill(3,cc,vQaQb[1].Y()/dMb,dMb); // Qy+
2861  fHisAngleQ[i]->Fill(psi[i],cc); // Psi
2862  AliFlowTrackSimple *track;
2863  for(Int_t t=0; t!=fFlowEvent->NumberOfTracks(); ++t) {
2864  track = (AliFlowTrackSimple*) fFlowEvent->GetTrack(t);
2865  if(!track) continue;
2866  if(!track->InRPSelection()) continue;
2867  fHisPhiEta[i]->Fill(track->Phi(),track->Eta(),cc,track->Weight()); //PhiEta
2868  }
2869 
2870  //histo filled only for TPCFB1
2871  if (i==0) {
2873  }
2874  }
2875  // TPC vs VZERO
2876  fHisTPCVZE_AngleQ->Fill(psi[0],psi[2],cc);
2877 }
2878 
2879 //____________________________________________________________________________
2882 
2883  fOutputEntries = dynamic_cast<TList*> (GetOutputData(1));
2884  if (!fOutputEntries && fOnOff[1]) {
2885  printf("ERROR: %s not available\n",GetOutputSlot(1)->GetContainer()->GetName());
2886  return;
2887  }
2888 
2889  fOutputPID = dynamic_cast<TList*> (GetOutputData(2));
2890  if (!fOutputPID && fOnOff[1]) {
2891  printf("ERROR: %s not available\n",GetOutputSlot(2)->GetContainer()->GetName());
2892  return;
2893  }
2894 
2895  fOutputTrack = dynamic_cast<TList*> (GetOutputData(3));
2896  if (!fOutputTrack && fOnOff[0]) {
2897  printf("ERROR: %s not available\n",GetOutputSlot(3)->GetContainer()->GetName());
2898  return;
2899  }
2900 
2901 }
2902 
2903 
Bool_t fOnOff[5]
flag to use or not the selection bit
Float_t GetMaxCentrality() const
Definition: AliRDHFCuts.h:266
TH2F * fHisTPCsigNvsEtaAllTracks
! Histo. of output slot #2 (fOutputPID)
Bool_t IsEventRejectedDueToCentrality() const
Definition: AliRDHFCuts.h:311
TH1F * fHisd0dau_filt
! Histo. of output slot #3 (fOutputTrack)
Int_t pdg
TH1F * fHisd0zdau
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDueToZVertexOutsideFiducialRegion() const
Definition: AliRDHFCuts.h:305
TH2F * fHisNTPCCrossedRowsvsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisRatioCRowsOverFclsvsPtDaughters
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisRatioCRowsOverFclsvsEtaDaughters
! Histo. of output slot #3 (fOutputTrack)
const Color_t cc[]
Definition: DrawKs.C:1
TH2F * fHisRatioCRowsOverFclsvsEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDueToNotRecoVertex() const
Definition: AliRDHFCuts.h:299
TH2F * fHisNentriesSelBit
! Histo. of output slot #1 (fOutputEntries)
TH1F * fHisNtracklets
! Histo. of output slot #3 (fOutputTrack)
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:302
TList * fOutputEvSelection
! list sent on output slot 7
TH1F * fHisdistrGoodTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNTPCclsvsEtaDaughters
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisd0TracksSPDany
! Histo. of output slot #3 (fOutputTrack)
AliFlowEvent * fFlowEvent
! to handle the reusage of the flowEvent object
void SetPhiMin(Double_t min)
TH1F * fHisEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHiszvtx
! Histo. of output slot #7 (fOutputEvSelection)
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:308
TH2F * fHisTPCsigmaMCProton
! Histo. of output slot #2 (fOutputPID)
TH1F * fHiszvtxSelEv
! Histo. of output slot #7 (fOutputEvSelection)
Double_t nsigma
unsigned long ULong_t
Definition: External.C:38
TH2F * fHisTOFsigmaMCKSigPid
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisTOFsig
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisTrigMulSel
! Histo. of output slot #7 (fOutputEvSelection)
TH2F * fHisTPCsigmaMCK
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisNTPCclsvsEtaAllTracks
! Histo. of output slot #3 (fOutputTrack)
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
TH1F * fHisnLayerITSselTr
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisd0dauphi
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisWhichVert
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisTOFstartTimeMask
! Histo. of output slot #2 (fOutputPID)
TH2F * fHisFEvents
! Histo. of output slot #8 (fOutputFlowObs)
TH1F * fHisnClsITSSA
! Histo. of output slot #3 (fOutputTrack)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH2F * fHisd0zdauphi_filt
! Histo. of output slot #3 (fOutputTrack)
Bool_t IsEventRejectedDuePhysicsSelection() const
Definition: AliRDHFCuts.h:320
TH2F * fHisNTPCclsvsPhiDaughters
! Histo. of output slot #3 (fOutputTrack)
TList * fOutputFlowObs
! list sent on output slot 8
TH2F * fHisTrigMul
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisTOFsigPid3sigProton
! Histo. of output slot #2 (fOutputPID)
Bool_t fSimpleMode
flag to read MC
TH2F * fHisNITSclsvsPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisnLayerITS
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisntrklvsPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
void SetAcceptKinkDaughters(Bool_t a)
TH1F * fHisTOFstartTimeDistrib
! Histo. of output slot #2 (fOutputPID)
AliFlowTrackCuts * fRFPcuts
! reference flow particle cuts
TH2F * fHisStdPercentileSecondPercentile
! Histo. of output slot #6 (fOutputCheckCentrality)
Bool_t IsEventSelected(AliVEvent *event)
void SetEvent(AliVEvent *event, AliMCEvent *mcEvent=NULL)
TH2F * fHisNITSclsvsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisNTPCclsvsPhiAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisTOFtimeKaonHyptimeAC
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisptGoodTrFromDaugh
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisd0TracksTPCITSSPDany
! Histo. of output slot #3 (fOutputTrack)
TH1F * fHisWhyEvRejected
! Histo. of output slot #7 (fOutputEvSelection)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
TH2F * fHisTOFsigmaKSigPid
! Histo. of output slot #2 (fOutputPID)
TH1F * fHisyvtxSelEv
! Histo. of output slot #7 (fOutputEvSelection)
TH1F * fHisMultIn
! Histo. of output slot #6 (fOutputCheckCentrality)
TH1F * fHisptGoodTrFromDaugh_filt
! Histo. of output slot #3 (fOutputTrack)
void SetMinNClustersTPC(Int_t a)
TList * fOutputTrack
! list sent on output slot 3
const Double_t etamax
Double_t Weight() const
TH3F * fHisPhiEta[3]
! Histo. of output slot #8 (fOutputFlowObs)
Bool_t IsSelected(TObject *obj)
Definition: AliRDHFCuts.h:274
TH1F * fHisTOFflags
! Histo. of output slot #2 (fOutputPID)
void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB)
void SetPhiMax(Double_t max)
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:296
TH2F * fHisNTPCclsvsPtAllTracks
! Histo. of output slot #3 (fOutputTrack)
TH2F * fHisd0zdauphi
! Histo. of output slot #3 (fOutputTrack)
Double_t Eta() const
virtual void Get2Qsub(AliFlowVector *Qarray, Int_t n=2, TList *weightsList=0x0, Bool_t usePhiWeights=0x0, Bool_t usePtWeights=0x0, Bool_t useEtaWeights=0x0)
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:291
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