Pythia7::Shower::Hist Class Reference

Simple histogram class to be used internally in the Pythia7 Shower classes for testing purposes. More...

#include <Basics.h>

List of all members.

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.
Histoperator= (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.
Histoperator+= (const Hist &)
 Add histogram.
Histoperator-= (const Hist &)
 Subtract histogram.
Histoperator*= (const Hist &)
 Multiply by histogram (bin-by-bin).
Histoperator/= (const Hist &)
 Divide by histogram (bin-by-bin).
Histoperator+= (double)
 Add number to each bin.
Histoperator-= (double)
 Subtract number from each bin.
Histoperator*= (double)
 Multiply by number in each bin.
Histoperator/= (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&).


Detailed Description

Simple histogram class to be used internally in the Pythia7 Shower classes for testing purposes.

Definition at line 179 of file Basics.h.


Constructor & Destructor Documentation

Pythia7::Shower::Hist::Hist ( string  titlein,
long  nbinin = 100,
double  xminin = 0.,
double  xmaxin = 1. 
) [inline]

Standard constructor.

Parameters:
titlein the title of the histogram.
nbinin the number of bins.
xminin the lower edge of the histogram.
xmaxin the upper edge of the histogram

Definition at line 204 of file Basics.h.

References book().


Member Function Documentation

void Pythia7::Shower::Hist::book ( string  = "  ",
long  = 100,
double  = 0.,
double  = 1. 
)

(Re-) Book this histogram.

(Same parameters as in the Standard constructor)

Referenced by Hist().

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+= ( const Hist  ) 

Add histogram.

Hist& Pythia7::Shower::Hist::operator-= ( const Hist  ) 

Subtract histogram.

Hist& Pythia7::Shower::Hist::operator*= ( const Hist  ) 

Multiply by histogram (bin-by-bin).

Hist& Pythia7::Shower::Hist::operator/= ( const Hist  ) 

Divide by histogram (bin-by-bin).

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.


Friends And Related Function Documentation

Hist operator+ ( double  ,
const Hist  
) [friend]

Add number and histogram.

Hist operator+ ( const Hist ,
double   
) [friend]

Add number and histogram.

Hist operator+ ( const Hist ,
const Hist  
) [friend]

Add two histograms.

Hist operator- ( double  ,
const Hist  
) [friend]

Subtraction between number and histogram.

Hist operator- ( const Hist ,
double   
) [friend]

Subtraction between number and histogram.

Hist operator- ( const Hist ,
const Hist  
) [friend]

Subtraction between two histograms.

Hist operator* ( double  ,
const Hist  
) [friend]

Multiply number with histogram (bin-by-bin).

Hist operator* ( const Hist ,
double   
) [friend]

Multiply number with histogram (bin-by-bin).

Hist operator* ( const Hist ,
const Hist  
) [friend]

Multiply two histograms (bin-by-bin).

Hist operator/ ( double  ,
const Hist  
) [friend]

Divide number with histogram (bin-by-bin).

Hist operator/ ( const Hist ,
double   
) [friend]

Divide histogram with number (bin-by-bin).

Hist operator/ ( const Hist ,
const Hist  
) [friend]

Divide two histograms (bin-by-bin).

ostream& operator<< ( ostream &  ,
const Hist  
) [friend]

Standard output operator.

void table ( const vector< Hist > &  ,
ostream &  = cout 
) [friend]

Non-member function of table(ostream&).


Member Data Documentation

The maximum number of lines a histogram can use at output.

Definition at line 184 of file Basics.h.

Tolerance in deviation of xmin and xmax between two histograms.

Definition at line 187 of file Basics.h.

double Pythia7::Shower::Hist::TINY [static]

Small number to avoid division by zero.

Definition at line 190 of file Basics.h.

string Pythia7::Shower::Hist::title [private]

The title.

Definition at line 322 of file Basics.h.

Referenced by Hist().

The number of bins.

Definition at line 324 of file Basics.h.

Referenced by Hist(), and operator=().

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]

the lower cut.

Definition at line 328 of file Basics.h.

Referenced by Hist(), and operator=().

double Pythia7::Shower::Hist::xmax [private]

the upper cut.

Definition at line 330 of file Basics.h.

Referenced by Hist(), and operator=().

double Pythia7::Shower::Hist::dx [private]

the bin width.

Definition at line 332 of file Basics.h.

Referenced by Hist(), and operator=().

double Pythia7::Shower::Hist::under [private]

the underflow bin.

Definition at line 334 of file Basics.h.

Referenced by Hist(), and operator=().

the sum of all bins.

Definition at line 336 of file Basics.h.

Referenced by Hist(), and operator=().

double Pythia7::Shower::Hist::over [private]

the overflow bin.

Definition at line 338 of file Basics.h.

Referenced by Hist(), and operator=().

vector<double> Pythia7::Shower::Hist::res [private]

The bins.

Definition at line 340 of file Basics.h.

Referenced by Hist(), and operator=().


The documentation for this class was generated from the following file:

Generated on Thu Apr 29 12:45:35 2010 for Pythia7 by  doxygen 1.5.5