AliPhysics  ed43440 (ed43440)
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 <THnSparse.h>
21 #include <TArrayD.h>
22 #include <TFile.h>
23 #include <TRandom.h>
24 #include <TProfile.h>
26 #include "AliAnalysisTaskSE.h"
27 #include "AliAnalysisVertexingHF.h"
29 #include "AliAODMCHeader.h"
30 #include "AliAODMCParticle.h"
31 #include "AliVertexingHFUtils.h"
32 #include "AliVEvent.h"
33 
34 
36 {
37  public:
38 
40  AliAnalysisTaskSEDvsMultiplicity(const char *name, Int_t pdgMeson, AliRDHFCuts* cuts, Bool_t switchPPb);
42 
43 
44  void SetMassLimits(Double_t lowlimit, Double_t uplimit);
45  void SetMassLimits(Int_t pdg, Double_t range);
49  Int_t GetNMassBins() const{return fNMassBins;}
51 
54  fLowerImpPar=dmin;
55  fHigherImpPar=dmax;
56  }
57 
58  void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
59  void SetMCOption(Int_t option=0){ fMCOption = option; }
60  void SetIsPPbData(Bool_t flag=kTRUE){
61  fisPPbData=flag;
62  }
63  void SetUseBit(Bool_t use=kTRUE){fUseBit=use;}
66 
67  void SetMultiplVsZProfileLHC10b(TProfile* hprof){
68  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
69  fMultEstimatorAvg[0]=new TProfile(*hprof);
70  }
71  void SetMultiplVsZProfileLHC10c(TProfile* hprof){
72  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
73  fMultEstimatorAvg[1]=new TProfile(*hprof);
74  }
75  void SetMultiplVsZProfileLHC10d(TProfile* hprof){
76  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
77  fMultEstimatorAvg[2]=new TProfile(*hprof);
78  }
79  void SetMultiplVsZProfileLHC10e(TProfile* hprof){
80  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
81  fMultEstimatorAvg[3]=new TProfile(*hprof);
82  }
83 
84  void SetMultiplVsZProfileLHC13b(TProfile* hprof){
85  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
86  fMultEstimatorAvg[0]=new TProfile(*hprof);
87  fYearNumber = 13;
88  }
89  void SetMultiplVsZProfileLHC13c(TProfile* hprof){
90  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
91  fMultEstimatorAvg[1]=new TProfile(*hprof);
92  fYearNumber = 13;
93  }
94 
95  void SetMultiplVsZProfileLHC16qt1stBunch(TProfile* hprof){
96  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
97  fMultEstimatorAvg[0]=new TProfile(*hprof);
98  fYearNumber = 16;
99  }
100  void SetMultiplVsZProfileLHC16qt2ndBunch(TProfile* hprof){
101  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
102  fMultEstimatorAvg[1]=new TProfile(*hprof);
103  fYearNumber = 16;
104  }
105  void SetMultiplVsZProfileLHC16qt3rdBunch(TProfile* hprof){
106  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
107  fMultEstimatorAvg[2]=new TProfile(*hprof);
108  fYearNumber = 16;
109  }
110  void SetMultiplVsZProfileLHC16qt4thBunch(TProfile* hprof){
111  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
112  fMultEstimatorAvg[3]=new TProfile(*hprof);
113  fYearNumber = 16;
114  }
115 
117 
119  void UseMCNchWeight(Int_t flag) { fUseNchWeight = flag; }
120  void SetHistoNchWeight(TH1F *h){
121  if(fHistoMCNch) delete fHistoMCNch;
122  fHistoMCNch = new TH1F(*h);
123  }
124  void SetMeasuredNchHisto(TH1F* h){
125  if(fHistoMeasNch) delete fHistoMeasNch;
126  fHistoMeasNch = new TH1F(*h);
127  }
128 
130  Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const;
131 
132  void SetLcToV0decay(Bool_t flag) {fLctoV0=flag; }
133 
137 
141  enum { kEta10=0, kEta10to16=1, kEtaVZERO=2, kEta03=3, kEta05=5, kEtaVZEROA=5 };
144 
146  virtual void UserCreateOutputObjects();
147  virtual void Init();
148  virtual void LocalInit() {Init();}
149  virtual void UserExec(Option_t *option);
150  virtual void Terminate(Option_t *option);
151 
152  private:
153 
156 
157  TProfile* GetEstimatorHistogram(const AliVEvent *event);
159  void CreateMeasuredNchHisto();
160  void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult,Double_t nchWeight);
161 
166 
167  TH1F *fHistNEvents;
168 
196 
199 
208 
223 
224 
231 
232  THnSparseF *fHistMassPtImpPar[5];
233 
237 
242 
243 
248 
256 
259  TH1F* fHistoMCNch;
261 
262  TProfile* fMultEstimatorAvg[4];
266 
269 
271 
273 
275  ClassDef(AliAnalysisTaskSEDvsMultiplicity,19);
276 };
278 
279 #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
flag for Lc in K0sp decay
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
const Bool_t doImp
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
Bool_t fLctoV0
pdg code of analyzed meson
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)