Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GenHisto2D Class Template Reference

#include <GenHisto2D.h>

Inheritance diagram for GenHisto2D:

IHistogram2D DataObject H2D List of all members.

Public Methods

virtual std::string title () const
 ========================================================================== From the IHistogram interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Title of the histogram (temporary functions, as the title will be part od the annotation, and there will be general accessors for any pair stored there). More...

virtual void setTitle ( std::string value )
virtual int dimensions () const
 Number of dimensions (1 for 1D histogram, 2 for 2D histogram, etc.). More...

virtual void reset ()
 Reset contents. More...

virtual int entries () const
 -------------------------------------------------------------------------- Total number of entries in the whole histogram (number of fills) -------------------------------------------------------------------------- Number of in-range entries in the whole histogram. More...

virtual int allEntries () const
 Number of all entries in all (both in-range and extra) bins in the whole histogram. More...

virtual int extraEntries () const
 Number of extra entries in the whole histogram. More...

virtual double equivalentBinEntries () const
 Number of equivalent entries SUM[ weight ] ^ 2 / SUM[ weight^2 ]. More...

virtual double sumBinHeights () const
 -------------------------------------------------------------------------- Sums of bin heights (height respects weights of entries) -------------------------------------------------------------------------- Sum of in-range bin heights in the whole histogram. More...

virtual double sumAllBinHeights () const
 Sum of all (both in-range and extra) bin heights in the whole histogram. More...

virtual double sumExtraBinHeights () const
 Sum of extra bin heights in the whole histogram. More...

virtual void fill ( double x, double y, double weight = 1 )
 ========================================================================== From the IHistogram1D interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Fill histogram. More...

virtual int binEntries ( int indexX, int indexY ) const
 -------------------------------------------------------------------------- Entries The indexX accepts UNDERFLOW_BIN, values from 0 to Nx-1, or OVERFLOW_BIN The indexY accepts UNDERFLOW_BIN, values from 0 to Ny-1, or OVERFLOW_BIN NW | N | NE ---------------------------- W | in-range bins | E -------------------------- SW | S | SE -------------------------------------------------------------------------- Number of entries in a specific in-range bin (number of fills). More...

virtual int binEntriesX ( int indexX ) const
 Total number of entries in the projected slice to the axis X Equivalent to projectionX().binEntries( indexX );. More...

virtual int binEntriesY ( int indexY ) const
 Total number of entries in the projected slice to the axis Y Equivalent to projectionY().binEntries( indexY );. More...

virtual double binHeight ( int indexX, int indexY ) const
 Height of a specific in-range bin (height respects weights of entries). More...

virtual double binHeightX ( int indexX ) const
 Total number of bin heights in the projected slice to to axis X Equivalent to projectionX().binHeight( indexX );. More...

virtual double binHeightY ( int indexY ) const
 Total number of bin heights in the projected slice to to axis Y Equivalent to projectionY().binHeight( indexY );. More...

virtual double binError ( int indexX, int indexY ) const
 Bin contents error. More...

virtual double meanX () const
 -------------------------------------------------------------------------- Statistics -------------------------------------------------------------------------- meanX() returns the mean of the whole histogram as calculated on filling-time projected on the axis X. More...

virtual double meanY () const
 meanY() returns the mean of the whole histogram as calculated on filling-time projected on the axis Y. More...

virtual double rmsX () const
 rmsX() returns the rms of the whole histogram as calculated on filling-time projected on the axis X. More...

virtual double rmsY () const
 rmsY() returns the rms of the whole histogram as calculated on filling-time projected on the axis Y. More...

virtual double minBinHeight () const
 -------------------------------------------------------------------------- Minimum and maximum heights and bins -------------------------------------------------------------------------- Min height of in-range bins in the whole histogram. More...

virtual int minBinX () const
 IndexX of the in-range bin containing the minBinHeight(). More...

virtual int minBinY () const
 IndexY of the in-range bin containing the minBinHeight(). More...

virtual double maxBinHeight () const
 Max height of in-range bins in the whole histogram. More...

virtual int maxBinX () const
 IndexX of the in-range bin containing the maxBinHeight(). More...

virtual int maxBinY () const
 IndexY of the in-range bin containing the maxBinHeight(). More...

virtual IAxisxAxis () const
 -------------------------------------------------------------------------- Axis -------------------------------------------------------------------------- Get the X axis. More...

virtual IAxisyAxis () const
 Get the Y axis. More...

virtual int coordToIndexX ( double coordX ) const
 -------------------------------------------------------------------------- Conversions between coordinates and bin indices -------------------------------------------------------------------------- Equivalent to xAxis().coordToIndex( coordX );. More...

virtual int coordToIndexY ( double coordY ) const
 Equivalent to yAxis().coordToIndex( coordY );. More...

virtual IHistogram1DprojectionX () const
 -------------------------------------------------------------------------- Projections -------------------------------------------------------------------------- Projection on axis X Equivalent to sliceX( UNDERFLOW_BIN, OVERFLOW_BIN );. More...

virtual IHistogram1DprojectionY () const
 Projection on axis Y Equivalent to sliceY( UNDERFLOW_BIN, OVERFLOW_BIN );. More...

virtual IHistogram1DsliceX ( int indexY ) const
 -------------------------------------------------------------------------- Slices -------------------------------------------------------------------------- Slice parallel with the axis X, identified by bin indexY Equivalent to sliceX( indexY, indexY );. More...

virtual IHistogram1DsliceY ( int indexX ) const
 Slice parallel with the axis Y, identified by bin indexX Equivalent to sliceY( indexX, indexX );. More...

virtual IHistogram1DsliceX ( int , int ) const
 Slice parallel with the axis X, between indexY1 and indexY2. More...

virtual IHistogram1DsliceY ( int , int ) const
 Slice parallel with the axis Y, between indexX1 and indexX2. More...

virtual std::ostream& print ( std::ostream& s ) const
 Print (ASCII) the histogram into the output stream. More...

virtual std::ostream& write ( std::ostream& s ) const
 -------------------------------------------------------------------------- Print functions (ASCII table containing numbers e.g. bin height) Write (ASCII) the histogram table into the output stream. More...

virtual int write ( const char* file_name ) const
 Write (ASCII) the histogram table into a file. More...


Protected Methods

 GenHisto2D ( const std::string& title, const std::string& histoID, int nBinsX, double lowX, double highX, int nBinsY, double lowY, double highY, End_Point_Convention epc )
 -------------------------------------------------------------------------- Constructors for 2D histogram with fixed binning --------------------------------------------------------------------------. More...

 GenHisto2D ( const std::string& title, int histoID, int nBinsX, double lowX, double highX, int nBinsY, double lowY, double highY, End_Point_Convention epc )
 GenHisto2D ( const std::string& title, const std::string& histoID, std::vector<double> edgesX, std::vector<double> edgesY, End_Point_Convention epc )
 -------------------------------------------------------------------------- Constructors for 2D histogram with variable binning --------------------------------------------------------------------------. More...

 GenHisto2D ( const std::string& title, int histoID, std::vector<double> edgesX, std::vector<double> edgesY, End_Point_Convention epc )
virtual ~GenHisto2D ()
 -------------------------------------------------------------------------- Destructor --------------------------------------------------------------------------. More...

virtual I_Bin* htlBin ( int i, int j ) const
virtual I_Histo::I_Bin_Location htlMinBin () const
 Location of the in-range bin containing the minBinHeight(). More...

virtual I_Histo::I_Bin_Location htlMaxBin () const
 Location of the in-range bin containing the maxBinHeight(). More...

virtual int calcIndex ( double coord, int part ) const
 Calculate the index from a given coordinate in a given partition. More...

virtual int checkIndexX ( int indexX ) const
 -------------------------------------------------------------------------- Checks validity of the index -------------------------------------------------------------------------- Checks validity of the indexX, assuming bin indices from "0" to "number of bins - 1". More...

virtual int checkIndexY ( int indexY ) const
 Checks validity of the indexY, assuming bin indices from "0" to "number of bins - 1". More...


Protected Attributes

TYPE* m_histogram
 -------------------------------------------------------------------------- Data members -------------------------------------------------------------------------- Concrete histogram. More...

Axism_xAxis
 X axis. More...

Axism_yAxis
 Y axis. More...


Constructor & Destructor Documentation

template<classTYPE>
GenHisto2D<TYPE>::GenHisto2D<TYPE> ( const std::string & title,
const std::string & histoID,
int nBinsX,
double lowX,
double highX,
int nBinsY,
double lowY,
double highY,
End_Point_Convention epc ) [inline, protected]
 

-------------------------------------------------------------------------- Constructors for 2D histogram with fixed binning --------------------------------------------------------------------------.

Definition at line 58 of file GenHisto2D.h.

template<classTYPE>
GenHisto2D<TYPE>::GenHisto2D<TYPE> ( const std::string & title,
int histoID,
int nBinsX,
double lowX,
double highX,
int nBinsY,
double lowY,
double highY,
End_Point_Convention epc ) [inline, protected]
 

Definition at line 80 of file GenHisto2D.h.

template<classTYPE>
GenHisto2D<TYPE>::GenHisto2D<TYPE> ( const std::string & title,
const std::string & histoID,
std::vector< double > edgesX,
std::vector< double > edgesY,
End_Point_Convention epc ) [inline, protected]
 

-------------------------------------------------------------------------- Constructors for 2D histogram with variable binning --------------------------------------------------------------------------.

Definition at line 110 of file GenHisto2D.h.

template<classTYPE>
GenHisto2D<TYPE>::GenHisto2D<TYPE> ( const std::string & title,
int histoID,
std::vector< double > edgesX,
std::vector< double > edgesY,
End_Point_Convention epc ) [inline, protected]
 

Definition at line 127 of file GenHisto2D.h.

template<classTYPE>
GenHisto2D<TYPE>::~GenHisto2D<TYPE> ( ) [inline, protected, virtual]
 

-------------------------------------------------------------------------- Destructor --------------------------------------------------------------------------.

Definition at line 152 of file GenHisto2D.h.


Member Function Documentation

template<classTYPE>
int GenHisto2D<TYPE>::allEntries ( ) const [inline, virtual]
 

Number of all entries in all (both in-range and extra) bins in the whole histogram.

Definition at line 206 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::binEntries ( int indexX,
int indexY ) const [inline, virtual]
 

-------------------------------------------------------------------------- Entries The indexX accepts UNDERFLOW_BIN, values from 0 to Nx-1, or OVERFLOW_BIN The indexY accepts UNDERFLOW_BIN, values from 0 to Ny-1, or OVERFLOW_BIN NW | N | NE ---------------------------- W | in-range bins | E -------------------------- SW | S | SE -------------------------------------------------------------------------- Number of entries in a specific in-range bin (number of fills).

Definition at line 279 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::binEntriesX ( int indexX ) const [inline, virtual]
 

Total number of entries in the projected slice to the axis X Equivalent to projectionX().binEntries( indexX );.

Definition at line 287 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::binEntriesY ( int indexY ) const [inline, virtual]
 

Total number of entries in the projected slice to the axis Y Equivalent to projectionY().binEntries( indexY );.

Definition at line 308 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::binError ( int indexX,
int indexY ) const [inline, virtual]
 

Bin contents error.

Definition at line 377 of file GenHisto2D.h.

Referenced by write().

template<classTYPE>
double GenHisto2D<TYPE>::binHeight ( int indexX,
int indexY ) const [inline, virtual]
 

Height of a specific in-range bin (height respects weights of entries).

Definition at line 328 of file GenHisto2D.h.

Referenced by sumExtraBinHeights(), and write().

template<classTYPE>
double GenHisto2D<TYPE>::binHeightX ( int indexX ) const [inline, virtual]
 

Total number of bin heights in the projected slice to to axis X Equivalent to projectionX().binHeight( indexX );.

Definition at line 336 of file GenHisto2D.h.

Referenced by sumExtraBinHeights().

template<classTYPE>
double GenHisto2D<TYPE>::binHeightY ( int indexY ) const [inline, virtual]
 

Total number of bin heights in the projected slice to to axis Y Equivalent to projectionY().binHeight( indexY );.

Definition at line 357 of file GenHisto2D.h.

Referenced by sumExtraBinHeights().

template<classTYPE>
int GenHisto2D<TYPE>::calcIndex ( double coord,
int part ) const [inline, protected, virtual]
 

Calculate the index from a given coordinate in a given partition.

Definition at line 727 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::checkIndexX ( int indexX ) const [inline, protected, virtual]
 

-------------------------------------------------------------------------- Checks validity of the index -------------------------------------------------------------------------- Checks validity of the indexX, assuming bin indices from "0" to "number of bins - 1".

Definition at line 743 of file GenHisto2D.h.

Referenced by binEntries(), binEntriesX(), binError(), binHeight(), and binHeightX().

template<classTYPE>
int GenHisto2D<TYPE>::checkIndexY ( int indexY ) const [inline, protected, virtual]
 

Checks validity of the indexY, assuming bin indices from "0" to "number of bins - 1".

Definition at line 749 of file GenHisto2D.h.

Referenced by binEntries(), binEntriesY(), binError(), binHeight(), and binHeightY().

template<classTYPE>
int GenHisto2D<TYPE>::coordToIndexX ( double coordX ) const [inline, virtual]
 

