Skip to content

Commit

Permalink
Clean Threshod
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Mar 19, 2024
1 parent f3869c2 commit af6e591
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ MANIFEST.in

env/
venv/

tests/__pycache__/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if(PYTHON_ONLY)
src/CoefficientFunction.cc
src/ApproximateCoefficientFunctions.cc
src/ExactCoefficientFunctions.cc
src/ThresholdCoefficientFunctions.cc
src/ThresholdCoefficientFunction.cc
src/AsymptoticCoefficientFunctions.cc
src/MasslessCoefficientFunctions.cc
src/Convolutions.cc
Expand All @@ -98,7 +98,7 @@ else(PYTHON_ONLY)
src/CoefficientFunction.cc
src/ApproximateCoefficientFunctions.cc
src/ExactCoefficientFunctions.cc
src/ThresholdCoefficientFunctions.cc
src/ThresholdCoefficientFunction.cc
src/AsymptoticCoefficientFunctions.cc
src/MasslessCoefficientFunctions.cc
src/Convolutions.cc
Expand Down
2 changes: 1 addition & 1 deletion inc/adani/ApproximateCoefficientFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define Approximate_h

#include "adani/CoefficientFunction.h"
#include "adani/ThresholdCoefficientFunctions.h"
#include "adani/ThresholdCoefficientFunction.h"
#include "adani/AsymptoticCoefficientFunctions.h"
#include "adani/ExactCoefficientFunctions.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ThresholdCoefficientFunction : public CoefficientFunction {
ThresholdCoefficientFunction(const int& order, const char& kind, const char& channel) ;
~ThresholdCoefficientFunction() override ;

double fx(double x, double m2Q2, double m2mu2, int nf) const override ;
Value fxBand(double x, double m2Q2, double m2mu2, int nf) const override ;

double BetaIndependentTerms(double x, double m2Q2, double m2mu2) const;
Expand Down
2 changes: 1 addition & 1 deletion inc/adani/adani.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
#include "adani/MatchingConditions.h"
#include "adani/SpecialFunctions.h"
#include "adani/SplittingFunctions.h"
#include "adani/ThresholdCoefficientFunctions.h"
#include "adani/ThresholdCoefficientFunction.h"

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "adani/ThresholdCoefficientFunctions.h"
#include "adani/ThresholdCoefficientFunction.h"
#include "adani/Constants.h"
#include "adani/SpecialFunctions.h"

Expand All @@ -8,36 +8,44 @@
using std::cout ;
using std::endl ;

//==========================================================================================//
// ThresholdCoefficientFunction: constructor
//------------------------------------------------------------------------------------------//

ThresholdCoefficientFunction::ThresholdCoefficientFunction(const int& order, const char& kind, const char& channel) : CoefficientFunction(order, kind, channel) {

exactlo_ = new ExactCoefficientFunction(1, GetKind(), GetChannel());
SetFunctions();
}

//==========================================================================================//
// ThresholdCoefficientFunction: destructor
//------------------------------------------------------------------------------------------//

ThresholdCoefficientFunction::~ThresholdCoefficientFunction() {
delete exactlo_;
}

Value ThresholdCoefficientFunction::fxBand(double x, double m2Q2, double m2mu2, int nf) const {
return Value((this->*fx_)(x, m2Q2, m2mu2, nf));
//==========================================================================================//
// ThresholdCoefficientFunction: contral value of the full contribution
//------------------------------------------------------------------------------------------//

double ThresholdCoefficientFunction::fx(double x, double m2Q2, double m2mu2, int nf) const {
return (this->*fx_)(x, m2Q2, m2mu2, nf);
}

void ThresholdCoefficientFunction::SetFunctions() {
if (GetChannel() == 'q') fx_ = &ThresholdCoefficientFunction::ZeroFunction;
else if (GetChannel() == 'g') {
if (GetOrder() == 1 && GetKind() == '2') fx_ = &ThresholdCoefficientFunction::C2_g1_threshold ;
else if (GetOrder() == 1 && GetKind() == 'L') fx_ = &ThresholdCoefficientFunction::ZeroFunction;
else if (GetOrder() == 2 && GetKind() == '2') fx_ = &ThresholdCoefficientFunction::C2_g2_threshold ;
else if (GetOrder() == 2 && GetKind() == 'L') fx_ = &ThresholdCoefficientFunction::CL_g2_threshold ;
else if (GetOrder() == 3 && GetKind() == '2') fx_ = &ThresholdCoefficientFunction::C2_g3_threshold ;
else if (GetOrder() == 3 && GetKind() == 'L') fx_ = &ThresholdCoefficientFunction::CL_g3_threshold ;
else {
cout << "Error: something has gone wrong in ThresholdCoefficientFunction::SetFunctions!" << endl;
exit(-1);
}
}
//==========================================================================================//
// ThresholdCoefficientFunction: band of the full contribution
//------------------------------------------------------------------------------------------//

Value ThresholdCoefficientFunction::fxBand(double x, double m2Q2, double m2mu2, int nf) const {
return Value(fx(x, m2Q2, m2mu2, nf));
}

//==========================================================================================//
// ThresholdCoefficientFunction: central value of the beta-independent terms
//------------------------------------------------------------------------------------------//

double ThresholdCoefficientFunction::BetaIndependentTerms(double x, double m2Q2, double m2mu2) const {
if (GetChannel() == 'q') return 0.;
else if (GetChannel() == 'g') {
Expand All @@ -57,9 +65,29 @@ double ThresholdCoefficientFunction::BetaIndependentTerms(double x, double m2Q2,
}
}

//==========================================================================================//
// ThresholdCoefficientFunction: function that sets the pointer for fx
//------------------------------------------------------------------------------------------//

void ThresholdCoefficientFunction::SetFunctions() {
if (GetChannel() == 'q') fx_ = &ThresholdCoefficientFunction::ZeroFunction;
else if (GetChannel() == 'g') {
if (GetOrder() == 1 && GetKind() == '2') fx_ = &ThresholdCoefficientFunction::C2_g1_threshold ;
else if (GetOrder() == 1 && GetKind() == 'L') fx_ = &ThresholdCoefficientFunction::ZeroFunction;
else if (GetOrder() == 2 && GetKind() == '2') fx_ = &ThresholdCoefficientFunction::C2_g2_threshold ;
else if (GetOrder() == 2 && GetKind() == 'L') fx_ = &ThresholdCoefficientFunction::CL_g2_threshold ;
else if (GetOrder() == 3 && GetKind() == '2') fx_ = &ThresholdCoefficientFunction::C2_g3_threshold ;
else if (GetOrder() == 3 && GetKind() == 'L') fx_ = &ThresholdCoefficientFunction::CL_g3_threshold ;
else {
cout << "Error: something has gone wrong in ThresholdCoefficientFunction::SetFunctions!" << endl;
exit(-1);
}
}
}

//==========================================================================================//
// Threshold limit (x->xmax) of the gluon coefficient function for F2 at
// O(alpha_s). In order to pass to klmv normalization multiply
// O(as). In order to pass to klmv normalization multiply
// m2Q2*4*M_PI*M_PI*x
//
// Eq. (3.15) of Ref. [arXiv:1205.5727]
Expand Down

0 comments on commit af6e591

Please sign in to comment.