AliPhysics  59e0e03 (59e0e03)
AliAnalysisTaskSEDvsMultiplicity.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEDVSMULTIPLICITY_H
2 #define ALIANALYSISTASKSEDVSMULTIPLICITY_H
3 
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
9 //*************************************************************************
13 //*************************************************************************
14 
15 #include <TROOT.h>
16 #include <TSystem.h>
17 #include <TH1F.h>
18 #include <TH2F.h>
19 #include <TH3F.h>
20 #include <TArrayD.h>
21 #include <TFile.h>
22 #include <TRandom.h>
23 #include <TProfile.h>
25 #include "AliAnalysisTaskSE.h"
26 #include "AliAnalysisVertexingHF.h"
28 #include "AliAODMCHeader.h"
29 #include "AliAODMCParticle.h"
30 #include "AliVertexingHFUtils.h"
31 #include "AliVEvent.h"
32 
33 
35 {
36  public:
37 
39  AliAnalysisTaskSEDvsMultiplicity(const char *name, Int_t pdgMeson, AliRDHFCuts* cuts, Bool_t switchPPb);
41 
42 
43  void SetMassLimits(Double_t lowlimit, Double_t uplimit);
44  void SetMassLimits(Int_t pdg, Double_t range);
48  Int_t GetNMassBins() const{return fNMassBins;}
50 
53  fLowerImpPar=dmin;
54  fHigherImpPar=dmax;
55  }
56 
57  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
58  void SetMCOption(Int_t option=0){ fMCOption = option; }
59  void SetIsPPbData(Bool_t flag=kTRUE){
60  fisPPbData=flag;
61  }
62  void SetUseBit(Bool_t use=kTRUE){fUseBit=use;}
65 
66  void SetMultiplVsZProfileLHC10b(TProfile* hprof){
67  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
68  fMultEstimatorAvg[0]=new TProfile(*hprof);
69  }
70  void SetMultiplVsZProfileLHC10c(TProfile* hprof){
71  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
72  fMultEstimatorAvg[1]=new TProfile(*hprof);
73  }
74  void SetMultiplVsZProfileLHC10d(TProfile* hprof){
75  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
76  fMultEstimatorAvg[2]=new TProfile(*hprof);
77  }
78  void SetMultiplVsZProfileLHC10e(TProfile* hprof){
79  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
80  fMultEstimatorAvg[3]=new TProfile(*hprof);
81  }
82 
83  void SetMultiplVsZProfileLHC13b(TProfile* hprof){
84  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
85  fMultEstimatorAvg[0]=new TProfile(*hprof);
86  fYearNumber = 13;
87  }
88  void SetMultiplVsZProfileLHC13c(TProfile* hprof){
89  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
90  fMultEstimatorAvg[1]=new TProfile(*hprof);
91  fYearNumber = 13;
92  }
93 
94  void SetMultiplVsZProfileLHC16qt1stBunch(TProfile* hprof){
95  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
96  fMultEstimatorAvg[0]=new TProfile(*hprof);
97  fYearNumber = 16;
98  }
99  void SetMultiplVsZProfileLHC16qt2ndBunch(TProfile* hprof){
100  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
101  fMultEstimatorAvg[1]=new TProfile(*hprof);
102  fYearNumber = 16;
103  }
104  void SetMultiplVsZProfileLHC16qt3rdBunch(TProfile* hprof){
105  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
106  fMultEstimatorAvg[2]=new TProfile(*hprof);
107  fYearNumber = 16;
108  }
109  void SetMultiplVsZProfileLHC16qt4thBunch(TProfile* hprof){
110  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
111  fMultEstimatorAvg[3]=new TProfile(*hprof);
112  fYearNumber = 16;
113  }
114 
116 
118  void UseMCNchWeight(Int_t flag) { fUseNchWeight = flag; }
119  void SetHistoNchWeight(TH1F *h){
120  if(fHistoMCNch) delete fHistoMCNch;
121  fHistoMCNch = new TH1F(*h);
122  }
123  void SetMeasuredNchHisto(TH1F* h){
124  if(fHistoMeasNch) delete fHistoMeasNch;
125  fHistoMeasNch = new TH1F(*h);
126  }
127 
129  Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const;
130 
134 
138  enum { kEta10=0, kEta10to16=1, kEtaVZERO=2, kEta03=3, kEta05=5, kEtaVZEROA=5 };
141 
143  virtual void UserCreateOutputObjects();
144  virtual void Init();
145  virtual void LocalInit() {Init();}
146  virtual void UserExec(Option_t *option);
147  virtual void Terminate(Option_t *option);
148 
149  private:
150 
153 
154  TProfile* GetEstimatorHistogram(const AliVEvent *event);
156  void CreateMeasuredNchHisto();
157  void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult,Double_t nchWeight);
158 
163 
164  TH1F *fHistNEvents;
165 
193 
196 
205 
220 
221 
228 
229  THnSparseF *fHistMassPtImpPar[5];
230 
234 
239 
240 
245 
253 
256  TH1F* fHistoMCNch;
258 
259  TProfile* fMultEstimatorAvg[4];
262 
265 
267 
269 
271  ClassDef(AliAnalysisTaskSEDvsMultiplicity,18);
272 };
274 
275 #endif
TH2F * fHistMultCorrvsMultRawEvSel
!hist. for multiplicity with and w/o corrections
TH3F * fPtVsMassVsMult
! hist. of Pt vs Mult vs. mass (
Int_t pdg
Int_t fAODProtection
flag to look at the correlation of different estimators (eta ranges)
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.
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
Definition: External.C:236
Double_t fHigherImpPar
lower limit in impact parameter (um)
TH1F * fHistNtrUnCorrPSSel
! hist. of ntracklets for physics selection only selected events
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)
Int_t fUseNchWeight
-1: no protection, 0: check AOD/dAOD nEvents only, 1: check AOD/dAOD nEvents + TProcessID names ...
TH2F * fHistNtrCorrVsNchMC
! hist of ntracklets vs Nch (Generated)
void SetUseVZEROParameterizedVertexCorr(Int_t flag)
Flag to use the zvtx correction from ( 0= none, 1= usual d2h, 2=AliESDUtils for VZERO multiplicity) ...
TH1F * fHistNtrUnCorrEvSel
! hist. of ntracklets for selected events
virtual void UserCreateOutputObjects()
Implementation of interface methods.
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)
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 ...
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 ...
Int_t fYearNumber
Flag to use the zvtx correction from (0=none, 1=usual d2h, 2=AliESDUtils for VZERO multiplicity) ...
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)
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
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
const Bool_t doImp
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
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
TH2F * fHistNtrEta05vsNtrEta1EvWithCand
!hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate
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)
TH3F * fPtVsMassVsMultAntiPart
! hist. of Pt vs Mult vs. mass (antiparticle)
AliAnalysisTaskSEDvsMultiplicity & operator=(const AliAnalysisTaskSEDvsMultiplicity &source)
void UseMCNchWeight(Int_t flag)
Nch Ntrk weights on MC.
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)
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
TH2F * fHistNtrVsZvtx
! hist of ntracklets vs Zvertex
TH1F * fHistNEvents
list of profile histos for z-vtx correction
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
TProfile * GetEstimatorHistogram(const AliVEvent *event)
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
void SetImpactParameterBinning(Int_t nbins, Double_t dmin, Double_t dmax)
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)