Rivet  1.8.0
MathHeader.hh
1 #ifndef RIVET_Math_MathHeader
2 #define RIVET_Math_MathHeader
3 
4 #include <stdexcept>
5 #include <string>
6 #include <ostream>
7 #include <sstream>
8 #include <iostream>
9 #include <limits>
10 #include <cmath>
11 #include <map>
12 #include <vector>
13 #include <algorithm>
14 
15 
16 // Macro to help with overzealous compiler warnings
17 #ifdef UNUSED
18 #elif defined(__GNUC__)
19 # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
20 #elif defined(__LCLINT__)
21 # define UNUSED(x) /*@unused@*/ x
22 #else
23 # define UNUSED(x) x
24 #endif
25 
26 
27 namespace Rivet {
28 
29  using std::string;
30  using std::ostream;
31  using std::ostringstream;
32  using std::cout;
33  using std::endl;
34  using std::pair;
35  using std::vector;
36  using std::transform;
37  using std::min;
38  using std::max;
39  using std::abs;
40  using std::isnan;
41  using std::isinf;
42 
43  const double MAXDOUBLE = std::numeric_limits<double>::max();
44  const double MAXINT = std::numeric_limits<int>::max();
45 
47  const double PI = M_PI;
48 
50  const double TWOPI = 2*M_PI;
51 
53  const double HALFPI = M_PI_2;
54 
56  enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 };
57 
59  enum RapScheme { PSEUDORAPIDITY = 0, ETA = 0, RAPIDITY = 1, YRAP = 1 };
60 
62  enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI };
63 
64 }
65 
66 #endif