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

Monte Carlo statistics for multiple iterations. More...

#include <MultiIterationStatistics.h>

Inheritance diagram for Herwig::MultiIterationStatistics:

Public Member Functions

Standard constructors and destructors.
 MultiIterationStatistics ()
 The default constructor.
 
virtual ~MultiIterationStatistics ()
 The destructor.
 
void nextIteration ()
 Indicate the start of a new iteration.
 
const vector< GeneralStatistics > & iterations () const
 Return the iterations done so far.
 
vector< GeneralStatistics > & iterations ()
 Access the iterations done so far.
 
virtual double chi2 () const
 Return the last calculated chi^2.
 
virtual double averageWeight (bool useAll=false) const
 Return the average weight.
 
virtual double averageAbsWeight (bool useAll=false) const
 Return the average absolute weight.
 
virtual double averageWeightVariance (bool useAll=false) const
 Return the variance of the average weight.
 
virtual double averageAbsWeightVariance (bool useAll=false) const
 Return the variance of the average absolute weight.
 
unsigned int minIterationPoints () const
 Return the minimum number of events per iteration to take this iteration into account when calculating the total cross section.
 
void minIterationPoints (unsigned int n)
 Set the minimum number of events per iteration to take this iteration into account when calculating the total cross section.
 
bool useAllIterations () const
 Return true if integrals should be combined from all iterations.
 
void doUseAllIterations (bool yes=true)
 Indicate that integrals should be combined from all iterations.
 
- Public Member Functions inherited from ThePEG::Interfaced
virtual bool defaultInit ()
 
PPtr getParticle (PID) const
 
PDPtr getParticleData (PID) const
 
bool used () const
 
void useMe () const
 
tEGPtr generator () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
PPtr getParticle (PID) const
 
PDPtr getParticleData (PID) const
 
bool used () const
 
void useMe () const
 
tEGPtr generator () const
 
- Public Member Functions inherited from ThePEG::InterfacedBase
string fullName () const
 
string name () const
 
string path () const
 
string comment () const
 
void setup (istream &is)
 
void update ()
 
void init ()
 
virtual bool preInitialize () const
 
void initrun ()
 
void finish ()
 
void touch ()
 
void reset ()
 
void clear ()
 
InitState state () const
 
bool locked () const
 
bool touched () const
 
virtual IBPtr fullclone () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
virtual void debugme () const
 
void update ()
 
void init ()
 
virtual bool preInitialize () const
 
void initrun ()
 
void finish ()
 
void touch ()
 
void reset ()
 
void clear ()
 
InitState state () const
 
bool locked () const
 
bool touched () const
 
virtual IBPtr fullclone () const
 
- Public Member Functions inherited from ThePEG::Base
void debug () const
 
virtual void debugme () const
 
- Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted
CounterType referenceCount () const
 
- Public Member Functions inherited from ThePEG::Named
 Named (const string &newName=string())
 
 Named (const Named &)=default
 
const string & name () const
 
bool operator== (const Named &other) const
 
bool operator< (const Named &other) const
 
- Public Member Functions inherited from Herwig::GeneralStatistics
 GeneralStatistics ()
 The default constructor.
 
virtual ~GeneralStatistics ()
 The destructor.
 
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.
 
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.
 

Clone Methods.

vector< GeneralStatisticstheIterations
 The currently accumulated iterations.
 
unsigned int theMinIterationPoints
 The minimum number of events per iteration to take this iteration into account when calculating the total cross section.
 
bool theUseAllIterations
 True if integrals should be combined from all iterations.
 
virtual IBPtr clone () const
 Make a simple clone of this object.
 
virtual IBPtr fullclone () const
 Make a clone of this object, possibly modifying the cloned object to make it sane.
 

Functions used by the persistent I/O system.

void put (PersistentOStream &os) const
 Function used to write out object persistently.
 
void get (PersistentIStream &is)
 Function used to read in object persistently.
 
void persistentOutput (PersistentOStream &os) const
 Function used to write out object persistently.
 
void persistentInput (PersistentIStream &is, int version)
 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.
 
static void Init ()
 The standard Init function used to initialize the interfaces.
 

Additional Inherited Members

- Public Types inherited from ThePEG::InterfacedBase
enum  InitState
 
- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 
- Static Public Member Functions inherited from ThePEG::Interfaced
static void Init ()
 
- Static Public Member Functions inherited from ThePEG::InterfacedBase
static void Init ()
 
- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 
- Public Attributes inherited from ThePEG::InterfacedBase
 initializing
 
 uninitialized
 
 initialized
 
 runready
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 
- Protected Member Functions inherited from ThePEG::Interfaced
void reporeg (IBPtr object, string name) const
 
bool setDefaultReference (PtrT &ptr, string classname, string objectname)
 
 Interfaced (const string &newName)
 
 Interfaced (const Interfaced &i)
 
void setGenerator (tEGPtr generator)
 
- Protected Member Functions inherited from ThePEG::InterfacedBase
virtual void readSetup (istream &is)
 
virtual void doupdate ()
 
virtual void doinit ()
 
virtual void doinitrun ()
 
virtual void dofinish ()
 
