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