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 */
9 class AliFunctionsDiHadronPID {
12 AliFunctionsDiHadronPID();
15 ~AliFunctionsDiHadronPID();
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) {
27 case 0:return Mpion();
28 case 1:return Mkaon();
29 case 2:return Mproton();
30 case 3:return Mdeuteron();
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
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).
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.);
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.);
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.);
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.);
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.);
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);
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);
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);