]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalEP.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskFlowTPCEMCalEP.h
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *               
3  *                                                                        *               
4  * Author: The ALICE Off-line Project.                                    *               
5  * Contributors are mentioned in the code where appropriate.              *               
6  *                                                                        *               
7  * Permission to use, copy, modify and distribute this software and its   *               
8  * documentation strictly for non-commercial purposes is hereby granted   *               
9  * without fee, provided that the above copyright notice appears in all   *               
10  * copies and that both the copyright notice and this permission notice   *               
11  * appear in the supporting documentation. The authors make no claims     *               
12  * about the suitability of this software for any purpose. It is          *               
13  * provided "as is" without express or implied warranty.                  *               
14  **************************************************************************/
15
16 #ifndef ALIANALYSISTASKFlowTPCEMCalEP_H
17 #define ALIANALYSISTASKFlowTPCEMCalEP_H
18
19 class THnSparse;
20 class TH2F;
21 class TLorentzVector;
22
23 class AliEMCALTrack;
24 class AliMagF;
25 class AliESDEvent;
26 class AliAODEvent;
27 class AliVEvent;
28 class AliEMCALGeometry;
29 class AliEMCALRecoUtils;
30 class AliAnalysisFilter;
31 class AliESDtrackCuts;
32 class AliESDtrack;
33 class AliHFEcontainer;
34 class AliHFEcuts;
35 class AliHFEpid;
36 class AliHFEpidQAmanager;
37 class AliCFManager;
38 class AliSelectNonHFE;
39 class AliPIDResponse;
40
41 #include "AliMCEventHandler.h"
42 #include "AliMCEvent.h"
43 #include "AliMCParticle.h"
44 #include "AliStack.h"
45 #include "AliAnalysisTaskSE.h"
46
47 class AliAnalysisTaskFlowTPCEMCalEP : public AliAnalysisTaskSE {
48  public:
49   AliAnalysisTaskFlowTPCEMCalEP();
50   AliAnalysisTaskFlowTPCEMCalEP(const char *name);
51   virtual ~AliAnalysisTaskFlowTPCEMCalEP();
52   
53   virtual void   UserCreateOutputObjects();
54   virtual void   UserExec(Option_t *option);
55   virtual void   Terminate(Option_t *);  
56
57   void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
58   void SetOpeningAngleCut(Double_t openingAngle) {fOpeningAngleCut = openingAngle;};
59   void SetInvariantMassCut(Double_t invMass) {fInvmassCut = invMass;};
60   void SetNonHFEalgorithm(TString nonHFEalgorithm)  {fnonHFEalgorithm = nonHFEalgorithm;};
61
62   AliHFEpid *GetPID() const { return fPID; }
63   void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; };
64   void SelectPhotonicElectron(Int_t iTracks,AliESDtrack *track,Bool_t &fFlagPhotonicElec, Bool_t &fFlagPhotonicElecBCG,Double_t weight, Int_t iCent);
65   void InitParameters();
66
67   
68   Double_t GetCos2DeltaPhi(Double_t phiA,Double_t phiB)         const;
69   Double_t GetDeltaPhi(Double_t phiA,Double_t phiB)     const;
70   Double_t GetPi0weight(Double_t mcPi0pT,Float_t cent) const;
71   Double_t GetEtaweight(Double_t mcEtapT,Float_t cent) const;
72   Double_t GetSigmaEMCal(Double_t EoverP, Double_t pt, Float_t cent) const;
73   Bool_t   IsElectronFromPi0(TParticle *particle, AliStack * stack, Double_t &weight, Float_t cent);
74   Bool_t   IsElectronFromEta(TParticle *particle, AliStack * stack, Double_t &weight, Float_t cent);
75   Bool_t   IsPi0EtaFromHFdecay(TParticle *particle, AliStack* stack);
76   Bool_t   IsPi0EtaFromLMdecay(TParticle *particle, AliStack* stack);
77   Bool_t   IsPi0EtaPrimary(TParticle *particle, AliStack* stack);
78
79  private:
80   
81   Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track);
82   
83
84   AliESDEvent           *fESD;                  //! ESD object
85   AliAODEvent           *fAOD;                  //! AOD object
86   AliVEvent             *fVevent;               //! VEvent
87   AliPIDResponse        *fpidResponse;          //! PID response
88
89   AliMCEvent            *fMC;                   //! MC object
90     
91   TList                 *fOutputList;           //! output list
92   
93   AliESDtrackCuts       *fTrackCuts;            //! ESD track cuts
94   AliHFEcuts            *fCuts;                 //! Cut Collection
95   AliSelectNonHFE       *fNonHFE;               //! Select non heavy flavour electrons
96
97   Bool_t                fIdentifiedAsOutInz;    //! Out Of Range in z
98   Bool_t                fPassTheEventCut;       //! Pass The Event Cut
99   Bool_t                fRejectKinkMother;      //! Reject Kink Mother
100   Bool_t                fIsMC;                  //! flag for MC analysis   
101   Bool_t                fIsAOD;                 //! flag for AOD analysis
102   Bool_t                fSetMassConstraint;     //! set mass constraint
103
104   Double_t              fVz;                    //! z position of the primary vertex
105   AliCFManager          *fCFM;                  //! Correction Framework Manager
106   AliHFEpid             *fPID;                  //! PID
107   AliHFEpidQAmanager    *fPIDqa;                //! PID QA manager
108   Double_t              fOpeningAngleCut;       //! openingAngle cut for non-HFE selection
109   Double_t              fInvmassCut;            //! invariant mass cut  for non-HFE selection
110   Double_t              fChi2Cut;               //! Chi2 cut  for non-HFE selection
111   Double_t              fDCAcut;                //! DCA cut  for non-HFE selection
112   TString               fnonHFEalgorithm;       //! algorithm to select non-HFE pairs (KF or DCA) 
113
114   TH1F                  *fNoEvents;             //! no of events
115   TH1F                  *fTrkpt;                //! track pt
116   TH2F                  *fTrkEovPBef;           //! track E/p before HFE pid
117   TH2F                  *fTrkEovPAft;           //! track E/p after HFE pid
118   TH2F                  *fdEdxBef;              //! track dEdx vs p before HFE pid
119   TH2F                  *fdEdxAft;              //! track dEdx vs p after HFE pid
120   TH1F                  *fPhotoElecPt;          //! photonic elec pt 
121   TH1F                  *fSemiInclElecPt;       //! Semi inclusive ele pt
122   
123   TH2F                  *fInvmassLS[3];         //! Inv mass of LS (e,e)
124   TH2F                  *fInvmassULS[3];        //! Inv mass of ULS (e,e)
125   TH2F                  *fOpeningAngleLS[3];    //! opening angle for LS pairs
126   TH2F                  *fOpeningAngleULS[3];   //! opening angle for ULS pairs
127
128   TH1F                  *fTrackPtBefTrkCuts;    //! Track pt before track cuts  
129   TH1F                  *fTrackPtAftTrkCuts;    //! Track pt after track cuts
130   TH2F                  *fTPCnsigma;            //! TPC n sigma vs p    
131   
132   TH1F                  *fCent;                 //! centrality
133   TH1F                  *fevPlaneV0[3];         //! V0 event plane distribution
134   TH1F                  *fTPCsubEPres;          //! TPC event plane resolution
135   THnSparse             *fEPres;                //! event plane resolution
136   THnSparse             *fCorr;                 //! correlations
137   TH2F                  *feTPCV2[3];            //! CosDeltaPhi vs pt of inclusive eletron (only TPC PID)
138   TH2F                  *feV2[3];               //! CosDeltaPhi vs pt of inclusive eletron (TPC + EMCAL PID)
139   TH2F                  *fChargPartV2[3];       //! CosDeltaPhi vs pt of charged particle for trigger correction
140   TH2F                  *fMtcPartV2[3];         //! CosDeltaPhi vs pt of matched particle for trigger correction
141     
142   TH1F                  *fPi0Pt[3];             //! primary pi0 pt to compute the weight
143   TH1F                  *fEtaPt[3];             //! primary eta pt to compute the weight
144   
145   TH1F                  *fEoverPsig[3][8][4];   //! E/p distribution for electrons
146   TH1F                  *fEoverPuls[3][8][4];   //! E/p distribution for electrons from unlike-sign pairs
147   TH1F                  *fEoverPls[3][8][4];    //! E/p distribution for electrons from like-sign pairs
148   TH1F                  *fEoverPbcg[3][8][4];   //! E/p distribution for hadrons
149
150   TH1F                  *fDe[6];
151   TH1F                  *fD0e[6];
152   TH1F                  *fDpluse[6];
153   TH1F                  *fDminuse[6];
154   
155   TH2F                  *fD0_e;
156   
157   TH1F                  *fTot_pi0e;             //! inclusive electron
158   TH1F                  *fPhot_pi0e;            //! ULS pair 
159   TH1F                  *fPhotBCG_pi0e;         //! LS pair
160   TH1F                  *fTot_etae;             //! inclusive electron
161   TH1F                  *fPhot_etae;            //! ULS pair 
162   TH1F                  *fPhotBCG_etae;         //! LS pair
163
164   TH1F                  *fInvMass;              //! Invariant mass of ULS pairs
165   TH1F                  *fInvMassBack;          //! Invariant mass if LS pairs
166   TH1F                  *fDCA;                  //! DCA of ULS pairs
167   TH1F                  *fDCABack;              //! DCA of LS pairs
168   TH1F                  *fOpAngle;              //! Opening angle of ULS pairs
169   TH1F                  *fOpAngleBack;          //! Opening angle of LS pairs
170
171
172   AliAnalysisTaskFlowTPCEMCalEP(const AliAnalysisTaskFlowTPCEMCalEP&); // not implemented
173   AliAnalysisTaskFlowTPCEMCalEP& operator=(const AliAnalysisTaskFlowTPCEMCalEP&); // not implemented
174   
175   ClassDef(AliAnalysisTaskFlowTPCEMCalEP, 1); //!example of analysis
176 };
177
178 #endif