]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/AliAnalysisTaskpzpz.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / AliAnalysisTaskpzpz.h
CommitLineData
8649eb5e 1#ifndef AliAnalysisTaskpzpz_H_Included
2#define AliAnalysisTaskpzpz_H_Included
3
4#include "AliAnalysisTaskSE.h"
5#include "TString.h"
6#include "AliLog.h"
7
8#include "AliPID.h"
9#include "AliPIDResponse.h"
10
11class AliAODEvent;
12class AliESDEvent;
13class AliInputEventHandler;
14class TH1;
15class TH2;
16class TH2;
17class TH3;
18class TH1F;
19class TH2F;
20class TH2F;
21class TH3F;
22class TH1D;
23class TH2D;
24class TH2D;
25class TH3D;
26class TProfile;
27
28
29class AliAnalysisTaskpzpz : public AliAnalysisTaskSE
30{
31public:
32 AliAnalysisTaskpzpz();
33 AliAnalysisTaskpzpz(const TString & name);
34
35private:
36 AliAnalysisTaskpzpz(const AliAnalysisTaskpzpz&);
37 const AliAnalysisTaskpzpz& operator=(const AliAnalysisTaskpzpz&);
38
39public:
40 virtual ~AliAnalysisTaskpzpz();
41
42 // Implementation of interace methods
43 //virtual void ConnectInputData(Option_t *);
44 virtual void UserCreateOutputObjects();
45 virtual void UserExec(Option_t *option);
46 virtual void FinishTaskOutput();
47 virtual void Terminate(Option_t* );
48 virtual void createHistograms();
49 virtual void finalizeHistograms();
50
51 virtual void addToList(TH1 *h);
52
53 TH1D * createHisto1D(const TString & name, const TString & title,int n, double xmin, double xmax,const TString & xTitle, const TString & yTitle);
54 TH1D * createHisto1D(const TString & name, const TString & title,int n, double * bins,const TString & xTitle, const TString & yTitle);
55 TH2D * createHisto2D(const TString & name, const TString & title,
56 int nx, double xmin, double xmax, int ny, double ymin, double ymax, const TString & xTitle, const TString & yTitle, const TString & zTitle);
57 TH2D * createHisto2D(const TString & name, const TString & title, int nx, double* xbins, int ny, double ymin, double ymax,
58 const TString & xTitle, const TString & yTitle, const TString & zTitle);
59
60 TH1F * createHisto1F(const TString & name, const TString & title,int n, double xmin, double xmax,const TString & xTitle, const TString & yTitle);
61 TH1F * createHisto1F(const TString & name, const TString & title,int n, double * bins,const TString & xTitle, const TString & yTitle);
62 TH2F * createHisto2F(const TString & name, const TString & title,
63 int nx, double xmin, double xmax, int ny, double ymin, double ymax, const TString & xTitle, const TString & yTitle, const TString & zTitle);
64 TH2F * createHisto2F(const TString & name, const TString & title, int nx, double* xbins, int ny, double ymin, double ymax,
65 const TString & xTitle, const TString & yTitle, const TString & zTitle);
66 TH3F * createHisto3F(const TString & name, const TString & title,
67 int nx, double xmin, double xmax, int ny, double ymin, double ymax, int nz, double zmin, double zmax,
68 const TString & xTitle, const TString & yTitle, const TString & zTitle);
69 TProfile * createProfile(const TString & title,const TString & description, int n, double xMin,double xMax,
70 const TString & xTitle, const TString & yTitle);
71 TProfile * createProfile(const TString & name,const TString & description,
72 int nx, double* bins,
73 const TString & xTitle, const TString & yTitle);
74
75 //________________________________________________________________________
76
77 float * getFloatArray(int size, float v);
78 double * getDoubleArray(int size, double v);
79 void fillHistoWithArray(TH1 * h, double * array, int size);
80 void fillHistoWithArray(TH2 * h, double * array, int size1, int size2);
81 void fillHistoWithArray(TH3 * h, double * array, int size1, int size2, int size3);
82 void fillHistoWithArray(TH1 * h, float * array, int size);
83 void fillHistoWithArray(TH2 * h, float * array, int size1, int size2);
84 void fillHistoWithArray(TH3 * h, float * array, int size1, int size2, int size3);
85
86
87
88
89 virtual void SetDebugLevel( int v ) { _debugLevel = v; }
90 virtual void SetSinglesOnly(int v) { _singlesOnly = v; }
91 virtual void SetUseWeights(int v) { _useWeights = v; }
92 virtual void SetSameFilter(int v) { _sameFilter = v; }
93
94 virtual void SetRejectPileup(int v) { _rejectPileup = v; }
95 virtual void SetRejectPairConversion(int v) { _rejectPairConversion = v; }
96 virtual void SetVertexZMin(double v) { _vertexZMin = v; }
97 virtual void SetVertexZMax(double v) { _vertexZMax = v; }
98 virtual void SetVertexXYMin(double v) { _vertexXYMin = v; }
99 virtual void SetVertexXYMax(double v) { _vertexXYMax = v; }
100 virtual void SetCentralityMethod(int v) { _centralityMethod = v; }
101 virtual void SetCentrality(double centralityMin, double centralityMax)
102 {
103 _centralityMin = centralityMin;
104 _centralityMax = centralityMax;
105 }
106 virtual void SetRequestedCharge_1(int v) { _requestedCharge_1 = v; }
107 virtual void SetRequestedCharge_2(int v) { _requestedCharge_2 = v; }
108 virtual void SetPtMin1( double v) { _min_pt_1 = v; }
109 virtual void SetPtMax1( double v) { _max_pt_1 = v; }
110 virtual void SetEtaMin1(double v) { _min_eta_1 = v; }
111 virtual void SetEtaMax1(double v) { _max_eta_1 = v; }
112 virtual void SetPtMin2( double v) { _min_pt_2 = v; }
113 virtual void SetPtMax2( double v) { _max_pt_2 = v; }
114 virtual void SetEtaMin2(double v) { _min_eta_2 = v; }
115 virtual void SetEtaMax2(double v) { _max_eta_2 = v; }
116 virtual void SetDcaZMin(double v) { _dcaZMin = v; }
117 virtual void SetDcaZMax(double v) { _dcaZMax = v; }
118 virtual void SetDcaXYMin(double v) { _dcaXYMin = v; }
119 virtual void SetDcaXYMax(double v) { _dcaXYMax = v; }
120 virtual void SetTPCNclus(int v) { _tpcnclus = v; }
121 virtual void SetChi2PerNDF(double v) { _chi2ndf = v; }
122
123 virtual void SetDedxMin(double v) { _dedxMin = v; }
124 virtual void SetDedxMax(double v) { _dedxMax = v; }
125 virtual void SetNClusterMin(int v) { _nClusterMin = v; }
126 virtual void SetTrackFilterBit(int v) { _trackFilterBit = v; }
127 virtual void SetWeigth_1(TH3F * v) { _weight_1 = v; }
128 virtual void SetWeigth_2(TH3F * v) { _weight_2 = v; }
129
130 void SetNSigmaCut(Double_t nsigma){ fNSigmaCut = nsigma;}
131
132protected:
133
134 // Handlers and events
135 AliAODEvent* fAODEvent; //! AOD Event
136 AliESDEvent* fESDEvent; //! ESD Event
137 AliInputEventHandler* fInputHandler; //! Generic InputEventHandler
138
139 AliPIDResponse* fPIDResponse;
140
141 // Histogram settings
142 //TList* _inputHistoList;
143 TList* _outputHistoList;
144 //int _outputSlot;
145
146
147 double _twoPi;
148 long _eventCount;
149
150 //configuration variables and filters
151 int _debugLevel;
152 int _singlesOnly;
153 int _useWeights;
154 int _sameFilter;
155 int _rejectPileup;
156 int _rejectPairConversion;
157 double _vertexZMin;
158 double _vertexZMax;
159 double _vertexXYMin;
160 double _vertexXYMax;
161 int _centralityMethod;
162 double _centralityMin;
163 double _centralityMax;
164 int _requestedCharge_1;
165 int _requestedCharge_2;
166 double _dcaZMin;
167 double _dcaZMax;
168 double _dcaXYMin;
169 double _dcaXYMax;
170 double _dedxMin;
171 double _dedxMax;
172 int _nClusterMin;
173 int _trackFilterBit;
174 Double_t fNSigmaCut;
175
176 int _tpcnclus;
177 double _chi2ndf;
178
179 //double _min_eta_1;
180 //double _max_eta_1;
181 //double _min_eta_2;
182 //double _max_eta_2;
183
184
185 // event and track wise variables
186
187 double _field;
188 int _nTracks;
189 double _mult0;
190 double _mult1;
191 double _mult2;
192 double _mult3;
193 double _mult4;
194 double _mult4a;
195 double _mult5;
196 double _mult6;
197
198 //particle 1
199 int arraySize;
200 int *_id_1; //!
201 int *_charge_1; //!
202 //int * _iPhi_1; //!
203 //int * _iEta_1; //!
204 int *_iEtaPhi_1; //!
205 int *_iPt_1; //!
206 float *_pt_1; //!
207 float *_px_1; //!
208 float *_py_1; //!
209 float *_pz_1; //!
210 //float * _phi_1; //!
211 //float* _eta_1; //!
212 float *_correction_1; //!
213 float *_dedx_1; //!
214
215 //particle 2
216 int *_id_2; //!
217 int *_charge_2; //!
218 //int *_iPhi_2; //!
219 //int *_iEta_2; //!
220 int *_iEtaPhi_2; //!
221 int *_iPt_2; //!
222 float *_pt_2; //!
223 float *_px_2; //!
224 float *_py_2; //!
225 float *_pz_2; //!
226 //float *_phi_2; //!
227 //float *_eta_2; //!
228 float *_correction_2; //!
229 float *_dedx_2; //!
230
231 float * _correctionWeight_1; //!
232 float * _correctionWeight_2; //!
233
234 //histograming
235 int _nBins_M0; double _min_M0; double _max_M0; double _width_M0;
236 int _nBins_M1; double _min_M1; double _max_M1; double _width_M1;
237 int _nBins_M2; double _min_M2; double _max_M2; double _width_M2;
238 int _nBins_M3; double _min_M3; double _max_M3; double _width_M3;
239 int _nBins_M4; double _min_M4; double _max_M4; double _width_M4;
240 int _nBins_M5; double _min_M5; double _max_M5; double _width_M5;
241 int _nBins_M6; double _min_M6; double _max_M6; double _width_M6;
242
243 int _nBins_vertexZ; double _min_vertexZ; double _max_vertexZ; double _width_vertexZ;
244
245 int _nBins_pt_1; double _min_pt_1; double _max_pt_1; double _width_pt_1;
246 int _nBins_phi_1; double _min_phi_1; double _max_phi_1; double _width_phi_1;
247 int _nBins_eta_1; double _min_eta_1; double _max_eta_1; double _width_eta_1;
248 int _nBins_etaPhi_1;
249 int _nBins_etaPhiPt_1;
250 int _nBins_zEtaPhiPt_1;
251
252 int _nBins_pt_2; double _min_pt_2; double _max_pt_2; double _width_pt_2;
253 int _nBins_phi_2; double _min_phi_2; double _max_phi_2; double _width_phi_2;
254 int _nBins_eta_2; double _min_eta_2; double _max_eta_2; double _width_eta_2;
255 int _nBins_etaPhi_2;
256 int _nBins_etaPhiPt_2;
257 int _nBins_zEtaPhiPt_2;
258
259 int _nBins_etaPhi_12;
260
261 double __n1_1;
262 double __n1_2;
263 double __n2_12;
264 double __s1pt_1;
265 double __s1pt_2;
266 double __s2ptpt_12;
267 double __s2NPt_12;
268 double __s2PtN_12;
269
270 double __n1Nw_1;
271 double __n1Nw_2;
272 double __n2Nw_12;
273 double __s1ptNw_1;
274 double __s1ptNw_2;
275 double __s2ptptNw_12;
276 double __s2NPtNw_12;
277 double __s2PtNNw_12;
278
279 double * __n1_1_vsPt; //!
280 double * __n1_1_vsEtaPhi; //!
281 double * __s1pt_1_vsEtaPhi; //!
282 float * __n1_1_vsZEtaPhiPt; //!
283
284 double * __n1_2_vsPt; //!
285 double * __n1_2_vsEtaPhi; //!
286 double * __s1pt_2_vsEtaPhi; //!
287 float * __n1_2_vsZEtaPhiPt; //!
288
289 //double * __n2_12_vsPtPt;
290 //double * __n2_12_vsEtaPhi;
291 //double * __s2ptpt_12_vsEtaPhi;
292 //double * __s2PtN_12_vsEtaPhi;
293 //double * __s2NPt_12_vsEtaPhi;
294
295 double * __n2_12_vsPtPt; //!
296 float * __n2_12_vsEtaPhi; //!
297 float * __s2ptpt_12_vsEtaPhi; //!
298 float * __s2PtN_12_vsEtaPhi; //!
299 float * __s2NPt_12_vsEtaPhi; //!
300
301 TH3F * _weight_1;
302 TH3F * _weight_2;
303 TH1D * _eventAccounting;
304 TH1D * _m0;
305 TH1D * _m1;
306 TH1D * _m2;
307 TH1D * _m3;
308 TH1D * _m4;
309 TH1D * _m5;
310 TH1D * _m6;
311 TH1D * _vertexZ;
312
313 TH1F * _Ncluster1;
314 TH1F * _Ncluster2;
315 TH1F * _etadis;
316 TH1F * _phidis;
317 TH1F * _dcaz;
318 TH1F * _dcaxy;
319
320
321 // PARTICLE 1 (satisfies filter 1)
322 // Primary filled quantities
323 TH1F * _n1_1_vsPt;
324 TH2F * _n1_1_vsEtaVsPhi;
325 TH2F * _s1pt_1_vsEtaVsPhi;
326 TH3F * _n1_1_vsZVsEtaVsPhiVsPt;
327 TProfile * _n1_1_vsM; // w/ weight
328 TProfile * _s1pt_1_vsM;
329 TProfile * _n1Nw_1_vsM; // w/o weight
330 TProfile * _s1ptNw_1_vsM;
331 TH2D * _dedxVsP_1;
332 TH2D * _corrDedxVsP_1;
333 TH2F * _betaVsP_1;
334
335 // PARTICLE 2 (satisfies filter 2)
336 // Primary filled quantities
337 TH1F * _n1_2_vsPt;
338 TH2F * _n1_2_vsEtaVsPhi;
339 TH2F * _s1pt_2_vsEtaVsPhi;
340 TH3F * _n1_2_vsZVsEtaVsPhiVsPt;
341 TProfile * _n1_2_vsM;
342 TProfile * _s1pt_2_vsM;
343 TProfile * _n1Nw_2_vsM; // w/o weight
344 TProfile * _s1ptNw_2_vsM;
345 TH2D * _dedxVsP_2;
346 TH2D * _corrDedxVsP_2;
347 TH2F * _betaVsP_2;
348
349 // Pairs 1 & 2
350 TH1F * _n2_12_vsEtaPhi;
351 TH2F * _n2_12_vsPtVsPt;
352 TH1F * _s2PtPt_12_vsEtaPhi;
353 TH1F * _s2PtN_12_vsEtaPhi;
354 TH1F * _s2NPt_12_vsEtaPhi;
355
356 TProfile * _n2_12_vsM;
357 TProfile * _s2PtPt_12_vsM;
358 TProfile * _s2PtN_12_vsM;
359 TProfile * _s2NPt_12_vsM;
360 TProfile * _n2Nw_12_vsM;
361 TProfile * _s2PtPtNw_12_vsM;
362 TProfile * _s2PtNNw_12_vsM;
363 TProfile * _s2NPtNw_12_vsM;
364
365 TH1F * _invMass;
366 TH1F * _invMassElec;
367
368 TString n1Name;
369 TString n1NwName;
370 TString n2Name;
371 TString n2NwName;
372 TString n3Name;
373 TString n1n1Name;
374 TString n1n1n1Name;
375 TString n2n1Name;
376 TString r1Name;
377 TString r2Name;
378 TString r3Name;
379 TString r2r1Name;
380 TString c2Name;
381 TString c3Name;
382 TString d3Name;
383 TString p3Name;
384 TString cName;
385
386 TString intR2Name;
387 TString binCorrName;
388 TString intBinCorrName;
389
390 TString countsName;
391 TString part_1_Name;
392 TString part_2_Name;
393 TString part_3_Name;
394 TString pair_12_Name;
395 TString pair_13_Name;
396 TString pair_23_Name;
397 TString tripletName;
398
399 TString avg;
400 TString avgName;
401 TString sumName;
402 TString s1ptName;
403 TString s1ptNwName;
404 TString s1DptName;
405
406 TString s2PtPtName;
407 TString s2NPtName;
408 TString s2PtNName;
409 TString s2DptDptName;
410
411 TString s2PtPtNwName;
412 TString s2NPtNwName;
413 TString s2PtNNwName;
414
415 TString ptName;
416 TString ptptName;
417 TString pt1pt1Name;
418 TString DptName;
419 TString DptDptName;
420 TString RDptDptName;
421 TString nPtName;
422 TString ptNName;
423 TString seanName;
424
425 TString _title_counts;
426
427 TString _title_m0;
428 TString _title_m1;
429 TString _title_m2;
430 TString _title_m3;
431 TString _title_m4;
432 TString _title_m5;
433 TString _title_m6;
434
435 TString _title_eta_1;
436 TString _title_phi_1;
437 TString _title_pt_1;
438 TString _title_etaPhi_1;
439 TString _title_n_1;
440 TString _title_SumPt_1;
441 TString _title_AvgPt_1;
442 TString _title_AvgN_1;
443 TString _title_AvgSumPt_1;
444
445 TString _title_eta_2;
446 TString _title_phi_2;
447 TString _title_pt_2;
448 TString _title_etaPhi_2;
449 TString _title_n_2;
450 TString _title_SumPt_2;
451 TString _title_AvgPt_2;
452 TString _title_AvgN_2;
453 TString _title_AvgSumPt_2;
454
455 TString _title_etaPhi_12;
456
457 TString _title_AvgN2_12;
458 TString _title_AvgSumPtPt_12;
459 TString _title_AvgSumPtN_12;
460 TString _title_AvgNSumPt_12;
461
462 TString vsZ;
463 TString vsM;
464 TString vsPt;
465 TString vsPhi;
466 TString vsEta;
467 TString vsEtaPhi;
468 TString vsPtVsPt;
469
470
471 ClassDef(AliAnalysisTaskpzpz,1)
472};
473
474
475#endif
476
477