From c8f86aa4da92a6208395ed441767d9e9b81ee4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Laurenti?= Date: Sun, 17 Mar 2024 13:26:22 +0100 Subject: [PATCH] Implement fx_ in highscale --- inc/adani/HighScaleCoefficientFunctions.h | 20 +++--- src/HighScaleCoefficientFunctions.cc | 88 +++++++++++------------ src/HighScaleSplitLogs.cc | 7 +- 3 files changed, 61 insertions(+), 54 deletions(-) diff --git a/inc/adani/HighScaleCoefficientFunctions.h b/inc/adani/HighScaleCoefficientFunctions.h index ce769e6..2f32336 100644 --- a/inc/adani/HighScaleCoefficientFunctions.h +++ b/inc/adani/HighScaleCoefficientFunctions.h @@ -40,7 +40,11 @@ class HighScaleCoefficientFunction : public CoefficientFunction { // double MuDependentTerms(double x, double m2Q2, double m2mu2, int nf) const override ; Value fxBand(double x, double m2Q2, double m2mu2, int nf) const override; + void SetFunctions(); + private: + Value (HighScaleCoefficientFunction::*fx_)(double, double, double, int) const; + MasslessCoefficientFunction* massless_lo_; MasslessCoefficientFunction* massless_nlo_; MasslessCoefficientFunction* massless_nnlo_; @@ -51,8 +55,8 @@ class HighScaleCoefficientFunction : public CoefficientFunction { // functions O(alpha_s) //------------------------------------------------------------------------------------------// -double C2_g1_highscale(double x, double m2Q2) const ; -double CL_g1_highscale(double x) const ; +Value C2_g1_highscale(double x, double m2Q2, double /*m2mu2*/, int /*nf*/) const ; +Value CL_g1_highscale(double x, double /*m2Q2*/, double /*m2mu2*/, int /*nf*/) const ; double D2_g1_highscale(double x, double m2Q2) const ; double DL_g1_highscale(double x) const; @@ -62,11 +66,11 @@ double DL_g1_highscale(double x) const; // functions O(alpha_s^2) //------------------------------------------------------------------------------------------// -double C2_g2_highscale(double x, double m2Q2, double m2mu2) const ; -double C2_ps2_highscale(double z, double m2Q2, double m2mu2) const ; +Value C2_g2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const ; +Value C2_ps2_highscale(double z, double m2Q2, double m2mu2, int /*nf*/) const ; -double CL_g2_highscale(double x, double m2Q2, double m2mu2) const ; -double CL_ps2_highscale(double x, double m2Q2, double m2mu2) const ; +Value CL_g2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const ; +Value CL_ps2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const ; double D2_g2_highscale(double x, double m2Q2, double m2mu2) const ; double D2_ps2_highscale(double x, double m2Q2, double m2mu2) const ; @@ -82,8 +86,8 @@ double DL_ps2_highscale(double z, double m2Q2, double m2mu2) const ; Value C2_g3_highscale(double x, double m2Q2, double m2mu2, int nf) const ; Value C2_ps3_highscale(double x, double m2Q2, double m2mu2, int nf) const ; -double CL_g3_highscale(double x, double m2Q2, double m2mu2, int nf) const ; -double CL_ps3_highscale(double x, double m2Q2, double m2mu2, int nf) const ; +Value CL_g3_highscale(double x, double m2Q2, double m2mu2, int nf) const ; +Value CL_ps3_highscale(double x, double m2Q2, double m2mu2, int nf) const ; double DL_g3_highscale(double z, double m2Q2, double m2mu2, int nf) const ; double DL_ps3_highscale(double z, double m2Q2, double m2mu2, int nf) const ; diff --git a/src/HighScaleCoefficientFunctions.cc b/src/HighScaleCoefficientFunctions.cc index f348b24..23ef24d 100644 --- a/src/HighScaleCoefficientFunctions.cc +++ b/src/HighScaleCoefficientFunctions.cc @@ -37,38 +37,30 @@ double HighScaleCoefficientFunction::fx(double x, double m2Q2, double m2mu2, int } Value HighScaleCoefficientFunction::fxBand(double x, double m2Q2, double m2mu2, int nf) const { - - double tmp; + return (this->*fx_)(x, m2Q2, m2mu2, nf); +} + +void HighScaleCoefficientFunction::SetFunctions() { if (GetOrder() == 1) { - if (GetKind() == '2' && GetChannel() == 'g') tmp = C2_g1_highscale(x, m2Q2); - else if (GetKind() == 'L' && GetChannel() == 'g') tmp = CL_g1_highscale(x); + if (GetKind() == '2' && GetChannel() == 'g') fx_ = &HighScaleCoefficientFunction::C2_g1_highscale; + else if (GetKind() == 'L' && GetChannel() == 'g') fx_ = &HighScaleCoefficientFunction::CL_g1_highscale; - return Value(tmp, tmp, tmp); } else if (GetOrder() == 2) { - if (GetOrder() == 2 && GetKind() == '2' && GetChannel() == 'g') tmp = C2_g2_highscale(x, m2Q2, m2mu2); - else if (GetOrder() == 2 && GetKind() == '2' && GetChannel() == 'q') tmp = C2_ps2_highscale(x, m2Q2, m2mu2); - else if (GetOrder() == 2 && GetKind() == 'L' && GetChannel() == 'g') tmp = CL_g2_highscale(x, m2Q2, m2mu2); - else if (GetOrder() == 2 && GetKind() == 'L' && GetChannel() == 'q') tmp = CL_ps2_highscale(x, m2Q2, m2mu2); - - return Value(tmp); + if (GetOrder() == 2 && GetKind() == '2' && GetChannel() == 'g') fx_ = &HighScaleCoefficientFunction::C2_g2_highscale; + else if (GetOrder() == 2 && GetKind() == '2' && GetChannel() == 'q') fx_ = &HighScaleCoefficientFunction::C2_ps2_highscale; + else if (GetOrder() == 2 && GetKind() == 'L' && GetChannel() == 'g') fx_ = &HighScaleCoefficientFunction::CL_g2_highscale; + else if (GetOrder() == 2 && GetKind() == 'L' && GetChannel() == 'q') fx_ = &HighScaleCoefficientFunction::CL_ps2_highscale; } - else if (GetOrder() == 3 && GetKind() == '2' && GetChannel() == 'g') return C2_g3_highscale(x, m2Q2, m2mu2, nf); - else if (GetOrder() == 3 && GetKind() == '2' && GetChannel() == 'q') return C2_ps3_highscale(x, m2Q2, m2mu2, nf); - else if (GetOrder() == 3 && GetKind() == 'L' && GetChannel() == 'g') { - tmp = CL_g3_highscale(x, m2Q2, m2mu2, nf); - return Value(tmp); - } - else if (GetOrder() == 3 && GetKind() == 'L' && GetChannel() == 'q') { - double tmp = CL_ps3_highscale(x, m2Q2, m2mu2, nf); - return Value(tmp); - } + else if (GetOrder() == 3 && GetKind() == '2' && GetChannel() == 'g') fx_ = &HighScaleCoefficientFunction::C2_g3_highscale; + else if (GetOrder() == 3 && GetKind() == '2' && GetChannel() == 'q') fx_ = &HighScaleCoefficientFunction::C2_ps3_highscale; + else if (GetOrder() == 3 && GetKind() == 'L' && GetChannel() == 'g') fx_ = &HighScaleCoefficientFunction::CL_g3_highscale; + else if (GetOrder() == 3 && GetKind() == 'L' && GetChannel() == 'q') fx_ = &HighScaleCoefficientFunction::CL_ps3_highscale; else { - cout << "Error: something has gone wrong!" << endl; + cout << "Error: something has gone wrong in HighScaleCoefficientFunction::SetFunctions!" << endl; exit(-1); } - } //==========================================================================================// @@ -86,9 +78,9 @@ Value HighScaleCoefficientFunction::fxBand(double x, double m2Q2, double m2mu2, // Eq. (B.4) of Ref. [arXiv:1205.5727]. //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::C2_g1_highscale(double x, double m2Q2) const { +Value HighScaleCoefficientFunction::C2_g1_highscale(double x, double m2Q2, double /*m2mu2*/, int /*nf*/) const { - return massless_lo_->MuIndependentTerms(x, 1) + 2. * K_Qg1(x, m2Q2); + return Value(D2_g1_highscale(x, m2Q2)); } //==========================================================================================// @@ -96,9 +88,9 @@ double HighScaleCoefficientFunction::C2_g1_highscale(double x, double m2Q2) cons // O(alpha_s) expanded in terms of \alpha_s^{[nf]} //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::CL_g1_highscale(double x) const { - - return massless_lo_->MuIndependentTerms(x, 1); +Value HighScaleCoefficientFunction::CL_g1_highscale(double x, double /*m2Q2*/, double /*m2mu2*/, int /*nf*/) const { + return Value(DL_g1_highscale(x)); + } //==========================================================================================// @@ -110,7 +102,7 @@ double HighScaleCoefficientFunction::CL_g1_highscale(double x) const { double HighScaleCoefficientFunction::D2_g1_highscale(double x, double m2Q2) const { - return C2_g1_highscale(x, m2Q2); + return massless_lo_->MuIndependentTerms(x, 1) + 2. * K_Qg1(x, m2Q2); } //==========================================================================================// @@ -118,7 +110,9 @@ double HighScaleCoefficientFunction::D2_g1_highscale(double x, double m2Q2) cons // O(alpha_s) expanded in terms of \alpha_s^{[nf+1]} //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::DL_g1_highscale(double x) const { return CL_g1_highscale(x); } +double HighScaleCoefficientFunction::DL_g1_highscale(double x) const { + return massless_lo_->MuIndependentTerms(x, 1); +} //==========================================================================================// // High scale (Q^2 >> m^2) limit of the gluon coefficient functions for F2 at @@ -127,12 +121,13 @@ double HighScaleCoefficientFunction::DL_g1_highscale(double x) const { return CL // Eq. (B.6) of Ref. [arXiv:1205.5727]. //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::C2_g2_highscale(double x, double m2Q2, double m2mu2) const { +Value HighScaleCoefficientFunction::C2_g2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const { double Lmu = log(1. / m2mu2); - return D2_g2_highscale(x, m2Q2, m2mu2) - + 2. / 3 * Lmu * C2_g1_highscale(x, m2Q2); + double tmp = D2_g2_highscale(x, m2Q2, m2mu2) + + 2. / 3 * Lmu * D2_g1_highscale(x, m2Q2); + return Value(tmp); } //==========================================================================================// @@ -142,7 +137,7 @@ double HighScaleCoefficientFunction::C2_g2_highscale(double x, double m2Q2, doub // Eq. (B.9) of Ref. [arXiv:1205.5727]. //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::C2_ps2_highscale(double z, double m2Q2, double m2mu2) const { +double HighScaleCoefficientFunction::D2_ps2_highscale(double z, double m2Q2, double m2mu2) const { double z2 = z * z; double z3 = z2 * z; @@ -194,11 +189,13 @@ double HighScaleCoefficientFunction::C2_ps2_highscale(double z, double m2Q2, dou // O(alpha_s^2) expanded in terms of \alpha_s^{[nf]} //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::CL_g2_highscale(double x, double m2Q2, double m2mu2) const { +Value HighScaleCoefficientFunction::CL_g2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const { double Lmu = log(1. / m2mu2); - return DL_g2_highscale(x, m2Q2, m2mu2) + 2. / 3 * Lmu * CL_g1_highscale(x); + double tmp = DL_g2_highscale(x, m2Q2, m2mu2) + 2. / 3 * Lmu * DL_g1_highscale(x); + + return Value(tmp); } //==========================================================================================// @@ -206,9 +203,9 @@ double HighScaleCoefficientFunction::CL_g2_highscale(double x, double m2Q2, doub // O(alpha_s^2) expanded in terms of \alpha_s^{[nf]} //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::CL_ps2_highscale(double x, double m2Q2, double m2mu2) const { +Value HighScaleCoefficientFunction::CL_ps2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const { - return DL_ps2_highscale(x, m2Q2, m2mu2); + return Value(DL_ps2_highscale(x, m2Q2, m2mu2)); } //==========================================================================================// @@ -319,9 +316,9 @@ double HighScaleCoefficientFunction::D2_g2_highscale(double x, double m2Q2, doub // Eq. (B.6) of Ref. [arXiv:1205.5727]. //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::D2_ps2_highscale(double x, double m2Q2, double m2mu2) const { +Value HighScaleCoefficientFunction::C2_ps2_highscale(double x, double m2Q2, double m2mu2, int /*nf*/) const { - return C2_ps2_highscale(x, m2Q2, m2mu2); + return Value(D2_ps2_highscale(x, m2Q2, m2mu2)); } //==========================================================================================// @@ -943,16 +940,17 @@ double HighScaleCoefficientFunction::DL_g3_highscale(double z, double m2Q2, doub // O(alpha_s^3) expanded in terms of \alpha_s^{[nf]} //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::CL_g3_highscale(double x, double m2Q2, double m2mu2, int nf) const { +Value HighScaleCoefficientFunction::CL_g3_highscale(double x, double m2Q2, double m2mu2, int nf) const { double Lmu = log(m2mu2); double L2mu = Lmu * Lmu; - return DL_g3_highscale(x, m2Q2, m2mu2, nf) + double tmp = DL_g3_highscale(x, m2Q2, m2mu2, nf) - 4. / 3 * Lmu * DL_g2_highscale(x, m2Q2, m2mu2) - ((16. / 9 * CA - 15. / 2 * CF) + (10. / 3 * CA + 2 * CF) * Lmu - 4. / 9 * L2mu) * DL_g1_highscale(x); + return Value(tmp); } //==========================================================================================// @@ -1123,12 +1121,14 @@ double HighScaleCoefficientFunction::DL_ps3_highscale(double z, double m2Q2, dou // O(alpha_s^3) expanded in terms of \alpha_s^{[nf]} //------------------------------------------------------------------------------------------// -double HighScaleCoefficientFunction::CL_ps3_highscale(double x, double m2Q2, double m2mu2, int nf) const { +Value HighScaleCoefficientFunction::CL_ps3_highscale(double x, double m2Q2, double m2mu2, int nf) const { double Lmu = log(m2mu2); - return DL_ps3_highscale(x, m2Q2, m2mu2, nf) + double tmp = DL_ps3_highscale(x, m2Q2, m2mu2, nf) - 4. / 3 * Lmu * DL_ps2_highscale(x, m2Q2, m2mu2); + + return Value(tmp); } //==========================================================================================// diff --git a/src/HighScaleSplitLogs.cc b/src/HighScaleSplitLogs.cc index 3ecaf50..1ea8ac1 100644 --- a/src/HighScaleSplitLogs.cc +++ b/src/HighScaleSplitLogs.cc @@ -3622,7 +3622,7 @@ Value HighScaleSplitLogs::CL_g3_highscale_N3LL(double x, int nf) const { delete[] Hr4; delete[] Hr5; - return 547.6343796175224 + 40.888888888888886 * H0 + double tmp = 547.6343796175224 + 40.888888888888886 * H0 + 27.555555555555557 * H0 * H0 - 4.7407407407407405 * H0 * H0 * H0 - 170.66666666666669 * H001 + 64. * H00m1 - 181.33333333333334 * H01 + 71.11111111111111 * H0 * H01 + 35.55555555555556 * H011 @@ -3668,6 +3668,7 @@ Value HighScaleSplitLogs::CL_g3_highscale_N3LL(double x, int nf) const { + 128. * H0 * Hm1 * Hm1 * x2 + 4.666666666666667 * massless_lo_->MuIndependentTerms(x, 1) + massless_->MuIndependentTerms(x, nf + 1) / (1. + nf); + return Value(tmp); } //==========================================================================================// @@ -3755,7 +3756,7 @@ Value HighScaleSplitLogs::CL_ps3_highscale_N3LL(double x, int nf) const { delete[] Hr4; delete[] Hr5; - return 10.347610117516318 - 61.62962962962962 * H0 + double tmp = 10.347610117516318 - 61.62962962962962 * H0 - 7.111111111111111 * H0 * H0 - 4.7407407407407405 * H0 * H0 * H0 - 113.77777777777777 * H001 - 85.33333333333333 * H01 + 56.888888888888886 * H0 * H01 + 33.185185185185176 * H1 @@ -3774,4 +3775,6 @@ Value HighScaleSplitLogs::CL_ps3_highscale_N3LL(double x, int nf) const { - 30.02469135802469 * H1 * x2 + 37.925925925925924 * H0 * H1 * x2 + 4.7407407407407405 * H1 * H1 * x2 + massless_->MuIndependentTerms(x, nf + 1) / (1. + nf); + + return Value(tmp); }