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

General Monte Carlo statistics. More...

#include <GeneralStatistics.h>

Inheritance diagram for Herwig::GeneralStatistics:

Public Member Functions

Standard constructors and destructors.
 GeneralStatistics ()
 The default constructor.
 
virtual ~GeneralStatistics ()
 The destructor.
 
virtual double chi2 () const
 Return the last calculated chi^2.
 
void reset ()
 Reset these statistics.
 
double lastWeight () const
 Return the last weight encountered.
 
double maxWeight () const
 Return the maximum absolute weight.
 
double minWeight () const
 Return the minimum absolute weight.
 
void maxWeight (double w)
 Set the maximum absolute weight.
 
void minWeight (double w)
 Set the minimum absolute weight.
 
double sumWeights () const
 Return the sum of weights.
 
double sumSquaredWeights () const
 Return the sum of squared weights.
 
double sumAbsWeights () const
 Return the sum of absolute weights.
 
unsigned long selectedPoints () const
 Return the number of selected points.
 
unsigned long acceptedPoints () const
 Return the nnumber of accepted points.
 
unsigned long nanPoints () const
 Return the number of points where a nan or inf weight has been encountered.
 
unsigned long allPoints () const
 Return the number of all points.
 
virtual double averageWeight () const
 Return the average weight.
 
virtual double averageAbsWeight () const
 Return the average absolute weight.
 
double weightVariance () const
 Return the variance of weights.
 
double absWeightVariance () const
 Return the variance of absolute weights.
 
virtual double averageWeightVariance () const
 Return the variance of the average weight.
 
virtual double averageAbsWeightVariance () const
 Return the variance of the average absolute weight.
 
virtual void select (double weight, bool doIntegral=true)
 Select an event.
 
virtual void accept ()
 Accept an event.
 
virtual void reject ()
 Reject an event.
 

Functions used by the persistent I/O system.

double theMaxWeight
 The maximum weight encountered.
 
double theMinWeight
 The minimum weight encountered.
 
double theSumWeights
 The sum of weights.
 
double theSumSquaredWeights
 The sum of weights squared.
 
double theSumAbsWeights
 The sum of absolute values of weights.
 
unsigned long theSelectedPoints
 The number of selected points.
 
unsigned long theAcceptedPoints
 The number of accepted points.
 
unsigned long theNanPoints
 The number of points where an nan or inf weight was encountered.
 
unsigned long theAllPoints
 The number of all points.
 
double theLastWeight
 The last weight encountered.
 
void put (PersistentOStream &os) const
 Function used to write out object persistently.
 
void get (PersistentIStream &is)
 Function used to read in object persistently.
 
void fromXML (const XML::Element &)
 Fill statistics data from an XML element.
 
XML::Element toXML () const
 Return an XML element for the data of this statistics.
 

Detailed Description

General Monte Carlo statistics.

Author
Simon Platzer

Definition at line 31 of file GeneralStatistics.h.

Constructor & Destructor Documentation

◆ GeneralStatistics()

Herwig::GeneralStatistics::GeneralStatistics ( )
inline

The default constructor.

Definition at line 40 of file GeneralStatistics.h.

Referenced by Herwig::MultiIterationStatistics::nextIteration(), and reset().

Member Function Documentation

◆ absWeightVariance()

double Herwig::GeneralStatistics::absWeightVariance ( ) const
inline

Return the variance of absolute weights.

Definition at line 156 of file GeneralStatistics.h.

References selectedPoints(), ThePEG::sqr(), sumAbsWeights(), and sumSquaredWeights().

Referenced by averageAbsWeightVariance().

◆ accept()

virtual void Herwig::GeneralStatistics::accept ( )
inlinevirtual

Accept an event.

Definition at line 201 of file GeneralStatistics.h.

References theAcceptedPoints.

◆ acceptedPoints()

unsigned long Herwig::GeneralStatistics::acceptedPoints ( ) const
inline

Return the nnumber of accepted points.

Definition at line 117 of file GeneralStatistics.h.

References theAcceptedPoints.

◆ allPoints()

unsigned long Herwig::GeneralStatistics::allPoints ( ) const
inline

Return the number of all points.

Definition at line 128 of file GeneralStatistics.h.

References theAllPoints.

◆ averageAbsWeight()

virtual double Herwig::GeneralStatistics::averageAbsWeight ( ) const
inlinevirtual

Return the average absolute weight.

Definition at line 140 of file GeneralStatistics.h.

References selectedPoints(), and sumAbsWeights().

◆ averageAbsWeightVariance()

virtual double Herwig::GeneralStatistics::averageAbsWeightVariance ( ) const
inlinevirtual

Return the variance of the average absolute weight.

Definition at line 172 of file GeneralStatistics.h.

References absWeightVariance(), and selectedPoints().

◆ averageWeight()

virtual double Herwig::GeneralStatistics::averageWeight ( ) const
inlinevirtual

Return the average weight.

Definition at line 133 of file GeneralStatistics.h.

References selectedPoints(), and sumWeights().

Referenced by Herwig::BinSampler::integratedXSec().

◆ averageWeightVariance()

virtual double Herwig::GeneralStatistics::averageWeightVariance ( ) const
inlinevirtual

Return the variance of the average weight.

Definition at line 165 of file GeneralStatistics.h.

References selectedPoints(), and weightVariance().

Referenced by Herwig::BinSampler::integratedXSecErr().

◆ chi2()

virtual double Herwig::GeneralStatistics::chi2 ( ) const
inlinevirtual

Return the last calculated chi^2.

Reimplemented in Herwig::MultiIterationStatistics.

Definition at line 58 of file GeneralStatistics.h.

◆ get()

void Herwig::GeneralStatistics::get ( PersistentIStream is)

Function used to read in object persistently.

