Herwig 7.3.0
|
General Monte Carlo statistics. More...
#include <GeneralStatistics.h>
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. | |
General Monte Carlo statistics.
Definition at line 31 of file GeneralStatistics.h.
|
inline |
The default constructor.
Definition at line 40 of file GeneralStatistics.h.
Referenced by Herwig::MultiIterationStatistics::nextIteration(), and reset().
|
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().
|
inlinevirtual |
|
inline |
Return the nnumber of accepted points.
Definition at line 117 of file GeneralStatistics.h.
References theAcceptedPoints.
|
inline |
Return the number of all points.
Definition at line 128 of file GeneralStatistics.h.
References theAllPoints.
|
inlinevirtual |
Return the average absolute weight.
Definition at line 140 of file GeneralStatistics.h.
References selectedPoints(), and sumAbsWeights().
|
inlinevirtual |
Return the variance of the average absolute weight.
Definition at line 172 of file GeneralStatistics.h.
References absWeightVariance(), and selectedPoints().
|
inlinevirtual |
Return the average weight.
Definition at line 133 of file GeneralStatistics.h.
References selectedPoints(), and sumWeights().
Referenced by Herwig::BinSampler::integratedXSec().
|
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().
|
inlinevirtual |
Return the last calculated chi^2.
Reimplemented in Herwig::MultiIterationStatistics.
Definition at line 58 of file GeneralStatistics.h.
void Herwig::GeneralStatistics::get | ( | PersistentIStream & | is | ) |
Function used to read in object persistently.
is | the persistent input stream read from. |
version | the version number of the object when written. |
|
inline |
Return the last weight encountered.
Definition at line 72 of file GeneralStatistics.h.
References theLastWeight.
Referenced by reject().
|
inline |
Return the maximum absolute weight.
Definition at line 77 of file GeneralStatistics.h.
References theMaxWeight.
|
inline |
Set the maximum absolute weight.
Definition at line 87 of file GeneralStatistics.h.
References theMaxWeight.
|
inline |
Return the minimum absolute weight.
Definition at line 82 of file GeneralStatistics.h.
References theMinWeight.
|
inline |
Set the minimum absolute weight.
Definition at line 92 of file GeneralStatistics.h.
References theMinWeight.
|
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.
void Herwig::GeneralStatistics::put | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
|
inlinevirtual |
Reject an event.
Definition at line 208 of file GeneralStatistics.h.
References lastWeight(), ThePEG::sqr(), theAcceptedPoints, theAllPoints, theNanPoints, theSelectedPoints, theSumAbsWeights, theSumSquaredWeights, and theSumWeights.
|
inline |
Reset these statistics.
Definition at line 63 of file GeneralStatistics.h.
References GeneralStatistics().
Referenced by Herwig::MultiIterationStatistics::nextIteration().
|
inlinevirtual |
Select an event.
Definition at line 179 of file GeneralStatistics.h.
References ThePEG::sqr(), theAllPoints, theLastWeight, theMaxWeight, theMinWeight, theNanPoints, theSelectedPoints, theSumAbsWeights, theSumSquaredWeights, and theSumWeights.
|
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().
|
inline |
Return the sum of absolute weights.
Definition at line 107 of file GeneralStatistics.h.
References theSumAbsWeights.
Referenced by absWeightVariance(), and averageAbsWeight().
|
inline |
Return the sum of squared weights.
Definition at line 102 of file GeneralStatistics.h.
References theSumSquaredWeights.
Referenced by absWeightVariance(), and weightVariance().
|
inline |
Return the sum of weights.
Definition at line 97 of file GeneralStatistics.h.
References theSumWeights.
Referenced by averageWeight(), and weightVariance().
|
inline |
Return the variance of weights.
Definition at line 147 of file GeneralStatistics.h.
References selectedPoints(), ThePEG::sqr(), sumSquaredWeights(), and sumWeights().
Referenced by averageWeightVariance().
|
private |
The number of accepted points.
Definition at line 285 of file GeneralStatistics.h.
Referenced by accept(), acceptedPoints(), and reject().
|
private |
The number of all points.
Definition at line 295 of file GeneralStatistics.h.
Referenced by allPoints(), reject(), and select().
|
private |
The last weight encountered.
Definition at line 300 of file GeneralStatistics.h.
Referenced by lastWeight(), and select().
|
private |
The maximum weight encountered.
Definition at line 255 of file GeneralStatistics.h.
Referenced by maxWeight(), and select().
|
private |
The minimum weight encountered.
Definition at line 260 of file GeneralStatistics.h.
Referenced by minWeight(), and select().
|
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().
|
private |
The number of selected points.
Definition at line 280 of file GeneralStatistics.h.
Referenced by reject(), select(), and selectedPoints().
|
private |
The sum of absolute values of weights.
Definition at line 275 of file GeneralStatistics.h.
Referenced by reject(), select(), and sumAbsWeights().
|
private |
The sum of weights squared.
Definition at line 270 of file GeneralStatistics.h.
Referenced by reject(), select(), and sumSquaredWeights().
|
private |
The sum of weights.
Definition at line 265 of file GeneralStatistics.h.
Referenced by reject(), select(), and sumWeights().