]>
Commit | Line | Data |
---|---|---|
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 | ||
58a496d1 | 22 | #ifndef ROOT_TArrayD |
23 | #include <TArrayD.h> | |
24 | #endif | |
c683985a | 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 | ||
58a496d1 | 99 | void SetPtBinning(const TArrayD &binning) { fPtBinning = binning; } |
100 | void SetPtBinning(Int_t nbins, const Double_t *const binning) { fPtBinning.Set(nbins+1, binning); } | |
c683985a | 101 | void SetContamination(TF1 * const function,Int_t k) { fContamination[k] = function; }; |
102 | void SetV2Contamination(TF1 * const function,Int_t k) { fv2contamination[k] = function; }; | |
58a496d1 | 103 | void SetAsFunctionOfP(Bool_t asFunctionOfP) { fAsFunctionOfP = asFunctionOfP; }; |
c683985a | 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;} | |
8b835997 | 127 | void SetVariableMultiplicity(Int_t variableMultiplicity) { fVariableMultiplicity = variableMultiplicity;} |
128 | void SetTriggerUsed(Int_t triggerUsed) { fTriggerUsed = triggerUsed;} | |
c683985a | 129 | void SetMCPID(Bool_t mcPID) { fMCPID = mcPID;}; |
130 | void SetNoPID(Bool_t noPID) { fNoPID = noPID;}; | |
131 | ||
132 | void SetMonitorEventPlane(Bool_t monitorEventPlane) { fMonitorEventPlane = monitorEventPlane;}; | |
133 | void SetMonitorContamination(Bool_t monitorContamination) { fMonitorContamination = monitorContamination;}; | |
134 | void SetMonitorPhotonic(Bool_t monitorPhotonic) { fMonitorPhotonic = monitorPhotonic;}; | |
135 | void SetMonitorWithoutPID(Bool_t monitorWithoutPID) { fMonitorWithoutPID = monitorWithoutPID;}; | |
136 | void SetMonitorTrackCuts(Bool_t monitorTrackCuts) { fMonitorTrackCuts = monitorTrackCuts;}; | |
137 | void SetMonitorQCumulant(Bool_t monitorQCumulant) { fMonitorQCumulant = monitorQCumulant;}; | |
138 | ||
139 | Int_t GetNbBinsCentralityQCumulant() const { return fNbBinsCentralityQCumulant; }; | |
140 | Double_t GetBinCentralityLess(Int_t k) const { return fBinCentralityLess[k]; }; | |
141 | ||
142 | AliFlowCandidateTrack *MakeTrack( Double_t mass, Double_t pt, Double_t phi, Double_t eta) ; | |
143 | Double_t GetPhiAfterAddV2(Double_t phi,Double_t reactionPlaneAngle) const; | |
144 | ||
145 | void SetMaxInvmass(Double_t maxInvmass) { fMaxInvmass = maxInvmass; }; | |
146 | void SetMaxopening3D(Double_t maxOpening3D) { fMaxopening3D = maxOpening3D; }; | |
147 | void SetMaxopeningtheta(Double_t maxOpeningtheta) { fMaxopeningtheta = maxOpeningtheta; }; | |
148 | void SetMaxopeningphi(Double_t maxOpeningphi) { fMaxopeningphi = maxOpeningphi; }; | |
149 | void SetAlgorithmMA(Bool_t algorithmMA) { fAlgorithmMA = algorithmMA; }; | |
150 | void SetMassConstraint(Bool_t massConstraint) { fSetMassConstraint = massConstraint; }; | |
151 | void SetPileUpCut(Bool_t cut=kTRUE) { fPileUpCut=cut; } | |
152 | ||
153 | Int_t LookAtNonHFE(Int_t iTrack1, AliVTrack *track1, AliVEvent *fESD, AliMCEvent *mcEvent,Int_t binct,Double_t deltaphi,Int_t source,Int_t indexmother); | |
154 | ||
155 | private: | |
156 | TList *fListHist; //! TH list | |
157 | Bool_t fAODAnalysis; // AOD analysis | |
158 | ULong_t fFilter; // reconstruction AOD status flags | |
159 | AliAODMCHeader *fAODMCHeader; // ! MC info AOD | |
160 | TClonesArray *fAODArrayMCInfo; // ! MC info particle AOD | |
161 | AliHFENonPhotonicElectron *fBackgroundSubtraction; // Background subtraction | |
162 | ||
163 | Bool_t fVZEROEventPlane; // Use Event Planes from VZERO | |
164 | Bool_t fVZEROEventPlaneA; // Use Event Planes from VZERO A | |
165 | Bool_t fVZEROEventPlaneC; // Use Event Planes from VZERO C | |
166 | ||
167 | Bool_t fSubEtaGapTPC; // bool to fill with eta gap | |
168 | Double_t fEtaGap; // Value of the eta gap | |
169 | ||
58a496d1 | 170 | TArrayD fPtBinning; // pt binning |
c683985a | 171 | Int_t fNbBinsCentralityQCumulant; // Number of Bins Q Cumulant |
172 | Double_t fBinCentralityLess[10]; // Centrality Bin lower value | |
173 | Int_t fNbBinsPtQCumulant; // Nbbinspt QCumulant method | |
174 | Double_t fMinPtQCumulant; // Min pt QCumulant method | |
175 | Double_t fMaxPtQCumulant; // Max pt QCumulant method | |
176 | Bool_t fAfterBurnerOn; // Add flow to all tracks | |
177 | Int_t fNonFlowNumberOfTrackClones; // number of times to clone the particles (nonflow) | |
178 | Double_t fV1; // Add Flow. Must be in range [0,0.5]. | |
179 | Double_t fV2; // Add Flow. Must be in range [0,0.5]. | |
180 | Double_t fV3; // Add Flow. Must be in range [0,0.5]. | |
181 | Double_t fV4; // Add Flow. Must be in range [0,0.5]. | |
182 | Double_t fV5; // Add Flow. Must be in range [0,0.5]. | |
183 | Int_t fMaxNumberOfIterations; // Max number of iteration for adding v2 | |
184 | Double_t fPrecisionPhi; // precision phi for adding v2 | |
185 | Bool_t fUseMCReactionPlane; // use MC reaction plane | |
186 | Bool_t fSP; // calculate using scalar product method (instead of event plane method) | |
8b835997 | 187 | Int_t fVariableMultiplicity; // Variable used to correct for multiplicity variations (0: SPD vertex, 1: GetNumberESDtracks, ) |
188 | Int_t fTriggerUsed; // Selected trigger | |
c683985a | 189 | |
190 | Bool_t fMCPID; // MC PID for electrons | |
191 | Bool_t fNoPID; // No PID for checks | |
192 | ||
193 | Double_t fChi2OverNDFCut; // Limit chi2 | |
194 | Double_t fMaxdca; // Limit dca | |
195 | Double_t fMaxopeningtheta; // Limit opening angle in theta | |
196 | Double_t fMaxopeningphi; // Limit opening angle in phi | |
197 | Double_t fMaxopening3D; // Limit opening 3D | |
198 | Double_t fMaxInvmass; // Limit invariant mass | |
199 | Bool_t fSetMassConstraint; // Set mass constraint | |
200 | ||
201 | ||
202 | Bool_t fMonitorEventPlane; // Monitor event plane | |
203 | Bool_t fMonitorContamination; // Monitor contamination | |
204 | Bool_t fMonitorPhotonic;// Monitor photonic | |
205 | Bool_t fMonitorWithoutPID;// Monitor without PID | |
206 | Bool_t fMonitorTrackCuts;// Monitor track cuts | |
207 | Bool_t fMonitorQCumulant;// Monitor Q cumulant | |
208 | ||
209 | // Cuts for FLOW PWG2 | |
210 | AliFlowTrackCuts* fcutsRP; //! Reference particle cut | |
211 | AliFlowTrackCuts* fcutsPOI; //! Particle Of Interest cut | |
212 | ||
213 | // Cuts for HFE | |
214 | AliHFEcuts *fHFECuts; // HFE cuts | |
215 | AliHFEpid *fPID; // PID cuts | |
216 | AliHFEpid *fPIDTOFOnly; // PID cuts TOF only | |
217 | AliHFEpidQAmanager *fPIDqa; // QA Manager | |
218 | AliFlowEvent *fflowEvent; //! Flow event | |
219 | ||
220 | // Hadron Contamination | |
58a496d1 | 221 | Bool_t fAsFunctionOfP; // contamination parametrization as function of p or pt |
c683985a | 222 | 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) |
223 | 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) | |
224 | ||
225 | // Cuts for background study | |
226 | AliESDtrackCuts *fHFEBackgroundCuts; // HFE background cuts | |
227 | AliHFEpid *fPIDBackground; // PID background cuts | |
228 | AliHFEpidQAmanager *fPIDBackgroundqa; // QA Manager Background | |
229 | Bool_t fAlgorithmMA; // algorithm MA | |
230 | ||
231 | // List of tracks | |
232 | TArrayI *fArraytrack; //! list of tracks | |
233 | Int_t fCounterPoolBackground; // number of tracks | |
234 | ||
235 | // VZERO Event plane after calibration 2010 | |
236 | AliHFEVZEROEventPlane *fHFEVZEROEventPlane; // VZERO event plane calibrated | |
237 | ||
238 | // Histos | |
239 | TH2D *fHistEV; //! Number of events | |
240 | THnSparseF *fHistPileUp; //! Pile up histogram | |
241 | Bool_t fPileUpCut; | |
242 | ||
243 | // A Event plane as function of phiepa, phiepb, phiepc, phiepd centrality | |
244 | // a V0A, b V0C, c TPC, | |
245 | THnSparseF *fEventPlane; //! Event plane | |
246 | ||
247 | // B Event Plane after subtraction as function of phiep, centrality | |
248 | THnSparseF *fEventPlaneaftersubtraction; //! Event plane | |
249 | ||
250 | // Contamination | |
251 | THnSparseF *fFractionContamination; //! Fraction of contamination as function of pt | |
252 | TProfile2D *fContaminationv2; //! v2 of contamination | |
58a496d1 | 253 | TProfile2D *fContaminationmeanpt; //! mean pt for contamination |
c683985a | 254 | |
255 | // Monitoring Event plane: cos2phi, sin2phi, centrality | |
256 | THnSparseF *fCosSin2phiep; //! Cos(2phi), Sin(2phi) | |
257 | ||
258 | // E Monitoring Event plane after subtraction of the track: cos, centrality, pt, eta | |
259 | THnSparseF *fCos2phie; //! Monitoring | |
260 | THnSparseF *fSin2phie; //! Monitoring | |
261 | THnSparseF *fCos2phiep; //! Monitoring | |
262 | THnSparseF *fSin2phiep; //! Monitoring | |
263 | THnSparseF *fSin2phiephiep; //! Monitoring | |
264 | ||
265 | // Fbis Resolution as function of cosres, cosres, cosres, centrality for three subevents (V0) | |
266 | // a V0A, b V0C, c TPC | |
267 | THnSparseF *fCosResabc; //! Res | |
268 | THnSparseF *fSinResabc; //! Res | |
269 | TProfile *fProfileCosResab; //! Profile Res_a_b | |
270 | TProfile *fProfileCosResac; //! Profile Res_a_c | |
271 | TProfile *fProfileCosResbc; //! Profile Res_b_c | |
272 | ||
273 | // F Resolution as function of cosres, centrality for two subevents (TPC) | |
274 | THnSparseF *fCosRes; //! Res | |
275 | THnSparseF *fSinRes; //! Res | |
276 | TProfile *fProfileCosRes; //! Profile Res | |
277 | ||
278 | // Debuging Cuts step by step all centrality together: pt, step (6) | |
279 | THnSparseF *fTrackingCuts; //! Tracking Cuts | |
280 | ||
281 | // Before PID cut | |
282 | // G Maps delta phi as function of deltaphi, centrality, pt | |
283 | THnSparseF *fDeltaPhiMapsBeforePID; //! Delta phi | |
284 | // H Maps cos phi : cos, centrality, pt | |
285 | THnSparseF *fCosPhiMapsBeforePID; //! Cos | |
286 | ||
287 | // G Maps delta phi as function of deltaphi, centrality, pt | |
288 | THnSparseF *fDeltaPhiMaps; //! Delta phi | |
289 | THnSparseF *fDeltaPhiMapsContamination; //! Delta phi for contamination substraction | |
290 | // H Maps cos phi : cos, centrality, pt | |
291 | THnSparseF *fCosPhiMaps; //! Cos | |
292 | TProfile2D *fProfileCosPhiMaps; //! Profile Cos | |
293 | ||
294 | // Background study: not statistic but tagged | |
295 | THnSparseF *fDeltaPhiMapsTaggedPhotonic; //! Delta phi | |
296 | //THnSparseF *fCosPhiMapsTaggedPhotonic; //! Cos | |
297 | THnSparseF *fDeltaPhiMapsTaggedNonPhotonic; //! Delta phi | |
298 | //THnSparseF *fCosPhiMapsTaggedNonPhotonic; //! Cos | |
299 | THnSparseF *fDeltaPhiMapsTaggedPhotonicLS; //! Delta phi | |
300 | //THnSparseF *fCosPhiMapsTaggedPhotonicLS; //! Cos | |
301 | ||
302 | // Background study: centrality, pt, source | |
303 | THnSparseF *fMCSourceDeltaPhiMaps; //! Source MC | |
304 | // Background study: deltaphi, centrality, pt, minv, source | |
305 | THnSparseF *fOppSignDeltaPhiMaps; //! Delta phi | |
306 | THnSparseF *fSameSignDeltaPhiMaps; //! Delta phi | |
307 | // Background study: angle, centrality, source | |
308 | THnSparseF *fOppSignAngle; // ! Opening Angles | |
309 | THnSparseF *fSameSignAngle; // ! Opening Angles | |
310 | ||
311 | TTreeSRedirector *fDebugStreamer; //!Debug streamer | |
312 | ||
313 | Int_t FindMother(Int_t tr, AliMCEvent *mcEvent, Int_t &indexmother); | |
314 | Int_t CheckPdg(Int_t tr, AliMCEvent* mcEvent); | |
315 | Int_t IsMotherGamma(Int_t tr, AliMCEvent* mcEvent); | |
316 | Int_t IsMotherPi0(Int_t tr, AliMCEvent* mcEvent); | |
317 | Int_t IsMotherC(Int_t tr, AliMCEvent* mcEvent); | |
318 | Int_t IsMotherB(Int_t tr, AliMCEvent* mcEvent); | |
319 | Int_t IsMotherEta(Int_t tr, AliMCEvent* mcEvent); | |
320 | ||
321 | ||
8b835997 | 322 | ClassDef(AliAnalysisTaskFlowTPCTOFEPSP, 3); // analysisclass |
c683985a | 323 | }; |
324 | ||
325 | #endif |