RAIDA  1.9.0
Public Member Functions | Friends | List of all members
AIDA::IHistogram1DROOT Class Reference

class IAxis; More...

#include <IHistogram1DROOT.h>

Inheritance diagram for AIDA::IHistogram1DROOT:
AIDA::IHistogram1D AIDA::IHistogram AIDA::IBaseHistogram

Public Member Functions

virtual ~IHistogram1DROOT ()
 Destructor.
 
 IHistogram1DROOT (const std::string &name, const std::string &title, int nBins, double lowerEdge, double upperEdge, const std::string &options="")
 
 IHistogram1DROOT (const std::string &name, const std::string &title, const std::vector< double > &binEdges, const std::string &options="")
 
 IHistogram1DROOT (const std::string &name, const IHistogram1DROOT &hist)
 
 IHistogram1DROOT (const std::string &name, const IHistogram2DROOT &hist, char axis, int lowerBin=-2, int upperBin=-1)
 
virtual bool fill (double x, double weight=1.)
 Fill the IHistogram1D with a value and the corresponding weight. More...
 
virtual double binMean (int index) const
 The weighted mean of a bin. More...
 
virtual std::string title () const
 Get the Histogram's title. More...
 
virtual bool setTitle (const std::string &title)
 Set the histogram title. More...
 
virtual bool setName (const std::string &name)
 
virtual int dimension () const
 Get the Histogram's dimension. More...
 
virtual bool reset ()
 Reset the Histogram; as if just created. More...
 
virtual int entries () const
 Get the number of in-range entries in the Histogram. More...
 
virtual int allEntries () const
 Sum of the entries in all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW. More...
 
virtual int extraEntries () const
 Number of entries in the UNDERFLOW and OVERFLOW bins. More...
 
virtual double sumBinHeights () const
 Sum of in-range bin heights in the IHistogram, UNDERFLOW and OVERFLOW bins are excluded. More...
 
virtual double sumAllBinHeights () const
 Sum of the heights of all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW. More...
 
virtual double sumExtraBinHeights () const
 Sum of heights in the UNDERFLOW and OVERFLOW bins. More...
 
virtual double minBinHeight () const
 Minimum height of the in-range bins, i.e. More...
 
virtual double maxBinHeight () const
 Maximum height of the in-range bins, i.e. More...
 
virtual bool scale (double scaleFactor)
 Scale the weights and the errors of all the IHistogram's bins (in-range and out-of-range ones) by a given scale factor. More...
 
virtual int binEntries (int index) const
 The weighted mean of a bin. More...
 
virtual double binHeight (int index) const
 Total height of the corresponding bin (ie the sum of the weights in this bin). More...
 
virtual double binError (int index) const
 The error of a given bin. More...
 
virtual double mean () const
 The mean of the whole IHistogram1D. More...
 
virtual double rms () const
 The RMS of the whole IHistogram1D. More...
 
virtual const IAxisaxis () const
 Get the x axis of the IHistogram1D. More...
 
virtual int coordToIndex (double coord) const
 Get the bin number corresponding to a given coordinate along the x axis. More...
 
virtual bool add (const IHistogram1D &hist)
 Add to this IHistogram1D the contents of another IHistogram1D. More...
 
virtual bool subtract (const IHistogram1D &hist)
 
virtual bool multiply (const IHistogram1D &hist)
 
virtual bool divide (const IHistogram1D &hist)
 
virtual void printContents () const
 Print out the contents of a histogram to the screen. More...
 
- Public Member Functions inherited from AIDA::IHistogram1D
virtual ~IHistogram1D ()
 Destructor.
 
- Public Member Functions inherited from AIDA::IHistogram
virtual ~IHistogram ()
 Destructor.
 
- Public Member Functions inherited from AIDA::IBaseHistogram
virtual ~IBaseHistogram ()
 Destructor.
 

Friends

class IHistogramFactoryROOT
 

Detailed Description

class IAxis;

User level interface to 1D Histogram.

Author
T. Kraemer, DESY
Version
Id:
IHistogram1DROOT.h,v 1.13 2008-01-30 17:42:20 killenberg Exp

Member Function Documentation

bool IHistogram1DROOT::add ( const IHistogram1D hist)
virtual

Add to this IHistogram1D the contents of another IHistogram1D.

Parameters
histThe IHistogram1D to be added to this IHistogram1D.
Returns
false If the IHistogram1Ds binnings are incompatible.

Implements AIDA::IHistogram1D.

References AIDA::IHistogram1D::axis(), axis(), and AIDA::IAxis::bins().

int IHistogram1DROOT::allEntries ( ) const
virtual

Sum of the entries in all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW.

This is equivalent to the number of times the method fill was invoked.

Returns
The sum of all the entries.

Implements AIDA::IHistogram.

Referenced by printContents().

const IAxis & IHistogram1DROOT::axis ( ) const
virtual

Get the x axis of the IHistogram1D.

Returns
The x coordinate IAxis.

Implements AIDA::IHistogram1D.

Referenced by add(), binEntries(), binError(), binHeight(), binMean(), coordToIndex(), and printContents().

int IHistogram1DROOT::binEntries ( int  index) const
virtual

The weighted mean of a bin.

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The mean of the corresponding bin.virtual double binMean(int index) const ; Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The number of entries in the corresponding bin.

Implements AIDA::IHistogram1D.

References axis().

Referenced by printContents().

double IHistogram1DROOT::binError ( int  index) const
virtual

