Skip to content

Commit

Permalink
Clean un po' tutto
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Mar 19, 2024
1 parent 7d5547b commit e07ebd5
Show file tree
Hide file tree
Showing 13 changed files with 416 additions and 263 deletions.
25 changes: 25 additions & 0 deletions inc/adani/ApproximateCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,30 @@
#include "adani/AsymptoticCoefficientFunction.h"
#include "adani/ExactCoefficientFunction.h"

//==========================================================================================//
// struct approximation_parameters: parameters of the damping functions
//------------------------------------------------------------------------------------------//

struct approximation_parameters {
double A;
double B;
double C;
double D;
};

//==========================================================================================//
// struct variation_parameters: parameters of the variation of the damping functions
//------------------------------------------------------------------------------------------//

struct variation_parameters {
double var;
double fact;
};

//==========================================================================================//
// struct klmv_params: parameters for klmv approximation
//------------------------------------------------------------------------------------------//

struct klmv_params {
double gamma;
double C;
Expand All @@ -42,6 +54,10 @@ struct klmv_params {
double const_coeff;
};

//==========================================================================================//
// class AbstractApproximate
//------------------------------------------------------------------------------------------//

class AbstractApproximate : public CoefficientFunction {
public:
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 int& method_flag = 1, const int& MCcalls = 25000);
Expand All @@ -56,6 +72,10 @@ class AbstractApproximate : public CoefficientFunction {
ExactCoefficientFunction* muterms_;
};

//==========================================================================================//
// class ApproximateCoefficientFunction
//------------------------------------------------------------------------------------------//

class ApproximateCoefficientFunction : public AbstractApproximate {
public:
ApproximateCoefficientFunction(const int& order, const char& kind, const char& channel, const bool& NLL = true, const bool& exact_highscale = false, const bool& revised_approx_highscale = true, const double& abserr = 1e-3, const double& relerr = 1e-3, const int& dim = 1000, const int& method_flag = 1, const int& MCcalls = 25000) ;
Expand All @@ -75,6 +95,11 @@ class ApproximateCoefficientFunction : public AbstractApproximate {

};

//==========================================================================================//
// class ApproximateCoefficientFunctionKLMV: Approximate coefficient functions from [arXiv:1205.5727]
// klmv = Kawamura, Lo Presti, Moch, Vogt
//------------------------------------------------------------------------------------------//

class ApproximateCoefficientFunctionKLMV : public AbstractApproximate {
public:
ApproximateCoefficientFunctionKLMV(const int& order, const char& kind, const char& channel, const bool& revised_approx_highscale = true, const double& abserr = 1e-3, const double& relerr = 1e-3, const int& dim = 1000, const int& method_flag = 1, const int& MCcalls = 25000) ;
Expand Down
4 changes: 4 additions & 0 deletions inc/adani/AsymptoticCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include "adani/HighEnergyCoefficientFunction.h"
#include "adani/HighScaleCoefficientFunction.h"

//==========================================================================================//
// class AsymptoticCoefficientFunction
//------------------------------------------------------------------------------------------//

class AsymptoticCoefficientFunction : public AbstractHighEnergyCoefficientFunction {
public:
AsymptoticCoefficientFunction(const int& order, const char& kind, const char& channel, const bool& NLL = true, const bool& exact_highscale = false, const bool& revised_approx_highscale = true);
Expand Down
16 changes: 16 additions & 0 deletions inc/adani/CoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
#include <vector>
#include <iostream>

//==========================================================================================//
// The notation used is the following:
// C^{(k)} = k-th order expansion in
// terms of a_s^{[nf]}
//
//------------------------------------------------------------------------------------------//
//==========================================================================================//
// Notation:
// m2Q2 = m^2/Q^2
// m2mu2 = m^2/mu^2
//------------------------------------------------------------------------------------------//

//==========================================================================================//
// class CoefficientFunction: abstract base class for all the CoefficeintFunction
//------------------------------------------------------------------------------------------//

class CoefficientFunction {

public:
Expand Down
40 changes: 27 additions & 13 deletions inc/adani/Convolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
* Author: Dribbla tutti, anche i cammelli del
* deserto
*
* In this file there are the convolutions between the
* functions defined in this library.
* In this file there are the convolutions between the coefficeint functions and splitting functions.
*
* For the convolution between a regular function and a
* function containing regular, singular (plus distribution)
Expand All @@ -31,13 +30,19 @@
#include <gsl/gsl_monte.h>
#include <gsl/gsl_monte_vegas.h>

//==========================================================================================//
// class AbstractConvolution
//------------------------------------------------------------------------------------------//

class AbstractConvolution {
public:
AbstractConvolution(CoefficientFunction* coefffunc, AbstractSplittingFunction* splitfunc, const double& abserr = 1e-3, const double& relerr = 1e-3, const int& dim = 1000);
virtual ~AbstractConvolution() = 0;

// result of the convolution
double Convolute(double x, double m2Q2, int nf) const ;

// integrals of the reular, singular and local parts of the splittings
virtual double RegularPart(double x, double m2Q2, int nf) const = 0;
virtual double SingularPart(double x, double m2Q2, int nf) const = 0;
virtual double LocalPart(double x, double m2Q2, int nf) const = 0;
Expand All @@ -46,7 +51,6 @@ class AbstractConvolution {
double GetAbserr() const {return abserr_;};
double GetRelerr() const {return relerr_;};
int GetDim() const {return dim_;} ;

CoefficientFunction* GetCoeffFunc() const {return coefffunc_;};
AbstractSplittingFunction* GetSplitFunc() const {return splitfunc_;};

Expand All @@ -66,6 +70,10 @@ class AbstractConvolution {

};

//==========================================================================================//
// class Convolution
//------------------------------------------------------------------------------------------//

class Convolution : public AbstractConvolution {
public:
Convolution(CoefficientFunction* coefffunc, AbstractSplittingFunction* splitfunc, const double& abserr = 1e-3, const double& relerr = 1e-3, const int& dim = 1000) : AbstractConvolution(coefffunc, splitfunc, abserr, relerr, dim) {} ;
Expand All @@ -75,11 +83,15 @@ class Convolution : public AbstractConvolution {
double SingularPart(double x, double m2Q2, int nf) const override;
double LocalPart(double x, double m2Q2, int nf) const override;

// support function for the integral. it is static in order to be passed to gsl
static double regular_integrand(double z, void *p) ;
static double singular_integrand(double z, void *p) ;

};

//==========================================================================================//
// class ConvolutedCoefficientFunction: convolution between a CoefficientFunction and a SplittingFunction
//------------------------------------------------------------------------------------------//

class ConvolutedCoefficientFunction : public CoefficientFunction {
public:
Expand All @@ -99,10 +111,14 @@ class ConvolutedCoefficientFunction : public CoefficientFunction {

};

class MonteCarloDoubleConvolution : public AbstractConvolution {
//==========================================================================================//
// class DoubleConvolution
//------------------------------------------------------------------------------------------//

class DoubleConvolution : public AbstractConvolution {
public:
MonteCarloDoubleConvolution(CoefficientFunction* coefffunc, AbstractSplittingFunction* splitfunc, const double& abserr = 1e-3, const double& relerr = 1e-3, const int& dim = 1000, const int& method_flag = 1, const int& MCcalls = 25000) ;
~MonteCarloDoubleConvolution() override ;
DoubleConvolution(CoefficientFunction* coefffunc, AbstractSplittingFunction* splitfunc, const double& abserr = 1e-3, const double& relerr = 1e-3, const int& dim = 1000, const int& method_flag = 1, const int& MCcalls = 25000) ;
~DoubleConvolution() override ;

double RegularPart(double x, double m2Q2, int nf) const override;
double SingularPart(double x, double m2Q2, int nf) const override;
Expand All @@ -116,6 +132,7 @@ class MonteCarloDoubleConvolution : public AbstractConvolution {
void SetMethodFlag(const int& method_flag) ;
void SetMCcalls(const int& MCcalls) ;

// support function for the integral. it is static in order to be passed to gsl
static double regular1_integrand(double z[], size_t /*dim*/, void *p) ;
static double regular2_integrand(double z[], size_t /*dim*/, void *p) ;
static double regular3_integrand(double z, void *p) ;
Expand All @@ -133,18 +150,15 @@ class MonteCarloDoubleConvolution : public AbstractConvolution {

};

//==========================================================================================//
// struct function_params to be passed to gsl
//------------------------------------------------------------------------------------------//

struct function_params {
double x;
double m2Q2;
int nf;
const AbstractConvolution* conv;
};

//==========================================================================================//
// Convolution between the first order massive gluon
// coefficient functions and the convolution between the
// splitting functions Pgg0 and Pgg0 using monte carlo
// mathods
//------------------------------------------------------------------------------------------//

#endif
37 changes: 12 additions & 25 deletions inc/adani/ExactCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,13 @@
#define Exact_h

#include "adani/CoefficientFunction.h"
#include "adani/SplittingFunction.h"
#include "adani/Convolution.h"

#include <vector>

//==========================================================================================//
// The notation used is the following:
// C^{(k)} = k-th order expansion in
// terms of a_s^{[nf]}
//
//------------------------------------------------------------------------------------------//
//==========================================================================================//
// Notation:
// m2Q2 = m^2/Q^2
// m2mu2 = m^2/mu^2
// class ExactCoefficientFunction
//------------------------------------------------------------------------------------------//

class ExactCoefficientFunction : public CoefficientFunction {
Expand Down Expand Up @@ -63,7 +56,6 @@ class ExactCoefficientFunction : public CoefficientFunction {
void SetFunctions();

private:

int method_flag_ ;
double abserr_ ;
double relerr_ ;
Expand Down Expand Up @@ -100,17 +92,6 @@ class ExactCoefficientFunction : public CoefficientFunction {
double C2_g1(double x, double m2Q2, int /*nf*/) const;
double CL_g1(double x, double m2Q2, int /*nf*/) const;

//==========================================================================================//
// Exact massive coefficient functions
// O(as^2)
//------------------------------------------------------------------------------------------//

// double C2_g2(double x, double m2Q2, double m2mu2) const;
// double C2_ps2(double x, double m2Q2, double m2mu2) const;

// double CL_g2(double x, double m2Q2, double m2mu2) const;
// double CL_ps2(double x, double m2Q2, double m2mu2) const;

//==========================================================================================//
// Exact massive coefficient functions O(as^2):
// mu-independent terms
Expand All @@ -129,6 +110,11 @@ class ExactCoefficientFunction : public CoefficientFunction {
double C_g21(double x, double m2Q2) const;
double C_ps21(double x, double m2Q2) const;

//==========================================================================================//
// Exact massive coefficient functions O(as^2):
// mu-dependent terms
//------------------------------------------------------------------------------------------//

double C_ps2_MuDep(double x, double m2Q2, double m2mu2, int /*nf*/) const ;
double C_g2_MuDep(double x, double m2Q2, double m2mu2, int /*nf*/) const ;

Expand All @@ -146,12 +132,13 @@ class ExactCoefficientFunction : public CoefficientFunction {
//------------------------------------------------------------------------------------------//

double C_ps32(double x, double m2Q2, int nf) const;

// These two expressions are integrated with montcarlo
// methods

double C_g32(double x, double m2Q2, int nf) const;

//==========================================================================================//
// Exact massive coefficient functions O(as^3):
// mu-dependent terms
//------------------------------------------------------------------------------------------//

double C_ps3_MuDep(double x, double m2Q2, double m2mu2, int nf) const ;
double C_g3_MuDep(double x, double m2Q2, double m2mu2, int nf) const ;

Expand Down
26 changes: 24 additions & 2 deletions inc/adani/HighEnergyCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
// C_highenergy_highscale
//------------------------------------------------------------------------------------------//

//==========================================================================================//
// class AbstractHighEnergyCoefficientFunction
//------------------------------------------------------------------------------------------//

class AbstractHighEnergyCoefficientFunction : public CoefficientFunction {
public:
AbstractHighEnergyCoefficientFunction(const int& order, const char& kind, const char& channel, const bool& NLL = true) ;
Expand All @@ -53,6 +57,10 @@ class AbstractHighEnergyCoefficientFunction : public CoefficientFunction {
double a_21(int nf) const;
};

//==========================================================================================//
// class HighEnergyCoefficientFunction
//------------------------------------------------------------------------------------------//

class HighEnergyCoefficientFunction : public AbstractHighEnergyCoefficientFunction {

public:
Expand Down Expand Up @@ -102,11 +110,19 @@ class HighEnergyCoefficientFunction : public AbstractHighEnergyCoefficientFuncti
Value CL_g3_highenergy(double x, double m2Q2, double m2mu2, int nf) const ;
Value CL_ps3_highenergy(double x, double m2Q2, double m2mu2, int nf) const ;

//==========================================================================================//
// Function needed to make LL_ and NLL_ point to a zero function
//------------------------------------------------------------------------------------------//

double ZeroFunction(double /*x*/, double /*m2Q2*/, double /*m2mu2*/) const {return 0.;};
Value ZeroFunctionBand(double /*x*/, double /*m2Q2*/, double /*m2mu2*/, int /*nf*/) const {return Value(0.);};

};

//==========================================================================================//
// class HighEnergyHighScaleCoefficientFunction
//------------------------------------------------------------------------------------------//

class HighEnergyHighScaleCoefficientFunction : public AbstractHighEnergyCoefficientFunction {

public:
Expand All @@ -118,7 +134,6 @@ class HighEnergyHighScaleCoefficientFunction : public AbstractHighEnergyCoeffici
void SetFunctions();

private:

double (HighEnergyHighScaleCoefficientFunction::*LL_)(double, double, double) const;
Value (HighEnergyHighScaleCoefficientFunction::*NLL_)(double, double, double, int) const;

Expand Down Expand Up @@ -161,11 +176,19 @@ class HighEnergyHighScaleCoefficientFunction : public AbstractHighEnergyCoeffici
Value
CL_ps3_highenergy_highscale(double x, double m2Q2, double m2mu2, int nf) const;

//==========================================================================================//
// Function needed to make LL_ and NLL_ point to a zero function
//------------------------------------------------------------------------------------------//

double ZeroFunction(double /*x*/, double /*m2Q2*/, double /*m2mu2*/) const {return 0.;};
Value ZeroFunctionBand(double /*x*/, double /*m2Q2*/, double /*m2mu2*/, int /*nf*/) const {return Value(0.);};

};

//==========================================================================================//
// class PowerTermsCoefficientFunction
//------------------------------------------------------------------------------------------//

class PowerTermsCoefficientFunction : public AbstractHighEnergyCoefficientFunction {

public:
Expand All @@ -175,7 +198,6 @@ class PowerTermsCoefficientFunction : public AbstractHighEnergyCoefficientFuncti
Value fxBand(double x, double m2Q2, double m2mu2, int nf) const override ;

private:

HighEnergyCoefficientFunction *highenergy_ ;
HighEnergyHighScaleCoefficientFunction *highenergyhighscale_ ;

Expand Down
4 changes: 4 additions & 0 deletions inc/adani/HighScaleCoefficientFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
// \alpha_s^{[nf+1]}
//------------------------------------------------------------------------------------------//

//==========================================================================================//
// class HighScaleCoefficientFunction
//------------------------------------------------------------------------------------------//

class HighScaleCoefficientFunction : public CoefficientFunction {
public:
HighScaleCoefficientFunction(const int& order, const char& kind, const char& channel, const bool& exact, const bool& revised_approx) ;
Expand Down
Loading

0 comments on commit e07ebd5

Please sign in to comment.