|
EvtGen
2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
|
Go to the documentation of this file. 50 return "VUB_BLNPHYBRID"; 63 << "EvtVubBLNPHybrid generator expected " 65 << " arguments but found: " << getNArg() 66 << "\nWill terminate execution!" << endl; 70 << "EvtVubBLNPHybrid: generate B -> Xu l nu events " 71 << "without using the hybrid reweighting." << endl; 76 << "EvtVubBLNPHybrid could not read number of bins for " 77 << "all variables used in the reweighting\n" 78 << "Will terminate execution!" << endl; 108 const double xlow = 0; 109 const double xhigh = mBB; 110 const int aSize = 10000; 114 for ( int i = 0; i < aSize; i++ ) { 115 double what = xlow + (double)( i + 0.5 ) / ( (double)aSize ) * 122 for ( size_t i = 0; i < _pf.size(); i++ ) { 136 beta0 = 11.0 / 3.0 * CA - 2.0 / 3.0 * nf; 137 beta1 = 34.0 / 3.0 * CA * CA - 10.0 / 3.0 * CA * nf - 2.0 * CF * nf; 139 ( CF * CF - 205.0 / 18.0 * CF * CA - 1415.0 / 54.0 * CA * CA ) * nf + 140 ( 11.0 / 9.0 * CF + 79.0 / 54.0 * CA ) * nf * nf; 142 zeta3 = 1.0 + 1 / 8.0 + 1 / 27.0 + 1 / 64.0; 145 Gamma1 = CF * ( ( 268.0 / 9.0 - 4.0 * M_PI * M_PI / 3.0 ) * CA - 148 ( ( 245.0 / 24.0 - 67.0 / 54.0 * M_PI * M_PI + 149 +11.0 / 180.0 * pow( M_PI, 4 ) + 11.0 / 6.0 * zeta3 ) * 151 +( -209.0 / 108.0 + 5.0 / 27.0 * M_PI * M_PI - 152 7.0 / 3.0 * zeta3 ) * 154 ( -55.0 / 24.0 + 2 * zeta3 ) * CF * nf - nf * nf / 27.0 ); 158 ( ( 3.0 / 16.0 - M_PI * M_PI / 4.0 + 3 * zeta3 ) * CF + 159 ( 1549.0 / 432.0 + 7.0 / 48.0 * M_PI * M_PI - 11.0 / 4.0 * zeta3 ) * 161 ( 125.0 / 216.0 + M_PI * M_PI / 24.0 ) * nf ); 172 pow( Gamma( 0.5 + 0.5 * b ), 2 ) - 188 gvars.push_back( 0.0 ); 189 gvars.push_back( 0.0 ); 221 if ( getNArg() < expectArgs ) { 223 << " finds " << getNArg() << " arguments, expected " << expectArgs 224 << ". Something is wrong with the tables of weights or thresholds." 225 << "\nWill terminate execution!" << endl; 251 EvtParticle *xuhad( nullptr ), *lepton( nullptr ), *neutrino( nullptr ); 253 double EX( 0. ), sh( 0. ), El( 0. ), ml( 0. ); 254 double Pp, Pm, Pl, pdf, qsq, mpi, ratemax; 256 double xhigh, xlow, what; 265 neutrino = Bmeson-> getDaug( 2 ); 275 while ( what > xhigh || what < xlow ) { 277 what = xlow + what * ( xhigh - xlow ); 291 EX = 0.5 * ( Pm + Pp ); 292 qsq = ( mBB - Pp ) * ( mBB - Pm ); 293 El = 0.5 * ( mBB - Pl ); 301 if ( ( Pp > 0 ) && ( Pp <= Pl ) && ( Pl <= Pm ) && ( Pm < mBB ) && 302 ( El > ml ) && ( sh > 4 * mpi * mpi ) ) { 304 pdf = rate3( Pp, Pl, Pm ); 306 if ( pdf >= testRan ) 343 sttmp = sqrt( 1 - ctH * ctH ); 344 ptmp = sqrt( EX * EX - sh ); 345 double pHB[4] = {EX, ptmp * sttmp * cos( phH ), ptmp * sttmp * sin( phH ), 347 p4. set( pHB[0], pHB[1], pHB[2], pHB[3] ); 348 xuhad->init( getDaug( 0 ), p4 ); 360 xuhad->setLifetime( what / 10000. ); 366 double pWB[4] = { mBB - EX, -pHB[1], -pHB[2], -pHB[3]}; 371 double mW2 = mBB * mBB + sh - 2 * mBB * EX; 372 double beta = ptmp / pWB[0]; 373 double gamma = pWB[0] / sqrt( mW2 ); 377 ptmp = ( mW2 - ml * ml ) / 2 / sqrt( mW2 ); 378 pLW[0] = sqrt( ml * ml + ptmp * ptmp ); 380 double ctL = ( El - gamma * pLW[0] ) / beta / gamma / ptmp; 385 sttmp = sqrt( 1 - ctL * ctL ); 388 double xW[3] = {-pWB[2], pWB[1], 0}; 390 double zW[3] = {pWB[1] / apWB, pWB[2] / apWB, pWB[3] / apWB}; 392 double lx = sqrt( xW[0] * xW[0] + xW[1] * xW[1] ); 393 for ( j = 0; j < 2; j++ ) 397 double yW[3] = {-pWB[1] * pWB[3], -pWB[2] * pWB[3], 398 pWB[1] * pWB[1] + pWB[2] * pWB[2]}; 399 double ly = sqrt( yW[0] * yW[0] + yW[1] * yW[1] + yW[2] * yW[2] ); 400 for ( j = 0; j < 3; j++ ) 406 for ( j = 0; j < 3; j++ ) 407 pLW[j + 1] = sttmp * cos( phL ) * ptmp * xW[j] + 408 sttmp * sin( phL ) * ptmp * yW[j] + ctL * ptmp * zW[j]; 414 double appLB = beta * gamma * pLW[0] + gamma * ctL * apLW; 416 ptmp = sqrt( El * El - ml * ml ); 417 double ctLL = appLB / ptmp; 424 double pLB[4] = {El, 0, 0, 0}; 425 double pNB[4] = {pWB[0] - El, 0, 0, 0}; 427 for ( j = 1; j < 4; j++ ) { 428 pLB[j] = pLW[j] + ( ctLL * ptmp - ctL * apLW ) / apWB * pWB[j]; 429 pNB[j] = pWB[j] - pLB[j]; 432 p4. set( pLB[0], pLB[1], pLB[2], pLB[3] ); 433 lepton->init( getDaug( 1 ), p4 ); 435 p4. set( pNB[0], pNB[1], pNB[2], pNB[3] ); 447 double done1 = Done1( Pp, Pm, mui ); 448 double done2 = Done2( Pp, Pm, mui ); 449 double done3 = Done3( Pp, Pm, mui ); 455 if ( doneJS * done1 * done2 * done3 == 0.0 ) { 466 double answer = factor * ( ( mBB + Pl - Pp - Pm ) * ( Pm - Pl ) * f1 + 467 2 * ( Pl - Pp ) * ( Pm - Pl ) * f2 + 468 ( mBB - Pm ) * ( Pm - Pp ) * f3 ); 473 double mubar, double doneJS, double done1 ) 475 std::vector<double> vars( 12 ); 478 for ( int j = 2; j < 12; j++ ) { 482 double y = ( Pm - Pp ) / ( mBB - Pp ); 488 double t1 = -4 * ai / ( Pp - Lbar ) * ( 2 * log( ( Pp - Lbar ) / mui ) + 1 ); 490 double t3 = -4.0 * pow( log( y * mb / muh ), 2 ) + 491 10.0 * log( y * mb / muh ) - 4.0 * log( y ) - 492 2.0 * log( y ) / ( 1 - y ) - 4.0 * PolyLog( 2, 1 - y ) - 493 M_PI * M_PI / 6.0 - 12.0; 494 double t4 = 2 * pow( log( y * mb * Pp / ( mui * mui ) ), 2 ) - 495 3 * log( y * mb * Pp / ( mui * mui ) ) + 7 - M_PI * M_PI; 497 double t5 = - wS( Pp ) + 2 * t( Pp ) + 498 ( 1.0 / y - 1.0 ) * ( u( Pp ) - v( Pp ) ); 499 double t6 = -( lambda1 + 3.0 * lambda2 ) / 3.0 + 500 1.0 / pow( y, 2 ) * ( 4.0 / 3.0 * lambda1 - 2.0 * lambda2 ); 502 double shapePp = Shat( Pp, vars ); 504 double answer = ( t2 + ah * t3 + ai * t4 ) * shapePp + ai * doneJS + 506 1 / pow( mBB - Pp, 2 ) * flag3 * shapePp * t6; 508 answer = answer + t1; 513 double mubar, double done3 ) 515 std::vector<double> vars( 12 ); 518 for ( int j = 2; j < 12; j++ ) { 522 double y = ( Pm - Pp ) / ( mBB - Pp ); 527 double t6 = - wS( Pp ) - 2 * t( Pp ) + 1.0 / y * ( t( Pp ) + v( Pp ) ); 528 double t7 = 1 / pow( y, 2 ) * ( 2.0 / 3.0 * lambda1 + 4.0 * lambda2 ) - 529 1 / y * ( 2.0 / 3.0 * lambda1 + 3.0 / 2.0 * lambda2 ); 531 double shapePp = Shat( Pp, vars ); 533 double answer = ah * log( y ) / ( 1 - y ) * shapePp + 535 ( flag2 * abar * 0.5 * done3 + flag1 / y * t6 ) + 536 1.0 / pow( mBB - Pp, 2 ) * flag3 * shapePp * t7; 541 double , double mubar, double done2 ) 543 std::vector<double> vars( 12 ); 546 for ( int j = 2; j < 12; j++ ) { 550 double y = ( Pm - Pp ) / ( mBB - Pp ); 554 double t7 = 1.0 / pow( y, 2 ) * ( -2.0 / 3.0 * lambda1 + lambda2 ); 556 double shapePp = Shat( Pp, vars ); 558 double answer = 1.0 / ( Pm - Pp ) * flag2 * 0.5 * y * abar * done2 + 559 1.0 / pow( mBB - Pp, 2 ) * flag3 * shapePp * t7; 565 std::vector<double> vars( 12 ); 568 for ( int j = 2; j < 12; j++ ) { 572 double lowerlim = 0.001 * Pp; 573 double upperlim = ( 1.0 - 0.001 ) * Pp; 577 return integ.evaluate( lowerlim, upperlim ); 582 std::vector<double> vars( 12 ); 585 for ( int j = 2; j < 12; j++ ) { 589 double lowerlim = 0.001 * Pp; 590 double upperlim = ( 1.0 - 0.001 ) * Pp; 594 return integ.evaluate( lowerlim, upperlim ); 599 std::vector<double> vars( 12 ); 602 for ( int j = 2; j < 12; j++ ) { 606 double lowerlim = 0.001 * Pp; 607 double upperlim = ( 1.0 - 0.001 ) * Pp; 611 return integ.evaluate( lowerlim, upperlim ); 616 std::vector<double> vars( 12 ); 619 for ( int j = 2; j < 12; j++ ) { 623 double lowerlim = 0.001 * Pp; 624 double upperlim = ( 1.0 - 0.001 ) * Pp; 628 return integ.evaluate( lowerlim, upperlim ); 633 return Shat( what, vars ) * g1( what, vars ); 638 return Shat( what, vars ) * g2( what, vars ); 643 return Shat( what, vars ) * g3( what, vars ); 650 double mui = vars[2]; 651 double mBB = vars[5]; 653 double y = ( Pm - Pp ) / ( mBB - Pp ); 655 return 1 / ( Pp - what ) * ( Shat( what, vars ) - Shat( Pp, vars ) ) * 656 ( 4 * log( y * mb * ( Pp - what ) / ( mui * mui ) ) - 3 ); 663 double mBB = vars[5]; 664 double y = ( Pm - Pp ) / ( mBB - Pp ); 665 double x = ( Pp - w ) / ( mBB - Pp ); 667 double q1 = ( 1 + x ) * ( 1 + x ) * y * ( x + y ); 668 double q2 = y * ( -9 + 10 * y ) + x * x * ( -12.0 + 13.0 * y ) + 669 2 * x * ( -8.0 + 6 * y + 3 * y * y ); 670 double q3 = 4 / x * log( y + y / x ); 671 double q4 = 3.0 * pow( x, 4 ) * ( -2.0 + y ) - 2 * pow( y, 3 ) - 672 4 * pow( x, 3 ) * ( 2.0 + y ) - 2 * x * y * y * ( 4 + y ) - 673 x * x * y * ( 12 + 4 * y + y * y ); 674 double q5 = log( 1 + y / x ); 676 double answer = q2 / q1 - q3 - 2 * q4 * q5 / ( q1 * y * x ); 684 double mBB = vars[5]; 685 double y = ( Pm - Pp ) / ( mBB - Pp ); 686 double x = ( Pp - w ) / ( mBB - Pp ); 688 double q1 = ( 1 + x ) * ( 1 + x ) * pow( y, 3 ) * ( x + y ); 689 double q2 = 10.0 * pow( x, 4 ) + y * y + 690 3.0 * pow( x, 2 ) * y * ( 10.0 + y ) + 691 pow( x, 3 ) * ( 12.0 + 19.0 * y ) + 692 x * y * ( 8.0 + 4.0 * y + y * y ); 693 double q3 = 5 * pow( x, 4 ) + 2.0 * y * y + 694 6.0 * pow( x, 3 ) * ( 1.0 + 2.0 * y ) + 695 4.0 * x * y * ( 1 + 2.0 * y ) + x * x * y * ( 18.0 + 5.0 * y ); 696 double q4 = log( 1 + y / x ); 698 double answer = 2.0 / q1 * ( y * q2 - 2 * x * q3 * q4 ); 706 double mBB = vars[5]; 707 double y = ( Pm - Pp ) / ( mBB - Pp ); 708 double x = ( Pp - w ) / ( mBB - Pp ); 710 double q1 = ( 1 + x ) * ( 1 + x ) * pow( y, 3 ) * ( x + y ); 711 double q2 = 2.0 * pow( y, 3 ) * ( -11.0 + 2.0 * y ) - 712 10.0 * pow( x, 4 ) * ( 6 - 6 * y + y * y ) + 713 x * y * y * ( -94.0 + 29.0 * y + 2.0 * y * y ) + 714 2.0 * x * x * y * ( -72.0 + 18.0 * y + 13.0 * y * y ) - 715 x * x * x * ( 72.0 + 42.0 * y - 70.0 * y * y + 3.0 * y * y * y ); 716 double q3 = -6.0 * x * ( -5.0 + y ) * pow( y, 3 ) + 4 * pow( y, 4 ) + 717 5 * pow( x, 5 ) * ( 6 - 6 * y + y * y ) - 718 4 * x * x * y * y * ( -20.0 + 6 * y + y * y ) + 719 pow( x, 3 ) * y * ( 90.0 - 10.0 * y - 28.0 * y * y + y * y * y ) + 720 pow( x, 4 ) * ( 36.0 + 36.0 * y - 50.0 * y * y + 4 * y * y * y ); 721 double q4 = log( 1 + y / x ); 723 double answer = q2 / q1 + 2 / q1 / y * q3 * q4; 729 double mui = vars[2]; 732 double wzero = vars[7]; 733 int itype = (int)vars[11]; 739 double Lambar = ( Lambda / b ) * 742 double muf = wzero - Lambar; 755 double dcoef = pow( Gamma( 0.5 * ( 1 + b ) ) / Gamma( 0.5 * b ), 2 ); 759 pow( dcoef, 0.5 ) / ( Gamma( 0.5 * b ) - Gamma( 0.5 * b, t1 ) ); 760 double muf = wzero - Lambar; 768 shape = 2 * pow( dcoef, 0.5 * b ) / Lambda / Gamma( 0.5 * b ) * 773 double answer = norm * shape; 778 const std::vector<double>& vars ) 780 double CF = 4.0 / 3.0; 781 double amu = CF * alphas( mu, vars ) / M_PI; 783 amu * ( pow( log( muf / mu ), 2 ) + log( muf / mu ) + 784 M_PI * M_PI / 24.0 ) + 785 amu * ( log( muf / mu ) - 0.5 ) * mupisq / ( 3 * muf * muf ); 862 double factor = 0.5 * mom2 * pow( bval / Lbar, 3 ); 863 double answer = factor * exp( -bval * x ) * 864 ( 1 - 2 * bval * x + 0.5 * bval * bval * x * x ); 871 double normBIK = ( 4 - M_PI ) * M_PI * M_PI / 8 / ( 2 - M_PI ) / aval + 1; 872 double z = 3 * M_PI * w / 8 / Lbar; 873 double q = M_PI * M_PI * 2 * pow( M_PI * aval, 0.5 ) * exp( -aval * z * z ) / 874 ( 4 * M_PI - 8 ) * ( 1 - 2 * pow( aval / M_PI, 0.5 ) * z ) + 875 8 / pow( 1 + z * z, 4 ) * 876 ( z * log( z ) + 0.5 * z * ( 1 + z * z ) - 877 M_PI / 4 * ( 1 - z * z ) ); 878 double answer = q / normBIK; 887 double q1 = ( ah - ai ) / ( 4 * M_PI * beta0 ); 892 ( 4 * pow( beta0, 3 ) ); 906 double epsilon = 0.0; 925 ( -1.0 + 1.0 / r + log( r ) ); 946 ( -0.5 * pow( 1 - r, 2 ) * w1 + w2 * ( 1 - r ) * log( r ) + 947 w3 * ( 1 - r + r * log( r ) ) ); 956 epsilon * ( a2 - a1 ) / ( 8.0 * M_PI ) * 966 epsilon * ( a2 - a1 ) / ( 8.0 * M_PI ) * 981 double answer = ( ah - ai ) / ( 8.0 * M_PI ) * 991 double beta0 = vars[8]; 992 double beta1 = vars[9]; 993 double beta2 = vars[10]; 995 double Lambda4 = 0.298791; 996 double lg = 2 * log( mu / Lambda4 ); 997 double answer = 4 * M_PI / ( beta0 * lg ) * 1000 ( ( log( lg ) - 0.5 ) * ( log( lg ) - 0.5 ) - 1008 cout << "Error in EvtVubBLNPHybrid: 2nd argument to PolyLog is >= 1." 1012 for ( int k = 1; k < 101; k++ ) { 1013 sum = sum + pow( z, k ) / pow( k, v ); 1023 double v = lgamma( z ); 1035 LogGamma = lgamma( a ); 1036 if ( x < ( a + 1.0 ) ) 1037 return gamser( a, x, LogGamma ); 1039 return 1.0 - gammcf( a, x, LogGamma ); 1048 double ap, del, sum; 1051 del = sum = 1.0 / a; 1052 for ( n = 1; n < ITMAX; n++ ) { 1056 if ( fabs( del ) < fabs( sum ) * EPS ) 1057 return sum * exp( -x + a * log( x ) - LogGamma ); 1069 double an, b, c, d, del, h; 1076 for ( i = 1; i < ITMAX; i++ ) { 1077 an = -i * ( i - a ); 1080 if ( fabs( d ) < FPMIN ) 1083 if ( fabs( c ) < FPMIN ) 1088 if ( fabs( del - 1.0 ) < EPS ) 1089 return exp( -x + a * log( x ) - LogGamma ) * h; 1099 double oOverBins = 1.0 / ( float( _pf.size() ) ); 1101 int nBinsAbove = _pf.size(); 1104 while ( nBinsAbove > nBinsBelow + 1 ) { 1105 middle = ( nBinsAbove + nBinsBelow + 1 ) >> 1; 1106 if ( ranNum >= _pf[middle] ) { 1107 nBinsBelow = middle; 1109 nBinsAbove = middle; 1113 double bSize = _pf[nBinsAbove] - _pf[nBinsBelow]; 1120 return ( nBinsBelow + .5 ) * oOverBins; 1123 double bFract = ( ranNum - _pf[nBinsBelow] ) / bSize; 1125 return ( nBinsBelow + bFract ) * oOverBins; 1134 for ( unsigned i = 0; i < _bins_mX.size(); i++ ) { 1138 for ( unsigned i = 0; i < _bins_q2.size(); i++ ) { 1142 for ( unsigned i = 0; i < _bins_El.size(); i++ ) { 1146 int ibin = ibin_mX + ibin_q2 * _bins_mX.size() + 1149 if ( ( ibin_mX < 0 ) || ( ibin_q2 < 0 ) || ( ibin_El < 0 ) ) { 1151 << "Cannot determine hybrid weight " 1152 << "for this event " 1153 << "-> assign weight = 0" << endl; 1166 w = getArg( startArg++ ); 1173 << "EvtVub generator expected at least one " 1174 << " weight > 0, but found none! " 1175 << "Will terminate execution!" << endl; std::vector< double > _bins_mX
double aGamma(double mu1, double mu2, double epsilon)
double myfunction(double w, double Lbar, double mom2)
std::vector< double > _bins_El
EvtDecayBase * clone() override
double F2(double Pp, double Pm, double muh, double mui, double mubar, double done3)
double Done3(double Pp, double Pm, double mui)
double dU1nlo(double muh, double mui)
double DoneJS(double Pp, double Pm, double mui)
double getSFBLNP(const double &what)
double getArg(unsigned int j)
double Done1(double Pp, double Pm, double mui)
std::vector< double > _weights
double Sfun(double mu1, double mu2, double epsilon)
static double g3(double w, const std::vector< double > &vars)
static double IntJS(double what, const std::vector< double > &vars)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
double S1(double a1, double r)
void decay(EvtParticle *Bmeson) override
static double Int1(double what, const std::vector< double > &vars)
std::vector< double > _pf
std::vector< double > gvars
void readWeights(int startArg=0)
static double Int3(double what, const std::vector< double > &vars)
void set(int i, double d)
static double Mzero(double muf, double mu, double mupisq, const std::vector< double > &vars)
static double alphas(double mu, const std::vector< double > &vars)
static double Gamma(double z)
double F1(double Pp, double Pm, double muh, double mui, double mubar, double doneJS, double done1)
double S0(double a1, double r)
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double getWeight(double mX, double q2, double El)
double PolyLog(double v, double z)
void checkNDaug(int d1, int d2=-1)
double rate3(double Pp, double Pl, double Pm)
double abs(const EvtComplex &c)
std::vector< double > _bins_q2
static double gammcf(double a, double x, double LogGamma)
EvtComplex exp(const EvtComplex &c)
void initProbMax() override
double alo(double muh, double mui)
static double Shat(double w, const std::vector< double > &vars)
double Done2(double Pp, double Pm, double mui)
EvtParticle * getDaug(int i)
static double g1(double w, const std::vector< double > &vars)
double F3(double Pp, double Pm, double muh, double mui, double mubar, double done2)
static double Int2(double what, const std::vector< double > &vars)
double agp(double mu1, double mu2, double epsilon)
double myfunctionBIK(double w, double Lbar, double mom2)
static double gamser(double a, double x, double LogGamma)
static double g2(double w, const std::vector< double > &vars)
double S2(double a1, double r)
std::string getName() override
double anlo(double muh, double mui)
double U1lo(double muh, double mui)
EvtId getDaug(int i) const
|