14#include <gsl/gsl_errno.h>
15#include <gsl/gsl_math.h>
16#include <gsl/gsl_roots.h>
18#include <Math/WrappedTF1.h>
19#include <Math/BrentRootFinder.h>
22#include "gslpp_special_functions.h"
26 "mup",
"mdown",
"mcharm",
"mstrange",
"mtop",
"mbottom",
33 std::cout <<
"Warning: use of pole top mass as input is now deprecated. By default, the MSbar mass is used." << std::endl;
34 std::cout <<
"To use the pole mass, set FlagMtPole to true. (to be removed in future releases)" << std::endl;
46 CF =
Nc / 2. - 1. / (2. *
Nc);
61 zeta2 = gslpp_special_functions::zeta(2);
62 zeta3 = gslpp_special_functions::zeta(3);
65 for (
int j = 0; j < 9; j++)
67 for (
int j = 0; j < 4; j++)
69 for (
int j = 0; j < 10; j++)
71 for (
int j = 0; j < 6; j++)
114 throw std::runtime_error(
"QCD::orderToString(): order not implemented.");
144 for (std::map<std::string, double>::const_iterator it =
DPars.begin(); it !=
DPars.end(); it++)
201 for (std::vector<std::string>::iterator it = params_i.begin(); it < params_i.end(); it++)
216 if (name_i.compare(
"BBs") == 0 || name_i.compare(
"BBd") == 0)
231 if (name_i.compare(
"BBs_subleading") == 0)
237 if (name_i.compare(
"BBd_subleading") == 0)
243 if (name_i.compare(
"BD") == 0)
250 if (name_i.compare(
"BK") == 0)
257 if (name_i.compare(
"BKd1") == 0)
268 if (name_i.compare(
"BKd3") == 0)
285 mesonsMap.insert(std::pair<const QCD::meson, Meson>(meson_i,
Meson()));
316 mesonsMap.at(meson_i).setName(
"K_star_P");
318 mesonsMap.at(meson_i).setName(
"D_star_P");
327 std::stringstream out;
329 throw std::runtime_error(
"QCD::initializeMeson() meson " + out.str() +
" not implemented");
345 int notABparameter = 0;
346 int notAMesonParameter = 0;
348 if (
name.compare(
"AlsM") == 0)
353 else if (
name.compare(
"MAls") == 0)
358 else if (
name.compare(
"mup") == 0)
364 else if (
name.compare(
"mdown") == 0)
370 else if (
name.compare(
"mcharm") == 0)
375 else if (
name.compare(
"mstrange") == 0)
381 else if (
name.compare(
"mtop") == 0)
392 else if (
name.compare(
"mbottom") == 0)
397 else if (
name.compare(
"muc") == 0)
399 else if (
name.compare(
"mub") == 0)
401 else if (
name.compare(
"mut") == 0)
409 if (it->second.setParameter(
name, value))
412 for (std::map<const QCD::meson, Meson>::iterator it =
mesonsMap.begin(); it !=
mesonsMap.end(); it++)
413 if (it->second.setParameter(
name, value))
414 notAMesonParameter += 1;
426 std::cout <<
"ERROR: missing mandatory QCD parameter " <<
QCDvars[i] << std::endl;
434 std::cout <<
"ERROR: missing optional parameter " << it->first << std::endl;
443 std::vector<std::string> parameters = it->second.parameterList(it->first);
444 for (std::vector<std::string>::iterator it1 = parameters.begin(); it1 != parameters.end(); it1++)
448 std::cout <<
"ERROR: missing parameter for " << it->first <<
": " << *it1 << std::endl;
457 for (std::map<const QCD::meson, Meson>::iterator it =
mesonsMap.begin(); it !=
mesonsMap.end(); it++)
459 std::vector<std::string> parameters = it->second.parameterList(it->second.getName());
460 for (std::vector<std::string>::iterator it1 = parameters.begin(); it1 != parameters.end(); it1++)
464 std::cout <<
"ERROR: missing parameter for " <<
mesonsMap.at(it->first).getName() <<
": " << *it1 << std::endl;
482 if (
name.compare(
"FlagCsi") == 0)
491 else if (
name.compare(
"FlagMtPole") == 0)
496 std::cout <<
"WARNING: use of pole top mass as input is now deprecated. This feature will be removed in future releases. " << std::endl;
497 std::cout <<
"Using anyway the pole mass as requested." << std::endl;
503 else if (
name.compare(
"FlagMpole2MbarNumeric") == 0)
513 std::cout <<
"WARNING: wrong name or value for ModelFlag " <<
name << std::endl;
529 std::cout <<
"inverted thresholds in QCD::Thresholds()! QCDsuccess set to false" << std::endl;
550 for (i = 4; i >= 0; i--)
555 std::cout <<
"Error in QCD::AboveTh()! QCDsuccess set to false" << std::endl;
562 for (i = 0; i < 5; i++)
567 std::cout <<
"Error in QCD::BelowTh()! QCDsuccess set to false" << std::endl;
574 for (i = 1; i < 5; i++)
576 return (7. - (
double)i);
579 std::cout <<
"Error in QCD::Nf(" << mu <<
")! QCDsuccess set to false" << std::endl;
587 for (j = 0; j < n; j++)
588 cache[j][i] = cache[j][i - 1];
595 for (j = 0; j < n; j++)
596 cache[j][i] = cache[j][i - 1];
603 return ((11. *
CA - 4. *
TF * nf) / 3.);
608 return (34. / 3. *
CA *
CA - (20. / 3. *
CA + 4. *
CF) *
TF * nf);
613 return (2857. / 54. *
CA *
CA *
CA - (1415. / 27. *
CA *
CA + 205. / 9. *
CF *
CA - 2. *
CF *
CF) *
TF * nf +
614 (158. / 27. *
CA + 44. / 9. *
CF) *
TF *
TF * nf * nf);
620 return (
CA *
CF *
TF *
TF * nf * nf * (17152. / 243. + 448. / 9. *
zeta3) +
621 CA *
CF *
CF *
TF * nf * (-4204. / 27. + 352. / 9. *
zeta3) +
622 424. / 243. *
CA *
TF *
TF *
TF * nf * nf * nf +
CA *
CA *
CF *
TF * nf * (7073. / 243. - 656. / 9. *
zeta3) +
CA *
CA *
TF *
TF * nf * nf * (7930. / 81. + 224. / 9. *
zeta3) + 1232. / 243. *
CF *
TF *
TF *
TF * nf * nf * nf +
627const double QCD::AlsWithInit(
const double mu,
const double alsi,
const double mu_i,
const int nf,
631 double b1_b0 =
Beta1((
double)nf) /
Beta0((
double)nf);
632 double v = 1. -
Beta0((
double)nf) * alsi / 2. / M_PI * log(mu_i / mu);
633 double logv = log(v);
640 return (-alsi * alsi / 4. / M_PI / v / v * b1_b0 * logv);
642 return (alsi * alsi * alsi / 4. / 4. / M_PI / M_PI / v / v / v * (
Beta2((
double)nf) /
Beta0((
double)nf) * (1. - v) + b1_b0 * b1_b0 * (logv * logv - logv + v - 1.)));
644 return (alsi * alsi * alsi * alsi / 4. / 4. / 4. / M_PI / M_PI / M_PI /
645 v / v / v / v * (
Beta3((
double)nf) /
Beta0((
double)nf) * (1. - v * v) / 2. + b1_b0 *
Beta2((
double)nf) /
Beta0((
double)nf) * ((2. * v - 3.) * logv + v * v - v) + b1_b0 * b1_b0 * b1_b0 * (-logv * logv * logv + 2.5 * logv * logv + 2. * (1. - v) * logv - 0.5 * (v - 1.) * (v - 1.))));
649 return (
AlsWithInit(mu, alsi, mu_i, nf,
LO) +
AlsWithInit(mu, alsi, mu_i, nf,
NLO) +
AlsWithInit(mu, alsi, mu_i, nf,
NNLO));
651 return (
AlsWithInit(mu, alsi, mu_i, nf,
LO) +
AlsWithInit(mu, alsi, mu_i, nf,
NLO) +
AlsWithInit(mu, alsi, mu_i, nf,
NNLO) +
AlsWithInit(mu, alsi, mu_i, nf,
NNNLO));
653 throw std::runtime_error(
"QCD::AlsWithInit(): " +
orderToString(order) +
" is not implemented.");
659 double v = 1. -
Beta0(4.) *
AlsM / 2. / M_PI * log(
MAls / mu);
670 double b0 =
Beta0(nf);
672 double alsLO = 4. * M_PI / b0L;
677 double b1 =
Beta1(nf);
678 double log_L = log(L);
679 double alsNLO = 4. * M_PI / b0L * (-b1 * log_L / b0 / b0L);
683 return (alsLO + alsNLO);
686 double b2 =
Beta2(nf);
687 double alsNNLO = 4. * M_PI / b0L * (1. / b0L / b0L * (b1 * b1 / b0 / b0 * (log_L * log_L - log_L - 1.) + b2 / b0));
691 return (alsLO + alsNLO + alsNNLO);
694 double b3 =
Beta3(nf);
695 double alsNNNLO = 4. * M_PI / b0L * (-1. / b0L / b0L / b0L * (b1 * b1 * b1 / b0 / b0 / b0 * (log_L * log_L * log_L - 5. / 2. * log_L * log_L - 2. * log_L - 0.5) + 3. * b1 * b2 * log_L / b0 / b0 - 0.5 * b3 / b0));
699 return (alsLO + alsNLO + alsNNLO + alsNNNLO);
701 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::AlsWithLambda().");
711 double lmM = 2. * log(mu / M), res = 0.;
715 res += als * als * als / M_PI / M_PI / M_PI * (-564731. / 124416. + 82043. / 27648. * gslpp_special_functions::zeta(3) + 2191. / 576. * lmM + 511. / 576. * lmM * lmM + lmM * lmM * lmM / 216. + ((double)nf - 1.) * (2633. / 31104. - 281. / 1728. * lmM));
717 res += als * als / M_PI / M_PI * (-11. / 72. + 19. / 24. * lmM + lmM * lmM / 36.);
719 res += als / M_PI * lmM / 6.;
723 throw std::runtime_error(
"QCD::ThresholdCorrections(): order not implemented.");
741 throw std::runtime_error(
"QCD::FullOrder(): " +
orderToString(order) +
" is not implemented.");
758 throw std::runtime_error(
"QCD::MassOfNf(): no running masses for light quarks");
762const double QCD::Als(
const double mu,
const orders order,
const bool Nf_thr)
const
779 throw std::runtime_error(
"QCD::Als(): " +
orderToString(order) +
" is not implemented.");
800 throw std::runtime_error(
"QCD::Als(): " +
orderToString(order) +
" is not implemented.");
806 int i, nfAls = (int)
Nf(
MAls), nfmu = Nf_thr ? (int)
Nf(mu) : nfAls;
807 double als, alstmp, mutmp;
831 for (i = nfAls - 1; i > nfmu; i--)
845 for (i = nfAls + 1; i < nfmu; i++)
867 throw std::runtime_error(
"QCD::Als(): " +
orderToString(order) +
" is not implemented.");
881 double nfmu =
Nf(mu), nfz =
Nf(
MAls), mu_thre1, mu_thre2, Als_tmp, mf;
894 throw std::runtime_error(
"NLO is not implemented in QCD::Als(mu,order).");
895 if (nfmu == nfz + 1.)
902 Als_tmp = (1. + Als_tmp / M_PI * log(mu_thre1 / mf) / 3.) * Als_tmp;
904 als =
AlsWithInit(mu, Als_tmp, mu_thre1 + MEPS, nfmu, order);
909 std::cout <<
"Error in QCD::Als(mu,order)! QCDsuccess set to false" << std::endl;
916 throw std::runtime_error(
"NLO is not implemented in QCD::Als(mu,order).");
917 if (nfmu == nfz - 1.)
924 Als_tmp = (1. - Als_tmp / M_PI * log(mu_thre1 / mf) / 3.) * Als_tmp;
926 als =
AlsWithInit(mu, Als_tmp, mu_thre1 - MEPS, nfmu, order);
928 else if (nfmu == nfz - 2.)
932 Als_tmp =
Als(mu_thre1 + MEPS, order);
936 Als_tmp = (1. - Als_tmp / M_PI * log(mu_thre1 / mf) / 3.) * Als_tmp;
938 Als_tmp =
AlsWithInit(mu_thre2, Als_tmp, mu_thre1 - MEPS, nfz-1, order);
942 Als_tmp = (1. - Als_tmp / M_PI * log(mu_thre2 / mf) / 3.) * Als_tmp;
944 als =
AlsWithInit(mu, Als_tmp, mu_thre2 - MEPS, nfmu, order);
949 std::cout <<
"Error in QCD::Als(mu,order)! QCDsuccess set to false" << std::endl;
962 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::Als(mu,order).");
981 int i, nfAls = (int)
Nf(
MAls), nfmu = Nf_in;
982 double als, alstmp, mutmp;
1006 for (i = nfAls - 1; i > nfmu; i--)
1008 mutmp =
BelowTh(mutmp - MEPS);
1012 als =
AlsWithInit(mu, alstmp, mutmp, nfmu, order);
1020 for (i = nfAls + 1; i < nfmu; i++)
1022 double oldmu = mutmp;
1023 mutmp =
AboveTh(mutmp + 2. * MEPS) - MEPS;
1027 als =
AlsWithInit(mu, alstmp, mutmp + 2. * MEPS, nfmu, order);
1043 throw std::runtime_error(
"QCD::Als(): " +
orderToString(order) +
" is not implemented.");
1087 double xmin = -4., xmax = -0.2;
1088 TF1 f = TF1(
"f",
this, &
QCD::ZeroNf5, xmin, xmax, 1,
"QCD",
"zeroNf5");
1090 ROOT::Math::WrappedTF1 wf1(f);
1091 double ledouble = (double)order;
1092 wf1.SetParameters(&ledouble);
1094 ROOT::Math::BrentRootFinder brf;
1095 brf.SetFunction(wf1, xmin, xmax);
1102 std::cout <<
"Error in QCD::logLambda5()! QCDsuccess set to false" << std::endl;
1109 const double logLambdaORG)
const
1125 double xmin = -4., xmax = -0.2;
1128 if (nfNEW == 6. && nfORG == 5.)
1130 f = TF1(
"f",
this, &
QCD::ZeroNf6NLO, xmin, xmax, 1,
"QCD",
"zeroNf6NLO");
1132 else if (nfNEW == 4. && nfORG == 5.)
1134 f = TF1(
"f",
this, &
QCD::ZeroNf4NLO, xmin, xmax, 1,
"QCD",
"zeroNf4NLO");
1136 else if (nfNEW == 3. && nfORG == 4.)
1138 f = TF1(
"f",
this, &
QCD::ZeroNf3NLO, xmin, xmax, 1,
"QCD",
"zeroNf3NLO");
1143 std::cout <<
"Error in QCD::logLambdaNLO()! QCDsuccess set to false" << std::endl;
1146 ROOT::Math::WrappedTF1 wf1(f);
1147 wf1.SetParameters(&logLambdaORG);
1149 ROOT::Math::BrentRootFinder brf;
1150 brf.SetFunction(wf1, xmin, xmax);
1157 std::cout <<
"Error in QCD::logLambdaNLO()! QCDsuccess set to false" << std::endl;
1164 const double nfNEW,
const double nfORG,
1165 const double logLambdaORG,
orders order)
const
1167 if (fabs(nfNEW - nfORG) != 1.)
1170 std::cout <<
"Error in QCD::logLambda()! QCDsuccess set to false" << std::endl;
1186 double logMuMatching = log(muMatching);
1187 double L = 2. * (logMuMatching - logLambdaORG);
1188 double rNEW = 0.0, rORG = 0.0, log_mu2_mf2 = 0.0, log_L = 0.0;
1189 double C1 = 0.0, C2 = 0.0;
1190 double logLambdaNEW;
1193 logLambdaNEW = 1. / 2. /
Beta0(nfNEW) * (
Beta0(nfNEW) -
Beta0(nfORG)) * L + logLambdaORG;
1200 log_mu2_mf2 = 2. * (logMuMatching - log(mf));
1203 C1 = 2. / 3. * log_mu2_mf2;
1205 C1 = -2. / 3. * log_mu2_mf2;
1206 logLambdaNEW += 1. / 2. /
Beta0(nfNEW) * ((rNEW - rORG) * log_L - rNEW * log(
Beta0(nfNEW) /
Beta0(nfORG)) - C1);
1212 if (nfNEW == 5. && nfORG == 6.)
1213 C2 = -16. * (log_mu2_mf2 * log_mu2_mf2 / 36. - 19. / 24. * log_mu2_mf2 - 7. / 24.);
1214 else if (nfNEW == 6. && nfORG == 5.)
1215 C2 = -16. * (log_mu2_mf2 * log_mu2_mf2 / 36. + 19. / 24. * log_mu2_mf2 + 7. / 24.);
1219 C2 = -16. * (log_mu2_mf2 * log_mu2_mf2 / 36. - 19. / 24. * log_mu2_mf2 + 11. / 72.);
1221 C2 = -16. * (log_mu2_mf2 * log_mu2_mf2 / 36. + 19. / 24. * log_mu2_mf2 - 11. / 72.);
1223 logLambdaNEW += 1. / 2. /
Beta0(nfNEW) /
Beta0(nfORG) / L * (rORG * (rNEW - rORG) * log_L + rNEW * rNEW - rORG * rORG -
Beta2(nfNEW) /
Beta0(nfNEW) +
Beta2(nfORG) /
Beta0(nfORG) + rNEW * C1 - C1 * C1 - C2);
1226 return logLambdaNEW;
1236 double muMatching, mf, logLambdaORG, logLambdaNEW;
1246 else if (nf == 4. || nf == 3.)
1251 logLambdaNEW =
logLambda(muMatching, mf, 4., 5., logLambdaORG, order);
1256 logLambdaORG = logLambdaNEW;
1257 logLambdaNEW =
logLambda(muMatching, mf, 3., 4., logLambdaORG, order);
1259 return logLambdaNEW;
1264 std::cout <<
"Error in QCD::logLambda()! QCDsuccess set to false" << std::endl;
1278 return (
CF * (3. *
CF + 97. / 3. *
Nc - 10. / 3. * nf));
1283 return (129. *
CF *
CF *
CF - 129. / 2. *
CF *
CF *
Nc + 11413. / 54. *
CF *
Nc *
Nc +
CF *
CF * nf * (-46. + 48. *
zeta3) +
CF *
Nc * nf * (-556. / 27. - 48. *
zeta3) - 70. / 27. *
CF * nf * nf);
1288 if (fabs(nf_f - nf_i) != 1.)
1291 std::cout <<
"Error in QCD::threCorrForMass()! QCDsuccess set to false" << std::endl;
1296 double mu_threshold, mf, log_mu2_mf2, AlsoverPi;
1304 else if (nf_f == 5.)
1309 else if (nf_f == 4.)
1317 std::cout <<
"Error in QCD::threCorrForMass()! QCDsuccess set to false" << std::endl;
1320 log_mu2_mf2 = 2. * log(mu_threshold / mf);
1321 AlsoverPi =
Als(mu_threshold - MEPS,
FULLNNLO) / M_PI;
1322 return (1. + AlsoverPi * AlsoverPi * (-log_mu2_mf2 * log_mu2_mf2 / 12. + 5. / 36. * log_mu2_mf2 - 89. / 432.));
1331 else if (nf_i == 5.)
1336 else if (nf_i == 4.)
1344 std::cout <<
"Error in QCD::threCorrForMass()! QCDsuccess set to false" << std::endl;
1347 log_mu2_mf2 = 2. * log(mu_threshold / mf);
1348 AlsoverPi =
Als(mu_threshold + MEPS,
FULLNNLO) / M_PI;
1349 return (1. + AlsoverPi * AlsoverPi * (log_mu2_mf2 * log_mu2_mf2 / 12. - 5. / 36. * log_mu2_mf2 + 89. / 432.));
1355 return Mrun(mu, m, m, q, order);
1358const double QCD::Mrun(
const double mu_f,
const double mu_i,
const double m,
const quark q,
1359 const orders order)
const
1376 double nfi =
Nf(mu_i), nff =
Nf(mu_f);
1382 else if (q ==
CHARM)
1387 nfi = (nfi > nfq) ? nfi : nfq;
1388 nff = (nff > nfq) ? nff : nfq;
1390 double mu_threshold, mu_threshold2, mu_threshold3, mrun;
1392 mrun =
MrunTMP(mu_f, mu_i, m, lround(nfi), order);
1395 if (order ==
NLO || order ==
NNLO)
1396 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::Mrun(mu_f,mu_i,m,q,order)");
1398 mrun =
MrunTMP(mu_threshold - MEPS, mu_i, m, lround(nfi), order);
1401 if (nff == nfi + 1.)
1403 mrun =
MrunTMP(mu_f, mu_threshold + MEPS, mrun, lround(nff), order);
1405 else if (nff == nfi + 2.)
1407 mu_threshold2 =
BelowTh(mu_f);
1408 mrun =
MrunTMP(mu_threshold2 - MEPS, mu_threshold + MEPS, mrun, lround(nfi) + 1, order);
1411 mrun =
MrunTMP(mu_f, mu_threshold2 + MEPS, mrun, lround(nff), order);
1413 else if (nff == nfi + 3.)
1415 mu_threshold2 =
AboveTh(mu_threshold);
1416 mrun =
MrunTMP(mu_threshold2 - MEPS, mu_threshold + MEPS, mrun, lround(nfi) + 1, order);
1419 mu_threshold3 =
BelowTh(mu_f);
1420 mrun =
MrunTMP(mu_threshold3 - MEPS, mu_threshold2 + MEPS, mrun, lround(nff) - 1, order);
1423 mrun =
MrunTMP(mu_f, mu_threshold3 + MEPS, mrun, lround(nff), order);
1428 std::cout <<
"Error in QCD::Mrun(mu_f,mu_i,m,order)! QCDsuccess set to false" << std::endl;
1434 if (order ==
NLO || order ==
NNLO)
1435 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::Mrun(mu_f,mu_i,m,order)");
1437 mrun =
MrunTMP(mu_threshold + MEPS, mu_i, m, lround(nfi), order);
1440 if (nff == nfi - 1.)
1441 mrun =
MrunTMP(mu_f, mu_threshold - MEPS, mrun, lround(nff), order);
1442 else if (nff == nfi - 2.)
1445 mrun =
MrunTMP(mu_threshold2 + MEPS, mu_threshold - MEPS, mrun, lround(nfi) - 1, order);
1448 mrun =
MrunTMP(mu_f, mu_threshold2 - MEPS, mrun, lround(nff), order);
1453 std::cout <<
"Error in QCD::Mrun(mu_f,mu_i,m,order)! QCDsuccess set to false" << std::endl;
1460 std::stringstream out;
1461 out <<
"QCD::Mrun(): A quark mass becomes tachyonic in QCD::Mrun("
1462 << mu_f <<
", " << mu_i <<
", " << m <<
", " <<
orderToString(order) <<
")"
1464 <<
" Als(" << mu_i <<
", " <<
orderToString(order) <<
")/(4pi)="
1465 <<
Als(mu_i, order) / (4. * M_PI) << std::endl
1466 <<
" Als(" << mu_f <<
", " <<
orderToString(order) <<
")/(4pi)="
1467 <<
Als(mu_f, order) / (4. * M_PI);
1469 std::cout <<
"Error in QCD::Mrun(mu_f,mu_i,m,order)! QCDsuccess set to false" << std::endl;
1489const double QCD::MrunTMP(
const double mu_f,
const double mu_i,
const double m,
const int nf,
1490 const orders order)
const
1501 double ai =
Als(mu_i, nf, orderForAls) / (4. * M_PI);
1502 double af =
Als(mu_f, nf, orderForAls) / (4. * M_PI);
1505 double b0 =
Beta0((
double) nf), g0 =
Gamma0((
double) nf);
1506 double mLO = m * pow(af / ai, g0 / (2. * b0));
1511 double b1 =
Beta1((
double) nf), g1 =
Gamma1((
double) nf);
1512 double A1 = g1 / (2. * b0) - b1 * g0 / (2. * b0 * b0);
1513 double mNLO = mLO * A1 * (af - ai);
1517 return (mLO + mNLO);
1520 double b2 =
Beta2((
double) nf), g2 =
Gamma2((
double) nf);
1521 double A2 = b1 * b1 * g0 / (2. * b0 * b0 * b0) - b2 * g0 / (2. * b0 * b0) - b1 * g1 / (2. * b0 * b0) + g2 / (2. * b0);
1522 double mNNLO = mLO * (A1 * A1 / 2. * (af - ai) * (af - ai) + A2 / 2. * (af * af - ai * ai));
1526 return (mLO + mNLO + mNNLO);
1528 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::MrunTMP()");
1531const double QCD::Mrun4(
const double mu_f,
const double mu_i,
const double m)
const
1536 double ai =
Als4(mu_i) / (4. * M_PI);
1537 double af =
Als4(mu_f) / (4. * M_PI);
1541 double mLO = m * pow(af / ai, g0 / (2. * b0));
1545 double A1 = g1 / (2. * b0) - b1 * g0 / (2. * b0 * b0);
1546 double mNLO = mLO * A1 * (af - ai);
1547 return (mLO + mNLO);
1556 std::vector<double> x = {0.0};
1565 throw std::runtime_error(
"QCD::Mbar2Mp() can convert only top, bottom and charm masses");
1580 double a =
Als(mbar, Nf_m, orderForAls) / M_PI;
1583 double MpNLO = mbar * 4. / 3. * a;
1587 return (MpLO + MpNLO);
1598 for (
int i = 0; i < x.size(); i++)
1601 double MpNNLO = mbar * (307. / 32. + 2. *
zeta2 + 2. / 3. *
zeta2 * log(2.0) -
zeta3 / 6. - nl / 3. * (
zeta2 + 71. / 48.) + 4. / 3. * Delta) * a * a;
1606 return (MpLO + MpNLO + MpNNLO);
1608 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::Mbar2Mp().");
1613 return M_PI * M_PI / 8. * x - 0.597 * x * x + 0.230 * x * x * x;
1619 double mp = params[0];
1622 return (mp -
Mbar2Mp(*mu, q, order));
1627 if (order ==
NLO || order ==
NNLO)
1628 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::Mp2Mbar().");
1633 double alsmp =
Als(mp, order);
1640 TF1 f(
"f",
this, &
QCD::Mp2MbarTMP, mp / 2., 2. * mp, 3,
"QCD",
"Mp2MbarTMP");
1642 ROOT::Math::WrappedTF1 wf1(f);
1645 params[1] = (double)q;
1646 params[2] = (double)order;
1647 wf1.SetParameters(params);
1649 ROOT::Math::BrentRootFinder brf;
1652 brf.SetFunction(wf1, .5 * mp, 2. * mp);
1666 std::cout <<
"Error in QCD::Mp2Mbar()! QCDsuccess set to false" << std::endl;
1680 throw std::runtime_error(
"QCD::Mp2Mbar() can convert only top, bottom and charm masses");
1697 double a =
Als(mp, Nfmp, orderForAls) / M_PI;
1700 double mbarNLO = mp * (-4. / 3.) * a;
1704 return (mbarLO + mbarNLO);
1706 double mbarNNLO = mp * ((-1111. *
CA *
CF) / 384. + (199. *
CF *
CF) / 128. + (143. *
CF *
TF) / 96. +
1715 return (mbarLO + mbarNLO + mbarNNLO);
1717 throw std::runtime_error(
orderToString(order) +
" is not implemented in QCD::Mp2Mbar_new().");
1722 return (MSbar / (1. +
Als(MSbar,
FULLNLO) / 4. / M_PI *
CF));
1727 return (MSbar / (1. +
Als(MSscale,
FULLNLO) / 4. / M_PI *
CF));
1732 double mofmu = params[0];
1733 double muI = params[1];
1735 return (*mu -
Mrun(*mu, muI, mofmu, q));
1757 std::cout <<
"Error in QCD::Mofmu2Mbar()! QCDsuccess set to false" << std::endl;
1760 double mlow =
Mrun(mutmp, mu, m, q);
1761 TF1 f(
"f",
this, &
QCD::Mofmu2MbarTMP, mlow / 2., 2. * mlow, 3,
"QCD",
"mofmu2mbara");
1763 ROOT::Math::WrappedTF1 wf1(f);
1768 params[2] = (double)q;
1769 wf1.SetParameters(params);
1771 ROOT::Math::BrentRootFinder brf;
1773 brf.SetFunction(wf1, .5 * mlow, 2. * mlow);
1779 std::cout <<
"Error in QCD::Mofmu2Mbar()! QCDsuccess set to false" << std::endl;
std::map< std::string, double > DPars
A class for the bag parameters.
void addMissingModelParameter(const std::string &missingParameterName)
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
std::string name
The name of the model.
void setModelName(const std::string name)
A method to set the name of the model.
bool isSliced
A boolean set to true if the current istance is a slice of an extended object.
bool UpdateError
A boolean set to false if update is successful.
void raiseMissingModelParameterCount()
unsigned int getMissingModelParametersCount()
const double & getMass() const
A get method to access the particle mass.
void setMass(double mass)
A set method to fix the particle mass.
void setMass_scale(double mass_scale)
A set method to fix the scale at which the particle mass is defined.
double mp2mbar_cache[6][CacheSize]
Cache for pole mass to msbar mass conversion.
static const int CacheSize
Defines the depth of the cache.
const double Als4(const double mu) const
The value of at any scale with the number of flavours .
const double logLambdaNLO(const double nfNEW, const double nfORG, const double logLambdaORG) const
used for computation of at FULLNLO.
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for QCD have been provided in model initialization.
meson
An enum type for mesons.
bool requireYu
Switch for generating the Yukawa couplings to the up-type quarks.
void addParameters(std::vector< std::string > params_i)
A method to add parameters that are specific to only one set of observables.
const double ZeroNf3NLO(double *logLambda3, double *logLambda4_in) const
A member for calculating the difference in across the three-four flavour threshold using AlsWithLamb...
void setOptionalParameter(std::string name, double value)
A method to set the parameter value for the parameters that are specific to only one set of observabl...
const double Mp2Mbar_pole(const double mp, const orders order=FULLNNLO) const
Converts the top pole mass to the corresponding mass using eq. (16) of hep-ph/0004189.
double mut
The threshold between six- and five-flavour theory in GeV.
double MAls
The mass scale in GeV at which the strong coupling measurement is provided.
const double Mrun4(const double mu_f, const double mu_i, const double m) const
The running of a mass with the number of flavours .
const double MrunTMP(const double mu_f, const double mu_i, const double m, const int nf, const orders order) const
A function to calculate the running of the mass between flavour thresholds.
virtual bool PostUpdate()
The post-update method for QCD.
std::map< std::string, BParameter > BParameterMap
const double Beta2(const double nf) const
The coefficient for a certain number of flavours .
bool computeBd
Switch for computing from .
static const int NQCDvars
The number of model parameters in QCD.
double logLambdaNLO_cache[9][CacheSize]
bool FlagCsi
A flag to determine whether and or (false) and (default, true) are used as inputs.
bool unknownParameterWarning
A flag to stop the unknown parameter warning after the first time.
bool FlagMpole2MbarNumeric
A flag to determine whether the pole mass to mass conversion is done numerically.
double zeta2
computed with the GSL.
double Nc
The number of colours.
double zeta3
computed with the GSL.
double muc
The threshold between four- and three-flavour theory in GeV.
const double ZeroNf6NLO(double *logLambda6, double *logLambda5_in) const
A member for calculating the difference in across the six-five flavour threshold using AlsWithLambda...
const double Gamma0(const double nf) const
The coefficient used to compute the running of a mass.
const double AlsWithLambda(const double mu, const orders order) const
Computes the running strong coupling in the scheme with the use of .
bool FlagMtPole
A flag to determine whether the pole mass of the top quark is used as input.
virtual bool PreUpdate()
The pre-update method for QCD.
static std::string QCDvars[NQCDvars]
An array containing the labels under which all QCD parameters are stored in a vector of ModelParamete...
const double Mp2MbarTMP(double *mu, double *params) const
The member used for finding the numerical solution to the pole mass from the mass.
const double MS2DRqmass(const double MSscale, const double MSbar) const
Converts a quark mass from the scheme to the scheme.
std::map< std::string, double > optionalParameters
A map for containing the list and values of the parameters that are used only by a specific set of ob...
std::map< const QCD::meson, Meson > mesonsMap
The map of defined mesons.
double mrun_cache[11][CacheSize]
Cache for running quark mass.
virtual bool setFlag(const std::string name, const bool value)
A method to set a flag of QCD.
const double logLambda(const double nf, orders order) const
Computes with nf flavours in GeV.
const double Beta1(const double nf) const
The coefficient for a certain number of flavours .
const double Gamma1(const double nf) const
The coefficient used to compute the running of a mass.
const double Mrun(const double mu, const double m, const quark q, const orders order=FULLNNLO) const
Computes a running quark mass from .
quark
An enum type for quarks.
const double ZeroNf5(double *logLambda5, double *order) const
A member for calculating the difference in using AlsWithLambda() and the input value of given as a ...
bool computeFBd
Switch for computing from .
virtual bool setFlagStr(const std::string name, const std::string value)
A method to set a flag of QCD.
virtual bool CheckFlags() const
A method to check the sanity of the set of model flags.
virtual bool Init(const std::map< std::string, double > &DPars)
Initializes the QCD parameters found in the argument.
const double Mofmu2Mbar(const double m, const double mu, const quark q) const
Converts a quark running mass at an arbitrary scale to the corresponding mass .
const double Mp2Mbar(const double mp, const quark q, orders order=FULLNNLO) const
Converts a quark pole mass to the corresponding mass .
const double BelowTh(const double mu) const
The active flavour threshold below the scale as defined in QCD::Thresholds().
const double logLambda5(orders order) const
for .
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of QCD.
const double Beta0(const double nf) const
The coefficient for a certain number of flavours .
double als_cache[9][CacheSize]
Cache for .
const std::string orderToString(const orders order) const
Converts an object of the enum type "orders" to the corresponding string.
const double Mofmu2MbarTMP(double *mu, double *params) const
The member used for finding the numerical solution to the mass from mass.
const double Beta3(const double nf) const
The coefficient for a certain number of flavours .
bool computeFBp
Switch for computing from .
bool computemt
Switch for computing the mass of the top quark.
bool requireYd
Switch for generating the Yukawa couplings to the down-type quarks.
const double Thresholds(const int i) const
For accessing the active flavour threshold scales.
const double AboveTh(const double mu) const
The active flavour threshold above the scale as defined in QCD::Thresholds().
void initializeBParameter(std::string name_i) const
A method to initialize B Parameter and the corresponding meson.
const double Mp2Mbar_bar(const double mp, const quark q, const orders order=FULLNNLO) const
Converts the bottom pole mass to the corresponding mass by iteration.
const double Nf(const double mu) const
The number of active flavour at scale .
const double AlsWithInit(const double mu, const double alsi, const double mu_i, const int nf, const orders order) const
Computes the running strong coupling from in the scheme, where it is forbidden to across a flavour...
const double NfThresholdCorrections(double mu, double M, double als, int nf, orders order) const
Threshold corrections in matching with from eq. (34) of hep-ph/0512060.
const orders FullOrder(orders order) const
Return the FULLORDER enum corresponding to order.
double logLambda5_cache[4][CacheSize]
const Particle & getQuarks(const QCD::quark q) const
A get method to access a quark as an object of the type Particle.
const double AlsByOrder(const double mu, const orders order=FULLNLO, bool Nf_thr=true) const
double DeltaMass(double x) const
A method to compute the correction due to light quarks to the conversion between pole and mass.
Particle quarks[6]
The vector of all SM quarks.
virtual bool Update(const std::map< std::string, double > &DPars)
The update method for QCD.
const double MassOfNf(int nf) const
The Mbar mass of the heaviest quark in the theory with Nf active flavour.
const double Als(const double mu, const orders order=FULLNLO, const bool Nf_thr=true) const
double mtpole
The pole mass of the top quark.
const double threCorrForMass(const double nf_f, const double nf_i) const
The threshold correction for running of a mass when crossing a flavour threshold.
const double Gamma2(const double nf) const
The coefficient used to compute the running of a mass.
std::vector< std::string > unknownParameters
A vector for containing the names of the parameters that are not being used but specified in the conf...
void initializeMeson(QCD::meson meson_i) const
A method to initialize a meson.
double AlsM
The strong coupling constant at the mass scale MAls, .
const double ZeroNf4NLO(double *logLambda4, double *logLambda5_in) const
A member for calculating the difference in across the four-five flavour threshold using AlsWithLambd...
const double AlsOLD(const double mu, const orders order=FULLNLO) const
Computes the running strong coupling in the scheme. In the cases of LO, NLO and FULLNNLO,...
bool computeBs
Switch for computing from .
double mub
The threshold between five- and four-flavour theory in GeV.
const double Mbar2Mp(const double mbar, const quark q, const orders order=FULLNNLO) const
Converts the mass to the pole mass.
void CacheShift(double cache[][5], int n) const
A member used to manage the caching for this class.
A class for , the pole mass of the top quark.
orders
An enum type for orders in QCD.