45 cout <<
" max pdf : " <<
m_gmax << endl;
46 cout <<
" efficiency : " << (float)
m_ngood / (
float)
m_ntot << endl;
72 <<
"EvtVubNLO generator expected "
73 <<
" at least npar arguments but found: " <<
getNArg() << endl;
75 <<
"Will terminate execution!" << endl;
93 std::vector<double> sCoeffs( 11 );
104 cout <<
" pdf 0.66, 1.32 , 4.32 " <<
tripleDiff( 0.66, 1.32, 4.32 ) << endl;
105 cout <<
" pdf 0.23,0.37,3.76 " <<
tripleDiff( 0.23, 0.37, 3.76 ) << endl;
106 cout <<
" pdf 0.97,4.32,4.42 " <<
tripleDiff( 0.97, 4.32, 4.42 ) << endl;
107 cout <<
" pdf 0.52,1.02,2.01 " <<
tripleDiff( 0.52, 1.02, 2.01 ) << endl;
108 cout <<
" pdf 1.35,1.39,2.73 " <<
tripleDiff( 1.35, 1.39, 2.73 ) << endl;
112 <<
"EvtVubNLO generator expected " <<
m_weights.size()
113 <<
" masses and weights but found: " << (
getNArg() - npar ) / 2
116 <<
"Will terminate execution!" << endl;
121 for (
unsigned i = 0; i <
m_masses.size(); i++ ) {
125 <<
"EvtVubNLO generator expected "
126 <<
" mass bins in ascending order!"
127 <<
"Will terminate execution!" << endl;
133 <<
"EvtVubNLO generator expected "
134 <<
" weights >= 0, but found: " <<
m_weights[i] << endl;
136 <<
"Will terminate execution!" << endl;
144 <<
"EvtVubNLO generator expected at least one "
145 <<
" weight > 0, but found none! "
146 <<
"Will terminate execution!" << endl;
177 double pp, pm, pl, ml, El( 0.0 ), Eh( 0.0 ), sh( 0.0 );
193 pm = pow( pm, 1. / 3. ) *
m_mB;
196 pl = sqrt( pl ) * pm;
202 El = (
m_mB - pl ) / 2.;
203 Eh = ( pp + pm ) / 2;
214 <<
"EvtVubNLO pdf above maximum: " << pdf
215 <<
" P+,P-,Pl,Pdf= " << pp <<
" " << pm <<
" " << pl <<
" "
232 double m = sqrt( sh );
261 sttmp = sqrt( 1 - ctH * ctH );
262 ptmp = sqrt( Eh * Eh - sh );
263 double pHB[4] = { Eh, ptmp * sttmp * cos( phH ), ptmp * sttmp * sin( phH ),
265 p4.
set( pHB[0], pHB[1], pHB[2], pHB[3] );
271 double pWB[4] = {
m_mB - Eh, -pHB[1], -pHB[2], -pHB[3] };
280 double beta = ptmp / pWB[0];
281 double gamma = pWB[0] / sqrt( mW2 );
285 ptmp = ( mW2 - ml * ml ) / 2 / sqrt( mW2 );
286 pLW[0] = sqrt( ml * ml + ptmp * ptmp );
288 double ctL = ( El - gamma * pLW[0] ) / beta / gamma / ptmp;
293 sttmp = sqrt( 1 - ctL * ctL );
296 double xW[3] = { -pWB[2], pWB[1], 0 };
298 double zW[3] = { pWB[1] / apWB, pWB[2] / apWB, pWB[3] / apWB };
300 double lx = sqrt( xW[0] * xW[0] + xW[1] * xW[1] );
301 for (
int j = 0; j < 2; j++ )
305 double yW[3] = { -pWB[1] * pWB[3], -pWB[2] * pWB[3],
306 pWB[1] * pWB[1] + pWB[2] * pWB[2] };
307 double ly = sqrt( yW[0] * yW[0] + yW[1] * yW[1] + yW[2] * yW[2] );
308 for (
int j = 0; j < 3; j++ )
314 for (
int j = 0; j < 3; j++ )
315 pLW[j + 1] = sttmp * cos( phL ) * ptmp * xW[j] +
316 sttmp * sin( phL ) * ptmp * yW[j] + ctL * ptmp * zW[j];
322 double appLB = beta * gamma * pLW[0] + gamma * ctL * apLW;
324 ptmp = sqrt( El * El - ml * ml );
325 double ctLL = appLB / ptmp;
332 double pLB[4] = { El, 0, 0, 0 };
333 double pNB[8] = { pWB[0] - El, 0, 0, 0 };
335 for (
int j = 1; j < 4; j++ ) {
336 pLB[j] = pLW[j] + ( ctLL * ptmp - ctL * apLW ) / apWB * pWB[j];
337 pNB[j] = pWB[j] - pLB[j];
340 p4.
set( pLB[0], pLB[1], pLB[2], pLB[3] );
343 p4.
set( pNB[0], pNB[1], pNB[2], pNB[3] );
351 std::vector<double> sCoeffs( 11 );
364 double c1 = (
m_mB + pl - pp - pm ) * ( pm - pl );
365 double c2 = 2 * ( pl - pp ) * ( pm - pl );
366 double c3 = (
m_mB - pm ) * ( pm - pp );
367 double aF1 =
F10( sCoeffs );
368 double aF2 =
F20( sCoeffs );
369 double aF3 =
F30( sCoeffs );
370 double td0 = c1 * aF1 + c2 * aF2 + c3 * aF3;
376 double tdInt = jetSF.
evaluate( 0, pp * ( 1 - smallfrac ) );
380 double TD = (
m_mB - pp ) * SU * ( td0 + tdInt );
388 double c1 = ( coeffs[5] + coeffs[1] - coeffs[0] - coeffs[2] ) *
389 ( coeffs[2] - coeffs[1] );
390 double c2 = 2 * ( coeffs[1] - coeffs[0] ) * ( coeffs[2] - coeffs[1] );
391 double c3 = ( coeffs[5] - coeffs[2] ) * ( coeffs[2] - coeffs[0] );
393 return c1 *
F1Int( omega, coeffs ) + c2 *
F2Int( omega, coeffs ) +
394 c3 *
F3Int( omega, coeffs );
399 double pp = coeffs[0];
400 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
401 double mui = coeffs[9];
402 double muh = coeffs[8];
404 double result =
U1nlo( muh, mui ) /
U1lo( muh, mui );
406 result +=
anlo( muh, mui ) * log( y );
408 result +=
C_F( muh ) *
409 ( -4 * pow( log( y * coeffs[4] / muh ), 2 ) +
410 10 * log( y * coeffs[4] / muh ) - 4 * log( y ) -
414 result +=
C_F( mui ) *
415 ( 2 * pow( log( y * coeffs[4] * pp / pow( mui, 2 ) ), 2 ) -
416 3 * log( y * coeffs[4] * pp / pow( mui, 2 ) ) + 7 -
420 result += ( -
subS( coeffs ) + 2 *
subT( coeffs ) +
421 (
subU( coeffs ) -
subV( coeffs ) ) * ( 1 / y - 1. ) ) /
423 result +=
shapeFunction( pp, coeffs ) / pow( ( coeffs[5] - coeffs[0] ), 2 ) *
435 double pp = coeffs[0];
436 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
438 return C_F( coeffs[9] ) *
440 ( 4 * log( y * coeffs[4] * ( pp - omega ) / pow( coeffs[9], 2 ) ) -
443 (
g1( y, ( pp - omega ) / ( coeffs[5] - coeffs[0] ) ) /
449 double pp = coeffs[0];
450 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
451 double result =
C_F( coeffs[8] ) * log( y ) / ( 1 - y ) *
454 (
subS( coeffs ) + 2 *
subT( coeffs ) -
455 (
subT( coeffs ) +
subV( coeffs ) ) / y ) /
459 pow( ( coeffs[5] - coeffs[0] ) * y, 2 ) *
467 double pp = coeffs[0];
468 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
469 return C_F( coeffs[9] ) *
470 g3( y, ( pp - omega ) / ( coeffs[5] - coeffs[0] ) ) *
476 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
478 pow( ( coeffs[5] - coeffs[0] ) * y, 2 ) *
484 double pp = coeffs[0];
485 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
486 return C_F( coeffs[9] ) *
487 g3( y, ( pp - omega ) / ( coeffs[5] - coeffs[0] ) ) / 2 *
493 double result = ( y * ( -9 + 10 * y ) + x * x * ( -12 + 13 * y ) +
494 2 * x * ( -8 + 6 * y + 3 * y * y ) ) /
495 y / pow( 1 + x, 2 ) / ( x + y );
496 result -= 4 * log( ( 1 + 1 / x ) * y ) / x;
497 result -= 2 * log( 1 + y / x ) *
498 ( 3 * pow( x, 4 ) * ( -2 + y ) - 2 * pow( y, 3 ) -
499 4 * pow( x, 3 ) * ( 2 + y ) - 2 * x * y * y * ( 4 + y ) -
500 x * x * y * ( 12 + 4 * y + y * y ) ) /
501 x / pow( ( 1 + x ) * y, 2 ) / ( x + y );
507 double result = y * ( 10 * pow( x, 4 ) + y * y + 3 * x * x * y * ( 10 + y ) +
508 pow( x, 3 ) * ( 12 + 19 * y ) +
509 x * y * ( 8 + 4 * y + y * y ) );
510 result -= 2 * x * log( 1 + y / x ) *
511 ( 5 * pow( x, 4 ) + 2 * y * y + 6 * pow( x, 3 ) * ( 1 + 2 * y ) +
512 4 * y * x * ( 1 + 2 * y ) + x * x * y * ( 18 + 5 * y ) );
513 result *= 2 / ( pow( y * ( 1 + x ), 2 ) * y * ( x + y ) );
519 double result = ( 2 * pow( y, 3 ) * ( -11 + 2 * y ) -
520 10 * pow( x, 4 ) * ( 6 - 6 * y + y * y ) +
521 x * y * y * ( -94 + 29 * y + 2 * y * y ) +
522 2 * x * x * y * ( -72 + 18 * y + 13 * y * y ) -
524 ( 72 + 42 * y - 70 * y * y + 3 * pow( y, 3 ) ) ) /
525 ( pow( y * ( 1 + x ), 2 ) * y * ( x + y ) );
526 result += 2 * log( 1 + y / x ) *
527 ( -6 * x * pow( y, 3 ) * ( -5 + y ) + 4 * pow( y, 4 ) +
528 5 * pow( x, 5 ) * ( 6 - 6 * y + y * y ) -
529 4 * pow( x * y, 2 ) * ( -20 + 6 * y + y * y ) +
530 pow( x, 3 ) * y * ( 90 - 10 * y - 28 * y * y + pow( y, 3 ) ) +
531 pow( x, 4 ) * ( 36 + 36 * y - 50 * y * y + 4 * pow( y, 3 ) ) ) /
532 ( pow( ( 1 + x ) * y * y, 2 ) * ( x + y ) );
565 double omega0 = 1.68;
569 }
else if (
m_idSF == 2 ) {
572 pow( c, -( 1 +
m_b ) / 2. ) /
583 if ( sCoeffs[6] == 1 ) {
585 }
else if ( sCoeffs[6] == 2 ) {
589 <<
"EvtVubNLO : unknown shape function # " << sCoeffs[6] << endl;
605 return -2 *
subS( c );
620 }
else if (
m_idSF == 2 ) {
643 }
else if (
m_idSF == 2 ) {
645 double m1 =
Gamma( ( 3 +
m_b ) / 2 ) -
650 double m3 =
Gamma( ( 1 +
m_b ) / 2 ) -
654 ( m1 / m3 - pow( m2 / m3, 2 ) ) / c;
663 return 1 + 4 *
C_F( mui ) *
664 ( -pow( log( mf / mui ), 2 ) - log( mf / mui ) -
666 mu_pi2( omega0 ) / 3 / pow( mf, 2 ) *
667 ( log( mf / mui ) - 0.5 ) );
672 double Lambda4 = 0.302932;
673 double lg = 2 * log( mu / Lambda4 );
675 ( 1 -
beta1() * log( lg ) / pow(
beta0(), 2 ) / lg +
677 ( pow( log( lg ) - 0.5, 2 ) - 1.25 +
682 const std::vector<double>& sCoeffs )
684 double b = sCoeffs[3];
685 double l = sCoeffs[7];
686 double wL = omega / l;
688 return pow( wL, b ) *
exp( -
cGaus( b ) * wL * wL );
692 const std::vector<double>& sCoeffs )
694 double b = sCoeffs[3];
695 double l = sCoeffs[7];
696 double wL = omega / l;
698 return pow( wL, b - 1 ) *
exp( -b * wL );
703 std::array<double, 6> gammaCoeffs{
704 76.18009172947146, -86.50532032941677, 24.01409824083091,
705 -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5 };
711 double tmp = x + 5.5;
712 tmp = tmp - ( x + 0.5 ) * log( tmp );
713 double ser = 1.000000000190015;
715 for (
const auto& gammaCoeff : gammaCoeffs ) {
717 ser += gammaCoeff / y;
720 return exp( -tmp + log( 2.5066282746310005 * ser / x ) );
725 std::vector<double> c( 1 );
729 return jetSF.
evaluate( tmin, 100. );
EvtComplex exp(const EvtComplex &c)
double abs(const EvtComplex &c)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
double getArg(unsigned int j)
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
const EvtId * getDaugs() const
double evaluate(double lower, double upper) const
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
EvtParticle * getDaug(const int i)
void set(int i, double d)
double alo(double mu1, double mu2)
std::vector< double > m_weights
static double integrand(double omega, const std::vector< double > &coeffs)
EvtDecayBase * clone() const override
double anlo(double mu1, double mu2)
static double alphas(double mu)
static double F3Int(double omega, const std::vector< double > &coeffs)
double mu_pi2(double omega0)
double F30(const std::vector< double > &coeffs)
void initProbMax() override
static double beta0(int nf=4)
double subT(const std::vector< double > &coeffs)
double M0(double mui, double omega0)
static double dgamma(double t, const std::vector< double > &c)
static double expShapeFunction(double omega, const std::vector< double > &coeffs)
static double Gamma(double z)
static double F2Int(double omega, const std::vector< double > &coeffs)
static double g1(double y, double z)
double subU(const std::vector< double > &coeffs)
double SFNorm(const std::vector< double > &coeffs)
static double C_F(double mu)
double U1lo(double mu1, double mu2)
static double cGaus(double b)
double U1nlo(double mu1, double mu2)
static double gausShapeFunction(double omega, const std::vector< double > &coeffs)
static double F1Int(double omega, const std::vector< double > &coeffs)
static double g2(double y, double z)
double tripleDiff(double pp, double pl, double pm)
void decay(EvtParticle *p) override
static double beta2(int nf=4)
double F10(const std::vector< double > &coeffs)
static double g3(double y, double z)
double subV(const std::vector< double > &coeffs)
std::vector< double > m_masses
static double shapeFunction(double omega, const std::vector< double > &coeffs)
double subS(const std::vector< double > &coeffs)
std::string getName() const override
double F20(const std::vector< double > &coeffs)
static double beta1(int nf=4)
double lambda_bar(double omega0)