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