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