virtual IVector getReferences ()
 
virtual void rebind (const TranslationMap &)
 
virtual IBPtr clone () const=0
 
 InterfacedBase (string newName)
 
 InterfacedBase (const InterfacedBase &i)
 
virtual void readSetup (istream &is)
 
virtual void doupdate ()
 
virtual void doinit ()
 
virtual void doinitrun ()
 
virtual void dofinish ()
 
virtual IVector getReferences ()
 
virtual void rebind (const TranslationMap &)
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
- Protected Member Functions inherited from ThePEG::Named
const Namedoperator= (const Named &other)
 
const string & name (const string &newName)
 
- Static Protected Member Functions inherited from ThePEG::Interfaced
static void registerRepository (IBPtr)
 
static void registerRepository (IBPtr, string newName)
 

Detailed Description

Monte Carlo statistics for multiple iterations.

Author
Simon Platzer

Definition at line 27 of file MultiIterationStatistics.h.

Member Function Documentation

◆ chi2()

virtual double Herwig::MultiIterationStatistics::chi2 ( ) const
virtual

Return the last calculated chi^2.

Reimplemented from Herwig::GeneralStatistics.

◆ clone()

virtual IBPtr Herwig::MultiIterationStatistics::clone ( ) const
protectedvirtual

Make a simple clone of this object.

Returns
a pointer to the new object.

Implements ThePEG::InterfacedBase.

Reimplemented in Herwig::BinSampler, Herwig::CellGridSampler, and Herwig::MonacoSampler.

◆ doUseAllIterations()

void Herwig::MultiIterationStatistics::doUseAllIterations ( bool  yes = true)
inline

Indicate that integrals should be combined from all iterations.

Definition at line 113 of file MultiIterationStatistics.h.

References theUseAllIterations.

◆ fullclone()

virtual IBPtr Herwig::MultiIterationStatistics::fullclone ( ) const
protectedvirtual

Make a clone of this object, possibly modifying the cloned object to make it sane.

Returns
a pointer to the new object.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in Herwig::BinSampler, Herwig::CellGridSampler, and Herwig::MonacoSampler.

◆ get()

void Herwig::MultiIterationStatistics::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.

◆ Init()

static void Herwig::MultiIterationStatistics::Init ( )
static

The standard Init function used to initialize the interfaces.

Called exactly once for each class by the class description system before the main function starts or when this class is dynamically loaded.

◆ iterations() [1/2]

vector< GeneralStatistics > & Herwig::MultiIterationStatistics::iterations ( )
inline

Access the iterations done so far.

Definition at line 64 of file MultiIterationStatistics.h.

References theIterations.

◆ iterations() [2/2]

const vector< GeneralStatistics > & Herwig::MultiIterationStatistics::iterations ( ) const
inline

Return the iterations done so far.

Definition at line 57 of file MultiIterationStatistics.h.

References theIterations.

Referenced by nextIteration().

◆ minIterationPoints() [1/2]

unsigned int Herwig::MultiIterationStatistics::minIterationPoints ( ) const
inline

Return the minimum number of events per iteration to take this iteration into account when calculating the total cross section.

Definition at line 97 of file MultiIterationStatistics.h.

References theMinIterationPoints.

◆ minIterationPoints() [2/2]

void Herwig::MultiIterationStatistics::minIterationPoints ( unsigned int  n)
inline

Set the minimum number of events per iteration to take this iteration into account when calculating the total cross section.

Definition at line 103 of file MultiIterationStatistics.h.

References theMinIterationPoints.

◆ nextIteration()

void Herwig::MultiIterationStatistics::nextIteration ( )
inline

Indicate the start of a new iteration.

Definition at line 49 of file MultiIterationStatistics.h.

References Herwig::GeneralStatistics::GeneralStatistics(), iterations(), and Herwig::GeneralStatistics::reset().

◆ persistentInput()

void Herwig::MultiIterationStatistics::persistentInput ( PersistentIStream is,
int  version 
)

Function used to read in object persistently.

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

◆ persistentOutput()

void Herwig::MultiIterationStatistics::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ put()

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

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ useAllIterations()

bool Herwig::MultiIterationStatistics::useAllIterations ( ) const
inline

Return true if integrals should be combined from all iterations.

Definition at line 108 of file MultiIterationStatistics.h.

References theUseAllIterations.

Member Data Documentation

◆ theIterations

vector<GeneralStatistics> Herwig::MultiIterationStatistics::theIterations
private

The currently accumulated iterations.

Definition at line 186 of file MultiIterationStatistics.h.

Referenced by iterations().

◆ theMinIterationPoints

unsigned int Herwig::MultiIterationStatistics::theMinIterationPoints
private

The minimum number of events per iteration to take this iteration into account when calculating the total cross section.

Definition at line 192 of file MultiIterationStatistics.h.

Referenced by minIterationPoints().

◆ theUseAllIterations

bool Herwig::MultiIterationStatistics::theUseAllIterations
private

True if integrals should be combined from all iterations.

Definition at line 197 of file MultiIterationStatistics.h.

Referenced by doUseAllIterations(), and useAllIterations().


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