herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.4

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. More...
 
- 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. More...
 
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. More...
 
virtual int lastBin () const
 ACDCSampler is able to sample several different functions separately. More...
 
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).
 
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 ThePEG::SamplerBase
void setEventHandler (tStdEHPtr eh)
 
virtual void prepare ()
 
const vector< double > & lastPoint () const
 
virtual double attempts () const
 
virtual bool almostUnweighted () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
virtual void prepare ()
 
const vector< double > & lastPoint () const
 
virtual double attempts () const
 
virtual bool almostUnweighted () const
 
void integrationList (const string &newIntegrationList)
 
const string & integrationList () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
- 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())
 
const string & name () const
 
bool operator== (const Named &other) const
 
bool operator< (const Named &other) const
 

Static Public Member Functions

static void Init ()
 The standard Init function used to initialize the interfaces. More...
 
- Static Public Member Functions inherited from ThePEG::SamplerBase
static void Init ()
 
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 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...
 
Standard Interfaced functions.
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. More...
 
virtual void doinitrun ()
 Initialize this object. More...
 
virtual void dofinish ()
 Finalize this object. More...
 
virtual void rebind (const TranslationMap &trans)
 Rebind pointer to other Interfaced objects. More...
 
virtual IVector getReferences ()
 Return a vector of all pointers to Interfaced objects used in this object. More...
 
- 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
 InterfacedBase (string newName)
 
 InterfacedBase (const InterfacedBase &i)
 
virtual void readSetup (istream &is)
 
virtual void readSetup (istream &is)
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const 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)
 

Private Member Functions

MPISampleroperator= (const MPISampler &)
 Private and non-existent assignment operator.
 

Private Attributes

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.
 

Static Private Attributes

static ClassDescription< MPISamplerinitMPISampler
 Describe a concrete class with persistent data.
 

Additional Inherited Members

- 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.

◆ 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.

◆ 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.

◆ 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.

◆ setProcessHandler()

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

Method to set the connected ProcessHandler pointer.


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