source: HiSusy/trunk/Pythia8/pythia8170/include/PythiaStdlib.h @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

File size: 2.3 KB
Line 
1// PythiaStdlib.h is a part of the PYTHIA event generator.
2// Copyright (C) 2012 Torbjorn Sjostrand.
3// PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4// Please respect the MCnet Guidelines, see GUIDELINES for details.
5
6// Header file for functionality pulled in from Stdlib,
7// plus a few useful utilities (small powers; positive square root,
8// Gamma function).
9
10#ifndef Pythia8_PythiaStdlib_H
11#define Pythia8_PythiaStdlib_H
12
13// Stdlib header files for mathematics.
14#include <cmath>
15#include <cstdlib>
16
17// Stdlib header files for strings and containers.
18#include <string>
19#include <vector>
20#include <map>
21#include <deque>
22#include <set>
23
24// Stdlib header file for input and output.
25#include <iostream>
26#include <iomanip>
27#include <fstream>
28#include <sstream>
29
30// Define pi if not yet done.
31#ifndef M_PI
32#define M_PI 3.1415926535897932385
33#endif
34
35// By this declaration you do not need to use std:: qualifier everywhere.
36using namespace std;
37
38// Alternatively you can specify exactly which std:: methods will be used.
39/*
40namespace Pythia8 {
41// Generic utilities and mathematical functions.
42using std::swap;
43using std::max;
44using std::min;
45using std::abs;
46// Strings and containers.
47using std::string;
48using std::vector;
49using std::map;
50using std::deque;
51// Input/output streams.
52using std::cin;
53using std::cout;
54using std::cerr;
55using std::istream;
56using std::ostream;
57using std::ifstream;
58using std::ofstream;
59using std::istringstream;
60using std::ostringstream;
61// Input/output formatting.
62using std::endl;
63using std::fixed;
64using std::scientific;
65using std::left;
66using std::right;
67using std::setw;
68using std::setprecision;
69} // end namespace Pythia8
70*/
71
72namespace Pythia8 {
73
74// Powers of small integers - for balance speed/code clarity.
75inline double pow2(const double& x) {return x*x;}
76inline double pow3(const double& x) {return x*x*x;}
77inline double pow4(const double& x) {return x*x*x*x;}
78inline double pow5(const double& x) {return x*x*x*x*x;}
79inline double pow6(const double& x) {return x*x*x*x*x*x;}
80
81// Avoid problem with negative square root argument (from roundoff).
82inline double sqrtpos(const double& x) {return sqrt( max( 0., x));}
83
84// The Gamma function for real argument.
85double GammaReal(double x);
86
87} // end namespace Pythia8
88
89#endif // Pythia8_PythiaStdlib_H
Note: See TracBrowser for help on using the repository browser.