1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18 // Modified version of AliAnalysisTaskCheckCascade.h
19 // Used bits of code from AliAnalysisTaskCheckPerformanceStrange
21 // --- David Dobrigkeit Chinellato
23 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25 #ifndef ALIANALYSISTASKEXTRACTPERFORMANCEV0_H
26 #define ALIANALYSISTASKEXTRACTPERFORMANCEV0_H
36 class AliESDtrackCuts;
38 class AliPhysicsSelection;
41 //#include "TString.h"
42 //#include "AliESDtrackCuts.h"
43 #include "AliAnalysisTaskSE.h"
45 class AliAnalysisTaskExtractPerformanceV0 : public AliAnalysisTaskSE {
47 AliAnalysisTaskExtractPerformanceV0();
48 AliAnalysisTaskExtractPerformanceV0(const char *name);
49 virtual ~AliAnalysisTaskExtractPerformanceV0();
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;
55 void CheckChargeV0(AliESDv0 *thisv0);
57 void SetIsNuclear (Bool_t lIsNuclear = kTRUE ) { fkIsNuclear = lIsNuclear; }
58 void SetINT7Trigger (Bool_t lSwitchINT7 = kTRUE ) { fkSwitchINT7 = lSwitchINT7; }
59 void SetUseOnTheFly (Bool_t lUseOnTheFly = kTRUE ) { fkUseOnTheFly = lUseOnTheFly; }
60 void SetTakeAllTracks (Bool_t lTakeAllTracks = kTRUE ) { fkTakeAllTracks = lTakeAllTracks; }
61 void SetpARapidityShift (Double_t lRapShift = 0.465 ) { fpArapidityShift = lRapShift; }
62 void SetCentralityEstimator (TString lCentralityEstimator = "V0M" ) { fCentralityEstimator = lCentralityEstimator; }
63 void SetLightWeightAnalysis (Bool_t lLightWeight = kTRUE) {fkLightWeight = lLightWeight; }
66 // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
67 // your data member object is created on the worker nodes and streaming is not needed.
68 // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
69 TList *fListHistV0; //! List of Cascade histograms
70 TTree *fTree; //! Output Tree, V0
72 AliPIDResponse *fPIDResponse; // PID response object
73 AliESDtrackCuts *fESDtrackCuts; // ESD track cuts used for primary track definition
76 //Objects Controlling Task Behaviour
78 Bool_t fkIsNuclear; //if true, replace multiplicity est. by centrality (default FALSE)
79 Bool_t fkSwitchINT7 ; //if true, skip FASTOnly (default FALSE)
80 Bool_t fkUseOnTheFly; //if true, will use On-the-fly V0s instead of Offline V0s (default FALSE)
81 Bool_t fkTakeAllTracks; // if true, no TPC crossed rows and ratio cut
82 Double_t fpArapidityShift; //pA rapidity shift (should be 0.465, usually)
83 TString fCentralityEstimator; //Centrality Estimator String value (default V0M)
85 Bool_t fkLightWeight; //if true, skip a number of debugging information branches in TTree
86 //(to make resulting tree output significantly smaller!
88 //===========================================================================================
89 // Variables for Tree, V0s
90 //===========================================================================================
91 Int_t fTreeVariablePrimaryStatus; //!
92 Int_t fTreeVariablePrimaryStatusMother; //!
93 Float_t fTreeVariableChi2V0; //!
94 Float_t fTreeVariableDcaV0Daughters; //!
95 Float_t fTreeVariableDcaV0ToPrimVertex; //!
96 Float_t fTreeVariableDcaPosToPrimVertex; //!
97 Float_t fTreeVariableDcaNegToPrimVertex; //!
98 Float_t fTreeVariableV0CosineOfPointingAngle; //!
99 Float_t fTreeVariableV0Radius; //!
100 Float_t fTreeVariablePt; //!
101 Float_t fTreeVariablePtMC; //!
102 Float_t fTreeVariableRapK0Short; //!
103 Float_t fTreeVariableRapLambda; //!
104 Float_t fTreeVariableRapMC; //!
105 Float_t fTreeVariableInvMassK0s; //!
106 Float_t fTreeVariableInvMassLambda; //!
107 Float_t fTreeVariableInvMassAntiLambda; //!
108 Float_t fTreeVariableAlphaV0; //!
109 Float_t fTreeVariablePtArmV0;//!
110 Float_t fTreeVariableNegTotMomentum; //!
111 Float_t fTreeVariablePosTotMomentum; //!
112 Float_t fTreeVariableNegTransvMomentum; //!
113 Float_t fTreeVariablePosTransvMomentum; //!
114 Float_t fTreeVariableNegTransvMomentumMC; //!
115 Float_t fTreeVariablePosTransvMomentumMC; //!
117 Float_t fTreeVariableNSigmasPosProton; //!
118 Float_t fTreeVariableNSigmasPosPion; //!
119 Float_t fTreeVariableNSigmasNegProton; //!
120 Float_t fTreeVariableNSigmasNegPion; //!
122 Float_t fTreeVariablePtMother; //!
123 Float_t fTreeVariableV0CreationRadius; //!
124 Int_t fTreeVariablePID; //!
125 Int_t fTreeVariablePIDPositive; //!
126 Int_t fTreeVariablePIDNegative; //!
127 Int_t fTreeVariablePIDMother; //!
128 Int_t fTreeVariableIndexStatus; //!
129 Int_t fTreeVariableIndexStatusMother; //!
131 Int_t fTreeVariableRunNumber; //!
132 ULong64_t fTreeVariableEventNumber; //!
134 //Note: TDistOverTotMom needs a mass hypothesis to be converted to proper decaylength.
135 Float_t fTreeVariableDistOverTotMom;//!
137 Float_t fTreeVariablePosEta; //!
138 Float_t fTreeVariableNegEta; //!
140 Float_t fTreeVariableVertexZ; //!
142 Int_t fTreeVariableLeastNbrCrossedRows;//!
143 Float_t fTreeVariableLeastRatioCrossedRowsOverFindable;//!
144 Int_t fTreeVariableMultiplicity;//!
145 Int_t fTreeVariableMultiplicityMC;//!
147 Float_t fTreeVariableV0x; //!
148 Float_t fTreeVariableV0y; //!
149 Float_t fTreeVariableV0z; //!
151 Float_t fTreeVariableV0Px; //!
152 Float_t fTreeVariableV0Py; //!
153 Float_t fTreeVariableV0Pz; //!
155 Float_t fTreeVariableMCV0x; //!
156 Float_t fTreeVariableMCV0y; //!
157 Float_t fTreeVariableMCV0z; //!
159 Float_t fTreeVariableMCV0Px; //!
160 Float_t fTreeVariableMCV0Py; //!
161 Float_t fTreeVariableMCV0Pz; //!
163 Float_t fTreeVariablePVx; //!
164 Float_t fTreeVariablePVy; //!
165 Float_t fTreeVariablePVz; //!
167 Float_t fTreeVariableMCPVx; //!
168 Float_t fTreeVariableMCPVy; //!
169 Float_t fTreeVariableMCPVz; //!
171 Bool_t fTreeVariableIsNonInjected; //!
172 //Decay Length issue debugging: ULong_t with track status
173 ULong64_t fTreeVariableNegTrackStatus;
174 ULong64_t fTreeVariablePosTrackStatus;
176 //===========================================================================================
178 //===========================================================================================
180 TH1F *fHistV0MultiplicityBeforeTrigSel; //! V0 multiplicity distribution
181 TH1F *fHistV0MultiplicityForTrigEvt; //! V0 multiplicity distribution
182 TH1F *fHistV0MultiplicityForSelEvt; //! V0 multiplicity distribution
183 TH1F *fHistV0MultiplicityForSelEvtNoTPCOnly; //! V0 multiplicity distribution
184 TH1F *fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup; //! V0 multiplicity distribution
186 TH1F *fHistMultiplicityBeforeTrigSel; //! multiplicity distribution
187 TH1F *fHistMultiplicityForTrigEvt; //! multiplicity distribution
188 TH1F *fHistMultiplicity; //! multiplicity distribution
189 TH1F *fHistMultiplicityNoTPCOnly; //! multiplicity distribution
190 TH1F *fHistMultiplicityNoTPCOnlyNoPileup; //! multiplicity distribution
192 //Raw Data for J/Psi paper Technique
193 TH2F *f2dHistMultiplicityVsTrueBeforeTrigSel; //! multiplicity distribution
194 TH2F *f2dHistMultiplicityVsTrueForTrigEvt; //! multiplicity distribution
195 TH2F *f2dHistMultiplicityVsTrue; //! multiplicity distribution
196 TH2F *f2dHistMultiplicityVsTrueNoTPCOnly; //! multiplicity distribution
197 TH2F *f2dHistMultiplicityVsTrueNoTPCOnlyNoPileup; //! multiplicity distribution
199 //Raw Data for Vertex Z position estimator change
200 TH2F *f2dHistMultiplicityVsVertexZBeforeTrigSel; //! multiplicity distribution
201 TH2F *f2dHistMultiplicityVsVertexZForTrigEvt; //! multiplicity distribution
202 TH2F *f2dHistMultiplicityVsVertexZ; //! multiplicity distribution
203 TH2F *f2dHistMultiplicityVsVertexZNoTPCOnly; //! multiplicity distribution
204 TH2F *f2dHistMultiplicityVsVertexZNoTPCOnlyNoPileup; //! multiplicity distribution
206 TH1F *fHistGenVertexZBeforeTrigSel; //! multiplicity distribution
207 TH1F *fHistGenVertexZForTrigEvt; //! multiplicity distribution
208 TH1F *fHistGenVertexZ; //! multiplicity distribution
209 TH1F *fHistGenVertexZNoTPCOnly; //! multiplicity distribution
210 TH1F *fHistGenVertexZNoTPCOnlyNoPileup; //! multiplicity distribution
212 //---> Filled At Analysis Scope
214 TH3F *f3dHistPrimAnalysisPtVsYVsMultLambda; //! Lambda
215 TH3F *f3dHistPrimAnalysisPtVsYVsMultAntiLambda; //! AntiLambda
216 TH3F *f3dHistPrimAnalysisPtVsYVsMultK0Short; //! K0Short
218 TH3F *f3dHistPrimAnalysisPtVsYCMSVsMultLambda; //! Lambda
219 TH3F *f3dHistPrimAnalysisPtVsYCMSVsMultAntiLambda; //! AntiLambda
220 TH3F *f3dHistPrimAnalysisPtVsYCMSVsMultK0Short; //! K0Short
222 //---> Containers for monte carlo information for calculating efficiency!
224 TH3F *f3dHistPrimRawPtVsYVsMultLambda; //! Lambda
225 TH3F *f3dHistPrimRawPtVsYVsMultAntiLambda; //! AntiLambda
226 TH3F *f3dHistPrimRawPtVsYVsMultK0Short; //! K0Short
228 TH3F *f3dHistPrimRawPtVsYCMSVsMultLambda; //! Lambda
229 TH3F *f3dHistPrimRawPtVsYCMSVsMultAntiLambda; //! AntiLambda
230 TH3F *f3dHistPrimRawPtVsYCMSVsMultK0Short; //! K0Short
232 TH3F *f3dHistPrimRawPtVsYVsMultNonInjLambda; //! Non-injected Lambda
233 TH3F *f3dHistPrimRawPtVsYVsMultNonInjAntiLambda; //! Non-injected AntiLambda
234 TH3F *f3dHistPrimRawPtVsYVsMultNonInjK0Short; //! Non-injected K0Short
236 TH3F *f3dHistPrimRawPtVsYVsMultMCLambda; //! Lambda
237 TH3F *f3dHistPrimRawPtVsYVsMultMCAntiLambda; //! AntiLambda
238 TH3F *f3dHistPrimRawPtVsYVsMultMCK0Short; //! K0Short
240 TH3F *f3dHistPrimRawPtVsYVsVertexZLambda; //! Lambda
241 TH3F *f3dHistPrimRawPtVsYVsVertexZAntiLambda; //! AntiLambda
242 TH3F *f3dHistPrimRawPtVsYVsVertexZK0Short; //! K0Short
244 TH3F *f3dHistPrimCloseToPVPtVsYVsMultLambda; //! Lambda
245 TH3F *f3dHistPrimCloseToPVPtVsYVsMultAntiLambda; //! AntiLambda
246 TH3F *f3dHistPrimCloseToPVPtVsYVsMultK0Short; //! K0Short
248 //---> Filled vs Decay Length
250 TH3F *f3dHistPrimRawPtVsYVsDecayLengthLambda; //! Lambda
251 TH3F *f3dHistPrimRawPtVsYVsDecayLengthAntiLambda; //! AntiLambda
252 TH3F *f3dHistPrimRawPtVsYVsDecayLengthK0Short; //! K0Short
254 //---> Needed for FeedDown Corrections
256 TH3F *f3dHistGenPtVsYVsMultXiMinus; //! Generated Xi- Distrib
257 TH3F *f3dHistGenPtVsYVsMultXiPlus; //! Generated Xi+ Distrib
258 TH3F *f3dHistGenPtVsYVsMultOmegaMinus; //! Generated Omega- Distrib
259 TH3F *f3dHistGenPtVsYVsMultOmegaPlus; //! Generated Omega+ Distrib
261 TH3F *f3dHistGenSelectedPtVsYVsMultXiMinus; //! Generated Xi- Distrib, at event selection level
262 TH3F *f3dHistGenSelectedPtVsYVsMultXiPlus; //! Generated Xi+ Distrib, at event selection level
263 TH3F *f3dHistGenSelectedPtVsYVsMultOmegaMinus; //! Generated Omega- Distrib, at event selection level
264 TH3F *f3dHistGenSelectedPtVsYVsMultOmegaPlus; //! Generated Omega+ Distrib, at event selection level
266 TH3F *f3dHistGenPtVsYCMSVsMultXiMinus; //! Generated Xi- Distrib
267 TH3F *f3dHistGenPtVsYCMSVsMultXiPlus; //! Generated Xi+ Distrib
268 TH3F *f3dHistGenPtVsYCMSVsMultOmegaMinus; //! Generated Omega- Distrib
269 TH3F *f3dHistGenPtVsYCMSVsMultOmegaPlus; //! Generated Omega+ Distrib
271 TH3F *f3dHistGenSelectedPtVsYCMSVsMultXiMinus; //! Generated Xi- Distrib, at event selection level
272 TH3F *f3dHistGenSelectedPtVsYCMSVsMultXiPlus; //! Generated Xi+ Distrib, at event selection level
273 TH3F *f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus; //! Generated Omega- Distrib, at event selection level
274 TH3F *f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus; //! Generated Omega+ Distrib, at event selection level
276 TH1F *fHistPVx; //! PVx distrib
277 TH1F *fHistPVy; //! PVy distrib
278 TH1F *fHistPVz; //! PVz distrib
279 TH1F *fHistPVxAnalysis; //! PVx distrib
280 TH1F *fHistPVyAnalysis; //! PVy distrib
281 TH1F *fHistPVzAnalysis; //! PVz distrib
282 TH1F *fHistPVxAnalysisHasHighPtLambda; //! PVx distrib
283 TH1F *fHistPVyAnalysisHasHighPtLambda; //! PVy distrib
284 TH1F *fHistPVzAnalysisHasHighPtLambda; //! PVz distrib
286 TH1F *fHistSwappedV0Counter; //! Swapped v0 counter
288 AliAnalysisTaskExtractPerformanceV0(const AliAnalysisTaskExtractPerformanceV0&); // not implemented
289 AliAnalysisTaskExtractPerformanceV0& operator=(const AliAnalysisTaskExtractPerformanceV0&); // not implemented
291 ClassDef(AliAnalysisTaskExtractPerformanceV0, 11);