Rivet  1.8.3
MathHeader.hh
1 #ifndef RIVET_Math_MathHeader
2 #define RIVET_Math_MathHeader
3 
4 #include "Rivet/Exceptions.hh"
5 #include <stdexcept>
6 #include <string>
7 #include <ostream>
8 #include <sstream>
9 #include <iostream>
10 #include <limits>
11 #include <cmath>
12 #include <map>
13 #include <vector>
14 #include <algorithm>
15 
16 
17 // Macro to help with overzealous compiler warnings
18 #ifdef UNUSED
19 #elif defined(__GNUC__)
20 # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
21 #elif defined(__LCLINT__)
22 # define UNUSED(x) /*@unused@*/ x
23 #else
24 # define UNUSED(x) x
25 #endif
26 
27 
28 namespace Rivet {
29 
30  using std::string;
31  using std::ostream;
32  using std::ostringstream;
33  using std::cout;
34  using std::endl;
35  using std::pair;
36  using std::vector;
37  using std::transform;
38  using std::min;
39  using std::max;
40  using std::abs;
41  using std::isnan;
42  using std::isinf;
43 
44  const double MAXDOUBLE = std::numeric_limits<double>::max();
45  const double MAXINT = std::numeric_limits<int>::max();
46 
48  const double PI = M_PI;
49 
51  const double TWOPI = 2*M_PI;
52 
54  const double HALFPI = M_PI_2;
55 
57  enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 };
58 
60  enum RapScheme { PSEUDORAPIDITY = 0, ETA = 0, RAPIDITY = 1, YRAP = 1 };
61 
63  enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI, ZERO_PI };
64 
65 }
66 
67 #endif
Definition: MC_JetAnalysis.hh:9
Sign
Enum for signs of numbers.
Definition: MathHeader.hh:57
const double PI
A pre-defined value of .
Definition: MathHeader.hh:48
const double HALFPI
A pre-defined value of .
Definition: MathHeader.hh:54
PhiMapping
Enum for range of to be mapped into.
Definition: MathHeader.hh:63
const double TWOPI
A pre-defined value of .
Definition: MathHeader.hh:51
RapScheme
Enum for rapidity variable to be used in calculating , applying rapidity cuts, etc.
Definition: MathHeader.hh:60