]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/DPhi/DiHadronPID/AliFunctionsDiHadronPID.h
update dihadron PID (Misha Veldhoen <Misha.Veldhoen@cern.ch>)
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / DiHadronPID / AliFunctionsDiHadronPID.h
1 #ifndef ALIFUNCTIONSDIHADRONPID_H
2 #define ALIFUNCTIONSDIHADRONPID_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
4 * See cxx source for full Copyright notice */ 
5 /* $Id$ */
6
7 class TCanvas;
8
9 class AliFunctionsDiHadronPID {
10
11 public:
12         AliFunctionsDiHadronPID();
13
14 protected:
15         ~AliFunctionsDiHadronPID();
16
17 public:
18         // Natural constants.
19         static Double_t Charge() {return 1.60217646e-19;}       // (C)
20         static Double_t C() {return 2.99792458e+8;}                     // (m/s)
21         static Double_t Mpion() {return 0.13957018;}            // (GeV/c^2)
22         static Double_t Mkaon() {return 0.493667;}                      // (GeV/c^2)
23         static Double_t Mproton() {return 0.938272046;}         // (GeV/c^2)
24         static Double_t Mdeuteron() {return 2.01410178*GeVperu();}      // (GeV/c^2)
25         static Double_t M(const Int_t species) {
26                 switch(species) {
27                         case 0:return Mpion();
28                         case 1:return Mkaon();
29                         case 2:return Mproton();
30                         case 3:return Mdeuteron();
31                         default:return -999.; 
32                 }
33         }
34
35         // Conversions.
36         static Double_t GeVperu() {return 0.931494061;}         // (GeV/c^2) per u
37         static Double_t GeVperkg() {return 5.608524e+26;}       // (GeV/c^2) per kg
38
39         // Detector paramters.
40         static Double_t RTOF() {return 385.;}                           // Radius of TOF (cm).
41         static Double_t BTPC() {return 0.5;}                            // Magnetic field in TPC (T = kg C^-1 s^-1).
42
43         // Fit Functions.
44         static Double_t Gaussian1D(const Double_t xx, const Double_t integral, const Double_t mu, const Double_t sigma, const Double_t binwidth = 1.);
45         static Double_t Gaussian1DTail(const Double_t xx, const Double_t integral, const Double_t mu, const Double_t sigma, const Double_t tail, const Double_t binwidth = 1.);
46
47         static Double_t Gaussian2D(const Double_t xx, const Double_t yy, const Double_t integral, 
48                 const Double_t mux, const Double_t muy, const Double_t sigmax, const Double_t sigmay, 
49                 const Double_t binwidthx = 1., const Double_t binwidthy = 1.);
50
51         static Double_t Gaussian2DTailX(const Double_t xx, const Double_t yy, const Double_t integral, 
52                 const Double_t mux, const Double_t muy, const Double_t sigmax, const Double_t sigmay, 
53                 const Double_t tailx, const Double_t binwidthx = 1., const Double_t binwidthy = 1.);
54
55         static Double_t Gaussian2DTailY(const Double_t xx, const Double_t yy, const Double_t integral, 
56                 const Double_t mux, const Double_t muy, const Double_t sigmax, const Double_t sigmay, 
57                 const Double_t taily, const Double_t binwidthx = 1., const Double_t binwidthy = 1.);
58
59         static Double_t Gaussian2DTailXY(const Double_t xx, const Double_t yy, const Double_t integral, 
60                 const Double_t mux, const Double_t muy, const Double_t sigmax, const Double_t sigmay, 
61                 const Double_t tailx, const Double_t taily, const Double_t binwidthx = 1., const Double_t binwidthy = 1.);
62
63         // FUNCTIONS THAT ARE NOT BEING USED ANYMORE.
64         static Double_t Gaussian1D(const Double_t *x, const Double_t *par);
65         static Double_t Gaussian1DTail(const Double_t *x, const Double_t *par); 
66         static Double_t Exponent(const Double_t *x, const Double_t *par);
67         static Double_t SimpleTOFfit(const Double_t *x, const Double_t *par);
68         static Double_t SimpleTOFfitWithTail(const Double_t *x, const Double_t *par);
69
70         // Penalty Functions.
71         static Double_t PolyPenalty(const Double_t xx, const Double_t center, const Double_t flatwidth, const Int_t polyorder);
72         static TCanvas* TestPolyPenalty(const Double_t range = 3., const Double_t center = 1., const Double_t flatwidth = 1., const Int_t polyorder = 3);
73
74         // PID Expected signal functions.
75         static Double_t TOFExpTime(const Double_t pT, const Double_t eta, const Double_t mass);
76         static Double_t TPCExpdEdX(const Double_t pT, const Double_t eta, const Double_t mass);
77
78 };
79
80 #endif