rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.2
MathConstants.hh
1#ifndef RIVET_Math_MathConstants
2#define RIVET_Math_MathConstants
3
4#include "Rivet/Tools/Exceptions.hh"
5#include "Rivet/Tools/Utils.hh"
6#include <cmath>
7
8namespace Rivet {
9
10
13 constexpr double PI = M_PI;
14
16 constexpr double TWOPI = 2*M_PI;
17
19 constexpr double HALFPI = M_PI_2;
20
22 constexpr double SQRT2 = M_SQRT2;
23
25 constexpr double SQRTPI = 2 / M_2_SQRTPI;
26
27 // /// A pre-defined value of \f$ \sqrt{2\pi} \f$.
28 // constexpr double SQRT2PI = SQRT2 * SQRTPI;
29
33 constexpr double INFF = HUGE_VALF;
34 constexpr double INF = HUGE_VAL;
35 constexpr double INFL = HUGE_VALL;
36
37 // Other useful predefined values already exist in C++, e.g.:
38 // DBL_MAX
39 // NAN
40
41
43 enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 };
44
46 enum RapScheme { PSEUDORAPIDITY = 0, ETARAP = 0, RAPIDITY = 1, YRAP = 1 };
47
49 enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI, ZERO_PI };
50
51}
52
53#endif
Definition MC_CENT_PPB_Projections.hh:10
constexpr double HALFPI
A pre-defined value of .
Definition MathConstants.hh:19
PhiMapping
Enum for range of to be mapped into.
Definition MathConstants.hh:49
constexpr double INFF
Pre-defined values of .
Definition MathConstants.hh:33
constexpr double TWOPI
A pre-defined value of .
Definition MathConstants.hh:16
constexpr double SQRTPI
A pre-defined value of .
Definition MathConstants.hh:25
RapScheme
Enum for rapidity variable to be used in calculating , applying rapidity cuts, etc.
Definition MathConstants.hh:46
constexpr double PI
Definition MathConstants.hh:13
constexpr double SQRT2
A pre-defined value of .
Definition MathConstants.hh:22
Sign
Enum for signs of numbers.
Definition MathConstants.hh:43