AliPhysics  7f2a7c4 (7f2a7c4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskPhiFlowDev.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 // AliAnalysisTaskPhiFlow:
6 // origin: Redmer Alexander Bertens (rbertens@nikhef.nl)
7 // analyis task for phi-meson reconstruction and estimation of v_n
8 
9 #ifndef ALIANALYSISTASKPHIFLOW_H
10 #define ALIANALYSISTASKPHIFLOW_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 #include "AliFlowEventCuts.h"
26 
27 class AliPhiMesonHelperTrack : public TObject
28 {
29 public:
30  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) { }
32  virtual Double_t P() const { return fp; }
33  virtual Double_t Px() const { return fpX; }
34  virtual Double_t Py() const { return fpY; }
35  virtual Double_t Pz() const { return fpZ; }
36  virtual Double_t Pt() const { return fpT; }
37  virtual Double_t Phi() const { return fPhi; }
38  virtual Double_t Eta() const { return fEta; }
39  virtual Int_t Charge() const { return fCharge; }
40  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; }
41 private:
42  Float_t fEta; // eta
43  Float_t fPhi; // phi
44  Float_t fp; // p
45  Float_t fpX; // pX
46  Float_t fpY; // pY
47  Float_t fpZ; // pZ
48  Float_t fpT; // pT
49  Int_t fCharge; // charge
50  ClassDef(AliPhiMesonHelperTrack, 1); // lightweight helper track for phi reconstruction
51 };
52 
54 {
55 public:
57  AliAnalysisTaskPhiFlow(const char *name);
58  virtual ~AliAnalysisTaskPhiFlow();
59  Int_t SetDebugLevelPhiTask(Int_t debug) {fDebug = debug; return fDebug; }
60  Bool_t SetIsMC(Bool_t ismc) {fIsMC = ismc; return fIsMC; }
61  Bool_t UseEventMixing(Bool_t mix, Bool_t type) {fEventMixing = mix; fTypeMixing = type; return mix; }
62  Bool_t SetVZEROSubEvents(Bool_t v0) { fV0 = v0; return v0; }
63  TH1F* BookHistogram(const char * name);
64  TH2F* BookPIDHistogram(const char * name, Bool_t TPC);
65  TH1F* InitPtSpectraHistograms(Float_t nmin, Float_t nmax);
66  TH1F* BookPtHistogram(const char* name);
68  virtual void UserCreateOutputObjects();
69  AliEventPoolManager* InitializeEventMixing();
70  void SetPtBins(Float_t bin[19], Int_t n) { for(Int_t i = 0; i < n+1; i++) fPtBins[i] = bin[i]; fNPtBins = n; }
71  template <typename T> Double_t InvariantMass(const T* track1, const T* track2) const;
72 // template <typename T> Double_t DeltaDipAngle(const T* track1, const T* track2) const;
73 // template <typename T> Bool_t CheckDeltaDipAngle(const T* track1, const T* track2) const;
74  template <typename T> Bool_t CheckCandidateEtaPtCut(const T* track1, const T* track2) const;
80 // void SetMaxDeltaDipAngleAndPt(Float_t a, Float_t pt) { fDeltaDipAngle = a;
81 // fDeltaDipPt = pt;
82 // fApplyDeltaDipCut = kTRUE; };
83 // Float_t GetDeltaDipAngle() const {return fDeltaDipAngle; }
84 // Float_t GetDeltaDipPt() const {return fDeltaDipPt; }
85  template <typename T> void PlotMultiplcities(const T* event) const;
87  template <typename T> Bool_t PassesTPCbayesianCut(T* track) const;
88  Bool_t PassesDCACut(AliAODTrack* track) const;
89  Bool_t IsKaon(AliAODTrack* track) const;
90  template <typename T> Double_t PhiPt(const T* track_1, const T* track_2) const;
91  template <typename T> void PtSelector(Int_t _track_type, const T* track_1, const T* track_2) const;
92  template <typename T> void SetNullCuts(T* esd);
93  void PrepareFlowEvent(Int_t iMulti);
94  void VZEROSubEventAnalysis();
95  virtual void UserExec(Option_t *option);
96  virtual void Exec(Option_t *);
97  void ReconstructionWithEventMixing(TObjArray* MixingCandidates) const;
98  virtual void Terminate(Option_t *);
99  void SetPOICuts(AliFlowTrackCuts *cutsPOI) { fPOICuts = cutsPOI; }
100  void SetRPCuts(AliFlowTrackCuts *cutsRP) { fCutsRP = cutsRP; }
101  void SetEventCuts(AliFlowEventCuts* cutsEvent) { fCutsEvent = cutsEvent; }
103  AliFlowTrackCuts* GetRPCuts() const {return fCutsRP;}
104  void SetPIDConfiguration(Double_t prob[7]) { for(Int_t i = 0; i < 7; i++) fPIDConfig[i] = prob[i]; }
105  void GetPIDConfiguration(Double_t prob[7]) const {for(Int_t i = 0; i < 7; i++) prob[i] = fPIDConfig[i]; }
106  void SetPOIDCAXYZ(Double_t dca[5]) { for(Int_t i = 0; i < 5; i++) fDCAConfig[i] = dca[i]; }
107  void GetPOIDCZXYZ(Double_t dca[5]) const { for(Int_t i = 0; i < 5; i++) dca[i] = fDCAConfig[i]; }
108  void SetMixingBins(Int_t c[20], Int_t v[20]) {for(Int_t i = 0; i < 20; i++) { fCentralityMixingBins[i] = c[i];
109  fVertexMixingBins[i] = v[i]; } }
110  void SetMixingParameters(Int_t p[3]) { for(Int_t i = 0; i < 3; i++) fMixingParameters[i] = p[i]; }
111  void GetMixingParameters(Int_t p[3]) const { for(Int_t i = 0; i < 3; i++) p[i] = fMixingParameters[i]; }
112  void SetCandidateEtaAndPt(Double_t mineta, Double_t maxeta, Double_t minpt, Double_t maxpt) { fCandidateMinEta = mineta;
113  fCandidateMaxEta = maxeta;
114  fCandidateMinPt = minpt;
115  fCandidateMaxPt = maxpt;
116  fCandidateEtaPtCut = kTRUE;}
117  void GetCandidateEtaAndPt(Double_t etapt[4]) const { etapt[0] = fCandidateMinEta;
118  etapt[1] = fCandidateMaxEta;
119  etapt[2] = fCandidateMinPt;
120  etapt[3] = fCandidateMaxPt; }
122  fMinMass = minMass;
123  fMaxMass= maxMass; }
124  void IsMC();
126  fQA = qa;
127  if(fCutsEvent) fCutsEvent->SetQA(kTRUE);
128  if(fCutsRP) fCutsRP->SetQA(kTRUE);
129  if(fPOICuts) fPOICuts->SetQA(kTRUE);
130  return fQA;}
132  if (fCutsEvent) delete fCutsEvent;
133  fCutsEvent = 0x0;
134  fUsePidResponse = kTRUE; // bayesian pid object will require some event info
135  fCentrality = 5.;} // should be set by user, skipping event selection will also forego centrality selection
138 
139 private:
140 
141  Int_t fDebug; // debug level (0 none, 1 fcn calls, 2 verbose)
142  Bool_t fIsMC; // use mc mode
143  Bool_t fEventMixing; // use event mixing
144  Bool_t fTypeMixing; // select type: kTRUE for unlike sign background, kFALSE for like sign background
145  Bool_t fQA; // make qa plots
146  Bool_t fV0; // use three subevents including vzero
147  Int_t fMassBins; // mass bins
148  Double_t fMinMass; // mass range
149  Double_t fMaxMass; // mass range
150  AliFlowTrackCuts *fCutsRP; // track cuts for reference particles
151  AliFlowEventCuts *fCutsEvent; // event cuts
152  AliFlowTrackCuts *fNullCuts; // dummy cuts for flow event tracks
153  AliPIDResponse *fPIDResponse;
156  TObjArray *fCandidates; // candidate array
157  Bool_t fCandidateEtaPtCut; // set eta and pt cut for candidate tracks and combinatorial background
158  Double_t fCandidateMinEta; // minimum eta for candidates
159  Double_t fCandidateMaxEta; // maximum eta for candidates
160  Double_t fCandidateMinPt; // minimum pt for candidates
161  Double_t fCandidateMaxPt; // maximum pt for candidates
162  Double_t fPIDConfig[7]; // configure pid routine
163  Double_t fDCAConfig[5]; // configure dca routine
164  Int_t fMixingParameters[3]; // mixing: poolsize, mixing tracks, pool buffer
165  Int_t fCentralityMixingBins[20]; // configure centrality bins for event mixing
166  Int_t fVertexMixingBins[20]; // configure vertex bins for event mixing
167  Float_t fPtBins[19]; // pt bin borders
168  Int_t fNPtBins; // no of pt bins + 1
169  Double_t fCentrality; // event centrality
170  Double_t fVertex; // event vertex z
171  AliAODEvent *fAOD;
172  AliEventPoolManager *fPoolManager;
173  TList *fOutputList; // ! Output list
174  TH1F *fEventStats; // ! Histogram for event statistics
175  TH1F *fCentralityPass; // ! QA histogram of events that pass centrality cut
176  TH1F *fCentralityNoPass;
177  TH2F *fNOPID;
178  TH2F *fPIDk;
179  TH2F *fNOPIDTOF;
180  TH2F *fPIDTOF;
181  TH1F *fInvMNP[18];
182  TH1F *fInvMNN[18];
183  TH1F *fInvMPP[18];
184  TH1F *fPtSpectra[18];
185  TH1F *fPtP;
186  TH1F *fPtN;
187  TH1F *fPtKP;
188  TH1F *fPtKN;
190  TH2F *fMultvsCentr;
191  AliFlowTrackCuts *fPOICuts; // cuts for particles of interest (flow package)
192  TH1F *fPhi;
193  TH1F *fPt;
194  TH1F *fEta;
195  TH1F *fVZEROA;
196  TH1F *fVZEROC;
197  TH1F *fTPCM;
198 // Float_t fDeltaDipAngle; // absolute value of delta dip angle to be excluded
199 // Float_t fDeltaDipPt; // upper value of pt range in which delta dip angle must be applied
200 // Bool_t fApplyDeltaDipCut; // enforce delta dip cut
201  TH2F *fDCAAll;
202  TH1F *fDCAXYQA;
203  TH1F *fDCAZQA;
204  TH2F *fDCAPrim;
206  TH2F *fDCAMaterial;
207  TProfile *fSubEventDPhiv2;
208  TProfile *fV0Data[18][2];
209  Bool_t fUsePidResponse;//use pid response instead of aliflowbayesianpid object for pid
210  Bool_t fUseTrackCutsPID;//use pid directly from aliflowtrackcuts
211  AliPIDCombined* fPIDCombined; // pid combined
212  AliAnalysisTaskPhiFlow(const AliAnalysisTaskPhiFlow&); // Not implemented
213  AliAnalysisTaskPhiFlow& operator=(const AliAnalysisTaskPhiFlow&); // Not implemented
214  void MakeTrack(Double_t, Double_t, Double_t, Double_t, Int_t , Int_t[]) const;
215 
217 };
218 
219 #endif
220 
221 
222 
Int_t charge
virtual Double_t Pt() const
Bool_t PassesTPCbayesianCut(T *track) const
TProfile * fV0Data[18][2]
subevent resolution info for v2
double Double_t
Definition: External.C:58
TH2F * fDCASecondaryWeak
dca of primaries (mc) or kaons (data)
TH1F * fPtKP
QA histogram of p_t distribution of negative particles.
Definition: External.C:236
AliFlowEvent * fFlowEvent
pid response object
void ReconstructionWithEventMixing(TObjArray *MixingCandidates) const
Double_t PhiPt(const T *track_1, const T *track_2) const
TH2F * fPIDk
QA histogram of TPC response of all charged particles.
void SetCurrentCentralityBin(Double_t c)
TH1F * fPtKN
QA histogram of p_t distribution of positive kaons.
void SetCentralityParameters(Double_t min, Double_t max, AliFlowEventCuts::refMultMethod method)
TH2F * fDCAPrim
qa plot of dca z
void PlotMultiplcities(const T *event) const
TH2F * fDCAMaterial
dca of weak (mc)
TCanvas * c
Definition: TestFitELoss.C:172
TH1F * fPtSpectra[18]
like-sign kaon pairs
TH1F * fVZEROC
QA plot vzeroa multiplicity (all tracks in event)
Double_t InvariantMass(const T *track1, const T *track2) const
TH2F * fPIDTOF
QA histo of TOF repsonse charged particles.
AliFlowTrackCuts * GetRPCuts() const
void SetPOICuts(AliFlowTrackCuts *cutsPOI)
virtual void SetCentralityPercentileRange(Float_t min, Float_t max)
UShort_t T(UShort_t m, UShort_t t)
Definition: RingBits.C:60
void SetPOIDCAXYZ(Double_t dca[5])
TH1F * fPt
QA plot of azimuthal distribution of tracks used for event plane estimation.
virtual void Exec(Option_t *)
void GetMixingParameters(Int_t p[3]) const
int Int_t
Definition: External.C:63
Bool_t PassesDCACut(AliAODTrack *track) const
void PrepareFlowEvent(Int_t iMulti)
float Float_t
Definition: External.C:68
virtual Double_t Pz() const
Int_t method
void GetPIDConfiguration(Double_t prob[7]) const
virtual Double_t P() const
TH1F * fVZEROA
QA plot of eta distribution of tracks used for event plane estimation.
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)
virtual Double_t Eta() const
TH2F * fMultvsCentr
QA profile global and tpc multiplicity after outlier cut.
TH1F * fEta
QA plot of p_t sectrum of tracks used for event plane estimation.
ClassDef(AliAnalysisTaskPhiFlow, 9)
TH1F * fInvMNN[18]
unlike sign kaon pairs
AliEventPoolManager * InitializeEventMixing()
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)
void SetEventCuts(AliFlowEventCuts *cutsEvent)
virtual Double_t Px() const
TH2F * fMultCorAfterCuts
QA histogram of p_t distribution of negative kaons.
TH1F * fDCAZQA
qa plot of dca xz
Bool_t fUsePidResponse
profiles for vzero vn(minv)
TObjArray * fCandidates
PID response object.
AliFlowTrackCuts * fPOICuts
QA profile of centralty vs multiplicity.
TH1F * fInvMNP[18]
QA histo of TOF response kaons.
Bool_t CheckCandidateEtaPtCut(const T *track1, const T *track2) const
void SetRPCuts(AliFlowTrackCuts *cutsRP)
virtual Double_t Phi() const
void SetQA(Bool_t b=kTRUE)
void InitializeBayesianPID(AliAODEvent *event)
void SetCommonConstants(Int_t massBins, Double_t minMass, Double_t maxMass)
TH1F * fPtN
QA histogram of p_t distribution of positive particles.
TH1F * BookHistogram(const char *name)
AliFlowBayesianPID * fBayesianResponse
flow events (one for each inv mass band)
void GetCandidateEtaAndPt(Double_t etapt[4]) const
ClassDef(AliPhiMesonHelperTrack, 1)
Double_t minMass
static AliFlowEventCuts * StandardCuts()
TH1F * InitPtSpectraHistograms(Float_t nmin, Float_t nmax)
void SetCandidateEtaAndPt(Double_t mineta, Double_t maxeta, Double_t minpt, Double_t maxpt)
void SetCentralityPercentileMethod(refMultMethod m)
TH1F * fDCAXYQA
qa dca of all charged particles
virtual Int_t Charge() const
TH2F * fNOPIDTOF
QA histogram of TPC response of kaons.
const char Option_t
Definition: External.C:48
Bool_t IsKaon(AliAODTrack *track) const
TH2F * fDCAAll
QA plot TPC multiplicity (tracks used for event plane estimation)
Double_t maxMass
TList * fOutputList
event pool manager
bool Bool_t
Definition: External.C:53
virtual void Terminate(Option_t *)
void SetPIDConfiguration(Double_t prob[7])
TProfile * fSubEventDPhiv2
dca material (mc) all (data)
void GetPOIDCZXYZ(Double_t dca[5]) const
TH1F * BookPtHistogram(const char *name)
TH1F * fTPCM
QA plot vzeroc multiplicity (all tracks in event)
TH2F * BookPIDHistogram(const char *name, Bool_t TPC)
void SetMixingBins(Int_t c[20], Int_t v[20])
Bool_t UseEventMixing(Bool_t mix, Bool_t type)
virtual void UserExec(Option_t *option)
AliEventPoolManager * fPoolManager
AOD oject.
virtual Double_t Py() const
AliFlowTrackCuts * GetPOICuts() const
TH1F * fInvMPP[18]
like-sign kaon pairs
AliAnalysisTaskPhiFlow & operator=(const AliAnalysisTaskPhiFlow &)
void SetQA(Bool_t b=kTRUE)
Int_t SetDebugLevelPhiTask(Int_t debug)
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.
void MakeTrack(Double_t, Double_t, Double_t, Double_t, Int_t, Int_t[], Double_t p=0., Double_t pz=0.) const
void SetPtBins(Float_t bin[19], Int_t n)