#include <SamplerBase.h>
Public Member Functions | |
void | setEventHandler (tStdEHPtr eh) |
Set the event handler for which the function StandardEventHandler::dSigDR(const vector<double> &) function returns the cross section for the chosen phase space point. | |
Standard constructors and destructors. | |
virtual | ~SamplerBase () |
Destructor. | |
Virtual functions to be overridden by sub-classes. | |
virtual void | initialize ()=0 |
Initialize the the sampler, possibly doing presampling of the phase space. | |
virtual double | generate ()=0 |
Generarate a new phase space point and return a weight associated with it. | |
virtual void | rejectLast ()=0 |
Reject the last chosen phase space point. | |
const vector< double > & | lastPoint () const |
Return the last generated phase space point. | |
virtual int | lastBin () const |
If the sampler is able to sample several different functions separately, this function should return the last chosen function. | |
virtual CrossSection | integratedXSec () const =0 |
Return the total integrated cross section determined from the Monte Carlo sampling so far. | |
virtual CrossSection | integratedXSecErr () const =0 |
Return the error on the total integrated cross section determined from the Monte Carlo sampling so far. | |
virtual CrossSection | maxXSec () const =0 |
Return the overestimated integrated cross section. | |
virtual double | sumWeights () const =0 |
Return the sum of the weights returned by generate() so far (of the events that were not rejeted). | |
Functions used by the persistent I/O system. | |
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. | |
Static Public Member Functions | |
static void | Init () |
Standard Init function used to initialize the interfaces. | |
Protected Member Functions | |
vector< double > & | lastPoint () |
Return the last generated phase space point. | |
tStdEHPtr | eventHandler () const |
Return the associated event handler. | |
Private Member Functions | |
SamplerBase & | operator= (const SamplerBase &) |
Private and non-existent assignment operator. | |
Private Attributes | |
tStdEHPtr | theEventHandler |
The associated event handler. | |
vector< double > | theLastPoint |
The last generated phase space point. | |
Static Private Attributes | |
static AbstractClassDescription < SamplerBase > | initSamplerBase |
Describe an abstract base class with persistent data. |
The class should be able to sample a unit hyper-cube in arbitrary dimensions. The points need not necessarily be sampled with unit weight.
The virtual methods to be implemented by concrete sub-classes are initialize(), generate() and rejectLast().
Definition at line 35 of file SamplerBase.h.
virtual double ThePEG::SamplerBase::generate | ( | ) | [pure virtual] |
Generarate a new phase space point and return a weight associated with it.
This weight should preferably be 1.
Implemented in ThePEG::ACDCSampler.
virtual int ThePEG::SamplerBase::lastBin | ( | ) | const [inline, virtual] |
If the sampler is able to sample several different functions separately, this function should return the last chosen function.
This default version always returns 0.
Reimplemented in ThePEG::ACDCSampler.
Definition at line 85 of file SamplerBase.h.
void ThePEG::SamplerBase::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
Reimplemented from ThePEG::Interfaced.
Reimplemented in ThePEG::ACDCSampler.
void ThePEG::SamplerBase::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. |
Reimplemented from ThePEG::Interfaced.
Reimplemented in ThePEG::ACDCSampler.