Skip to content

Commit

Permalink
Implement analytic convolution of Pgg0 x Pgg0
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Apr 24, 2024
1 parent a67fc35 commit 275ed55
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 32 deletions.
6 changes: 3 additions & 3 deletions inc/adani/ApproximateCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class AbstractApproximate : public CoefficientFunction {
AbstractApproximate(
const int &order, const char &kind, const char &channel,
const double &abserr = 1e-3, const double &relerr = 1e-3,
const int &dim = 1000, const bool &MCintegral = false,
const int &dim = 1000, const bool &analytical_PggxPgg = true, const bool &MCintegral = false,
const int &MCcalls = 25000
);
~AbstractApproximate();
Expand All @@ -91,7 +91,7 @@ class ApproximateCoefficientFunction : public AbstractApproximate {
const int &order, const char &kind, const char &channel,
const bool &NLL = true, const string &highscale_version = "klmv",
const double &abserr = 1e-3, const double &relerr = 1e-3,
const int &dim = 1000, const bool &MCintegral = false,
const int &dim = 1000, const bool &analytical_PggxPgg = true, const bool &MCintegral = false,
const int &MCcalls = 25000
);
~ApproximateCoefficientFunction() override;
Expand Down Expand Up @@ -124,7 +124,7 @@ class ApproximateCoefficientFunctionKLMV : public AbstractApproximate {
const int &order, const char &kind, const char &channel,
const string &highscale_version = "klmv", const bool &lowxi = false,
const double &abserr = 1e-3, const double &relerr = 1e-3,
const int &dim = 1000, const bool &MCintegral = false,
const int &dim = 1000, const bool &analytical_PggxPgg = true, const bool &MCintegral = false,
const int &MCcalls = 25000
);
~ApproximateCoefficientFunctionKLMV() override;
Expand Down
4 changes: 3 additions & 1 deletion inc/adani/ExactCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class ExactCoefficientFunction : public CoefficientFunction {
ExactCoefficientFunction(
const int &order, const char &kind, const char &channel,
const double &abserr = 1e-3, const double &relerr = 1e-3,
const int &dim = 1000, const bool &MCintegral = false,
const int &dim = 1000, const bool &analytical_PggxPgg = true,
const bool &MCintegral = false,
const int &MCcalls = 25000
);
~ExactCoefficientFunction() override;
Expand Down Expand Up @@ -84,6 +85,7 @@ class ExactCoefficientFunction : public CoefficientFunction {
SplittingFunction *Pgg1_;
SplittingFunction *Pqg0_;
ConvolutedSplittingFunctions *Pgq0Pqg0_;
ConvolutedSplittingFunctions * Pgg0Pgg0_;

Delta *delta_;

Expand Down
31 changes: 25 additions & 6 deletions inc/adani/SplittingFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class ConvolutedSplittingFunctions : public AbstractSplittingFunction {
const int &order1, const char &entry1, const char &entry2,
const int &order2, const char &entry3, const char &entry4
);
~ConvolutedSplittingFunctions() override{};
~ConvolutedSplittingFunctions() override;

// overloading operators
ConvolutedSplittingFunctions operator*(const double &rhs) const;
Expand All @@ -151,12 +151,10 @@ class ConvolutedSplittingFunctions : public AbstractSplittingFunction {

// Components of the Convoluted Splitting Function
double Regular(double x, int nf) const override;
double Singular(double /*x*/, int /*nf*/) const override { return 0.; };
double Local(int /*nf*/) const override { return 0.; };
double Singular(double x, int nf) const override ;
double Local(int nf) const override ;
// Integral from 0 to x of the Singular part
double SingularIntegrated(double /*x*/, int /*nf*/) const override {
return 0.;
};
double SingularIntegrated(double x, int nf) const override ;

void SetFunctions();

Expand All @@ -177,6 +175,11 @@ class ConvolutedSplittingFunctions : public AbstractSplittingFunction {
const char entry4_;

double (ConvolutedSplittingFunctions::*reg_)(double, int) const;
double (ConvolutedSplittingFunctions::*sing_)(double, int) const;
double (ConvolutedSplittingFunctions::*sing_int_)(double, int) const;
double (ConvolutedSplittingFunctions::*loc_)(int) const;

SplittingFunction* Pgg0_ ;

//==========================================================================================//
// Convolution between the splitting functions Pgg0/Pqq0
Expand All @@ -192,6 +195,22 @@ class ConvolutedSplittingFunctions : public AbstractSplittingFunction {

double Pgq0_x_Pqg0(double x, int nf) const;

//==========================================================================================//
// Convolution between the splitting functions Pgg0 and Pgg0
//------------------------------------------------------------------------------------------//

double Pgg0reg_x_Pgg0reg(double x) const;
double Pgg0reg_x_Pgg0sing(double x) const;
double Pgg0sing_x_Pgg0sing_reg(double x) const;
double Pgg0sing_x_Pgg0sing_sing(double x) const;
double Pgg0sing_x_Pgg0sing_sing_integrated(double x) const;
double Pgg0sing_x_Pgg0sing_loc() const;

double Pgg0_x_Pgg0_reg(double x, int nf) const;
double Pgg0_x_Pgg0_sing(double x, int nf) const;
double Pgg0_x_Pgg0_sing_integrated(double x, int nf) const;
double Pgg0_x_Pgg0_loc(int nf) const;

//==========================================================================================//
// Function needed to return a zero function
//------------------------------------------------------------------------------------------//
Expand Down
12 changes: 6 additions & 6 deletions pywrap/pywrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ PYBIND11_MODULE(_core, m) {
py::init<
const int &, const char &, const char &, const bool &,
const string &, const double &, const double &, const int &,
const bool &, const int &>(),
const bool &, const bool &, const int &>(),
py::arg("order"), py::arg("kind"), py::arg("channel"),
py::arg("NLL") = true, py::arg("highscale_version") = "klmv",
py::arg("abserr") = 1e-3, py::arg("relerr") = 1e-3,
py::arg("dim") = 1000, py::arg("MCintegral") = false,
py::arg("dim") = 1000, py::arg("analytical_PggxPgg") = true, py::arg("MCintegral") = false,
py::arg("MCcalls") = 25000
)
.def(
Expand Down Expand Up @@ -100,11 +100,11 @@ PYBIND11_MODULE(_core, m) {
py::init<
const int &, const char &, const char &, const string &,
const bool &, const double &, const double &, const int &,
const bool &, const int &>(),
const bool &, const bool &, const int &>(),
py::arg("order"), py::arg("kind"), py::arg("channel"),
py::arg("highscale_version") = "klmv", py::arg("lowxi") = false,
py::arg("abserr") = 1e-3, py::arg("relerr") = 1e-3,
py::arg("dim") = 1000, py::arg("MCintegral") = false,
py::arg("dim") = 1000, py::arg("analytical_PggxPgg") = true, py::arg("MCintegral") = false,
py::arg("MCcalls") = 25000
)
.def(
Expand Down Expand Up @@ -183,10 +183,10 @@ PYBIND11_MODULE(_core, m) {
.def(
py::init<
const int &, const char &, const char &, const double &,
const double &, const int &, const bool &, const int &>(),
const double &, const int &, const bool &, const bool &, const int &>(),
py::arg("order"), py::arg("kind"), py::arg("channel"),
py::arg("abserr") = 1e-3, py::arg("relerr") = 1e-3,
py::arg("dim") = 1000, py::arg("MCintegral") = false,
py::arg("dim") = 1000, py::arg("analytical_PggxPgg") = true, py::arg("MCintegral") = false,
py::arg("MCcalls") = 25000
)
.def(
Expand Down
16 changes: 10 additions & 6 deletions src/ApproximateCoefficientFunction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ using std::vector;

AbstractApproximate::AbstractApproximate(
const int &order, const char &kind, const char &channel,
const double &abserr, const double &relerr, const int &dim,
const double &abserr, const double &relerr, const int &dim, const bool &analytical_PggxPgg,
const bool &MCintegral, const int &MCcalls
)
: CoefficientFunction(order, kind, channel) {

muterms_ = new ExactCoefficientFunction(
order, kind, channel, abserr, relerr, dim, MCintegral, MCcalls
order, kind, channel, abserr, relerr, dim, analytical_PggxPgg, MCintegral, MCcalls
);
}

Expand All @@ -35,6 +35,10 @@ AbstractApproximate::AbstractApproximate(

AbstractApproximate::~AbstractApproximate() { delete muterms_; }

//==========================================================================================//
// AbstractApproximate: central value of the mu-independent terms
//------------------------------------------------------------------------------------------//

double AbstractApproximate::MuIndependentTerms(
double x, double m2Q2, int nf
) const {
Expand Down Expand Up @@ -96,10 +100,10 @@ struct variation_parameters CL_var = { 0.2, 2. };
ApproximateCoefficientFunction::ApproximateCoefficientFunction(
const int &order, const char &kind, const char &channel, const bool &NLL,
const string &highscale_version, const double &abserr, const double &relerr,
const int &dim, const bool &MCintegral, const int &MCcalls
const int &dim, const bool &analytical_PggxPgg, const bool &MCintegral, const int &MCcalls
)
: AbstractApproximate(
order, kind, channel, abserr, relerr, dim, MCintegral, MCcalls
order, kind, channel, abserr, relerr, dim, analytical_PggxPgg, MCintegral, MCcalls
) {

threshold_ = new ThresholdCoefficientFunction(order, kind, channel);
Expand Down Expand Up @@ -262,11 +266,11 @@ struct klmv_params klmv_C2g3B_lowxi = { 0.8, 10.7, 0.055125, 2, 0.3825 };
ApproximateCoefficientFunctionKLMV::ApproximateCoefficientFunctionKLMV(
const int &order, const char &kind, const char &channel,
const string &highscale_version, const bool &lowxi, const double &abserr,
const double &relerr, const int &dim, const bool &MCintegral,
const double &relerr, const int &dim, const bool &analytical_PggxPgg, const bool &MCintegral,
const int &MCcalls
)
: AbstractApproximate(
order, kind, channel, abserr, relerr, dim, MCintegral, MCcalls
order, kind, channel, abserr, relerr, dim, analytical_PggxPgg, MCintegral, MCcalls
) {
if (GetOrder() == 1) {
cout << "Error: KLMV approximation is not implemented at O(as)!"
Expand Down
13 changes: 9 additions & 4 deletions src/ExactCoefficientFunction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using std::endl;

ExactCoefficientFunction::ExactCoefficientFunction(
const int &order, const char &kind, const char &channel,
const double &abserr, const double &relerr, const int &dim,
const double &abserr, const double &relerr, const int &dim, const bool &analytical_PggxPgg,
const bool &MCintegral, const int &MCcalls
)
: CoefficientFunction(order, kind, channel) {
Expand All @@ -33,6 +33,7 @@ ExactCoefficientFunction::ExactCoefficientFunction(
Pgg1_ = nullptr;
Pqg0_ = nullptr;
Pgq0Pqg0_ = nullptr;
Pgg0Pgg0_ = nullptr;

delta_ = nullptr;

Expand Down Expand Up @@ -110,9 +111,13 @@ ExactCoefficientFunction::ExactCoefficientFunction(
);
convolutions_lmu1_.push_back(new Convolution(gluon_as2_, delta_));

convolutions_lmu2_.push_back(new DoubleConvolution(
gluon_as1_, Pgg0_, abserr, relerr, dim, MCintegral, MCcalls
));
if (!analytical_PggxPgg) {
convolutions_lmu2_.push_back(new DoubleConvolution(
gluon_as1_, Pgg0_, abserr, relerr, dim, MCintegral, MCcalls
));
} else {
convolutions_lmu2_.push_back(new Convolution(gluon_as1_, Pgg0Pgg0_, abserr, relerr, dim));
}
convolutions_lmu2_.push_back(
new Convolution(gluon_as1_, Pgq0Pqg0_, abserr, relerr, dim)
);
Expand Down
Loading

0 comments on commit 275ed55

Please sign in to comment.