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 <cmath>
0010 #include <vector>
0011 #include <array>
0012 
0013 namespace apfel
0014 {
0015   /**
0016    * @defgroup NumericalConstants Numerical constants
0017    * Collection of numerical constants often used
0018    * in the computations.
0019    */
0020   ///@{
0021   ///@}
0022 
0023   /**
0024    * @defgroup PertOrds Perturbative orders
0025    * Enumerators for the perturbative orders for both fixed order and
0026    * resummation.
0027    * @ingroup NumericalConstants
0028    */
0029   ///@{
0030   enum FixedOrderAccuracy: int {LO = 0, NLO = 1, NNLO = 2, NNNLO = 3, N4LO = 4};
0031   enum LogAccuracy: int {NNNLLp = -3, NNLLp = -2, NLLp = -1, LL = 0, NLL = 1, NNLL = 2, NNNLL = 3, N4LL = 4};
0032   ///@}
0033 
0034   /**
0035    * @defgroup PartonSpecies Partonic species
0036    * Enumerator for distinguishing different partonic species.
0037    * @ingroup NumericalConstants
0038    */
0039   ///@{
0040   enum PartonSpecies: int {UNKNOWN = -1, GLUON = 0, DOWNTYPEQUARK = 1, UPTYPEQUARK = 2, PHOTON = 4, CHARGEDLEPTON = 4, NEUTRINO = 5};
0041   ///@}
0042 
0043   /**
0044    * @defgroup MathConstants Mathematical constants
0045    * Collection of mathematical constants often used in the code.
0046    * @ingroup NumericalConstants
0047    */
0048   ///@{
0049   /**
0050    * @name Small numbers
0051    * @brief Small numbers used for cutoffs, integration accuracies, etc.
0052    */
0053   ///@{
0054   const double eps2  = 1e-2;
0055   const double eps3  = 1e-3;
0056   const double eps4  = 1e-4;
0057   const double eps5  = 1e-5;
0058   const double eps6  = 1e-6;
0059   const double eps7  = 1e-7;
0060   const double eps8  = 1e-8;
0061   const double eps9  = 1e-9;
0062   const double eps10 = 1e-10;
0063   const double eps11 = 1e-11;
0064   const double eps12 = 1e-12;
0065   const double eps13 = 1e-13;
0066   const double eps14 = 1e-14;
0067   const double eps15 = 1e-15;
0068   const double eps25 = 1e-25;
0069   ///@}
0070 
0071   /**
0072    * @name Gauss-Legendre quadrature
0073    * @brief Coordinates and weights of the Gauss-Legendre quadrature
0074    * with 8 and 16-point integration.
0075    */
0076   ///@{
0077   const std::array<std::vector<double>, 2> gl_x =
0078   {
0079     {
0080       std::vector<double>{0.1834346424956498, 0.5255324099163289, 0.7966664774136267, 0.9602898564975362},
0081       std::vector<double>{
0082         0.0950125098376374, 0.2816035507792589, 0.4580167776572273, 0.6178762444026437,
0083         0.7554044083550030, 0.8656312023878317, 0.9445750230732325, 0.9894009349916499
0084       }
0085     }
0086   };
0087   const std::array<std::vector<double>, 2> gl_w =
0088   {
0089     {
0090       std::vector<double>{0.3626837833783619, 0.3137066458778872, 0.2223810344533744, 0.1012285362903762},
0091       std::vector<double>{
0092         0.1894506104550684, 0.1826034150449235, 0.1691565193950025, 0.1495959888165767,
0093         0.1246289712555338, 0.0951585116824927, 0.0622535239386478, 0.0271524594117540
0094       }
0095     }
0096   };
0097   ///@}
0098 
0099   /**
0100    * @name Gauss-Kronrod quadrature
0101    * @brief Coordinates and weights of the Gauss-Kronrod quadrature
0102    * with 7 and 15-point integration.
0103    */
0104   ///@{
0105   const std::array<std::vector<double>, 2> gk_x =
0106   {
0107     {
0108       std::vector<double>{0.0000000000000000e+00, 4.0584515137739717e-01, 7.4153118559939444e-01, 9.4910791234275852e-01},
0109       std::vector<double>{
0110         0.0000000000000000e+00, 2.0778495500789847e-01, 4.0584515137739717e-01, 5.8608723546769113e-01,
0111         7.4153118559939444e-01, 8.6486442335976907e-01, 9.4910791234275852e-01, 9.9145537112081264e-01
0112       }
0113     }
0114   };
0115   const std::array<std::vector<double>, 2> gk_w =
0116   {
0117     {
0118       std::vector<double>{4.1795918367346939e-01, 3.8183005050511894e-01, 2.7970539148927667e-01, 1.2948496616886969e-01},
0119       std::vector<double>{
0120         2.0948214108472783e-01, 2.0443294007529889e-01, 1.9035057806478541e-01, 1.6900472663926790e-01,
0121         1.4065325971552592e-01, 1.0479001032225018e-01, 6.3092092629978553e-02, 2.2935322010529225e-02
0122       }
0123     }
0124   };
0125   ///@}
0126 
0127   /**
0128    * @name Numerical constants
0129    * @brief Definitions for recurrent constants.
0130    */
0131   ///@{
0132   const double Pi2    = M_PI * M_PI;
0133   const double FourPi = 4 * M_PI;
0134   const double emc    = 0.5772156649015329;
0135   const double zeta2  = 1.6449340668482264; // Pi2 / 6;
0136   const double zeta3  = 1.2020569031595943;
0137   const double zeta4  = 1.0823232337111382; // Pi2 * Pi2 / 90;
0138   const double zeta5  = 1.0369277551433699;
0139   const double zeta6  = 1.0173430619844491; // Pi2 * Pi2 * Pi2 / 945
0140   ///@}
0141 
0142   /**
0143    * @name QCD colour factors
0144    * The SU(3) Casimir's.
0145    */
0146   ///@{
0147   const double TR = 0.5;
0148   const double CF = 4. / 3.;
0149   const double CA = 3.;
0150   const double NC = 3.;
0151   ///@}
0152   ///@}
0153 
0154   /**
0155    * @defgroup PhysConstants Physical constants
0156    * Collection of physical constants often used in the code.
0157    * @ingroup NumericalConstants
0158    */
0159   ///@{
0160   /**
0161    * @name Quark charges
0162    * @brief Quark electric charges and their square (it also includes
0163    * sums of charges).
0164    */
0165   ///@{
0166   const double ed  = - 1. / 3.;
0167   const double eu  =   2. / 3.;
0168   const double ed2 =   1. / 9.;
0169   const double eu2 =   4. / 9.;
0170   const std::vector<double> QCh  = {ed,  eu,  ed,  eu,  ed,  eu};
0171   const std::vector<double> QCh2 = {ed2, eu2, ed2, eu2, ed2, eu2};
0172   const std::vector<double> SumCh2 = {0., 1./9., 5./9., 2./3., 10./9., 11./9., 5./3.};
0173   const std::vector<double> SumCh4 = {0., 1./81., 17./81., 18./81., 34./81., 35./81., 51./81.};
0174   ///@}
0175 
0176   /**
0177    * @name Flavour factors required by the N<SUP>3</SUP>LO DIS coefficient functions
0178    * @brief Their definition can be found in Tab. 2 (page 8) of
0179    * https://arxiv.org/pdf/hep-ph/0504242v1.pdf.
0180    */
0181   ///@{
0182   const std::vector<double> fl11ns = {-1, 0.5, 0, 0.5, 0.2, 0.5};
0183   const std::vector<double> fl11sg = {1, 0.1, 0, 0.1, 0.018181818, 0.1};
0184   ///@}
0185 
0186   /**
0187    * @name Conversion factor
0188    * @brief Conversion factor from * GeV<SUP>-2</SUP> to pb taken
0189    * from:
0190    * https://pdg.lbl.gov/2022/reviews/rpp2022-rev-phys-constants.pdf.
0191    */
0192   ///@{
0193   const double ConvFact = 0.3893793721e9;
0194   ///@}
0195 
0196   /**
0197    * @name Z-boson mass and width
0198    * @brief Value of the mass of the Z boson and its width in GeV
0199    * taken from:
0200    * https://pdg.lbl.gov/2023/listings/rpp2023-list-z-boson.pdf.
0201    */
0202   ///@{
0203   const double ZMass  = 91.1876;
0204   const double GammaZ = 2.4955;
0205   ///@}
0206 
0207   /**
0208    * @name W-boson mass and width
0209    * @brief Value of the mass of the W bosons and their width in GeV
0210    * taken from:
0211    * https://pdg.lbl.gov/2023/listings/rpp2023-list-w-boson.pdf.
0212    */
0213   ///@{
0214   const double WMass  = 80.377;
0215   const double GammaW = 2.085;
0216   ///@}
0217 
0218   /**
0219    * @name Proton mass
0220    * @brief Value of the mass of the proton in GeV taken from:
0221    * https://pdg.lbl.gov/2022/reviews/rpp2022-rev-phys-constants.pdf.
0222    */
0223   ///@{
0224   const double ProtonMass = 0.93827208816;
0225   ///@}
0226 
0227   /**
0228    * @name Weinberg angle
0229    * @brief Value of sin<SUP>2</SUP>&theta;<SUB>W</SUB> in the MSbar
0230    * scheme taken from:
0231    * https://pdg.lbl.gov/2022/reviews/rpp2022-rev-phys-constants.pdf.
0232    */
0233   ///@{
0234   const double Sin2ThetaW = 0.23121;
0235   ///@}
0236 
0237   /**
0238    * @name Fermi constant
0239    * @brief Value of G<SUB>F</SUB> in GeV<SUP>-2</SUP> taken from:
0240    * https://pdg.lbl.gov/2022/reviews/rpp2022-rev-phys-constants.pdf.
0241    */
0242   ///@{
0243   const double GFermi = 1.1663788e-5;
0244   ///@}
0245 
0246   /**
0247    * @name Fermi constant
0248    * @brief Value of G<SUB>F</SUB> in GeV<SUP>-2</SUP> taken from:
0249    * https://pdg.lbl.gov/2022/reviews/rpp2022-rev-phys-constants.pdf.
0250    */
0251   ///@{
0252   const double alphaem = 7.2973525693e-3;
0253   ///@}
0254 
0255   /**
0256    * @name CKM matrix elements
0257    * @brief Absolute value of the CMK matrix elements and their square
0258    * taken from:
0259    * http://pdg.lbl.gov/2018/reviews/rpp2018-rev-ckm-matrix.pdf.
0260    */
0261   ///@{
0262   const double Vud  = 0.97446;
0263   const double Vus  = 0.22452;
0264   const double Vub  = 0.00365;
0265   const double Vcd  = 0.22438;
0266   const double Vcs  = 0.97359;
0267   const double Vcb  = 0.04214;
0268   const double Vtd  = 0.00896;
0269   const double Vts  = 0.04133;
0270   const double Vtb  = 0.999105;
0271   const double Vud2 = Vud * Vud;
0272   const double Vus2 = Vus * Vus;
0273   const double Vub2 = Vub * Vub;
0274   const double Vcd2 = Vcd * Vcd;
0275   const double Vcs2 = Vcs * Vcs;
0276   const double Vcb2 = Vcb * Vcb;
0277   const double Vtd2 = Vtd * Vtd;
0278   const double Vts2 = Vts * Vts;
0279   const double Vtb2 = Vtb * Vtb;
0280   const std::vector<double> CKM  = {Vud,  Vus,  Vub,  Vcd,  Vcs,  Vcb,  Vtd,  Vts,  Vtb};
0281   const std::vector<double> CKM2 = {Vud2, Vus2, Vub2, Vcd2, Vcs2, Vcb2, Vtd2, Vts2, Vtb2};
0282   ///@}
0283   ///@}
0284 }