]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.h
Add Lc to 3prong case
[u/mrichter/AliRoot.git] / PWGCF / EBYE / BalanceFunctions / AliAnalysisTaskBFPsi.h
CommitLineData
9fd4b54e 1#ifndef ALIANALYSISTASKBFPSI_H\r
2#define ALIANALYSISTASKBFPSI_H\r
0879e280 3\r
4// Analysis task for the BF vs Psi code\r
5// Authors: Panos Cristakoglou@cern.ch\r
6\r
7class TList;\r
8class TH1F;\r
9class TH2F;\r
f2e8af26 10class TH3F; \r
0879e280 11class TF1;\r
35aff0f3 12class TH3D;\r
0879e280 13\r
14class AliBalancePsi;\r
15class AliESDtrackCuts;\r
f06d59b3 16class AliEventPoolManager;\r
17\r
0879e280 18\r
19#include "AliAnalysisTaskSE.h"\r
20#include "AliBalancePsi.h"\r
21\r
22#include "AliPID.h" \r
23#include "AliPIDResponse.h"\r
24#include "AliPIDCombined.h"\r
25 \r
35aff0f3 26//================================correction\r
6fa567bd 27#define kCENTRALITY 101 \r
28//const Double_t centralityArrayForPbPb[kCENTRALITY+1] = {0.,5.,10.,20.,30.,40.,50.,60.,70.,80.};\r
29//const TString centralityArrayForPbPb_string[kCENTRALITY] = {"0-5","5-10","10-20","20-30","30-40","40-50","50-60","60-70","70-80"};\r
35aff0f3 30//================================correction\r
0879e280 31\r
32class AliAnalysisTaskBFPsi : public AliAnalysisTaskSE {\r
33 public:\r
34 AliAnalysisTaskBFPsi(const char *name = "AliAnalysisTaskBFPsi");\r
35 virtual ~AliAnalysisTaskBFPsi(); \r
35aff0f3 36 \r
0879e280 37 virtual void UserCreateOutputObjects();\r
38 virtual void UserExec(Option_t *option);\r
39 virtual void FinishTaskOutput();\r
40 virtual void Terminate(Option_t *);\r
41\r
35aff0f3 42 //========================correction\r
c3b1f1a5 43 virtual void SetInputCorrection(TString filename, \r
44 Int_t nCentralityBins, \r
45 Double_t *centralityArrayForCorrections);\r
35aff0f3 46 //========================correction\r
47\r
0879e280 48 void SetAnalysisObject(AliBalancePsi *const analysis) {\r
49 fBalance = analysis;\r
50 }\r
51 void SetShufflingObject(AliBalancePsi *const analysisShuffled) {\r
52 fRunShuffling = kTRUE;\r
53 fShuffledBalance = analysisShuffled;\r
54 }\r
f06d59b3 55 void SetMixingObject(AliBalancePsi *const analysisMixed) {\r
56 fRunMixing = kTRUE;\r
57 fMixedBalance = analysisMixed;\r
58 }\r
8cdfbf52 59 void SetMixingWithEventPlane(Bool_t bMixingWithEventPlane = kTRUE) { fRunMixingEventPlane = bMixingWithEventPlane; }\r
f06d59b3 60 void SetMixingTracks(Int_t tracks) { fMixingTracks = tracks; }\r
0879e280 61 void SetAnalysisCutObject(AliESDtrackCuts *const trackCuts) {\r
62 fESDtrackCuts = trackCuts;}\r
63 void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) {\r
64 fVxMax = vx;\r
65 fVyMax = vy;\r
66 fVzMax = vz;\r
67 }\r
68\r
69 //==============AOD analysis==============//\r
70 void SetAODtrackCutBit(Int_t bit){\r
71 nAODtrackCutBit = bit;\r
72 }\r
73\r
74 void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r
9fd4b54e 75 fPtMin = ptmin; fPtMax = ptmax;\r
76 fEtaMin = etamin; fEtaMax = etamax;\r
0879e280 77 }\r
78\r
79 void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){\r
80 fDCAxyCut = DCAxy;\r
81 fDCAzCut = DCAz;\r
82 }\r
83\r
84 void SetExtraTPCCutsAOD(Double_t maxTPCchi2, Int_t minNClustersTPC){\r
85 fTPCchi2Cut = maxTPCchi2;\r
86 fNClustersTPCCut = minNClustersTPC;\r
87 }\r
88\r
89 //==============MC analysis==============//\r
90 void SetKinematicsCutsMC(Double_t ptmin, Double_t ptmax,\r
91 Double_t etamin, Double_t etamax){\r
92 fPtMin = ptmin; fPtMax = ptmax;\r
93 fEtaMin = etamin; fEtaMax = etamax;\r
94 }\r
95 void UseFlowAfterBurner(TF1 *gDifferentialV2) {\r
96 fDifferentialV2 = gDifferentialV2;\r
97 fUseFlowAfterBurner = kTRUE;\r
98 }\r
99 void ExcludeResonancesInMC() {fExcludeResonancesInMC = kTRUE;}\r
100\r
101 void SetPDGCode(Int_t gPdgCode) {\r
102 fUseMCPdgCode = kTRUE;\r
103 fPDGCodeToBeAnalyzed = gPdgCode;\r
104 }\r
105\r
106 //Centrality\r
107 void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r
9fd4b54e 108 const char* GetCentralityEstimator(void) const {return fCentralityEstimator;}\r
0879e280 109 void SetCentralityPercentileRange(Double_t min, Double_t max) { \r
110 fUseCentrality = kTRUE;\r
111 fCentralityPercentileMin=min;\r
112 fCentralityPercentileMax=max;\r
113 }\r
114 void SetImpactParameterRange(Double_t min, Double_t max) { \r
115 fUseCentrality = kTRUE;\r
116 fImpactParameterMin=min;\r
117 fImpactParameterMax=max;\r
118 }\r
119\r
120 //multiplicity\r
9efce966 121 void SetMultiplicityRange(Double_t min, Double_t max) {\r
0879e280 122 fUseMultiplicity = kTRUE;\r
123 fNumberOfAcceptedTracksMin = min;\r
124 fNumberOfAcceptedTracksMax = max;}\r
125 \r
7556a0f0 126 // additional event cuts (default = kFALSE)\r
0879e280 127 void UseOfflineTrigger() {fUseOfflineTrigger = kTRUE;}\r
7556a0f0 128 void CheckFirstEventInChunk() {fCheckFirstEventInChunk = kTRUE;}\r
129 void CheckPileUp() {fCheckPileUp = kTRUE;}\r
0879e280 130 \r
131 //Acceptance filter\r
132 void SetAcceptanceParameterization(TF1 *parameterization) {\r
133 fAcceptanceParameterization = parameterization;}\r
134\r
135 //pid\r
136 enum kDetectorUsedForPID { kTPCpid, kTOFpid, kTPCTOF }; // default TPC & TOF pid (via GetTPCpid & GetTOFpid) \r
137 enum kParticleOfInterest { kMuon, kElectron, kPion, kKaon, kProton }; \r
138\r
139 void SetUseBayesianPID(Double_t gMinProbabilityValue) {\r
140 fUsePID = kTRUE; fUsePIDnSigma = kFALSE; fUsePIDPropabilities = kTRUE;\r
141 fMinAcceptedPIDProbability = gMinProbabilityValue; }\r
142\r
143 void SetUseNSigmaPID(Double_t gMaxNSigma) {\r
144 fUsePID = kTRUE; fUsePIDPropabilities = kFALSE; fUsePIDnSigma = kTRUE;\r
145 fPIDNSigma = gMaxNSigma; }\r
146\r
147 void SetParticleOfInterest(kParticleOfInterest poi) {\r
148 fParticleOfInterest = poi;}\r
149 void SetDetectorUsedForPID(kDetectorUsedForPID detConfig) {\r
150 fPidDetectorConfig = detConfig;}\r
f0fb4ac1 151 void SetEventClass(TString receivedEventClass){\r
152 fEventClass = receivedEventClass;\r
153 }\r
0879e280 154\r
c443da34 155 // electron rejection\r
156 void SetElectronRejection(Double_t gMaxNSigma){\r
157 fElectronRejection = kTRUE;\r
158 fElectronRejectionNSigma = gMaxNSigma;\r
159 }\r
160\r
35aff0f3 161\r
0879e280 162 private:\r
f06d59b3 163 Double_t IsEventAccepted(AliVEvent* event);\r
f0fb4ac1 164 Double_t GetRefMultiOrCentrality(AliVEvent* event);\r
f06d59b3 165 Double_t GetEventPlane(AliVEvent* event);\r
35aff0f3 166 //===============================correction\r
6fa567bd 167 Double_t GetTrackbyTrackCorrectionMatrix(Double_t vEta, \r
168 Double_t vPhi, \r
169 Double_t vPt, \r
170 Short_t vCharge, \r
171 Double_t gCentrality);\r
35aff0f3 172 //===============================correction\r
173 TObjArray* GetAcceptedTracks(AliVEvent* event, Double_t gCentrality, Double_t gReactionPlane);\r
174 TObjArray* GetShuffledTracks(TObjArray* tracks, Double_t gCentrality);\r
175 \r
0879e280 176 AliBalancePsi *fBalance; //BF object\r
177 Bool_t fRunShuffling;//run shuffling or not\r
178 AliBalancePsi *fShuffledBalance; //BF object (shuffled)\r
f06d59b3 179 Bool_t fRunMixing;//run mixing or not\r
8cdfbf52 180 Bool_t fRunMixingEventPlane;//run mixing with Event Plane\r
f06d59b3 181 Int_t fMixingTracks;\r
182 AliBalancePsi *fMixedBalance; //TriggeredBF object (mixed)\r
183 AliEventPoolManager* fPoolMgr; //! event pool manager\r
184\r
0879e280 185 TList *fList; //fList object\r
186 TList *fListBF; //fList object\r
187 TList *fListBFS; //fList object\r
f06d59b3 188 TList *fListBFM; //fList object\r
0879e280 189 TList *fHistListPIDQA; //! list of histograms\r
190\r
6b046844 191 TH2F *fHistEventStats; //event stats\r
0879e280 192 TH2F *fHistCentStats; //centrality stats\r
193 TH1F *fHistTriggerStats; //trigger stats\r
194 TH1F *fHistTrackStats; //Track filter bit stats\r
195 TH1F *fHistVx; //x coordinate of the primary vertex\r
196 TH1F *fHistVy; //y coordinate of the primary vertex\r
6b046844 197 TH2F *fHistVz; //z coordinate of the primary vertex\r
0879e280 198\r
6b046844 199 TH2F *fHistEventPlane; //event plane distribution\r
0879e280 200\r
9fd4b54e 201 TH2F *fHistClus;//number of clusters (QA histogram)\r
202 TH2F *fHistDCA;//DCA (QA histogram)\r
203 TH2F *fHistChi2;//track chi2 (QA histogram)\r
204 TH2F *fHistPt;//transverse momentum (QA histogram)\r
205 TH2F *fHistEta;//pseudorapidity (QA histogram)\r
206 TH2F *fHistRapidity;//rapidity (QA histogram)\r
207 TH2F *fHistPhi;//phi (QA histogram)\r
f2e8af26 208 TH3F *fHistEtaPhiPos;//eta-phi pos particles (QA histogram) \r
209 TH3F *fHistEtaPhiNeg;//eta-phi neg particles (QA histogram)\r
9fd4b54e 210 TH2F *fHistPhiBefore;//phi before v2 afterburner (QA histogram)\r
211 TH2F *fHistPhiAfter;//phi after v2 afterburner (QA histogram)\r
212 TH2F *fHistPhiPos;//phi for positive particles (QA histogram)\r
213 TH2F *fHistPhiNeg;//phi for negative particles (QA histogram)\r
214 TH2F *fHistV0M;//V0 multiplicities (QA histogram)\r
215 TH2F *fHistRefTracks;//reference track multiplicities (QA histogram)\r
0879e280 216\r
217 //============PID============//\r
9fd4b54e 218 TH2D *fHistdEdxVsPTPCbeforePID;//TPC dEdx vs momentum before PID cuts (QA histogram)\r
219 TH2D *fHistBetavsPTOFbeforePID;//beta vs momentum before PID cuts (QA histogram)\r
220 TH2D *fHistProbTPCvsPtbeforePID; //TPC probability vs pT before PID cuts (QA histogram)\r
221 TH2D *fHistProbTOFvsPtbeforePID;//TOF probability vs pT before PID cuts (QA histogram)\r
222 TH2D *fHistProbTPCTOFvsPtbeforePID;//TOF/TPC probability vs pT before PID cuts (QA histogram)\r
223 TH2D *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram)\r
224 TH2D *fHistNSigmaTOFvsPtbeforePID;//TOF nsigma vs pT before PID cuts (QA histogram)\r
225 TH2D *fHistdEdxVsPTPCafterPID;//TPC dEdx vs momentum after PID cuts (QA histogram)\r
226 TH2D *fHistBetavsPTOFafterPID;//beta vs momentum after PID cuts (QA histogram)\r
227 TH2D *fHistProbTPCvsPtafterPID; //TPC probability vs pT after PID cuts (QA histogram)\r
228 TH2D *fHistProbTOFvsPtafterPID;//TOF probability vs pT after PID cuts (QA histogram)\r
229 TH2D *fHistProbTPCTOFvsPtafterPID;//TOF/TPC probability vs pT after PID cuts (QA histogram)\r
230 TH2D *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram)\r
231 TH2D *fHistNSigmaTOFvsPtafterPID;//TOF nsigma vs pT after PID cuts (QA histogram)\r
35aff0f3 232 \r
d79d2934 233 TH3F *fHistCorrectionPlus[kCENTRALITY]; //====correction\r
234 TH3F *fHistCorrectionMinus[kCENTRALITY]; //===correction\r
6fa567bd 235 Double_t fCentralityArrayForCorrections[kCENTRALITY];\r
236 Int_t fCentralityArrayBinsForCorrections;\r
0879e280 237\r
238 AliPIDResponse *fPIDResponse; //! PID response object\r
239 AliPIDCombined *fPIDCombined; //! combined PID object\r
240 \r
9fd4b54e 241 kParticleOfInterest fParticleOfInterest;//analyzed particle\r
242 kDetectorUsedForPID fPidDetectorConfig;//used detector for PID\r
243\r
244 Bool_t fUsePID; //flag to use PID \r
245 Bool_t fUsePIDnSigma;//flag to use nsigma method for PID\r
246 Bool_t fUsePIDPropabilities;//flag to use probability method for PID\r
247 Double_t fPIDNSigma;//nsigma cut for PID\r
248 Double_t fMinAcceptedPIDProbability;//probability cut for PID\r
1cb2a06e 249\r
c443da34 250 Bool_t fElectronRejection;//flag to use electron rejection\r
251 Double_t fElectronRejectionNSigma;//nsigma cut for electron rejection\r
252\r
0879e280 253 //============PID============//\r
254\r
255 AliESDtrackCuts *fESDtrackCuts; //ESD track cuts\r
256\r
257 TString fCentralityEstimator; //"V0M","TRK","TKL","ZDC","FMD"\r
258 Bool_t fUseCentrality;//use the centrality (PbPb) or not (pp)\r
259 Double_t fCentralityPercentileMin;//centrality percentile min\r
260 Double_t fCentralityPercentileMax;//centrality percentile max\r
261 Double_t fImpactParameterMin;//impact parameter min (used for MC)\r
262 Double_t fImpactParameterMax;//impact parameter max (used for MC)\r
263\r
264 Bool_t fUseMultiplicity;//use the multiplicity cuts\r
9efce966 265 Double_t fNumberOfAcceptedTracksMin;//min. number of number of accepted tracks (used for the multiplicity dependence study - pp)\r
266 Double_t fNumberOfAcceptedTracksMax;//max. number of number of accepted tracks (used for the multiplicity dependence study - pp)\r
6b046844 267 TH2F *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks\r
0879e280 268\r
269 Bool_t fUseOfflineTrigger;//Usage of the offline trigger selection\r
7556a0f0 270 Bool_t fCheckFirstEventInChunk;//Usage of the "First Event in Chunk" check (not needed for new productions)\r
271 Bool_t fCheckPileUp;//Usage of the "Pile-Up" event check\r
0879e280 272\r
273 Double_t fVxMax;//vxmax\r
274 Double_t fVyMax;//vymax\r
275 Double_t fVzMax;//vzmax\r
276\r
277 Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs)\r
278\r
279 Double_t fPtMin;//only used for AODs\r
280 Double_t fPtMax;//only used for AODs\r
35aff0f3 281 Double_t fPtMinForCorrections;//only used for AODs\r
282 Double_t fPtMaxForCorrections;//only used for AODs\r
283 Double_t fPtBinForCorrections; //=================================correction\r
0879e280 284 Double_t fEtaMin;//only used for AODs\r
285 Double_t fEtaMax;//only used for AODs\r
35aff0f3 286 Double_t fEtaMinForCorrections;//only used for AODs\r
287 Double_t fEtaMaxForCorrections;//only used for AODs\r
288 Double_t fEtaBinForCorrections; //=================================correction\r
289 Double_t fPhiMin; //=================================correction \r
290 Double_t fPhiMax; //=================================correction\r
291 Double_t fPhiMinForCorrections;//only used for AODs\r
292 Double_t fPhiMaxForCorrections;//only used for AODs\r
293 Double_t fPhiBinForCorrections; //=================================correction\r
0879e280 294\r
295 Double_t fDCAxyCut;//only used for AODs\r
296 Double_t fDCAzCut;//only used for AODs\r
297\r
298 Double_t fTPCchi2Cut;//only used for AODs\r
299 Int_t fNClustersTPCCut;//only used for AODs\r
300\r
301 TF1 *fAcceptanceParameterization;//acceptance filter used for MC\r
302\r
303 TF1 *fDifferentialV2;//pt-differential v2 (from real data)\r
304 Bool_t fUseFlowAfterBurner;//Usage of a flow after burner\r
305\r
306 Bool_t fExcludeResonancesInMC;//flag to exclude the resonances' decay products from the MC analysis\r
307 Bool_t fUseMCPdgCode; //Boolean to analyze a set of particles in MC\r
308 Int_t fPDGCodeToBeAnalyzed; //Analyze a set of particles in MC\r
f0fb4ac1 309 TString fEventClass; //Can be "EventPlane", "Centrality", "Multiplicity"\r
0879e280 310 \r
311\r
312 AliAnalysisTaskBFPsi(const AliAnalysisTaskBFPsi&); // not implemented\r
313 AliAnalysisTaskBFPsi& operator=(const AliAnalysisTaskBFPsi&); // not implemented\r
314 \r
5c01a71f 315 ClassDef(AliAnalysisTaskBFPsi, 6); // example of analysis\r
0879e280 316};\r
317\r
f06d59b3 318\r
319\r
0879e280 320#endif\r