]>
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(); | |
7826c36d | 39 | AliAnalysisTaskSEDvsMultiplicity(const char *name, Int_t pdgMeson, AliRDHFCuts* cuts); |
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; } |
bba1a026 | 59 | void SetIsPPbData(Bool_t flag=kTRUE){ fisPPbData=flag; } |
43093cfa | 60 | void SetUseBit(Bool_t use=kTRUE){fUseBit=use;} |
61 | void SetDoImpactParameterHistos(Bool_t doImp=kTRUE){fDoImpPar=doImp;} | |
62 | ||
63 | ||
64 | void SetMultiplVsZProfileLHC10b(TProfile* hprof){ | |
2d11aff8 | 65 | if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0]; |
66 | fMultEstimatorAvg[0]=new TProfile(*hprof); | |
43093cfa | 67 | } |
68 | void SetMultiplVsZProfileLHC10c(TProfile* hprof){ | |
2d11aff8 | 69 | if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1]; |
70 | fMultEstimatorAvg[1]=new TProfile(*hprof); | |
43093cfa | 71 | } |
72 | void SetMultiplVsZProfileLHC10d(TProfile* hprof){ | |
2d11aff8 | 73 | if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2]; |
74 | fMultEstimatorAvg[2]=new TProfile(*hprof); | |
43093cfa | 75 | } |
76 | void SetMultiplVsZProfileLHC10e(TProfile* hprof){ | |
2d11aff8 | 77 | if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3]; |
78 | fMultEstimatorAvg[3]=new TProfile(*hprof); | |
43093cfa | 79 | } |
f73a90da | 80 | void SetReferenceMultiplcity(Double_t rmu){fRefMult=rmu;} |
3cca4c06 | 81 | |
82 | // Nch weights on MC | |
83 | void UseMCNchWeight(Bool_t flag) { fUseNchWeight = flag; } | |
84 | void SetHistoNchWeight(TH1F *h){ | |
85 | if(fHistoMCNch) delete fHistoMCNch; | |
86 | fHistoMCNch = new TH1F(*h); | |
87 | } | |
88 | ||
0d1e32a6 | 89 | void SetSubtractTrackletsFromDaughters(Bool_t opt){fSubtractTrackletsFromDau=opt;} |
43093cfa | 90 | Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const; |
91 | ||
3cca4c06 | 92 | enum { kNtrk10=0, kNtrk10to16=1, kVZERO=2 }; |
93 | void SetMultiplicityEstimator(Int_t value){ fMultiplicityEstimator=value; } | |
94 | Int_t GetMultiplicityEstimator(){ return fMultiplicityEstimator; } | |
20550d50 | 95 | enum { kEta10=0, kEta10to16=1, kEtaVZERO=2 }; |
96 | void SetMCPrimariesEstimator(Int_t value){ fMCPrimariesEstimator=value; } | |
97 | Int_t GetMCPrimariesEstimator(){ return fMCPrimariesEstimator; } | |
3cca4c06 | 98 | |
43093cfa | 99 | // Implementation of interface methods |
100 | virtual void UserCreateOutputObjects(); | |
101 | virtual void Init(); | |
102 | virtual void LocalInit() {Init();} | |
103 | virtual void UserExec(Option_t *option); | |
104 | virtual void Terminate(Option_t *option); | |
105 | ||
106 | private: | |
107 | ||
108 | AliAnalysisTaskSEDvsMultiplicity(const AliAnalysisTaskSEDvsMultiplicity &source); | |
109 | AliAnalysisTaskSEDvsMultiplicity& operator=(const AliAnalysisTaskSEDvsMultiplicity& source); | |
110 | ||
111 | TProfile* GetEstimatorHistogram(const AliVEvent *event); | |
112 | void CreateImpactParameterHistos(); | |
3cca4c06 | 113 | void CreateMeasuredNchHisto(); |
20550d50 | 114 | void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Int_t countMult,Double_t nchWeight); |
43093cfa | 115 | |
116 | TList *fOutput; //! list send on output slot 1 | |
117 | TList *fListCuts; //list of cuts | |
118 | TList *fOutputCounters; //! list send on output slot 3 | |
6c06d0fe | 119 | TList *fListProfiles; //list of profile histos for z-vtx correction |
43093cfa | 120 | |
c1a78ad6 | 121 | TH1F *fHistNEvents; //!hist. for No. of events |
122 | ||
123 | TH2F* fHistNtrEta16vsNtrEta1; //!hist. for Ntracklets in eta<1.6 vs. eta<1. | |
124 | TH2F* fHistNtrCorrEta1vsNtrRawEta1; //!hist. for Ntracklets in eta<1 with and w/o corrections | |
125 | TH2F* fHistNtrVsZvtx; //! hist of ntracklets vs Zvertex | |
126 | TH2F* fHistNtrCorrVsZvtx; //! hist of ntracklets vs Zvertex | |
127 | ||
11457f09 | 128 | TH2F* fHistNtrVsNchMC; //! hist of ntracklets vs Nch (Generated) |
129 | TH2F* fHistNtrCorrVsNchMC; //! hist of ntracklets vs Nch (Generated) | |
130 | TH2F* fHistNtrVsNchMCPrimary; //! hist of ntracklets vs Nch (Primary) | |
131 | TH2F* fHistNtrCorrVsNchMCPrimary; //! hist of ntracklets vs Nch (Primary) | |
132 | TH2F* fHistNtrVsNchMCPhysicalPrimary; //! hist of ntracklets vs Nch (Physical Primary) | |
133 | TH2F* fHistNtrCorrVsNchMCPhysicalPrimary; //! hist of ntracklets vs Nch (Physical Primary) | |
0c514eec | 134 | TH1F* fHistGenPrimaryParticlesInelGt0; //!hist. of geenrated multiplcity |
511c4e3e | 135 | TH3F* fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary; //! hist of Nch (generated) vs Nch (Primary) vs Nch (Physical Primary) |
11457f09 | 136 | |
f73a90da | 137 | TH1F* fHistNtrUnCorrEvSel; //! hist. of ntracklets for selected events |
bba1a026 | 138 | TH1F* fHistNtrUnCorrEvWithCand; //! hist. of ntracklets for evnts with a candidate |
139 | TH1F* fHistNtrUnCorrEvWithD;//! hist. of ntracklets for evnts with a candidate in D mass peak | |
c1a78ad6 | 140 | TH1F* fHistNtrCorrEvSel; //! hist. of ntracklets for selected events |
141 | TH1F* fHistNtrCorrEvWithCand; //! hist. of ntracklets for evnts with a candidate | |
142 | TH1F* fHistNtrCorrEvWithD;//! hist. of ntracklets for evnts with a candidate in D mass peak | |
143 | ||
0c514eec | 144 | |
43093cfa | 145 | TH3F *fPtVsMassVsMult; //! hist. of Pt vs Mult vs. mass ( |
146 | TH3F *fPtVsMassVsMultNoPid; //! hist. of Pt vs Mult vs. mass (no pid) | |
147 | TH3F *fPtVsMassVsMultUncorr; //! hist. of Pt vs Mult vs. mass (raw mult) | |
148 | TH3F *fPtVsMassVsMultPart; //! hist. of Pt vs Mult vs. mass (particle) | |
149 | TH3F *fPtVsMassVsMultAntiPart; //! hist. of Pt vs Mult vs. mass (antiparticle) | |
20550d50 | 150 | TH3F *fPtVsMassVsMultMC; //! hist. of Pt vs Mult vs. mass (MC true candidates before reconstruction) |
43093cfa | 151 | |
152 | THnSparseF *fHistMassPtImpPar[5];//! histograms for impact paramter studies | |
153 | ||
7826c36d | 154 | Double_t fUpmasslimit; //upper inv mass limit for histos |
155 | Double_t fLowmasslimit; //lower inv mass limit for histos | |
156 | Int_t fNMassBins; // nbins for invariant mass histos | |
43093cfa | 157 | |
158 | AliRDHFCuts *fRDCutsAnalysis; // Cuts for Analysis | |
159 | AliNormalizationCounter *fCounter; //!Counter for normalization | |
160 | AliNormalizationCounter *fCounterU; //!Counter for normalization, uncorr mult | |
161 | ||
162 | Bool_t fDoImpPar; //swicth for D impact parameter THnSparse | |
163 | Int_t fNImpParBins; // nunber of bins in impact parameter histos | |
7826c36d | 164 | Double_t fLowerImpPar; // lower limit in impact parameter (um) |
165 | Double_t fHigherImpPar; // higher limit in impact parameter (um) | |
43093cfa | 166 | |
167 | Bool_t fReadMC; //flag for access to MC | |
168 | Int_t fMCOption; // 0=keep all cand, 1=keep only signal, 2= keep only back | |
bba1a026 | 169 | Bool_t fisPPbData; // flag to run on pPb data (differen histogram bining) |
43093cfa | 170 | Bool_t fUseBit; // flag to use bitmask |
0d1e32a6 | 171 | Bool_t fSubtractTrackletsFromDau; // flag for subtracting D meson daughter contribution to N of tracklets |
3cca4c06 | 172 | |
173 | Bool_t fUseNchWeight; // weight on the MC on the generated multiplicity | |
174 | TH1F* fHistoMCNch; // weight histogram for the MC on the generated multiplicity | |
175 | TH1F* fHistoMeasNch; //! weight histogram on the true measured multiplicity | |
43093cfa | 176 | |
177 | TProfile* fMultEstimatorAvg[4]; // TProfile with mult vs. Z per period | |
178 | Double_t fRefMult; // refrence multiplcity (period b) | |
179 | Int_t fPdgMeson; // pdg code of analyzed meson | |
180 | ||
20550d50 | 181 | Int_t fMultiplicityEstimator; // Definition of the multiplicity estimator: kNtrk10=0, kNtrk10to16=1, kVZERO=2 |
182 | Int_t fMCPrimariesEstimator; // Definition of the primaries estimator eta range: |eta|<1.0=0, -1.6<|eta|<1.0=1, VZEROrange=2 | |
43093cfa | 183 | |
bba1a026 | 184 | ClassDef(AliAnalysisTaskSEDvsMultiplicity,8); // D vs. mult task |
43093cfa | 185 | }; |
186 | ||
187 | #endif |