]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/AliLeadingV0Correlation.h
Merge branch 'TPCdev'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / AliLeadingV0Correlation.h
CommitLineData
9bcef488 1/* Leading Charged Track+V0 Correlation.(Works for Real,Monte Carlo Data)
2 * Sandun Jayarathna
3 * University of Houston
4 * sandun.pahula.hewage@cern.ch
5 *****************************************************************************************/
ff0805a7 6
5b607771 7#ifndef SANDUNQAH
8#define SANDUNQAH
ff0805a7 9
10#include "AliAnalysisTask.h"
ff0805a7 11#include "TString.h"
12#include "AliVParticle.h"
13#include "AliLog.h"
14#include "AliPID.h"
da6ac661 15#include "THnSparse.h"
5b607771 16#include "TH1.h"
ff0805a7 17
18class TList;
ff0805a7 19class AliAODEvent;
20class AliEventPoolManager;
ff0805a7 21class AliVParticle;
22class AliPIDResponse;
23class AliPID;
24class AliAODv0;
da6ac661 25class AliAnalyseLeadingTrackUE;
ff0805a7 26
27
28#ifndef ALIANALYSISTASKSEH
29#include "AliAnalysisTaskSE.h"
30#endif
31
32//---------------------------------------------------------------------------------------
33class AliLeadingV0Correlation : public AliAnalysisTaskSE {
34public:
35 AliLeadingV0Correlation();
36 AliLeadingV0Correlation(const char *name);
37 virtual ~AliLeadingV0Correlation();
38
39 virtual void UserCreateOutputObjects();
40 virtual void UserExec(Option_t *option);
41 virtual void Terminate(Option_t *);
42
43 void SetMaxNEventsInPool(Int_t events){fPoolMaxNEvents=events;}
44 void SetMinNTracksInPool(Int_t tracks){fPoolMinNTracks=tracks;}
45 void SetMinEventsToMix(Int_t events){fMinEventsToMix=events;}
46
47 void SetPoolPVzBinLimits(Int_t Nzvtxbins,const Double_t *ZvtxBins){
48 fNzVtxBins = Nzvtxbins;
49 for(int ix = 0;ix<fNzVtxBins+1;ix++){fZvtxBins[ix] = ZvtxBins[ix];}
50 }
51
52 void SetPoolCentBinLimits(Int_t Ncentbins,const Double_t *CentBins){
53 fNCentBins = Ncentbins;
54 for(int ix = 0;ix<fNCentBins+1;ix++){fCentBins[ix] = CentBins[ix];}
55 }
56
57 void SetCollidingSystem(TString system){fcollidingSys = system;}
58 void SetPrimeryVertexCut(Double_t pvzcut){fpvzcut = pvzcut;}
ff0805a7 59 void SetFilterBit(UInt_t filterBit){fFilterBit = filterBit;}
ff0805a7 60 void SetMCAnalysis(Bool_t aAnalysisMC){fAnalysisMC=aAnalysisMC;}
da6ac661 61 void SetCase(Int_t aCase){fCase=aCase;}
da6ac661 62 void SetRemoveAutoCorr(Bool_t aRemoveAutoCorr){fRemoveAutoCorr=aRemoveAutoCorr;}
9bcef488 63 void SetCutRap(Double_t aRapidityCut){fRapidityCut=aRapidityCut;}
da6ac661 64 void SetV0Radius(Double_t aV0radius){fV0radius=aV0radius;}
65 void SetV0PostoPVz(Double_t aV0PostoPVz){fV0PostoPVz=aV0PostoPVz;}
66 void SetV0NegtoPVz(Double_t aV0NegtoPVz){fV0NegtoPVz=aV0NegtoPVz;}
67 void SetDCAV0Daughters(Double_t aDCAV0Daughters){fDCAV0Daughters=aDCAV0Daughters;}
68 void SetCPAK0(Double_t aCPAK0){fCPAK0=aCPAK0;}
69 void SetCPALam(Double_t aCPALam){fCPALam=aCPALam;}
70 void SetRejectLamK0(Double_t aRejectLamK0){fRejectLamK0=aRejectLamK0;}
71 void SetRejectK0Lam(Double_t aRejectK0Lam){fRejectK0Lam=aRejectK0Lam;}
72 void SetSigmaPID(Double_t aSigmaPID){fSigmaPID=aSigmaPID;}
73 void SetCTK0(Double_t aCutCTK0){fCutCTK0=aCutCTK0;}
74 void SetCTLa(Double_t aCutCTLa){fCutCTLa=aCutCTLa;}
75 void SetMassCutK0(Double_t aMassCutK0){fMassCutK0=aMassCutK0;}
76 void SetMassCutLa(Double_t aMassCutLambda){fMassCutLa=aMassCutLambda;}
5b607771 77 void SetTrigLow(Double_t aTriglow){fTriglow=aTriglow;}
78 void SetTrigHigh(Double_t aTrighigh){fTrighigh=aTrighigh;}
ff0805a7 79
80private:
9bcef488 81 AliLeadingV0Correlation(const AliLeadingV0Correlation &det);
82 AliLeadingV0Correlation& operator=(const AliLeadingV0Correlation &det);
83
ff0805a7 84 Bool_t IsAcseptedDaughterTrack(const AliAODTrack *itrack);
da6ac661 85 Bool_t IsAcseptedV0(const AliAODv0* aodV0, const AliAODTrack* myTrackPos, const AliAODTrack* myTrackNeg);
86 Bool_t IsAcseptedK0(Double_t v0rad,
87 Double_t dcaptp,
88 Double_t dcantp,
89 Double_t dcav0d,
90 Double_t cpa,
91 Double_t massLa,
92 Double_t massALa);
93 Bool_t IsAcseptedLA(Double_t v0rad,
94 Double_t dcaptp,
95 Double_t dcantp,
96 Double_t dcav0d,
97 Double_t cpa,
98 Double_t massK0);
ff0805a7 99 Bool_t IsK0InvMass(const Double_t mass)const;
100 Bool_t IsLambdaInvMass(const Double_t mass) const;
da6ac661 101 Double_t RangePhi(Double_t DPhi);
102 Bool_t IsTrackFromV0(AliAODTrack* track);
103 void FillCorrelationSibling(Double_t MultipOrCent,
104 TObjArray*triggerArray,TObjArray*selectedV0Array,
105 THnSparse*triggerHist,THnSparse*associateHist);
106 void FillCorrelationMixing(Double_t MultipOrCentMix,Double_t pvxMix,
107 Double_t poolmax,Double_t poolmin,
108 TObjArray*triggerArray,TObjArray*selectedV0Array,
109 THnSparse*triggerHist,THnSparse*associateHist);
110 Bool_t IsFeedDownV0(UInt_t lIdxPosV0,
111 UInt_t lIdxNegV0,
112 Double_t lInvMassXiMinus,
113 Double_t lInvMassXiPlus,
114 TH1F*HistXiMinus);
115
116 AliAODEvent * fAODEvent; // AOD Event
117 AliEventPoolManager * fPoolMgr; // event pool manager for Event Mixing
ff0805a7 118 AliPIDResponse * fPIDResponse; // PID response
da6ac661 119 AliAnalyseLeadingTrackUE * fAnalyseUE; // Leading Track Underling Event
ff0805a7 120
121 Int_t fPoolMaxNEvents; // set maximum number of events in the pool
122 Int_t fPoolMinNTracks; // set minimum number of tracks in the pool
123 Int_t fMinEventsToMix; // set the minimum number of events want to mix
124 Int_t fNzVtxBins; // number of z vrtx bins
125 Double_t fZvtxBins[100]; // [fNzVtxBinsDim]
126 Int_t fNCentBins; // number of centrality bins
127 Double_t fCentBins[100]; // [fNCentBinsDim]
128
bf855ed5 129 TString fcollidingSys; // "PP" or "PbPb"
ff0805a7 130 Double_t fpvzcut; // PVz cut of event
131 Double_t fTrackEtaCut; // Eta cut on particles
132 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
da6ac661 133 Bool_t fAnalysisMC; // MC or Not
134 Int_t fCase; // Case number
da6ac661 135 Bool_t fRemoveAutoCorr; // 1Remove or 0 Not Remove
136
ff0805a7 137 Double_t fRapidityCut; // Rapidity cut V0
da6ac661 138 Double_t fV0radius; // Topological selection for systamatics
139 Double_t fV0PostoPVz; // Topological selection for systamatics
140 Double_t fV0NegtoPVz; // Topological selection for systamatics
141 Double_t fDCAV0Daughters; // Topological selection for systamatics
142 Double_t fCPAK0; // Topological selection for systamatics
143 Double_t fCPALam; // Topological selection for systamatics
144 Double_t fRejectLamK0; // selection for systamatics
145 Double_t fRejectK0Lam; // selection for systamatics
146 Double_t fSigmaPID; // selection for systamatics
147 Double_t fCutCTK0; // selection for systamatics
148 Double_t fCutCTLa; // selection for systamatics
ff0805a7 149
da6ac661 150 Double_t fMassCutK0; // selection for systamatics
151 Double_t fMassCutLa; // selection for systamatics
5b607771 152 Double_t fTriglow; // selection for systamatics
153 Double_t fTrighigh;// selection for systamatics
ff0805a7 154
da6ac661 155 Bool_t fUseChargeHadrons; // Only pi,k,and proton
156 Double_t fPtMin; // 0.15
ff0805a7 157
158
da6ac661 159 TList * fOutputList; // Output list
9bcef488 160
5b607771 161 TH1F *fHist_Mult_B4_Trg_Sel; //! multiplicity distribution
162 TH1F *fHist_Mult_Af_Trg_Sel; //! multiplicity distribution
163 TH1F *fHist_Mult_PVz_Cut; //! multiplicity distribution
164 TH1F *fHist_Mult_SPD_PVz;
165 TH1F *fHist_Mult_SPD_PVz_Pileup;
166
167 TH1F *fHistPVx; //! multiplicity distribution
168 TH1F *fHistPVy; //! multiplicity distribution
169 TH1F *fHistPVz; //! multiplicity distribution
170 TH1F *fHistPVxAnalysis;
171 TH1F *fHistPVyAnalysis;
172 TH1F *fHistPVzAnalysis;
173
da6ac661 174 THnSparse *fHistEventViceGen;
175 THnSparse *fHistEventViceReconst;
176 THnSparse *fHistMCGenK0;
177 THnSparse *fHistMCGenLAM;
178 THnSparse *fHistMCGenALAM;
179 THnSparse *fHistReconstK0;
180 THnSparse *fHistReconstLA;
181 THnSparse *fHistReconstALA;
182 THnSparse *fHistMCAssoK0;
183 THnSparse *fHistMCAssoLA;
184 THnSparse *fHistMCAssoALA;
ff0805a7 185
da6ac661 186 THnSparse *fHistReconstSib;
187 THnSparse *fHistReconstMix;
da6ac661 188 THnSparse *fHistTriggerSib;
189 THnSparse *fHistTriggerMix;
da6ac661 190
ff0805a7 191 ClassDef(AliLeadingV0Correlation, 1);
192};
193//---------------------------------------------------------------------------------------
da6ac661 194class V0Correlationparticle : public AliVParticle
ff0805a7 195{
da6ac661 196public:
197 V0Correlationparticle(Float_t eta,
198 Float_t phi,
199 Float_t pt,
200 Short_t candidate):
201 fEta(eta),
202 fPhi(phi),
203 fpT(pt),
204 fCandidate(candidate)
ff0805a7 205 {
206 }
da6ac661 207 virtual ~V0Correlationparticle(){}
ff0805a7 208
da6ac661 209 virtual Double_t Px() const { AliFatal("Not implemented"); return 0;}
210 virtual Double_t Py() const { AliFatal("Not implemented"); return 0;}
211 virtual Double_t Pz() const { AliFatal("Not implemented"); return 0;}
212 virtual Double_t Pt() const { return fpT;}
213 virtual Double_t P() const { AliFatal("Not implemented"); return 0;}
214 virtual Bool_t PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0;}
215 virtual Double_t Xv() const { AliFatal("Not implemented"); return 0;}
216 virtual Double_t Yv() const { AliFatal("Not implemented"); return 0;}
217 virtual Double_t Zv() const { AliFatal("Not implemented"); return 0;}
218 virtual Bool_t XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0;}
219 virtual Double_t OneOverPt() const { AliFatal("Not implemented"); return 0;}
220 virtual Double_t Phi() const { return fPhi;}
221 virtual Double_t Theta() const { AliFatal("Not implemented"); return 0;}
222 virtual Double_t E() const { AliFatal("Not implemented"); return 0;}
223 virtual Double_t M() const { AliFatal("Not implemented"); return 0;}
224 virtual Double_t Eta() const { return fEta;}
225 virtual Double_t Y() const { AliFatal("Not implemented"); return 0;}
226 virtual Short_t Charge() const { AliFatal("Not implemented"); return 0;}
227 virtual Int_t GetLabel() const { AliFatal("Not implemented"); return 0;}
228 virtual Int_t PdgCode() const { AliFatal("Not implemented"); return 0;}
229 virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0;}
230 virtual Short_t WhichCandidate() const { return fCandidate;}
ff0805a7 231
da6ac661 232
233private:
234 Float_t fEta; // Eta
235 Float_t fPhi; // Phi
236 Float_t fpT; // pT
237 Short_t fCandidate; // 1-K0,2-Lam,3-Alam
238
239
240 ClassDef( V0Correlationparticle, 1);
ff0805a7 241};
242
5b607771 243#endif