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