diff --git a/inc/adani/ExactCoefficientFunction.h b/inc/adani/ExactCoefficientFunction.h index 0553e53..5a3a2ca 100644 --- a/inc/adani/ExactCoefficientFunction.h +++ b/inc/adani/ExactCoefficientFunction.h @@ -104,8 +104,6 @@ class ExactCoefficientFunction : public CoefficientFunction { double C2_ps20(double x, double m2Q2, int /*nf*/) const; double CL_ps20(double x, double m2Q2, int /*nf*/) const; - double CheckRanges(double x, double m2Q2) const; - //==========================================================================================// // Exact massive coefficient functions O(as^2): terms // proportional to log(mu^2/m^2) diff --git a/src/ExactCoefficientFunction.cc b/src/ExactCoefficientFunction.cc index 6487a9d..6813019 100644 --- a/src/ExactCoefficientFunction.cc +++ b/src/ExactCoefficientFunction.cc @@ -291,28 +291,6 @@ ExactCoefficientFunction::CL_g1(double x, double m2Q2, int /*nf*/) const { // outside the grid one contribution is set to zero while the other is not. //------------------------------------------------------------------------------------------// -//==========================================================================================// -// Check that the (eta, xi) values are inside the interpolation grid: -// 1e-6 < eta < 1e6 -// 1e-3 < xi < 1e5 -//------------------------------------------------------------------------------------------// - -double ExactCoefficientFunction::CheckRanges(double x, double m2Q2) const { - - double xi = 1. / m2Q2; - double eta = 0.25 * xi * (1 - x) / x - 1.; - - // using nf = nan since at O(as2) the coefficient functions don't depend on nf - int nf = static_cast(nan("")); - - if (eta < 1e-6) return thr_ -> MuIndependentTerms(x, m2Q2, nf); - if (eta > 1e6 || xi > 1e5) return asy_ -> MuIndependentTerms(x, m2Q2, nf); - if (xi < 1e-3) { - cout << "Error in ExactCoefficientFunction::C" << GetKind() << "_" << GetChannel() << "2 : max value of m2Q2 is 1e3. Got " << m2Q2 << endl; - exit(-1); - } -} - /// @cond UNNECESSARY /** * @name Fortran massive coefficient functions @@ -348,7 +326,15 @@ ExactCoefficientFunction::C2_ps20(double x, double m2Q2, int /*nf*/) const { double xi = 1. / m2Q2; double eta = 0.25 * xi * (1 - x) / x - 1.; - CheckRanges(x, m2Q2); + // using nf = nan since at O(as2) the coefficient functions don't depend on nf + int nf = static_cast(nan("")); + + if (eta < 1e-6) return thr_ -> MuIndependentTerms(x, m2Q2, nf); + if (eta > 1e6 || xi > 1e5) return asy_ -> MuIndependentTerms(x, m2Q2, nf); + if (xi < 1e-3) { + cout << "Error in ExactCoefficientFunction::C2_ps20 : max value of m2Q2 is 1e3. Got " << m2Q2 << endl; + exit(-1); + } return 16 * M_PI * xi * c2nloq_(&eta, &xi) / x; } @@ -385,7 +371,15 @@ ExactCoefficientFunction::CL_ps20(double x, double m2Q2, int /*nf*/) const { double xi = 1. / m2Q2; double eta = 0.25 * xi * (1 - x) / x - 1.; - CheckRanges(x, m2Q2); + // using nf = nan since at O(as2) the coefficient functions don't depend on nf + int nf = static_cast(nan("")); + + if (eta < 1e-6) return thr_ -> MuIndependentTerms(x, m2Q2, nf); + if (eta > 1e6 || xi > 1e5) return asy_ -> MuIndependentTerms(x, m2Q2, nf); + if (xi < 1e-3) { + cout << "Error in ExactCoefficientFunction::CL_ps20 : max value of m2Q2 is 1e3. Got " << m2Q2 << endl; + exit(-1); + } return 16 * M_PI * xi * clnloq_(&eta, &xi) / x; } @@ -404,7 +398,15 @@ ExactCoefficientFunction::C2_g20(double x, double m2Q2, int /*nf*/) const { double xi = 1. / m2Q2; double eta = 0.25 * xi * (1 - x) / x - 1.; - CheckRanges(x, m2Q2); + // using nf = nan since at O(as2) the coefficient functions don't depend on nf + int nf = static_cast(nan("")); + + if (eta < 1e-6) return thr_ -> MuIndependentTerms(x, m2Q2, nf); + if (eta > 1e6 || xi > 1e5) return asy_ -> MuIndependentTerms(x, m2Q2, nf); + if (xi < 1e-3) { + cout << "Error in ExactCoefficientFunction::C2_g20 : max value of m2Q2 is 1e3. Got " << m2Q2 << endl; + exit(-1); + } return 16 * M_PI * xi * c2nlog_(&eta, &xi) / x; } @@ -441,7 +443,15 @@ ExactCoefficientFunction::CL_g20(double x, double m2Q2, int /*nf*/) const { double xi = 1. / m2Q2; double eta = 0.25 * xi * (1 - x) / x - 1.; - CheckRanges(x, m2Q2); + // using nf = nan since at O(as2) the coefficient functions don't depend on nf + int nf = static_cast(nan("")); + + if (eta < 1e-6) return thr_ -> MuIndependentTerms(x, m2Q2, nf); + if (eta > 1e6 || xi > 1e5) return asy_ -> MuIndependentTerms(x, m2Q2, nf); + if (xi < 1e-3) { + cout << "Error in ExactCoefficientFunction::CL_g20 : max value of m2Q2 is 1e3. Got " << m2Q2 << endl; + exit(-1); + } return 16 * M_PI * xi * clnlog_(&eta, &xi) / x; }