Parameters
isthe persistent input stream read from.
versionthe version number of the object when written.

◆ lastWeight()

double Herwig::GeneralStatistics::lastWeight ( ) const
inline

Return the last weight encountered.

Definition at line 72 of file GeneralStatistics.h.

References theLastWeight.

Referenced by reject().

◆ maxWeight() [1/2]

double Herwig::GeneralStatistics::maxWeight ( ) const
inline

Return the maximum absolute weight.

Definition at line 77 of file GeneralStatistics.h.

References theMaxWeight.

◆ maxWeight() [2/2]

void Herwig::GeneralStatistics::maxWeight ( double  w)
inline

Set the maximum absolute weight.

Definition at line 87 of file GeneralStatistics.h.

References theMaxWeight.

◆ minWeight() [1/2]

double Herwig::GeneralStatistics::minWeight ( ) const
inline

Return the minimum absolute weight.

Definition at line 82 of file GeneralStatistics.h.

References theMinWeight.

◆ minWeight() [2/2]

void Herwig::GeneralStatistics::minWeight ( double  w)
inline

Set the minimum absolute weight.

Definition at line 92 of file GeneralStatistics.h.

References theMinWeight.

◆ nanPoints()

unsigned long Herwig::GeneralStatistics::nanPoints ( ) const
inline

Return the number of points where a nan or inf weight has been encountered.

Definition at line 123 of file GeneralStatistics.h.

References theNanPoints.

◆ put()

void Herwig::GeneralStatistics::put ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ reject()

virtual void Herwig::GeneralStatistics::reject ( )
inlinevirtual

◆ reset()

void Herwig::GeneralStatistics::reset ( )
inline

Reset these statistics.

Definition at line 63 of file GeneralStatistics.h.

References GeneralStatistics().

Referenced by Herwig::MultiIterationStatistics::nextIteration().

◆ select()

virtual void Herwig::GeneralStatistics::select ( double  weight,
bool  doIntegral = true 
)
inlinevirtual

◆ selectedPoints()

unsigned long Herwig::GeneralStatistics::selectedPoints ( ) const
inline

Return the number of selected points.

Definition at line 112 of file GeneralStatistics.h.

References theSelectedPoints.

Referenced by absWeightVariance(), averageAbsWeight(), averageAbsWeightVariance(), averageWeight(), averageWeightVariance(), and weightVariance().

◆ sumAbsWeights()

double Herwig::GeneralStatistics::sumAbsWeights ( ) const
inline

Return the sum of absolute weights.

Definition at line 107 of file GeneralStatistics.h.

References theSumAbsWeights.

Referenced by absWeightVariance(), and averageAbsWeight().

◆ sumSquaredWeights()

double Herwig::GeneralStatistics::sumSquaredWeights ( ) const
inline

Return the sum of squared weights.

Definition at line 102 of file GeneralStatistics.h.

References theSumSquaredWeights.

Referenced by absWeightVariance(), and weightVariance().

◆ sumWeights()

double Herwig::GeneralStatistics::sumWeights ( ) const
inline

Return the sum of weights.

Definition at line 97 of file GeneralStatistics.h.

References theSumWeights.

Referenced by averageWeight(), and weightVariance().

◆ weightVariance()

double Herwig::GeneralStatistics::weightVariance ( ) const
inline

Return the variance of weights.

Definition at line 147 of file GeneralStatistics.h.

References selectedPoints(), ThePEG::sqr(), sumSquaredWeights(), and sumWeights().

Referenced by averageWeightVariance().

Member Data Documentation

◆ theAcceptedPoints

unsigned long Herwig::GeneralStatistics::theAcceptedPoints
private

The number of accepted points.

Definition at line 285 of file GeneralStatistics.h.

Referenced by accept(), acceptedPoints(), and reject().

◆ theAllPoints

unsigned long Herwig::GeneralStatistics::theAllPoints
private

The number of all points.

Definition at line 295 of file GeneralStatistics.h.

Referenced by allPoints(), reject(), and select().

◆ theLastWeight

double Herwig::GeneralStatistics::theLastWeight
private

The last weight encountered.

Definition at line 300 of file GeneralStatistics.h.

Referenced by lastWeight(), and select().

◆ theMaxWeight

double Herwig::GeneralStatistics::theMaxWeight
private

The maximum weight encountered.

Definition at line 255 of file GeneralStatistics.h.

Referenced by maxWeight(), and select().

◆ theMinWeight

double Herwig::GeneralStatistics::theMinWeight
private

The minimum weight encountered.

Definition at line 260 of file GeneralStatistics.h.

Referenced by minWeight(), and select().

◆ theNanPoints

unsigned long Herwig::GeneralStatistics::theNanPoints
private

The number of points where an nan or inf weight was encountered.

Definition at line 290 of file GeneralStatistics.h.

Referenced by nanPoints(), reject(), and select().

◆ theSelectedPoints

unsigned long Herwig::GeneralStatistics::theSelectedPoints
private

The number of selected points.

Definition at line 280 of file GeneralStatistics.h.

Referenced by reject(), select(), and selectedPoints().

◆ theSumAbsWeights

double Herwig::GeneralStatistics::theSumAbsWeights
private

The sum of absolute values of weights.

Definition at line 275 of file GeneralStatistics.h.

Referenced by reject(), select(), and sumAbsWeights().

◆ theSumSquaredWeights

double Herwig::GeneralStatistics::theSumSquaredWeights
private

The sum of weights squared.

Definition at line 270 of file GeneralStatistics.h.

Referenced by reject(), select(), and sumSquaredWeights().

◆ theSumWeights

double Herwig::GeneralStatistics::theSumWeights
private

The sum of weights.

Definition at line 265 of file GeneralStatistics.h.

Referenced by reject(), select(), and sumWeights().


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