Changeset View
Changeset View
Standalone View
Standalone View
src/EvtGenModels/EvtBtoXsgammaFermiUtil.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | double EvtBtoXsgammaFermiUtil::FermiGaussFunc( double y, | ||||
return ( pow( 1. - ( y / coeffs[1] ), coeffs[2] ) * | return ( pow( 1. - ( y / coeffs[1] ), coeffs[2] ) * | ||||
exp( -pow( coeffs[3], 2. ) * pow( 1. - ( y / coeffs[1] ), 2. ) ) ) / | exp( -pow( coeffs[3], 2. ) * pow( 1. - ( y / coeffs[1] ), 2. ) ) ) / | ||||
coeffs[4]; | coeffs[4]; | ||||
} | } | ||||
double EvtBtoXsgammaFermiUtil::FermiGaussFuncRoot( | double EvtBtoXsgammaFermiUtil::FermiGaussFuncRoot( | ||||
double lambdabar, double lam1, double mb, std::vector<double>& gammaCoeffs ) | double lambdabar, double lam1, double mb, std::vector<double>& gammaCoeffs ) | ||||
{ | { | ||||
std::vector<double> coeffs1 = {0.2, lambdabar, 0.0}; | std::vector<double> coeffs1 = { 0.2, lambdabar, 0.0 }; | ||||
std::vector<double> coeffs2 = {0.2, lambdabar, -lam1 / 3.}; | std::vector<double> coeffs2 = { 0.2, lambdabar, -lam1 / 3. }; | ||||
auto lhFunc = EvtItgTwoCoeffFcn{&FermiGaussRootFcnA, -mb, lambdabar, | auto lhFunc = EvtItgTwoCoeffFcn{ &FermiGaussRootFcnA, -mb, lambdabar, | ||||
coeffs1, gammaCoeffs}; | coeffs1, gammaCoeffs }; | ||||
auto rhFunc = EvtItgTwoCoeffFcn{&FermiGaussRootFcnB, -mb, lambdabar, | auto rhFunc = EvtItgTwoCoeffFcn{ &FermiGaussRootFcnB, -mb, lambdabar, | ||||
coeffs2, gammaCoeffs}; | coeffs2, gammaCoeffs }; | ||||
auto rootFinder = EvtBtoXsgammaRootFinder{}; | auto rootFinder = EvtBtoXsgammaRootFinder{}; | ||||
return rootFinder.GetGaussIntegFcnRoot( &lhFunc, &rhFunc, 1.0e-4, 1.0e-4, | return rootFinder.GetGaussIntegFcnRoot( &lhFunc, &rhFunc, 1.0e-4, 1.0e-4, | ||||
40, 40, -mb, lambdabar, 0.2, 0.4, | 40, 40, -mb, lambdabar, 0.2, 0.4, | ||||
1.0e-6 ); | 1.0e-6 ); | ||||
} | } | ||||
double EvtBtoXsgammaFermiUtil::FermiGaussRootFcnA( | double EvtBtoXsgammaFermiUtil::FermiGaussRootFcnA( | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | if ( ax < 3.75 ) { | ||||
y * ( 0.163801e-2 + y * ( -0.1031555e-1 + y * ans ) ) ) ); | y * ( 0.163801e-2 + y * ( -0.1031555e-1 + y * ans ) ) ) ); | ||||
ans *= ( exp( ax ) / sqrt( ax ) ); | ans *= ( exp( ax ) / sqrt( ax ) ); | ||||
} | } | ||||
return x < 0.0 ? -ans : ans; | return x < 0.0 ? -ans : ans; | ||||
} | } | ||||
double EvtBtoXsgammaFermiUtil::FermiRomanFuncRoot( double lambdabar, double lam1 ) | double EvtBtoXsgammaFermiUtil::FermiRomanFuncRoot( double lambdabar, double lam1 ) | ||||
{ | { | ||||
auto lhFunc = EvtItgFunction{&FermiRomanRootFcnA, -1.e-6, 1.e6}; | auto lhFunc = EvtItgFunction{ &FermiRomanRootFcnA, -1.e-6, 1.e6 }; | ||||
auto rootFinder = EvtBtoXsgammaRootFinder{}; | auto rootFinder = EvtBtoXsgammaRootFinder{}; | ||||
double rhSide = 1.0 - ( lam1 / ( 3.0 * lambdabar * lambdabar ) ); | double rhSide = 1.0 - ( lam1 / ( 3.0 * lambdabar * lambdabar ) ); | ||||
double rho = rootFinder.GetRootSingleFunc( &lhFunc, rhSide, 0.1, 0.4, 1.0e-6 ); | double rho = rootFinder.GetRootSingleFunc( &lhFunc, rhSide, 0.1, 0.4, 1.0e-6 ); | ||||
//rho=0.250353; | //rho=0.250353; | ||||
EvtGenReport( EVTGEN_INFO, "EvtGen" ) | EvtGenReport( EVTGEN_INFO, "EvtGen" ) | ||||
<< "rho/2 " << rho / 2. << " bessel " << BesselK1( rho / 2. ) << endl; | << "rho/2 " << rho / 2. << " bessel " << BesselK1( rho / 2. ) << endl; | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |