MathHeader.hh

Go to the documentation of this file.
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 <cmath>
00010 #include <map>
00011 #include <vector>
00012 #include <algorithm>
00013 
00014 
00015 // Macro to help with overzealous compiler warnings
00016 #ifdef UNUSED
00017 #elif defined(__GNUC__)
00018 # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
00019 #elif defined(__LCLINT__)
00020 # define UNUSED(x) /*@unused@*/ x
00021 #else
00022 # define UNUSED(x) x
00023 #endif
00024 
00025 
00026 namespace Rivet {
00027 
00028   using std::string;
00029   using std::ostream;
00030   using std::ostringstream;
00031   using std::cout;
00032   using std::endl;
00033   using std::pair;
00034   using std::vector;
00035   using std::transform;
00036   using std::min;
00037   using std::max;
00038 
00039   const double MAXDOUBLE = std::numeric_limits<double>::max();
00040   const double MAXINT = std::numeric_limits<int>::max();
00041 
00042   /// A pre-defined value of \f$ \pi \f$.
00043   const double PI = M_PI;
00044 
00045   /// A pre-defined value of \f$ 2\pi \f$.
00046   const double TWOPI = 2*M_PI;
00047 
00048   /// A pre-defined value of \f$ \pi/2 \f$.
00049   const double HALFPI = M_PI_2;
00050 
00051   /// Enum for signs of numbers.
00052   enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 };
00053 
00054   /// Enum for longitudinal variable to be used in calculating \f$ R \f$
00055   enum DeltaRScheme { PSEUDORAPIDITY, RAPIDITY };
00056 
00057   /// Enum for range of \f$ \phi \f$ to be mapped into
00058   enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI };
00059 
00060 }
00061 
00062 #endif