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

class IAxis; More...

#include <IHistogram2DROOT.h>

Inheritance diagram for AIDA::IHistogram2DROOT:
AIDA::IHistogram2D AIDA::IHistogram AIDA::IBaseHistogram

Public Member Functions

virtual ~IHistogram2DROOT ()
 Destructor.
 
 IHistogram2DROOT ()
 Constructor.
 
 IHistogram2DROOT (const std::string &name, const std::string &title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, const std::string &options="")
 
 IHistogram2DROOT (const std::string &name, const std::string &title, const std::vector< double > &binEdgesX, const std::vector< double > &binEdgesY, const std::string &options="")
 
 IHistogram2DROOT (const std::string &name, const IHistogram2DROOT &hist)
 
 IHistogram2DROOT (const std::string &name, const IHistogram3DROOT &hist, std::string axis, int lowerBin=-2, int upperBin=-1)
 
virtual bool fill (double x, double y, double weight=1.)
 Fill the IHistogram2D with a couple of values and the corresponding weight. More...
 
virtual double binMeanX (int indexX, int indexY) const
 The weighted mean along the x axis of a given bin. More...
 
virtual double binMeanY (int indexX, int indexY) const
 The weighted mean along the y axis of a given bin. More...
 
virtual int binEntries (int indexX, int indexY) const
 Number of entries in the corresponding bin (ie the number of times fill was called for this bin). More...
 
virtual int binEntriesX (int index) const
 Sum of all the entries of the bins along a given x bin. More...
 
virtual int binEntriesY (int index) const
 Sum of all the entries of the bins along a given y bin. More...
 
virtual double binHeight (int indexX, int indexY) const
 Total height of a give bin (ie the sum of the weights in this bin). More...
 
virtual double binHeightX (int index) const
 Sum of all the heights of the bins along a given x bin. More...
 
virtual double binHeightY (int index) const
 Sum of all the heights of the bins along a given y bin. More...
 
virtual double binError (int indexX, int indexY) const
 The error of a given bin. More...
 
virtual double meanX () const
 The mean of the IHistogram2D along the x axis. More...
 
virtual double meanY () const
 The mean of the IHistogram2D along the y axis. More...
 
virtual double rmsX () const
 The RMS of the IHistogram2D along the x axis. More...
 
virtual double rmsY () const
 The RMS of the IHistogram2D along the y axis. More...
 
virtual const IAxisxAxis () const
 Get the x axis of the IHistogram2D. More...
 
virtual const IAxisyAxis () const
 Get the y axis of the IHistogram2D. More...
 
virtual int coordToIndexX (double coord) const
 Get the bin number corresponding to a given coordinate along the x axis. More...
 
virtual int coordToIndexY (double coord) const
 Get the bin number corresponding to a given coordinate along the y axis. More...
 
virtual bool add (const IHistogram2D &hist)
 Add to this IHistogram2D the contents of another IHistogram2D. More...
 
virtual bool subtract (const IHistogram2D &hist)
 
virtual bool multiply (const IHistogram2D &hist)
 
virtual bool divide (const IHistogram2D &hist)
 
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 IAnnotation associated with the Histogram. 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
 See IManagedObject for a description. More...
 
virtual int extraEntries () const
 Number of entries in the UNDERFLOW and OVERFLOW bins. More...
 
virtual double sumBinHeights () const
 Number of equivalent entries, i.e. 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 void printContents () const
 Print out the contents of a histogram to the screen. More...
 
- Public Member Functions inherited from AIDA::IHistogram2D
virtual ~IHistogram2D ()
 Destructor.
 
- Public Member Functions inherited from AIDA::IHistogram
virtual ~IHistogram ()
 Destructor.
 
- Public Member Functions inherited from AIDA::IBaseHistogram
virtual ~IBaseHistogram ()
 Destructor.
 

Friends

class IHistogramFactoryROOT
 
