Herwig 7.3.0
|
A bin in a (one dimensional) histogram. More...
#include <Bin.h>
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. | |
Bin & | operator+= (const Bin &other) |
Add a bin to this bin. | |
Bin & | operator-= (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. | |
Counter & | operator+= (const Counter &other) |
Add a counter to this counter. | |
Counter & | operator-= (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. | |
|
inline |
|
private |