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