Rivet
1.8.0
|
00001 #ifndef RIVET_Math_MathHeader 00002 #define RIVET_Math_MathHeader 00003 00004 #include <stdexcept> 00005 #include <string> 00006 #include <ostream> 00007 #include <sstream> 00008 #include <iostream> 00009 #include <limits> 00010 #include <cmath> 00011 #include <map> 00012 #include <vector> 00013 #include <algorithm> 00014 00015 00016 // Macro to help with overzealous compiler warnings 00017 #ifdef UNUSED 00018 #elif defined(__GNUC__) 00019 # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) 00020 #elif defined(__LCLINT__) 00021 # define UNUSED(x) /*@unused@*/ x 00022 #else 00023 # define UNUSED(x) x 00024 #endif 00025 00026 00027 namespace Rivet { 00028 00029 using std::string; 00030 using std::ostream; 00031 using std::ostringstream; 00032 using std::cout; 00033 using std::endl; 00034 using std::pair; 00035 using std::vector; 00036 using std::transform; 00037 using std::min; 00038 using std::max; 00039 using std::abs; 00040 using std::isnan; 00041 using std::isinf; 00042 00043 const double MAXDOUBLE = std::numeric_limits<double>::max(); 00044 const double MAXINT = std::numeric_limits<int>::max(); 00045 00047 const double PI = M_PI; 00048 00050 const double TWOPI = 2*M_PI; 00051 00053 const double HALFPI = M_PI_2; 00054 00056 enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 }; 00057 00059 enum RapScheme { PSEUDORAPIDITY = 0, ETA = 0, RAPIDITY = 1, YRAP = 1 }; 00060 00062 enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI }; 00063 00064 } 00065 00066 #endif