]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8130/include/PythiaStdlib.h
using option '-treename HLTesdTree' for EsdCollector, adding default parameter for...
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8130 / include / PythiaStdlib.h
CommitLineData
5ad4eb21 1// PythiaStdlib.h is a part of the PYTHIA event generator.
2// Copyright (C) 2008 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).
8
9#ifndef Pythia8_PythiaStdlib_H
10#define Pythia8_PythiaStdlib_H
11
12// Stdlib header files for mathematics.
13#include <cmath>
14#include <cstdlib>
15
16// Stdlib header files for strings and containers.
17#include <string>
18#include <vector>
19#include <map>
20
21// Stdlib header file for input and output.
22#include <iostream>
23#include <iomanip>
24#include <fstream>
25#include <sstream>
26
27// Define pi if not yet done.
28#ifndef M_PI
29#define M_PI 3.1415926535897932385
30#endif
31
32// By this declaration you do not need to use std:: qualifier everywhere.
33using namespace std;
34
35// Alternatively you can specify exactly which std:: methods will be used.
36/*
37namespace Pythia8 {
38// Generic utilities and mathematical functions.
39using std::swap;
40using std::max;
41using std::min;
42using std::abs;
43// Strings and containers.
44using std::string;
45using std::vector;
46using std::map;
47// Input/output streams.
48using std::cin;
49using std::cout;
50using std::cerr;
51using std::istream;
52using std::ostream;
53using std::ifstream;
54using std::ofstream;
55using std::istringstream;
56using std::ostringstream;
57// Input/output formatting.
58using std::endl;
59using std::fixed;
60using std::scientific;
61using std::left;
62using std::right;
63using std::setw;
64using std::setprecision;
65} // end namespace Pythia8
66*/
67
68namespace Pythia8 {
69
70// Powers of small integers - for balance speed/code clarity.
71inline double pow2(const double& x) {return x*x;}
72inline double pow3(const double& x) {return x*x*x;}
73inline double pow4(const double& x) {return x*x*x*x;}
74inline double pow5(const double& x) {return x*x*x*x*x;}
75inline double pow6(const double& x) {return x*x*x*x*x*x;}
76
77// Avoid problem with negative square root argument (from roundoff).
78inline double sqrtpos(const double& x) {return sqrt( max( 0., x));}
79
80} // end namespace Pythia8
81
82#endif // Pythia8_PythiaStdlib_H