#include <Basics.h>
Public Member Functions | |
Hist () | |
Default constructor. | |
Hist (string titlein, long nbinin=100, double xminin=0., double xmaxin=1.) | |
Standard constructor. | |
Hist (const Hist &h) | |
Copy constructor. | |
Hist (string titlein, const Hist &h) | |
Copy constructor giving a new title. | |
Hist & | operator= (const Hist &h) |
Assignment operator. | |
void | book (string=" ", long=100, double=0., double=1.) |
(Re-) Book this histogram. | |
void | name (string=" ") |
Set a new name. | |
void | null () |
Reset this histogram. | |
void | fill (double, double=1.) |
Fill histogram. | |
void | table (ostream &=cout) const |
Print histogram to the given stream. | |
bool | sameSize (const Hist &) const |
Check if the given histogram is compatible with this. | |
Hist & | operator+= (const Hist &) |
Add histogram. | |
Hist & | operator-= (const Hist &) |
Subtract histogram. | |
Hist & | operator*= (const Hist &) |
Multiply by histogram (bin-by-bin). | |
Hist & | operator/= (const Hist &) |
Divide by histogram (bin-by-bin). | |
Hist & | operator+= (double) |
Add number to each bin. | |
Hist & | operator-= (double) |
Subtract number from each bin. | |
Hist & | operator*= (double) |
Multiply by number in each bin. | |
Hist & | operator/= (double) |
Divide by number in each bin. | |
Static Public Attributes | |
static long | NLINES |
The maximum number of lines a histogram can use at output. | |
static double | TOLERANCE |
Tolerance in deviation of xmin and xmax between two histograms. | |
static double | TINY |
Small number to avoid division by zero. | |
Private Attributes | |
string | title |
The title. | |
long | nbin |
The number of bins. | |
long | nfill |
The number of times fill() has been called. | |
double | xmin |
the lower cut. | |
double | xmax |
the upper cut. | |
double | dx |
the bin width. | |
double | under |
the underflow bin. | |
double | inside |
the sum of all bins. | |
double | over |
the overflow bin. | |
vector< double > | res |
The bins. | |
Friends | |
Hist | operator+ (double, const Hist &) |
Add number and histogram. | |
Hist | operator+ (const Hist &, double) |
Add number and histogram. | |
Hist | operator+ (const Hist &, const Hist &) |
Add two histograms. | |
Hist | operator- (double, const Hist &) |
Subtraction between number and histogram. | |
Hist | operator- (const Hist &, double) |
Subtraction between number and histogram. | |
Hist | operator- (const Hist &, const Hist &) |
Subtraction between two histograms. | |
Hist | operator* (double, const Hist &) |
Multiply number with histogram (bin-by-bin). | |
Hist | operator* (const Hist &, double) |
Multiply number with histogram (bin-by-bin). | |
Hist | operator* (const Hist &, const Hist &) |
Multiply two histograms (bin-by-bin). | |
Hist | operator/ (double, const Hist &) |
Divide number with histogram (bin-by-bin). | |
Hist | operator/ (const Hist &, double) |
Divide histogram with number (bin-by-bin). | |
Hist | operator/ (const Hist &, const Hist &) |
Divide two histograms (bin-by-bin). | |
ostream & | operator<< (ostream &, const Hist &) |
Standard output operator. | |
void | table (const vector< Hist > &, ostream &=cout) |
Non-member function of table(ostream&). |
Definition at line 179 of file Basics.h.
Pythia7::Shower::Hist::Hist | ( | string | titlein, | |
long | nbinin = 100 , |
|||
double | xminin = 0. , |
|||
double | xmaxin = 1. | |||
) | [inline] |
void Pythia7::Shower::Hist::book | ( | string | = " " , |
|
long | = 100 , |
|||
double | = 0. , |
|||
double | = 1. | |||
) |
void Pythia7::Shower::Hist::table | ( | ostream & | = cout |
) | const |
Print histogram to the given stream.
Print a table of x and y values suitable to be used by programs such as gnuplot.
Hist& Pythia7::Shower::Hist::operator+= | ( | double | ) |
Add number to each bin.
Hist& Pythia7::Shower::Hist::operator-= | ( | double | ) |
Subtract number from each bin.
Hist& Pythia7::Shower::Hist::operator*= | ( | double | ) |
Multiply by number in each bin.
Hist& Pythia7::Shower::Hist::operator/= | ( | double | ) |
Divide by number in each bin.
ostream& operator<< | ( | ostream & | , | |
const Hist & | ||||
) | [friend] |
Standard output operator.
void table | ( | const vector< Hist > & | , | |
ostream & | = cout | |||
) | [friend] |
Non-member function of table(ostream&).
long Pythia7::Shower::Hist::NLINES [static] |
double Pythia7::Shower::Hist::TOLERANCE [static] |
double Pythia7::Shower::Hist::TINY [static] |
string Pythia7::Shower::Hist::title [private] |
long Pythia7::Shower::Hist::nbin [private] |
long Pythia7::Shower::Hist::nfill [private] |
The number of times fill() has been called.
Definition at line 326 of file Basics.h.
Referenced by Hist(), and operator=().
double Pythia7::Shower::Hist::xmin [private] |
double Pythia7::Shower::Hist::xmax [private] |
double Pythia7::Shower::Hist::dx [private] |
double Pythia7::Shower::Hist::under [private] |
double Pythia7::Shower::Hist::inside [private] |
the sum of all bins.
Definition at line 336 of file Basics.h.
Referenced by Hist(), and operator=().
double Pythia7::Shower::Hist::over [private] |
vector<double> Pythia7::Shower::Hist::res [private] |