]>
Commit | Line | Data |
---|---|---|
43093cfa | 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 | //************************************************************************* | |
10 | // Class AliAnalysisTaskSEDvsMultiplicity | |
11 | // AliAnalysisTaskSE for the D meson vs. multiplcity analysis | |
12 | // Authors: Renu Bala, Zaida Conesa del Valle, Francesco Prino | |
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> | |
24 | #include "AliRDHFCutsDplustoKpipi.h" | |
25 | #include "AliAnalysisTaskSE.h" | |
26 | #include "AliAnalysisVertexingHF.h" | |
27 | #include "AliNormalizationCounter.h" | |
28 | #include "AliAODMCHeader.h" | |
29 | #include "AliAODMCParticle.h" | |
30 | #include "AliVertexingHFUtils.h" | |
31 | #include "AliVEvent.h" | |
32 | ||
33 | ||
43093cfa | 34 | class AliAnalysisTaskSEDvsMultiplicity : public AliAnalysisTaskSE |
35 | { | |
36 | public: | |
37 | ||
38 | AliAnalysisTaskSEDvsMultiplicity(); | |
b97c5dc0 | 39 | AliAnalysisTaskSEDvsMultiplicity(const char *name, Int_t pdgMeson, AliRDHFCuts* cuts, Bool_t switchPPb); |
43093cfa | 40 | virtual ~AliAnalysisTaskSEDvsMultiplicity(); |
41 | ||
43093cfa | 42 | |
7826c36d | 43 | void SetMassLimits(Double_t lowlimit, Double_t uplimit); |
44 | void SetMassLimits(Int_t pdg, Double_t range); | |
45 | Double_t GetUpperMassLimit() const {return fUpmasslimit;} | |
46 | Double_t GetLowerMassLimit() const {return fLowmasslimit;} | |
47 | void SetNMassBins(Int_t nbins){fNMassBins=nbins;} | |
48 | Int_t GetNMassBins() const{return fNMassBins;} | |
0d1e32a6 | 49 | Bool_t GetSubtractTrackletsFromDaughters() const {return fSubtractTrackletsFromDau;} |
43093cfa | 50 | |
7826c36d | 51 | void SetImpactParameterBinning(Int_t nbins, Double_t dmin, Double_t dmax){ |
43093cfa | 52 | fNImpParBins=nbins; |
53 | fLowerImpPar=dmin; | |
54 | fHigherImpPar=dmax; | |
55 | } | |
56 | ||
7826c36d | 57 | void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;} |
20550d50 | 58 | void SetMCOption(Int_t option=0){ fMCOption = option; } |
b97c5dc0 | 59 | void SetIsPPbData(Bool_t flag=kTRUE){ |
60 | fisPPbData=flag; | |
b97c5dc0 | 61 | } |
43093cfa | 62 | void SetUseBit(Bool_t use=kTRUE){fUseBit=use;} |
63 | void SetDoImpactParameterHistos(Bool_t doImp=kTRUE){fDoImpPar=doImp;} | |
0429d713 | 64 | void SetKeepEstimatorCorrelationPlots(Bool_t use=kTRUE){fKeepCorrPlots=use;} |
43093cfa | 65 | |
43093cfa | 66 | void SetMultiplVsZProfileLHC10b(TProfile* hprof){ |
2d11aff8 | 67 | if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0]; |
68 | fMultEstimatorAvg[0]=new TProfile(*hprof); | |
43093cfa | 69 | } |
70 | void SetMultiplVsZProfileLHC10c(TProfile* hprof){ | |
2d11aff8 | 71 | if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1]; |
72 | fMultEstimatorAvg[1]=new TProfile(*hprof); | |
43093cfa | 73 | } |
74 | void SetMultiplVsZProfileLHC10d(TProfile* hprof){ | |
2d11aff8 | 75 | if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2]; |
76 | fMultEstimatorAvg[2]=new TProfile(*hprof); | |
43093cfa | 77 | } |
78 | void SetMultiplVsZProfileLHC10e(TProfile* hprof){ | |
2d11aff8 | 79 | if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3]; |
80 | fMultEstimatorAvg[3]=new TProfile(*hprof); | |
43093cfa | 81 | } |
b97c5dc0 | 82 | |
83 | void SetMultiplVsZProfileLHC13b(TProfile* hprof){ | |
84 | if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0]; | |
85 | fMultEstimatorAvg[0]=new TProfile(*hprof); | |
86 | } | |
87 | void SetMultiplVsZProfileLHC13c(TProfile* hprof){ | |
88 | if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1]; | |
89 | fMultEstimatorAvg[1]=new TProfile(*hprof); | |
90 | } | |
91 | ||
f73a90da | 92 | void SetReferenceMultiplcity(Double_t rmu){fRefMult=rmu;} |
3cca4c06 | 93 | |
94 | // Nch weights on MC | |
95 | void UseMCNchWeight(Bool_t flag) { fUseNchWeight = flag; } | |
96 | void SetHistoNchWeight(TH1F *h){ | |
97 | if(fHistoMCNch) delete fHistoMCNch; | |
98 | fHistoMCNch = new TH1F(*h); | |
99 | } | |
100 | ||
0d1e32a6 | 101 | void SetSubtractTrackletsFromDaughters(Bool_t opt){fSubtractTrackletsFromDau=opt;} |
43093cfa | 102 | Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const; |
103 | ||
b242bddf | 104 | // Flag to use the zvtx correction from ( 0= none, 1= usual d2h, 2=AliESDUtils for VZERO multiplicity) |
105 | void SetUseVZEROParameterizedVertexCorr(Int_t flag) { fDoVZER0ParamVertexCorr=flag; } | |
106 | Int_t GetUseVZEROParameterizedVertexCorr() { return fDoVZER0ParamVertexCorr; } | |
107 | ||
108 | enum { kNtrk10=0, kNtrk10to16=1, kVZERO=2, kNtrk03=3, kNtrk05=4, kVZEROA=5, kVZEROEq=6, kVZEROAEq=7 }; | |
3cca4c06 | 109 | void SetMultiplicityEstimator(Int_t value){ fMultiplicityEstimator=value; } |
110 | Int_t GetMultiplicityEstimator(){ return fMultiplicityEstimator; } | |
cd465657 | 111 | enum { kEta10=0, kEta10to16=1, kEtaVZERO=2, kEta03=3, kEta05=5, kEtaVZEROA=5 }; |
20550d50 | 112 | void SetMCPrimariesEstimator(Int_t value){ fMCPrimariesEstimator=value; } |
113 | Int_t GetMCPrimariesEstimator(){ return fMCPrimariesEstimator; } | |
3cca4c06 | 114 | |
43093cfa | 115 | // Implementation of interface methods |
116 | virtual void UserCreateOutputObjects(); | |
117 | virtual void Init(); | |
118 | virtual void LocalInit() {Init();} | |
119 | virtual void UserExec(Option_t *option); | |
120 | virtual void Terminate(Option_t *option); | |
121 | ||
122 | private: | |
123 | ||
124 | AliAnalysisTaskSEDvsMultiplicity(const AliAnalysisTaskSEDvsMultiplicity &source); | |
125 | AliAnalysisTaskSEDvsMultiplicity& operator=(const AliAnalysisTaskSEDvsMultiplicity& source); | |
126 | ||
127 | TProfile* GetEstimatorHistogram(const AliVEvent *event); | |
128 | void CreateImpactParameterHistos(); | |
3cca4c06 | 129 | void CreateMeasuredNchHisto(); |
20550d50 | 130 | void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult,Double_t nchWeight); |
43093cfa | 131 | |
132 | TList *fOutput; //! list send on output slot 1 | |
133 | TList *fListCuts; //list of cuts | |
134 | TList *fOutputCounters; //! list send on output slot 3 | |
6c06d0fe | 135 | TList *fListProfiles; //list of profile histos for z-vtx correction |
43093cfa | 136 | |
c1a78ad6 | 137 | TH1F *fHistNEvents; //!hist. for No. of events |
138 | ||
619e8980 | 139 | TH2F* fHistNtrEta16vsNtrEta1EvSel; //!hist. for Ntracklets in eta<1.6 vs. eta<1. |
140 | TH2F* fHistNtrEta05vsNtrEta1EvSel; //!hist. for Ntracklets in eta<0.5 vs. eta<1. | |
141 | TH2F* fHistNtrEta03vsNtrEta1EvSel; //!hist. for Ntracklets in eta<0.3 vs. eta<1. | |
142 | TH2F* fHistNtrEtaV0AvsNtrEta1EvSel; //!hist. for Ntracklets in eta-V0A vs. eta<1. | |
143 | TH2F* fHistNtrEtaV0MvsNtrEta1EvSel; //!hist. for Ntracklets in eta-V0M vs. eta<1. | |
b242bddf | 144 | TH2F* fHistNtrEtaV0AvsV0AEqEvSel; //!hist. for V0A raw mult vs V0A equalized multiplicity |
145 | TH2F* fHistNtrEtaV0MvsV0MEqEvSel; //!hist. for V0M raw mult vs V0M equalized multiplicity | |
619e8980 | 146 | TH2F* fHistNtrCorrEta1vsNtrRawEta1EvSel; //!hist. for Ntracklets in eta<1 with and w/o corrections |
b242bddf | 147 | TH2F* fHistMultCorrvsMultRawEvSel; //!hist. for multiplicity with and w/o corrections |
619e8980 | 148 | TH2F* fHistNtrEta16vsNtrEta1EvWithCand; //!hist. for Ntracklets in eta<1.6 vs. eta<1. for events with a candidate |
149 | TH2F* fHistNtrEta05vsNtrEta1EvWithCand; //!hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate | |
150 | TH2F* fHistNtrEta03vsNtrEta1EvWithCand; //!hist. for Ntracklets in eta<0.3 vs. eta<1. for events with a candidate | |
151 | TH2F* fHistNtrEtaV0AvsNtrEta1EvWithCand; //!hist. for Ntracklets in eta-V0A vs. eta<1. for events with a candidate | |
152 | TH2F* fHistNtrEtaV0MvsNtrEta1EvWithCand; //!hist. for Ntracklets in eta-V0M vs. eta<1. for events with a candidate | |
b242bddf | 153 | TH2F* fHistNtrEtaV0AvsV0AEqEvWithCand; //!hist. for V0A raw mult vs V0A equalized multiplicity for events with a candidate |
154 | TH2F* fHistNtrEtaV0MvsV0MEqEvWithCand; //!hist. for V0M raw mult vs V0M equalized multiplicity for events with a candidate | |
619e8980 | 155 | TH2F* fHistNtrCorrEta1vsNtrRawEta1EvWithCand; //!hist. for Ntracklets in eta<1 with and w/o corrections for events with a candidate |
b242bddf | 156 | TH2F* fHistMultCorrvsMultRawEvWithCand; //!hist. for multiplicity with and w/o corrections for events with a candidate |
619e8980 | 157 | TH2F* fHistNtrEta16vsNtrEta1EvWithD; //!hist. for Ntracklets in eta<1.6 vs. eta<1. for events with a candidate in D mass peak |
158 | TH2F* fHistNtrEta05vsNtrEta1EvWithD; //!hist. for Ntracklets in eta<0.5 vs. eta<1. for events with a candidate in D mass peak | |
159 | TH2F* fHistNtrEta03vsNtrEta1EvWithD; //!hist. for Ntracklets in eta<0.3 vs. eta<1. for events with a candidate in D mass peak | |
160 | TH2F* fHistNtrEtaV0AvsNtrEta1EvWithD; //!hist. for Ntracklets in eta-V0A vs. eta<1. for events with a candidate in D mass peak | |
161 | TH2F* fHistNtrEtaV0MvsNtrEta1EvWithD; //!hist. for Ntracklets in eta-V0M vs. eta<1. for events with a candidate in D mass peak | |
b242bddf | 162 | TH2F* fHistNtrEtaV0AvsV0AEqEvWithD; //!hist. for V0A raw mult vs V0A equalized multiplicity with a candidate in D mass peak |
163 | TH2F* fHistNtrEtaV0MvsV0MEqEvWithD; //!hist. for V0M raw mult vs V0M equalized multiplicity with a candidate in D mass peak | |
619e8980 | 164 | TH2F* fHistNtrCorrEta1vsNtrRawEta1EvWithD; //!hist. for Ntracklets in eta<1 with and w/o corrections for events with a candidate in D mass peak |
b242bddf | 165 | TH2F* fHistMultCorrvsMultRawEvWithD; //!hist. for multiplicity with and w/o corrections for events with a candidate in D mass peak |
619e8980 | 166 | |
c1a78ad6 | 167 | TH2F* fHistNtrVsZvtx; //! hist of ntracklets vs Zvertex |
168 | TH2F* fHistNtrCorrVsZvtx; //! hist of ntracklets vs Zvertex | |
169 | ||
11457f09 | 170 | TH2F* fHistNtrVsNchMC; //! hist of ntracklets vs Nch (Generated) |
171 | TH2F* fHistNtrCorrVsNchMC; //! hist of ntracklets vs Nch (Generated) | |
172 | TH2F* fHistNtrVsNchMCPrimary; //! hist of ntracklets vs Nch (Primary) | |
173 | TH2F* fHistNtrCorrVsNchMCPrimary; //! hist of ntracklets vs Nch (Primary) | |
174 | TH2F* fHistNtrVsNchMCPhysicalPrimary; //! hist of ntracklets vs Nch (Physical Primary) | |
175 | TH2F* fHistNtrCorrVsNchMCPhysicalPrimary; //! hist of ntracklets vs Nch (Physical Primary) | |
0c514eec | 176 | TH1F* fHistGenPrimaryParticlesInelGt0; //!hist. of geenrated multiplcity |
511c4e3e | 177 | TH3F* fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary; //! hist of Nch (generated) vs Nch (Primary) vs Nch (Physical Primary) |
11457f09 | 178 | |
619e8980 | 179 | TH1F* fHistNtrUnCorrPSSel; //! hist. of ntracklets for physics selection only selected events |
d22cf80e | 180 | TH1F* fHistNtrUnCorrPSTrigSel; //! hist. of ntracklets for physics selection + trigger name selected events |
181 | TH1F* fHistNtrUnCorrPSTrigPileUpSel; //! hist. of ntracklets for physics selection + trigger name + pileup selected events | |
182 | TH1F* fHistNtrUnCorrPSTrigPileUpVtxSel; //! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex selected events | |
183 | TH1F* fHistNtrUnCorrPSTrigPileUpVtxContSel; //! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib selected events | |
184 | TH1F* fHistNtrUnCorrPSTrigPileUpVtxRangeSel; //! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib-range selected events | |
185 | TH1F* fHistNtrUnCorrPSTrigPileUpVtxRangeCentrSel; //! hist. of ntracklets for physics selection + trigger name + pileup + with-vertex-contrib-range + centrality selected events | |
f73a90da | 186 | TH1F* fHistNtrUnCorrEvSel; //! hist. of ntracklets for selected events |
bba1a026 | 187 | TH1F* fHistNtrUnCorrEvWithCand; //! hist. of ntracklets for evnts with a candidate |
188 | TH1F* fHistNtrUnCorrEvWithD;//! hist. of ntracklets for evnts with a candidate in D mass peak | |
619e8980 | 189 | TH1F* fHistNtrCorrPSSel; //! hist. of ntracklets for physics selection only selected events |
c1a78ad6 | 190 | TH1F* fHistNtrCorrEvSel; //! hist. of ntracklets for selected events |
191 | TH1F* fHistNtrCorrEvWithCand; //! hist. of ntracklets for evnts with a candidate | |
192 | TH1F* fHistNtrCorrEvWithD;//! hist. of ntracklets for evnts with a candidate in D mass peak | |
193 | ||
0c514eec | 194 | |
43093cfa | 195 | TH3F *fPtVsMassVsMult; //! hist. of Pt vs Mult vs. mass ( |
196 | TH3F *fPtVsMassVsMultNoPid; //! hist. of Pt vs Mult vs. mass (no pid) | |
197 | TH3F *fPtVsMassVsMultUncorr; //! hist. of Pt vs Mult vs. mass (raw mult) | |
198 | TH3F *fPtVsMassVsMultPart; //! hist. of Pt vs Mult vs. mass (particle) | |
199 | TH3F *fPtVsMassVsMultAntiPart; //! hist. of Pt vs Mult vs. mass (antiparticle) | |
20550d50 | 200 | TH3F *fPtVsMassVsMultMC; //! hist. of Pt vs Mult vs. mass (MC true candidates before reconstruction) |
43093cfa | 201 | |
202 | THnSparseF *fHistMassPtImpPar[5];//! histograms for impact paramter studies | |
203 | ||
7826c36d | 204 | Double_t fUpmasslimit; //upper inv mass limit for histos |
205 | Double_t fLowmasslimit; //lower inv mass limit for histos | |
206 | Int_t fNMassBins; // nbins for invariant mass histos | |
43093cfa | 207 | |
208 | AliRDHFCuts *fRDCutsAnalysis; // Cuts for Analysis | |
209 | AliNormalizationCounter *fCounter; //!Counter for normalization | |
210 | AliNormalizationCounter *fCounterU; //!Counter for normalization, uncorr mult | |
211 | ||
212 | Bool_t fDoImpPar; //swicth for D impact parameter THnSparse | |
213 | Int_t fNImpParBins; // nunber of bins in impact parameter histos | |
7826c36d | 214 | Double_t fLowerImpPar; // lower limit in impact parameter (um) |
215 | Double_t fHigherImpPar; // higher limit in impact parameter (um) | |
43093cfa | 216 | |
217 | Bool_t fReadMC; //flag for access to MC | |
218 | Int_t fMCOption; // 0=keep all cand, 1=keep only signal, 2= keep only back | |
bba1a026 | 219 | Bool_t fisPPbData; // flag to run on pPb data (differen histogram bining) |
43093cfa | 220 | Bool_t fUseBit; // flag to use bitmask |
0d1e32a6 | 221 | Bool_t fSubtractTrackletsFromDau; // flag for subtracting D meson daughter contribution to N of tracklets |
0429d713 | 222 | Bool_t fKeepCorrPlots; // flag to look at the correlation of different estimators (eta ranges) |
3cca4c06 | 223 | |
224 | Bool_t fUseNchWeight; // weight on the MC on the generated multiplicity | |
225 | TH1F* fHistoMCNch; // weight histogram for the MC on the generated multiplicity | |
226 | TH1F* fHistoMeasNch; //! weight histogram on the true measured multiplicity | |
43093cfa | 227 | |
b97c5dc0 | 228 | TProfile* fMultEstimatorAvg[4]; //TProfile with mult vs. Z per period |
43093cfa | 229 | Double_t fRefMult; // refrence multiplcity (period b) |
230 | Int_t fPdgMeson; // pdg code of analyzed meson | |
231 | ||
20550d50 | 232 | Int_t fMultiplicityEstimator; // Definition of the multiplicity estimator: kNtrk10=0, kNtrk10to16=1, kVZERO=2 |
b242bddf | 233 | Int_t fMCPrimariesEstimator; // Definition of the primaries estimator eta range: |eta|<1.0=0, -1.6<|eta|<1.0=1, VZEROrange=2 |
234 | ||
235 | Int_t fDoVZER0ParamVertexCorr; // Flag to use the zvtx correction from (0=none, 1=usual d2h, 2=AliESDUtils for VZERO multiplicity) | |
43093cfa | 236 | |
b242bddf | 237 | ClassDef(AliAnalysisTaskSEDvsMultiplicity,14); // D vs. mult task |
43093cfa | 238 | }; |
239 | ||
240 | #endif |