|
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. 86 const double xlow = 0; 87 const double xhigh = mBB; 88 const int aSize = 10000; 92 for ( int i = 0; i < aSize; i++ ) { 93 double what = xlow + (double)( i + 0.5 ) / ( (double)aSize ) * 100 for ( size_t i = 0; i < _pf.size(); i++ ) { 114 beta0 = 11.0 / 3.0 * CA - 2.0 / 3.0 * nf; 115 beta1 = 34.0 / 3.0 * CA * CA - 10.0 / 3.0 * CA * nf - 2.0 * CF * nf; 117 ( CF * CF - 205.0 / 18.0 * CF * CA - 1415.0 / 54.0 * CA * CA ) * nf + 118 ( 11.0 / 9.0 * CF + 79.0 / 54.0 * CA ) * nf * nf; 120 zeta3 = 1.0 + 1 / 8.0 + 1 / 27.0 + 1 / 64.0; 123 Gamma1 = CF * ( ( 268.0 / 9.0 - 4.0 * M_PI * M_PI / 3.0 ) * CA - 126 ( ( 245.0 / 24.0 - 67.0 / 54.0 * M_PI * M_PI + 127 +11.0 / 180.0 * pow( M_PI, 4 ) + 11.0 / 6.0 * zeta3 ) * 129 +( -209.0 / 108.0 + 5.0 / 27.0 * M_PI * M_PI - 130 7.0 / 3.0 * zeta3 ) * 132 ( -55.0 / 24.0 + 2 * zeta3 ) * CF * nf - nf * nf / 27.0 ); 136 ( ( 3.0 / 16.0 - M_PI * M_PI / 4.0 + 3 * zeta3 ) * CF + 137 ( 1549.0 / 432.0 + 7.0 / 48.0 * M_PI * M_PI - 11.0 / 4.0 * zeta3 ) * 139 ( 125.0 / 216.0 + M_PI * M_PI / 24.0 ) * nf ); 150 pow( Gamma( 0.5 + 0.5 * b ), 2 ) - 166 gvars.push_back( 0.0 ); 167 gvars.push_back( 0.0 ); 193 EvtParticle *xuhad( 0 ), *lepton( 0 ), *neutrino( 0 ); 195 double Pp, Pm, Pl, pdf, EX, sh, ml, mpi, ratemax; 198 double xhigh, xlow, what; 204 neutrino = Bmeson-> getDaug( 2 ); 214 while ( what > xhigh || what < xlow ) { 216 what = xlow + what * ( xhigh - xlow ); 230 EX = 0.5 * ( Pm + Pp ); 231 El = 0.5 * ( mBB - Pl ); 239 if ( ( Pp > 0 ) && ( Pp <= Pl ) && ( Pl <= Pm ) && ( Pm < mBB ) && 240 ( El > ml ) && ( sh > 4 * mpi * mpi ) ) { 242 pdf = rate3( Pp, Pl, Pm ); 244 if ( pdf >= testRan ) 265 sttmp = sqrt( 1 - ctH * ctH ); 266 ptmp = sqrt( EX * EX - sh ); 267 double pHB[4] = {EX, ptmp * sttmp * cos( phH ), ptmp * sttmp * sin( phH ), 269 p4. set( pHB[0], pHB[1], pHB[2], pHB[3] ); 270 xuhad->init( getDaug( 0 ), p4 ); 272 bool _storeWhat( true ); 284 xuhad->setLifetime( what / 10000. ); 290 double pWB[4] = { mBB - EX, -pHB[1], -pHB[2], -pHB[3]}; 295 double mW2 = mBB * mBB + sh - 2 * mBB * EX; 296 double beta = ptmp / pWB[0]; 297 double gamma = pWB[0] / sqrt( mW2 ); 301 ptmp = ( mW2 - ml * ml ) / 2 / sqrt( mW2 ); 302 pLW[0] = sqrt( ml * ml + ptmp * ptmp ); 304 double ctL = ( El - gamma * pLW[0] ) / beta / gamma / ptmp; 309 sttmp = sqrt( 1 - ctL * ctL ); 312 double xW[3] = {-pWB[2], pWB[1], 0}; 314 double zW[3] = {pWB[1] / apWB, pWB[2] / apWB, pWB[3] / apWB}; 316 double lx = sqrt( xW[0] * xW[0] + xW[1] * xW[1] ); 317 for ( j = 0; j < 2; j++ ) 321 double yW[3] = {-pWB[1] * pWB[3], -pWB[2] * pWB[3], 322 pWB[1] * pWB[1] + pWB[2] * pWB[2]}; 323 double ly = sqrt( yW[0] * yW[0] + yW[1] * yW[1] + yW[2] * yW[2] ); 324 for ( j = 0; j < 3; j++ ) 330 for ( j = 0; j < 3; j++ ) 331 pLW[j + 1] = sttmp * cos( phL ) * ptmp * xW[j] + 332 sttmp * sin( phL ) * ptmp * yW[j] + ctL * ptmp * zW[j]; 338 double appLB = beta * gamma * pLW[0] + gamma * ctL * apLW; 340 ptmp = sqrt( El * El - ml * ml ); 341 double ctLL = appLB / ptmp; 348 double pLB[4] = {El, 0, 0, 0}; 349 double pNB[4] = {pWB[0] - El, 0, 0, 0}; 351 for ( j = 1; j < 4; j++ ) { 352 pLB[j] = pLW[j] + ( ctLL * ptmp - ctL * apLW ) / apWB * pWB[j]; 353 pNB[j] = pWB[j] - pLB[j]; 356 p4. set( pLB[0], pLB[1], pLB[2], pLB[3] ); 357 lepton->init( getDaug( 1 ), p4 ); 359 p4. set( pNB[0], pNB[1], pNB[2], pNB[3] ); 373 double done1 = Done1( Pp, Pm, mui ); 374 double done2 = Done2( Pp, Pm, mui ); 375 double done3 = Done3( Pp, Pm, mui ); 381 if ( doneJS * done1 * done2 * done3 == 0.0 ) { 392 double answer = factor * ( ( mBB + Pl - Pp - Pm ) * ( Pm - Pl ) * f1 + 393 2 * ( Pl - Pp ) * ( Pm - Pl ) * f2 + 394 ( mBB - Pm ) * ( Pm - Pp ) * f3 ); 399 double mubar, double doneJS, double done1 ) 401 std::vector<double> vars( 12 ); 404 for ( int j = 2; j < 12; j++ ) { 408 double y = ( Pm - Pp ) / ( mBB - Pp ); 414 double t1 = -4 * ai / ( Pp - Lbar ) * ( 2 * log( ( Pp - Lbar ) / mui ) + 1 ); 416 double t3 = -4.0 * pow( log( y * mb / muh ), 2 ) + 417 10.0 * log( y * mb / muh ) - 4.0 * log( y ) - 418 2.0 * log( y ) / ( 1 - y ) - 4.0 * PolyLog( 2, 1 - y ) - 419 M_PI * M_PI / 6.0 - 12.0; 420 double t4 = 2 * pow( log( y * mb * Pp / ( mui * mui ) ), 2 ) - 421 3 * log( y * mb * Pp / ( mui * mui ) ) + 7 - M_PI * M_PI; 423 double t5 = - wS( Pp ) + 2 * t( Pp ) + 424 ( 1.0 / y - 1.0 ) * ( u( Pp ) - v( Pp ) ); 425 double t6 = -( lambda1 + 3.0 * lambda2 ) / 3.0 + 426 1.0 / pow( y, 2 ) * ( 4.0 / 3.0 * lambda1 - 2.0 * lambda2 ); 428 double shapePp = Shat( Pp, vars ); 430 double answer = ( t2 + ah * t3 + ai * t4 ) * shapePp + ai * doneJS + 432 1 / pow( mBB - Pp, 2 ) * flag3 * shapePp * t6; 434 answer = answer + t1; 439 double mubar, double done3 ) 441 std::vector<double> vars( 12 ); 444 for ( int j = 2; j < 12; j++ ) { 448 double y = ( Pm - Pp ) / ( mBB - Pp ); 453 double t6 = - wS( Pp ) - 2 * t( Pp ) + 1.0 / y * ( t( Pp ) + v( Pp ) ); 454 double t7 = 1 / pow( y, 2 ) * ( 2.0 / 3.0 * lambda1 + 4.0 * lambda2 ) - 455 1 / y * ( 2.0 / 3.0 * lambda1 + 3.0 / 2.0 * lambda2 ); 457 double shapePp = Shat( Pp, vars ); 459 double answer = ah * log( y ) / ( 1 - y ) * shapePp + 461 ( flag2 * abar * 0.5 * done3 + flag1 / y * t6 ) + 462 1.0 / pow( mBB - Pp, 2 ) * flag3 * shapePp * t7; 467 double mubar, double done2 ) 469 std::vector<double> vars( 12 ); 472 for ( int j = 2; j < 12; j++ ) { 476 double y = ( Pm - Pp ) / ( mBB - Pp ); 480 double t7 = 1.0 / pow( y, 2 ) * ( -2.0 / 3.0 * lambda1 + lambda2 ); 482 double shapePp = Shat( Pp, vars ); 484 double answer = 1.0 / ( Pm - Pp ) * flag2 * 0.5 * y * abar * done2 + 485 1.0 / pow( mBB - Pp, 2 ) * flag3 * shapePp * t7; 491 std::vector<double> vars( 12 ); 494 for ( int j = 2; j < 12; j++ ) { 498 double lowerlim = 0.001 * Pp; 499 double upperlim = ( 1.0 - 0.001 ) * Pp; 503 return integ.evaluate( lowerlim, upperlim ); 508 std::vector<double> vars( 12 ); 511 for ( int j = 2; j < 12; j++ ) { 515 double lowerlim = 0.001 * Pp; 516 double upperlim = ( 1.0 - 0.001 ) * Pp; 520 return integ.evaluate( lowerlim, upperlim ); 525 std::vector<double> vars( 12 ); 528 for ( int j = 2; j < 12; j++ ) { 532 double lowerlim = 0.001 * Pp; 533 double upperlim = ( 1.0 - 0.001 ) * Pp; 537 return integ.evaluate( lowerlim, upperlim ); 542 std::vector<double> vars( 12 ); 545 for ( int j = 2; j < 12; j++ ) { 549 double lowerlim = 0.001 * Pp; 550 double upperlim = ( 1.0 - 0.001 ) * Pp; 554 return integ.evaluate( lowerlim, upperlim ); 559 return Shat( what, vars ) * g1( what, vars ); 564 return Shat( what, vars ) * g2( what, vars ); 569 return Shat( what, vars ) * g3( what, vars ); 576 double mui = vars[2]; 577 double mBB = vars[5]; 579 double y = ( Pm - Pp ) / ( mBB - Pp ); 581 return 1 / ( Pp - what ) * ( Shat( what, vars ) - Shat( Pp, vars ) ) * 582 ( 4 * log( y * mb * ( Pp - what ) / ( mui * mui ) ) - 3 ); 589 double mBB = vars[5]; 590 double y = ( Pm - Pp ) / ( mBB - Pp ); 591 double x = ( Pp - w ) / ( mBB - Pp ); 593 double q1 = ( 1 + x ) * ( 1 + x ) * y * ( x + y ); 594 double q2 = y * ( -9 + 10 * y ) + x * x * ( -12.0 + 13.0 * y ) + 595 2 * x * ( -8.0 + 6 * y + 3 * y * y ); 596 double q3 = 4 / x * log( y + y / x ); 597 double q4 = 3.0 * pow( x, 4 ) * ( -2.0 + y ) - 2 * pow( y, 3 ) - 598 4 * pow( x, 3 ) * ( 2.0 + y ) - 2 * x * y * y * ( 4 + y ) - 599 x * x * y * ( 12 + 4 * y + y * y ); 600 double q5 = log( 1 + y / x ); 602 double answer = q2 / q1 - q3 - 2 * q4 * q5 / ( q1 * y * x ); 610 double mBB = vars[5]; 611 double y = ( Pm - Pp ) / ( mBB - Pp ); 612 double x = ( Pp - w ) / ( mBB - Pp ); 614 double q1 = ( 1 + x ) * ( 1 + x ) * pow( y, 3 ) * ( x + y ); 615 double q2 = 10.0 * pow( x, 4 ) + y * y + 616 3.0 * pow( x, 2 ) * y * ( 10.0 + y ) + 617 pow( x, 3 ) * ( 12.0 + 19.0 * y ) + 618 x * y * ( 8.0 + 4.0 * y + y * y ); 619 double q3 = 5 * pow( x, 4 ) + 2.0 * y * y + 620 6.0 * pow( x, 3 ) * ( 1.0 + 2.0 * y ) + 621 4.0 * x * y * ( 1 + 2.0 * y ) + x * x * y * ( 18.0 + 5.0 * y ); 622 double q4 = log( 1 + y / x ); 624 double answer = 2.0 / q1 * ( y * q2 - 2 * x * q3 * q4 ); 632 double mBB = vars[5]; 633 double y = ( Pm - Pp ) / ( mBB - Pp ); 634 double x = ( Pp - w ) / ( mBB - Pp ); 636 double q1 = ( 1 + x ) * ( 1 + x ) * pow( y, 3 ) * ( x + y ); 637 double q2 = 2.0 * pow( y, 3 ) * ( -11.0 + 2.0 * y ) - 638 10.0 * pow( x, 4 ) * ( 6 - 6 * y + y * y ) + 639 x * y * y * ( -94.0 + 29.0 * y + 2.0 * y * y ) + 640 2.0 * x * x * y * ( -72.0 + 18.0 * y + 13.0 * y * y ) - 641 x * x * x * ( 72.0 + 42.0 * y - 70.0 * y * y + 3.0 * y * y * y ); 642 double q3 = -6.0 * x * ( -5.0 + y ) * pow( y, 3 ) + 4 * pow( y, 4 ) + 643 5 * pow( x, 5 ) * ( 6 - 6 * y + y * y ) - 644 4 * x * x * y * y * ( -20.0 + 6 * y + y * y ) + 645 pow( x, 3 ) * y * ( 90.0 - 10.0 * y - 28.0 * y * y + y * y * y ) + 646 pow( x, 4 ) * ( 36.0 + 36.0 * y - 50.0 * y * y + 4 * y * y * y ); 647 double q4 = log( 1 + y / x ); 649 double answer = q2 / q1 + 2 / q1 / y * q3 * q4; 655 double mui = vars[2]; 658 double wzero = vars[7]; 659 int itype = (int)vars[11]; 665 double Lambar = ( Lambda / b ) * 668 double muf = wzero - Lambar; 681 double dcoef = pow( Gamma( 0.5 * ( 1 + b ) ) / Gamma( 0.5 * b ), 2 ); 685 pow( dcoef, 0.5 ) / ( Gamma( 0.5 * b ) - Gamma( 0.5 * b, t1 ) ); 686 double muf = wzero - Lambar; 694 shape = 2 * pow( dcoef, 0.5 * b ) / Lambda / Gamma( 0.5 * b ) * 699 double answer = norm * shape; 704 const std::vector<double>& vars ) 706 double CF = 4.0 / 3.0; 707 double amu = CF * alphas( mu, vars ) / M_PI; 709 amu * ( pow( log( muf / mu ), 2 ) + log( muf / mu ) + 710 M_PI * M_PI / 24.0 ) + 711 amu * ( log( muf / mu ) - 0.5 ) * mupisq / ( 3 * muf * muf ); 788 double factor = 0.5 * mom2 * pow( bval / Lbar, 3 ); 789 double answer = factor * exp( -bval * x ) * 790 ( 1 - 2 * bval * x + 0.5 * bval * bval * x * x ); 797 double normBIK = ( 4 - M_PI ) * M_PI * M_PI / 8 / ( 2 - M_PI ) / aval + 1; 798 double z = 3 * M_PI * w / 8 / Lbar; 799 double q = M_PI * M_PI * 2 * pow( M_PI * aval, 0.5 ) * exp( -aval * z * z ) / 800 ( 4 * M_PI - 8 ) * ( 1 - 2 * pow( aval / M_PI, 0.5 ) * z ) + 801 8 / pow( 1 + z * z, 4 ) * 802 ( z * log( z ) + 0.5 * z * ( 1 + z * z ) - 803 M_PI / 4 * ( 1 - z * z ) ); 804 double answer = q / normBIK; 813 double q1 = ( ah - ai ) / ( 4 * M_PI * beta0 ); 818 ( 4 * pow( beta0, 3 ) ); 832 double epsilon = 0.0; 851 ( -1.0 + 1.0 / r + log( r ) ); 872 ( -0.5 * pow( 1 - r, 2 ) * w1 + w2 * ( 1 - r ) * log( r ) + 873 w3 * ( 1 - r + r * log( r ) ) ); 882 epsilon * ( a2 - a1 ) / ( 8.0 * M_PI ) * 892 epsilon * ( a2 - a1 ) / ( 8.0 * M_PI ) * 907 double answer = ( ah - ai ) / ( 8.0 * M_PI ) * 917 double beta0 = vars[8]; 918 double beta1 = vars[9]; 919 double beta2 = vars[10]; 921 double Lambda4 = 0.298791; 922 double lg = 2 * log( mu / Lambda4 ); 923 double answer = 4 * M_PI / ( beta0 * lg ) * 926 ( ( log( lg ) - 0.5 ) * ( log( lg ) - 0.5 ) - 934 cout << "Error in EvtVubBLNP: 2nd argument to PolyLog is >= 1." << endl; 937 for ( int k = 1; k < 101; k++ ) { 938 sum = sum + pow( z, k ) / pow( k, v ); 948 double v = lgamma( z ); 960 LogGamma = lgamma( a ); 961 if ( x < ( a + 1.0 ) ) 962 return gamser( a, x, LogGamma ); 964 return 1.0 - gammcf( a, x, LogGamma ); 977 for ( n = 1; n < ITMAX; n++ ) { 981 if ( fabs( del ) < fabs( sum ) * EPS ) 982 return sum * exp( -x + a * log( x ) - LogGamma ); 994 double an, b, c, d, del, h; 1001 for ( i = 1; i < ITMAX; i++ ) { 1002 an = -i * ( i - a ); 1005 if ( fabs( d ) < FPMIN ) 1008 if ( fabs( c ) < FPMIN ) 1013 if ( fabs( del - 1.0 ) < EPS ) 1014 return exp( -x + a * log( x ) - LogGamma ) * h; 1024 double oOverBins = 1.0 / ( float( _pf.size() ) ); 1026 int nBinsAbove = _pf.size(); 1029 while ( nBinsAbove > nBinsBelow + 1 ) { 1030 middle = ( nBinsAbove + nBinsBelow + 1 ) >> 1; 1031 if ( ranNum >= _pf[middle] ) { 1032 nBinsBelow = middle; 1034 nBinsAbove = middle; 1038 double bSize = _pf[nBinsAbove] - _pf[nBinsBelow]; 1045 return ( nBinsBelow + .5 ) * oOverBins; 1048 double bFract = ( ranNum - _pf[nBinsBelow] ) / bSize; 1050 return ( nBinsBelow + bFract ) * oOverBins;
static double gamser(double a, double x, double LogGamma)
double DoneJS(double Pp, double Pm, double mui)
static double Int3(double what, const std::vector< double > &vars)
double aGamma(double mu1, double mu2, double epsilon)
static double Int1(double what, const std::vector< double > &vars)
double getSFBLNP(const double &what)
double getArg(unsigned int j)
std::string getName() override
double myfunction(double w, double Lbar, double mom2)
double S2(double a1, double r)
static double Mzero(double muf, double mu, double mupisq, const std::vector< double > &vars)
static double Shat(double w, const std::vector< double > &vars)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
double F3(double Pp, double Pm, double muh, double mui, double mubar, double done2)
double Done2(double Pp, double Pm, double mui)
static double g2(double w, const std::vector< double > &vars)
std::vector< double > gvars
static double alphas(double mu, const std::vector< double > &vars)
double S1(double a1, double r)
static double g3(double w, const std::vector< double > &vars)
void set(int i, double d)
double alo(double muh, double mui)
double Done3(double Pp, double Pm, double mui)
double S0(double a1, double r)
double F2(double Pp, double Pm, double muh, double mui, double mubar, double done3)
static double g1(double w, const std::vector< double > &vars)
double U1lo(double muh, double mui)
static double IntJS(double what, const std::vector< double > &vars)
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double Done1(double Pp, double Pm, double mui)
void checkNDaug(int d1, int d2=-1)
void decay(EvtParticle *Bmeson) override
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void initProbMax() override
static double Gamma(double z)
double myfunctionBIK(double w, double Lbar, double mom2)
double dU1nlo(double muh, double mui)
EvtComplex exp(const EvtComplex &c)
double PolyLog(double v, double z)
double F1(double Pp, double Pm, double muh, double mui, double mubar, double doneJS, double done1)
std::vector< double > _pf
EvtParticle * getDaug(int i)
double Sfun(double mu1, double mu2, double epsilon)
double agp(double mu1, double mu2, double epsilon)
EvtDecayBase * clone() override
double rate3(double Pp, double Pl, double Pm)
double anlo(double muh, double mui)
static double Int2(double what, const std::vector< double > &vars)
static double gammcf(double a, double x, double LogGamma)
EvtId getDaug(int i) const
|