Herwig
7.2.1
|
MonacoSampler samples XCombs bins using using Monaco. More...
#include <MonacoSampler.h>
Public Member Functions | |
Ptr< MonacoSampler >::ptr | cloneMe () const |
Clone this object. | |
virtual double | generate () |
Generate the next point and return its weight; store the point in lastPoint(). | |
virtual void | adapt () |
Adapt this sampler after an iteration has been run. | |
virtual bool | existsGrid () const |
Return true, if grid data exists for this sampler. | |
virtual void | saveGrid () const |
Save grid data. | |
virtual void | initialize (bool progress) |
Initialize this bin sampler. More... | |
virtual void | finalize (bool) |
Finalize this sampler. | |
virtual void | fromXML (const XML::Element &) |
Fill Monaco grid data from an XML element. | |
virtual XML::Element | toXML () const |
Return an XML element for the data of the Monaco grid. | |
Standard constructors and destructors. | |
MonacoSampler () | |
The default constructor. | |
virtual | ~MonacoSampler () |
The destructor. | |
Functions used by the persistent I/O system. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. More... | |
Public Member Functions inherited from Herwig::BinSampler | |
Ptr< BinSampler >::ptr | cloneMe () const |
Clone this object. | |
double | evaluate (vector< double > p, bool remap=true) |
Evaluate the cross section. | |
double | bias () const |
Return the bias with which this sampler is selected. More... | |
void | bias (double b) |
Set the bias with which this sampler is selected. | |
void | eventHandler (tStdEHPtr eh) |
Set the event handler. | |
tStdEHPtr | eventHandler () const |
Return the event handler. | |
void | sampler (Ptr< GeneralSampler >::tptr) |
Set the containing sampler. | |
Ptr< GeneralSampler >::tptr | sampler () const |
Get the containing sampler. | |
int | bin () const |
Return the bin. | |
void | bin (int b) |
Set the bin. | |
string | process () const |
Return a string describing the process handled by this sampler. | |
string | shortprocess () const |
Return a short string describing the process handled by this sampler. | |
string | id () const |
Return a string identifying the process handled by this sampler. | |
const vector< double > & | lastPoint () const |
Return the last generated point. | |
vector< double > & | lastPoint () |
Access the last generated point. | |
double | referenceWeight () const |
Return the reference weight to be used. | |
void | referenceWeight (double w) |
Set the reference weight to be used. | |
virtual bool | canUnweight () const |
Return true, if this sampler can provide unweighted events; if the proposal density is not an overestimate, weights larger than one can be generated, the handling of these points being subject to the GeneralSampler class. | |
virtual bool | adaptsOnTheFly () const |
Return true, if this sampler adapts on the fly while generating events. More... | |
virtual bool | compensating () const |
If this sampler features a compensation algorithm, return true if more events need to be generated to finish the compensation. | |
bool | weighted () const |
Return true, if weighted events should be generated. | |
void | doWeighted (bool yes=true) |
Indicate that weighted events should be generated. | |
void | fillRemappers (bool progress) |
Fill and finalize the remappers present. | |
void | saveRemappers () const |
Write remappers to grid file. | |
void | saveIntegrationData () const |
Write integration data to grid files. | |
void | readIntegrationData () |
Read integration data from grid files. | |
void | setupRemappers (bool progress) |
Read remappers from grid file. | |
void | runIteration (unsigned long n, bool progress) |
Run a single iteration of n points, optionally printing a progress bar to cout. More... | |
bool | initialized () const |
Return true, if this sampler has already been initialized. | |
void | isInitialized () |
Indicate that this sampler has already been initialized. | |
bool | integrated () const |
Return true, if integration has already been performed. | |
bool | remappersFilled () const |
Return true, if remappers have been set up. | |
bool | hasGrids () const |
Return true, if this sampler has already read grid data. | |
void | didReadGrids () |
Indicate that this sampler has already read grid data. | |
virtual CrossSection | integratedXSec () const |
Return the total integrated cross section determined from the Monte Carlo sampling so far. | |
virtual CrossSection | integratedXSecErr () const |
Return the error on the total integrated cross section determined from the Monte Carlo sampling so far. | |
int | dimension () const |
Return the dimension. | |
unsigned long | initialPoints () const |
Return the number of points to be used for initial integration. | |
void | initialPoints (unsigned long n) |
Set the number of points to be used for initial integration. | |
size_t | nIterations () const |
Return the number of iterations to be considered for initialization. | |
void | nIterations (size_t n) |
Set the number of iterations to be considered for initialization. | |
void | enhancementFactor (double f) |
Set the factor to enhance the number of points for the next iteration. | |
double | enhancementFactor () const |
Return the factor to enhance the number of points for the next iteration. | |
string | randomNumberString () const |
Return the folder for the random number plots. | |
double | kappa () const |
In the AlmostUnweighted mode we do not need to unweight the events to the reference weight. More... | |
BinSampler () | |
The default constructor. | |
virtual | ~BinSampler () |
The destructor. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. More... | |
Public Member Functions inherited from Herwig::MultiIterationStatistics | |
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. | |
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. | |
MultiIterationStatistics () | |
The default constructor. | |
virtual | ~MultiIterationStatistics () |
The destructor. | |
void | put (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | get (PersistentIStream &is) |
Function used to read in object persistently. More... | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. More... | |
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 |
void | persistentOutput (PersistentOStream &os) const |
void | persistentInput (PersistentIStream &is, int version) |
Public Member Functions inherited from ThePEG::InterfacedBase | |
string | fullName () const |
string | name () const |
string | path () const |
string | comment () const |
void | setup (istream &is) |
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 |
void | persistentOutput (PersistentOStream &os) const |
void | persistentInput (PersistentIStream &is, int version) |
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 |
void | persistentOutput (PersistentOStream &os) const |
void | persistentInput (PersistentIStream &is, int version) |
Public Member Functions inherited from ThePEG::Base | |
void | debug () 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 | |
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 | 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. | |
GeneralStatistics () | |
The default constructor. | |
virtual | ~GeneralStatistics () |
The destructor. | |
void | put (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | get (PersistentIStream &is) |
Function used to read in object persistently. More... | |
Static Public Member Functions | |
static void | Init () |
The standard Init function used to initialize the interfaces. More... | |
Static Public Member Functions inherited from Herwig::BinSampler | |
static void | Init () |
The standard Init function used to initialize the interfaces. More... | |
Static Public Member Functions inherited from Herwig::MultiIterationStatistics | |
static void | Init () |
The standard Init function used to initialize the interfaces. More... | |
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 () |
Protected Member Functions | |
Clone Methods. | |
virtual IBPtr | clone () const |
Make a simple clone of this object. More... | |
virtual IBPtr | fullclone () const |
Make a clone of this object, possibly modifying the cloned object to make it sane. More... | |
Clone Methods. | |
Clone Methods. | |
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 | |
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 &) |
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 &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
ReferenceCounted (const ReferenceCounted &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
Protected Member Functions inherited from ThePEG::Named | |
const Named & | operator= (const Named &other) |
const string & | name (const string &newName) |
Private Member Functions | |
MonacoSampler & | operator= (const MonacoSampler &)=delete |
The assignment operator is private and must never be called. More... | |
Private Attributes | |
double | theAlpha |
Rate of grid modification (0 for no modification) | |
size_t | theGridDivisions |
Number of grid divisions per dimension. | |
boost::numeric::ublas::matrix< double > | theGrid |
Grid boundaries (first index: dimension of random numbers, second index: dimension of partitions per random number) | |
boost::numeric::ublas::matrix< double > | theGridData |
Collected value per grid bin. | |
size_t | theIterationPoints |
Number of points collected in iteration so far. | |
Additional Inherited Members | |
Public Types inherited from Herwig::BinSampler | |
typedef pair< string, size_t > | RandomNumberIndex |
Public Types inherited from ThePEG::InterfacedBase | |
enum | InitState |
Public Types inherited from ThePEG::Pointer::ReferenceCounted | |
typedef unsigned int | CounterType |
Public Attributes inherited from Herwig::BinSampler | |
map< RandomNumberIndex, pair< RandomNumberHistogram, double > > | RandomNumberHistograms |
Public Attributes inherited from ThePEG::InterfacedBase | |
initializing | |
uninitialized | |
initialized | |
runready | |
Public Attributes inherited from ThePEG::Pointer::ReferenceCounted | |
const unsigned long | uniqueId |
Static Protected Member Functions inherited from ThePEG::Interfaced | |
static void | registerRepository (IBPtr) |
static void | registerRepository (IBPtr, string newName) |
MonacoSampler samples XCombs bins using using Monaco.
Definition at line 40 of file MonacoSampler.h.
|
protectedvirtual |
Make a simple clone of this object.
Reimplemented from Herwig::BinSampler.
|
protectedvirtual |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from Herwig::BinSampler.
|
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.
|
virtual |
Initialize this bin sampler.
This default version calls runIteration.
Reimplemented from Herwig::BinSampler.
|
privatedelete |
The assignment operator is private and must never be called.
In fact, it should not even be implemented.
void Herwig::MonacoSampler::persistentInput | ( | PersistentIStream & | is, |
int | version | ||
) |
Function used to read in object persistently.
is | the persistent input stream read from. |
version | the version number of the object when written. |
void Herwig::MonacoSampler::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |