|
ThePEG
1.8.0
|
User level interface to 1D Histogram. More...
#include <Histogram1D.h>

Public Member Functions | |
| Histogram1D (int n, double lo, double up) | |
| Standard constructor. | |
| Histogram1D (const std::vector< double > &edges) | |
| Standard constructor for variable bin width. | |
| Histogram1D (const Histogram1D &h) | |
| Copy constructor. | |
| virtual | ~Histogram1D () |
| Destructor. | |
| std::string | title () const |
| Get the Histogram's title. More... | |
| std::string | name () const |
| Get the Histogram's title. More... | |
| bool | setTitle (const std::string &title) |
| Set the histogram title. More... | |
| IAnnotation & | annotation () |
| Not implemented in LWH. More... | |
| const IAnnotation & | annotation () const |
| Not implemented in LWH. More... | |
| int | dimension () const |
| Get the Histogram's dimension. More... | |
| bool | reset () |
| Reset the Histogram; as if just created. More... | |
| int | entries () const |
| Get the number of in-range entries in the Histogram. More... | |
| int | allEntries () const |
| Sum of the entries in all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW. More... | |
| int | extraEntries () const |
| Number of entries in the UNDERFLOW and OVERFLOW bins. More... | |
| double | equivalentBinEntries () const |
| Number of equivalent entries, i.e. More... | |
| double | sumBinHeights () const |
| Sum of in-range bin heights in the IHistogram, UNDERFLOW and OVERFLOW bins are excluded. More... | |
| double | sumAllBinHeights () const |
| Sum of the heights of all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW. More... | |
| double | sumExtraBinHeights () const |
| Sum of heights in the UNDERFLOW and OVERFLOW bins. More... | |
| double | minBinHeight () const |
| Minimum height of the in-range bins, i.e. More... | |
| double | maxBinHeight () const |
| Maximum height of the in-range bins, i.e. More... | |
| bool | fill (double x, double weight=1.) |
| Fill the IHistogram1D with a value and the corresponding weight. More... | |
| double | binMean (int index) const |
| The weighted mean of a bin. More... | |
| double | binRms (int index) const |
| The weighted RMS of a bin. More... | |
| int | binEntries (int index) const |
| Number of entries in the corresponding bin (ie the number of times fill was called for this bin). More... | |
| double | binHeight (int index) const |
| Total height of the corresponding bin (ie the sum of the weights in this bin). More... | |
| double | binError (int index) const |
| The error of a given bin. More... | |
| double | mean () const |
| The mean of the whole IHistogram1D. More... | |
| double | rms () const |
| The RMS of the whole IHistogram1D. More... | |
| const IAxis & | axis () const |
| Get the x axis of the IHistogram1D. More... | |
| int | coordToIndex (double coord) const |
| Get the bin number corresponding to a given coordinate along the x axis. More... | |
| bool | add (const Histogram1D &h) |
| Add to this Histogram1D the contents of another IHistogram1D. More... | |
| bool | add (const IHistogram1D &hist) |
| Add to this IHistogram1D the contents of another IHistogram1D. More... | |
| bool | scale (double s) |
| Scale the contents of this histogram with the given factor. More... | |
| void | normalize (double intg) |
| Scale the given histogram so that the integral over all bins (including overflow) gives intg. More... | |
| double | integral () const |
| Return the integral over the histogram bins assuming it has been normalize()d. | |
| void * | cast (const std::string &) const |
| Not implemented in LWH. More... | |
| bool | writeXML (std::ostream &os, std::string path, std::string name) |
| Write out the histogram in the AIDA xml format. | |
| bool | writeFLAT (std::ostream &os, std::string path, std::string name) |
| Write out the histogram in a flat text file suitable for eg. More... | |
Public Member Functions inherited from LWH::ManagedObject | |
| virtual | ~ManagedObject () |
| Destructor. | |
Private Attributes | |
| std::string | theTitle |
| The title. | |
| IAxis * | ax |
| The axis. More... | |
| Axis * | fax |
| Pointer (possibly null) to a axis with fixed bin width. More... | |
| VariAxis * | vax |
| Pointer (possibly null) to a axis with fixed bin width. More... | |
| std::vector< int > | sum |
| The counts. More... | |
| std::vector< double > | sumw |
| The weights. More... | |
| std::vector< double > | sumw2 |
| The squared weights. More... | |
| std::vector< double > | sumxw |
| The weighted x-values. More... | |
| std::vector< double > | sumx2w |
| The weighted x-square-values. More... | |
| IAnnotation * | anno |
| dummy pointer to non-existen annotation. More... | |
Friends | |
| class | HistogramFactory |
| HistFactory is a friend. More... | |
User level interface to 1D Histogram.
Definition at line 29 of file Histogram1D.h.
|
inline |
Add to this Histogram1D the contents of another IHistogram1D.
| h | The Histogram1D to be added to this IHistogram1D. |
Definition at line 355 of file Histogram1D.h.
References ax, sum, sumw, sumw2, sumx2w, and sumxw.
Referenced by LWH::HistogramFactory::add().
|
inline |
Add to this IHistogram1D the contents of another IHistogram1D.
| hist | The IHistogram1D to be added to this IHistogram1D. |
Definition at line 374 of file Histogram1D.h.
|
inline |
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.
Definition at line 153 of file Histogram1D.h.
|
inline |
|
inline |
|
inline |
Get the x axis of the IHistogram1D.
Definition at line 335 of file Histogram1D.h.
|
inline |
Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
| index | The bin number (0...N-1) or OVERFLOW or UNDERFLOW. |
Definition at line 276 of file Histogram1D.h.
|
inline |
The error of a given bin.
| index | The bin number (0...N-1) or OVERFLOW or UNDERFLOW. |
Definition at line 296 of file Histogram1D.h.
|
inline |
Total height of the corresponding bin (ie the sum of the weights in this bin).
| index | The bin number (0...N-1) or OVERFLOW or UNDERFLOW. |
Definition at line 286 of file Histogram1D.h.
|
inline |
The weighted mean of a bin.
| index | The bin number (0...N-1) or OVERFLOW or UNDERFLOW. |
Definition at line 253 of file Histogram1D.h.
|
inline |
The weighted RMS of a bin.
| index | The bin number (0...N-1) or OVERFLOW or UNDERFLOW. |
Definition at line 264 of file Histogram1D.h.
|
inline |
|
inline |
Get the bin number corresponding to a given coordinate along the x axis.
This is a convenience method, equivalent to axis().coordToIndex(coord).
| coord | The coordinalte along the x axis. |
Definition at line 346 of file Histogram1D.h.
|
inline |
Get the Histogram's dimension.
Definition at line 118 of file Histogram1D.h.
|
inline |
Get the number of in-range entries in the Histogram.
Definition at line 140 of file Histogram1D.h.
|
inline |
Number of equivalent entries, i.e.
SUM[ weight ] ^ 2 / SUM[ weight^2 ]
Definition at line 170 of file Histogram1D.h.
|
inline |
Number of entries in the UNDERFLOW and OVERFLOW bins.
Definition at line 161 of file Histogram1D.h.
|
inline |
Fill the IHistogram1D with a value and the corresponding weight.
| x | The value to be filled in. |
| weight | The corresponding weight (by default 1). |
Definition at line 238 of file Histogram1D.h.
|
inline |
Maximum height of the in-range bins, i.e.
not considering the UNDERFLOW and OVERFLOW bins.
Definition at line 225 of file Histogram1D.h.
|
inline |
The mean of the whole IHistogram1D.
Definition at line 304 of file Histogram1D.h.
|
inline |
Minimum height of the in-range bins, i.e.
not considering the UNDERFLOW and OVERFLOW bins.
Definition at line 214 of file Histogram1D.h.
|
inline |
Get the Histogram's title.
Definition at line 86 of file Histogram1D.h.
|
inline |
Scale the given histogram so that the integral over all bins (including overflow) gives intg.
This function also corrects for the bin-widths, which means that it should only be run once for each histogram. Further rescaling must be done with the scale(double) function.
Definition at line 399 of file Histogram1D.h.
|
inline |
Reset the Histogram; as if just created.
Definition at line 126 of file Histogram1D.h.
|
inline |
The RMS of the whole IHistogram1D.
Definition at line 318 of file Histogram1D.h.
|
inline |
Scale the contents of this histogram with the given factor.
| s | the scaling factor to use. |
Definition at line 382 of file Histogram1D.h.
|
inline |
Set the histogram title.
| title | The title. |
Definition at line 95 of file Histogram1D.h.
Referenced by LWH::HistogramFactory::add(), LWH::HistogramFactory::createCopy(), LWH::HistogramFactory::createHistogram1D(), LWH::HistogramFactory::divide(), LWH::HistogramFactory::multiply(), and LWH::HistogramFactory::subtract().
|
inline |
Sum of the heights of all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW.
Definition at line 197 of file Histogram1D.h.
|
inline |
Sum of in-range bin heights in the IHistogram, UNDERFLOW and OVERFLOW bins are excluded.
Definition at line 186 of file Histogram1D.h.
|
inline |
Sum of heights in the UNDERFLOW and OVERFLOW bins.
Definition at line 205 of file Histogram1D.h.
|
inline |
Get the Histogram's title.
Definition at line 78 of file Histogram1D.h.
|
inlinevirtual |
Write out the histogram in a flat text file suitable for eg.
gnuplot to read. The coloums are layed out as 'x w w2 n'.
Implements LWH::ManagedObject.
Definition at line 476 of file Histogram1D.h.
|
friend |
HistFactory is a friend.
Definition at line 34 of file Histogram1D.h.
|
private |
dummy pointer to non-existen annotation.
Definition at line 517 of file Histogram1D.h.
|
private |
The axis.
Definition at line 493 of file Histogram1D.h.
Referenced by add(), LWH::HistogramFactory::checkBins(), LWH::HistogramFactory::divide(), Histogram1D(), LWH::HistogramFactory::multiply(), and LWH::HistogramFactory::subtract().
|
private |
Pointer (possibly null) to a axis with fixed bin width.
Definition at line 496 of file Histogram1D.h.
Referenced by LWH::HistogramFactory::checkBins().
|
private |
The counts.
Definition at line 502 of file Histogram1D.h.
Referenced by add(), LWH::HistogramFactory::divide(), LWH::HistogramFactory::sliceX(), and LWH::HistogramFactory::subtract().
|
private |
The weights.
Definition at line 505 of file Histogram1D.h.
Referenced by add(), LWH::HistogramFactory::divide(), LWH::HistogramFactory::multiply(), LWH::HistogramFactory::sliceX(), and LWH::HistogramFactory::subtract().
|
private |
The squared weights.
Definition at line 508 of file Histogram1D.h.
Referenced by add(), LWH::HistogramFactory::divide(), LWH::HistogramFactory::multiply(), LWH::HistogramFactory::sliceX(), and LWH::HistogramFactory::subtract().
|
private |
The weighted x-square-values.
Definition at line 514 of file Histogram1D.h.
Referenced by add(), and LWH::HistogramFactory::sliceX().
|
private |
The weighted x-values.
Definition at line 511 of file Histogram1D.h.
Referenced by add(), and LWH::HistogramFactory::sliceX().
|
private |
Pointer (possibly null) to a axis with fixed bin width.
Definition at line 499 of file Histogram1D.h.
1.8.9.1