ThePEG  1.8.0
Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
ThePEG::StepHandler Class Reference

StepHandler is the base class for implementing any model for a step in the event generation chain. More...

#include <StepHandler.h>

Inheritance diagram for ThePEG::StepHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Standard constructors and destructors.
virtual ~StepHandler ()
 The destructor.
Virtual functions to be implemented by concrete sub-classes.
virtual void handle (EventHandler &eh, const tPVector &tagged, const Hint &hint)=0
 The main function called by the EventHandler class to perform a step.
Access to the calling EventHandler and current Step.
tEHPtr eventHandler () const
 Get a pointer to the EventHandler which made the last call to handle().
void eventHandler (tEHPtr)
 Set a pointer to the EventHandler which made the last call to handle().
tStepPtr newStep ()
 Return a pointer to a new step.
tStepPtr currentStep ()
 If a new step has been created, return it, otherwise return the current step from the eventHandler().

Static Public Member Functions

static void Init ()
 Standard Init function used to initialize the interface.

Protected Member Functions

void createNewStep ()
 Use the collision handler to create a new step.

Private Member Functions

StepHandleroperator= (const StepHandler &)
 Private and non-existent assignment operator.

Private Attributes

tEHPtr theEventHandler
 A pointer to the (partial) collision handler which made the current call to handle().
tStepPtr theNewStep
 A pointer to a new step if created in the last call to handle().
tStepPtr theCurrentStep
 A pointer to the current step.

Static Private Attributes

static
AbstractNoPIOClassDescription
< StepHandler
initStepHandler
 Describe an abstract class without persistent data.

Detailed Description

StepHandler is the base class for implementing any model for a step in the event generation chain.

It has one main virtual method, handle(), which should be overridden by sub classes. The handle method is given a reference to a EventHandler, a vector of particles and a Hint as arguments. The handler is only allowed to treat particles which are in the vector. The Hint may be cast dynamically to a sub class and do whatever it wishes with the information found there. The EventHandler can be used to add other StepHandlers and Hints to modify the subsequent generation. If the StepHandler actually performs some action, the resulting particles should be added to a new Step which should be aquired with the newStep() function.

See also:
The interfaces defined for StepHandler.
EventHandler
Hint
Step

Definition at line 41 of file StepHandler.h.


Member Function Documentation

virtual void ThePEG::StepHandler::handle ( EventHandler eh,
const tPVector tagged,
const Hint hint 
)
pure virtual

The main function called by the EventHandler class to perform a step.

Parameters:
ehthe EventHandler in charge of the Event generation.
taggedif not empty these are the only particles which should be considered by the StepHandler.
hinta Hint object with possible information from previously performed steps.
Exceptions:
Vetoif the StepHandler requires the current step to be discarded.
Stopif the generation of the current Event should be stopped after this call.
Exceptionif something goes wrong.

Implemented in ThePEG::ClusterCollapser, ThePEG::CascadeHandler, and ThePEG::DecayHandler.

tStepPtr ThePEG::StepHandler::newStep ( )
inline

Return a pointer to a new step.

If one has alredy been created in the last call to handle(), that step will be returned.

Definition at line 93 of file StepHandler.h.

References createNewStep(), and theNewStep.


Member Data Documentation

tStepPtr ThePEG::StepHandler::theCurrentStep
private

A pointer to the current step.

Is equal to theNewStep if one was created in the current call to handle().

Definition at line 139 of file StepHandler.h.

Referenced by currentStep().


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