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

User level interface to a 2D Cloud. More...

#include <ICloud2DROOT.h>

Inheritance diagram for AIDA::ICloud2DROOT:
AIDA::ICloud2D AIDA::ICloud AIDA::IBaseHistogram

Public Member Functions

virtual ~ICloud2DROOT ()
 Destructor.
 
 ICloud2DROOT (const std::string &path, const std::string &title, int nMax, ITree *usedTree, const std::string &options="")
 Constructor.
 
 ICloud2DROOT (const std::string &path, ITree *usedTree, const ICloud2DROOT &cloud)
 
virtual bool fill (double x, double y, double weight=1.)
 Fill the ICloud2D with a couple of values and a corresponding weight. More...
 
virtual double lowerEdgeX () const
 Get the lower edge of the ICloud2D along the x axis. More...
 
virtual double lowerEdgeY () const
 Get the lower edge of the ICloud2D along the y axis. More...
 
virtual double upperEdgeX () const
 Get the upper edge of the ICloud2D along the x axis. More...
 
virtual double upperEdgeY () const
 Get the upper edge of the ICloud2D along the y axis. More...
 
virtual double valueX (int index) const
 Get the x value corresponding to a given entry. More...
 
virtual double valueY (int index) const
 Get the y value corresponding to a given entry. More...
 
virtual double weight (int index) const
 Get the weight corresponding to a given entry. More...
 
virtual double meanX () const
 Get the mean of the ICloud2D along the x axis. More...
 
virtual double meanY () const
 Get the mean of the ICloud2D along the y axis. More...
 
virtual double rmsX () const
 Get the RMS of the ICloud2D along the x axis. More...
 
virtual double rmsY () const
 Get the RMS of the ICloud2D along the y axis. More...
 
virtual bool convert (int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY)
 Convert internally the ICloud2D to an IHistogram2D with given number of bins, upper edge and lower edge. More...
 
virtual bool myConvert (int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY) const
 
virtual const IHistogram2Dhistogram () const
 Convert internally the ICloud2D to an IHistogram2D with given bin edges. More...
 
virtual bool fillHistogram (IHistogram2D &hist) const
 Project the ICloud2D on an IHistogram2D. More...
 
virtual double sumOfWeights () const
 Get the sum of weights of all the entries. More...
 
virtual bool convertToHistogram ()
 Convert the ICloud to an IHistogram using the default number of bins. More...
 
virtual bool myConvertToHistogram () const
 
virtual bool isConverted () const
 Check if the ICloud has been converted to an IHistogram. More...
 
virtual int maxEntries () const
 Get the number of entries after which the cloud will be converted to an IHistogram. More...
 
virtual bool scale (double scaleFactor)
 Scale the weights by a given factor. 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 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...
 
- Public Member Functions inherited from AIDA::ICloud2D
virtual ~ICloud2D ()
 Destructor.
 
- Public Member Functions inherited from AIDA::ICloud
virtual ~ICloud ()
 Destructor.
 
- Public Member Functions inherited from AIDA::IBaseHistogram
virtual ~IBaseHistogram ()
 Destructor.
 

Detailed Description

User level interface to a 2D Cloud.

Author
T. Kraemer, DESY
Version
Id:
ICloud2DROOT.h,v 1.3 2006-12-04 17:24:06 tkraemer Exp

Member Function Documentation

bool ICloud2DROOT::convert ( int  nBinsX,
double  lowerEdgeX,
double  upperEdgeX,
int  nBinsY,
double  lowerEdgeY,
double  upperEdgeY 
)
virtual

Convert internally the ICloud2D to an IHistogram2D with given number of bins, upper edge and lower edge.

Parameters
nBinsXThe number of bins of the x axis.
lowerEdgeXThe lower edge of bins of the x axis.
upperEdgeXThe upper edge of bins of the x axis.
nBinsYThe number of bins of the y axis.
lowerEdgeYThe lower edge of bins of the y axis.
upperEdgeYThe upper edge of bins of the y axis.
Returns
false If the ICloud2D has already been converted.

Implements AIDA::ICloud2D.

Referenced by fill().

bool ICloud2DROOT::convertToHistogram ( )
virtual

Convert the ICloud to an IHistogram using the default number of bins.

Returns
false If the ICloud has already been converted.

Implements AIDA::ICloud.

int ICloud2DROOT::dimension ( ) const
virtual

Get the IAnnotation associated with the Histogram.

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

Implements AIDA::IBaseHistogram.

int ICloud2DROOT::entries ( ) const
virtual

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

Returns
The number of in-range entries.

Implements AIDA::IBaseHistogram.

References AIDA::IBaseHistogram::entries().

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

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

Parameters
xThe x value.
yThe y value.
weightThe corresponding weight. By default it is 1.
Returns
false If the ICloud2D is full, if the weight's value is is not between 0 and 1.

Implements AIDA::ICloud2D.

References convert(), AIDA::IHistogram2D::fill(), and weight().

bool ICloud2DROOT::fillHistogram ( IHistogram2D hist) const
virtual

