herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Statistics::Bin Class Reference

A bin in a (one dimensional) histogram. More...

#include <Bin.h>

Inheritance diagram for Statistics::Bin:

Public Member Functions

 Bin (const std::pair< double, double > &newBoundaries=std::make_pair(-DBL_MAX, DBL_MAX))
 Construct a bin given boundaries.
 
virtual ~Bin ()
 Destruct a bin.
 
const std::pair< double, double > & boundaries () const
 Return the bin boundaries.
 
Binoperator+= (const Bin &other)
 Add a bin to this bin.
 
Binoperator-= (const Bin &other)
 Subtract a bin from this bin.
 
void fromXML (const XML::Element &)
 Fill bin data from an XML element.
 
XML::Element toXML () const
 Return an XML element for the data of this bin.
 
- Public Member Functions inherited from Statistics::Counter
 Counter ()
 Construct a new counter.
 
virtual ~Counter ()
 Destruct a counter.
 
void initialize ()
 Initialize this counter.
 
void reset ()
 Reset this counter.
 
void finalize ()
 Finalize this counter.
 
void open (size_t id)
 Open the counter for the next event of the given id.
 
void close ()
 Close the counter and update the overall statistics.
 
void count (double weight, size_t id)
 Book a contribution to the current event. More...
 
Counteroperator+= (const Counter &other)
 Add a counter to this counter.
 
Counteroperator-= (const Counter &other)
 Subtract a counter from this counter.
 
double sumOfWeights () const
 Return the sum of weights.
 
double sumOfSquaredWeights () const
 Return the sum of squared weights.
 
double sumOfEventWeights () const
 Return the sum of weights before the next event occured.
 
size_t eventId () const
 Return the current event id.
 
bool isOpen () const
 Return true, if this counter is open.
 
bool isClosed () const
 Return true, if this counter is closed.
 
double average (double nPoints) const
 Given a number of sampled points, return the average of this counter.
 
double varianceOfAverage (double nPoints) const
 Given a number of sampled points, return the variance of the average of this counter.
 
void fromXML (const XML::Element &)
 Fill counter data from an XML element.
 
XML::Element toXML () const
 Return an XML element for the data of this counter.
 

Private Attributes

std::pair< double, double > theBoundaries
 The bin boundaries.
 

Detailed Description

A bin in a (one dimensional) histogram.

Author
Simon Platzer

Definition at line 22 of file Bin.h.


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