]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/STRANGENESS/LambdaK0/AliAnalysisTaskExtractPerformanceV0.h
Bug fix in acquistion of SPD centrality (CL1).
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0 / AliAnalysisTaskExtractPerformanceV0.h
CommitLineData
bcb6ffdb 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// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17//
18// Modified version of AliAnalysisTaskCheckCascade.h
19// Used bits of code from AliAnalysisTaskCheckPerformanceStrange
20//
21// --- David Dobrigkeit Chinellato
22//
23// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
24
25#ifndef ALIANALYSISTASKEXTRACTPERFORMANCEV0_H
26#define ALIANALYSISTASKEXTRACTPERFORMANCEV0_H
27
28class TList;
29class TH1F;
30class TH2F;
31class TH3F;
32class TVector3;
33class THnSparse;
34
35class AliESDpid;
36class AliESDtrackCuts;
37class AliESDEvent;
38class AliPhysicsSelection;
39class AliCFContainer;
40
41//#include "TString.h"
42//#include "AliESDtrackCuts.h"
43#include "AliAnalysisTaskSE.h"
44
45class AliAnalysisTaskExtractPerformanceV0 : public AliAnalysisTaskSE {
46 public:
47 AliAnalysisTaskExtractPerformanceV0();
48 AliAnalysisTaskExtractPerformanceV0(const char *name);
49 virtual ~AliAnalysisTaskExtractPerformanceV0();
50
51 virtual void UserCreateOutputObjects();
52 virtual void UserExec(Option_t *option);
53 virtual void Terminate(Option_t *);
54 Double_t MyRapidity(Double_t rE, Double_t rPz) const;
4f8ed367 55 void CheckChargeV0(AliESDv0 *thisv0);
548bd092 56
57 void SetIsNuclear (Bool_t lIsNuclear = kTRUE ) { fkIsNuclear = lIsNuclear; }
048f4f8f 58 void SetINT7Trigger (Bool_t lSwitchINT7 = kTRUE ) { fkSwitchINT7 = lSwitchINT7; }
548bd092 59 void SetUseOnTheFly (Bool_t lUseOnTheFly = kTRUE ) { fkUseOnTheFly = lUseOnTheFly; }
7f4db1cd 60 void SetTakeAllTracks (Bool_t lTakeAllTracks = kTRUE ) { fkTakeAllTracks = lTakeAllTracks; }
388b34d3 61 void SetpARapidityShift (Double_t lRapShift = 0.465 ) { fpArapidityShift = lRapShift; }
e039e6b3 62 void SetCentralityEstimator (TString lCentralityEstimator = "V0M" ) { fCentralityEstimator = lCentralityEstimator; }
c92e2e56 63 void SetLightWeightAnalysis (Bool_t lLightWeight = kTRUE) {fkLightWeight = lLightWeight; }
87e78684 64 void SetFastOnly (TString lFastOnly = "kFastOnly") {fkFastOnly = lFastOnly; }
bcb6ffdb 65
66 private:
67 // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
68 // your data member object is created on the worker nodes and streaming is not needed.
69 // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
70 TList *fListHistV0; //! List of Cascade histograms
c228a5af 71 TTree *fTree; //! Output Tree, V0
bcb6ffdb 72
548bd092 73 AliPIDResponse *fPIDResponse; // PID response object
76029adc 74 AliESDtrackCuts *fESDtrackCuts; // ESD track cuts used for primary track definition
9083ce79 75
548bd092 76
77 //Objects Controlling Task Behaviour
78
79 Bool_t fkIsNuclear; //if true, replace multiplicity est. by centrality (default FALSE)
048f4f8f 80 Bool_t fkSwitchINT7 ; //if true, skip FASTOnly (default FALSE)
548bd092 81 Bool_t fkUseOnTheFly; //if true, will use On-the-fly V0s instead of Offline V0s (default FALSE)
7f4db1cd 82 Bool_t fkTakeAllTracks; // if true, no TPC crossed rows and ratio cut
9083ce79 83 Double_t fpArapidityShift; //pA rapidity shift (should be 0.465, usually)
87e78684 84 TString fCentralityEstimator; //Centrality Estimator String value (default V0M, DEPRECATED)
c92e2e56 85 Bool_t fkLightWeight; //if true, skip a number of debugging information branches in TTree
86 //(to make resulting tree output significantly smaller!
87e78684 87 TString fkFastOnly; //"" if no extra selection, "kFastOnly" -> without SDD, "NotkFastOnly" -> With SDD
bcb6ffdb 88
c228a5af 89//===========================================================================================
90// Variables for Tree, V0s
91//===========================================================================================
bcb6ffdb 92 Int_t fTreeVariablePrimaryStatus; //!
93 Int_t fTreeVariablePrimaryStatusMother; //!
94 Float_t fTreeVariableChi2V0; //!
95 Float_t fTreeVariableDcaV0Daughters; //!
96 Float_t fTreeVariableDcaV0ToPrimVertex; //!
97 Float_t fTreeVariableDcaPosToPrimVertex; //!
98 Float_t fTreeVariableDcaNegToPrimVertex; //!
99 Float_t fTreeVariableV0CosineOfPointingAngle; //!
100 Float_t fTreeVariableV0Radius; //!
101 Float_t fTreeVariablePt; //!
102 Float_t fTreeVariablePtMC; //!
103 Float_t fTreeVariableRapK0Short; //!
104 Float_t fTreeVariableRapLambda; //!
105 Float_t fTreeVariableRapMC; //!
106 Float_t fTreeVariableInvMassK0s; //!
107 Float_t fTreeVariableInvMassLambda; //!
108 Float_t fTreeVariableInvMassAntiLambda; //!
109 Float_t fTreeVariableAlphaV0; //!
110 Float_t fTreeVariablePtArmV0;//!
111 Float_t fTreeVariableNegTotMomentum; //!
112 Float_t fTreeVariablePosTotMomentum; //!
113 Float_t fTreeVariableNegTransvMomentum; //!
114 Float_t fTreeVariablePosTransvMomentum; //!
115 Float_t fTreeVariableNegTransvMomentumMC; //!
116 Float_t fTreeVariablePosTransvMomentumMC; //!
117
118 Float_t fTreeVariableNSigmasPosProton; //!
119 Float_t fTreeVariableNSigmasPosPion; //!
120 Float_t fTreeVariableNSigmasNegProton; //!
121 Float_t fTreeVariableNSigmasNegPion; //!
122
123 Float_t fTreeVariablePtMother; //!
124 Float_t fTreeVariableV0CreationRadius; //!
125 Int_t fTreeVariablePID; //!
126 Int_t fTreeVariablePIDPositive; //!
127 Int_t fTreeVariablePIDNegative; //!
128 Int_t fTreeVariablePIDMother; //!
129 Int_t fTreeVariableIndexStatus; //!
130 Int_t fTreeVariableIndexStatusMother; //!
131
0eebce93 132 Int_t fTreeVariableRunNumber; //!
133 ULong64_t fTreeVariableEventNumber; //!
134
bcb6ffdb 135 //Note: TDistOverTotMom needs a mass hypothesis to be converted to proper decaylength.
136 Float_t fTreeVariableDistOverTotMom;//!
137
138 Float_t fTreeVariablePosEta; //!
139 Float_t fTreeVariableNegEta; //!
140
a18e0a39 141 Float_t fTreeVariableVertexZ; //!
142
bcb6ffdb 143 Int_t fTreeVariableLeastNbrCrossedRows;//!
144 Float_t fTreeVariableLeastRatioCrossedRowsOverFindable;//!
5d43de53 145
146 Int_t fTreeVariableMultiplicity;//!
147 Int_t fTreeVariableMultiplicityV0A;//!
148 Int_t fTreeVariableMultiplicityZNA;//!
149 Int_t fTreeVariableMultiplicityTRK;//!
150 Int_t fTreeVariableMultiplicitySPD;//!
151
a18e0a39 152 Int_t fTreeVariableMultiplicityMC;//!
bcb6ffdb 153
11960ef4 154 Float_t fTreeVariableV0x; //!
155 Float_t fTreeVariableV0y; //!
156 Float_t fTreeVariableV0z; //!
157
158 Float_t fTreeVariableV0Px; //!
159 Float_t fTreeVariableV0Py; //!
160 Float_t fTreeVariableV0Pz; //!
161
162 Float_t fTreeVariableMCV0x; //!
163 Float_t fTreeVariableMCV0y; //!
164 Float_t fTreeVariableMCV0z; //!
165
166 Float_t fTreeVariableMCV0Px; //!
167 Float_t fTreeVariableMCV0Py; //!
168 Float_t fTreeVariableMCV0Pz; //!
169
653265df 170 Float_t fTreeVariablePVx; //!
171 Float_t fTreeVariablePVy; //!
172 Float_t fTreeVariablePVz; //!
173
174 Float_t fTreeVariableMCPVx; //!
175 Float_t fTreeVariableMCPVy; //!
176 Float_t fTreeVariableMCPVz; //!
177
df661cb7 178 Bool_t fTreeVariableIsNonInjected; //!
f068724a 179 //Decay Length issue debugging: ULong_t with track status
180 ULong64_t fTreeVariableNegTrackStatus;
181 ULong64_t fTreeVariablePosTrackStatus;
df661cb7 182
c228a5af 183//===========================================================================================
184// Histograms
185//===========================================================================================
186
bcb6ffdb 187 TH1F *fHistV0MultiplicityBeforeTrigSel; //! V0 multiplicity distribution
188 TH1F *fHistV0MultiplicityForTrigEvt; //! V0 multiplicity distribution
189 TH1F *fHistV0MultiplicityForSelEvt; //! V0 multiplicity distribution
190 TH1F *fHistV0MultiplicityForSelEvtNoTPCOnly; //! V0 multiplicity distribution
191 TH1F *fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup; //! V0 multiplicity distribution
192
5d43de53 193 //Default V0M Centrality
bcb6ffdb 194 TH1F *fHistMultiplicityBeforeTrigSel; //! multiplicity distribution
195 TH1F *fHistMultiplicityForTrigEvt; //! multiplicity distribution
196 TH1F *fHistMultiplicity; //! multiplicity distribution
197 TH1F *fHistMultiplicityNoTPCOnly; //! multiplicity distribution
198 TH1F *fHistMultiplicityNoTPCOnlyNoPileup; //! multiplicity distribution
199
5d43de53 200 //V0A Centrality
201 TH1F *fHistMultiplicityV0ABeforeTrigSel; //! multiplicity distribution
202 TH1F *fHistMultiplicityV0AForTrigEvt; //! multiplicity distribution
203 TH1F *fHistMultiplicityV0A; //! multiplicity distribution
204 TH1F *fHistMultiplicityV0ANoTPCOnly; //! multiplicity distribution
205 TH1F *fHistMultiplicityV0ANoTPCOnlyNoPileup; //! multiplicity distribution
206
207 //ZNA Centrality
208 TH1F *fHistMultiplicityZNABeforeTrigSel; //! multiplicity distribution
209 TH1F *fHistMultiplicityZNAForTrigEvt; //! multiplicity distribution
210 TH1F *fHistMultiplicityZNA; //! multiplicity distribution
211 TH1F *fHistMultiplicityZNANoTPCOnly; //! multiplicity distribution
212 TH1F *fHistMultiplicityZNANoTPCOnlyNoPileup; //! multiplicity distribution
213
214 //TRK Centrality
215 TH1F *fHistMultiplicityTRKBeforeTrigSel; //! multiplicity distribution
216 TH1F *fHistMultiplicityTRKForTrigEvt; //! multiplicity distribution
217 TH1F *fHistMultiplicityTRK; //! multiplicity distribution
218 TH1F *fHistMultiplicityTRKNoTPCOnly; //! multiplicity distribution
219 TH1F *fHistMultiplicityTRKNoTPCOnlyNoPileup; //! multiplicity distribution
220
221 //SPD Centrality
222 TH1F *fHistMultiplicitySPDBeforeTrigSel; //! multiplicity distribution
223 TH1F *fHistMultiplicitySPDForTrigEvt; //! multiplicity distribution
224 TH1F *fHistMultiplicitySPD; //! multiplicity distribution
225 TH1F *fHistMultiplicitySPDNoTPCOnly; //! multiplicity distribution
226 TH1F *fHistMultiplicitySPDNoTPCOnlyNoPileup; //! multiplicity distribution
227
1d94e33b 228 //Raw Data for J/Psi paper Technique
229 TH2F *f2dHistMultiplicityVsTrueBeforeTrigSel; //! multiplicity distribution
230 TH2F *f2dHistMultiplicityVsTrueForTrigEvt; //! multiplicity distribution
231 TH2F *f2dHistMultiplicityVsTrue; //! multiplicity distribution
232 TH2F *f2dHistMultiplicityVsTrueNoTPCOnly; //! multiplicity distribution
233 TH2F *f2dHistMultiplicityVsTrueNoTPCOnlyNoPileup; //! multiplicity distribution
234
235 //Raw Data for Vertex Z position estimator change
236 TH2F *f2dHistMultiplicityVsVertexZBeforeTrigSel; //! multiplicity distribution
237 TH2F *f2dHistMultiplicityVsVertexZForTrigEvt; //! multiplicity distribution
238 TH2F *f2dHistMultiplicityVsVertexZ; //! multiplicity distribution
239 TH2F *f2dHistMultiplicityVsVertexZNoTPCOnly; //! multiplicity distribution
240 TH2F *f2dHistMultiplicityVsVertexZNoTPCOnlyNoPileup; //! multiplicity distribution
241
242 TH1F *fHistGenVertexZBeforeTrigSel; //! multiplicity distribution
243 TH1F *fHistGenVertexZForTrigEvt; //! multiplicity distribution
244 TH1F *fHistGenVertexZ; //! multiplicity distribution
245 TH1F *fHistGenVertexZNoTPCOnly; //! multiplicity distribution
246 TH1F *fHistGenVertexZNoTPCOnlyNoPileup; //! multiplicity distribution
247
bcb6ffdb 248//---> Filled At Analysis Scope
249
250 TH3F *f3dHistPrimAnalysisPtVsYVsMultLambda; //! Lambda
251 TH3F *f3dHistPrimAnalysisPtVsYVsMultAntiLambda; //! AntiLambda
252 TH3F *f3dHistPrimAnalysisPtVsYVsMultK0Short; //! K0Short
253
388b34d3 254 TH3F *f3dHistPrimAnalysisPtVsYCMSVsMultLambda; //! Lambda
255 TH3F *f3dHistPrimAnalysisPtVsYCMSVsMultAntiLambda; //! AntiLambda
256 TH3F *f3dHistPrimAnalysisPtVsYCMSVsMultK0Short; //! K0Short
257
bcb6ffdb 258//---> Containers for monte carlo information for calculating efficiency!
259
260 TH3F *f3dHistPrimRawPtVsYVsMultLambda; //! Lambda
261 TH3F *f3dHistPrimRawPtVsYVsMultAntiLambda; //! AntiLambda
262 TH3F *f3dHistPrimRawPtVsYVsMultK0Short; //! K0Short
263
388b34d3 264 TH3F *f3dHistPrimRawPtVsYCMSVsMultLambda; //! Lambda
265 TH3F *f3dHistPrimRawPtVsYCMSVsMultAntiLambda; //! AntiLambda
266 TH3F *f3dHistPrimRawPtVsYCMSVsMultK0Short; //! K0Short
267
df661cb7 268 TH3F *f3dHistPrimRawPtVsYVsMultNonInjLambda; //! Non-injected Lambda
269 TH3F *f3dHistPrimRawPtVsYVsMultNonInjAntiLambda; //! Non-injected AntiLambda
270 TH3F *f3dHistPrimRawPtVsYVsMultNonInjK0Short; //! Non-injected K0Short
271
a18e0a39 272 TH3F *f3dHistPrimRawPtVsYVsMultMCLambda; //! Lambda
273 TH3F *f3dHistPrimRawPtVsYVsMultMCAntiLambda; //! AntiLambda
274 TH3F *f3dHistPrimRawPtVsYVsMultMCK0Short; //! K0Short
275
276 TH3F *f3dHistPrimRawPtVsYVsVertexZLambda; //! Lambda
277 TH3F *f3dHistPrimRawPtVsYVsVertexZAntiLambda; //! AntiLambda
278 TH3F *f3dHistPrimRawPtVsYVsVertexZK0Short; //! K0Short
279
7e81bb32 280 TH3F *f3dHistPrimCloseToPVPtVsYVsMultLambda; //! Lambda
281 TH3F *f3dHistPrimCloseToPVPtVsYVsMultAntiLambda; //! AntiLambda
282 TH3F *f3dHistPrimCloseToPVPtVsYVsMultK0Short; //! K0Short
283
bcb6ffdb 284//---> Filled vs Decay Length
285
286 TH3F *f3dHistPrimRawPtVsYVsDecayLengthLambda; //! Lambda
287 TH3F *f3dHistPrimRawPtVsYVsDecayLengthAntiLambda; //! AntiLambda
288 TH3F *f3dHistPrimRawPtVsYVsDecayLengthK0Short; //! K0Short
289
290//---> Needed for FeedDown Corrections
291
292 TH3F *f3dHistGenPtVsYVsMultXiMinus; //! Generated Xi- Distrib
293 TH3F *f3dHistGenPtVsYVsMultXiPlus; //! Generated Xi+ Distrib
c228a5af 294 TH3F *f3dHistGenPtVsYVsMultOmegaMinus; //! Generated Omega- Distrib
295 TH3F *f3dHistGenPtVsYVsMultOmegaPlus; //! Generated Omega+ Distrib
296
297 TH3F *f3dHistGenSelectedPtVsYVsMultXiMinus; //! Generated Xi- Distrib, at event selection level
298 TH3F *f3dHistGenSelectedPtVsYVsMultXiPlus; //! Generated Xi+ Distrib, at event selection level
299 TH3F *f3dHistGenSelectedPtVsYVsMultOmegaMinus; //! Generated Omega- Distrib, at event selection level
300 TH3F *f3dHistGenSelectedPtVsYVsMultOmegaPlus; //! Generated Omega+ Distrib, at event selection level
e039e6b3 301
302 TH3F *f3dHistGenPtVsYCMSVsMultXiMinus; //! Generated Xi- Distrib
303 TH3F *f3dHistGenPtVsYCMSVsMultXiPlus; //! Generated Xi+ Distrib
304 TH3F *f3dHistGenPtVsYCMSVsMultOmegaMinus; //! Generated Omega- Distrib
305 TH3F *f3dHistGenPtVsYCMSVsMultOmegaPlus; //! Generated Omega+ Distrib
306
307 TH3F *f3dHistGenSelectedPtVsYCMSVsMultXiMinus; //! Generated Xi- Distrib, at event selection level
308 TH3F *f3dHistGenSelectedPtVsYCMSVsMultXiPlus; //! Generated Xi+ Distrib, at event selection level
309 TH3F *f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus; //! Generated Omega- Distrib, at event selection level
310 TH3F *f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus; //! Generated Omega+ Distrib, at event selection level
bcb6ffdb 311
312 TH1F *fHistPVx; //! PVx distrib
313 TH1F *fHistPVy; //! PVy distrib
314 TH1F *fHistPVz; //! PVz distrib
315 TH1F *fHistPVxAnalysis; //! PVx distrib
316 TH1F *fHistPVyAnalysis; //! PVy distrib
317 TH1F *fHistPVzAnalysis; //! PVz distrib
318 TH1F *fHistPVxAnalysisHasHighPtLambda; //! PVx distrib
319 TH1F *fHistPVyAnalysisHasHighPtLambda; //! PVy distrib
320 TH1F *fHistPVzAnalysisHasHighPtLambda; //! PVz distrib
321
4f8ed367 322 TH1F *fHistSwappedV0Counter; //! Swapped v0 counter
323
bcb6ffdb 324 AliAnalysisTaskExtractPerformanceV0(const AliAnalysisTaskExtractPerformanceV0&); // not implemented
325 AliAnalysisTaskExtractPerformanceV0& operator=(const AliAnalysisTaskExtractPerformanceV0&); // not implemented
326
327 ClassDef(AliAnalysisTaskExtractPerformanceV0, 11);
328};
329
330#endif