]>
Commit | Line | Data |
---|---|---|
19d77c98 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */ |
2 | /* See cxx source for full Copyright notice */ | |
3 | /* $Id$ */ | |
4 | ||
5 | // AliAnalysisTaskPhiFlow: | |
6 | // origin: Redmer Alexander Bertens (rbertens@nikhef.nl) | |
5725c281 | 7 | // analyis task for phi-meson reconstruction and estimation of v_n |
48077518 | 8 | |
9 | #ifndef ALIANALYSISTASKPHIFLOW_H | |
10 | #define ALIANALYSISTASKPHIFLOW_H | |
11 | ||
19d77c98 | 12 | class TH1F; |
13 | class TH2F; | |
14 | class TProfile; | |
15 | class AliESDEvent; | |
16 | class AliESDtrackCuts; | |
17 | class AliFlowTrackCuts; | |
18 | class AliFlowEvent; | |
19 | class AliFlowCandidateTrack; | |
48077518 | 20 | class AliFlowBayesianPID; |
5725c281 | 21 | class AliEventPoolManager; |
9fb90465 | 22 | class AliPIDCombined; |
19d77c98 | 23 | |
24 | #include "AliAnalysisTaskSE.h" | |
25 | ||
5725c281 | 26 | class AliPhiMesonHelperTrack : public TObject |
27 | { | |
28 | public: | |
29 | AliPhiMesonHelperTrack(Float_t eta, Float_t phi, Float_t p, Float_t px, Float_t py, Float_t pz, Float_t pt, Int_t charge) : fEta(eta), fPhi(phi), fp(p), fpX(px), fpY(py), fpZ(pz), fpT(pt), fCharge(charge) { } | |
30 | ~AliPhiMesonHelperTrack() {} | |
31 | virtual Double_t P() const { return fp; } | |
32 | virtual Double_t Px() const { return fpX; } | |
33 | virtual Double_t Py() const { return fpY; } | |
34 | virtual Double_t Pz() const { return fpZ; } | |
35 | virtual Double_t Pt() const { return fpT; } | |
36 | virtual Double_t Phi() const { return fPhi; } | |
37 | virtual Double_t Eta() const { return fEta; } | |
38 | virtual Int_t Charge() const { return fCharge; } | |
ffef9156 | 39 | void InitializeHelperTrack(Float_t eta, Float_t phi, Float_t p, Float_t px, Float_t py, Float_t pz, Float_t pt, Int_t charge) { fEta = eta; fPhi = phi; fp = p; fpX = px; fpY = py; fpZ = pz; fpT = pt; fCharge = charge; } |
5725c281 | 40 | private: |
41 | Float_t fEta; // eta | |
42 | Float_t fPhi; // phi | |
43 | Float_t fp; // p | |
44 | Float_t fpX; // pX | |
45 | Float_t fpY; // pY | |
46 | Float_t fpZ; // pZ | |
47 | Float_t fpT; // pT | |
48 | Int_t fCharge; // charge | |
5725c281 | 49 | ClassDef(AliPhiMesonHelperTrack, 1); // lightweight helper track for phi reconstruction |
50 | }; | |
51 | ||
19d77c98 | 52 | class AliAnalysisTaskPhiFlow : public AliAnalysisTaskSE |
53 | { | |
54 | public: | |
55 | AliAnalysisTaskPhiFlow(); | |
56 | AliAnalysisTaskPhiFlow(const char *name); | |
57 | virtual ~AliAnalysisTaskPhiFlow(); | |
5725c281 | 58 | Int_t SetDebugLevelPhiTask(Int_t debug) {fDebug = debug; return fDebug; } |
863bc87f | 59 | Bool_t SetIsMC(Bool_t ismc) {fIsMC = ismc; return fIsMC; } |
5725c281 | 60 | Bool_t UseEventMixing(Bool_t mix, Bool_t type) {fEventMixing = mix; fTypeMixing = type; return mix; } |
61 | Bool_t SetVZEROSubEvents(Bool_t v0) { fV0 = v0; return v0; } | |
48077518 | 62 | TH1F* BookHistogram(const char * name); |
863bc87f | 63 | TH2F* BookPIDHistogram(const char * name, Bool_t TPC); |
ffef9156 | 64 | TH1F* InitPtSpectraHistograms(Float_t nmin, Float_t nmax); |
48077518 | 65 | TH1F* BookPtHistogram(const char* name); |
66 | void AddPhiIdentificationOutputObjects(); | |
67 | virtual void UserCreateOutputObjects(); | |
5725c281 | 68 | AliEventPoolManager* InitializeEventMixing(); |
ffef9156 | 69 | void SetPtBins(Float_t bin[19], Int_t n) { for(Int_t i = 0; i < n+1; i++) fPtBins[i] = bin[i]; fNPtBins = n; } |
48077518 | 70 | template <typename T> Double_t InvariantMass(const T* track1, const T* track2) const; |
9fb90465 | 71 | // template <typename T> Double_t DeltaDipAngle(const T* track1, const T* track2) const; |
72 | // template <typename T> Bool_t CheckDeltaDipAngle(const T* track1, const T* track2) const; | |
48077518 | 73 | template <typename T> Bool_t CheckCandidateEtaPtCut(const T* track1, const T* track2) const; |
6940e1f0 | 74 | void SetCentralityParameters(Double_t min, Double_t max, const char* a, const char* b, Bool_t c, Bool_t d) { |
75 | fCentralityMin = min; | |
76 | fCentralityMax = max; | |
77 | fkCentralityMethodA = a; | |
78 | fkCentralityMethodB = b; | |
79 | fCentralityCut2010 = c; | |
80 | fCentralityCut2011 = d;} | |
9fb90465 | 81 | void SetCurrentCentralityBin(Double_t c) {fCentrality = c; } |
6940e1f0 | 82 | Double_t GetCenMin() const {return fCentralityMin; } |
83 | Double_t GetCenMax() const {return fCentralityMax; } | |
84 | const char* GetCentralityMethod() const {return fkCentralityMethodA; } | |
85 | void SetVertexZ(Float_t z) { fVertexRange = z; } | |
86 | Float_t GetVertexZ() const { return fVertexRange; } | |
9fb90465 | 87 | // void SetMaxDeltaDipAngleAndPt(Float_t a, Float_t pt) { fDeltaDipAngle = a; |
88 | // fDeltaDipPt = pt; | |
89 | // fApplyDeltaDipCut = kTRUE; }; | |
90 | // Float_t GetDeltaDipAngle() const {return fDeltaDipAngle; } | |
91 | // Float_t GetDeltaDipPt() const {return fDeltaDipPt; } | |
6940e1f0 | 92 | template <typename T> Bool_t EventCut(T* event); |
863bc87f | 93 | template <typename T> void PlotMultiplcities(const T* event) const; |
6940e1f0 | 94 | template <typename T> Bool_t CheckVertex(const T* event); |
95 | template <typename T> Bool_t CheckCentrality(T* event); | |
48077518 | 96 | void InitializeBayesianPID(AliAODEvent* event); |
97 | template <typename T> Bool_t PassesTPCbayesianCut(T* track) const; | |
863bc87f | 98 | Bool_t PassesDCACut(AliAODTrack* track) const; |
48077518 | 99 | Bool_t IsKaon(AliAODTrack* track) const; |
100 | template <typename T> Double_t PhiPt(const T* track_1, const T* track_2) const; | |
101 | template <typename T> void PtSelector(Int_t _track_type, const T* track_1, const T* track_2) const; | |
6940e1f0 | 102 | template <typename T> Bool_t PhiTrack(T* track) const; |
48077518 | 103 | template <typename T> void SetNullCuts(T* esd); |
104 | void PrepareFlowEvent(Int_t iMulti); | |
5725c281 | 105 | void VZEROSubEventAnalysis(); |
48077518 | 106 | virtual void UserExec(Option_t *option); |
9e58d58d | 107 | virtual void Exec(Option_t *); |
5725c281 | 108 | void ReconstructionWithEventMixing(TObjArray* MixingCandidates) const; |
48077518 | 109 | virtual void Terminate(Option_t *); |
48077518 | 110 | void SetPOICuts(AliFlowTrackCuts *cutsPOI) { fPOICuts = cutsPOI; } |
b4f29a18 | 111 | void SetRPCuts(AliFlowTrackCuts *cutsRP) { fCutsRP = cutsRP; } |
54dd223b | 112 | AliFlowTrackCuts* GetPOICuts() const {return fPOICuts;} |
113 | AliFlowTrackCuts* GetRPCuts() const {return fCutsRP;} | |
b4f29a18 | 114 | void SetPIDConfiguration(Double_t prob[7]) { for(Int_t i = 0; i < 7; i++) fPIDConfig[i] = prob[i]; } |
863bc87f | 115 | void GetPIDConfiguration(Double_t prob[7]) const {for(Int_t i = 0; i < 7; i++) prob[i] = fPIDConfig[i]; } |
116 | void SetPOIDCAXYZ(Double_t dca[5]) { for(Int_t i = 0; i < 5; i++) fDCAConfig[i] = dca[i]; } | |
117 | void GetPOIDCZXYZ(Double_t dca[5]) const { for(Int_t i = 0; i < 5; i++) dca[i] = fDCAConfig[i]; } | |
5725c281 | 118 | void SetMixingBins(Int_t c[20], Int_t v[20]) {for(Int_t i = 0; i < 20; i++) { fCentralityMixingBins[i] = c[i]; |
119 | fVertexMixingBins[i] = v[i]; } } | |
120 | void SetMixingParameters(Int_t p[3]) { for(Int_t i = 0; i < 3; i++) fMixingParameters[i] = p[i]; } | |
121 | void GetMixingParameters(Int_t p[3]) const { for(Int_t i = 0; i < 3; i++) p[i] = fMixingParameters[i]; } | |
863bc87f | 122 | void SetCandidateEtaAndPt(Double_t mineta, Double_t maxeta, Double_t minpt, Double_t maxpt) { fCandidateMinEta = mineta; |
123 | fCandidateMaxEta = maxeta; | |
124 | fCandidateMinPt = minpt; | |
125 | fCandidateMaxPt = maxpt; | |
126 | fCandidateEtaPtCut = kTRUE;} | |
0d91ada7 | 127 | void SetCandidateMinMaxY(Double_t min, Double_t max){ |
128 | fCandidateMinY = min; | |
129 | fCandidateMaxY = max; | |
130 | fCandidateYCut = kTRUE; | |
131 | } | |
863bc87f | 132 | void GetCandidateEtaAndPt(Double_t etapt[4]) const { etapt[0] = fCandidateMinEta; |
133 | etapt[1] = fCandidateMaxEta; | |
134 | etapt[2] = fCandidateMinPt; | |
135 | etapt[3] = fCandidateMaxPt; } | |
863bc87f | 136 | void SetCommonConstants(Int_t massBins, Double_t minMass, Double_t maxMass) { fMassBins = massBins; |
137 | fMinMass = minMass; | |
138 | fMaxMass= maxMass; } | |
139 | void IsMC(); | |
6940e1f0 | 140 | Bool_t SetQA(Bool_t qa) {fQA = qa; return fQA;} |
141 | void SetSkipEventSelection(Bool_t s) { | |
142 | fSkipEventSelection = s; | |
9fb90465 | 143 | fUsePidResponse = kTRUE; // bayesian pid object will require some event info |
144 | fCentrality = 5.;} // should be set by user, skipping event selection will also forego centrality selection | |
145 | void SetUsePidResponse(Bool_t s) {fUsePidResponse = s;} | |
19d77c98 | 146 | |
147 | private: | |
148 | ||
5725c281 | 149 | Int_t fDebug; // debug level (0 none, 1 fcn calls, 2 verbose) |
150 | Bool_t fIsMC; // use mc mode | |
151 | Bool_t fEventMixing; // use event mixing | |
152 | Bool_t fTypeMixing; // select type: kTRUE for unlike sign background, kFALSE for like sign background | |
153 | Bool_t fQA; // make qa plots | |
154 | Bool_t fV0; // use three subevents including vzero | |
b4f29a18 | 155 | Int_t fMassBins; // mass bins |
156 | Double_t fMinMass; // mass range | |
157 | Double_t fMaxMass; // mass range | |
158 | AliFlowTrackCuts *fCutsRP; // track cuts for reference particles | |
19d77c98 | 159 | AliFlowTrackCuts *fNullCuts; // dummy cuts for flow event tracks |
b4f29a18 | 160 | AliPIDResponse *fPIDResponse; //! pid response object |
161 | AliFlowEvent *fFlowEvent; //! flow events (one for each inv mass band) | |
48077518 | 162 | AliFlowBayesianPID *fBayesianResponse; //!PID response object |
b4f29a18 | 163 | TObjArray *fCandidates; // candidate array |
48077518 | 164 | Bool_t fCandidateEtaPtCut; // set eta and pt cut for candidate tracks and combinatorial background |
165 | Double_t fCandidateMinEta; // minimum eta for candidates | |
166 | Double_t fCandidateMaxEta; // maximum eta for candidates | |
167 | Double_t fCandidateMinPt; // minimum pt for candidates | |
168 | Double_t fCandidateMaxPt; // maximum pt for candidates | |
0d91ada7 | 169 | Bool_t fCandidateYCut; // y cut on candidates |
170 | Double_t fCandidateMinY; // min y value for candidate | |
171 | Double_t fCandidateMaxY; // max y value for canddiates | |
863bc87f | 172 | Double_t fPIDConfig[7]; // configure pid routine |
173 | Double_t fDCAConfig[5]; // configure dca routine | |
5725c281 | 174 | Int_t fMixingParameters[3]; // mixing: poolsize, mixing tracks, pool buffer |
175 | Int_t fCentralityMixingBins[20]; // configure centrality bins for event mixing | |
176 | Int_t fVertexMixingBins[20]; // configure vertex bins for event mixing | |
ffef9156 | 177 | Float_t fPtBins[19]; // pt bin borders |
178 | Int_t fNPtBins; // no of pt bins + 1 | |
48077518 | 179 | Double_t fCentrality; // event centrality |
5725c281 | 180 | Double_t fVertex; // event vertex z |
48077518 | 181 | AliAODEvent *fAOD; //! AOD oject |
5725c281 | 182 | AliEventPoolManager *fPoolManager; //! event pool manager |
19d77c98 | 183 | TList *fOutputList; // ! Output list |
184 | TH1F *fEventStats; // ! Histogram for event statistics | |
185 | TH1F *fCentralityPass; // ! QA histogram of events that pass centrality cut | |
186 | TH1F *fCentralityNoPass; //! QA histogram of events that do not pass centrality cut | |
187 | TH2F *fNOPID;//! QA histogram of TPC response of all charged particles | |
188 | TH2F *fPIDk;//! QA histogram of TPC response of kaons | |
863bc87f | 189 | TH2F *fNOPIDTOF; //! QA histo of TOF repsonse charged particles |
190 | TH2F *fPIDTOF; //! QA histo of TOF response kaons | |
5725c281 | 191 | TH1F *fInvMNP[18]; //! unlike sign kaon pairs |
192 | TH1F *fInvMNN[18]; //! like-sign kaon pairs | |
193 | TH1F *fInvMPP[18]; //! like-sign kaon pairs | |
194 | TH1F *fPtSpectra[18]; //! pt spectra | |
19d77c98 | 195 | TH1F *fPtP; //! QA histogram of p_t distribution of positive particles |
196 | TH1F *fPtN; //! QA histogram of p_t distribution of negative particles | |
197 | TH1F *fPtKP; //! QA histogram of p_t distribution of positive kaons | |
198 | TH1F *fPtKN; //! QA histogram of p_t distribution of negative kaons | |
1164b0ff | 199 | TH2F *fMultCorAfterCuts; //! QA profile global and tpc multiplicity after outlier cut |
200 | TH2F *fMultvsCentr; //! QA profile of centralty vs multiplicity | |
6940e1f0 | 201 | Double_t fCentralityMin; // lower bound of cenrality bin |
202 | Double_t fCentralityMax; // upper bound of centrality bin | |
203 | const char *fkCentralityMethodA; // method used to determine centrality, default | |
204 | const char *fkCentralityMethodB; // method used to determine centrality, fallback | |
205 | Bool_t fCentralityCut2010; // cut away the multiplicity outliers 2010 | |
206 | Bool_t fCentralityCut2011; // cut away the multiplicity outliers 2011 | |
b4f29a18 | 207 | AliFlowTrackCuts *fPOICuts; // cuts for particles of interest (flow package) |
6940e1f0 | 208 | Float_t fVertexRange; // absolute value of maximum distance of vertex along the z-axis |
19d77c98 | 209 | TH1F *fPhi; //! QA plot of azimuthal distribution of tracks used for event plane estimation |
210 | TH1F *fPt; //! QA plot of p_t sectrum of tracks used for event plane estimation | |
211 | TH1F *fEta; //! QA plot of eta distribution of tracks used for event plane estimation | |
19d77c98 | 212 | TH1F *fVZEROA; //! QA plot vzeroa multiplicity (all tracks in event) |
213 | TH1F *fVZEROC; //! QA plot vzeroc multiplicity (all tracks in event) | |
214 | TH1F *fTPCM; //! QA plot TPC multiplicity (tracks used for event plane estimation) | |
9fb90465 | 215 | // Float_t fDeltaDipAngle; // absolute value of delta dip angle to be excluded |
216 | // Float_t fDeltaDipPt; // upper value of pt range in which delta dip angle must be applied | |
217 | // Bool_t fApplyDeltaDipCut; // enforce delta dip cut | |
863bc87f | 218 | TH2F *fDCAAll;//! qa dca of all charged particles |
8a50daf6 | 219 | TH1F *fDCAXYQA; //! qa plot of dca xz |
220 | TH1F *fDCAZQA; //!qa plot of dca z | |
863bc87f | 221 | TH2F *fDCAPrim; //!dca of primaries (mc) or kaons (data) |
222 | TH2F *fDCASecondaryWeak; //! dca of weak (mc) | |
223 | TH2F *fDCAMaterial; //!dca material (mc) all (data) | |
5725c281 | 224 | TProfile *fSubEventDPhiv2; //! subevent resolution info for v2 |
ffef9156 | 225 | TProfile *fV0Data[18][2]; //! profiles for vzero vn(minv) |
6940e1f0 | 226 | Bool_t fSkipEventSelection;// skip event selection and set bayesian pid object to MC mode |
9fb90465 | 227 | Bool_t fUsePidResponse;//use pid response instead of aliflowbayesianpid object for pid |
228 | AliPIDCombined* fPIDCombined; // pid combined | |
48077518 | 229 | AliAnalysisTaskPhiFlow(const AliAnalysisTaskPhiFlow&); // Not implemented |
230 | AliAnalysisTaskPhiFlow& operator=(const AliAnalysisTaskPhiFlow&); // Not implemented | |
0d91ada7 | 231 | void MakeTrack(Double_t, Double_t, Double_t, Double_t, Int_t , Int_t[], Double_t p = 0., Double_t pz = 0.) const; |
863bc87f | 232 | |
6940e1f0 | 233 | ClassDef(AliAnalysisTaskPhiFlow, 7); |
19d77c98 | 234 | }; |
235 | ||
236 | #endif | |
237 | ||
238 | ||
b4f29a18 | 239 |