Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:25:32

0001 // This -*- C++ -*- header file defines the generic interface between
0002 // Ninja and libraries of Master Integrals.  Ninja already provides an
0003 // interface to the OneLoop library (used by default, adding an
0004 // internal cache of computed integrals) and the LoopTools library.
0005 // The abstract class IntegralLibrary allows to interface other
0006 // libraries defined by the user.
0007 
0008 
0009 #ifndef NINJA_INTEGRAL_LIBRARY_HH
0010 #define NINJA_INTEGRAL_LIBRARY_HH
0011 
0012 #include <ninja/types.hh>
0013 
0014 namespace ninja {
0015 
0016   // IntegralLibrary is an abstract base class which provides a
0017   // generic interface to Intergral Libraries.  In order to implement
0018   // this interface, the user must create a derived class which
0019   // implements all the methods bewteen the two comments starting with
0020   // '***'.  Other methods can also be overloaded but they are not
0021   // mandatory, since default definitions are provided.
0022   //
0023   // The arguments of each method are the internal masses m1, m2, ...
0024   // and the invariants s[i,j] defined as:
0025   //
0026   //   s[i,j] = (vi[i]-vi[j])^2
0027   //
0028   // where vi[i] is the internal momentum of the i-th loop denominator
0029   //
0030   //   Denom[i] = (q+vi[i])^2 - m[i]^2.
0031   //
0032   // Note that s[i,j] coincide with the definition of the S-matrix
0033   // defined in <ninja/s_math.hh>.
0034   class IntegralLibrary {
0035   public:
0036 
0037     // *** BEGIN of declarations of methods which _must_ be overloaded
0038 
0039     // This method is called by the method Amplitude::evaluate for
0040     // every integrand, before computing the first needed Master
0041     // Integral.  It is supposed to set the renormalization scale
0042     // mu_R^2 to be used in subsequent calls of the integral library,
0043     // and perform any other intialization that the library might need
0044     // (e.g. setting IR thresholds, etc...).
0045     virtual void init(Real muRsq) = 0;
0046 
0047     // 4-point MIs
0048     // - real masses
0049     virtual void getBoxIntegralRM(Complex rslt[3],
0050                                   Real s21, Real s32, Real s43,
0051                                   Real s14, Real s31, Real s42,
0052                                   Real m1sq, Real m2sq,
0053                                   Real m3sq, Real m4sq) = 0;
0054     // - complex masses
0055     virtual void getBoxIntegralCM(Complex rslt[3],
0056                                   Real s21, Real s32, Real s43,
0057                                   Real s14, Real s31, Real s42,
0058                                   const Complex & m1sq, const Complex & m2sq,
0059                                   const Complex & m3sq, const Complex & m4sq)
0060     = 0;
0061   
0062     // 3-point MIs
0063     // - real massses
0064     virtual void getTriangleIntegralRM(Complex rslt[3],
0065                                        Real s21, Real s32, Real s13,
0066                                        Real m1sq, Real m2sq, Real m3sq) = 0;
0067     // - complex massses
0068     virtual void getTriangleIntegralCM(Complex rslt[3],
0069                                        Real s21, Real s32, Real s13,
0070                                        const Complex & m1sq,
0071                                        const Complex & m2sq,
0072                                        const Complex & m3sq) = 0;
0073   
0074     // scalar 2-point MIs
0075     // - real masses
0076     virtual void getBubbleIntegralRM(Complex rslt[3],
0077                                      Real s21, Real m1sq, Real m2sq) = 0;
0078     // - complex massses
0079     virtual void getBubbleIntegralCM(Complex rslt[3],
0080                                      Real s21,
0081                                      const Complex & m1sq,
0082                                      const Complex & m2sq) = 0;
0083 
0084     // rank-2 2-point MIs
0085     // - real masses
0086     virtual void getRank2BubbleIntegralRM(Complex b11[3],
0087                                           Complex b1[3], Complex b0[3],
0088                                           Real s21, Real m1sq, Real m2sq) = 0;
0089     // - complex massses
0090     virtual void getRank2BubbleIntegralCM(Complex b11[3],
0091                                           Complex b1[3], Complex b0[3],
0092                                           Real s21,
0093                                           const Complex & m1sq,
0094                                           const Complex & m2sq) = 0;
0095 
0096 
0097     // 1-point MIs
0098     virtual void getTadpoleIntegralRM(Complex rslt[3], Real m0sq) = 0;
0099     virtual void getTadpoleIntegralCM(Complex rslt[3],
0100                                       const Complex & m0sq) = 0;
0101 
0102     // *** END of declarations of methods which _must_ be overloaded
0103 
0104 
0105     // The following methods can -- but do not need to -- be
0106     // overloaded by an implementation of the IntegralLibrary.
0107 
0108 
0109     // This method is called by the method Amplitude::evaluate after
0110     // every Master Integral is computed for the given integrand.  The
0111     // default implementation is trivial, but a non-trivial
0112     // implementation might be needed in some cases.
0113     virtual void exit() {}
0114 
0115 
0116     // 2-point integrals of rank 3.  Ninja provides a default
0117     // implementation of these in terms of lower rank integrals.
0118     // - real masses
0119     virtual void getRank3BubbleIntegralRM(Complex b111[3], Complex b11[3],
0120                                           Complex b1[3], Complex b0[3],
0121                                           Real s21,
0122                                           Real m1sq, Real m2sq);
0123     // - complex masses
0124     virtual void getRank3BubbleIntegralCM(Complex b111[3], Complex b11[3],
0125                                           Complex b1[3], Complex b0[3],
0126                                           Real s21,
0127                                           const Complex & m1sq,
0128                                           const Complex & m2sq);
0129 
0130 
0131     // MIs with massless loop propagators.  Ninja provides a default
0132     // implementation of these in terms of Master Integrals with real
0133     // internal masses (set numerically to zero).
0134     virtual void getBoxIntegralNM(Complex rslt[3],
0135                                   Real s21, Real s32, Real s43,
0136                                   Real s14, Real s31, Real s42);
0137     virtual void getTriangleIntegralNM(Complex rslt[3],
0138                                        Real s21, Real s32, Real s13);
0139     virtual void getBubbleIntegralNM(Complex rslt[3],
0140                                      Real s21);
0141     virtual void getRank2BubbleIntegralNM(Complex b11[3],
0142                                           Complex b1[3], Complex b0[3],
0143                                           Real s21);
0144     virtual void getRank3BubbleIntegralNM(Complex b111[3], Complex b11[3],
0145                                           Complex b1[3], Complex b0[3],
0146                                           Real s21);
0147     virtual void getTadpoleIntegralNM(Complex rslt[3]);
0148 
0149 
0150     // this is not used at the moment
0151     virtual bool requiresOrderedCalls()
0152     {
0153       return false;
0154     }
0155 
0156 
0157     virtual ~IntegralLibrary() {}
0158 
0159   }; // class IntegralLibrary
0160 
0161 } // namespace ninja
0162 
0163 #endif // NINJA_MASTER_INTEGRALS_HH