AliPhysics  db95e02 (db95e02)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSEDvsMultiplicity.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2008, 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 
18 //*************************************************************************
19 // Class AliAnalysisTaskSEDvsMultiplicity
20 // AliAnalysisTaskSE for the D meson vs. multiplcity analysis
21 // Authors: Renu Bala, Zaida Conesa del Valle, Francesco Prino
23 
24 #include <TClonesArray.h>
25 #include <TCanvas.h>
26 #include <TList.h>
27 #include <TString.h>
28 #include <TDatabasePDG.h>
29 #include <TH1F.h>
30 #include <TH2F.h>
31 #include <TH3F.h>
32 #include <THnSparse.h>
33 #include <TProfile.h>
34 #include "AliAnalysisManager.h"
35 #include "AliRDHFCuts.h"
38 #include "AliRDHFCutsD0toKpi.h"
39 #include "AliAODHandler.h"
40 #include "AliAODEvent.h"
41 #include "AliAODVertex.h"
42 #include "AliAODTrack.h"
43 #include "AliAODRecoDecayHF.h"
44 #include "AliAODRecoCascadeHF.h"
45 #include "AliAnalysisVertexingHF.h"
46 #include "AliAnalysisTaskSE.h"
49 #include "AliVertexingHFUtils.h"
50 #include "AliAODVZERO.h"
51 #include "AliESDUtils.h"
52 
56 
57 //________________________________________________________________________
60  fOutput(0),
61  fListCuts(0),
62  fOutputCounters(0),
63  fListProfiles(0),
64  fHistNEvents(0),
65  fHistNtrEta16vsNtrEta1EvSel(0),
66  fHistNtrEta05vsNtrEta1EvSel(0),
67  fHistNtrEta03vsNtrEta1EvSel(0),
68  fHistNtrEtaV0AvsNtrEta1EvSel(0),
69  fHistNtrEtaV0MvsNtrEta1EvSel(0),
70  fHistNtrEtaV0AvsV0AEqEvSel(0),
71  fHistNtrEtaV0MvsV0MEqEvSel(0),
72  fHistNtrCorrEta1vsNtrRawEta1EvSel(0),
73  fHistMultCorrvsMultRawEvSel(0),
74  fHistNtrEta16vsNtrEta1EvWithCand(0),
75  fHistNtrEta05vsNtrEta1EvWithCand(0),
76  fHistNtrEta03vsNtrEta1EvWithCand(0),
77  fHistNtrEtaV0AvsNtrEta1EvWithCand(0),
78  fHistNtrEtaV0MvsNtrEta1EvWithCand(0),
79  fHistNtrEtaV0AvsV0AEqEvWithCand(0),
80  fHistNtrEtaV0MvsV0MEqEvWithCand(0),
81  fHistNtrCorrEta1vsNtrRawEta1EvWithCand(0),
82  fHistMultCorrvsMultRawEvWithCand(0),
83  fHistNtrEta16vsNtrEta1EvWithD(0),
84  fHistNtrEta05vsNtrEta1EvWithD(0),
85  fHistNtrEta03vsNtrEta1EvWithD(0),
86  fHistNtrEtaV0AvsNtrEta1EvWithD(0),
87  fHistNtrEtaV0MvsNtrEta1EvWithD(0),
88  fHistNtrEtaV0AvsV0AEqEvWithD(0),
89  fHistNtrEtaV0MvsV0MEqEvWithD(0),
90  fHistNtrCorrEta1vsNtrRawEta1EvWithD(0),
91  fHistMultCorrvsMultRawEvWithD(0),
92  fHistNtrVsZvtx(0),
93  fHistNtrCorrVsZvtx(0),
94  fHistNtrVsNchMC(0),
95  fHistNtrCorrVsNchMC(0),
96  fHistNtrVsNchMCPrimary(0),
97  fHistNtrCorrVsNchMCPrimary(0),
98  fHistNtrVsNchMCPhysicalPrimary(0),
99  fHistNtrCorrVsNchMCPhysicalPrimary(0),
100  fHistGenPrimaryParticlesInelGt0(0),
101  fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary(0),
102  fHistNtrUnCorrPSSel(0),
103  fHistNtrUnCorrPSTrigSel(0),
104  fHistNtrUnCorrPSTrigPileUpSel(0),
105  fHistNtrUnCorrPSTrigPileUpVtxSel(0),
106  fHistNtrUnCorrPSTrigPileUpVtxContSel(0),
107  fHistNtrUnCorrPSTrigPileUpVtxRangeSel(0),
108  fHistNtrUnCorrPSTrigPileUpVtxRangeCentrSel(0),
109  fHistNtrUnCorrEvSel(0),
110  fHistNtrUnCorrEvWithCand(0),
111  fHistNtrUnCorrEvWithD(0),
112  fHistNtrCorrPSSel(0),
113  fHistNtrCorrEvSel(0),
114  fHistNtrCorrEvWithCand(0),
115  fHistNtrCorrEvWithD(0),
116  fPtVsMassVsMult(0),
117  fPtVsMassVsMultNoPid(0),
118  fPtVsMassVsMultUncorr(0),
119  fPtVsMassVsMultPart(0),
120  fPtVsMassVsMultAntiPart(0),
121  fPtVsMassVsMultMC(0),
122  fUpmasslimit(1.965),
123  fLowmasslimit(1.765),
124  fNMassBins(200),
125  fRDCutsAnalysis(0),
126  fCounterC(0),
127  fCounterU(0),
128  fCounterCandidates(0),
129  fDoImpPar(kFALSE),
130  fNImpParBins(400),
131  fLowerImpPar(-2000.),
132  fHigherImpPar(2000.),
133  fReadMC(kFALSE),
134  fMCOption(0),
135  fisPPbData(kFALSE),
136  fUseBit(kTRUE),
137  fSubtractTrackletsFromDau(kFALSE),
138  fKeepCorrPlots(kFALSE),
139  fUseNchWeight(0),
140  fHistoMCNch(0),
141  fHistoMeasNch(0),
142  fRefMult(9.26),
143  fPdgMeson(411),
144  fMultiplicityEstimator(kNtrk10),
145  fMCPrimariesEstimator(kEta10),
146  fDoVZER0ParamVertexCorr(1)
147 {
149  for(Int_t i=0; i<5; i++) fHistMassPtImpPar[i]=0;
150  for(Int_t i=0; i<4; i++) fMultEstimatorAvg[i]=0;
151 }
152 
153 //________________________________________________________________________
155  AliAnalysisTaskSE(name),
156  fOutput(0),
157  fListCuts(0),
158  fOutputCounters(0),
159  fListProfiles(0),
160  fHistNEvents(0),
161  fHistNtrEta16vsNtrEta1EvSel(0),
162  fHistNtrEta05vsNtrEta1EvSel(0),
163  fHistNtrEta03vsNtrEta1EvSel(0),
164  fHistNtrEtaV0AvsNtrEta1EvSel(0),
165  fHistNtrEtaV0MvsNtrEta1EvSel(0),
166  fHistNtrEtaV0AvsV0AEqEvSel(0),
167  fHistNtrEtaV0MvsV0MEqEvSel(0),
168  fHistNtrCorrEta1vsNtrRawEta1EvSel(0),
169  fHistMultCorrvsMultRawEvSel(0),
170  fHistNtrEta16vsNtrEta1EvWithCand(0),
171  fHistNtrEta05vsNtrEta1EvWithCand(0),
172  fHistNtrEta03vsNtrEta1EvWithCand(0),
173  fHistNtrEtaV0AvsNtrEta1EvWithCand(0),
174  fHistNtrEtaV0MvsNtrEta1EvWithCand(0),
175  fHistNtrEtaV0AvsV0AEqEvWithCand(0),
176  fHistNtrEtaV0MvsV0MEqEvWithCand(0),
177  fHistNtrCorrEta1vsNtrRawEta1EvWithCand(0),
178  fHistMultCorrvsMultRawEvWithCand(0),
179  fHistNtrEta16vsNtrEta1EvWithD(0),
180  fHistNtrEta05vsNtrEta1EvWithD(0),
181  fHistNtrEta03vsNtrEta1EvWithD(0),
182  fHistNtrEtaV0AvsNtrEta1EvWithD(0),
183  fHistNtrEtaV0MvsNtrEta1EvWithD(0),
184  fHistNtrEtaV0AvsV0AEqEvWithD(0),
185  fHistNtrEtaV0MvsV0MEqEvWithD(0),
186  fHistNtrCorrEta1vsNtrRawEta1EvWithD(0),
187  fHistMultCorrvsMultRawEvWithD(0),
188  fHistNtrVsZvtx(0),
189  fHistNtrCorrVsZvtx(0),
190  fHistNtrVsNchMC(0),
191  fHistNtrCorrVsNchMC(0),
192  fHistNtrVsNchMCPrimary(0),
193  fHistNtrCorrVsNchMCPrimary(0),
194  fHistNtrVsNchMCPhysicalPrimary(0),
195  fHistNtrCorrVsNchMCPhysicalPrimary(0),
196  fHistGenPrimaryParticlesInelGt0(0),
197  fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary(0),
198  fHistNtrUnCorrPSSel(0),
199  fHistNtrUnCorrPSTrigSel(0),
200  fHistNtrUnCorrPSTrigPileUpSel(0),
201  fHistNtrUnCorrPSTrigPileUpVtxSel(0),
202  fHistNtrUnCorrPSTrigPileUpVtxContSel(0),
203  fHistNtrUnCorrPSTrigPileUpVtxRangeSel(0),
204  fHistNtrUnCorrPSTrigPileUpVtxRangeCentrSel(0),
205  fHistNtrUnCorrEvSel(0),
206  fHistNtrUnCorrEvWithCand(0),
207  fHistNtrUnCorrEvWithD(0),
208  fHistNtrCorrPSSel(0),
209  fHistNtrCorrEvSel(0),
210  fHistNtrCorrEvWithCand(0),
211  fHistNtrCorrEvWithD(0),
212  fPtVsMassVsMult(0),
213  fPtVsMassVsMultNoPid(0),
214  fPtVsMassVsMultUncorr(0),
215  fPtVsMassVsMultPart(0),
216  fPtVsMassVsMultAntiPart(0),
217  fPtVsMassVsMultMC(0),
218  fUpmasslimit(1.965),
219  fLowmasslimit(1.765),
220  fNMassBins(200),
221  fRDCutsAnalysis(cuts),
222  fCounterC(0),
223  fCounterU(0),
224  fCounterCandidates(0),
225  fDoImpPar(kFALSE),
226  fNImpParBins(400),
227  fLowerImpPar(-2000.),
228  fHigherImpPar(2000.),
229  fReadMC(kFALSE),
230  fMCOption(0),
231  fisPPbData(switchPPb),
232  fUseBit(kTRUE),
233  fSubtractTrackletsFromDau(kFALSE),
234  fKeepCorrPlots(kFALSE),
235  fUseNchWeight(0),
236  fHistoMCNch(0),
237  fHistoMeasNch(0),
238  fRefMult(9.26),
239  fPdgMeson(pdgMeson),
240  fMultiplicityEstimator(kNtrk10),
241  fMCPrimariesEstimator(kEta10),
242  fDoVZER0ParamVertexCorr(1)
243 {
244  //
246  //
247 
248  for(Int_t i=0; i<5; i++) fHistMassPtImpPar[i]=0;
249  for(Int_t i=0; i<4; i++) fMultEstimatorAvg[i]=0;
250  if(fPdgMeson==413){
251  fNMassBins=200;
252  SetMassLimits(0.12,0.2);
253  }else{
254  fNMassBins=200;
256  }
257  // Default constructor
258  // Otput slot #1 writes into a TList container
259  DefineOutput(1,TList::Class()); //My private output
260  // Output slot #2 writes cut to private output
261  DefineOutput(2,TList::Class());
262  // Output slot #3 writes cut to private output
263  DefineOutput(3,TList::Class());
264  // Output slot #4 writes cut to private output
265  DefineOutput(4,TList::Class());
266 }
267 //________________________________________________________________________
269 {
270  //
272  //
273  delete fOutput;
274  delete fHistNEvents;
275  delete fListCuts;
276  delete fListProfiles;
277  delete fRDCutsAnalysis;
278  delete fCounterC;
279  delete fCounterU;
280  delete fCounterCandidates;
281  for(Int_t i=0; i<4; i++) {
282  if (fMultEstimatorAvg[i]) delete fMultEstimatorAvg[i];
283  }
284 
285  for(Int_t i=0; i<5; i++){
286  delete fHistMassPtImpPar[i];
287  }
288  if(fHistoMCNch) delete fHistoMCNch;
289  if(fHistoMeasNch) delete fHistoMeasNch;
290 }
291 
292 //_________________________________________________________________
295  if(uplimit>lowlimit){
296  fLowmasslimit = lowlimit;
297  fUpmasslimit = uplimit;
298  }else{
299  AliError("Wrong mass limits: upper value should be larger than lower one");
300  }
301 }
302 //_________________________________________________________________
305  Double_t mass=TDatabasePDG::Instance()->GetParticle(TMath::Abs(pdg))->Mass();
306  SetMassLimits(mass-range,mass+range);
307 }
308 //________________________________________________________________________
310  //
312  //
313  printf("AnalysisTaskSEDvsMultiplicity_0::Init() \n");
314 
315  if(fUseNchWeight && !fReadMC){ AliFatal("Nch weights can only be used in MC mode"); return; }
316  if(fUseNchWeight && !fHistoMCNch){ AliFatal("Nch weights can only be used without histogram"); return; }
317  if(fUseNchWeight==1 && !fHistoMeasNch) {//Nch weights
318  if(fisPPbData){ AliFatal("Nch weights can only be used with MC and data histogram in pPb"); return; }
319  else CreateMeasuredNchHisto();
320  }
321  if(fUseNchWeight==2 && !fHistoMeasNch){ AliFatal("Ntrk weights can only be used with MC and data histogram"); return; } //for pp, pPb Ntrk weights
322 
323 
324  fListCuts=new TList();
325  fListCuts->SetOwner();
326  fListCuts->SetName("CutsList");
327 
328 
329  if(fPdgMeson==411){
330  AliRDHFCutsDplustoKpipi* copycut=new AliRDHFCutsDplustoKpipi(*(static_cast<AliRDHFCutsDplustoKpipi*>(fRDCutsAnalysis)));
331  copycut->SetName("AnalysisCutsDplus");
332  fListCuts->Add(copycut);
333  }else if(fPdgMeson==421){
334  AliRDHFCutsD0toKpi* copycut=new AliRDHFCutsD0toKpi(*(static_cast<AliRDHFCutsD0toKpi*>(fRDCutsAnalysis)));
335  copycut->SetName("AnalysisCutsDzero");
336  fListCuts->Add(copycut);
337  }else if(fPdgMeson==413){
338  AliRDHFCutsDStartoKpipi* copycut=new AliRDHFCutsDStartoKpipi(*(static_cast<AliRDHFCutsDStartoKpipi*>(fRDCutsAnalysis)));
339  copycut->SetName("AnalysisCutsDStar");
340  fListCuts->Add(copycut);
341  }
344 
345  PostData(2,fListCuts);
346 
347  fListProfiles = new TList();
348  fListProfiles->SetOwner();
349  TString period[4];
350  Int_t nProfiles=4;
351  if (fisPPbData) {period[0]="LHC13b"; period[1]="LHC13c"; nProfiles = 2;}
352  else {period[0]="LHC10b"; period[1]="LHC10c"; period[2]="LHC10d"; period[3]="LHC10e"; nProfiles = 4;}
353 
354  for(Int_t i=0; i<nProfiles; i++){
355  if(fMultEstimatorAvg[i]){
356  TProfile* hprof=new TProfile(*fMultEstimatorAvg[i]);
357  hprof->SetName(Form("ProfileTrkVsZvtx%s\n",period[i].Data()));
358  fListProfiles->Add(hprof);
359  }
360  }
361 
362  PostData(4,fListProfiles);
363 
364  return;
365 }
366 
367 //________________________________________________________________________
369 {
371  //
372  if(fDebug > 1) printf("AnalysisTaskSEDvsMultiplicity::UserCreateOutputObjects() \n");
373 
374  // Several histograms are more conveniently managed in a TList
375  fOutput = new TList();
376  fOutput->SetOwner();
377  fOutput->SetName("OutputHistos");
378 
379  Int_t nMultBins = 200;
380  Float_t firstMultBin = -0.5;
381  Float_t lastMultBin = 199.5;
382  Int_t nMultBinsNtrk = nMultBins;
383  Float_t lastMultBinNtrk = lastMultBin;
384  Int_t nMultBinsV0 = 400;
385  Float_t lastMultBinV0 = 799.5;
386  const char *estimatorName="tracklets";
387  if(fisPPbData) {
388  nMultBinsNtrk = 375;
389  lastMultBinNtrk = 374.5;
390  nMultBins = nMultBinsNtrk;
391  lastMultBin = lastMultBinNtrk;
392  }
394  nMultBins = nMultBinsV0;
395  lastMultBin = lastMultBinV0;
396  estimatorName = "vzero";
397  }
398 
399  fHistNtrUnCorrPSSel = new TH1F("hNtrUnCorrPSSel",Form("Uncorrected %s multiplicity for PS selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
400  fHistNtrUnCorrPSTrigSel = new TH1F("hNtrUnCorrPSTrigSel",Form("Uncorrected %s multiplicity for PS + trigger name selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
401  fHistNtrUnCorrPSTrigPileUpSel = new TH1F("hNtrUnCorrPSTrigPileUpSel",Form("Uncorrected %s multiplicity for PS + trigger name + pileup selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
402  fHistNtrUnCorrPSTrigPileUpVtxSel = new TH1F("hNtrUnCorrPSTrigPileUpVtxSel",Form("Uncorrected %s multiplicity for PS + trigger name + pileup + with-vertex selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
403  fHistNtrUnCorrPSTrigPileUpVtxContSel = new TH1F("hNtrUnCorrPSTrigPileUpVtxContSel",Form("Uncorrected %s multiplicity for PS + trigger name + pileup + with-vertex-contrib selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
404  fHistNtrUnCorrPSTrigPileUpVtxRangeSel = new TH1F("hNtrUnCorrPSTrigPileUpVtxRangeSel",Form("Uncorrected %s multiplicity for PS + trigger name + pileup + with-vertex-contrib-range selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
405  fHistNtrUnCorrPSTrigPileUpVtxRangeCentrSel = new TH1F("hNtrUnCorrPSTrigPileUpVtxRangeCentrSel",Form("Uncorrected %s multiplicity for PS + trigger name + pileup + with-vertex-contrib-range + centrality selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
406  fHistNtrUnCorrEvSel = new TH1F("hNtrUnCorrEvSel",Form("Uncorrected %s multiplicity for selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
407  fHistNtrUnCorrEvWithCand = new TH1F("hNtrUnCorrEvWithCand",Form("Uncorrected %s multiplicity for events with D candidates; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);// Total multiplicity
408  fHistNtrUnCorrEvWithD = new TH1F("hNtrUnCorrEvWithD",Form("Uncorrected %s multiplicity for events with D in mass region ; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin); //
409  fHistNtrCorrPSSel = new TH1F("hNtrCorrPSSel",Form("Corrected %s multiplicity for PS selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
410  fHistNtrCorrEvSel = new TH1F("hNtrCorrEvSel",Form("Corrected %s multiplicity for selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
411  fHistNtrCorrEvWithCand = new TH1F("hNtrCorrEvWithCand", Form("%s multiplicity for events with D candidates; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);// Total multiplicity
412  fHistNtrCorrEvWithD = new TH1F("hNtrCorrEvWithD", Form("%s multiplicity for events with D in mass region ; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin); //
413 
414  if(fKeepCorrPlots){
415  fHistNtrEta16vsNtrEta1EvSel = new TH2F("hNtrEta16vsNtrEta1EvSel","Uncorrected Eta1.6 vs Eta1.0 (events selected); Ntracklets #eta<1.0; Ntracklets #eta<1.6",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 1.6 vs eta 1.0 histogram
416  fHistNtrEta05vsNtrEta1EvSel = new TH2F("hNtrEta05vsNtrEta1EvSel","Uncorrected Eta0.5 vs Eta1.0 (events selected); Ntracklets #eta<1.0; Ntracklets #eta<0.5",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 0.5 vs eta 1.0 histogram
417  fHistNtrEta03vsNtrEta1EvSel = new TH2F("hNtrEta03vsNtrEta1EvSel","Uncorrected Eta0.3 vs Eta1.0 (events selected); Ntracklets #eta<1.0; Ntracklets #eta<0.3",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 0.3 vs eta 1.0 histogram
418  fHistNtrEtaV0AvsNtrEta1EvSel = new TH2F("hNtrEtaV0AvsNtrEta1EvSel","Uncorrected Eta-V0A vs Eta1.0 (events selected); Ntracklets #eta<1.0; Multiplicity V0A",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsV0,firstMultBin,lastMultBinV0); //eta V0A vs eta 1.0 histogram
419  fHistNtrEtaV0MvsNtrEta1EvSel = new TH2F("hNtrEtaV0MvsNtrEta1EvSel","Uncorrected Eta-V0M vs Eta1.0 (events selected); Ntracklets #eta<1.0; Multiplicity V0A+V0C",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsV0,firstMultBin,lastMultBinV0); //eta V0M vs eta 1.0 histogram
420  fHistNtrEtaV0AvsV0AEqEvSel = new TH2F("hNtrEtaV0AvsV0AEqEvSel","Corrected V0A vs corrected V0A-Equalized (events selected); Vzero-A; Vzero-A Equalized",nMultBinsV0,firstMultBin,lastMultBinV0,nMultBinsV0,firstMultBin,lastMultBinV0); // comparison V0A - V0Aeq
421  fHistNtrEtaV0MvsV0MEqEvSel = new TH2F("hNtrEtaV0MvsV0MEqEvSel","Corrected V0M vs corrected V0M-Equalized (events selected); Vzero-M; Vzero-M Equalized",nMultBinsV0,firstMultBin,lastMultBinV0,nMultBinsV0,firstMultBin,lastMultBinV0); // comparison V0M - V0Meq
422  fHistNtrCorrEta1vsNtrRawEta1EvSel = new TH2F("hNtrCorrEta1vsNtrRawEta1EvSel","Corrected Eta1 vs Eta1.0 (events selected); Ntracklets #eta<1.0 corrected; Ntracklets #eta<1",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 1.6 vs eta 1.0 histogram
423  fHistMultCorrvsMultRawEvSel = new TH2F("hMultCorrvsMultRawEvSel",Form("Corrected multiplicity vs uncorrected multiplicity (events selected); %s corrected; %s",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); // corrected vs uncorrected multiplicity
424 
425  fHistNtrEta16vsNtrEta1EvWithCand = new TH2F("hNtrEta16vsNtrEta1EvWithCand","Uncorrected Eta1.6 vs Eta1.0 (events selected with a D candidate); Ntracklets #eta<1.0; Ntracklets #eta<1.6",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 1.6 vs eta 1.0 histogram
426  fHistNtrEta05vsNtrEta1EvWithCand = new TH2F("hNtrEta05vsNtrEta1EvWithCand","Uncorrected Eta0.5 vs Eta1.0 (events selected with a D candidate); Ntracklets #eta<1.0; Ntracklets #eta<0.5",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 0.5 vs eta 1.0 histogram
427  fHistNtrEta03vsNtrEta1EvWithCand = new TH2F("hNtrEta03vsNtrEta1EvWithCand","Uncorrected Eta0.3 vs Eta1.0 (events selected with a D candidate); Ntracklets #eta<1.0; Ntracklets #eta<0.3",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 0.3 vs eta 1.0 histogram
428  fHistNtrEtaV0AvsNtrEta1EvWithCand = new TH2F("hNtrEtaV0AvsNtrEta1EvWithCand","Uncorrected Eta-V0A vs Eta1.0 (events selected with a D candidate); Ntracklets #eta<1.0; Multiplicity V0A",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsV0,firstMultBin,lastMultBinV0); //eta V0A vs eta 1.0 histogram
429  fHistNtrEtaV0MvsNtrEta1EvWithCand = new TH2F("hNtrEtaV0MvsNtrEta1EvWithCand","Uncorrected Eta-V0M vs Eta1.0 (events selected with a D candidate); Ntracklets #eta<1.0; Multiplicity V0A+V0C",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsV0,firstMultBin,lastMultBinV0); //eta V0M vs eta 1.0 histogram
430  fHistNtrEtaV0AvsV0AEqEvWithCand = new TH2F("hNtrEtaV0AvsV0AEqEvWithCand","Corrected V0A vs corrected V0A-Equalized (events selected with a D candidate); Vzero-A; Vzero-A Equalized",nMultBinsV0,firstMultBin,lastMultBinV0,nMultBinsV0,firstMultBin,lastMultBinV0); // comparison V0A - V0Aeq
431  fHistNtrEtaV0MvsV0MEqEvWithCand = new TH2F("hNtrEtaV0MvsV0MEqEvWithCand","Corrected V0M vs corrected V0M-Equalized (events selected with a D candidate); Vzero-M; Vzero-M Equalized",nMultBinsV0,firstMultBin,lastMultBinV0,nMultBinsV0,firstMultBin,lastMultBinV0); // comparison V0M - V0Meq
432  fHistNtrCorrEta1vsNtrRawEta1EvWithCand = new TH2F("hNtrCorrEta1vsNtrRawEta1EvWithCand","Corrected Eta1 vs Eta1.0 (events selected with a D candidate); Ntracklets #eta<1.0 corrected; Ntracklets #eta<1",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 1.6 vs eta 1.0 histogram
433  fHistMultCorrvsMultRawEvWithCand = new TH2F("hMultCorrvsMultRawEvWithCand",Form("Corrected multiplicity vs uncorrected multiplicity (events selected) with a D candidate; %s corrected; %s",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); // corrected vs uncorrected multiplicity
434 
435 
436  fHistNtrEta16vsNtrEta1EvWithD = new TH2F("hNtrEta16vsNtrEta1EvWithD","Uncorrected Eta1.6 vs Eta1.0 (events selected with D in mass range); Ntracklets #eta<1.0; Ntracklets #eta<1.6",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 1.6 vs eta 1.0 histogram
437  fHistNtrEta05vsNtrEta1EvWithD = new TH2F("hNtrEta05vsNtrEta1EvWithD","Uncorrected Eta0.5 vs Eta1.0 (events selected with D in mass range); Ntracklets #eta<1.0; Ntracklets #eta<0.5",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 0.5 vs eta 1.0 histogram
438  fHistNtrEta03vsNtrEta1EvWithD = new TH2F("hNtrEta03vsNtrEta1EvWithD","Uncorrected Eta0.3 vs Eta1.0 (events selected with D in mass range); Ntracklets #eta<1.0; Ntracklets #eta<0.3",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 0.3 vs eta 1.0 histogram
439  fHistNtrEtaV0AvsNtrEta1EvWithD = new TH2F("hNtrEtaV0AvsNtrEta1EvWithD","Uncorrected Eta-V0A vs Eta1.0 (events selected with D in mass range); Ntracklets #eta<1.0; Multiplicity V0A",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsV0,firstMultBin,lastMultBinV0); //eta V0A vs eta 1.0 histogram
440  fHistNtrEtaV0MvsNtrEta1EvWithD = new TH2F("hNtrEtaV0MvsNtrEta1EvWithD","Uncorrected Eta-V0M vs Eta1.0 (events selected with D in mass range); Ntracklets #eta<1.0; Multiplicity V0A+V0C",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsV0,firstMultBin,lastMultBinV0); //eta V0M vs eta 1.0 histogram
441  fHistNtrEtaV0AvsV0AEqEvWithD = new TH2F("hNtrEtaV0AvsV0AEqEvWithD","Corrected V0A vs corrected V0A-Equalized (events selected with D in mass range); Vzero-A; Vzero-A Equalized",nMultBinsV0,firstMultBin,lastMultBinV0,nMultBinsV0,firstMultBin,lastMultBinV0); // comparison V0A - V0Aeq
442  fHistNtrEtaV0MvsV0MEqEvWithD = new TH2F("hNtrEtaV0MvsV0MEqEvWithD","Corrected V0M vs corrected V0M-Equalized (events selected with D in mass range); Vzero-M; Vzero-M Equalized",nMultBinsV0,firstMultBin,lastMultBinV0,nMultBinsV0,firstMultBin,lastMultBinV0); // comparison V0M - V0Meq
443  fHistNtrCorrEta1vsNtrRawEta1EvWithD = new TH2F("hNtrCorrEta1vsNtrRawEta1EvWithD","Corrected Eta1 vs Eta1.0 (events selected with D in mass range); Ntracklets #eta<1.0 corrected; Ntracklets #eta<1",nMultBinsNtrk,firstMultBin,lastMultBinNtrk,nMultBinsNtrk,firstMultBin,lastMultBinNtrk); //eta 1.6 vs eta 1.0 histogram
444  fHistMultCorrvsMultRawEvWithD = new TH2F("hMultCorrvsMultRawEvWithD",Form("Corrected multiplicity vs uncorrected multiplicity (events selected with D in mass range); %s corrected; %s",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); // corrected vs uncorrected multiplicity
445 
446  }
447  fHistNtrVsZvtx = new TH2F("hNtrVsZvtx",Form("N%s vs VtxZ; VtxZ;N_{%s};",estimatorName,estimatorName),300,-15,15,nMultBins,firstMultBin,lastMultBin); //
448  fHistNtrCorrVsZvtx = new TH2F("hNtrCorrVsZvtx",Form("N%s vs VtxZ; VtxZ;N_{%s};",estimatorName,estimatorName),300,-15,15,nMultBins,firstMultBin,lastMultBin); //
449 
450  fHistNtrVsNchMC = new TH2F("hNtrVsNchMC",Form("N%s vs NchMC; Nch;N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); //
451  fHistNtrCorrVsNchMC = new TH2F("hNtrCorrVsNchMC",Form("N%s vs Nch; Nch;N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); //
452 
453  fHistNtrVsNchMCPrimary = new TH2F("hNtrVsNchMCPrimary",Form("N%s vs Nch (Primary); Nch (Primary);N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); //
454  fHistNtrCorrVsNchMCPrimary = new TH2F("hNtrCorrVsNchMCPrimary",Form("N%s vs Nch (Primary); Nch(Primary) ;N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); //
455 
456  fHistNtrVsNchMCPhysicalPrimary = new TH2F("hNtrVsNchMCPhysicalPrimary",Form("N%s vs Nch (Physical Primary); Nch (Physical Primary);N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); //
457  fHistNtrCorrVsNchMCPhysicalPrimary = new TH2F("hNtrCorrVsMCPhysicalPrimary",Form("N%s vs Nch (Physical Primary); Nch (Physical Primary);N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin); //
458 
459  fHistGenPrimaryParticlesInelGt0 = new TH1F("hGenPrimaryParticlesInelGt0","Multiplcity of generated charged particles ; Nparticles ; Entries",nMultBins,firstMultBin,lastMultBin);
460 
461  fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary = new TH3F("fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary", "MC: Nch (Physical Primary) vs Nch (Primary) vs Nch (Generated); Nch (Generated); Nch (Primary); Nch (Physical Primary)",nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
462 
463  fHistNtrUnCorrPSSel->Sumw2();
464  fHistNtrUnCorrPSTrigSel->Sumw2();
470  fHistNtrUnCorrEvSel->Sumw2();
471  fHistNtrUnCorrEvWithCand->Sumw2();
472  fHistNtrUnCorrEvWithD->Sumw2();
473  fHistNtrCorrPSSel->Sumw2();
474  fHistNtrCorrEvSel->Sumw2();
475  fHistNtrCorrEvWithCand->Sumw2();
476  fHistNtrCorrEvWithD->Sumw2();
492  if(fKeepCorrPlots){
520  }
521  fOutput->Add(fHistNtrVsZvtx);
523 
524  fOutput->Add(fHistNtrVsNchMC);
532 
533 
534  fHistNEvents = new TH1F("fHistNEvents", "number of events ",11,-0.5,10.5);
535  fHistNEvents->GetXaxis()->SetBinLabel(1,"nEvents total");
536  fHistNEvents->GetXaxis()->SetBinLabel(2,"nEvents with Z vertex");
537  fHistNEvents->GetXaxis()->SetBinLabel(3,"nEvents selected");
538  fHistNEvents->GetXaxis()->SetBinLabel(4,"Rejected due to trigger");
539  fHistNEvents->GetXaxis()->SetBinLabel(5,"Rejected due to phys sel");
540  fHistNEvents->GetXaxis()->SetBinLabel(6,"Rejected due to vertex cuts");
541  fHistNEvents->GetXaxis()->SetBinLabel(7,"Rejected due to pileup");
542  fHistNEvents->GetXaxis()->SetBinLabel(8,"Total no. of candidate");
543  fHistNEvents->GetXaxis()->SetBinLabel(9,"no. of cand wo bitmask");
544  fHistNEvents->GetXaxis()->SetBinLabel(10,"D after cuts (No PID)");
545  fHistNEvents->GetXaxis()->SetBinLabel(11,"D after cuts + PID)");
546  fHistNEvents->GetXaxis()->SetNdivisions(1,kFALSE);
547  fHistNEvents->Sumw2();
548  fHistNEvents->SetMinimum(0);
549  fOutput->Add(fHistNEvents);
550 
551  fPtVsMassVsMult=new TH3F("hPtVsMassvsMult", "D candidates: p_{t} vs mass vs tracklets multiplicity; Tracklets; Mass M [GeV/c^{2}]; p_{t} [GeV/c]",nMultBins,firstMultBin,lastMultBin,fNMassBins,fLowmasslimit,fUpmasslimit,48,0.,24.);
552 
553  fPtVsMassVsMultNoPid=new TH3F("hPtVsMassvsMultNoPid", "D candidates: p_{t} vs mass vs tracklets multiplicity; Tracklets; Mass M [GeV/c^{2}]; p_{t} [GeV/c]",nMultBins,firstMultBin,lastMultBin,fNMassBins,fLowmasslimit,fUpmasslimit,48,0.,24.);
554 
555  fPtVsMassVsMultUncorr=new TH3F("hPtVsMassvsMultUncorr", "D candidates: p_{t} vs mass vs tracklets multiplicity; Tracklets; Mass M [GeV/c^{2}]; p_{t} [GeV/c]",nMultBins,firstMultBin,lastMultBin,fNMassBins,fLowmasslimit,fUpmasslimit,48,0.,24.);
556 
557  fPtVsMassVsMultPart=new TH3F("hPtVsMassvsMultPart", "D candidates: p_{t} vs mass vs tracklets multiplicity; Tracklets; Mass M [GeV/c^{2}]; p_{t} [GeV/c]",nMultBins,firstMultBin,lastMultBin,fNMassBins,fLowmasslimit,fUpmasslimit,48,0.,24.);
558 
559  fPtVsMassVsMultAntiPart=new TH3F("hPtVsMassvsMultAntiPart", "D candidates: p_{t} vs mass vs tracklets multiplicity; Tracklets; Mass M [GeV/c^{2}]; p_{t} [GeV/c]",nMultBins,firstMultBin,lastMultBin,fNMassBins,fLowmasslimit,fUpmasslimit,48,0.,24.);
560 
561  fPtVsMassVsMultMC=new TH3F("hPtVsMassvsMultMC", "D true candidates: p_{t} vs mass vs tracklets multiplicity; Tracklets; Mass M [GeV/c^{2}]; p_{t} [GeV/c]",nMultBins,firstMultBin,lastMultBin,fNMassBins,fLowmasslimit,fUpmasslimit,48,0.,24.);
562 
563  fOutput->Add(fPtVsMassVsMult);
569 
571 
572  fCounterC = new AliNormalizationCounter("NormCounterCorrMult");
573  fCounterC->SetStudyMultiplicity(kTRUE,1.);
574  fCounterC->Init();
575 
576  fCounterU = new AliNormalizationCounter("NormCounterUnCorrMult");
577  fCounterU->SetStudyMultiplicity(kTRUE,1.);
578  fCounterU->Init();
579 
580  fCounterCandidates = new AliNormalizationCounter("NormCounterCorrMultCandidates");
583 
584 
585  fOutputCounters = new TList();
586  fOutputCounters->SetOwner();
587  fOutputCounters->SetName("OutputCounters");
591 
592 
593  PostData(1,fOutput);
594  PostData(2,fListCuts);
595  PostData(3,fOutputCounters);
596  PostData(4,fListProfiles);
597 
598  return;
599 }
600 
601 
602 
603 //________________________________________________________________________
605 {
608 
609  AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
610 
611  // AliAODTracklets* tracklets = aod->GetTracklets();
612  //Int_t ntracklets = tracklets->GetNumberOfTracklets();
613 
614 
615  TClonesArray *arrayCand = 0;
616  TString arrayName="";
617  UInt_t pdgDau[3];
618  Int_t nDau=0;
619  Int_t selbit=0;
620  if(fPdgMeson==411){
621  arrayName="Charm3Prong";
622  pdgDau[0]=211; pdgDau[1]=321; pdgDau[2]=211;
623  nDau=3;
625  }else if(fPdgMeson==421){
626  arrayName="D0toKpi";
627  pdgDau[0]=211; pdgDau[1]=321; pdgDau[2]=0;
628  nDau=2;
630  }else if(fPdgMeson==413){
631  arrayName="Dstar";
632  pdgDau[0]=321; pdgDau[1]=211; pdgDau[2]=0; // Quoting here D0 daughters (D* ones on another variable later)
633  nDau=2;
635  }
636 
637  if(!aod && AODEvent() && IsStandardAOD()) {
638  // In case there is an AOD handler writing a standard AOD, use the AOD
639  // event in memory rather than the input (ESD) event.
640  aod = dynamic_cast<AliAODEvent*> (AODEvent());
641  // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
642  // have to taken from the AOD event hold by the AliAODExtension
643  AliAODHandler* aodHandler = (AliAODHandler*)
644  ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
645  if(aodHandler->GetExtensions()) {
646  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
647  AliAODEvent *aodFromExt = ext->GetAOD();
648  arrayCand=(TClonesArray*)aodFromExt->GetList()->FindObject(arrayName.Data());
649  }
650  } else if(aod) {
651  arrayCand=(TClonesArray*)aod->GetList()->FindObject(arrayName.Data());
652  }
653 
654  if(!aod || !arrayCand) {
655  printf("AliAnalysisTaskSEDvsMultiplicity::UserExec: Charm3Prong branch not found!\n");
656  return;
657  }
658 
659  if(fisPPbData && fReadMC){
660  Int_t runnumber = aod->GetRunNumber();
661  if(aod->GetTriggerMask()==0 &&
662  (runnumber>=195344 && runnumber<=195677)){
663  AliDebug(3,"Event rejected because of null trigger mask");
664  return;
665  }
666  }
667 
668 
669  // fix for temporary bug in ESDfilter
670  // the AODs with null vertex pointer didn't pass the PhysSel
671  if(!aod->GetPrimaryVertex()||TMath::Abs(aod->GetMagneticField())<0.001) return;
672 
673  // Int_t countTreta1=AliVertexingHFUtils::GetNumberOfTrackletsInEtaRange(aod,-1.,1.);
674  // Int_t countTreta03=AliVertexingHFUtils::GetNumberOfTrackletsInEtaRange(aod,-0.3,0.3);
675  // Int_t countTreta05=AliVertexingHFUtils::GetNumberOfTrackletsInEtaRange(aod,-0.5,0.5);
676  // Int_t countTreta16=AliVertexingHFUtils::GetNumberOfTrackletsInEtaRange(aod,-1.6,1.6);
677  Int_t countTreta1=0, countTreta03=0, countTreta05=0, countTreta16=0;
678  AliAODTracklets* tracklets=aod->GetTracklets();
679  Int_t nTr=tracklets->GetNumberOfTracklets();
680  for(Int_t iTr=0; iTr<nTr; iTr++){
681  Double_t theta=tracklets->GetTheta(iTr);
682  Double_t eta=-TMath::Log(TMath::Tan(theta/2.));
683  if(eta>-0.3 && eta<0.3) countTreta03++;
684  if(eta>-0.5 && eta<0.5) countTreta05++;
685  if(eta>-1.0 && eta<1.0) countTreta1++;
686  if(eta>-1.6 && eta<1.6) countTreta16++;
687  }
688 
689 
690  Int_t vzeroMult=0, vzeroMultA=0, vzeroMultC=0;
691  Int_t vzeroMultEq=0, vzeroMultAEq=0, vzeroMultCEq=0;
692  AliAODVZERO *vzeroAOD = (AliAODVZERO*)aod->GetVZEROData();
693  if(vzeroAOD) {
694  vzeroMultA = static_cast<Int_t>(vzeroAOD->GetMTotV0A());
695  vzeroMultC = static_cast<Int_t>(vzeroAOD->GetMTotV0C());
696  vzeroMult = vzeroMultA + vzeroMultC;
697  vzeroMultAEq = static_cast<Int_t>(AliVertexingHFUtils::GetVZEROAEqualizedMultiplicity(aod));
698  vzeroMultCEq = static_cast<Int_t>(AliVertexingHFUtils::GetVZEROCEqualizedMultiplicity(aod));
699  vzeroMultEq = vzeroMultAEq + vzeroMultCEq;
700  }
701 
702  Int_t countMult = countTreta1;
703  if(fMultiplicityEstimator==kNtrk03) { countMult = countTreta03; }
704  else if(fMultiplicityEstimator==kNtrk05) { countMult = countTreta05; }
705  else if(fMultiplicityEstimator==kNtrk10to16) { countMult = countTreta16 - countTreta1; }
706  else if(fMultiplicityEstimator==kVZERO) { countMult = vzeroMult; }
707  else if(fMultiplicityEstimator==kVZEROA) { countMult = vzeroMultA; }
708  else if(fMultiplicityEstimator==kVZEROEq) { countMult = vzeroMultEq; }
709  else if(fMultiplicityEstimator==kVZEROAEq) { countMult = vzeroMultAEq; }
710 
711 
713  fHistNEvents->Fill(0); // count event
714 
715  Double_t countTreta1corr=countTreta1;
716  Double_t countCorr=countMult;
717  AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
718  // In case of VZERO multiplicity, consider the zvtx correction flag
719  // fDoVZER0ParamVertexCorr: 0= none, 1= usual d2h, 2=AliESDUtils
720  Bool_t isDataDrivenZvtxCorr=kTRUE;
721  Bool_t isVtxOk=kFALSE;
722  Int_t vzeroMultACorr=vzeroMultA, vzeroMultCCorr=vzeroMultC, vzeroMultCorr=vzeroMult;
723  Int_t vzeroMultAEqCorr=vzeroMultAEq, vzeroMultCEqCorr=vzeroMultCEq, vzeroMultEqCorr=vzeroMultEq;
724  if(vtx1){
725  if(vtx1->GetNContributors()>0){
726  fHistNEvents->Fill(1);
727  isVtxOk=kTRUE;
728  }
729  }
730  if(isVtxOk){
734  // do not correct
735  isDataDrivenZvtxCorr=kFALSE;
736  } else if (fDoVZER0ParamVertexCorr==2){
737  // use AliESDUtils correction
738  Float_t zvtx = vtx1->GetZ();
739  isDataDrivenZvtxCorr=kFALSE;
740  vzeroMultACorr = static_cast<Int_t>(AliESDUtils::GetCorrV0A(vzeroMultA,zvtx));
741  vzeroMultCCorr = static_cast<Int_t>(AliESDUtils::GetCorrV0C(vzeroMultC,zvtx));
742  vzeroMultCorr = vzeroMultACorr + vzeroMultCCorr;
743  vzeroMultAEqCorr = static_cast<Int_t>(AliESDUtils::GetCorrV0A(vzeroMultAEq,zvtx));
744  vzeroMultCEqCorr =static_cast<Int_t>( AliESDUtils::GetCorrV0C(vzeroMultCEq,zvtx));
745  vzeroMultEqCorr = vzeroMultAEqCorr + vzeroMultCEqCorr;
746  if(fMultiplicityEstimator==kVZERO) { countCorr = vzeroMultCorr; }
747  else if(fMultiplicityEstimator==kVZEROA) { countCorr = vzeroMultACorr; }
748  else if(fMultiplicityEstimator==kVZEROEq) { countCorr = vzeroMultEqCorr; }
749  else if(fMultiplicityEstimator==kVZEROAEq) { countCorr = vzeroMultAEqCorr; }
750  }
751  }
752  }
753  // Data driven multiplicity z-vertex correction
754  if(isVtxOk && isDataDrivenZvtxCorr){
755  TProfile* estimatorAvg = GetEstimatorHistogram(aod);
756  if(estimatorAvg){
757  countTreta1corr=static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,countTreta1,vtx1->GetZ(),fRefMult));
758  // vzeroMultACorr=static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,vzeroMultA,vtx1->GetZ(),fRefMult));
759  // vzeroMultCorr= vzeroMultACorr + static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,vzeroMultC,vtx1->GetZ(),fRefMult));
760  // vzeroMultAEqCorr=static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,vzeroMultAEq,vtx1->GetZ(),fRefMult));
761  // vzeroMultEqCorr= vzeroMultAEqCorr + static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,vzeroMultCEq,vtx1->GetZ(),fRefMult));
762  countCorr=static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,countMult,vtx1->GetZ(),fRefMult));
763  }
764  }
765 
766 
768 
769  Bool_t isEvSel=fRDCutsAnalysis->IsEventSelected(aod);
770 
771  if(fRDCutsAnalysis->GetWhyRejection()==5) fHistNEvents->Fill(3);
772  if(fRDCutsAnalysis->GetWhyRejection()==7) fHistNEvents->Fill(4);
773  if(fRDCutsAnalysis->GetWhyRejection()==6) fHistNEvents->Fill(5);
774  if(fRDCutsAnalysis->GetWhyRejection()==1) fHistNEvents->Fill(6);
775 
777  Bool_t isEvTrigNameRejected = fRDCutsAnalysis->IsEventRejectedDueToTrigger();
778  Bool_t isEvPileUpRejected = fRDCutsAnalysis->IsEventRejectedDueToPileup();
782  Bool_t isEvCentralityRejected = fRDCutsAnalysis->IsEventRejectedDueToCentrality();
783  if(!isEvPSRejected){
784  fHistNtrUnCorrPSSel->Fill(countMult);
785  fHistNtrCorrPSSel->Fill(countCorr);
786  if(!isEvTrigNameRejected){
787  fHistNtrUnCorrPSTrigSel->Fill(countMult);
788  if(!isEvPileUpRejected){
789  fHistNtrUnCorrPSTrigPileUpSel->Fill(countMult);
790  if(!isEvNoVtxRejected){
791  fHistNtrUnCorrPSTrigPileUpVtxSel->Fill(countMult);
792  if(!isEvVtxContribRejected){
793  fHistNtrUnCorrPSTrigPileUpVtxContSel->Fill(countMult);
794  if(!isEvVtxRangeRejected){
795  fHistNtrUnCorrPSTrigPileUpVtxRangeSel->Fill(countMult);
796  if(!isEvCentralityRejected){
798  }
799  }
800  }
801  }
802  }
803  }
804  }
805 
806  if(!isEvSel)return;
807  fHistNEvents->Fill(2);
808  if(fKeepCorrPlots){
809  fHistNtrEta16vsNtrEta1EvSel->Fill(countTreta1,countTreta16);
810  fHistNtrEta05vsNtrEta1EvSel->Fill(countTreta1,countTreta05);
811  fHistNtrEta03vsNtrEta1EvSel->Fill(countTreta1,countTreta03);
812  fHistNtrEtaV0AvsNtrEta1EvSel->Fill(countTreta1,vzeroMultA);
813  fHistNtrEtaV0MvsNtrEta1EvSel->Fill(countTreta1,vzeroMult);
814  fHistNtrEtaV0AvsV0AEqEvSel->Fill(vzeroMultA,vzeroMultAEq);
815  fHistNtrEtaV0MvsV0MEqEvSel->Fill(vzeroMult,vzeroMultEq);
816  fHistNtrCorrEta1vsNtrRawEta1EvSel->Fill(countTreta1,countTreta1corr);
817  fHistMultCorrvsMultRawEvSel->Fill(countMult,countCorr);
818  }
819  if(vtx1){
820  fHistNtrVsZvtx->Fill(vtx1->GetZ(),countMult);
821  fHistNtrCorrVsZvtx->Fill(vtx1->GetZ(),countCorr);
822  }
823 
824  TClonesArray *arrayMC=0;
825  AliAODMCHeader *mcHeader=0;
826 
827  Double_t nchWeight=1.0;
828 
829  // load MC particles
830  if(fReadMC){
831 
832  arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
833  if(!arrayMC) {
834  printf("AliAnalysisTaskSEDvsMultiplicity::UserExec: MC particles branch not found!\n");
835  return;
836  }
837  // load MC header
838  mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
839  if(!mcHeader) {
840  printf("AliAnalysisTaskSEDvsMultiplicity::UserExec: MC header branch not found!\n");
841  return;
842  }
843 
844 
845  // Int_t nChargedMC=AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(arrayMC,-1.0,1.0);
846  // Int_t nChargedMCPrimary=AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(arrayMC,-1.0,1.0);
847  // Int_t nChargedMCPhysicalPrimary=AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(arrayMC,-1.0,1.0);
848  //
849  Int_t nChargedMCEta10=0, nChargedMCEta03=0, nChargedMCEta05=0, nChargedMCEta16=0, nChargedMCEtam37tm17=0, nChargedMCEta28t51=0;
850  Int_t nChargedMCPrimaryEta10=0, nChargedMCPrimaryEta03=0, nChargedMCPrimaryEta05=0, nChargedMCPrimaryEta16=0, nChargedMCPrimaryEtam37tm17=0, nChargedMCPrimaryEta28t51=0;
851  Int_t nChargedMCPhysicalPrimaryEta10=0, nChargedMCPhysicalPrimaryEta03=0, nChargedMCPhysicalPrimaryEta05=0, nChargedMCPhysicalPrimaryEta16=0, nChargedMCPhysicalPrimaryEtam37tm17=0, nChargedMCPhysicalPrimaryEta28t51=0;
852  for(Int_t i=0; i<arrayMC->GetEntriesFast(); i++){
853  AliAODMCParticle *part=(AliAODMCParticle*)arrayMC->UncheckedAt(i);
854  Int_t charge = part->Charge();
855  Double_t eta = part->Eta();
856  Bool_t isPrim = part->IsPrimary();
857  Bool_t isPhysPrim = part->IsPhysicalPrimary();
858  if(charge!=0) {
859  if(eta>-0.3 && eta< 0.3) {
860  nChargedMCEta03++;
861  if(isPrim) nChargedMCPrimaryEta03++;
862  if(isPhysPrim) nChargedMCPhysicalPrimaryEta03++;
863  }
864  if(eta>-0.5 && eta< 0.5) {
865  nChargedMCEta05++;
866  if(isPrim) nChargedMCPrimaryEta05++;
867  if(isPhysPrim) nChargedMCPhysicalPrimaryEta05++;
868  }
869  if(eta>-1.0 && eta< 1.0) {
870  nChargedMCEta10++;
871  if(isPrim) nChargedMCPrimaryEta10++;
872  if(isPhysPrim) nChargedMCPhysicalPrimaryEta10++;
873  }
874  if(eta>-1.6 && eta< 1.6) {
875  nChargedMCEta16++;
876  if(isPrim) nChargedMCPrimaryEta16++;
877  if(isPhysPrim) nChargedMCPhysicalPrimaryEta16++;
878  }
879  if(eta>-3.7 && eta<-1.7) {
880  nChargedMCEtam37tm17++;
881  if(isPrim) nChargedMCPrimaryEtam37tm17++;
882  if(isPhysPrim) nChargedMCPhysicalPrimaryEtam37tm17++;
883  }
884  if(eta> 2.8 && eta< 5.1) {
885  nChargedMCEta28t51++;
886  if(isPrim) nChargedMCPrimaryEta28t51++;
887  if(isPhysPrim) nChargedMCPhysicalPrimaryEta28t51++;
888  }
889  }
890  }
891  Int_t nChargedMC=nChargedMCEta10;
892  Int_t nChargedMCPrimary=nChargedMCPrimaryEta10;
893  Int_t nChargedMCPhysicalPrimary=nChargedMCPhysicalPrimaryEta10;
894 
895  // Compute the Nch weights (reference is Ntracklets within |eta|<1.0)
896  if(fUseNchWeight>0){
897 
898  Double_t tmpweight = 1.0;
899  Double_t tmpXweight=nChargedMCPhysicalPrimary; // Nch weights
900  if(fUseNchWeight==2) tmpXweight=countMult; // Ntrk weights
901 
902  if(tmpXweight<=0) tmpweight = 0.0;
903  else{
904  Double_t pMeas = fHistoMeasNch->GetBinContent(fHistoMeasNch->FindBin(tmpXweight));
905  //printf(" pMeas=%2.2f and histo MCNch %s \n",pMeas,fHistoMCNch);
906  Double_t pMC = fHistoMCNch->GetBinContent(fHistoMCNch->FindBin(tmpXweight));
907  tmpweight = pMC>0 ? pMeas/pMC : 0.;
908  }
909  nchWeight *= tmpweight;
910  AliDebug(2,Form("Using Nch weights, Mult=%f Weight=%f\n",tmpXweight,nchWeight));
911 
912  }
913 
914  // Now recompute the variables in case another MC estimator is considered
915  // Int_t nChargedMCEta10 = nChargedMC;
916  // Int_t nChargedMCEta16 = AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(arrayMC,-1.6,1.6);
917  // Int_t nChargedMCEta05 = AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(arrayMC,-0.5,0.5);
918  // Int_t nChargedMCEta03 = AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(arrayMC,-0.3,0.3);
919  // Int_t nChargedMCEtam37tm17 = AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(arrayMC,-3.7,-1.7);
920  // Int_t nChargedMCEta28t51 = AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(arrayMC,2.8,5.1);
921  // Int_t nChargedMCPrimaryEta10 = nChargedMCPrimary;
922  // Int_t nChargedMCPrimaryEta16 = AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(arrayMC,-1.6,1.6);
923  // Int_t nChargedMCPrimaryEta05 = AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(arrayMC,-0.5,0.5);
924  // Int_t nChargedMCPrimaryEta03 = AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(arrayMC,-0.3,0.3);
925  // Int_t nChargedMCPrimaryEtam37tm17 = AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(arrayMC,-3.7,-1.7);
926  // Int_t nChargedMCPrimaryEta28t51 = AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(arrayMC,2.8,5.1);
927  // Int_t nChargedMCPhysicalPrimaryEta10 = nChargedMCPhysicalPrimary;
928  // Int_t nChargedMCPhysicalPrimaryEta16 = AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(arrayMC,-1.6,1.6);
929  // Int_t nChargedMCPhysicalPrimaryEta05 = AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(arrayMC,-0.5,0.5);
930  // Int_t nChargedMCPhysicalPrimaryEta03 = AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(arrayMC,-0.3,0.3);
931  // Int_t nChargedMCPhysicalPrimaryEtam37tm17 = AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(arrayMC,-3.7,-1.7);
932  // Int_t nChargedMCPhysicalPrimaryEta28t51 = AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(arrayMC,2.8,5.1);
934  nChargedMC = nChargedMCEta16 - nChargedMCEta10;
935  nChargedMCPrimary = nChargedMCPrimaryEta16 - nChargedMCPrimaryEta10;
936  nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta16 - nChargedMCPhysicalPrimaryEta10;
937  } else if(fMCPrimariesEstimator==kEta05){
938  nChargedMC = nChargedMCEta05;
939  nChargedMCPrimary = nChargedMCPrimaryEta05;
940  nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta05;
941  } else if(fMCPrimariesEstimator==kEta03){
942  nChargedMC = nChargedMCEta03;
943  nChargedMCPrimary = nChargedMCPrimaryEta03;
944  nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta03;
945  } else if(fMCPrimariesEstimator==kEtaVZERO){
946  nChargedMC = nChargedMCEtam37tm17 + nChargedMCEta28t51;
947  nChargedMCPrimary = nChargedMCPrimaryEtam37tm17 + nChargedMCPrimaryEta28t51;
948  nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEtam37tm17 + nChargedMCPhysicalPrimaryEta28t51;
949  } else if(fMCPrimariesEstimator==kEtaVZEROA){
950  nChargedMC = nChargedMCEta28t51;
951  nChargedMCPrimary = nChargedMCPrimaryEta28t51;
952  nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta28t51;
953  }
954 
955  // Here fill the MC correlation plots
956  if(nChargedMCPhysicalPrimary>0){ // INEL>0 for |eta|<1
957  fHistGenPrimaryParticlesInelGt0->Fill(nChargedMCPhysicalPrimary,nchWeight);
958  }
959 
960  fHistNtrVsNchMC->Fill(nChargedMC,countMult,nchWeight);
961  fHistNtrCorrVsNchMC->Fill(nChargedMC,countCorr,nchWeight);
962 
963  fHistNtrVsNchMCPrimary->Fill(nChargedMCPrimary,countMult,nchWeight);
964  fHistNtrCorrVsNchMCPrimary->Fill(nChargedMCPrimary,countCorr,nchWeight);
965 
966  fHistNtrVsNchMCPhysicalPrimary->Fill(nChargedMCPhysicalPrimary,countMult,nchWeight);
967  fHistNtrCorrVsNchMCPhysicalPrimary->Fill(nChargedMCPhysicalPrimary,countCorr,nchWeight);
968 
969  fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary->Fill(nChargedMC,nChargedMCPrimary,nChargedMCPhysicalPrimary,nchWeight);
970  }
971 
972  Int_t nCand = arrayCand->GetEntriesFast();
973  Int_t nSelectedNoPID=0,nSelectedPID=0,nSelectedInMassPeak=0;
974  Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
975  Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
976  Double_t mDstarPDG = TDatabasePDG::Instance()->GetParticle(413)->Mass();
977 
978  // pdg of daughters needed for D* too
979  UInt_t pdgDgDStartoD0pi[2]={421,211};
980 
981  Double_t aveMult=0.;
982  Double_t nSelCand=0.;
983  for (Int_t iCand = 0; iCand < nCand; iCand++) {
984  AliAODRecoDecayHF *d = (AliAODRecoDecayHF*)arrayCand->UncheckedAt(iCand);
985  AliAODRecoCascadeHF *dCascade = NULL;
986  if(fPdgMeson==413) dCascade = (AliAODRecoCascadeHF*)d;
987 
988  fHistNEvents->Fill(7);
989  if(fUseBit && !d->HasSelectionBit(selbit)){
990  fHistNEvents->Fill(8);
991  continue;
992  }
993 
994  Double_t ptCand = d->Pt();
995  Double_t rapid=d->Y(fPdgMeson);
996  Bool_t isFidAcc=fRDCutsAnalysis->IsInFiducialAcceptance(ptCand,rapid);
997  if(!isFidAcc) continue;
998 
999  Int_t labD=-1;
1000  if(fReadMC) {
1001  if(fPdgMeson==413){
1002  labD = dCascade->MatchToMC(fPdgMeson,421,(Int_t*)pdgDgDStartoD0pi,(Int_t*)pdgDau,arrayMC);
1003  } else {
1004  labD = d->MatchToMC(fPdgMeson,arrayMC,nDau,(Int_t*)pdgDau);
1005  }
1006  FillMCMassHistos(arrayMC,labD, countMult,nchWeight);
1007  }
1008 
1009  Int_t passAllCuts=fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kAll,aod);
1010  Int_t passTopolCuts=fRDCutsAnalysis->GetIsSelectedCuts();
1011  if(passTopolCuts==0) continue;
1012  nSelectedNoPID++;
1013  fHistNEvents->Fill(9);
1014  if(passAllCuts){
1015  nSelectedPID++;
1016  fHistNEvents->Fill(10);
1017  }
1018  Double_t multForCand = countCorr;
1019 
1021  // For the D* case, subtract only the D0 daughter tracks <=== FIXME !!
1022  AliAODRecoDecayHF2Prong* d0fromDstar = NULL;
1023  if(fPdgMeson==413) d0fromDstar = (AliAODRecoDecayHF2Prong*)dCascade->Get2Prong();
1024 
1025  for(Int_t iDau=0; iDau<nDau; iDau++){
1026  AliAODTrack *t = NULL;
1027  if(fPdgMeson==413){ t = (AliAODTrack*)d0fromDstar->GetDaughter(iDau); }
1028  else{ t = (AliAODTrack*)d->GetDaughter(iDau); }
1029  if(!t) continue;
1030  if(t->HasPointOnITSLayer(0) && t->HasPointOnITSLayer(1)){
1031  if(multForCand>0) multForCand-=1;
1032  }
1033  }
1034  }
1035  Bool_t isPrimary=kTRUE;
1036  Double_t trueImpParXY=9999.;
1037  Double_t impparXY=d->ImpParXY()*10000.;
1038  Double_t dlen=0.1; //FIXME
1039  Double_t mass[2];
1040  if(fPdgMeson==411){
1041  mass[0]=d->InvMass(nDau,pdgDau);
1042  mass[1]=-1.;
1043  if(TMath::Abs(mass[0]-mDplusPDG)<0.02) nSelectedInMassPeak++; //20 MeV for now... FIXME
1044  }else if(fPdgMeson==421){
1045  UInt_t pdgdaughtersD0[2]={211,321};//pi,K
1046  UInt_t pdgdaughtersD0bar[2]={321,211};//K,pi
1047  mass[0]=d->InvMass(2,pdgdaughtersD0);
1048  mass[1]=d->InvMass(2,pdgdaughtersD0bar);
1049  if(TMath::Abs(mass[0]-mD0PDG)<0.02 || TMath::Abs(mass[1]-mD0PDG)<0.02 ) nSelectedInMassPeak++; //20 MeV for now... FIXME
1050  }else if(fPdgMeson==413){
1051  // FIXME
1052  mass[0]=dCascade->DeltaInvMass();
1053  mass[1]=-1.;
1054  if(TMath::Abs(mass[0]-(mDstarPDG-mD0PDG))<0.0015) nSelectedInMassPeak++; //1 MeV for now... FIXME
1055  }
1056  for(Int_t iHyp=0; iHyp<2; iHyp++){
1057  if(mass[iHyp]<0.) continue; // for D+ and D* we have 1 mass hypothesis
1058  Double_t invMass=mass[iHyp];
1059  Double_t arrayForSparse[5]={invMass,ptCand,impparXY,dlen,multForCand};
1060 
1061  if(fReadMC){
1062 
1063  if(fPdgMeson==413){
1064  labD = dCascade->MatchToMC(fPdgMeson,421,(Int_t*)pdgDgDStartoD0pi,(Int_t*)pdgDau,arrayMC);
1065  } else {
1066  labD = d->MatchToMC(fPdgMeson,arrayMC,nDau,(Int_t*)pdgDau);
1067  }
1068 
1069  Bool_t fillHisto=fDoImpPar;
1070  if(labD>=0){
1071  AliAODMCParticle *partD = (AliAODMCParticle*)arrayMC->At(labD);
1072  Int_t code=partD->GetPdgCode();
1073  if(CheckOrigin(arrayMC,partD)==5) isPrimary=kFALSE;
1074  if(code<0 && iHyp==0) fillHisto=kFALSE;
1075  if(code>0 && iHyp==1) fillHisto=kFALSE;
1076  if(!isPrimary){
1077  if(fPdgMeson==411){
1078  trueImpParXY=AliVertexingHFUtils::GetTrueImpactParameterDplus(mcHeader,arrayMC,partD)*10000.;
1079  }else if(fPdgMeson==421){
1080  trueImpParXY=AliVertexingHFUtils::GetTrueImpactParameterDzero(mcHeader,arrayMC,partD)*10000.;
1081  }else if(fPdgMeson==413){
1082  trueImpParXY=0.;
1083  }
1084  Double_t arrayForSparseTrue[5]={invMass,ptCand,trueImpParXY,dlen,multForCand};
1085  if(fillHisto && passAllCuts){
1086  fHistMassPtImpPar[2]->Fill(arrayForSparse);
1087  fHistMassPtImpPar[3]->Fill(arrayForSparseTrue);
1088  }
1089  }else{
1090  if(fillHisto && passAllCuts) fHistMassPtImpPar[1]->Fill(arrayForSparse);
1091  }
1092  }else{
1093  if(fillHisto && passAllCuts)fHistMassPtImpPar[4]->Fill(arrayForSparse);
1094  }
1095 
1096  if(TMath::Abs(labD)==fPdgMeson && fMCOption==2) continue;
1097  if(TMath::Abs(labD)!=fPdgMeson && fMCOption==1) continue;
1098 
1099  }
1100 
1101  if(fPdgMeson==421){
1102  if(iHyp==0 && !(passTopolCuts&1)) continue; // candidate not passing as D0
1103  if(iHyp==1 && !(passTopolCuts&2)) continue; // candidate not passing as D0bar
1104  }
1105 
1106  fPtVsMassVsMultNoPid->Fill(multForCand,invMass,ptCand);
1107 
1108  if(fPdgMeson==421){
1109  if(iHyp==0 && !(passAllCuts&1)) continue; // candidate not passing as D0
1110  if(iHyp==1 && !(passAllCuts&2)) continue; // candidate not passing as D0bar
1111  }
1112  if(passAllCuts){
1113  aveMult+=multForCand;
1114  nSelCand+=1.;
1115  fPtVsMassVsMult->Fill(multForCand,invMass,ptCand,nchWeight);
1116  fPtVsMassVsMultUncorr->Fill(countTreta1,invMass,ptCand,nchWeight);
1117  // Add separation between part antipart
1118  if(fPdgMeson==411){
1119  if(d->GetCharge()>0) fPtVsMassVsMultPart->Fill(multForCand,invMass,ptCand,nchWeight);
1120  else fPtVsMassVsMultAntiPart->Fill(multForCand,invMass,ptCand,nchWeight);
1121  }else if(fPdgMeson==421){
1122  if(passAllCuts&1) fPtVsMassVsMultPart->Fill(multForCand,invMass,ptCand,nchWeight);
1123  if(passAllCuts&2) fPtVsMassVsMultAntiPart->Fill(multForCand,invMass,ptCand,nchWeight);
1124  }else if(fPdgMeson==413){
1125  if(d->GetCharge()>0) fPtVsMassVsMultPart->Fill(multForCand,invMass,ptCand,nchWeight);
1126  else fPtVsMassVsMultAntiPart->Fill(multForCand,invMass,ptCand,nchWeight);
1127  }
1128 
1129  if(fDoImpPar){
1130  fHistMassPtImpPar[0]->Fill(arrayForSparse);
1131  }
1132 
1133  }
1134 
1135  }
1136  }
1137  if(fSubtractTrackletsFromDau && nSelCand>0){
1138  aveMult/=nSelCand;
1139  fCounterCandidates->StoreEvent(aod,fRDCutsAnalysis,fReadMC,(Int_t)(aveMult+0.5001));
1140  }else{
1142  }
1143 
1144 
1145  fCounterCandidates->StoreCandidates(aod,nSelectedNoPID,kTRUE);
1146  fCounterCandidates->StoreCandidates(aod,nSelectedPID,kFALSE);
1147  fHistNtrUnCorrEvSel->Fill(countMult,nchWeight);
1148  fHistNtrCorrEvSel->Fill(countCorr,nchWeight);
1149  if(nSelectedPID>0) {
1150  fHistNtrUnCorrEvWithCand->Fill(countMult,nchWeight);
1151  fHistNtrCorrEvWithCand->Fill(countCorr,nchWeight);
1152  if(fKeepCorrPlots){
1153  fHistNtrEta16vsNtrEta1EvWithCand->Fill(countTreta1,countTreta16);
1154  fHistNtrEta05vsNtrEta1EvWithCand->Fill(countTreta1,countTreta05);
1155  fHistNtrEta03vsNtrEta1EvWithCand->Fill(countTreta1,countTreta03);
1156  fHistNtrEtaV0AvsNtrEta1EvWithCand->Fill(countTreta1,vzeroMultA);
1157  fHistNtrEtaV0MvsNtrEta1EvWithCand->Fill(countTreta1,vzeroMult);
1158  fHistNtrEtaV0AvsV0AEqEvWithCand->Fill(vzeroMultA,vzeroMultAEq);
1159  fHistNtrEtaV0MvsV0MEqEvWithCand->Fill(vzeroMult,vzeroMultEq);
1160  fHistNtrCorrEta1vsNtrRawEta1EvWithCand->Fill(countTreta1,countTreta1corr);
1161  fHistMultCorrvsMultRawEvWithCand->Fill(countMult,countCorr);
1162  }
1163  }
1164  if(nSelectedInMassPeak>0) {
1165  fHistNtrUnCorrEvWithD->Fill(countMult,nchWeight);
1166  fHistNtrCorrEvWithD->Fill(countCorr,nchWeight);
1167  if(fKeepCorrPlots){
1168  fHistNtrEta16vsNtrEta1EvWithD->Fill(countTreta1,countTreta16);
1169  fHistNtrEta05vsNtrEta1EvWithD->Fill(countTreta1,countTreta05);
1170  fHistNtrEta03vsNtrEta1EvWithD->Fill(countTreta1,countTreta03);
1171  fHistNtrEtaV0AvsNtrEta1EvWithD->Fill(countTreta1,vzeroMultA);
1172  fHistNtrEtaV0MvsNtrEta1EvWithD->Fill(countTreta1,vzeroMult);
1173  fHistNtrEtaV0AvsV0AEqEvWithD->Fill(vzeroMultA,vzeroMultAEq);
1174  fHistNtrEtaV0MvsV0MEqEvWithD->Fill(vzeroMult,vzeroMultEq);
1175  fHistNtrCorrEta1vsNtrRawEta1EvWithD->Fill(countTreta1,countTreta1corr);
1176  fHistMultCorrvsMultRawEvWithD->Fill(countMult,countCorr);
1177  }
1178  }
1179 
1180  PostData(1,fOutput);
1181  PostData(2,fListCuts);
1182  PostData(3,fOutputCounters);
1183 
1184  return;
1185 }
1186 
1187 //________________________________________________________________________
1191 
1192  Int_t nbins[5]={fNMassBins,200,fNImpParBins,50,100};
1193  Double_t xmin[5]={fLowmasslimit,0.,fLowerImpPar,0.,0.};
1194  Double_t xmax[5]={fUpmasslimit,20.,fHigherImpPar,1.,100.};
1195 
1196  fHistMassPtImpPar[0]=new THnSparseF("hMassPtImpParAll",
1197  "Mass vs. pt vs.imppar - All",
1198  5,nbins,xmin,xmax);
1199  fHistMassPtImpPar[1]=new THnSparseF("hMassPtImpParPrompt",
1200  "Mass vs. pt vs.imppar - promptD",
1201  5,nbins,xmin,xmax);
1202  fHistMassPtImpPar[2]=new THnSparseF("hMassPtImpParBfeed",
1203  "Mass vs. pt vs.imppar - DfromB",
1204  5,nbins,xmin,xmax);
1205  fHistMassPtImpPar[3]=new THnSparseF("hMassPtImpParTrueBfeed",
1206  "Mass vs. pt vs.true imppar -DfromB",
1207  5,nbins,xmin,xmax);
1208  fHistMassPtImpPar[4]=new THnSparseF("hMassPtImpParBkg",
1209  "Mass vs. pt vs.imppar - backgr.",
1210  5,nbins,xmin,xmax);
1211  for(Int_t i=0; i<5;i++){
1212  fOutput->Add(fHistMassPtImpPar[i]);
1213  }
1214 }
1215 
1216 //________________________________________________________________________
1218 {
1220  //
1221  if(fDebug > 1) printf("AnalysisTaskSEDvsMultiplicity: Terminate() \n");
1222 
1223  fOutput = dynamic_cast<TList*> (GetOutputData(1));
1224  if (!fOutput) {
1225  printf("ERROR: fOutput not available\n");
1226  return;
1227  }
1228 
1229  fHistNEvents = dynamic_cast<TH1F*>(fOutput->FindObject("fHistNEvents"));
1230  if(!fHistNEvents){
1231  printf("ERROR: fHistNEvents not available\n");
1232  return;
1233  }
1234  printf("Number of Analyzed Events = %d\n",(Int_t)fHistNEvents->GetBinContent(3));
1235 
1236  return;
1237 }
1238 //_________________________________________________________________________________________________
1239 Int_t AliAnalysisTaskSEDvsMultiplicity::CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const {
1240  //
1242  //
1243 
1244  Int_t pdgGranma = 0;
1245  Int_t mother = 0;
1246  mother = mcPartCandidate->GetMother();
1247  Int_t istep = 0;
1248  Int_t abspdgGranma =0;
1249  Bool_t isFromB=kFALSE;
1250  // Bool_t isQuarkFound=kFALSE;
1251  while (mother >0 ){
1252  istep++;
1253  AliAODMCParticle* mcGranma = dynamic_cast<AliAODMCParticle*>(arrayMC->At(mother));
1254  if (mcGranma){
1255  pdgGranma = mcGranma->GetPdgCode();
1256  abspdgGranma = TMath::Abs(pdgGranma);
1257  if ((abspdgGranma > 500 && abspdgGranma < 600) || (abspdgGranma > 5000 && abspdgGranma < 6000)){
1258  isFromB=kTRUE;
1259  }
1260  // if(abspdgGranma==4 || abspdgGranma==5) isQuarkFound=kTRUE;
1261  mother = mcGranma->GetMother();
1262  }else{
1263  AliError("Failed casting the mother particle!");
1264  break;
1265  }
1266  }
1267 
1268  if(isFromB) return 5;
1269  else return 4;
1270 }
1271 
1272 
1273 
1274 //____________________________________________________________________________
1280 
1281  Int_t runNo = event->GetRunNumber();
1282  Int_t period = -1; // pp: 0-LHC10b, 1-LHC10c, 2-LHC10d, 3-LHC10e
1283  // pPb: 0-LHC13b, 1-LHC13c
1284  if (fisPPbData) {
1285  if (runNo>195343 && runNo<195484) period = 0;
1286  if (runNo>195528 && runNo<195678) period = 1;
1287  if (period < 0 || period > 1) return 0;
1288  }
1289  else {
1290  if(runNo>114930 && runNo<117223) period = 0;
1291  if(runNo>119158 && runNo<120830) period = 1;
1292  if(runNo>122373 && runNo<126438) period = 2;
1293  if(runNo>127711 && runNo<130851) period = 3;
1294  if(period<0 || period>3) return 0;
1295 
1296 }
1297 
1298  return fMultEstimatorAvg[period];
1299 }
1300 
1301 //__________________________________________________________________________________________________
1304  //
1305  // for Nch > 70 the points were obtainedwith a double NBD distribution
1306  // TF1 *fit1 = new TF1("fit1","[0]*(TMath::Gamma(x+[1])/(TMath::Gamma(x+1)*TMath::Gamma([1])))*(TMath::Power(([2]/[1]),x))*(TMath::Power((1+([2]/[1])),-x-[1]))"); fit1->SetParameter(0,1.);// normalization constant
1307  // fit1->SetParameter(1,1.63); // k parameter
1308  // fit1->SetParameter(2,12.8); // mean multiplicity
1309  Double_t nchbins[82]={0.50,1.50,2.50,3.50,4.50,5.50,6.50,7.50,8.50,9.50,
1310  10.50,11.50,12.50,13.50,14.50,15.50,16.50,17.50,18.50,19.50,
1311  20.50,21.50,22.50,23.50,24.50,25.50,26.50,27.50,28.50,29.50,
1312  30.50,31.50,32.50,33.50,34.50,35.50,36.50,37.50,38.50,39.50,
1313  40.50,41.50,42.50,43.50,44.50,45.50,46.50,47.50,48.50,49.50,
1314  50.50,51.50,52.50,53.50,54.50,55.50,56.50,57.50,58.50,59.50,
1315  60.50,62.50,64.50,66.50,68.50,70.50,72.50,74.50,76.50,78.50,
1316  80.50,82.50,84.50,86.50,88.50,90.50,92.50,94.50,96.50,98.50,
1317  100.50,102.50};
1318  Double_t pch[81]={0.062011,0.072943,0.070771,0.067245,0.062834,0.057383,0.051499,0.04591,0.041109,0.036954,
1319  0.03359,0.030729,0.028539,0.026575,0.024653,0.0229,0.021325,0.019768,0.018561,0.017187,
1320  0.01604,0.014836,0.013726,0.012576,0.011481,0.010393,0.009502,0.008776,0.008024,0.007452,
1321  0.006851,0.006428,0.00594,0.005515,0.005102,0.00469,0.004162,0.003811,0.003389,0.003071,
1322  0.002708,0.002422,0.002184,0.001968,0.00186,0.00165,0.001577,0.001387,0.001254,0.001118,
1323  0.001037,0.000942,0.000823,0.000736,0.000654,0.000579,0.000512,0.00049,0.00045,0.000355,
1324  0.000296,0.000265,0.000193,0.00016,0.000126,0.0000851, 0.0000676,0.0000537,0.0000426, 0.0000338,
1325  0.0000268,0.0000213,0.0000166,0.0000133,0.0000106,0.00000837,0.00000662, 0.00000524,0.00000414, 0.00000327,
1326  0.00000258};
1327 
1328  if(fHistoMeasNch) delete fHistoMeasNch;
1329  fHistoMeasNch=new TH1F("hMeaseNch","",81,nchbins);
1330  for(Int_t i=0; i<81; i++){
1331  fHistoMeasNch->SetBinContent(i+1,pch[i]);
1332  fHistoMeasNch->SetBinError(i+1,0.);
1333  }
1334 }
1335 
1336 //__________________________________________________________________________________________________
1337 void AliAnalysisTaskSEDvsMultiplicity::FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult,Double_t nchWeight)
1338 {
1339  //
1341  //
1342 
1343  if(labD>=0){
1344  AliAODMCParticle *partD = (AliAODMCParticle*)arrayMC->At(labD);
1345  Double_t mass = partD->M();
1346  Double_t pt = partD->Pt();
1347  fPtVsMassVsMultMC->Fill(countMult,mass,pt,nchWeight);
1348  }
1349 
1350 }
Int_t charge
Bool_t IsEventRejectedDueToCentrality() const
Definition: AliRDHFCuts.h:317
TH2F * fHistMultCorrvsMultRawEvSel
!hist. for multiplicity with and w/o corrections
TH3F * fPtVsMassVsMult
! hist. of Pt vs Mult vs. mass (
Int_t pdg
Bool_t IsEventRejectedDueToZVertexOutsideFiducialRegion() const
Definition: AliRDHFCuts.h:311
TH2F * fHistNtrCorrVsZvtx
! hist of ntracklets vs Zvertex
Int_t fDoVZER0ParamVertexCorr
Definition of the primaries estimator eta range: |eta|<1.0=0, -1.6<|eta|<1.0=1, VZEROrange=2.
TH2F * fHistNtrVsNchMCPhysicalPrimary
! hist of ntracklets vs Nch (Physical Primary)
TH2F * fHistNtrEtaV0MvsNtrEta1EvSel
!hist. for Ntracklets in eta-V0M vs. eta<1.
TH1F * fHistNtrCorrEvSel
! hist. of ntracklets for selected events
TH2F * fHistNtrEta05vsNtrEta1EvSel
!hist. for Ntracklets in eta<0.5 vs. eta<1.
Bool_t IsEventRejectedDueToNotRecoVertex() const
Definition: AliRDHFCuts.h:305
TH3F * fPtVsMassVsMultPart
! hist. of Pt vs Mult vs. mass (particle)
TH2F * fHistNtrEtaV0MvsNtrEta1EvWithD
!hist. for Ntracklets in eta-V0M vs. eta<1. for events with a candidate in D mass peak ...
double Double_t
Definition: External.C:58
Definition: External.C:260
TH2F * fHistNtrVsNchMCPrimary
! hist of ntracklets vs Nch (Primary)
TH2F * fHistMultCorrvsMultRawEvWithD
!hist. for multiplicity with and w/o corrections for events with a candidate in D mass peak ...
TH1F * fHistNtrUnCorrPSTrigPileUpVtxSel
! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex selected events ...
TH2F * fHistNtrEta03vsNtrEta1EvSel
!hist. for Ntracklets in eta<0.3 vs. eta<1.
AliRDHFCuts * fRDCutsAnalysis
nbins for invariant mass histos
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
Definition: External.C:236
Double_t fHigherImpPar
lower limit in impact parameter (um)
Double_t DeltaInvMass() const
TH1F * fHistNtrUnCorrPSSel
! hist. of ntracklets for physics selection only selected events
Int_t GetIsSelectedCuts() const
Definition: AliRDHFCuts.h:343
TH1F * fHistoMCNch
weight on the MC on the generated multiplicity (0->no weights, 1->Nch weights, 2->Ntrk weights) ...
TH3F * fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary
! hist of Nch (generated) vs Nch (Primary) vs Nch (Physical Primary)
Bool_t HasSelectionBit(Int_t i) const
Int_t fUseNchWeight
flag to look at the correlation of different estimators (eta ranges)
Int_t MatchToMC(Int_t pdgabs, Int_t pdgabs2prong, Int_t *pdgDg, Int_t *pdgDg2prong, TClonesArray *mcArray, Bool_t isV0=kFALSE) const
TH2F * fHistNtrCorrVsNchMC
! hist of ntracklets vs Nch (Generated)
TH1F * fHistNtrUnCorrEvSel
! hist. of ntracklets for selected events
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Double_t mass
Double_t ImpParXY() const
TH1F * fHistNtrUnCorrPSTrigPileUpVtxRangeSel
! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib-range selec...
TH2F * fHistNtrEta16vsNtrEta1EvSel
!hist. for Ntracklets in eta<1.6 vs. eta<1.
TH2F * fHistNtrEta03vsNtrEta1EvWithD
!hist. for Ntracklets in eta<0.3 vs. eta<1. for events with a candidate in D mass peak ...
TH2F * fHistNtrVsNchMC
! hist of ntracklets vs Nch (Generated)
Bool_t IsEventRejectedDueToVertexContributors() const
Definition: AliRDHFCuts.h:308
TH1F * fHistNtrCorrPSSel
! hist. of ntracklets for physics selection only selected events
TH2F * fHistNtrEta05vsNtrEta1EvWithD
!hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate in D mass peak ...
Int_t GetWhyRejection() const
Definition: AliRDHFCuts.h:300
AliNormalizationCounter * fCounterU
!Counter for normalization, uncorrected multiplicity
TH1F * fHistNtrUnCorrPSTrigSel
! hist. of ntracklets for physics selection + trigger name selected events
AliNormalizationCounter * fCounterC
Cuts for Analysis.
TH1F * fHistNtrCorrEvWithCand
! hist. of ntracklets for evnts with a candidate
TH1F * fHistNtrCorrEvWithD
! hist. of ntracklets for evnts with a candidate in D mass peak
Int_t fMCPrimariesEstimator
Definition of the multiplicity estimator: kNtrk10=0, kNtrk10to16=1, kVZERO=2.
void SetMassLimits(Double_t lowlimit, Double_t uplimit)
TH2F * fHistNtrEtaV0MvsV0MEqEvWithCand
!hist. for V0M raw mult vs V0M equalized multiplicity for events with a candidate ...
TH1F * fHistNtrUnCorrPSTrigPileUpSel
! hist. of ntracklets for physics selection + trigger name + pileup selected events ...
TH1F * fHistNtrUnCorrEvWithD
! hist. of ntracklets for evnts with a candidate in D mass peak
void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult, Double_t nchWeight)
static Double_t GetVZEROCEqualizedMultiplicity(AliAODEvent *ev)
Class for cuts on AOD reconstructed D+->Kpipi.
void SetStudyMultiplicity(Bool_t flag, Float_t etaRange)
TH2F * fHistNtrEtaV0AvsNtrEta1EvSel
!hist. for Ntracklets in eta-V0A vs. eta<1.
TH2F * fHistNtrEtaV0MvsNtrEta1EvWithCand
!hist. for Ntracklets in eta-V0M vs. eta<1. for events with a candidate
Bool_t fisPPbData
0=keep all cand, 1=keep only signal, 2= keep only back
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
AliNormalizationCounter * fCounterCandidates
!Counter for normalization, corrected multiplicity for candidates
TH2F * fHistNtrEtaV0MvsV0MEqEvWithD
!hist. for V0M raw mult vs V0M equalized multiplicity with a candidate in D mass peak ...
Int_t fMultiplicityEstimator
pdg code of analyzed meson
float Float_t
Definition: External.C:68
TH3F * fPtVsMassVsMultMC
! hist. of Pt vs Mult vs. mass (MC true candidates before reconstruction)
TList * fOutput
! list send on output slot 1
TH2F * fHistNtrEtaV0MvsV0MEqEvSel
!hist. for V0M raw mult vs V0M equalized multiplicity
TProfile * fMultEstimatorAvg[4]
weight histogram on the true measured multiplicity
TH2F * fHistNtrEta16vsNtrEta1EvWithD
!hist. for Ntracklets in eta<1.6 vs. eta<1. for events with a candidate in D mass peak ...
TH1F * fHistGenPrimaryParticlesInelGt0
!hist. of geenrated multiplcity
Bool_t IsEventRejectedDueToPileup() const
Definition: AliRDHFCuts.h:314
TH1F * fHistNtrUnCorrEvWithCand
! hist. of ntracklets for evnts with a candidate
TH2F * fHistNtrEtaV0AvsNtrEta1EvWithD
!hist. for Ntracklets in eta-V0A vs. eta<1. for events with a candidate in D mass peak ...
Int_t fNImpParBins
swicth for D impact parameter THnSparse
TH2F * fHistNtrEtaV0AvsNtrEta1EvWithCand
!hist. for Ntracklets in eta-V0A vs. eta<1. for events with a candidate
Int_t fNMassBins
lower inv mass limit for histos
TH2F * fHistNtrEtaV0AvsV0AEqEvSel
!hist. for V0A raw mult vs V0A equalized multiplicity
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 * fHistNtrEta05vsNtrEta1EvWithCand
!hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate
Bool_t IsEventRejectedDuePhysicsSelection() const
Definition: AliRDHFCuts.h:329
TH1F * fHistNtrUnCorrPSTrigPileUpVtxRangeCentrSel
! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib-range + cen...
TH2F * fHistNtrCorrEta1vsNtrRawEta1EvSel
!hist. for Ntracklets in eta<1 with and w/o corrections
TH2F * fHistNtrCorrEta1vsNtrRawEta1EvWithCand
!hist. for Ntracklets in eta<1 with and w/o corrections for events with a candidate ...
TH1F * fHistNtrUnCorrPSTrigPileUpVtxContSel
! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib selected ev...
Bool_t fUseBit
flag to run on pPb data (differen histogram bining)
static Double_t GetCorrectedNtracklets(TProfile *estimatorAvg, Double_t uncorrectedNacc, Double_t vtxZ, Double_t refMult)
TH3F * fPtVsMassVsMultAntiPart
! hist. of Pt vs Mult vs. mass (antiparticle)
Bool_t IsEventSelected(AliVEvent *event)
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
THnSparseF * fHistMassPtImpPar[5]
! histograms for impact paramter studies
TH2F * fHistNtrEtaV0AvsV0AEqEvWithCand
!hist. for V0A raw mult vs V0A equalized multiplicity for events with a candidate ...
TH3F * fPtVsMassVsMultNoPid
! hist. of Pt vs Mult vs. mass (no pid)
Bool_t IsSelected(TObject *obj)
Definition: AliRDHFCuts.h:277
TH2F * fHistMultCorrvsMultRawEvWithCand
!hist. for multiplicity with and w/o corrections for events with a candidate
TH2F * fHistNtrEtaV0AvsV0AEqEvWithD
!hist. for V0A raw mult vs V0A equalized multiplicity with a candidate in D mass peak ...
Double_t fLowerImpPar
nunber of bins in impact parameter histos
const char Option_t
Definition: External.C:48
TH2F * fHistNtrCorrVsNchMCPrimary
! hist of ntracklets vs Nch (Primary)
TH2F * fHistNtrEta03vsNtrEta1EvWithCand
!hist. for Ntracklets in eta<0.3 vs. eta<1. for events with a candidate
static Double_t GetVZEROAEqualizedMultiplicity(AliAODEvent *ev)
Utilities for V0 multiplicity checks.
Bool_t IsEventRejectedDueToTrigger() const
Definition: AliRDHFCuts.h:302
TH2F * fHistNtrVsZvtx
! hist of ntracklets vs Zvertex
TH1F * fHistNEvents
list of profile histos for z-vtx correction
static Double_t GetTrueImpactParameterDzero(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partDp)
Functions for computing true impact parameter of D meson.
const Int_t nbins
TH2F * fHistNtrCorrEta1vsNtrRawEta1EvWithD
!hist. for Ntracklets in eta<1 with and w/o corrections for events with a candidate in D mass peak ...
bool Bool_t
Definition: External.C:53
Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPartCandidate) const
Bool_t fKeepCorrPlots
flag for subtracting D meson daughter contribution to N of tracklets
AliAODRecoDecayHF2Prong * Get2Prong() const
static Double_t GetTrueImpactParameterDplus(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partDp)
TProfile * GetEstimatorHistogram(const AliVEvent *event)
virtual Bool_t IsInFiducialAcceptance(Double_t, Double_t) const
Definition: AliRDHFCuts.h:297
Double_t fRefMult
TProfile with mult vs. Z per period.
Double_t fLowmasslimit
upper inv mass limit for histos
TH2F * fHistNtrEta16vsNtrEta1EvWithCand
!hist. for Ntracklets in eta<1.6 vs. eta<1. for events with a candidate
Bool_t fReadMC
higher limit in impact parameter (um)
TH3F * fPtVsMassVsMultUncorr
! hist. of Pt vs Mult vs. mass (raw mult)
TH1F * fHistoMeasNch
weight histogram for the MC on the generated multiplicity
TH2F * fHistNtrCorrVsNchMCPhysicalPrimary
! hist of ntracklets vs Nch (Physical Primary)
Int_t fPdgMeson
refrence multiplcity (period b)