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

This class inherits from SampleBase and implements the Auto Compensating Divide-and-Conquer phase space generator, ACDCGen. More...

#include <MPISampler.h>

Inheritance diagram for Herwig::MPISampler:

Public Types

typedef ACDCGenerator::ACDCGen< UseRandom, tProHdlPtr > SamplerType
 Typedef the underlying ACDCGen class.
 
- Public Types inherited from ThePEG::SamplerBase
enum  RunLevels
 
- Public Types inherited from ThePEG::InterfacedBase
enum  InitState
 
- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 

Public Member Functions

Standard constructors and destructors.
 MPISampler ()
 The default constructor.
 
 MPISampler (const MPISampler &)
 The copy constructor.
 
virtual ~MPISampler ()
 The destructor.
 
Virtual functions needed for SamplerBase
void setProcessHandler (tProHdlPtr mpih)
 Method to set the connected ProcessHandler pointer.
 
virtual void initialize ()
 Initialize the sampler, possibly doing presampling of the phase space.
 
virtual double generate ()
 Generarate a new phase space point and return a weight associated with it.
 
virtual int lastBin () const
 ACDCSampler is able to sample several different functions separately.
 
virtual void rejectLast ()
 Reject the last chosen phase space point.
 
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.
 
virtual CrossSection maxXSec () const
 Return the overestimated integrated cross section.
 
virtual double sumWeights () const
 Return the sum of the weights returned by generate() so far (of the events that were not rejeted).
 
virtual double sumWeights2 () const
 Return the sum of the weights squared returned by generate() so far (of the events that were not rejeted).
 
- Public Member Functions inherited from ThePEG::SamplerBase
void setEventHandler (tStdEHPtr eh)
 
virtual void initialize ()=0
 
virtual void prepare ()
 
virtual double generate ()=0
 
virtual void rejectLast ()=0
 
const vector< double > & lastPoint () const
 
virtual int lastBin () const
 
virtual CrossSection integratedXSec () const=0
 
virtual CrossSection integratedXSecErr () const=0
 
virtual CrossSection maxXSec () const
 
virtual double attempts () const
 
virtual double sumWeights () const=0
 
virtual double sumWeights2 () const=0
 
virtual bool almostUnweighted () const
 
void integrationList (const string &newIntegrationList)
 
const string & integrationList () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
void setEventHandler (tStdEHPtr eh)
 
virtual void initialize ()=0
 
virtual void prepare ()
 
virtual double generate ()=0
 
virtual void rejectLast ()=0
 
const vector< double > & lastPoint () const
 
virtual int lastBin () const
 
virtual CrossSection integratedXSec () const=0
 
virtual CrossSection integratedXSecErr () const=0
 
virtual CrossSection maxXSec () const
 
virtual double attempts () const
 
virtual double sumWeights () const=0
 
virtual double sumWeights2 () const=0
 
virtual bool almostUnweighted () const
 
- 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
 

Protected Member Functions

Clone Methods.
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.
 
- Protected Member Functions inherited from ThePEG::SamplerBase
vector< double > & lastPoint ()
 
tStdEHPtr eventHandler () const
 
- 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)
 

Standard Interfaced functions.

SamplerType theSampler
 The actual sampler object.
 
tProHdlPtr theProcessHandler
 The ProcessHandler that calls us.
 
double theEps
 The smallest possible division allowed.
 
double theMargin
 The factor controlling the loss of efficiency when compensating.
 
int theNTry
 The number of points to use to find initial average.
 
virtual void doupdate ()
 Check sanity of the object during the setup phase.
 
virtual void doinit ()
 Initialize this object after the setup phase before saving an EventGenerator to disk.
 
virtual void doinitrun ()
 Initialize this object.
 
virtual void dofinish ()
 Finalize this object.
 
virtual void rebind (const TranslationMap &trans)
 Rebind pointer to other Interfaced objects.
 
virtual IVector getReferences ()
 Return a vector of all pointers to Interfaced objects used in this object.
 
MPISampleroperator= (const MPISampler &)=delete
 Private and non-existent assignment operator.
 

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 void Init ()
 The standard Init function used to initialize the interfaces.
 

Additional Inherited Members

- Static Public Member Functions inherited from ThePEG::SamplerBase
static int runLevel ()
 
static void setRunLevel (int level)
 
static bool hasSetupFile ()
 
static void setupFileUsed (bool yes=true)
 
static long seed ()
 
static void setSeed (long s)
 
static unsigned int integratePerJob ()
 
static void setIntegratePerJob (unsigned int s)
 
static unsigned int integrationJobs ()
 
static void setIntegrationJobs (unsigned int s)
 
static void Init ()
 
- 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
 
- Static Protected Member Functions inherited from ThePEG::Interfaced
static void registerRepository (IBPtr)
 
static void registerRepository (IBPtr, string newName)
 

Detailed Description

This class inherits from SampleBase and implements the Auto Compensating Divide-and-Conquer phase space generator, ACDCGen.

In contrast to a ThePEG::ACDCSampler, this class can be called by ProcessHandler.

See also
The interfaces defined for MPISampler.
ACDCGen
ProcessHandler

Definition at line 38 of file MPISampler.h.

Member Typedef Documentation

