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 */
12 class AliFunctionsDiHadronPID {
15 AliFunctionsDiHadronPID();
18 ~AliFunctionsDiHadronPID();
22 static Int_t Power(Int_t base, Int_t power);
25 static Double_t Charge() {return 1.60217646e-19;} // (C)
26 static Double_t C() {return 2.99792458e+8;} // (m/s)
27 static Double_t Mpion() {return 0.13957018;} // (GeV/c^2)
28 static Double_t Mkaon() {return 0.493667;} // (GeV/c^2)
29 static Double_t Mproton() {return 0.938272046;} // (GeV/c^2)
30 static Double_t Mdeuteron() {return 2.01410178*GeVperu();} // (GeV/c^2)
31 static Double_t M(Int_t species) {
33 case 0:return Mpion();
34 case 1:return Mkaon();
35 case 2:return Mproton();
36 case 3:return Mdeuteron();
42 static Double_t GeVperu() {return 0.931494061;} // (GeV/c^2) per u
43 static Double_t GeVperkg() {return 5.608524e+26;} // (GeV/c^2) per kg
45 // Detector paramters.
46 static Double_t RTOF() {return 385.;} // Radius of TOF (cm).
47 static Double_t BTPC() {return 0.5;} // Magnetic field in TPC (T = kg C^-1 s^-1).
50 static Double_t Gaussian1D(Double_t xx, Double_t integral, Double_t mu, Double_t sigma, Double_t binwidth = 1.);
51 static Double_t Gaussian1DTail(Double_t xx, Double_t integral, Double_t mu, Double_t sigma, Double_t tail, Double_t binwidth = 1.);
53 static Double_t Gaussian2D(Double_t xx, Double_t yy, Double_t integral,
54 Double_t mux, Double_t muy, Double_t sigmax, Double_t sigmay,
55 Double_t binwidthx = 1., Double_t binwidthy = 1.);
57 static Double_t Gaussian2DTailX(Double_t xx, Double_t yy, Double_t integral,
58 Double_t mux, Double_t muy, Double_t sigmax, Double_t sigmay,
59 Double_t tailx, Double_t binwidthx = 1., Double_t binwidthy = 1.);
61 static Double_t Gaussian2DTailY(Double_t xx, Double_t yy, Double_t integral,
62 Double_t mux, Double_t muy, Double_t sigmax, Double_t sigmay,
63 Double_t taily, Double_t binwidthx = 1., Double_t binwidthy = 1.);
65 static Double_t Gaussian2DTailXY(Double_t xx, Double_t yy, Double_t integral,
66 Double_t mux, Double_t muy, Double_t sigmax, Double_t sigmay,
67 Double_t tailx, Double_t taily, Double_t binwidthx = 1., Double_t binwidthy = 1.);
70 static Double_t PolyPenalty(Double_t xx, Double_t center, Double_t flatwidth, Int_t polyorder);
71 static TCanvas* TestPolyPenalty(Double_t range = 3., Double_t center = 1., Double_t flatwidth = 1., Int_t polyorder = 3);
73 // PID Expected signal functions.
74 static Double_t TOFExpTime(Double_t pT, Double_t eta, Double_t mass);
75 static Double_t TPCExpdEdX(Double_t pT, Double_t eta, Double_t mass);
77 // Standard Functions.
78 static Double_t Exponent(Double_t xx, Int_t sign, Double_t p0, Double_t p1) {return (sign*TMath::Exp(p0 + xx*p1));}
79 static Double_t Poly1(Double_t xx, Double_t p0, Double_t p1) {return (p0 + p1*xx);}
80 static Double_t Poly2(Double_t xx, Double_t p0, Double_t p1, Double_t p2) {return (p0 + p1*xx + p2*xx*xx);}
81 static Double_t Poly3(Double_t xx, Double_t p0, Double_t p1, Double_t p2, Double_t p3) {return (p0 + p1*xx + p2*xx*xx + p3*xx*xx*xx);}
82 static Double_t Poly4(Double_t xx, Double_t p0, Double_t p1, Double_t p2, Double_t p3, Double_t p4) {return (p0 + p1*xx + p2*xx*xx + p3*xx*xx*xx + p4*xx*xx*xx*xx);}
83 static Double_t Poly5(Double_t xx, Double_t p0, Double_t p1, Double_t p2, Double_t p3, Double_t p4, Double_t p5) {return (p0 + p1*xx + p2*xx*xx + p3*xx*xx*xx + p4*xx*xx*xx*xx + p5*xx*xx*xx*xx*xx);}