21#include "EvtGenBase/EvtPatches.hh"
26#include "EvtGenModels/EvtBtoXsgammaFermiUtil.hh"
27#include "EvtGenModels/EvtItgTwoCoeffFcn.hh"
28#include "EvtGenModels/EvtBtoXsgammaRootFinder.hh"
29#include "EvtGenModels/EvtItgFunction.hh"
30#include "EvtGenBase/EvtConst.hh"
31#include "EvtGenBase/EvtReport.hh"
44 return (pow(1. - (
y/coeffs[1]),coeffs[2])*
exp((-3.*pow(coeffs[1],2.)/coeffs[3])*
y/coeffs[1]))/coeffs[4];
51 return (pow(1. - (
y/coeffs[1]),coeffs[2])*
exp(-pow(coeffs[3],2.)*pow(1. - (
y/coeffs[1]),2.)))/coeffs[4];
57 std::vector<double> coeffs1(3);
58 std::vector<double> coeffs2(3);
73 double root = rootFinder->
GetGaussIntegFcnRoot(lhFunc, rhFunc, 1.0e-4, 1.0e-4, 40, 40, -mb, lambdabar, 0.2, 0.4, 1.0e-6);
75 delete rootFinder; rootFinder=0;
76 delete lhFunc; lhFunc=0;
77 delete rhFunc; rhFunc=0;
86 double cp =
Gamma((2.0 + coeffs1[0])/2., coeffs2)/
Gamma((1.0 + coeffs1[0])/2., coeffs2);
88 return (
y*
y)*pow((1. - (
y/coeffs1[1])),coeffs1[0])*
exp(-pow(cp,2)*pow((1.-(
y/coeffs1[1])),2.));
95 double cp =
Gamma((2.0 + coeffs1[0])/2., coeffs2)/
Gamma((1.0 + coeffs1[0])/2., coeffs2);
96 return pow((1. - (
y/coeffs1[1])),coeffs1[0])*
exp(-pow(cp,2)*pow((1.-(
y/coeffs1[1])),2.));
103 double x,
y, tmp, ser;
110 tmp = tmp - (
x+0.5)*log(tmp);
111 ser=1.000000000190015;
115 ser = ser + coeffs[j]/
y;
118 return exp(-tmp+log(2.5066282746310005*ser/
x));
126 if (
x<0.0)
report(
INFO,
"EvtGen") <<
"x is negative !"<<endl;
132 ans = (log(
x/2.0)*
BesselI1(
x))+(1.0/
x)*(1.0+
y*(0.15443144+
y*(-0.67278579+
y*(-0.18156897+
y*(-0.1919402e-1+
y*(-0.110404e-2+
y*(-0.4686e-4)))))));
136 ans=(
exp(-
x)/sqrt(
x))*(1.25331414+
y*(0.23498619+
y*(-0.3655620e-1+
y*(0.1504268e-1+
y*(-0.780353e-2+
y*(0.325614e-2+
y*(-0.68245e-3)))))));
149 if ((ax=fabs(
x)) < 3.75) {
152 ans=ax*(0.5+
y*(0.87890594+
y*(0.51498869+
y*(0.15084934+
y*(0.2658733e-1+
y*(0.301532e-2+
y*0.32411e-3))))));
156 ans=0.2282967e-1+
y*(-0.2895312e-1+
y*(0.1787654e-1 -
y*0.420059e-2));
157 ans=0.398914228+
y*(-0.3988024e-1+
y*(-0.362018e-2+
y*(0.163801e-2+
y*(-0.1031555e-1+
y*ans))));
158 ans*=(
exp(ax)/sqrt(ax));
160 return x < 0.0 ? -ans:ans;
168 double rhSide = 1.0 - (lam1/(3.0*lambdabar*lambdabar));
174 report(
INFO,
"EvtGen")<<
"rho "<<rho<<
" pf "<<pF<<endl;
176 delete lhFunc; lhFunc=0;
177 delete rootFinder; rootFinder=0;
188 if (
y == (coeffs[1]-coeffs[2]))
y=0.99999999*(coeffs[1]-coeffs[2]);
206 return (coeffs[1]-coeffs[2])*(1./(sqrt(
EvtConst::pi)*pF))*
exp(-(1./4.)*pow(pF*(coeffs[3]/((coeffs[1]-coeffs[2])*(1.-
y/(coeffs[1]-coeffs[2])))) - ((coeffs[1]-coeffs[2])/pF)*(1. -
y/(coeffs[1]-coeffs[2])),2.))/coeffs[5];
EvtComplex exp(const EvtComplex &c)
ostream & report(Severity severity, const char *facility)
static double FermiGaussFunc(double, std::vector< double > const &coeffs)
static double FermiGaussRootFcnB(double, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2)
static double BesselK1(double)
static double BesselI1(double)
static double FermiRomanRootFcnA(double)
static double FermiGaussRootFcnA(double, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2)
static double FermiRomanFunc(double, std::vector< double > const &coeffs)
static double FermiRomanFuncRoot(double, double)
static double FermiGaussFuncRoot(double, double, double, std::vector< double > &coeffs)
static double FermiExpFunc(double var, const std::vector< double > &coeffs)
static double Gamma(double, const std::vector< double > &coeffs)
double GetGaussIntegFcnRoot(EvtItgAbsFunction *theFunc1, EvtItgAbsFunction *theFunc2, double integ1Precision, double integ2Precision, int maxLoop1, int maxLoop2, double integLower, double integUpper, double lowerValue, double upperValue, double precision)
double GetRootSingleFunc(const EvtItgAbsFunction *theFunc, double functionValue, double lowerValue, double upperValue, double precision)