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