Skip to content

Commit

Permalink
Implement fx_ in highscale
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Mar 17, 2024
1 parent 286646f commit c8f86aa
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 54 deletions.
20 changes: 12 additions & 8 deletions inc/adani/HighScaleCoefficientFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand All @@ -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;
Expand All @@ -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 ;
Expand All @@ -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 ;
Expand Down
88 changes: 44 additions & 44 deletions src/HighScaleCoefficientFunctions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}

//==========================================================================================//
Expand All @@ -86,19 +78,19 @@ 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));
}

//==========================================================================================//
// High scale (Q^2 >> m^2) limit of the gluon coefficient functions for FL at
// 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));

}

//==========================================================================================//
Expand All @@ -110,15 +102,17 @@ 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);
}

//==========================================================================================//
// High scale (Q^2 >> m^2) limit of the gluon coefficient functions for FL at
// 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
Expand All @@ -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);
}

//==========================================================================================//
Expand All @@ -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;
Expand Down Expand Up @@ -194,21 +189,23 @@ 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);
}

//==========================================================================================//
// High scale (Q^2 >> m^2) limit of the gluon coefficient functions for FL at
// 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));
}

//==========================================================================================//
Expand Down Expand Up @@ -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));
}

//==========================================================================================//
Expand Down Expand Up @@ -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);
}

//==========================================================================================//
Expand Down Expand Up @@ -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);
}

//==========================================================================================//
Expand Down
7 changes: 5 additions & 2 deletions src/HighScaleSplitLogs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

//==========================================================================================//
Expand Down Expand Up @@ -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
Expand All @@ -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);
}

0 comments on commit c8f86aa

Please sign in to comment.