AliPhysics  a0db429 (a0db429)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliAnalysisTaskSEDvsEventShapes.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEDVSEVENTSHAPES_H
2 #define ALIANALYSISTASKSEDVSEVENTSHAPES_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 //*************************************************************************
10 // Class AliAnalysisTaskSEDvsEventShapes
11 // AliAnalysisTaskSE for the D meson vs. Event shape analysis in different mutiplicity window
12 // Authors: Renu Bala, Manoj Bhanudas Jadhav
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 
35 class AliAnalysisTaskSEDvsEventShapes : public AliAnalysisTaskSE
36 {
37 public:
38 
40  AliAnalysisTaskSEDvsEventShapes(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);
46  Double_t GetUpperMassLimit() const {return fUpmasslimit;}
47  Double_t GetLowerMassLimit() const {return fLowmasslimit;}
49  Int_t GetNMassBins() const{return fNMassBins;}
51 
52  void SetImpactParameterBinning(Int_t nbins, Double_t dmin, Double_t dmax){
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;}
65  void SetKeepEstimatorCorrelationPlots(Bool_t use=kTRUE){fKeepCorrPlots=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  }
88  void SetMultiplVsZProfileLHC13c(TProfile* hprof){
89  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
90  fMultEstimatorAvg[1]=new TProfile(*hprof);
91  }
92 
93  void SetReferenceMultiplcity(Double_t rmu){fRefMult=rmu;}
94 
95  // Nch Ntrk weights on MC
96  void UseMCNchWeight(Int_t flag) { fUseNchWeight = flag; }
97  void SetHistoNchWeight(TH1F *h){
98  if(fHistoMCNch) delete fHistoMCNch;
99  fHistoMCNch = new TH1F(*h);
100  }
101  void SetMeasuredNchHisto(TH1F* h){
102  if(fHistoMeasNch) delete fHistoMeasNch;
103  fHistoMeasNch = new TH1F(*h);
104  }
105 
107  Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const;
108 
109  // Flag to use the zvtx correction from ( 0= none, 1= usual d2h, 2=AliESDUtils for VZERO multiplicity)
111  // Flag to fill THnSparse with MultUncorr and NoPid cases ( 0 = only Mult, 1 = Mult and multUncorr, 2 = NoPid and 3 is All)
113  void SetEventShapeParameters(Double_t ptMin, Double_t ptMax, Double_t etaMin, Double_t etaMax, Int_t minMult, Double_t phiStepSizeDeg, Int_t filtbit1, Int_t filtbit2) { fptMin=ptMin; fptMax=ptMax; fetaMin=etaMin; fetaMax=etaMax; fminMult=minMult; fphiStepSizeDeg=phiStepSizeDeg; ffiltbit1=filtbit1; ffiltbit2=filtbit2;}
114  void SetCalculationsForSphericity(Bool_t CalSpheri){fCalculateSphericity=CalSpheri;}
115 
117 
121  enum { kEta10=0, kEta10to16=1, kEtaVZERO=2, kEta03=3, kEta05=5, kEtaVZEROA=5 };
122  void SetMCPrimariesEstimator(Int_t value){ fMCPrimariesEstimator=value; }
124 
125  // Implementation of interface methods
126  virtual void UserCreateOutputObjects();
127  virtual void Init();
128  virtual void LocalInit() {Init();}
129  virtual void UserExec(Option_t *option);
130  virtual void Terminate(Option_t *option);
131 
132 private:
133 
136 
137  TProfile* GetEstimatorHistogram(const AliVEvent *event);
139  void CreateMeasuredNchHisto();
140  void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult,Double_t nchWeight);
141 
142  TList *fOutput;
143  TList *fListCuts; //list of cuts
145  TList *fListProfiles; //list of profile histos for z-vtx correction
146 
147  TH1F *fHistNEvents;
148 
176 
179  TH2F* fHistNtrVsSo;
181 
190 
206 
207  THnSparseD *fSparseSpherocity;
209 
210  THnSparseF *fHistMassPtImpPar[5];
211 
212  Double_t fUpmasslimit; //upper inv mass limit for histos
213  Double_t fLowmasslimit; //lower inv mass limit for histos
214  Int_t fNMassBins; // nbins for invariant mass histos
215 
216  AliRDHFCuts *fRDCutsAnalysis; // Cuts for Analysis
219 
221 
222 
223  Bool_t fDoImpPar; //swicth for D impact parameter THnSparse
224  Int_t fNImpParBins; // nunber of bins in impact parameter histos
225  Double_t fLowerImpPar; // lower limit in impact parameter (um)
226  Double_t fHigherImpPar; // higher limit in impact parameter (um)
227 
228  Bool_t fReadMC; //flag for access to MC
229  Int_t fMCOption; // 0=keep all cand, 1=keep only signal, 2= keep only back
230  Bool_t fisPPbData; // flag to run on pPb data (differen histogram bining)
231  Bool_t fUseBit; // flag to use bitmask
232  Bool_t fSubtractTrackletsFromDau; // flag for subtracting D meson daughter contribution to N of tracklets
233  Bool_t fKeepCorrPlots; // flag to look at the correlation of different estimators (eta ranges)
235  Int_t fUseNchWeight; // weight on the MC on the generated multiplicity (0->no weights, 1->Nch weights, 2->Ntrk weights)
236  TH1F* fHistoMCNch; // weight histogram for the MC on the generated multiplicity
237  TH1F* fHistoMeasNch; // weight histogram on the true measured multiplicity
238 
239  TProfile* fMultEstimatorAvg[4]; //TProfile with mult vs. Z per period
240  Double_t fRefMult; // refrence multiplcity (period b)
241  Int_t fPdgMeson; // pdg code of analyzed meson
242 
243  Int_t fMultiplicityEstimator; // Definition of the multiplicity estimator: kNtrk10=0, kNtrk10to16=1, kVZERO=2
244  Int_t fMCPrimariesEstimator; // Definition of the primaries estimator eta range: |eta|<1.0=0, -1.6<|eta|<1.0=1, VZEROrange=2
245 
246  Int_t fDoVZER0ParamVertexCorr; // Flag to use the zvtx correction from (0=none, 1=usual d2h, 2=AliESDUtils for VZERO multiplicity)
247 
248  Int_t fFillSoSparseChecks; // Flag to fill THnSparse with MultUncorr and NoPid cases ( 0 = only Mult, 1 = Mult and multUncorr, 2 = NoPid and 3 is All)
249  Double_t fetaMin;
250  Double_t fetaMax;
251  Double_t fptMin;
252  Double_t fptMax;
253  Int_t fminMult;
254  Int_t ffiltbit1;
255  Int_t ffiltbit2;
256  Double_t fphiStepSizeDeg;
257 
258  ClassDef(AliAnalysisTaskSEDvsEventShapes,1); // event shape task
259 };
260 
261 #endif
Int_t pdg
TH2F * fHistMultCorrvsMultRawEvWithD
hist. for Ntracklets in eta<1 with and w/o corrections for events with a candidate in D mass peak ...
AliAnalysisTaskSEDvsEventShapes & operator=(const AliAnalysisTaskSEDvsEventShapes &source)
TH2F * fHistNtrEta05vsNtrEta1EvWithD
hist. for Ntracklets in eta<1.6 vs. eta<1. for events with a candidate in D mass peak ...
TH2F * fHistNtrEta05vsNtrEta1EvSel
hist. for Ntracklets in eta<1.6 vs. eta<1.
TH2F * fHistNtrCorrVsSo
hist of ntracklets vs So
TH2F * fHistNtrEtaV0AvsNtrEta1EvWithCand
hist. for Ntracklets in eta<0.3 vs. eta<1. for events with a candidate
TH1F * fHistNtrUnCorrPSTrigPileUpVtxContSel
hist. of ntracklets for physics selection + trigger name + pileup + with-vertex selected events ...
TH2F * fHistNtrEta03vsNtrEta1EvWithD
hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate in D mass peak ...
TH2F * fHistNtrCorrEta1vsNtrRawEta1EvWithCand
hist. for V0M raw mult vs V0M equalized multiplicity for events with a candidate
AliNormalizationCounter * fCounterCandidates
Counter for normalization, uncorrected multiplicity.
TH2F * fHistNtrCorrEta1vsNtrRawEta1EvWithD
hist. for V0M raw mult vs V0M equalized multiplicity with a candidate in D mass peak ...
TH1F * fHistNtrUnCorrPSSel
hist of Nch (generated) vs Nch (Primary) vs Nch (Physical Primary)
TH2F * fHistNtrEta03vsNtrEta1EvSel
hist. for Ntracklets in eta<0.5 vs. eta<1.
TH2F * fHistNtrEta16vsNtrEta1EvWithCand
hist. for multiplicity with and w/o corrections
TH1F * fHistNtrUnCorrPSTrigPileUpVtxRangeSel
hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib selected even...
TH2F * fHistNtrEtaV0AvsV0AEqEvWithCand
hist. for Ntracklets in eta-V0M vs. eta<1. for events with a candidate
TH2F * fHistMultCorrvsMultRawEvWithCand
hist. for Ntracklets in eta<1 with and w/o corrections for events with a candidate ...
TH2F * fHistNtrEtaV0AvsV0AEqEvWithD
hist. for Ntracklets in eta-V0M vs. eta<1. for events with a candidate in D mass peak ...
THnSparseD * fSparseSpherocity
hist. of Pt vs Mult vs. mass (MC true candidates before reconstruction)
TH2F * fHistNtrVsNchMCPhysicalPrimary
hist of ntracklets vs Nch (Primary)
TH2F * fHistNtrCorrVsNchMCPhysicalPrimary
hist of ntracklets vs Nch (Physical Primary)
TH3F * fPtVsMassVsMultMC
hist. of ntracklets for evnts with a candidate in D mass peak
Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPartCandidate) const
TH2F * fHistNtrVsNchMC
hist of ntracklets vs So
Double_t ptMin
TH1F * fHistNtrCorrPSSel
hist. of ntracklets for evnts with a candidate in D mass peak
TH2F * fHistNtrEtaV0AvsNtrEta1EvWithD
hist. for Ntracklets in eta<0.3 vs. eta<1. for events with a candidate in D mass peak ...
TH2F * fHistNtrCorrVsZvtx
hist of ntracklets vs Zvertex
TH2F * fHistNtrEta16vsNtrEta1EvWithD
hist. for multiplicity with and w/o corrections for events with a candidate
THnSparseF * fHistMassPtImpPar[5]
THnSparse histograms for Spherocity studies.
TH2F * fHistNtrVsZvtx
hist. for multiplicity with and w/o corrections for events with a candidate in D mass peak ...
TH1F * fHistNtrUnCorrPSTrigPileUpVtxRangeCentrSel
hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib-range selecte...
Bool_t fDoImpPar
Counter for normalization, corrected multiplicity for candidates.
TList * fListProfiles
list send on output slot 3
void SetEventShapeParameters(Double_t ptMin, Double_t ptMax, Double_t etaMin, Double_t etaMax, Int_t minMult, Double_t phiStepSizeDeg, Int_t filtbit1, Int_t filtbit2)
TH2F * fHistNtrCorrVsNchMC
hist of ntracklets vs Nch (Generated)
TH2F * fHistNtrEtaV0MvsNtrEta1EvWithD
hist. for Ntracklets in eta-V0A vs. eta<1. for events with a candidate in D mass peak ...
TH2F * fHistNtrEtaV0MvsV0MEqEvSel
hist. for V0A raw mult vs V0A equalized multiplicity
THnSparseD * fSparseSpherocitywithNoPid
THnSparse histograms for Spherocity studies.
TH2F * fHistNtrEtaV0MvsV0MEqEvWithD
hist. for V0A raw mult vs V0A equalized multiplicity with a candidate in D mass peak ...
TH2F * fHistNtrVsNchMCPrimary
hist of ntracklets vs Nch (Generated)
TH3F * fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary
hist. of geenrated multiplcity
void SetImpactParameterBinning(Int_t nbins, Double_t dmin, Double_t dmax)
AliNormalizationCounter * fCounterU
Counter for normalization, corrected multiplicity.
TH2F * fHistNtrEtaV0AvsV0AEqEvSel
hist. for Ntracklets in eta-V0M vs. eta<1.
const Bool_t doImp
TH2F * fHistNtrEta05vsNtrEta1EvWithCand
hist. for Ntracklets in eta<1.6 vs. eta<1. for events with a candidate
TH1F * fHistNtrCorrEvSel
hist. of ntracklets for physics selection only selected events
void SetMassLimits(Double_t lowlimit, Double_t uplimit)
TH2F * fHistNtrEtaV0MvsV0MEqEvWithCand
hist. for V0A raw mult vs V0A equalized multiplicity for events with a candidate
TH2F * fHistNtrEta16vsNtrEta1EvSel
hist. for No. of events
TH2F * fHistNtrVsSo
hist of ntracklets vs Zvertex
TH1F * fHistNtrUnCorrEvWithD
hist. of ntracklets for evnts with a candidate
TH2F * fHistNtrEta03vsNtrEta1EvWithCand
hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate
TH1F * fHistNtrCorrEvWithD
hist. of ntracklets for evnts with a candidate
void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult, Double_t nchWeight)
TProfile * GetEstimatorHistogram(const AliVEvent *event)
TH1F * fHistNtrCorrEvWithCand
hist. of ntracklets for selected events
Double_t fUpmasslimit
histograms for impact paramter studies
TH1F * fHistNtrUnCorrPSTrigSel
hist. of ntracklets for physics selection only selected events
ClassDef(AliAnalysisTaskSEDvsEventShapes, 1)
TH1F * fHistNtrUnCorrEvSel
hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib-range + centr...
TList * fListCuts
list send on output slot 1
TH1F * fHistGenPrimaryParticlesInelGt0
hist of ntracklets vs Nch (Physical Primary)
TH1F * fHistNtrUnCorrPSTrigPileUpSel
hist. of ntracklets for physics selection + trigger name selected events
const Int_t nbins
TH2F * fHistMultCorrvsMultRawEvSel
hist. for Ntracklets in eta<1 with and w/o corrections
TH2F * fHistNtrCorrVsNchMCPrimary
hist of ntracklets vs Nch (Primary)
TH1F * fHistNtrUnCorrPSTrigPileUpVtxSel
hist. of ntracklets for physics selection + trigger name + pileup selected events ...
Double_t ptMax
TH2F * fHistNtrEtaV0MvsNtrEta1EvSel
hist. for Ntracklets in eta-V0A vs. eta<1.
TH2F * fHistNtrEtaV0MvsNtrEta1EvWithCand
hist. for Ntracklets in eta-V0A vs. eta<1. for events with a candidate
TH2F * fHistNtrEtaV0AvsNtrEta1EvSel
hist. for Ntracklets in eta<0.3 vs. eta<1.
TH1F * fHistNtrUnCorrEvWithCand
hist. of ntracklets for selected events
TH2F * fHistNtrCorrEta1vsNtrRawEta1EvSel
hist. for V0M raw mult vs V0M equalized multiplicity