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