b7ae661febdf43d3252d1313c59c44b160978f65
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskFlowTPCTOFQCSP.h
1 #ifndef ALIANALYSISTASKFLOWTPCTOFQCSP_H
2 #define ALIANALYSISTASKFLOWTPCTOFQCSP_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 Flow  TPC plus TOF                //
10 //                                                                    //
11 //  Author: Andrea Dubla (Utrecht University)                         //
12 //                                                                    //
13 ////////////////////////////////////////////////////////////////////////
14
15 class THnSparse;
16 class TH2F;
17 class TLorentzVector;
18 class AliMagF;
19 class AliESDEvent;
20 class AliAODEvent;
21 class AliAnalysisFilter;
22 class AliESDtrackCuts;
23 class AliESDtrack;
24 class AliAODtrack;
25 class AliHFEcontainer;
26 class AliHFEcuts;
27 //class AliHFEpid;
28 //class AliHFEpidQAmanager;
29 class AliCFManager;
30 class AliFlowTrackCuts;
31 class AliFlowTrack;
32 class AliFlowEvent;
33 class AliFlowCandidateTrack;
34 class AliFlowEventSimple;
35 class AliCentrality;
36 class AliPIDResponse;
37 #include "AliAnalysisTaskSE.h"
38
39 class AliAnalysisTaskFlowTPCTOFQCSP : public AliAnalysisTaskSE {
40
41   public:
42     AliAnalysisTaskFlowTPCTOFQCSP();
43     AliAnalysisTaskFlowTPCTOFQCSP(const char *name);
44     virtual ~AliAnalysisTaskFlowTPCTOFQCSP();
45
46     void                                 SetEnableDebugMode() {fDebug = kTRUE; };
47     void                                 SetCentralityParameters(Double_t CentralityMin, Double_t CentralityMax, const char* CentralityMethod); //select centrality
48     void                                 CheckCentrality(AliAODEvent *event,Bool_t &centralitypass); //to use only events with the correct centrality....
49     void                                 SelectPhotonicElectron(Int_t itrack,const AliAODTrack *track, Bool_t &fFlagPhotonicElec);
50     void                                 SetInvariantMassCut(Double_t invmass) {fInvmassCut = invmass;};
51     void                                 SetTrigger(Int_t trig) {fTrigger = trig;};
52     void                                 SetTPCS(Int_t sig) {fTPCS = sig;};
53     void                                 SetVz(Int_t ver) {fVz = ver;};
54     void                                 SetQAPIDSparse(Bool_t qapidsparse) {fQAPIDSparse = qapidsparse;};
55     void                                 SetPhiCut(Bool_t phicut){fPhiCut = phicut;};
56     void                                 SetOpeningAngleflag(Bool_t opang){fOP_angle = opang;};
57     void                                 SetOpeningAngleCut(Double_t opanglecut) {fOpeningAngleCut = opanglecut;};
58     template <typename T> void           PlotVZeroMultiplcities(const T* event) const;
59     template <typename T> void           SetNullCuts(T* aod);
60     void                                 PrepareFlowEvent(Int_t iMulti, AliFlowEvent *FlowEv) const;
61     virtual void                         UserCreateOutputObjects();
62     virtual void                         UserExec(Option_t *option);
63     virtual void                         Terminate(Option_t *);
64     void                                 SetRPCuts(AliFlowTrackCuts *cutsRP) { fCutsRP = cutsRP; }
65     void                                 SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
66     void                                 SetIDCuts(Double_t minTPCnsigma, Double_t maxTPCnsigma, Double_t minTOFnSigma, Double_t maxTOFnSigma);
67
68
69
70   //  AliHFEpid *GetPID() const { return fPID; };
71
72   private:
73
74     Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track);
75
76     Bool_t               fDebug; //! enable debug mode
77     AliAODEvent              *fAOD;                     //AOD object
78     TList                        *fOutputList;          //output list
79     AliHFEcuts                   *fCuts;                 //Cut Collection
80     Bool_t                           fIdentifiedAsOutInz;    //Out Of Range in z
81     Bool_t                           fPassTheEventCut;       //Pass The Event Cut
82     AliCFManager                 *fCFM;                  //!Correction Framework Manager
83  //   AliHFEpid                      *fPID;                  //PID
84  //   AliHFEpidQAmanager   *fPIDqa;             //! PID QA manager
85     AliFlowTrackCuts     *fCutsRP; // track cuts for reference particles
86     AliFlowTrackCuts     *fNullCuts; // dummy cuts for flow event tracks
87     AliFlowEvent         *fFlowEvent; //! flow events Inclusive e 
88     const char           *fkCentralityMethod; // method used to determine centrality (V0 by default)
89     Double_t             fCentrality; // event centrality for QA
90     Double_t             fCentralityMin; // lower bound of cenrality bin
91     Double_t             fCentralityMax; // upper bound of centrality bin
92     Double_t             fInvmassCut;           //invariant mass cut value
93     Int_t                    fTrigger;          //invariant mass cut value
94     TH1F                 *fPhi; //! QA plot of azimuthal distribution of tracks used for event plane estimation
95     TH1F                 *fEta; //! QA plot of eta distribution of tracks used for event plane estimation
96     TH1F                 *fVZEROA; //! QA plot vzeroa multiplicity (all tracks in event)
97     TH1F                 *fVZEROC; //! QA plot vzeroc multiplicity (all tracks in event)
98     TH1F                 *fTPCM; //! QA plot TPC multiplicity (tracks used for event plane estimation)
99     TH1F                         *fNoEvents;            //no of events
100     TH1F                 *fInclusiveElecPt; // Inclusive elec pt
101 //    TH2F                           *fTPCnsigma;               //TPC n sigma vs p
102     TH2F                         *fTPCnsigmaAft;                //TPC n sigma vs p after HFE pid
103 //    TH2F                           *fTOFns;           //track TOFnSigma
104     TH2F                             *fTOFnsAft;                //track TOFnSigma after PID
105     TH2F                             *fTOFBetaAft;
106     TH1F                 *fCentralityPass; // ! QA histogram of events that pass centrality cut
107     TH1F                 *fCentralityNoPass; //! QA histogram of events that do not pass centrality cut
108     TH1F                 *fInvmassLS1; //LS Invmass for all rec par
109     TH1F                 *fInvmassULS1;//ULS Invmass for all rec par
110     TH1F                             *fPhotoElecPt;             //photonic elec pt
111     TH1F                             *fSemiInclElecPt;  //Semi inclusive ele pt
112     TH1F                 *fULSElecPt; //ULS elec Pt
113     TH1F                 *fLSElecPt;// LS elec pt
114     TH2F                 *fMultCorAfterCuts; //! QA profile global and tpc multiplicity after outlier cut
115     TH2F                 *fMultvsCentr; //! QA profile of centralty vs multiplicity
116         TProfile                         *fSubEventDPhiv2;
117         TH1D                     *EPVzA;//ep v0a
118         TH1D                     *EPVzC;//ep v0c
119         TH1D                     *EPTPC;//ep tpc
120     THnSparseF           *fV2Phi;//! v2 analysis of EP-V0
121     TH1D                 *fvertex;//vertex
122     TH2F                 *fMultCorBeforeCuts; //! QA profile global and tpc multiplicity after outlier cut
123     AliPIDResponse       *fPIDResponse;//!  pidresponse
124     THnSparseF           *fQAPid;             //! v2 analysis of EP-V0
125     Double_t              fminTPCnsigma;  //ID cuts tpc
126     Double_t              fmaxTPCnsigma;  //ID cuts tpc
127     Bool_t                            fQAPIDSparse;       //QAPIDSPARSE
128     Double_t              fminTOFnSigma;  //ID cuts tof
129     Double_t              fmaxTOFnSigma;//ID cuts tof
130     THnSparseF           *fQAPidSparse;             //! v2 analysis of EP-V0
131     Int_t                 fTPCS; //tpc signal cluster
132     Int_t                 fVz; //vertex range
133     Bool_t                            fPhiCut;       //Phi cut to simulate emcal acc
134     Double_t                  fOpeningAngleCut; //openingAngle cut value
135     Bool_t                fOP_angle; //to shitch on and off the op_angle cut
136     TH1F                             *fOpeningAngleLS;  //opening angle for LS pairs
137     TH1F                             *fOpeningAngleULS; //opening angle for ULS pairs
138     
139     AliAnalysisTaskFlowTPCTOFQCSP(const AliAnalysisTaskFlowTPCTOFQCSP&); // not implemented
140     AliAnalysisTaskFlowTPCTOFQCSP& operator=(const AliAnalysisTaskFlowTPCTOFQCSP&); // not implemented
141
142     ClassDef(AliAnalysisTaskFlowTPCTOFQCSP, 2); //!example of analysis
143 };
144
145 #endif
146
147