First version of the pid code for the balance function (Alis Rodriguez Manso)
[u/mrichter/AliRoot.git] / PWGCF / EBYE / BalanceFunctions / AliAnalysisTaskBF.h
CommitLineData
5c33329d 1#ifndef ALIANALYSISTASKBF_CXX\r
2#define ALIANALYSISTASKBF_CXX\r
3\r
4// Analysis task for the BF code\r
5// Authors: Panos Cristakoglou@cern.ch\r
6\r
2cd42194 7class TList;\r
8class TH1F;\r
3feee083 9class TH2F;\r
6fbd0608 10class TF1;\r
2cd42194 11\r
5c33329d 12class AliBalance;\r
5115b492 13class AliESDtrackCuts;\r
5c33329d 14\r
2cd42194 15#include "AliAnalysisTaskSE.h"\r
3feee083 16#include "AliBalance.h"\r
17\r
3c3bbd53 18#include "AliPID.h" \r
19#include "AliPIDResponse.h"\r
20#include "AliPIDCombined.h"\r
21 \r
22enum kDetectorUsedForPID { kTPCpid, kTOFpid, kTPCTOF }; // default TPC & TOF pid (via GetTPCpid & GetTOFpid) \r
23enum kParticleOfInterest { kMuon, kElectron, kPion, kKaon, kProton }; \r
5c33329d 24\r
2cd42194 25class AliAnalysisTaskBF : public AliAnalysisTaskSE {\r
5c33329d 26 public:\r
27 AliAnalysisTaskBF(const char *name = "AliAnalysisTaskBF");\r
6432ac6a 28 virtual ~AliAnalysisTaskBF(); \r
5c33329d 29 \r
3feee083 30 \r
2cd42194 31 virtual void UserCreateOutputObjects();\r
32 virtual void UserExec(Option_t *option);\r
3feee083 33 virtual void FinishTaskOutput();\r
5c33329d 34 virtual void Terminate(Option_t *);\r
9d1f0df5 35\r
10a747d2 36 void SetAnalysisObject(AliBalance *const analysis) {\r
1900bf4e 37 fBalance = analysis;\r
10a747d2 38 }\r
39 void SetShufflingObject(AliBalance *const analysisShuffled) {\r
40 fRunShuffling = kTRUE;\r
1900bf4e 41 fShuffledBalance = analysisShuffled;\r
42 }\r
5115b492 43 void SetAnalysisCutObject(AliESDtrackCuts *const trackCuts) {\r
44 fESDtrackCuts = trackCuts;}\r
48821416 45 void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) {\r
7f94638c 46 fVxMax = vx;\r
47 fVyMax = vy;\r
48 fVzMax = vz;\r
49 }\r
d9f855f3 50\r
51 //==============AOD analysis==============//\r
6432ac6a 52 void SetAODtrackCutBit(Int_t bit){\r
53 nAODtrackCutBit = bit;\r
54 }\r
d9f855f3 55\r
3feee083 56 void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r
57 fPtMin = ptmin;\r
58 fPtMax = ptmax;\r
59 fEtaMin = etamin;\r
60 fEtaMax = etamax;\r
61\r
62 }\r
d9f855f3 63\r
1900bf4e 64 void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){\r
65 fDCAxyCut = DCAxy;\r
66 fDCAzCut = DCAz;\r
a839b0a3 67 }\r
d9f855f3 68\r
a839b0a3 69 void SetExtraTPCCutsAOD(Double_t maxTPCchi2, Int_t minNClustersTPC){\r
70 fTPCchi2Cut = maxTPCchi2;\r
71 fNClustersTPCCut = minNClustersTPC;\r
1900bf4e 72 }\r
d9f855f3 73\r
74 //==============MC analysis==============//\r
10a747d2 75 void SetKinematicsCutsMC(Double_t ptmin, Double_t ptmax,\r
76 Double_t etamin, Double_t etamax){\r
77 fPtMin = ptmin; fPtMax = ptmax;\r
78 fEtaMin = etamin; fEtaMax = etamax;\r
79 }\r
985da7aa 80 void UseFlowAfterBurner(TF1 *gDifferentialV2) {\r
81 fDifferentialV2 = gDifferentialV2;\r
82 fUseFlowAfterBurner = kTRUE;\r
83 }\r
a1390237 84 void ExcludeResonancesInMC() {fExcludeResonancesInMC = kTRUE;}\r
85\r
d9f855f3 86 void SetPDGCode(Int_t gPdgCode) {\r
87 fUseMCPdgCode = kTRUE;\r
88 fPDGCodeToBeAnalyzed = gPdgCode;\r
89 }\r
90\r
3feee083 91 //Centrality\r
92 void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r
93 const char* GetCentralityEstimator(void) {return fCentralityEstimator;}\r
94 void SetCentralityPercentileRange(Double_t min, Double_t max) { \r
c735aca6 95 fUseCentrality = kTRUE;\r
3feee083 96 fCentralityPercentileMin=min;\r
97 fCentralityPercentileMax=max;\r
98 }\r
6e28a437 99 void SetImpactParameterRange(Double_t min, Double_t max) { \r
100 fUseCentrality = kTRUE;\r
101 fImpactParameterMin=min;\r
102 fImpactParameterMax=max;\r
103 }\r
7f94638c 104\r
6e28a437 105 //multiplicity\r
a5ab9ca3 106 void SetMultiplicityRange(Int_t min, Int_t max) {\r
6e28a437 107 fUseMultiplicity = kTRUE;\r
108 fNumberOfAcceptedTracksMin = min;\r
109 fNumberOfAcceptedTracksMax = max;}\r
110 \r
6fbd0608 111 void UseOfflineTrigger() {fUseOfflineTrigger = kTRUE;}\r
112 \r
113 //Acceptance filter\r
114 void SetAcceptanceParameterization(TF1 *parameterization) {\r
115 fAcceptanceParameterization = parameterization;}\r
09bb7bf4 116\r
3c3bbd53 117 //pid\r
118 void SetUseBayesianPID(Double_t gMinProbabilityValue) {\r
119 fUsePID = kTRUE; fUsePIDPropabilities = kTRUE;\r
120 fMinAcceptedPIDProbability = gMinProbabilityValue; }\r
121\r
122 void SetUseNSigmaPID(Double_t gMaxNSigma) {\r
123 fUsePID = kTRUE; fUsePIDnSigma = kTRUE;\r
124 fPIDNSigma = gMaxNSigma; }\r
125\r
126 void SetParticleOfInterest(kParticleOfInterest poi) {\r
127 fParticleOfInterest = poi;}\r
128 void SetDetectorUsedForPID(kDetectorUsedForPID detConfig) {\r
129 fPidDetectorConfig = detConfig;}\r
130\r
5c33329d 131 private:\r
5c33329d 132 AliBalance *fBalance; //BF object\r
10a747d2 133 Bool_t fRunShuffling;//run shuffling or not\r
1900bf4e 134 AliBalance *fShuffledBalance; //BF object (shuffled)\r
2cd42194 135 TList *fList; //fList object\r
3feee083 136 TList *fListBF; //fList object\r
6432ac6a 137 TList *fListBFS; //fList object\r
3c3bbd53 138 TList *fHistListPIDQA; //! list of histograms\r
3feee083 139\r
2cd42194 140 TH1F *fHistEventStats; //event stats\r
a0ce3c86 141 TH2F *fHistCentStats; //centrality stats\r
a839b0a3 142 TH1F *fHistTriggerStats; //trigger stats\r
3feee083 143 TH1F *fHistTrackStats; //Track filter bit stats\r
09bb7bf4 144 TH1F *fHistVx; //x coordinate of the primary vertex\r
145 TH1F *fHistVy; //y coordinate of the primary vertex\r
146 TH1F *fHistVz; //z coordinate of the primary vertex\r
2cd42194 147\r
4a1e5d10 148 TH2F *fHistClus;//\r
149 TH2F *fHistDCA;//\r
150 TH1F *fHistChi2;//\r
151 TH1F *fHistPt;//\r
152 TH1F *fHistEta;//\r
153 TH1F *fHistPhi;//\r
154 TH1F *fHistPhiBefore;//\r
155 TH1F *fHistPhiAfter;//\r
156 TH2F *fHistV0M;//\r
157 TH2F *fHistRefTracks;//\r
3feee083 158\r
3c3bbd53 159 //============PID============//\r
160 TH2D *fHistdEdxVsPTPCbeforePID;//\r
161 TH2D *fHistBetavsPTOFbeforePID;//\r
162 TH2D *fHistProbTPCvsPtbeforePID; //\r
163 TH2D *fHistProbTOFvsPtbeforePID;//\r
164 TH2D *fHistNSigmaTPCvsPtbeforePID;//\r
165 TH2D *fHistNSigmaTOFvsPtbeforePID;//\r
166 TH2D *fHistdEdxVsPTPCafterPID;//\r
167 TH2D *fHistBetavsPTOFafterPID;//\r
168 TH2D *fHistProbTPCvsPtafterPID;//\r
169 TH2D *fHistProbTOFvsPtafterPID;//\r
170 TH2D *fHistNSigmaTPCvsPtafterPID;//\r
171 TH2D *fHistNSigmaTOFvsPtafterPID; //\r
172\r
173 AliPIDResponse *fPIDResponse; //! PID response object\r
174 AliPIDCombined *fPIDCombined; //! combined PID object\r
175 \r
176 kParticleOfInterest fParticleOfInterest;\r
177 kDetectorUsedForPID fPidDetectorConfig;\r
178\r
179 Bool_t fUsePID; //\r
180 Bool_t fUsePIDnSigma;//\r
181 Bool_t fUsePIDPropabilities;//\r
182 Double_t fPIDNSigma;//\r
183 Double_t fMinAcceptedPIDProbability;//\r
184 //============PID============//\r
185\r
5115b492 186 AliESDtrackCuts *fESDtrackCuts; //ESD track cuts\r
187\r
3feee083 188 TString fCentralityEstimator; //"V0M","TRK","TKL","ZDC","FMD"\r
c735aca6 189 Bool_t fUseCentrality;//use the centrality (PbPb) or not (pp)\r
6e28a437 190 Double_t fCentralityPercentileMin;//centrality percentile min\r
191 Double_t fCentralityPercentileMax;//centrality percentile max\r
192 Double_t fImpactParameterMin;//impact parameter min (used for MC)\r
193 Double_t fImpactParameterMax;//impact parameter max (used for MC)\r
194\r
195 Bool_t fUseMultiplicity;//use the multiplicity cuts\r
196 Int_t fNumberOfAcceptedTracksMin;//min. number of number of accepted tracks (used for the multiplicity dependence study - pp)\r
197 Int_t fNumberOfAcceptedTracksMax;//max. number of number of accepted tracks (used for the multiplicity dependence study - pp)\r
a5ab9ca3 198 TH1F *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks\r
3feee083 199\r
09bb7bf4 200 Bool_t fUseOfflineTrigger;//Usage of the offline trigger selection\r
201\r
7f94638c 202 Double_t fVxMax;//vxmax\r
09bb7bf4 203 Double_t fVyMax;//vymax\r
204 Double_t fVzMax;//vzmax\r
7f94638c 205\r
6432ac6a 206 Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs)\r
207\r
3feee083 208 Double_t fPtMin;//only used for AODs\r
209 Double_t fPtMax;//only used for AODs\r
210 Double_t fEtaMin;//only used for AODs\r
211 Double_t fEtaMax;//only used for AODs\r
212\r
1900bf4e 213 Double_t fDCAxyCut;//only used for AODs\r
214 Double_t fDCAzCut;//only used for AODs\r
215\r
a839b0a3 216 Double_t fTPCchi2Cut;//only used for AODs\r
217 Int_t fNClustersTPCCut;//only used for AODs\r
218\r
6fbd0608 219 TF1 *fAcceptanceParameterization;//acceptance filter used for MC\r
220\r
985da7aa 221 TF1 *fDifferentialV2;//pt-differential v2 (from real data)\r
222 Bool_t fUseFlowAfterBurner;//Usage of a flow after burner\r
223\r
a1390237 224 Bool_t fExcludeResonancesInMC;//flag to exclude the resonances' decay products from the MC analysis\r
d9f855f3 225 Bool_t fUseMCPdgCode; //Boolean to analyze a set of particles in MC\r
226 Int_t fPDGCodeToBeAnalyzed; //Analyze a set of particles in MC\r
a1390237 227\r
3c3bbd53 228 \r
229\r
5c33329d 230 AliAnalysisTaskBF(const AliAnalysisTaskBF&); // not implemented\r
231 AliAnalysisTaskBF& operator=(const AliAnalysisTaskBF&); // not implemented\r
232 \r
3feee083 233 ClassDef(AliAnalysisTaskBF, 5); // example of analysis\r
5c33329d 234};\r
235\r
236#endif\r