Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:17:11

0001 /******************************************************************************
0002  * This file is part of libome                                                *
0003  * Copyright (C) 2025 Arnd Behring, Kay Schoenwald                            *
0004  * SPDX-License-Identifier: GPL-3.0-or-later                                  *
0005  ******************************************************************************/
0006 
0007 /**
0008  * \file
0009  * \brief Type aliases to model the nesting structure of OMEs
0010  */
0011 
0012 #ifndef LIBOME_OME_TYPE_ALIASES_H
0013 #define LIBOME_OME_TYPE_ALIASES_H
0014 
0015 #include <apfel/ome/functions.h>
0016 #include <apfel/ome/laurent_polynomial.h>
0017 #include <apfel/ome/piecewise.h>
0018 
0019 namespace apfel
0020 {
0021   namespace ome
0022   {
0023     /**
0024      * \defgroup ome-data-types Public data types
0025      * \brief Specialised data types for the objects provided
0026      * @{
0027      */
0028 
0029     /**
0030      * \name Standard OMEs
0031      * \brief Type aliases for standard x-dependent OMEs, given by a piecewise
0032      *        definition based on generalised power series
0033      * @{
0034      */
0035 
0036     /**
0037      * \brief Truncated power series in \f$x-x_0\f$
0038      *
0039      * \details
0040      * Truncated power series that takes the value of \f$x-x_0\f$ and returns the
0041      * evaluation of the power series.
0042      */
0043     template<typename Tnum> using ome_x = laurent_polynomial<Tnum, Tnum>;
0044 
0045     /**
0046      * \brief Truncated power series in \f$\log(x-x_0)\f$ and \f$x-x_0\f$
0047      *
0048      * \details
0049      * Truncated power seires that takes the values of \f$x-x_0\f$ and
0050      * \f$\log(x-x_0)\f$ and returns the evaluation of the power series.
0051      */
0052     template<typename Tnum> using ome_logx
0053       = laurent_polynomial<Tnum, ome_x<Tnum>, Tnum>;
0054 
0055     /**
0056      * \brief Truncated generalised power series in x
0057      *
0058      * \details
0059      * Univariate wrapper for \ref ome_logx, that takes the value of \f$x\f$,
0060      * shifts it using the appropriate function, calculates \f$\log(x-x_0)\f$
0061      * and evaluates the underlying \ref ome_logx.
0062      */
0063     template<typename Tnum> using ome_genps
0064       = func_apply<Tnum, func_copy_and_log<Tnum, ome_logx<Tnum>>>;
0065 
0066     /**
0067      * \brief Construct an \ref ome_genps object
0068      *
0069      * \details
0070      * Since the template parameter deduction for \ref ome_genps using plain
0071      * constructors is tricky and require manual composition of \ref func_apply
0072      * and \ref func_copy_and_log classes, this helper allows to construct
0073      * \ref ome_genps objects with automatic template parameter deduction.
0074      *
0075      * \tparam Tnum Numerical type
0076      *
0077      * \param apply_function Univariate function that is applied to \f$x\f$ before
0078      *        it is passed to the wrapped \ref ome_logx target
0079      * \param target Underlying truncated power series in \f$\log(x-x_0)\f$ and
0080      *        \f$x-x_0\f$
0081      */
0082     template<typename Tnum>
0083     ome_genps<Tnum> make_ome_genps(std::function<Tnum(Tnum)> apply_function,
0084                                    ome_logx<Tnum> target)
0085     {
0086       return(
0087               func_apply<Tnum, func_copy_and_log<Tnum, ome_logx<Tnum>>>(
0088                 apply_function,
0089                 func_copy_and_log<Tnum, ome_logx<Tnum>>(target)
0090               )
0091             );
0092     };
0093 
0094     /**
0095      * \brief Piecewise defined OME coefficient in \f$x\f$
0096      *
0097      * \details
0098      * A collection of generalised power series representations along with the
0099      * intervals on which they are defined.
0100      */
0101     template<typename Tnum> using ome_piecewisex
0102       = piecewise<Tnum, ome_genps<Tnum>>;
0103 
0104     /**
0105      * \brief OME coefficients in \f$N_F\f$
0106      *
0107      * \details
0108      * Polynomial in the number of massless quarks \f$N_F\f$. Each coefficient is
0109      * a function of \f$x\f$.
0110      */
0111     template<typename Tnum> using ome_nf
0112       = laurent_polynomial<Tnum, ome_piecewisex<Tnum>, Tnum>;
0113 
0114     /**
0115      * \brief View type for OME coefficient in \f$N_F\f$
0116      */
0117     template<typename Tnum> using ome_nf_view
0118       = laurent_polynomial_view<Tnum, ome_piecewisex<Tnum>, Tnum>;
0119 
0120     /**
0121      * \brief OME coefficients in \f$L_M\f$
0122      *
0123      * \details
0124      * Polynomial in the mass logarithm
0125      * \f$L_M = \log\left(\frac{m^2}{\mu^2}\right)\f$.
0126      * Each coefficient is a function of \f$N_F\f$ and \f$x\f$.
0127      */
0128     template<typename Tnum> using ome_logm
0129       = laurent_polynomial<Tnum, ome_nf<Tnum>, Tnum, Tnum>;
0130 
0131     /**
0132      * \brief View type for OME coefficient in \f$L_M\f$
0133      */
0134     template<typename Tnum> using ome_logm_view
0135       = laurent_polynomial_view<Tnum, ome_nf<Tnum>, Tnum, Tnum>;
0136 
0137     /**
0138      * \brief OME coefficients in \f$a_s\f$
0139      *
0140      * \details
0141      * Polynomial in the strong coupling constant
0142      * \f$a_s(\mu) = \frac{\alpha_s(\mu)}{4 \pi} = \frac{g^2(\mu)}{(4 \pi)^2}\f$.
0143      * Each coefficient is a function of \f$L_M\f$, \f$N_F\f$ and \f$x\f$.
0144      *
0145      */
0146     template<typename Tnum> using ome_as
0147       = laurent_polynomial<Tnum, ome_logm<Tnum>, Tnum, Tnum, Tnum>;
0148 
0149     /**
0150      * \brief View type for OME coefficient in \f$a_s\f$
0151      */
0152     template<typename Tnum> using ome_as_view
0153       = laurent_polynomial_view<Tnum, ome_logm<Tnum>, Tnum, Tnum, Tnum>;
0154 
0155     /**
0156      * @}
0157      */
0158 
0159 
0160     /**
0161      * \name Constant OMEs
0162      * \brief Type aliases for constant (x-independent) OMEs
0163      * @{
0164      */
0165 
0166     /**
0167      * \brief OME coefficients in \f$N_F\f$
0168      *
0169      * \details
0170      * Polynomial in the number of massless quarks \f$N_F\f$. The coefficients
0171      * are constant numbers.
0172      */
0173     template<typename Tnum> using ome_nf_const
0174       = laurent_polynomial<Tnum, Tnum>;
0175 
0176     /**
0177      * \brief View type for OME coefficient in \f$N_F\f$
0178      */
0179     template<typename Tnum> using ome_nf_const_view
0180       = laurent_polynomial_view<Tnum, Tnum>;
0181 
0182     /**
0183      * \brief OME coefficients in \f$L_M\f$
0184      *
0185      * \details
0186      * Polynomial in the mass logarithm
0187      * \f$L_M = \log\left(\frac{m^2}{\mu^2}\right)\f$.
0188      * Each coefficient is a function of \f$N_F\f$.
0189      */
0190     template<typename Tnum> using ome_logm_const
0191       = laurent_polynomial<Tnum, ome_nf_const<Tnum>, Tnum>;
0192 
0193     /**
0194      * \brief View type for OME coefficient in \f$L_M\f$
0195      */
0196     template<typename Tnum> using ome_logm_const_view
0197       = laurent_polynomial_view<Tnum, ome_nf_const<Tnum>, Tnum>;
0198 
0199     /**
0200      * \brief OME coefficients in \f$a_s\f$
0201      *
0202      * \details
0203      * Polynomial in the strong coupling constant
0204      * \f$a_s(\mu) = \frac{\alpha_s(\mu)}{4 \pi} = \frac{g^2(\mu)}{(4 \pi)^2}\f$.
0205      * Each coefficient is a function of \f$L_M\f$ and \f$N_F\f$.
0206      */
0207     template<typename Tnum> using ome_as_const
0208       = laurent_polynomial<Tnum, ome_logm_const<Tnum>, Tnum, Tnum>;
0209 
0210     /**
0211      * \brief View type for OME coefficient in \f$a_s\f$
0212      */
0213     template<typename Tnum> using ome_as_const_view
0214       = laurent_polynomial_view<Tnum, ome_logm_const<Tnum>, Tnum, Tnum>;
0215 
0216     /**
0217      * @}
0218      */
0219 
0220 
0221     /**
0222      * \name Plus function part of OMEs
0223      * \brief Type aliases for plus function part of OMEs
0224      * @{
0225      */
0226 
0227     /**
0228      * \brief Coefficients of the basic plus functions
0229      *
0230      * \details
0231      * This polynomial contains the coefficients of the basic plus functions
0232      * \f[
0233      *   D_k(x) = \left[\frac{\log^k(1-x)}{1-x}\right]_+
0234      * \f]
0235      * In practice, it takes the numerical value of \f$\log(1-x)\f$ and
0236      * calculates the polynomial
0237      * \f[
0238      *   \sum_k \log^k(1-x) c_k
0239      * \f]
0240      * and the division by \f$(1-x)\f$ is done one level above in the hierarchy
0241      * in \ref ome_plusfunc. The coefficients \f$c_k\f$ are constant numbers.
0242      */
0243     template<typename Tnum> using ome_plusfunc_coeff
0244       = laurent_polynomial<Tnum, Tnum>;
0245 
0246     /**
0247      * \brief Sum of basic plus functions
0248      *
0249      * \details
0250      * This models a sum of basic plus distributions
0251      * \f[
0252      *   f_+(x) = \sum_k c_k \left[\frac{\log^k(1-x)}{1-x}\right]_+
0253      * \f]
0254      * It takes the argument x, shifts it to \f$(1-x)\f$, takes the logarithm
0255      * and passes it to the underlying \ref ome_plusfunc_coeff. The result is
0256      * then divided by \f$(1-x)\f$ before being returned.
0257      */
0258     template<typename Tnum> using ome_plusfunc
0259       = func_plusfunc_omx<Tnum, ome_plusfunc_coeff<Tnum>>;
0260 
0261     /**
0262      * \brief OME coefficients in \f$N_F\f$
0263      *
0264      * \details
0265      * Polynomial in the number of massless quarks \f$N_F\f$. The coefficients
0266      * are (plus) functions of \f$x\f$.
0267      */
0268     template<typename Tnum> using ome_nf_plus
0269       = laurent_polynomial<Tnum, ome_plusfunc<Tnum>, Tnum>;
0270 
0271     /**
0272      * \brief View type for OME coefficient in \f$N_F\f$
0273      */
0274     template<typename Tnum> using ome_nf_plus_view
0275       = laurent_polynomial_view<Tnum, ome_plusfunc<Tnum>, Tnum>;
0276 
0277     /**
0278      * \brief OME coefficients in \f$L_M\f$
0279      *
0280      * \details
0281      * Polynomial in the mass logarithm
0282      * \f$L_M = \log\left(\frac{m^2}{\mu^2}\right)\f$.
0283      * Each coefficient is a function of \f$N_F\f$ and \f$x\f$.
0284      */
0285     template<typename Tnum> using ome_logm_plus
0286       = laurent_polynomial<Tnum, ome_nf_plus<Tnum>, Tnum, Tnum>;
0287 
0288     /**
0289      * \brief View type for OME coefficient in \f$L_M\f$
0290      */
0291     template<typename Tnum> using ome_logm_plus_view
0292       = laurent_polynomial_view<Tnum, ome_nf_plus<Tnum>, Tnum, Tnum>;
0293 
0294     /**
0295      * \brief OME coefficients in \f$a_s\f$
0296      *
0297      * \details
0298      * Polynomial in the strong coupling constant
0299      * \f$a_s(\mu) = \frac{\alpha_s(\mu)}{4 \pi} = \frac{g^2(\mu)}{(4 \pi)^2}\f$.
0300      * Each coefficient is a function of \f$L_M\f$, \f$N_F\f$ and \f$x\f$.
0301      */
0302     template<typename Tnum> using ome_as_plus
0303       = laurent_polynomial<Tnum, ome_logm_plus<Tnum>, Tnum, Tnum, Tnum>;
0304 
0305     /**
0306      * \brief View type for OME coefficient in \f$a_s\f$
0307      */
0308     template<typename Tnum> using ome_as_plus_view
0309       = laurent_polynomial_view<Tnum, ome_logm_plus<Tnum>, Tnum, Tnum, Tnum>;
0310 
0311     /**
0312      * @}
0313      */
0314 
0315     /**
0316      * @}
0317      */
0318   }
0319 }
0320 
0321 #endif