1 //-----------------------------------------------------------------------
2 // File and Version Information:
4 // Copyright Information: See EvtGen/COPYRIGHT
9 // F(k+) = N (1-x)^a exp((1+a)x) ,x=k+/(mB-mb)
10 // the fermi motion distribution according to
13 // F(wtilde,Lambda,b) = pow(_b,_b)/(tgamma(_b)*_Lambda)*pow(wtilde/_Lambda,_b-1)*
14 // exp(-_b*wtilde/Lambda);
15 // the leading order shape function (exp) (hep-ph/0504071)
17 // Software developed for the BaBar Detector at the SLAC B-Factory.
20 // Sven Menke (DFN model)
21 // Alexei Volk (BLNP model)
22 //-----------------------------------------------------------------------
23 //-----------------------
24 // This Class's Header --
25 //-----------------------
26 #include "EvtGenBase/EvtPatches.hh"
27 #include "EvtGenModels/EvtPFermi.hh"
28 #include "EvtGenBase/EvtReport.hh"
40 EvtPFermi::EvtPFermi(const double &a, const double &mB, const double &mb)
48 EvtPFermi::EvtPFermi(const double &Lambda, const double &b)
59 EvtPFermi::~EvtPFermi( )
67 double EvtPFermi::getFPFermi(const double &kplus)
70 double x = kplus/(_mB-_mb);
72 if ( x >= 1) return 0;
73 if ( kplus <= -_mb) return 0;
75 FKplus = pow(1-x,_a)*exp((1+_a)*x);
80 // get value for the leading order exponential SF
81 double EvtPFermi::getSFBLNP(const double &what)
84 double massB = 5.2792;
87 if ( what > massB ) return 0;
88 if ( what < 0 ) return 0;
90 #if defined(__SUNPRO_CC)
91 report(ERROR,"EvtGen") << "The tgamma function is not available on this platform\n";
92 report(ERROR,"EvtGen") <<"Presumably, you are getting the wrong answer, so I abort..";
95 SF = pow(_b,_b)/(tgamma(_b)*_Lambda)*pow(what/_Lambda,_b-1)*exp(-_b*what/_Lambda);