Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //
0002 // APFEL++ 2017
0003 //
0004 // Author: Valerio Bertone: valerio.bertone@cern.ch
0005 //
0006 
0007 #pragma once
0008 
0009 namespace apfel
0010 {
0011   /**
0012    * @brief The Expression class encapsulates in a proper form a given
0013    * analytic expression in such a way that it can be transformed into
0014    * an operator.
0015    */
0016   class Expression
0017   {
0018   public:
0019     virtual ~Expression() = default;
0020 
0021     /**
0022      * @name Constructors
0023      * List of constructors.
0024      */
0025     ///@{
0026     /**
0027      * @brief The "Expression" constructor
0028      * @param eta: upper limit of the convolution integral (default: 1)
0029      */
0030     Expression(double const& eta = 1);
0031     ///@}
0032 
0033     /**
0034      * @name Expression components
0035      * The different possible components of an expression.
0036      */
0037     ///@{
0038     /**
0039      * @brief Virtual function for the regular term.
0040      * @return The regular term at x
0041      */
0042     virtual double Regular(double const&) const { return 0; }
0043 
0044     /**
0045      * @brief Virtual function for the singular term.
0046      * @return The singular term at x
0047      */
0048     virtual double Singular(double const&) const { return 0; }
0049 
0050     /**
0051      * @brief Virtual function for the local term.
0052      * @return The local term at x
0053      */
0054     virtual double Local(double const&) const { return 0; }
0055 
0056     /**
0057      * @brief Virtual function for the local term for principal-valued
0058      * integrals a la ERBL with singularity at x = 1,
0059      * i.e. corresponding to the ++-prescription.
0060      * @return The local term for ++-prespribed distributions at x
0061      */
0062     virtual double LocalPP(double const&) const { return 0; }
0063 
0064     /**
0065      * @brief Virtual function for the singular term for
0066      * principal-valued integrals in the DGLAP region (i.e. with pole
0067      * in x in the interval (0,1)).
0068      * @return The singular term for principal-valued distributions at x
0069      */
0070     virtual double SingularPV(double const&) const { return 0; }
0071 
0072     /**
0073      * @brief Virtual function for the local term for principal-valued
0074      * integrals a la DGLAP with singularity in the interval (0,1).
0075      * @return The log-dependent local term for principal-valued
0076      * distributions (this is assumed to be constant).
0077      */
0078     virtual double LocalPV() const { return 0; }
0079 
0080     /**
0081      * @brief Virtual function for the local term for principal-valued
0082      * integrals a la DGLAP with singularity in the interval (0,1)
0083      * with a logarithmic dependence.
0084      * @return The log-dependent local term for principal-valued
0085      * distributions at x.
0086      */
0087     virtual double LocalLogPV(double const&) const { return 0; }
0088     ///@}
0089 
0090     /**
0091      * @brief Function that sets the value of a possible external
0092      * variable.
0093      */
0094     void SetExternalVariable(double const& extvar) const { _extvar = extvar; }
0095 
0096     /**
0097      * @brief Function that returns the value of the scaling parameter
0098      * eta.
0099      */
0100     double eta() const { return _eta; }
0101 
0102   protected:
0103     double mutable _extvar;  //!< External kinematic variable
0104     double const   _eta;     //!< Scaling parameter
0105   };
0106 
0107   /**
0108    * @defgroup RecExprs Recurrent expressions
0109    * Collection of recurrent expressions. This includes the identity
0110    * and the null expressions.
0111    */
0112   ///@{
0113   /**
0114    * @brief Derived class from Expression to implement the Identity
0115    * operator (delta function).
0116    */
0117   class Identity: public Expression
0118   {
0119   public:
0120     Identity(): Expression() { }
0121     double Local(double const&) const { return 1; }
0122   };
0123 
0124   /**
0125    * @brief Derived class from Expression to implement the Null
0126    * operator (zero).
0127    */
0128   class Null: public Expression
0129   {
0130   public:
0131     Null(): Expression() { }
0132   };
0133   ///@}
0134 }