61f5472444574f12d5b3214a2357cacd232ee6d9
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskElecHadronCorrel.h
1 #ifndef ALIANALYSISTASKELECHADRONCORREL_H
2 #define ALIANALYSISTASKELECHADRONCORREL_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ////////////////////////////////////////////////////////////////////////
8 //                                                                    //
9 //  Task for Heavy Flavour Electron-Hadron DeltaPhi Correlation       //
10 //                                                                    //
11 //  Author: Deepa Thomas (Utrecht University)                         //
12 //                                                                    //
13 ////////////////////////////////////////////////////////////////////////
14
15 class THnSparse;
16 class TH2F;
17 class TLorentzVector;
18
19 class AliEMCALTrack;
20 class AliMagF;
21 class AliESDEvent;
22 class AliAODEvent;
23 class AliEMCALGeometry;
24 class AliEMCALRecoUtils;
25 class AliAnalysisFilter;
26 class AliESDtrackCuts;
27 class AliESDtrack;
28 class AliHFEcontainer;
29 class AliHFEcuts;
30 class AliHFEpid;
31 class AliHFEpidQAmanager;
32 class AliCFManager;
33 //class AliEventPoolManager;
34
35 #include "AliLog.h"
36 #include "AliAnalysisTaskSE.h"
37 #include "AliCentrality.h"
38
39 class AliAnalysisTaskElecHadronCorrel : public AliAnalysisTaskSE {
40   public:
41     AliAnalysisTaskElecHadronCorrel();
42     AliAnalysisTaskElecHadronCorrel(const char *name);
43     virtual ~AliAnalysisTaskElecHadronCorrel();
44
45     virtual void   UserCreateOutputObjects();
46     virtual void   UserExec(Option_t *option);
47     virtual void   Terminate(Option_t *);
48
49     void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
50     void SetOpeningAngleCut (Double_t openingAngle) {fOpeningAngleCut = openingAngle;};
51     void SetInvariantMassCut (Double_t invmass) {fInvmassCut = invmass;};
52     AliHFEpid *GetPID() const { return fPID; }
53     void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; };
54     void SelectPhotonicElectron(Int_t itrack, AliESDtrack *track, Bool_t &fFlagPhotonicElec);
55     void ElectronHadCorrel(Int_t itrack, AliESDtrack *track, TH2F *DphiPt, TH2F *DphiPt1,TH2F *DphiPt2,TH2F *DphiPt3,TH2F *DphiPt4);    
56     void ElectronHadCorrelNoPartner(Int_t itrack,Int_t jtrack, AliESDtrack *track, TH2F *DphiPtNew,TH2F *DphiPtNew1,TH2F *DphiPtNew2,TH2F *DphiPtNew3,TH2F *DphiPtNew4);        
57 //    void MixedEvent(AliESDtrack *track, TH2F *DphiPt, TH2F *DphiPt1, TH2F *DphiPt2);
58     void HadronInfo(Int_t itrack);
59     void    SetCentralityParameters(Double_t CentralityMin, Double_t CentralityMax, const char* CentralityMethod); //select centrality
60     void    CheckCentrality(AliESDEvent *event,Bool_t &centralitypass); //to use only events with the correct centrality....
61 //    TObjArray* CloneAndReduceTrackList();
62   private:
63
64     Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track);
65
66     AliESDEvent                    *fESD;                       //ESD object
67     AliEMCALGeometry    *fGeom;                 // emcal geometry 
68
69     TList                       *fOutputList;           //output list
70
71     AliESDtrackCuts             *fTrackCuts1;           //ESD track cuts
72     AliESDtrackCuts             *fTrackCuts2;           //ESD track cuts
73     AliHFEcuts                  *fCuts;                 //Cut Collection
74     Bool_t                            fIdentifiedAsOutInz;    //Out Of Range in z
75     Bool_t                      fPassTheEventCut;       //Pass The Event Cut
76     Bool_t                         fRejectKinkMother;      //Reject Kink Mother
77     Double_t                  fVz;                    //z position of the primary vertex
78     AliCFManager                *fCFM;                  //!Correction Framework Manager
79     AliHFEpid                 *fPID;                  //PID
80     AliHFEpidQAmanager  *fPIDqa;                //! PID QA manager
81     Double_t                  fOpeningAngleCut; //openingAngle cut value
82     Double_t                    fInvmassCut;            //invariant mass cut value
83     Double_t             fCentrality; // event centrality for QA
84     Double_t             fCentralityMin; // lower bound of cenrality bin
85     Double_t             fCentralityMax; // upper bound of centrality bin
86     const char           *fkCentralityMethod; // method used to determine centrality (V0 by default)   
87 //    AliEventPoolManager*     fPoolMgr;         //! event pool manager
88
89     TH1F                        *fNoEvents;             //no of events
90 //    TH1F                      *fTrkpt;                //track pt
91     TH2F                        *fTrkEovPBef;           //track E/p before HFE pid
92     TH2F                        *fTrkEovPBefHad;                //track E/p before HFE pid
93 /*    TH2F                      *fTrkEovPAft;           //track E/p after HFE pid
94     TH2F                        *fTrkEovPAftOwn;                //track E/p after HFE pid
95     TH2F                        *fdEdxBef;              //track dEdx vs p before HFE pid
96     TH2F                        *fdEdxAft;              //track dEdx vs p before HFE pid
97     TH2F                        *fdEdxAftOwn;           //track dEdx vs p before HFE pid
98     TH1F                        *fOpeningAngleLS;       //opening angle for LS pairs
99     TH1F                        *fOpeningAngleULS;      //opening angle for ULS pairs
100 */    TH2F                      *fSemiIncElecDphi;      //Semi Inclusive elec - had DPhi
101     TH2F                        *fSemiIncElecDphi1;     //Semi Inclusive elec - had DPhi
102     TH2F                        *fSemiIncElecDphi2;     //Semi Inclusive elec - had DPhi
103     TH2F                        *fSemiIncElecDphi3;     //Semi Inclusive elec - had DPhi
104     TH2F                        *fSemiIncElecDphi4;     //Semi Inclusive elec - had DPhi
105     TH2F                        *fPhotElecDphi;         //Photon elec - had DPhi
106     TH2F                        *fPhotElecDphi1;        //Photon elec - had DPhi
107     TH2F                        *fPhotElecDphi2;        //Photon elec - had DPhi
108     TH2F                        *fPhotElecDphi3;        //Photon elec - had DPhi
109     TH2F                        *fPhotElecDphi4;        //Photon elec - had DPhi
110     TH2F                        *fInclusiveElecDphi;    //Inclusive elec - had DPhi
111     TH2F                        *fInclusiveElecDphi1;   //Inclusive elec - had DPhi
112     TH2F                        *fInclusiveElecDphi2;   //Inclusive elec - had DPhi
113     TH2F                        *fInclusiveElecDphi3;   //Inclusive elec - had DPhi
114     TH2F                        *fInclusiveElecDphi4;   //Inclusive elec - had DPhi
115     TH2F                        *fDphiULSMassLow;       //Dphi - ULS, mass< mass cut
116     TH2F                        *fDphiULSMassLow1;      //Dphi - ULS, mass< mass cut
117     TH2F                        *fDphiULSMassLow2;      //Dphi - ULS, mass< mass cut
118     TH2F                        *fDphiULSMassLow3;      //Dphi - ULS, mass< mass cut
119     TH2F                        *fDphiULSMassLow4;      //Dphi - ULS, mass< mass cut
120     TH2F        *fDphiLSMassLow;  //Dphi - LS, mass< mass cut
121     TH2F        *fDphiLSMassLow1;  //Dphi - LS, mass< mass cut
122     TH2F        *fDphiLSMassLow2;  //Dphi - LS, mass< mass cut
123     TH2F        *fDphiLSMassLow3;  //Dphi - LS, mass< mass cut
124     TH2F        *fDphiLSMassLow4;  //Dphi - LS, mass< mass cut
125     TH2F        *fDphiULSMassLowNoPartner; //Dphi - ULS, mass< mass cut no partner
126     TH2F        *fDphiULSMassLowNoPartner1; //Dphi - ULS, mass< mass cut no partner
127     TH2F        *fDphiULSMassLowNoPartner2; //Dphi - ULS, mass< mass cut no partner
128     TH2F        *fDphiULSMassLowNoPartner3; //Dphi - ULS, mass< mass cut no partner
129     TH2F        *fDphiULSMassLowNoPartner4; //Dphi - ULS, mass< mass cut no partner
130     TH2F                        *fDphiLSMassLowNoPartner;       //Dphi - LS, mass< mass cut
131     TH2F                        *fDphiLSMassLowNoPartner1;      //Dphi - LS, mass< mass cut
132     TH2F                        *fDphiLSMassLowNoPartner2;      //Dphi - LS, mass< mass cut
133     TH2F                        *fDphiLSMassLowNoPartner3;      //Dphi - LS, mass< mass cut
134     TH2F                        *fDphiLSMassLowNoPartner4;      //Dphi - LS, mass< mass cut
135     TH1F                        *fPhotoElecPt;          //photonic elec pt 
136     TH1F                        *fSemiInclElecPt;       //Semi inclusive ele pt
137     TH1F        *fInclusiveElecPt; // Inclusive elec pt
138     TH1F        *fULSElecPt; //ULS elec Pt
139     TH1F        *fLSElecPt;// LS elec pt 
140
141 //    TH1F                      *fTrackPtBefTrkCuts;    //Track pt before track cuts    
142 //    TH1F                      *fTrackPtAftTrkCuts;    //Track pt after track cuts
143     TH2F                        *fTPCnsigma;            //TPC n sigma vs p      
144 //    TH2F                      *fTPCnsigmaAft;         //TPC n sigma vs p      
145 //    TH2F                      *fTPCnsigmaAftOwn;              //TPC n sigma vs p      
146 //    TH1F                      *fNCellv1;              //No of cells in cluster, all EMCAL cluster
147 //    TH1F                      *fClsEv1;               //Cluster energy, all EMCAL cluster
148 //    TH1F                      *fNClusv1;              //No of clusters in event, all EMCAL cluster
149
150 //    TH1F        *fKFParticleP; //KFparticle rec P distr
151 //    TH1F        *fKFParticleE; //KFparticle rec E distr
152     TH1F        *fInvmassLS1; //LS Invmass for all rec par
153     TH1F        *fInvmassLS2; //LS Invmass for all rec par
154     TH1F        *fInvmassLS3; //LS Invmass for all rec par
155     TH1F        *fInvmassLS4; //LS Invmass for all rec par
156     TH1F        *fInvmassLS5; //LS Invmass for all rec par
157     TH1F        *fInvmassULS1;//ULS Invmass for all rec par
158     TH1F        *fInvmassULS2;//ULS Invmass for all rec par
159     TH1F        *fInvmassULS3;//ULS Invmass for all rec par
160     TH1F        *fInvmassULS4;//ULS Invmass for all rec par
161     TH1F        *fInvmassULS5;//ULS Invmass for all rec par
162     TH1F        *fcentrality;//
163     TH1F        *fElecPhi;//
164     TH1F        *fElecPhiTPChalf;//
165     TH2F        *fElecPhiPt;//
166 //    TH1F        *fElecPhiTPC;//
167 //    TH1F        *fElecPhiTPCEovP;//
168     TH1F        *fHadronPhi;//
169     TH1F        *fHadronPhiTPChalf;//
170     TH2F        *fHadronPhiPt;//
171 /*    TH1F        *fTrackHFEcuts;//
172     TH1F        *fTrakPhiSPD1;//
173     TH1F        *fTrakPhiSPD2;//
174     TH1F        *fTrakPhiSPDOr;//
175     TH1F        *fTrakPhiSPDAnd;//
176     TH1F        *fTrackHFEcutsITS;//
177 */
178 /*    TH1F        *fNoMixedEvents;//
179     TH2F        *fMixStat; //no of events in pool vs multplicity
180     TH2F        *fMixStat1; //no of events in pool vs zvtx 
181     TH2F        *fMixedIncElecDphi; //Mixed event - inclusive elec DPhi
182     TH2F        *fMixedIncElecDphi1; //Mixed event - inclusive elec DPhi
183     TH2F        *fMixedIncElecDphi2; //Mixed event - inclusive elec DPhi
184     TH2F        *fMixedPhotElecDphi; //
185     TH2F        *fMixedPhotElecDphi1; //
186     TH2F        *fMixedPhotElecDphi2; //
187     TH2F        *fMixedSemiIncElecDphi; //
188     TH2F        *fMixedSemiIncElecDphi1; //
189     TH2F        *fMixedSemiIncElecDphi2; //
190     TH2F        *fMixedDphiULSMassLow;//
191     TH2F        *fMixedDphiULSMassLow1;//
192     TH2F        *fMixedDphiULSMassLow2;//
193     TH2F        *fMixedDphiLSMassLow;//
194     TH2F        *fMixedDphiLSMassLow1;//
195     TH2F        *fMixedDphiLSMassLow2;//
196 */
197 /*    TH1F        *fNLSminus;//
198     TH1F        *fNLSplus;//
199     TH1F        *fNULS;//  
200 */    TH1F        *fHadronIPxy;//  
201     TH1F        *fHadronIPz;//  
202     TH1F        *fHadronPt;//
203     TH1F       *fCentralityPass; // ! QA histogram of events that pass centrality cut
204     TH1F       *fCentralityNoPass; //! QA histogram of events that do not pass centrality cut
205     //  THnSparse  *fSparseElectron;//!Electron info 
206     //  Double_t *fvalueElectron;//!Electron info 
207
208     AliAnalysisTaskElecHadronCorrel(const AliAnalysisTaskElecHadronCorrel&); // not implemented
209     AliAnalysisTaskElecHadronCorrel& operator=(const AliAnalysisTaskElecHadronCorrel&); // not implemented
210
211     ClassDef(AliAnalysisTaskElecHadronCorrel, 2); //!example of analysis
212 };
213 /*
214 class AliehDPhiBasicParticle : public AliVParticle
215 {
216   public:
217     AliehDPhiBasicParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
218       : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
219     {
220     }
221     ~AliehDPhiBasicParticle() {}
222
223     // kinematics
224     virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
225     virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
226     virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
227     virtual Double_t Pt() const { return fpT; }
228     virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
229     virtual Bool_t   PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
230
231     virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
232     virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
233     virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
234     virtual Bool_t   XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
235
236     virtual Double_t OneOverPt()  const { AliFatal("Not implemented"); return 0; }
237     virtual Double_t Phi()        const { return fPhi; }
238     virtual Double_t Theta()      const { AliFatal("Not implemented"); return 0; }
239
240
241     virtual Double_t E()          const { AliFatal("Not implemented"); return 0; }
242     virtual Double_t M()          const { AliFatal("Not implemented"); return 0; }
243
244     virtual Double_t Eta()        const { return fEta; }
245     virtual Double_t Y()          const { AliFatal("Not implemented"); return 0; }
246
247     virtual Short_t Charge()      const { return fCharge; }
248     virtual Int_t   GetLabel()    const { AliFatal("Not implemented"); return 0; }
249     // PID
250     virtual Int_t   PdgCode()     const { AliFatal("Not implemented"); return 0; }
251     virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
252
253   private:
254     Float_t fEta;      // eta
255     Float_t fPhi;      // phi
256     Float_t fpT;       // pT
257     Short_t fCharge;   // charge
258
259     ClassDef( AliehDPhiBasicParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing
260 };
261 */
262 #endif
263
264