]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalQCSP.h
New CMake build implementation
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskFlowTPCEMCalQCSP.h
1 #ifndef ALIANALYSISTASKFLOWTPCEMCALQCSP_H
2 #define ALIANALYSISTASKFLOWTPCEMCALQCSP_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 EMCal               //
10 //                                                                    //
11 //  Author: Andrea Dubla (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 AliAODtrack;
29 class AliHFEcontainer;
30 class AliHFEcuts;
31 class AliHFEpid;
32 class AliHFEpidTPC;
33 class AliHFEpidQAmanager;
34 class AliCFManager;
35 class AliFlowTrackCuts;
36 class AliFlowTrack;
37 class AliFlowEvent;
38 class AliFlowCandidateTrack;
39 class AliFlowEventSimple;
40 class AliCentrality;
41 class AliSelectNonHFE;
42
43 #include "AliAnalysisTaskSE.h"
44
45 class AliAnalysisTaskFlowTPCEMCalQCSP : public AliAnalysisTaskSE {
46     
47 public:
48     AliAnalysisTaskFlowTPCEMCalQCSP();
49     AliAnalysisTaskFlowTPCEMCalQCSP(const char *name);
50     virtual ~AliAnalysisTaskFlowTPCEMCalQCSP();
51     
52     void                                 SetEnableDebugMode() {fDebug = kTRUE; };
53     void                                 SetCentralityParameters(Double_t CentralityMin, Double_t CentralityMax, const char* CentralityMethod); //select centrality
54     void                                 CheckCentrality(AliAODEvent *event,Bool_t &centralitypass); //to use only events with the correct centrality....
55     void                                 SelectPhotonicElectron(Int_t itrack,const AliAODTrack *track, Double_t eopinc, Double_t evPlAnglV0, Bool_t &fFlagPhotonicElec, Double_t weightEPflat, Double_t multev);
56     void                                 SetInvariantMassCut(Double_t invmass) {fInvmassCut = invmass;};
57     void                                 SetpTCuttrack(Double_t ptcut) {fpTCut = ptcut;};
58     void                                 SetTrigger(Int_t trig) {fTrigger = trig;};
59     void                                 SetAssoTPCCluster(Int_t tpc_clust) {fAssoTPCCluster = tpc_clust;};
60     void                                 SetMultCorrelationCut(Bool_t multcut) {fMultCut = multcut;};
61     void                                 SetAssoITSRefit(Bool_t itsref) {fAssoITSRefit = itsref;};
62     void                                 SetFlowSideBands(Bool_t sidebandsflow){fSideBandsFlow = sidebandsflow;}
63     void                                 SelectPhotonicElectronMethod(Bool_t dca){fDCA = dca;}
64     void                                 Setphiminuspsi(Bool_t phipsi){fPhiminusPsi = phipsi;}
65     void                                 SetPurity(Bool_t Purityel){fpurity = Purityel;}
66     template <typename T> void           PlotVZeroMultiplcities(const T* event) const;
67     template <typename T> void           SetNullCuts(T* aod);
68     void                                 PrepareFlowEvent(Int_t iMulti, AliFlowEvent *FlowEv) const;
69     virtual void                         UserCreateOutputObjects();
70     virtual void                         UserExec(Option_t *option);
71     virtual void                         Terminate(Option_t *);
72     void                                 SetRPCuts(AliFlowTrackCuts *cutsRP) { fCutsRP = cutsRP; }
73     void                                 SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
74     void                                 SetIDCuts(Double_t minTPC, Double_t maxTPC, Double_t minEovP, Double_t maxEovP, Double_t minM20, Double_t maxM20, Double_t minM02, Double_t maxM02, Double_t Dispersion);
75     void                                 SetOpeningAngleflag(Bool_t opang){fOP_angle = opang;};
76     void                                 SetOpeningAngleCut(Double_t opanglecut) {fOpeningAngleCut = opanglecut;};
77     void                                 SetHistoForCentralityFlattening(TH1F *h,Double_t minCentr,Double_t maxCentr,Double_t centrRef=0.,Int_t switchTRand=0);
78     Bool_t                               IsEventSelectedForCentrFlattening(Float_t centvalue);
79     
80     void                                 SetHistoForEPFlattWeights(TH1D *h);
81     Double_t                             GiveMeWeight(Double_t EP);
82     void                                 SetEPWeight(Bool_t epw){EPweights = epw;};
83     
84     void                                 SetTPCPID(AliHFEpidTPC *pidcorr){ftpcpid = pidcorr;};
85     void                                 SetMultCorrectionTheo(Bool_t mulcorr){multCorrection = mulcorr;}
86
87     void                                 SetPtMinAssoCut(Double_t ptminimumasso) {fptminAsso = ptminimumasso;};
88
89     AliHFEpid *GetPID() const { return fPID; };
90     
91 private:
92     
93     Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track);
94     
95     Bool_t               fDebug; //! enable debug mode
96     AliAODEvent          *fAOD;                     //AOD object
97     AliVEvent            *fVevent;                      //ESD object
98     AliEMCALGeometry     *fGeom;                // emcal geometry
99     TList                *fOutputList;          //output list
100     AliHFEcuts           *fCuts;                 //Cut Collection
101     Bool_t               fIdentifiedAsOutInz;    //Out Of Range in z
102     Bool_t               fPassTheEventCut;       //Pass The Event Cut
103     AliCFManager         *fCFM;                  //!Correction Framework Manager
104     AliHFEpid            *fPID;                  //PID
105     AliHFEpidTPC         *ftpcpid;              // for TPC mult/eta correction, are done in the HFE class
106     AliHFEpidQAmanager   *fPIDqa;               //! PID QA manager
107     AliFlowTrackCuts     *fCutsRP; // track cuts for reference particles
108     AliFlowTrackCuts     *fNullCuts; // dummy cuts for flow event tracks
109     AliFlowEvent         *fFlowEvent; //! flow events Inclusive e
110     const char           *fkCentralityMethod; // method used to determine centrality (V0 by default)
111     Double_t             fCentrality; // event centrality for QA
112     Double_t             fCentralityMin; // lower bound of cenrality bin
113     Double_t             fCentralityMax; // upper bound of centrality bin
114     Double_t             fInvmassCut;           //invariant mass cut value
115     Double_t             fpTCut;    //pt cut value
116     Int_t                fTrigger;          //invariant mass cut value
117     TH1F                 *fPhi; //! QA plot of azimuthal distribution of tracks used for event plane estimation
118     TH1F                 *fEta; //! QA plot of eta distribution of tracks used for event plane estimation
119     TH1F                 *fVZEROA; //! QA plot vzeroa multiplicity (all tracks in event)
120     TH1F                 *fVZEROC; //! QA plot vzeroc multiplicity (all tracks in event)
121     TH1F                 *fTPCM; //! QA plot TPC multiplicity (tracks used for event plane estimation)
122     TH1F                 *fNoEvents;            //!no of events
123     TH2F                 *fTrkEovPBef;          //!track E/p before HFE pid
124     //   TH2F                           *fdEdxBef;         //track dEdx vs p before HFE pid
125     TH1F                 *fInclusiveElecPt; //! Inclusive elec pt
126     TH2F                 *fTPCnsigma;               //!TPC n sigma vs p
127     TH2F                 *fTPCnsigmaAft;                //!TPC n sigma vs p after HFE pid
128     TH1F                 *fCentralityPass; // ! QA histogram of events that pass centrality cut
129     TH1F                 *fCentralityNoPass; //! QA histogram of events that do not pass centrality cut
130     TH1F                 *fInvmassLS1; //!LS Invmass for all rec par
131     TH1F                 *fInvmassULS1;//!ULS Invmass for all rec par
132     TH1F                 *fPhotoElecPt;             //!photonic elec pt
133     TH1F                 *fSemiInclElecPt;  //!Semi inclusive ele pt
134     TH1F                 *fULSElecPt; //!ULS elec Pt
135     TH1F                 *fLSElecPt;//! LS elec pt
136     Double_t             fminTPC;  //ID cuts tpc
137     Double_t             fmaxTPC;  //ID cuts tpc
138     Double_t             fminEovP;  //ID cuts eovp
139     Double_t             fmaxEovP;//ID cuts eovp
140     Double_t             fminM20;//ID cuts SS
141     Double_t             fmaxM20;//ID cuts SS
142     Double_t             fminM02;//ID cuts SS
143     Double_t             fmaxM02;//ID cuts SS
144     Double_t             fDispersion;//ID cuts SS
145     TH2F                 *fMultCorAfterCuts; //! QA profile global and tpc multiplicity after outlier cut
146     TH2F                 *fMultvsCentr; //! QA profile of centralty vs multiplicity
147     TProfile             *fSubEventDPhiv2;//!lll
148     TH1D                 *EPVzA;//!v0aep
149     TH1D                 *EPVzC;//!v0cep
150     TH1D                 *EPTPC;//!tpcep
151     THnSparseF           *fV2Phi;//! v2 analysis of EP-V0
152     THnSparseD           *fSparseElectronHadron;//! Trk matching sparse for v1 clusterizer
153     TH1D                 *fvertex;//!huge ThNsparse
154     TH2F                 *fMultCorBeforeCuts; //! QA profile global and tpc multiplicity after outlier cut
155     Bool_t               fSideBandsFlow;//flow from side bands for contamination
156     Bool_t               fPhiminusPsi;//flow from phi minus psi method
157     AliFlowEvent         *fFlowEventCont; // flow events for elect Contamination
158     Bool_t               fpurity; //for purity evaluation
159     THnSparseD           *fSparseElectronpurity;//! Trk matching sparse for v1 clusterizer
160     TH1F                 *fOpeningAngleLS;  //!opening angle for LS pairs
161     TH1F                 *fOpeningAngleULS; //!opening angle for ULS pairs
162     AliSelectNonHFE      *fNonHFE;//new elienos stuff
163     Bool_t               fDCA;//selection PHelectron
164     Double_t             fOpeningAngleCut; //openingAngle cut value
165     Bool_t               fOP_angle; //to shitch on and off the op_angle cut
166     Int_t                fAssoTPCCluster;//asso tpc cluster
167     Bool_t               fAssoITSRefit;//asso its refit
168     Bool_t               fMultCut;//for mult correlationcut
169     TH2F                 *fMultCorAfterCentrBeforeCuts; //! QA profile global and tpc multiplicity after outlier cut
170     TH2F                 *fMultCorAfterVZTRKComp;//!after cent comp
171     TH1F                 *fCentralityBeforePileup;//!cent chneck
172     TH1F                 *fCentralityAfterVZTRK;//!cent chneck2
173     TH1F                 *fCentralityAfterCorrCut;//!cent chneck2
174     TH2F                 *fMultCorAfterCorrCut;//!after cent comp
175     TH1D                 *EPVz;//!v0cep
176     TH1D                 *EPTPCp;//!tpcep
177     TH1D                 *EPTPCn;//!tpcep
178     TProfile             *fSubEventDPhiv2new;
179     THnSparseF           *fV2Phivzerotot;//! v2 analysis of EP-V0
180     TH1F                 *fHistCentrDistr;//-> isto for Centr Flat
181     TH1F                 *fCentralityNoPassForFlattening; //! QA histogram of events that do not pass centrality cut for flattening
182     TH1F                 *fInvmassLS1highpt; //!LS Invmass for all rec par high pt
183     TH1F                 *fInvmassULS1highpt;//!ULS Invmass for all rec par high pt
184     THnSparseF           *fSparsephipsiULS;//!ssss
185     THnSparseF           *fSparsephipsiLS;//!ssss
186     THnSparseF           *fSparseMassULS;//!ssss
187     THnSparseF           *fSparseMassLS;//!ssssss
188     
189     TH1D                 *fHistEPDistrWeight;// isto for Centr Flat
190     Bool_t               EPweights;//for mult correlationcut
191     TH1D                 *EPVzAftW;//!v0cep
192
193     Bool_t                multCorrection;//Flag to activate mult/etacorrection
194     Double_t              fptminAsso;//minassopt
195
196     
197     AliAnalysisTaskFlowTPCEMCalQCSP(const AliAnalysisTaskFlowTPCEMCalQCSP&); // not implemented
198     AliAnalysisTaskFlowTPCEMCalQCSP& operator=(const AliAnalysisTaskFlowTPCEMCalQCSP&); // not implemented
199     
200     ClassDef(AliAnalysisTaskFlowTPCEMCalQCSP, 2); //!example of analysis
201 };
202
203 #endif
204