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