44 return ( pow( 1. - ( y / coeffs[1] ), coeffs[2] ) *
45 exp( ( -3. * pow( coeffs[1], 2. ) / coeffs[3] ) * y / coeffs[1] ) ) /
52 return ( pow( 1. - ( y / coeffs[1] ), coeffs[2] ) *
53 exp( -pow( coeffs[3], 2. ) * pow( 1. - ( y / coeffs[1] ), 2. ) ) ) /
58 std::vector<double>& gammaCoeffs ) {
60 std::vector<double> coeffs1( 3 );
61 std::vector<double> coeffs2( 3 );
64 coeffs1[1] = lambdabar;
68 coeffs2[1] = lambdabar;
69 coeffs2[2] = -lam1 / 3.;
79 lambdabar, 0.2, 0.4, 1.0e-6 );
91 const std::vector<double>& coeffs1,
92 const std::vector<double>& coeffs2 ) {
95 double cp =
Gamma( ( 2.0 + coeffs1[0] ) / 2., coeffs2 ) /
96 Gamma( ( 1.0 + coeffs1[0] ) / 2., coeffs2 );
98 return ( y * y ) * pow( ( 1. - ( y / coeffs1[1] ) ), coeffs1[0] ) *
99 exp( -pow( cp, 2 ) * pow( ( 1. - ( y / coeffs1[1] ) ), 2. ) );
103 const std::vector<double>& coeffs1,
104 const std::vector<double>& coeffs2 ) {
107 double cp =
Gamma( ( 2.0 + coeffs1[0] ) / 2., coeffs2 ) /
108 Gamma( ( 1.0 + coeffs1[0] ) / 2., coeffs2 );
109 return pow( ( 1. - ( y / coeffs1[1] ) ), coeffs1[0] ) *
110 exp( -pow( cp, 2 ) * pow( ( 1. - ( y / coeffs1[1] ) ), 2. ) );
116 double x, y, tmp, ser;
123 tmp = tmp - ( x + 0.5 ) * log( tmp );
124 ser = 1.000000000190015;
126 for ( j = 0; j < 6; j++ )
129 ser = ser + coeffs[j] / y;
132 return exp( -tmp + log( 2.5066282746310005 * ser / x ) );
139 if ( x < 0.0 )
report(
INFO,
"EvtGen" ) <<
"x is negative !" << endl;
146 ans = ( log( x / 2.0 ) *
BesselI1( x ) ) +
152 y * ( -0.1919402e-1 +
153 y * ( -0.110404e-2 + y * ( -0.4686e-4 ) ) ) ) ) ) );
158 ans = (
exp( -x ) / sqrt( x ) ) *
161 y * ( -0.3655620e-1 +
164 y * ( 0.325614e-2 + y * ( -0.68245e-3 ) ) ) ) ) ) );
176 if ( ( ax = fabs( x ) ) < 3.75 )
180 ans = ax * ( 0.5 + y * ( 0.87890594 +
184 y * ( 0.301532e-2 + y * 0.32411e-3 ) ) ) ) ) );
189 ans = 0.2282967e-1 + y * ( -0.2895312e-1 + y * ( 0.1787654e-1 - y * 0.420059e-2 ) );
191 y * ( -0.3988024e-1 +
192 y * ( -0.362018e-2 + y * ( 0.163801e-2 + y * ( -0.1031555e-1 + y * ans ) ) ) );
193 ans *= (
exp( ax ) / sqrt( ax ) );
195 return x < 0.0 ? -ans : ans;
203 double rhSide = 1.0 - ( lam1 / ( 3.0 * lambdabar * lambdabar ) );
207 report(
INFO,
"EvtGen" ) <<
"rho/2 " << rho / 2. <<
" bessel " <<
BesselK1( rho / 2. )
211 report(
INFO,
"EvtGen" ) <<
"rho " << rho <<
" pf " << pF << endl;
226 if ( y == ( coeffs[1] - coeffs[2] ) ) y = 0.99999999 * ( coeffs[1] - coeffs[2] );
230 ( coeffs[3] *
exp( coeffs[3] / 2. ) *
BesselK1( coeffs[3] / 2. ) );
250 return ( coeffs[1] - coeffs[2] ) * ( 1. / ( sqrt(
EvtConst::pi ) * pF ) ) *
252 pow( pF * ( coeffs[3] / ( ( coeffs[1] - coeffs[2] ) *
253 ( 1. - y / ( coeffs[1] - coeffs[2] ) ) ) ) -
254 ( ( coeffs[1] - coeffs[2] ) / pF ) *
255 ( 1. - y / ( coeffs[1] - coeffs[2] ) ),
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)