class IHistogram1DROOT
 

Detailed Description

class IAxis;

User level interface to 2D Histogram.

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

Member Function Documentation

bool IHistogram2DROOT::add ( const IHistogram2D hist)
virtual

Add to this IHistogram2D the contents of another IHistogram2D.

Parameters
histThe IHistogram2D to be added to this IHistogram2D.
Returns
false If the IHistogram2Ds binnings are incompatible.

Implements AIDA::IHistogram2D.

References AIDA::IAxis::bins(), AIDA::IHistogram2D::xAxis(), xAxis(), AIDA::IHistogram2D::yAxis(), and yAxis().

int IHistogram2DROOT::allEntries ( ) const
virtual

See IManagedObject for a description.

Parameters
classNameThe name of the class to cast on.
Returns
The right pointer. Return 0 if failure.virtual void * cast(const std::string & className) const ; 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.
The sum of all the entries.

Implements AIDA::IHistogram.

Referenced by printContents().

int IHistogram2DROOT::binEntries ( int  indexX,
int  indexY 
) const
virtual

Number of entries in the corresponding bin (ie the number of times fill was called for this bin).

Parameters
indexXThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexYThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The number of entries in the corresponding bin.

Implements AIDA::IHistogram2D.

References xAxis(), and yAxis().

Referenced by printContents().

int IHistogram2DROOT::binEntriesX ( int  index) const
virtual

Sum of all the entries of the bins along a given x bin.

This is equivalent to projectionX().binEntries(index).

Parameters
indexThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The number of entries in the corresponding set of bins.

Implements AIDA::IHistogram2D.

References xAxis().

Referenced by printContents().

int IHistogram2DROOT::binEntriesY ( int  index) const
virtual

Sum of all the entries of the bins along a given y bin.

This is equivalent to projectionY().binEntries(index).

Parameters
indexThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The number of entries in the corresponding set of bins.

Implements AIDA::IHistogram2D.

References yAxis().

Referenced by printContents().

double IHistogram2DROOT::binError ( int  indexX,
int  indexY 
) const
virtual

The error of a given bin.

Parameters
indexXThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexYThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The error on the corresponding bin.

Implements AIDA::IHistogram2D.

References xAxis(), and yAxis().

Referenced by printContents().

double IHistogram2DROOT::binHeight ( int  indexX,
int  indexY 
) const
virtual

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

Parameters
indexXThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexYThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The height of the corresponding bin.

Implements AIDA::IHistogram2D.

References xAxis(), and yAxis().

Referenced by printContents().

double IHistogram2DROOT::binHeightX ( int  index) const
virtual

Sum of all the heights of the bins along a given x bin.

This is equivalent to projectionX().binHeight(index).

Parameters
indexThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The sum of the heights in the corresponding set of bins.

Implements AIDA::IHistogram2D.

References xAxis().

Referenced by printContents().

double IHistogram2DROOT::binHeightY ( int  index) const
virtual

Sum of all the heights of the bins along a given y bin.

This is equivalent to projectionY().binHeight(index).

Parameters
indexThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The sum of the heights in the corresponding set of bins.

Implements AIDA::IHistogram2D.

References yAxis().

Referenced by printContents().

double IHistogram2DROOT::binMeanX ( int  indexX,
int  indexY 
) const
virtual

The weighted mean along the x axis of a given bin.

Parameters
indexXThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexYThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The mean of the corresponding bin along the x axis.

Implements AIDA::IHistogram2D.

References xAxis(), and yAxis().

Referenced by printContents().

double IHistogram2DROOT::binMeanY ( int  indexX,
int  indexY 
) const
virtual

The weighted mean along the y axis of a given bin.

Parameters
indexXThe x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
indexYThe y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The mean of the corresponding bin along the y axis.

Implements AIDA::IHistogram2D.

References xAxis(), and yAxis().

Referenced by printContents().