Project the ICloud2D on an IHistogram2D.

Parameters
histThe IHistogram2D to be filled.
Returns
false If the ICloud2D is already converted.

Implements AIDA::ICloud2D.

References AIDA::IHistogram2D::fill(), and weight().

const IHistogram2D & ICloud2DROOT::histogram ( ) const
virtual

Convert internally the ICloud2D to an IHistogram2D with given bin edges.

Parameters
binEdgesXThe bins edges of the x axis.
binEdgesYThe bins edges of the y axis.
Returns
false If the ICloud2D has already been converted.virtual bool convert(const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY) ; Get the internal IHistogram2D in which the ICloud2D converted to.
The histogram. or because of a convert() method invocation.

Implements AIDA::ICloud2D.

bool ICloud2DROOT::isConverted ( ) const
virtual

Check if the ICloud has been converted to an IHistogram.

Returns
true if it has been converted.

Implements AIDA::ICloud.

double ICloud2DROOT::lowerEdgeX ( ) const
virtual

Get the lower edge of the ICloud2D along the x axis.

Returns
The lower edge along the x axis.

Implements AIDA::ICloud2D.

double ICloud2DROOT::lowerEdgeY ( ) const
virtual

Get the lower edge of the ICloud2D along the y axis.

Returns
The lower edge along the y axis.

Implements AIDA::ICloud2D.

int ICloud2DROOT::maxEntries ( ) const
virtual

Get the number of entries after which the cloud will be converted to an IHistogram.

Returns
The number of entries.

Implements AIDA::ICloud.

double ICloud2DROOT::meanX ( ) const
virtual

Get the mean of the ICloud2D along the x axis.

Returns
The mean along the x axis.

Implements AIDA::ICloud2D.

References AIDA::IHistogram2D::meanX().

Referenced by rmsX().

double ICloud2DROOT::meanY ( ) const
virtual

Get the mean of the ICloud2D along the y axis.

Returns
The mean along the y axis.

Implements AIDA::ICloud2D.

References AIDA::IHistogram2D::meanY().

Referenced by rmsY().

bool ICloud2DROOT::reset ( )
virtual

Reset the Histogram; as if just created.

Returns
false If something goes wrong.

Implements AIDA::IBaseHistogram.

double ICloud2DROOT::rmsX ( ) const
virtual

Get the RMS of the ICloud2D along the x axis.

Returns
The RMS along the x axis.

Implements AIDA::ICloud2D.

References meanX(), and AIDA::IHistogram2D::rmsX().

double ICloud2DROOT::rmsY ( ) const
virtual

Get the RMS of the ICloud2D along the y axis.

Returns
The RMS along the y axis.

Implements AIDA::ICloud2D.

References meanY(), and AIDA::IHistogram2D::rmsY().

bool ICloud2DROOT::scale ( double  scaleFactor)
virtual

Scale the weights by a given factor.

Parameters
scaleFactorThe scale factor.
Returns
false If a non-positive scale factor is provided.

Implements AIDA::ICloud.

References AIDA::ITree::cd(), AIDA::ITree::pwd(), AIDA::IHistogram::scale(), title(), and weight().

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

Set the histogram title.

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

Implements AIDA::IBaseHistogram.

References AIDA::IBaseHistogram::setTitle().

double ICloud2DROOT::sumOfWeights ( ) const
virtual

Get the sum of weights of all the entries.

Returns
The sum of the weights of all the entries.

Implements AIDA::ICloud.

References AIDA::IHistogram::sumAllBinHeights(), and weight().

std::string ICloud2DROOT::title ( ) const
virtual

Get the Histogram's title.

Returns
The Histogram's title.

Implements AIDA::IBaseHistogram.

References AIDA::IBaseHistogram::title().

Referenced by scale().

double ICloud2DROOT::upperEdgeX ( ) const
virtual

Get the upper edge of the ICloud2D along the x axis.

Returns
The upper edge along the x axis.

Implements AIDA::ICloud2D.

double ICloud2DROOT::upperEdgeY ( ) const
virtual

Get the upper edge of the ICloud2D along the y axis.

Returns
The upper edge along the y axis.

Implements AIDA::ICloud2D.

double ICloud2DROOT::valueX ( int  index) const
virtual

Get the x value corresponding to a given entry.

Parameters
indexThe entry's index.
Returns
The x value of the index-th entry. If the ICloud2D has already been converted, 0 is returned.

Implements AIDA::ICloud2D.

double ICloud2DROOT::valueY ( int  index) const
virtual

Get the y value corresponding to a given entry.

Parameters
indexThe entry's index.
Returns
The y value of the index-th entry. If the ICloud2D has already been converted, 0 is returned.

Implements AIDA::ICloud2D.

double ICloud2DROOT::weight ( int  index) const
virtual

Get the weight corresponding to a given entry.

Parameters
indexThe entry's index.
Returns
The weight of the index-th entry. If the ICloud2D has already been converted, 0 is returned.

Implements AIDA::ICloud2D.

Referenced by fill(), fillHistogram(), scale(), and sumOfWeights().


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