From 7d5547b4ad1d5429c8daea48e99e78ffa9c8e094 Mon Sep 17 00:00:00 2001 From: niccolo Date: Tue, 19 Mar 2024 16:34:20 +0100 Subject: [PATCH] Clean massless --- inc/adani/MasslessCoefficientFunction.h | 4 ++++ src/MasslessCoefficientFunction.cc | 30 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/inc/adani/MasslessCoefficientFunction.h b/inc/adani/MasslessCoefficientFunction.h index 3b44573..30cfe2e 100644 --- a/inc/adani/MasslessCoefficientFunction.h +++ b/inc/adani/MasslessCoefficientFunction.h @@ -21,6 +21,10 @@ #include "adani/CoefficientFunction.h" +//==========================================================================================// +// class MasslessCoefficientFunction +//------------------------------------------------------------------------------------------// + class MasslessCoefficientFunction : public CoefficientFunction { public: diff --git a/src/MasslessCoefficientFunction.cc b/src/MasslessCoefficientFunction.cc index 792e462..4e47da5 100644 --- a/src/MasslessCoefficientFunction.cc +++ b/src/MasslessCoefficientFunction.cc @@ -8,35 +8,65 @@ using std::cout; using std::endl; +//==========================================================================================// +// MasslessCoefficientFunction: constructor +//------------------------------------------------------------------------------------------// + MasslessCoefficientFunction::MasslessCoefficientFunction(const int& order, const char& kind, const char& channel) : CoefficientFunction(order, kind, channel) { SetFunctions(); } +//==========================================================================================// +// MasslessCoefficientFunction: mu-dependent + mu-independent terms +//------------------------------------------------------------------------------------------// + double MasslessCoefficientFunction::fx(double x, double m2Q2, double m2mu2, int nf) const { return MuIndependentTerms(x, nf) + MuDependentTerms(x, m2Q2, m2mu2, nf) ; } +//==========================================================================================// +// MasslessCoefficientFunction: mu-dependent terms +//------------------------------------------------------------------------------------------// + double MasslessCoefficientFunction::MuDependentTerms(double /*x*/, double /*m2Q2*/, double /*m2mu2*/, int /*nf*/) const { cout << "Error: mu dependent terms of the massless coefficient functions are not implemented!" << endl; exit(-1); } +//==========================================================================================// +// MasslessCoefficientFunction: done beacuse it is required by the abstract base class +// CoefficientFunction +//------------------------------------------------------------------------------------------// + double MasslessCoefficientFunction::MuIndependentTerms(double /*x*/, double /*m2Q2*/, int /*nf*/) const { cout << "Error: massless coefficient functions do not depend on m^2/Q^2!" << endl; cout << "Call MasslessCoefficientFunction::MuIndependentTerms(double x, int nf)" << endl; exit(-1); } +//==========================================================================================// +// MasslessCoefficientFunction: mu-independent terms +//------------------------------------------------------------------------------------------// + double MasslessCoefficientFunction::MuIndependentTerms(double x, int nf) const { return (this->*mu_indep_)(x, nf); } +//==========================================================================================// +// MasslessCoefficientFunction: done beacuse it is required by the abstract base class +// CoefficientFunction. It returns three identical values +//------------------------------------------------------------------------------------------// + Value MasslessCoefficientFunction::fxBand(double x, double m2Q2, double m2mu2, int nf) const { return Value(fx(x, m2Q2, m2mu2, nf)); } +//==========================================================================================// +// MasslessCoefficientFunction: function that sets the pointer mu_indep_ to the correct function +//------------------------------------------------------------------------------------------// + void MasslessCoefficientFunction::SetFunctions() { if (GetOrder() == 1 && GetKind() == '2' && GetChannel() == 'g') mu_indep_ = &MasslessCoefficientFunction::C2_g1_massless; else if (GetOrder() == 1 && GetKind() == 'L' && GetChannel() == 'g') mu_indep_ = &MasslessCoefficientFunction::CL_g1_massless;