MathHeader.hh
Go to the documentation of this file.
00001 #ifndef RIVET_Math_MathHeader 00002 #define RIVET_Math_MathHeader 00003 00004 #include "Rivet/Exceptions.hh" 00005 #include <stdexcept> 00006 #include <string> 00007 #include <ostream> 00008 #include <sstream> 00009 #include <iostream> 00010 #include <limits> 00011 #include <cmath> 00012 #include <map> 00013 #include <vector> 00014 #include <algorithm> 00015 00016 00017 // Macro to help with overzealous compiler warnings 00018 #ifdef UNUSED 00019 #elif defined(__GNUC__) 00020 # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) 00021 #elif defined(__LCLINT__) 00022 # define UNUSED(x) /*@unused@*/ x 00023 #else 00024 # define UNUSED(x) x 00025 #endif 00026 00027 00028 namespace Rivet { 00029 00030 using std::string; 00031 using std::ostream; 00032 using std::ostringstream; 00033 using std::cout; 00034 using std::endl; 00035 using std::pair; 00036 using std::vector; 00037 using std::transform; 00038 using std::min; 00039 using std::max; 00040 using std::abs; 00041 using std::isnan; 00042 using std::isinf; 00043 00044 const double MAXDOUBLE = std::numeric_limits<double>::max(); 00045 const double MAXINT = std::numeric_limits<int>::max(); 00046 00047 /// A pre-defined value of \f$ \pi \f$. 00048 const double PI = M_PI; 00049 00050 /// A pre-defined value of \f$ 2\pi \f$. 00051 const double TWOPI = 2*M_PI; 00052 00053 /// A pre-defined value of \f$ \pi/2 \f$. 00054 const double HALFPI = M_PI_2; 00055 00056 /// Enum for signs of numbers. 00057 enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 }; 00058 00059 /// Enum for rapidity variable to be used in calculating \f$ R \f$, applying rapidity cuts, etc. 00060 enum RapScheme { PSEUDORAPIDITY = 0, ETARAP = 0, RAPIDITY = 1, YRAP = 1 }; 00061 00062 /// Enum for range of \f$ \phi \f$ to be mapped into 00063 enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI, ZERO_PI }; 00064 00065 } 00066 00067 #endif Generated on Fri Oct 25 2013 12:41:46 for The Rivet MC analysis system by ![]() |