-------------------------------------------------------------------------- Conversions between coordinates and bin indices -------------------------------------------------------------------------- Equivalent to xAxis().coordToIndex( coordX );.

Definition at line 556 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::coordToIndexY ( double coordY ) const [inline, virtual]
 

Equivalent to yAxis().coordToIndex( coordY );.

Definition at line 561 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::dimensions ( ) const [inline, virtual]
 

Number of dimensions (1 for 1D histogram, 2 for 2D histogram, etc.).

Definition at line 185 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::entries ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Total number of entries in the whole histogram (number of fills) -------------------------------------------------------------------------- Number of in-range entries in the whole histogram.

Definition at line 200 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::equivalentBinEntries ( ) const [inline, virtual]
 

Number of equivalent entries SUM[ weight ] ^ 2 / SUM[ weight^2 ].

Definition at line 217 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::extraEntries ( ) const [inline, virtual]
 

Number of extra entries in the whole histogram.

Definition at line 211 of file GenHisto2D.h.

template<classTYPE>
void GenHisto2D<TYPE>::fill ( double x,
double y,
double weight = 1 ) [inline, virtual]
 

========================================================================== From the IHistogram1D interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Fill histogram.

Definition at line 259 of file GenHisto2D.h.

template<classTYPE>
I_Bin * GenHisto2D<TYPE>::htlBin ( int i,
int j ) const [inline, protected, virtual]
 

Definition at line 384 of file GenHisto2D.h.

Referenced by binEntries(), binError(), and binHeight().

template<classTYPE>
I_Histo::I_Bin_Location GenHisto2D<TYPE>::htlMaxBin ( ) const [inline, protected, virtual]
 

Location of the in-range bin containing the maxBinHeight().

Definition at line 514 of file GenHisto2D.h.

template<classTYPE>
I_Histo::I_Bin_Location GenHisto2D<TYPE>::htlMinBin ( ) const [inline, protected, virtual]
 

Location of the in-range bin containing the minBinHeight().

Definition at line 494 of file GenHisto2D.h.

Referenced by maxBinX(), maxBinY(), minBinX(), and minBinY().

template<classTYPE>
double GenHisto2D<TYPE>::maxBinHeight ( ) const [inline, virtual]
 

Max height of in-range bins in the whole histogram.

Definition at line 473 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::maxBinX ( ) const [inline, virtual]
 

IndexX of the in-range bin containing the maxBinHeight().

Definition at line 478 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::maxBinY ( ) const [inline, virtual]
 

IndexY of the in-range bin containing the maxBinHeight().

Definition at line 485 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::meanX ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Statistics -------------------------------------------------------------------------- meanX() returns the mean of the whole histogram as calculated on filling-time projected on the axis X.

Definition at line 424 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::meanY ( ) const [inline, virtual]
 

meanY() returns the mean of the whole histogram as calculated on filling-time projected on the axis Y.

Definition at line 430 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::minBinHeight ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Minimum and maximum heights and bins -------------------------------------------------------------------------- Min height of in-range bins in the whole histogram.

Definition at line 454 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::minBinX ( ) const [inline, virtual]
 

IndexX of the in-range bin containing the minBinHeight().

Definition at line 459 of file GenHisto2D.h.

template<classTYPE>
int GenHisto2D<TYPE>::minBinY ( ) const [inline, virtual]
 

IndexY of the in-range bin containing the minBinHeight().

Definition at line 466 of file GenHisto2D.h.

template<classTYPE>
std::ostream & GenHisto2D<TYPE>::print ( std::ostream & s ) const [inline, virtual]
 

Print (ASCII) the histogram into the output stream.

Definition at line 692 of file GenHisto2D.h.

template<classTYPE>
IHistogram1D * GenHisto2D<TYPE>::projectionX ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Projections -------------------------------------------------------------------------- Projection on axis X Equivalent to sliceX( UNDERFLOW_BIN, OVERFLOW_BIN );.

Definition at line 572 of file GenHisto2D.h.

template<classTYPE>
IHistogram1D * GenHisto2D<TYPE>::projectionY ( ) const [inline, virtual]
 

Projection on axis Y Equivalent to sliceY( UNDERFLOW_BIN, OVERFLOW_BIN );.

Definition at line 592 of file GenHisto2D.h.

template<classTYPE>
void GenHisto2D<TYPE>::reset ( ) [inline, virtual]
 

Reset contents.

Definition at line 190 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::rmsX ( ) const [inline, virtual]
 

