Herwig 7.3.0
|
statistics is a helper class for keeping track of event generation statistics. More...
#include <statistics.h>
Public Member Functions | |
statistics () | |
default constructor | |
void | presampled (double weight) |
update the statistics for a weight encountered during presampling | |
void | select (double weight, bool calculate_integral=true) |
indicate that a weight has been selected; optionally preven the weight from entering the caluclation of the integral | |
void | accept (double weight) |
indicate that a point has been accepted | |
void | reject (double weight) |
reject a prviously accepted event | |
void | reset () |
reset the statistics object | |
std::pair< double, double > | current () const |
return the integral's estimate and its uncertainty at the currently accumulated statistics | |
double | average_weight () const |
the average weight | |
double | average_abs_weight () const |
the average absolute weight | |
double | average_weight_variance () const |
the variance of the weight | |
unsigned long | iteration_points () const |
the number of points in this iteration | |
unsigned long | n_iterations () const |
the number of iterations | |
unsigned long | attempted () const |
the total number of attempted in this bin | |
unsigned long | accepted () const |
the total number of finally accepted events in this bin | |
unsigned long | accepted_negative () const |
the total number of acceptet events with negative weights | |
double | sum_weights () const |
the sum of weights | |
double | sum_abs_weights () const |
the sum of absolute values of the weights | |
double | sum_weights_squared () const |
the sum of weights squared | |
double | max_weight () const |
the maximum weight | |
template<class OStream > | |
void | put (OStream &os) const |
put ostream | |
template<class IStream > | |
void | get (IStream &is) |
get from istream | |
Private Attributes | |
double | average_weight_ |
the average weight | |
double | average_abs_weight_ |
the average absolute weight | |
double | average_weight_variance_ |
the variance of the weight | |
unsigned long | iteration_points_ |
the number of points in this iteration | |
unsigned long | attempted_ |
the total number of attempted in this bin | |
unsigned long | accepted_ |
the total number of finally accepted events in this bin | |
unsigned long | accepted_negative_ |
the total number of acceptet events with negative weights | |
double | sum_weights_ |
the sum of weights | |
double | sum_abs_weights_ |
the sum of absolute values of the weights | |
double | sum_weights_squared_ |
the sum of weights squared | |
double | max_weight_ |
the maximum weight | |
unsigned long | n_iterations_ |
the number of iterations used to calculate the integral | |
statistics is a helper class for keeping track of event generation statistics.
Definition at line 20 of file statistics.h.
|
inline |
indicate that a point has been accepted
Definition at line 37 of file statistics.h.
References accepted_, and accepted_negative_.
|
inline |
the total number of finally accepted events in this bin
Definition at line 80 of file statistics.h.
References accepted_.
|
inline |
the total number of acceptet events with negative weights
Definition at line 83 of file statistics.h.
References accepted_negative_.
|
inline |
the total number of attempted in this bin
Definition at line 77 of file statistics.h.
References attempted_.
|
inline |
the average absolute weight
Definition at line 61 of file statistics.h.
References average_abs_weight_, and n_iterations_.
|
inline |
the average weight
Definition at line 56 of file statistics.h.
References average_weight_, and n_iterations_.
Referenced by exsample::generator< Function, Random >::integral().
|
inline |
the variance of the weight
Definition at line 66 of file statistics.h.
References average_weight_variance_, and n_iterations_.
Referenced by exsample::generator< Function, Random >::integral_uncertainty(), and exsample::generator< Function, Random >::integral_variance().
|
inline |
the number of points in this iteration
Definition at line 71 of file statistics.h.
References iteration_points_.
|
inline |
|
inline |
|
inline |
reject a prviously accepted event
Definition at line 43 of file statistics.h.
References accepted_, and accepted_negative_.
Referenced by exsample::generator< Function, Random >::reject().
|
inline |
the sum of absolute values of the weights
Definition at line 89 of file statistics.h.
References sum_abs_weights_.
|
inline |
|
inline |
the sum of weights squared
Definition at line 92 of file statistics.h.
References sum_weights_squared_.
|
private |
the total number of finally accepted events in this bin
Definition at line 125 of file statistics.h.
Referenced by accept(), accepted(), and reject().
|
private |
the total number of acceptet events with negative weights
Definition at line 128 of file statistics.h.
Referenced by accept(), accepted_negative(), and reject().
|
private |
the total number of attempted in this bin
Definition at line 122 of file statistics.h.
Referenced by attempted().
|
private |
the average absolute weight
Definition at line 113 of file statistics.h.
Referenced by average_abs_weight().
|
private |
|
private |
the variance of the weight
Definition at line 116 of file statistics.h.
Referenced by average_weight_variance().
|
private |
the number of points in this iteration
Definition at line 119 of file statistics.h.
Referenced by iteration_points().
|
private |
|
private |
the number of iterations used to calculate the integral
Definition at line 143 of file statistics.h.
Referenced by average_abs_weight(), average_weight(), average_weight_variance(), and n_iterations().
|
private |
the sum of absolute values of the weights
Definition at line 134 of file statistics.h.
Referenced by sum_abs_weights().
|
private |
|
private |
the sum of weights squared
Definition at line 137 of file statistics.h.
Referenced by sum_weights_squared().