herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
exsample::statistics Class Reference

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
 

Detailed Description

statistics is a helper class for keeping track of event generation statistics.

Definition at line 20 of file statistics.h.

Member Function Documentation

◆ accept()

void exsample::statistics::accept ( double  weight)
inline

indicate that a point has been accepted

Definition at line 37 of file statistics.h.

References accepted_, and accepted_negative_.

◆ accepted()

unsigned long exsample::statistics::accepted ( ) const
inline

the total number of finally accepted events in this bin

Definition at line 80 of file statistics.h.

References accepted_.

◆ accepted_negative()

unsigned long exsample::statistics::accepted_negative ( ) const
inline

the total number of acceptet events with negative weights

Definition at line 83 of file statistics.h.

References accepted_negative_.

◆ attempted()

unsigned long exsample::statistics::attempted ( ) const
inline

the total number of attempted in this bin

Definition at line 77 of file statistics.h.

References attempted_.

◆ average_abs_weight()

double exsample::statistics::average_abs_weight ( ) const
inline

the average absolute weight

Definition at line 61 of file statistics.h.

References average_abs_weight_, and n_iterations_.

◆ average_weight()

double exsample::statistics::average_weight ( ) const
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().

◆ average_weight_variance()

double exsample::statistics::average_weight_variance ( ) const
inline

◆ iteration_points()

unsigned long exsample::statistics::iteration_points ( ) const
inline

the number of points in this iteration

Definition at line 71 of file statistics.h.

References iteration_points_.

◆ max_weight()

double exsample::statistics::max_weight ( ) const
inline

the maximum weight

Definition at line 95 of file statistics.h.

References max_weight_.

◆ n_iterations()

unsigned long exsample::statistics::n_iterations ( ) const
inline

the number of iterations

Definition at line 74 of file statistics.h.

References n_iterations_.

◆ reject()

void exsample::statistics::reject ( double  weight)
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().

◆ sum_abs_weights()

double exsample::statistics::sum_abs_weights ( ) const
inline

the sum of absolute values of the weights

Definition at line 89 of file statistics.h.

References sum_abs_weights_.

◆ sum_weights()

double exsample::statistics::sum_weights ( ) const
inline

the sum of weights

Definition at line 86 of file statistics.h.

References sum_weights_.

◆ sum_weights_squared()

double exsample::statistics::sum_weights_squared ( ) const
inline

the sum of weights squared

Definition at line 92 of file statistics.h.

References sum_weights_squared_.

Member Data Documentation

◆ accepted_

unsigned long exsample::statistics::accepted_
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().

◆ accepted_negative_

unsigned long exsample::statistics::accepted_negative_
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().

◆ attempted_

unsigned long exsample::statistics::attempted_
private

the total number of attempted in this bin

Definition at line 122 of file statistics.h.

Referenced by attempted().

◆ average_abs_weight_

double exsample::statistics::average_abs_weight_
private

the average absolute weight

Definition at line 113 of file statistics.h.

Referenced by average_abs_weight().

◆ average_weight_

double exsample::statistics::average_weight_
private

the average weight

Definition at line 110 of file statistics.h.

Referenced by average_weight().

◆ average_weight_variance_

double exsample::statistics::average_weight_variance_
private

the variance of the weight

Definition at line 116 of file statistics.h.

Referenced by average_weight_variance().

◆ iteration_points_

unsigned long exsample::statistics::iteration_points_
private

the number of points in this iteration

Definition at line 119 of file statistics.h.

Referenced by iteration_points().

◆ max_weight_

double exsample::statistics::max_weight_
private

the maximum weight

Definition at line 140 of file statistics.h.

Referenced by max_weight().

◆ n_iterations_

unsigned long exsample::statistics::n_iterations_
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().

◆ sum_abs_weights_

double exsample::statistics::sum_abs_weights_
private

the sum of absolute values of the weights

Definition at line 134 of file statistics.h.

Referenced by sum_abs_weights().

◆ sum_weights_

double exsample::statistics::sum_weights_
private

the sum of weights

Definition at line 131 of file statistics.h.

Referenced by sum_weights().

◆ sum_weights_squared_

double exsample::statistics::sum_weights_squared_
private

the sum of weights squared

Definition at line 137 of file statistics.h.

Referenced by sum_weights_squared().


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