◆ SamplerType

Typedef the underlying ACDCGen class.

Definition at line 43 of file MPISampler.h.

Member Function Documentation

◆ clone()

virtual IBPtr Herwig::MPISampler::clone ( ) const
inlineprotectedvirtual

Make a simple clone of this object.

Returns
a pointer to the new object.

Implements ThePEG::InterfacedBase.

◆ dofinish()

virtual void Herwig::MPISampler::dofinish ( )
protectedvirtual

Finalize this object.

Called in the run phase just after a run has ended. Used eg. to write out statistics.

Reimplemented from ThePEG::InterfacedBase.

◆ doinit()

virtual void Herwig::MPISampler::doinit ( )
inlineprotectedvirtual

Initialize this object after the setup phase before saving an EventGenerator to disk.

Exceptions
InitExceptionif object could not be initialized properly.

Reimplemented from ThePEG::InterfacedBase.

◆ doinitrun()

virtual void Herwig::MPISampler::doinitrun ( )
protectedvirtual

Initialize this object.

Called in the run phase just before a run begins.

Reimplemented from ThePEG::InterfacedBase.

◆ doupdate()

virtual void Herwig::MPISampler::doupdate ( )
inlineprotectedvirtual

Check sanity of the object during the setup phase.

Reimplemented from ThePEG::InterfacedBase.

◆ fullclone()

virtual IBPtr Herwig::MPISampler::fullclone ( ) const
inlineprotectedvirtual

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.

◆ generate()

virtual double Herwig::MPISampler::generate ( )
virtual

Generarate a new phase space point and return a weight associated with it.

This weight should preferably be 1.

Implements ThePEG::SamplerBase.

◆ getReferences()

virtual IVector Herwig::MPISampler::getReferences ( )
inlineprotectedvirtual

Return a vector of all pointers to Interfaced objects used in this object.

Returns
a vector of pointers.

Reimplemented from ThePEG::InterfacedBase.

◆ Init()

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

◆ initialize()

virtual void Herwig::MPISampler::initialize ( )
virtual

Initialize the sampler, possibly doing presampling of the phase space.

Implements ThePEG::SamplerBase.

◆ integratedXSec()

virtual CrossSection Herwig::MPISampler::integratedXSec ( ) const
virtual

Return the total integrated cross section determined from the Monte Carlo sampling so far.

Implements ThePEG::SamplerBase.

◆ integratedXSecErr()

virtual CrossSection Herwig::MPISampler::integratedXSecErr ( ) const
virtual

Return the error on the total integrated cross section determined from the Monte Carlo sampling so far.

Implements ThePEG::SamplerBase.

◆ lastBin()

virtual int Herwig::MPISampler::lastBin ( ) const
virtual

ACDCSampler is able to sample several different functions separately.

This function returns the last chosen function.

Reimplemented from ThePEG::SamplerBase.

◆ maxXSec()

virtual CrossSection Herwig::MPISampler::maxXSec ( ) const
virtual

Return the overestimated integrated cross section.

Reimplemented from ThePEG::SamplerBase.

◆ persistentInput()

void Herwig::MPISampler::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::MPISampler::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ rebind()

virtual void Herwig::MPISampler::rebind ( const TranslationMap trans)
inlineprotectedvirtual

Rebind pointer to other Interfaced objects.

Called in the setup phase after all objects used in an EventGenerator has been cloned so that the pointers will refer to the cloned objects afterwards.

Parameters
transa TranslationMap relating the original objects to their respective clones.
Exceptions
RebindExceptionif no cloned object was found for a given pointer.

Reimplemented from ThePEG::InterfacedBase.

◆ rejectLast()

virtual void Herwig::MPISampler::rejectLast ( )
virtual

Reject the last chosen phase space point.

Implements ThePEG::SamplerBase.

◆ setProcessHandler()

void Herwig::MPISampler::setProcessHandler ( tProHdlPtr  mpih)
inline

Method to set the connected ProcessHandler pointer.

◆ sumWeights()

virtual double Herwig::MPISampler::sumWeights ( ) const
virtual

Return the sum of the weights returned by generate() so far (of the events that were not rejeted).

Implements ThePEG::SamplerBase.

◆ sumWeights2()

virtual double Herwig::MPISampler::sumWeights2 ( ) const
virtual

Return the sum of the weights squared returned by generate() so far (of the events that were not rejeted).

Implements ThePEG::SamplerBase.

Member Data Documentation

◆ theEps

double Herwig::MPISampler::theEps
private

The smallest possible division allowed.

Definition at line 233 of file MPISampler.h.

◆ theMargin

double Herwig::MPISampler::theMargin
private

The factor controlling the loss of efficiency when compensating.

Definition at line 238 of file MPISampler.h.

◆ theNTry

int Herwig::MPISampler::theNTry
private

The number of points to use to find initial average.


Definition at line 243 of file MPISampler.h.

◆ theProcessHandler

tProHdlPtr Herwig::MPISampler::theProcessHandler
private

The ProcessHandler that calls us.

Definition at line 228 of file MPISampler.h.

◆ theSampler

SamplerType Herwig::MPISampler::theSampler
private

The actual sampler object.

Definition at line 223 of file MPISampler.h.


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