rmsX() returns the rms of the whole histogram as calculated on filling-time projected on the axis X.

Definition at line 437 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::rmsY ( ) const [inline, virtual]
 

rmsY() returns the rms of the whole histogram as calculated on filling-time projected on the axis Y.

Definition at line 443 of file GenHisto2D.h.

template<classTYPE>
void GenHisto2D<TYPE>::setTitle ( std::string value ) [inline, virtual]
 

Definition at line 177 of file GenHisto2D.h.

template<classTYPE>
IHistogram1D * GenHisto2D<TYPE>::sliceX ( int,
int ) const [inline, virtual]
 

Slice parallel with the axis X, between indexY1 and indexY2.

Definition at line 672 of file GenHisto2D.h.

template<classTYPE>
IHistogram1D * GenHisto2D<TYPE>::sliceX ( int indexY ) const [inline, virtual]
 

-------------------------------------------------------------------------- Slices -------------------------------------------------------------------------- Slice parallel with the axis X, identified by bin indexY Equivalent to sliceX( indexY, indexY );.

Definition at line 617 of file GenHisto2D.h.

template<classTYPE>
IHistogram1D * GenHisto2D<TYPE>::sliceY ( int,
int ) const [inline, virtual]
 

Slice parallel with the axis Y, between indexX1 and indexX2.

Definition at line 678 of file GenHisto2D.h.

template<classTYPE>
IHistogram1D * GenHisto2D<TYPE>::sliceY ( int indexX ) const [inline, virtual]
 

Slice parallel with the axis Y, identified by bin indexX Equivalent to sliceY( indexX, indexX );.

Definition at line 645 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::sumAllBinHeights ( ) const [inline, virtual]
 

Sum of all (both in-range and extra) bin heights in the whole histogram.

Definition at line 232 of file GenHisto2D.h.

template<classTYPE>
double GenHisto2D<TYPE>::sumBinHeights ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Sums of bin heights (height respects weights of entries) -------------------------------------------------------------------------- Sum of in-range bin heights in the whole histogram.

Definition at line 227 of file GenHisto2D.h.

Referenced by sumAllBinHeights().

template<classTYPE>
double GenHisto2D<TYPE>::sumExtraBinHeights ( ) const [inline, virtual]
 

Sum of extra bin heights in the whole histogram.

Definition at line 237 of file GenHisto2D.h.

Referenced by sumAllBinHeights().

template<classTYPE>
std::string GenHisto2D<TYPE>::title ( ) const [inline, virtual]
 

========================================================================== From the IHistogram interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Title of the histogram (temporary functions, as the title will be part od the annotation, and there will be general accessors for any pair stored there).

Definition at line 174 of file GenHisto2D.h.

Referenced by projectionX(), projectionY(), sliceX(), and sliceY().

template<classTYPE>
int GenHisto2D<TYPE>::write ( const char * file_name ) const [inline, virtual]
 

Write (ASCII) the histogram table into a file.

Definition at line 717 of file GenHisto2D.h.

template<classTYPE>
std::ostream & GenHisto2D<TYPE>::write ( std::ostream & s ) const [inline, virtual]
 

-------------------------------------------------------------------------- Print functions (ASCII table containing numbers e.g. bin height) Write (ASCII) the histogram table into the output stream.

Definition at line 702 of file GenHisto2D.h.

Referenced by HistogramSvc::write().

template<classTYPE>
IAxis * GenHisto2D<TYPE>::xAxis ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Axis -------------------------------------------------------------------------- Get the X axis.

Definition at line 541 of file GenHisto2D.h.

Referenced by coordToIndexX(), projectionX(), and sliceX().

template<classTYPE>
IAxis * GenHisto2D<TYPE>::yAxis ( ) const [inline, virtual]
 

Get the Y axis.

Definition at line 546 of file GenHisto2D.h.

Referenced by coordToIndexY(), projectionY(), and sliceY().


Member Data Documentation

template<classTYPE>
TYPE * GenHisto2D<TYPE>::m_histogram [protected]
 

-------------------------------------------------------------------------- Data members -------------------------------------------------------------------------- Concrete histogram.

Definition at line 759 of file GenHisto2D.h.

template<classTYPE>
Axis * GenHisto2D<TYPE>::m_xAxis [protected]
 

X axis.

Definition at line 762 of file GenHisto2D.h.

template<classTYPE>
Axis * GenHisto2D<TYPE>::m_yAxis [protected]
 

Y axis.

Definition at line 765 of file GenHisto2D.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 21 12:22:33 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000