The error of a given bin.

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The error on the corresponding bin.

Implements AIDA::IHistogram1D.

References axis().

Referenced by printContents().

double IHistogram1DROOT::binHeight ( int  index) const
virtual

Total height of the corresponding bin (ie the sum of the weights in this bin).

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The height of the corresponding bin.

Implements AIDA::IHistogram1D.

References axis().

Referenced by printContents().

double IHistogram1DROOT::binMean ( int  index) const
virtual

The weighted mean of a bin.

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The mean of the corresponding bin.

Implements AIDA::IHistogram1D.

References axis().

Referenced by printContents().

int IHistogram1DROOT::coordToIndex ( double  coord) const
virtual

Get the bin number corresponding to a given coordinate along the x axis.

This is a convenience method, equivalent to axis().coordToIndex(coord).

See Also
IAxis::coordToIndex(double)
Parameters
coordThe coordinalte along the x axis.
Returns
The corresponding bin number.

Implements AIDA::IHistogram1D.

References axis().

int IHistogram1DROOT::dimension ( ) const
virtual

Get the Histogram's dimension.

Returns
The Histogram's dimension.

Implements AIDA::IBaseHistogram.

int IHistogram1DROOT::entries ( ) const
virtual

Get the number of in-range entries in the Histogram.

Returns
The number of in-range entries.

Implements AIDA::IBaseHistogram.

Referenced by printContents().

int IHistogram1DROOT::extraEntries ( ) const
virtual

Number of entries in the UNDERFLOW and OVERFLOW bins.

Returns
The number of entries outside the range of the IHistogram.

Implements AIDA::IHistogram.

Referenced by printContents().

bool IHistogram1DROOT::fill ( double  x,
double  weight = 1. 
)
virtual

Fill the IHistogram1D with a value and the corresponding weight.

Parameters
xThe value to be filled in.
weightThe corresponding weight (by default 1).
Returns
false If the weight is <0 or >1 (?).

Implements AIDA::IHistogram1D.

double IHistogram1DROOT::maxBinHeight ( ) const
virtual

Maximum height of the in-range bins, i.e.

not considering the UNDERFLOW and OVERFLOW bins.

Returns
The maximum height among the in-range bins.

Implements AIDA::IHistogram.

Referenced by printContents().

double IHistogram1DROOT::mean ( ) const
virtual

The mean of the whole IHistogram1D.

Returns
The mean of the IHistogram1D.

Implements AIDA::IHistogram1D.

Referenced by printContents().

double IHistogram1DROOT::minBinHeight ( ) const
virtual

Minimum height of the in-range bins, i.e.

not considering the UNDERFLOW and OVERFLOW bins.

Returns
The minimum height among the in-range bins.

Implements AIDA::IHistogram.

Referenced by printContents().

void IHistogram1DROOT::printContents ( ) const
virtual

Print out the contents of a histogram to the screen.

This method is made for debugging purposes. It is not part of the AIDA Interface!

References allEntries(), axis(), binEntries(), binError(), binHeight(), AIDA::IAxis::binLowerEdge(), binMean(), AIDA::IAxis::bins(), entries(), extraEntries(), AIDA::IAxis::lowerEdge(), maxBinHeight(), mean(), minBinHeight(), rms(), sumAllBinHeights(), sumBinHeights(), sumExtraBinHeights(), title(), and AIDA::IAxis::upperEdge().

bool IHistogram1DROOT::reset ( )
virtual

Reset the Histogram; as if just created.

Returns
false If something goes wrong.

Implements AIDA::IBaseHistogram.

double IHistogram1DROOT::rms ( ) const
virtual

The RMS of the whole IHistogram1D.

Returns
The RMS if the IHistogram1D.

Implements AIDA::IHistogram1D.

Referenced by printContents().

bool IHistogram1DROOT::scale ( double  scaleFactor)
virtual

Scale the weights and the errors of all the IHistogram's bins (in-range and out-of-range ones) by a given scale factor.

Parameters
scaleFactorThe scale factor.
Returns
false If the scale factor is negative.

FIXME! richtige beruecksichtigung der Fehler im Zusammenhang mit dcale!

Implements AIDA::IHistogram.

bool IHistogram1DROOT::setTitle ( const std::string &  title)
virtual

Set the histogram title.

Parameters
titleThe title.
Returns
false If title cannot be changed.

Implements AIDA::IBaseHistogram.

double IHistogram1DROOT::sumAllBinHeights ( ) const
virtual

Sum of the heights of all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW.

Returns
The sum of all the bins heights.

Implements AIDA::IHistogram.

References sumBinHeights().

Referenced by printContents().

double IHistogram1DROOT::sumBinHeights ( ) const
virtual

Sum of in-range bin heights in the IHistogram, UNDERFLOW and OVERFLOW bins are excluded.

Returns
The sum of the in-range bins heights.

Implements AIDA::IHistogram.

Referenced by printContents(), and sumAllBinHeights().

double IHistogram1DROOT::sumExtraBinHeights ( ) const
virtual

Sum of heights in the UNDERFLOW and OVERFLOW bins.

Returns
The sum of the heights of the out-of-range bins.

Implements AIDA::IHistogram.

Referenced by printContents().

string IHistogram1DROOT::title ( ) const
virtual

Get the Histogram's title.

Returns
The Histogram's title.

Implements AIDA::IBaseHistogram.

Referenced by printContents().


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