Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:19

0001 // -*- C++ -*-
0002 //
0003 // Constants.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef ThePEG_Constants_H
0010 #define ThePEG_Constants_H
0011 
0012 // This file defines a number of useful constants, placed in the
0013 // namespace <!id>ThePEG::Constants<!!id>.
0014 
0015 #include "Unitsystem.h"
0016 #include <cmath>
0017 #include <cfloat>
0018 
0019 namespace ThePEG {
0020 
0021 /**
0022  * The Constants namespace containing some useful physical constants
0023  * with suitable units.
0024  */
0025 namespace Constants {
0026 
0027 using namespace ThePEG::Units;
0028 
0029 /** A really large length. */
0030 constexpr Length MaxLength = 1.0e23_mm;
0031 
0032 /** A really large energy. */
0033 constexpr Energy MaxEnergy = 1.0e6_GeV;
0034 
0035 /** A really large squared energy. */
0036 constexpr Energy2 MaxEnergy2 = MaxEnergy * MaxEnergy;
0037 
0038 /** The largest possible double. */
0039 constexpr double MaxDouble = DBL_MAX;
0040 
0041 /** A really large double. */
0042 constexpr double HugeDouble = DBL_MAX * 1.0e-4;
0043 
0044 /** The largest possible float. */
0045 constexpr double MaxFloat = FLT_MAX;
0046 
0047 /** A really large floa.t */
0048 constexpr double HugeFloat = FLT_MAX * 0.01;
0049 
0050 /** A really large rapidity */
0051 constexpr double MaxRapidity = 100.0;
0052 
0053 /** Good old \f$\pi\f$. */
0054 constexpr double pi    = M_PI;
0055 
0056 /** Good old \f$2\pi\f$. */
0057 constexpr double twopi = 2.0 * pi;
0058 
0059 /** A really large integer */
0060 constexpr long MaxInt = 1000000000L;
0061 
0062 /** The smallest non-zero double. */
0063 constexpr double epsilon = DBL_EPSILON;
0064 
0065 /** The Euler gamma */
0066 constexpr double EulerGamma = 0.5772156649015329;
0067 
0068 /** \f$\zeta(2)\f$. */
0069 constexpr double zeta2 = pi*pi/6.;
0070 
0071 /** \f$\zeta(3)\f$. */
0072 constexpr double zeta3 = 1.2020569031595943;
0073 
0074 /** \f$\zeta(4)\f$. */
0075 constexpr double zeta4 = 0.4*zeta2*zeta2;
0076 
0077 /** \f$\zeta(5)\f$. */
0078 constexpr double zeta5 = 1.0369277551433699;
0079 
0080 /** \f$\zeta(6)\f$. */
0081 constexpr double zeta6 = 4.*zeta2*zeta4/7.;
0082 }
0083 
0084 }
0085 
0086 #endif /* ThePEG_Constants_H */