]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliAnalysisTaskFlowTPCTOFEPSP.h
updated pPb tasks
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskFlowTPCTOFEPSP.h
CommitLineData
8c1c76e9 1/**************************************************************************\r
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
3* *\r
4* Author: The ALICE Off-line Project. *\r
5* Contributors are mentioned in the code where appropriate. *\r
6* *\r
7* Permission to use, copy, modify and distribute this software and its *\r
8* documentation strictly for non-commercial purposes is hereby granted *\r
9* without fee, provided that the above copyright notice appears in all *\r
10* copies and that both the copyright notice and this permission notice *\r
11* appear in the supporting documentation. The authors make no claims *\r
12* about the suitability of this software for any purpose. It is *\r
13* provided "as is" without express or implied warranty. *\r
14**************************************************************************/\r
15//\r
16// Flow task class for the ALICE HFE group\r
17//\r
18//\r
a70c9e97 19#ifndef ALIANALYSISTASKFLOWTPCTOFEPSP_H\r
20#define ALIANALYSISTASKFLOWTPCTOFEPSP_H\r
8c1c76e9 21\r
22\r
23\r
24\r
25#include <AliAnalysisTaskSE.h>\r
26\r
27class TList;\r
0e30407a 28class AliVTrack;\r
29class AliVEvent;\r
30class AliESDtrack;\r
31class AliESDEvent;\r
32class AliMCEvent;\r
8c1c76e9 33class AliFlowTrackCuts;\r
34class AliFlowCandidateTrack;\r
35class AliHFEcuts;\r
36class AliHFEpid;\r
37class TH1D;\r
38class TH2D;\r
6733d981 39class TF1;\r
e17c1f86 40class TProfile;\r
41class TProfile2D;\r
8c1c76e9 42class THnSparse;\r
43class AliHFEpidQAmanager;\r
44class AliFlowEvent;\r
0e30407a 45class AliESDtrackCuts;\r
a8ef1999 46class AliHFEVZEROEventPlane;\r
0e30407a 47class TArrayI;\r
2747660f 48class AliAODMCHeader;\r
49class TClonesArray;\r
50class AliHFENonPhotonicElectron;\r
959ea9d8 51class TTreeSRedirector;\r
8c1c76e9 52\r
914042c2 53class AliAnalysisTaskFlowTPCTOFEPSP: public AliAnalysisTaskSE {\r
8c1c76e9 54public:\r
0e30407a 55\r
56 typedef enum{\r
57 kElectronfromconversion = 0,\r
58 kElectronfromconversionboth = 1,\r
59 kElectronfrompi0 = 2,\r
60 kElectronfrompi0both = 3,\r
5cd679b7 61 kElectronfrometa = 4,\r
62 kElectronfrometaboth = 5,\r
63 kElectronfromC = 6,\r
64 kElectronfromB = 7,\r
7b4c9210 65 kElectronfromother = 8,\r
66 kNoElectron = 9\r
0e30407a 67 } FlowSource_t;\r
68 \r
69 typedef enum{\r
70 kS = 0,\r
71 kOp = 1\r
72 } FlowSign_t;\r
73\r
74\r
75\r
76\r
914042c2 77 AliAnalysisTaskFlowTPCTOFEPSP();\r
78 AliAnalysisTaskFlowTPCTOFEPSP(const char *name);\r
79 AliAnalysisTaskFlowTPCTOFEPSP(const AliAnalysisTaskFlowTPCTOFEPSP &ref);\r
80 AliAnalysisTaskFlowTPCTOFEPSP& operator=(const AliAnalysisTaskFlowTPCTOFEPSP &ref);\r
a8ef1999 81 virtual void Copy(TObject &o) const;\r
914042c2 82 virtual ~AliAnalysisTaskFlowTPCTOFEPSP();\r
8c1c76e9 83 \r
84 virtual void UserExec(Option_t */*option*/);\r
85 virtual void UserCreateOutputObjects();\r
86\r
2747660f 87 void SetAODAnalysis(Bool_t aodAnalysis) { fAODAnalysis = aodAnalysis; };\r
88 void SetUseFilterAOD(Bool_t useFilterAOD) { fUseFilterAOD = useFilterAOD; }\r
89 void SetApplyCut(Bool_t applyCut) { fApplyCut = applyCut; }\r
90 void SetFilter(ULong_t filter) { fFilter = filter; }\r
4102d1cc 91 \r
8c1c76e9 92 AliHFEpid *GetPID() const { return fPID; }\r
5cd679b7 93 AliHFEpid *GetPIDTOFOnly() const { return fPIDTOFOnly; }\r
a8ef1999 94 AliHFEpidQAmanager *GetPIDQAManager() const { return fPIDqa; }\r
0e30407a 95 AliHFEpid *GetPIDBackground() const { return fPIDBackground; }\r
96 AliHFEpidQAmanager *GetPIDBackgroundQAManager() const { return fPIDBackgroundqa; }\r
2747660f 97 AliHFENonPhotonicElectron *GetHFEBackgroundSubtraction() const { return fBackgroundSubtraction; }\r
0e30407a 98\r
a8ef1999 99\r
6733d981 100 void SetContamination(TF1 * const function,Int_t k) { fContamination[k] = function; };\r
6b2521a4 101 void SetV2Contamination(TF1 * const function,Int_t k) { fv2contamination[k] = function; };\r
8c1c76e9 102 void SetHFECuts(AliHFEcuts * const cuts) { fHFECuts = cuts; };\r
2747660f 103 void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; };\r
104 void SetHFEBackgroundSubtraction(AliHFENonPhotonicElectron * const backgroundSubtraction) { fBackgroundSubtraction = backgroundSubtraction; };\r
0e30407a 105 void SetHFEBackgroundCuts(AliESDtrackCuts * const cuts) { fHFEBackgroundCuts = cuts; };\r
8c1c76e9 106 void SetSubEtaGapTPC(Bool_t subEtaGapTPC) { fSubEtaGapTPC = subEtaGapTPC; };\r
107 void SetEtaGap(Double_t etaGap) { fEtaGap = etaGap; };\r
e17c1f86 108 void SetVZEROEventPlane(Bool_t vzeroEventPlane) { fVZEROEventPlane = vzeroEventPlane; };\r
109 void SetVZEROEventPlaneA(Bool_t vzeroEventPlaneA) { fVZEROEventPlaneA = vzeroEventPlaneA; };\r
110 void SetVZEROEventPlaneC(Bool_t vzeroEventPlaneC) { fVZEROEventPlaneC = vzeroEventPlaneC; };\r
a8ef1999 111 void SetHFEVZEROEventPlane(AliHFEVZEROEventPlane *hfeVZEROEventPlane) { fHFEVZEROEventPlane = hfeVZEROEventPlane; };\r
8c1c76e9 112\r
e17c1f86 113 void SetNbBinsCentralityQCumulant(Int_t nbBinsCentralityQCumulant) { fNbBinsCentralityQCumulant = nbBinsCentralityQCumulant; };\r
114 void SetBinCentralityLess(Int_t k, Float_t value) { fBinCentralityLess[k] = value; };\r
8c1c76e9 115 void SetNbBinsPtQCumulant(Int_t nbBinsPtQCumulant) { fNbBinsPtQCumulant = nbBinsPtQCumulant; };\r
116 void SetMinPtQCumulant(Double_t minPtQCumulant) { fMinPtQCumulant = minPtQCumulant; };\r
117 void SetMaxPtQCumulant(Double_t maxPtQCumulant) { fMaxPtQCumulant = maxPtQCumulant; };\r
118\r
119 void SetAfterBurnerOn(Bool_t afterBurnerOn) { fAfterBurnerOn = afterBurnerOn; };\r
120 void SetNonFlowNumberOfTrackClones(Int_t nonFlowNumberOfTrackClones) { fNonFlowNumberOfTrackClones = nonFlowNumberOfTrackClones; };\r
121 void SetV1V2V3V4V5(Double_t v1,Double_t v2,Double_t v3,Double_t v4,Double_t v5) {fV1 = v1; fV2 = v2; fV3 = v3; fV4 = v4; fV5 = v5; };\r
122 void SetMaxNumberOfIterations(Int_t maxNumberOfIterations) { fMaxNumberOfIterations = maxNumberOfIterations; };\r
123 void SetPrecisionPhi(Double_t precisionPhi) { fPrecisionPhi = precisionPhi;};\r
124 void SetUseMCReactionPlane(Bool_t useMCReactionPlane) { fUseMCReactionPlane = useMCReactionPlane;};\r
959ea9d8 125 void SetUseSP(Bool_t useSP) { fSP = useSP;}\r
8c1c76e9 126 void SetMCPID(Bool_t mcPID) { fMCPID = mcPID;};\r
a8ef1999 127 void SetNoPID(Bool_t noPID) { fNoPID = noPID;};\r
8c1c76e9 128\r
e17c1f86 129 void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel;};\r
7b5936fc 130 void SetMonitorEventPlane(Bool_t monitorEventPlane) { fMonitorEventPlane = monitorEventPlane;};\r
131 void SetMonitorContamination(Bool_t monitorContamination) { fMonitorContamination = monitorContamination;};\r
132 void SetMonitorPhotonic(Bool_t monitorPhotonic) { fMonitorPhotonic = monitorPhotonic;};\r
133 void SetMonitorWithoutPID(Bool_t monitorWithoutPID) { fMonitorWithoutPID = monitorWithoutPID;};\r
134 void SetMonitorTrackCuts(Bool_t monitorTrackCuts) { fMonitorTrackCuts = monitorTrackCuts;};\r
135 void SetMonitorQCumulant(Bool_t monitorQCumulant) { fMonitorQCumulant = monitorQCumulant;};\r
e17c1f86 136\r
137 Int_t GetNbBinsCentralityQCumulant() const { return fNbBinsCentralityQCumulant; };\r
138 Double_t GetBinCentralityLess(Int_t k) const { return fBinCentralityLess[k]; };\r
8c1c76e9 139 \r
140 AliFlowCandidateTrack *MakeTrack( Double_t mass, Double_t pt, Double_t phi, Double_t eta) ;\r
141 Double_t GetPhiAfterAddV2(Double_t phi,Double_t reactionPlaneAngle) const;\r
0e30407a 142\r
143 void SetMaxInvmass(Double_t maxInvmass) { fMaxInvmass = maxInvmass; };\r
144 void SetMaxopening3D(Double_t maxOpening3D) { fMaxopening3D = maxOpening3D; };\r
145 void SetMaxopeningtheta(Double_t maxOpeningtheta) { fMaxopeningtheta = maxOpeningtheta; };\r
146 void SetMaxopeningphi(Double_t maxOpeningphi) { fMaxopeningphi = maxOpeningphi; };\r
4317a065 147 void SetAlgorithmMA(Bool_t algorithmMA) { fAlgorithmMA = algorithmMA; };\r
7b4c9210 148 void SetMassConstraint(Bool_t massConstraint) { fSetMassConstraint = massConstraint; };\r
d87a9d29 149 void SetPileUpCut(Bool_t cut=kTRUE) { fPileUpCut=cut; }\r
0e30407a 150\r
151 Int_t LookAtNonHFE(Int_t iTrack1, AliVTrack *track1, AliVEvent *fESD, AliMCEvent *mcEvent,Int_t binct,Double_t deltaphi,Int_t source,Int_t indexmother);\r
8c1c76e9 152 \r
153private:\r
11ff28c5 154 TList *fListHist; //! TH list\r
155 Bool_t fAODAnalysis; // AOD analysis\r
2747660f 156 Bool_t fUseFilterAOD; // Use the preselected AOD track\r
4102d1cc 157 Bool_t fApplyCut; // Apply the analysis cut for AOD tracks\r
2747660f 158 ULong_t fFilter; // reconstruction AOD status flags \r
159 AliAODMCHeader *fAODMCHeader; // ! MC info AOD\r
160 TClonesArray *fAODArrayMCInfo; // ! MC info particle AOD\r
161 AliHFENonPhotonicElectron *fBackgroundSubtraction; // Background subtraction\r
4102d1cc 162 \r
a8ef1999 163 Bool_t fVZEROEventPlane; // Use Event Planes from VZERO\r
e17c1f86 164 Bool_t fVZEROEventPlaneA; // Use Event Planes from VZERO A\r
165 Bool_t fVZEROEventPlaneC; // Use Event Planes from VZERO C\r
166\r
a8ef1999 167 Bool_t fSubEtaGapTPC; // bool to fill with eta gap\r
168 Double_t fEtaGap; // Value of the eta gap\r
8c1c76e9 169\r
e17c1f86 170 Int_t fNbBinsCentralityQCumulant; // Number of Bins Q Cumulant\r
a8ef1999 171 Double_t fBinCentralityLess[10]; // Centrality Bin lower value\r
172 Int_t fNbBinsPtQCumulant; // Nbbinspt QCumulant method\r
173 Double_t fMinPtQCumulant; // Min pt QCumulant method\r
174 Double_t fMaxPtQCumulant; // Max pt QCumulant method\r
175 Bool_t fAfterBurnerOn; // Add flow to all tracks\r
8c1c76e9 176 Int_t fNonFlowNumberOfTrackClones; // number of times to clone the particles (nonflow) \r
177 Double_t fV1; // Add Flow. Must be in range [0,0.5].\r
178 Double_t fV2; // Add Flow. Must be in range [0,0.5].\r
179 Double_t fV3; // Add Flow. Must be in range [0,0.5].\r
180 Double_t fV4; // Add Flow. Must be in range [0,0.5].\r
181 Double_t fV5; // Add Flow. Must be in range [0,0.5].\r
182 Int_t fMaxNumberOfIterations; // Max number of iteration for adding v2\r
183 Double_t fPrecisionPhi; // precision phi for adding v2\r
184 Bool_t fUseMCReactionPlane; // use MC reaction plane\r
959ea9d8 185 Bool_t fSP; // calculate using scalar product method (instead of event plane method)\r
8c1c76e9 186\r
187 Bool_t fMCPID; // MC PID for electrons\r
a8ef1999 188 Bool_t fNoPID; // No PID for checks\r
e17c1f86 189\r
0e30407a 190 Double_t fChi2OverNDFCut; // Limit chi2\r
191 Double_t fMaxdca; // Limit dca\r
192 Double_t fMaxopeningtheta; // Limit opening angle in theta\r
193 Double_t fMaxopeningphi; // Limit opening angle in phi\r
194 Double_t fMaxopening3D; // Limit opening 3D\r
195 Double_t fMaxInvmass; // Limit invariant mass\r
7b4c9210 196 Bool_t fSetMassConstraint; // Set mass constraint\r
0e30407a 197 \r
198\r
e17c1f86 199 Int_t fDebugLevel; // Debug Level \r
7b5936fc 200 Bool_t fMonitorEventPlane; // Monitor event plane\r
201 Bool_t fMonitorContamination; // Monitor contamination\r
202 Bool_t fMonitorPhotonic;// Monitor photonic\r
203 Bool_t fMonitorWithoutPID;// Monitor without PID\r
204 Bool_t fMonitorTrackCuts;// Monitor track cuts\r
205 Bool_t fMonitorQCumulant;// Monitor Q cumulant\r
206 \r
8c1c76e9 207 // Cuts for FLOW PWG2\r
7c4ec6e7 208 AliFlowTrackCuts* fcutsRP; //! Reference particle cut\r
209 AliFlowTrackCuts* fcutsPOI; //! Particle Of Interest cut\r
8c1c76e9 210 \r
211 // Cuts for HFE\r
7f695a7b 212 AliHFEcuts *fHFECuts; // HFE cuts\r
2747660f 213 Bool_t fRejectKinkMother; // Reject Kink Mother \r
7f695a7b 214 AliHFEpid *fPID; // PID cuts \r
215 AliHFEpid *fPIDTOFOnly; // PID cuts TOF only\r
216 AliHFEpidQAmanager *fPIDqa; // QA Manager\r
0e30407a 217 AliFlowEvent *fflowEvent; //! Flow event \r
218\r
6733d981 219 // Hadron Contamination\r
220 TF1 *fContamination[11]; // Parametrization of the contamination (0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100)\r
6b2521a4 221 TF1 *fv2contamination[11]; // Parametrization of the v2 of charged pions (0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100)\r
6733d981 222\r
0e30407a 223 // Cuts for background study\r
7f695a7b 224 AliESDtrackCuts *fHFEBackgroundCuts; // HFE background cuts\r
225 AliHFEpid *fPIDBackground; // PID background cuts \r
226 AliHFEpidQAmanager *fPIDBackgroundqa; // QA Manager Background \r
0e30407a 227 Bool_t fAlgorithmMA; // algorithm MA\r
228\r
229 // List of tracks\r
7c4ec6e7 230 TArrayI *fArraytrack; //! list of tracks\r
0e30407a 231 Int_t fCounterPoolBackground; // number of tracks\r
8c1c76e9 232\r
a8ef1999 233 // VZERO Event plane after calibration 2010\r
7f695a7b 234 AliHFEVZEROEventPlane *fHFEVZEROEventPlane; // VZERO event plane calibrated\r
a8ef1999 235 \r
8c1c76e9 236 // Histos\r
2747660f 237 TH2D *fHistEV; //! Number of events\r
3112b3a5 238 THnSparseF *fHistPileUp; //! Pile up histogram\r
d87a9d29 239 Bool_t fPileUpCut;\r
240\r
e17c1f86 241 // A Event plane as function of phiepa, phiepb, phiepc, phiepd centrality \r
6733d981 242 // a V0A, b V0C, c TPC,\r
a8ef1999 243 THnSparseF *fEventPlane; //! Event plane\r
8c1c76e9 244 \r
245 // B Event Plane after subtraction as function of phiep, centrality \r
a8ef1999 246 THnSparseF *fEventPlaneaftersubtraction; //! Event plane\r
8c1c76e9 247\r
6733d981 248 // Contamination\r
6b2521a4 249 THnSparseF *fFractionContamination; //! Fraction of contamination as function of pt\r
250 TProfile2D *fContaminationv2; //! v2 of contamination\r
6733d981 251\r
e17c1f86 252 // Monitoring Event plane: cos2phi, sin2phi, centrality\r
a8ef1999 253 THnSparseF *fCosSin2phiep; //! Cos(2phi), Sin(2phi)\r
e17c1f86 254 \r
8c1c76e9 255 // E Monitoring Event plane after subtraction of the track: cos, centrality, pt, eta\r
a8ef1999 256 THnSparseF *fCos2phie; //! Monitoring\r
257 THnSparseF *fSin2phie; //! Monitoring\r
258 THnSparseF *fCos2phiep; //! Monitoring\r
259 THnSparseF *fSin2phiep; //! Monitoring\r
260 THnSparseF *fSin2phiephiep; //! Monitoring\r
e17c1f86 261\r
262 // Fbis Resolution as function of cosres, cosres, cosres, centrality for three subevents (V0)\r
263 // a V0A, b V0C, c TPC\r
a8ef1999 264 THnSparseF *fCosResabc; //! Res\r
265 THnSparseF *fSinResabc; //! Res\r
266 TProfile *fProfileCosResab; //! Profile Res_a_b\r
267 TProfile *fProfileCosResac; //! Profile Res_a_c\r
268 TProfile *fProfileCosResbc; //! Profile Res_b_c\r
8c1c76e9 269 \r
e17c1f86 270 // F Resolution as function of cosres, centrality for two subevents (TPC)\r
a8ef1999 271 THnSparseF *fCosRes; //! Res\r
272 THnSparseF *fSinRes; //! Res\r
273 TProfile *fProfileCosRes; //! Profile Res\r
8c1c76e9 274 \r
0e30407a 275 // Debuging Cuts step by step all centrality together: pt, step (6)\r
276 THnSparseF *fTrackingCuts; //! Tracking Cuts\r
277\r
278 // Before PID cut\r
279 // G Maps delta phi as function of deltaphi, centrality, pt\r
280 THnSparseF *fDeltaPhiMapsBeforePID; //! Delta phi\r
281 // H Maps cos phi : cos, centrality, pt\r
282 THnSparseF *fCosPhiMapsBeforePID; //! Cos\r
283\r
8c1c76e9 284 // G Maps delta phi as function of deltaphi, centrality, pt\r
a8ef1999 285 THnSparseF *fDeltaPhiMaps; //! Delta phi\r
5cd679b7 286 THnSparseF *fDeltaPhiMapsContamination; //! Delta phi for contamination substraction\r
8c1c76e9 287 // H Maps cos phi : cos, centrality, pt\r
a8ef1999 288 THnSparseF *fCosPhiMaps; //! Cos\r
289 TProfile2D *fProfileCosPhiMaps; //! Profile Cos\r
0e30407a 290\r
291 // Background study: not statistic but tagged \r
2747660f 292 THnSparseF *fDeltaPhiMapsTaggedPhotonic; //! Delta phi\r
6733d981 293 //THnSparseF *fCosPhiMapsTaggedPhotonic; //! Cos\r
2747660f 294 THnSparseF *fDeltaPhiMapsTaggedNonPhotonic; //! Delta phi\r
6733d981 295 //THnSparseF *fCosPhiMapsTaggedNonPhotonic; //! Cos\r
2747660f 296 THnSparseF *fDeltaPhiMapsTaggedPhotonicLS; //! Delta phi\r
6733d981 297 //THnSparseF *fCosPhiMapsTaggedPhotonicLS; //! Cos\r
0e30407a 298\r
299 // Background study: centrality, pt, source\r
300 THnSparseF *fMCSourceDeltaPhiMaps; //! Source MC\r
301 // Background study: deltaphi, centrality, pt, minv, source\r
302 THnSparseF *fOppSignDeltaPhiMaps; //! Delta phi\r
303 THnSparseF *fSameSignDeltaPhiMaps; //! Delta phi\r
304 // Background study: angle, centrality, source\r
305 THnSparseF *fOppSignAngle; // ! Opening Angles\r
306 THnSparseF *fSameSignAngle; // ! Opening Angles\r
307\r
959ea9d8 308 TTreeSRedirector *fDebugStreamer; //!Debug streamer\r
309\r
310 Int_t FindMother(Int_t tr, AliMCEvent *mcEvent, Int_t &indexmother);\r
7b4c9210 311 Int_t CheckPdg(Int_t tr, AliMCEvent* mcEvent);\r
0e30407a 312 Int_t IsMotherGamma(Int_t tr, AliMCEvent* mcEvent);\r
313 Int_t IsMotherPi0(Int_t tr, AliMCEvent* mcEvent);\r
314 Int_t IsMotherC(Int_t tr, AliMCEvent* mcEvent);\r
315 Int_t IsMotherB(Int_t tr, AliMCEvent* mcEvent);\r
316 Int_t IsMotherEta(Int_t tr, AliMCEvent* mcEvent);\r
317 \r
8c1c76e9 318 \r
914042c2 319 ClassDef(AliAnalysisTaskFlowTPCTOFEPSP, 1); // analysisclass\r
8c1c76e9 320};\r
321\r
322#endif\r