]>
Commit | Line | Data |
---|---|---|
fbe4a5ad | 1 | #ifndef ALIANALYSISTASKEVENTMIXINGBF_CXX\r |
2 | #define ALIANALYSISTASKEVENTMIXINGBF_CXX\r | |
3 | \r | |
4 | // Analysis task for the EventMixingBF code\r | |
5 | // Authors: Panos Cristakoglou@cern.ch, m.weber@cern.ch\r | |
6 | \r | |
7 | class TList;\r | |
8 | class TH1F;\r | |
9 | class TH2F;\r | |
10 | class TF1;\r | |
11 | \r | |
12 | class AliMixInputEventHandler;\r | |
13 | class AliBalanceEventMixing;\r | |
14 | class AliESDtrackCuts;\r | |
15 | \r | |
16 | #include "AliAnalysisTaskSE.h"\r | |
17 | #include "AliBalanceEventMixing.h"\r | |
18 | \r | |
19 | #include "AliPID.h" \r | |
20 | #include "AliPIDResponse.h"\r | |
21 | #include "AliPIDCombined.h"\r | |
22 | \r | |
23 | \r | |
24 | class AliAnalysisTaskEventMixingBF : public AliAnalysisTaskSE {\r | |
25 | public:\r | |
26 | AliAnalysisTaskEventMixingBF(const char *name = "AliAnalysisTaskEventMixingBF");\r | |
27 | virtual ~AliAnalysisTaskEventMixingBF(); \r | |
28 | \r | |
29 | \r | |
30 | virtual void UserCreateOutputObjects();\r | |
31 | virtual void UserExec(Option_t *option);\r | |
32 | virtual void UserExecMix(Option_t*);\r | |
33 | virtual void FinishTaskOutput();\r | |
34 | virtual void Terminate(Option_t *);\r | |
35 | \r | |
36 | void SetAnalysisObject(AliBalanceEventMixing *const analysis) {\r | |
37 | fBalance = analysis;\r | |
38 | }\r | |
39 | void SetShufflingObject(AliBalanceEventMixing *const analysisShuffled) {\r | |
40 | fRunShuffling = kTRUE;\r | |
41 | fShuffledBalance = analysisShuffled;\r | |
42 | }\r | |
43 | void SetAnalysisCutObject(AliESDtrackCuts *const trackCuts) {\r | |
44 | fESDtrackCuts = trackCuts;}\r | |
45 | void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) {\r | |
46 | fVxMax = vx;\r | |
47 | fVyMax = vy;\r | |
48 | fVzMax = vz;\r | |
49 | }\r | |
50 | \r | |
51 | //==============AOD analysis==============//\r | |
52 | void SetAODtrackCutBit(Int_t bit){\r | |
53 | nAODtrackCutBit = bit;\r | |
54 | }\r | |
55 | \r | |
56 | void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r | |
9fd4b54e | 57 | fPtMin = ptmin; fPtMax = ptmax;\r |
58 | fEtaMin = etamin; fEtaMax = etamax;\r | |
fbe4a5ad | 59 | \r |
60 | }\r | |
61 | \r | |
62 | void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){\r | |
63 | fDCAxyCut = DCAxy;\r | |
64 | fDCAzCut = DCAz;\r | |
65 | }\r | |
66 | \r | |
67 | void SetExtraTPCCutsAOD(Double_t maxTPCchi2, Int_t minNClustersTPC){\r | |
68 | fTPCchi2Cut = maxTPCchi2;\r | |
69 | fNClustersTPCCut = minNClustersTPC;\r | |
70 | }\r | |
71 | \r | |
72 | //==============MC analysis==============//\r | |
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 | |
78 | void UseFlowAfterBurner(TF1 *gDifferentialV2) {\r | |
79 | fDifferentialV2 = gDifferentialV2;\r | |
80 | fUseFlowAfterBurner = kTRUE;\r | |
81 | }\r | |
82 | void ExcludeResonancesInMC() {fExcludeResonancesInMC = kTRUE;}\r | |
83 | \r | |
84 | void SetPDGCode(Int_t gPdgCode) {\r | |
85 | fUseMCPdgCode = kTRUE;\r | |
86 | fPDGCodeToBeAnalyzed = gPdgCode;\r | |
87 | }\r | |
88 | \r | |
89 | //Centrality\r | |
90 | void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r | |
9fd4b54e | 91 | const char* GetCentralityEstimator(void) const {return fCentralityEstimator;}\r |
fbe4a5ad | 92 | void SetCentralityPercentileRange(Double_t min, Double_t max) { \r |
93 | fUseCentrality = kTRUE;\r | |
94 | fCentralityPercentileMin=min;\r | |
95 | fCentralityPercentileMax=max;\r | |
96 | }\r | |
97 | void SetImpactParameterRange(Double_t min, Double_t max) { \r | |
98 | fUseCentrality = kTRUE;\r | |
99 | fImpactParameterMin=min;\r | |
100 | fImpactParameterMax=max;\r | |
101 | }\r | |
102 | \r | |
103 | //multiplicity\r | |
104 | void SetMultiplicityRange(Int_t min, Int_t max) {\r | |
105 | fUseMultiplicity = kTRUE;\r | |
106 | fNumberOfAcceptedTracksMin = min;\r | |
107 | fNumberOfAcceptedTracksMax = max;}\r | |
108 | \r | |
109 | void UseOfflineTrigger() {fUseOfflineTrigger = kTRUE;}\r | |
110 | \r | |
111 | //Acceptance filter\r | |
112 | void SetAcceptanceParameterization(TF1 *parameterization) {\r | |
113 | fAcceptanceParameterization = parameterization;}\r | |
114 | \r | |
115 | //pid\r | |
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 | |
119 | void SetUseBayesianPID(Double_t gMinProbabilityValue) {\r | |
120 | fUsePID = kTRUE; fUsePIDnSigma = kFALSE; fUsePIDPropabilities = kTRUE;\r | |
121 | fMinAcceptedPIDProbability = gMinProbabilityValue; }\r | |
122 | \r | |
123 | void SetUseNSigmaPID(Double_t gMaxNSigma) {\r | |
124 | fUsePID = kTRUE; fUsePIDPropabilities = kFALSE; fUsePIDnSigma = kTRUE;\r | |
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 | |
132 | private:\r | |
133 | AliBalanceEventMixing *fBalance; //EventMixingBF object\r | |
134 | Bool_t fRunShuffling;//run shuffling or not\r | |
135 | AliBalanceEventMixing *fShuffledBalance; //EventMixingBF object (shuffled)\r | |
136 | TList *fList; //fList object\r | |
137 | TList *fListEventMixingBF; //fList object\r | |
138 | TList *fListEventMixingBFS; //fList object\r | |
139 | TList *fHistListPIDQA; //! list of histograms\r | |
140 | \r | |
141 | TH1F *fHistEventStats; //event stats\r | |
142 | TH2F *fHistCentStats; //centrality stats\r | |
143 | TH1F *fHistTriggerStats; //trigger stats\r | |
144 | TH1F *fHistTrackStats; //Track filter bit stats\r | |
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 | |
148 | \r | |
9fd4b54e | 149 | TH2F *fHistClus;//number of clusters (QA histogram)\r |
150 | TH2F *fHistDCA;//DCA (QA histogram)\r | |
151 | TH1F *fHistChi2;//track chi2 (QA histogram)\r | |
152 | TH1F *fHistPt;//transverse momentum (QA histogram)\r | |
153 | TH1F *fHistEta;//pseudorapidity (QA histogram)\r | |
154 | TH1F *fHistPhi;//phi (QA histogram)\r | |
155 | TH1F *fHistPhiBefore;//phi before v2 afterburner (QA histogram)\r | |
156 | TH1F *fHistPhiAfter;//phi after v2 afterburner (QA histogram)\r | |
157 | TH2F *fHistV0M;//V0 multiplicities (QA histogram)\r | |
158 | TH2F *fHistRefTracks;//reference track multiplicities (QA histogram)\r | |
fbe4a5ad | 159 | \r |
160 | //============PID============//\r | |
9fd4b54e | 161 | TH2D *fHistdEdxVsPTPCbeforePID;//TPC dEdx vs momentum before PID cuts (QA histogram)\r |
162 | TH2D *fHistBetavsPTOFbeforePID;//beta vs momentum before PID cuts (QA histogram)\r | |
163 | TH2D *fHistProbTPCvsPtbeforePID; //TPC probability vs pT before PID cuts (QA histogram)\r | |
164 | TH2D *fHistProbTOFvsPtbeforePID;//TOF probability vs pT before PID cuts (QA histogram)\r | |
165 | TH2D *fHistProbTPCTOFvsPtbeforePID;//TOF/TPC probability vs pT before PID cuts (QA histogram)\r | |
166 | TH2D *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram)\r | |
167 | TH2D *fHistNSigmaTOFvsPtbeforePID;//TOF nsigma vs pT before PID cuts (QA histogram)\r | |
168 | TH2D *fHistdEdxVsPTPCafterPID;//TPC dEdx vs momentum after PID cuts (QA histogram)\r | |
169 | TH2D *fHistBetavsPTOFafterPID;//beta vs momentum after PID cuts (QA histogram)\r | |
170 | TH2D *fHistProbTPCvsPtafterPID; //TPC probability vs pT after PID cuts (QA histogram)\r | |
171 | TH2D *fHistProbTOFvsPtafterPID;//TOF probability vs pT after PID cuts (QA histogram)\r | |
172 | TH2D *fHistProbTPCTOFvsPtafterPID;//TOF/TPC probability vs pT after PID cuts (QA histogram)\r | |
173 | TH2D *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram)\r | |
174 | TH2D *fHistNSigmaTOFvsPtafterPID;//TOF nsigma vs pT after PID cuts (QA histogram)\r | |
fbe4a5ad | 175 | \r |
176 | AliPIDResponse *fPIDResponse; //! PID response object\r | |
177 | AliPIDCombined *fPIDCombined; //! combined PID object\r | |
178 | \r | |
9fd4b54e | 179 | kParticleOfInterest fParticleOfInterest;//analyzed particle\r |
180 | kDetectorUsedForPID fPidDetectorConfig;//used detector for PID\r | |
181 | \r | |
182 | Bool_t fUsePID; //flag to use PID \r | |
183 | Bool_t fUsePIDnSigma;//flag to use nsigma method for PID\r | |
184 | Bool_t fUsePIDPropabilities;//flag to use probability method for PID\r | |
185 | Double_t fPIDNSigma;//nsigma cut for PID\r | |
186 | Double_t fMinAcceptedPIDProbability;//probability cut for PID\r | |
fbe4a5ad | 187 | //============PID============//\r |
188 | \r | |
189 | AliESDtrackCuts *fESDtrackCuts; //ESD track cuts\r | |
190 | \r | |
191 | TString fCentralityEstimator; //"V0M","TRK","TKL","ZDC","FMD"\r | |
192 | Bool_t fUseCentrality;//use the centrality (PbPb) or not (pp)\r | |
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 | |
201 | TH1F *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks\r | |
202 | \r | |
203 | Bool_t fUseOfflineTrigger;//Usage of the offline trigger selection\r | |
204 | \r | |
205 | Double_t fVxMax;//vxmax\r | |
206 | Double_t fVyMax;//vymax\r | |
207 | Double_t fVzMax;//vzmax\r | |
208 | \r | |
209 | Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs)\r | |
210 | \r | |
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 | |
216 | Double_t fDCAxyCut;//only used for AODs\r | |
217 | Double_t fDCAzCut;//only used for AODs\r | |
218 | \r | |
219 | Double_t fTPCchi2Cut;//only used for AODs\r | |
220 | Int_t fNClustersTPCCut;//only used for AODs\r | |
221 | \r | |
222 | TF1 *fAcceptanceParameterization;//acceptance filter used for MC\r | |
223 | \r | |
224 | TF1 *fDifferentialV2;//pt-differential v2 (from real data)\r | |
225 | Bool_t fUseFlowAfterBurner;//Usage of a flow after burner\r | |
226 | \r | |
227 | Bool_t fExcludeResonancesInMC;//flag to exclude the resonances' decay products from the MC analysis\r | |
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 | |
230 | \r | |
231 | // Event Mixing\r | |
9fd4b54e | 232 | AliVEvent *fMainEvent;//main event in the event mixing loop\r |
233 | AliVEvent *fMixEvent;//second event in the event mixing loop\r | |
fbe4a5ad | 234 | \r |
235 | AliMixInputEventHandler *SetupEventsForMixing(); \r | |
236 | \r | |
237 | AliAnalysisTaskEventMixingBF(const AliAnalysisTaskEventMixingBF&); // not implemented\r | |
238 | AliAnalysisTaskEventMixingBF& operator=(const AliAnalysisTaskEventMixingBF&); // not implemented\r | |
239 | \r | |
240 | ClassDef(AliAnalysisTaskEventMixingBF, 1); // example of analysis\r | |
241 | };\r | |
242 | \r | |
243 | #endif\r |