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 #include <string>
0010 
0011 namespace apfel
0012 {
0013   /**
0014    * @brief The DoubleExpression class encapsulates in a proper form a
0015    *  two-variable analytic expression in such a way that it can be
0016    *  transformed into an DoubleOperator object. This is meant to be
0017    *  used with the partonic cross sections of processes such as SIDIS
0018    *  and Drell-Yan that require double Mellin convolutions.
0019    * @note For now only zero-mass and forward expressions can be
0020    *  accommodated.
0021    */
0022   class DoubleExpression
0023   {
0024   public:
0025     virtual ~DoubleExpression() = default;
0026 
0027     /**
0028      * @name Constructors
0029      * List of constructors.
0030      */
0031     ///@{
0032     /**
0033      * @brief The "DoubleExpression" constructor
0034      */
0035     DoubleExpression();
0036     ///@}
0037 
0038     /**
0039      * @brief Function that returns a string with the name of the
0040      * class.
0041      */
0042     virtual std::string GetName() const { return "Unspecialised"; }
0043 
0044     /**
0045      * @name DoubleExpression components
0046      * The different possible components of a double expression.
0047      */
0048     ///@{
0049     /**
0050      * @brief Virtual function for the local-local term.
0051      * @return The local-local term at x1 and x2
0052      */
0053     virtual double LocalLocal(double const&, double const&) const { return 0; }
0054 
0055     /**
0056      * @brief Virtual function for the local-singular term.
0057      * @return The local-singular term at x1 and x2
0058      */
0059     virtual double LocalSingular(double const&, double const&) const { return 0; }
0060 
0061     /**
0062      * @brief Virtual function for the local-regular term.
0063      * @return The local-regular term at x1 and x2
0064      */
0065     virtual double LocalRegular(double const&, double const&) const { return 0; }
0066 
0067     /**
0068      * @brief Virtual function for the singular-local term.
0069      * @return The singular-local term at x1 and x2
0070      */
0071     virtual double SingularLocal(double const&, double const&) const { return 0; }
0072 
0073     /**
0074      * @brief Virtual function for the singular-singular term.
0075      * @return The singular-singular term at x1 and x2
0076      */
0077     virtual double SingularSingular(double const&, double const&) const { return 0; }
0078 
0079     /**
0080      * @brief Virtual function for the singular-regular term.
0081      * @return The singular-regular term at x1 and x2
0082      */
0083     virtual double SingularRegular(double const&, double const&) const { return 0; }
0084 
0085     /**
0086      * @brief Virtual function for the regular-local term.
0087      * @return The regular-local term at x1 and x2
0088      */
0089     virtual double RegularLocal(double const&, double const&) const { return 0; }
0090 
0091     /**
0092      * @brief Virtual function for the regular-singular term.
0093      * @return The regular-singular term at x1 and x2
0094      */
0095     virtual double RegularSingular(double const&, double const&) const { return 0; }
0096 
0097     /**
0098      * @brief Virtual function for the regular-regular term.
0099      * @return The regular-regular term at x1 and x2
0100      */
0101     virtual double RegularRegular(double const&, double const&) const { return 0; }
0102     ///@}
0103   };
0104 
0105   /**
0106    * @brief Derived class from DoubleExpression to implement the
0107    * double Identity operator (double delta function).
0108    * @ingroup RecExprs
0109    */
0110   class DoubleIdentity: public DoubleExpression
0111   {
0112   public:
0113     DoubleIdentity(): DoubleExpression() { }
0114     std::string GetName() const override { return "DoubleIdentity"; }
0115     double LocalLocal(double const&, double const&) const override { return 1; }
0116   };
0117 
0118   /**
0119    * @brief Derived class from DoubleExpression to implement the
0120    * double Null operator (double zero).
0121    * @ingroup RecExprs
0122    */
0123   class DoubleNull: public DoubleExpression
0124   {
0125   public:
0126     DoubleNull(): DoubleExpression() { }
0127     std::string GetName() const override { return "DoubleNull"; }
0128   };
0129 }