int IHistogram2DROOT::coordToIndexX ( double  coord) const
virtual

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

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

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

Implements AIDA::IHistogram2D.

References xAxis().

int IHistogram2DROOT::coordToIndexY ( double  coord) const
virtual

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

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

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

Implements AIDA::IHistogram2D.

References yAxis().

int IHistogram2DROOT::dimension ( ) const
virtual

Get the IAnnotation associated with the Histogram.

Returns
The IAnnotation.virtual IAnnotation & annotation() ; virtual const IAnnotation & annotation() const = 0; Get the Histogram's dimension.
The Histogram's dimension.

Implements AIDA::IBaseHistogram.

int IHistogram2DROOT::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 IHistogram2DROOT::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 IHistogram2DROOT::fill ( double  x,
double  y,
double  weight = 1. 
)
virtual

Fill the IHistogram2D with a couple of values and the corresponding weight.

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

Implements AIDA::IHistogram2D.

double IHistogram2DROOT::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 IHistogram2DROOT::meanX ( ) const
virtual

The mean of the IHistogram2D along the x axis.

Returns
The mean of the IHistogram2D along the x axis.

Implements AIDA::IHistogram2D.

Referenced by printContents().

double IHistogram2DROOT::meanY ( ) const
virtual

The mean of the IHistogram2D along the y axis.

Returns
The mean of the IHistogram2D along the y axis.

Implements AIDA::IHistogram2D.

Referenced by printContents().

double IHistogram2DROOT::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 IHistogram2DROOT::printContents ( ) const
virtual
bool IHistogram2DROOT::reset ( )
virtual

Reset the Histogram; as if just created.

Returns
false If something goes wrong.

Implements AIDA::IBaseHistogram.

double IHistogram2DROOT::rmsX ( ) const
virtual

The RMS of the IHistogram2D along the x axis.

Returns
The RMS if the IHistogram2D along the x axis.

Implements AIDA::IHistogram2D.

Referenced by printContents().

double IHistogram2DROOT::rmsY ( ) const
virtual

The RMS of the IHistogram2D along the y axis.

Returns
The RMS if the IHistogram2D along the y axis.

Implements AIDA::IHistogram2D.

Referenced by printContents().

bool IHistogram2DROOT::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 IHistogram2DROOT::setTitle ( const std::string &  title)
virtual

Set the histogram title.

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

Implements AIDA::IBaseHistogram.

double IHistogram2DROOT::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.

Referenced by printContents().

double IHistogram2DROOT::sumBinHeights ( ) const
virtual

Number of equivalent entries, i.e.

SUM[ weight ] ^ 2 / SUM[ weight^2 ]

Returns
The number of equivalent entries.virtual double equivalentBinEntries() const ; Sum of in-range bin heights in the IHistogram, UNDERFLOW and OVERFLOW bins are excluded.
The sum of the in-range bins heights.

Implements AIDA::IHistogram.

Referenced by printContents().

double IHistogram2DROOT::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 IHistogram2DROOT::title ( ) const
virtual

Get the Histogram's title.

Returns
The Histogram's title.

Implements AIDA::IBaseHistogram.

Referenced by printContents().

const IAxis & IHistogram2DROOT::xAxis ( ) const
virtual

Get the x axis of the IHistogram2D.

Returns
The x coordinate IAxis.

Implements AIDA::IHistogram2D.

Referenced by add(), binEntries(), binEntriesX(), binError(), binHeight(), binHeightX(), binMeanX(), binMeanY(), coordToIndexX(), and printContents().

const IAxis & IHistogram2DROOT::yAxis ( ) const
virtual

Get the y axis of the IHistogram2D.

Returns
The y coordinate IAxis.

Implements AIDA::IHistogram2D.

Referenced by add(), binEntries(), binEntriesY(), binError(), binHeight(), binHeightY(), binMeanX(), binMeanY(), coordToIndexY(), and printContents().


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