9 #ifndef ThePEG_EventHandler_H 10 #define ThePEG_EventHandler_H 13 #include "ThePEG/Handlers/HandlerBase.h" 14 #include "ThePEG/Handlers/HandlerGroup.h" 15 #include "ThePEG/Handlers/StepHandler.h" 16 #include "ThePEG/EventRecord/Event.h" 17 #include "ThePEG/Handlers/LastXCombInfo.h" 18 #include "ThePEG/Handlers/SubProcessHandler.fh" 19 #include "ThePEG/Cuts/Cuts.fh" 20 #include "EventHandler.fh" 157 virtual bool empty()
const;
348 virtual void clean();
610 class EventHandlerStepError:
public Exception {};
616 class EventHandlerHistError:
public Exception {};
622 class EventHandlerIncompleteError:
public Exception {};
626 struct EventLoopException:
public Exception {
635 struct LumiFuncError:
public Exception {};
640 struct ConsistencyException:
public Exception {};
void setupGroups()
Setup the step handler groups.
virtual void initialize()
Initialize this event handler and all related objects needed to generate events.
HandlerGroup< CascadeHandler > theCascadeGroup
The CascadeHandler group.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
The SubProcessHandler class is used to handle a set of MEBase objects together with a PartonExtractor...
void performStep(tStepHdlPtr handler, tHintPtr hint)
Perform a given step using a handler and a hint.
ThePEG::Ptr< Step >::transient_pointer tStepPtr
Alias for a transient pointer to Step .
static void Init()
Standard Init function used to initialize the interface.
The EventHandler is the base class used to implement event handlers in ThePEG.
tCutsPtr cuts() const
The kinematical cuts to used by subclasses which do not provide their own.
EventPtr theCurrentEvent
The current Event.
tLumiFnPtr lumiFnPtr()
Access to the luminosity function.
The LuminosityFunction describes the momentum distribution of the incoming beams in an experiment...
virtual bool empty() const
Returns true if there are no step handlers left to apply to the current event;.
ThePEG::Ptr< Hint >::transient_pointer tHintPtr
Alias for a transient pointer to Hint .
int theStatLevel
Controlls the amount of statistics written out after each run to the EventGenerators ...
HandlerGroup< MultipleInteractionHandler > theMultiGroup
The MultipleInteractionHandler group.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
LastXCombInfo is a templated class giving easy access to the information in an XComb object...
double theConsistencyEpsilon
The maximum fraction of the total invariant mass of a collision that any of the components of the sum...
EventHandler(bool warnincomplete=true)
Default constructor.
virtual void initGroups()
Initialize the groups of step handlers.
virtual void statistics(ostream &) const
Write out accumulated statistics about intergrated cross sections and stuff.
tCollPtr continueCollision()
Continue the generation of a Collision.
double consistencyEpsilon() const
The maximum fraction of the total invariant mass of a collision that any of the components of the sum...
virtual EventPtr continueEvent()
Continue generating an event if the generation has been stopped before finishing. ...
StepPtr theCurrentStep
The current Step.
tCollPtr currentCollision() const
Get current collision.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void currentStep(tStepPtr s)
Set current step.
void popStep()
Remove the last step.
GroupVector optGroups
Utility object to facilitate default selection of step handlers.
void clearEvent()
Clear all step handlers, making the handler ready for a new event.
vector< HandlerGroupBase * > GroupVector
A vector of HandlerGroups.
Rebinder is a class associating pairs of pointers to objects.
void currentEvent(tEventPtr e)
Set current event.
This is the main namespace within which all identifiers in ThePEG are declared.
LumiFnPtr theLumiFn
Pointer to a luminosity function tobe used by subclasses.
bool warnIncomplete
Emit warning that this EventHandler is incomplete.
tStepHdlPtr currentStepHandler() const
Get current StepHandler.
const LuminosityFunction & lumiFn() const
Access the luminosity function.
ConsistencyLevel consistencyLevel() const
Determines how often the event handler should check for charge and energy-momentum conservation...
tStepPtr currentStep() const
Get current step.
CutsPtr theCuts
The kinematical cuts to used by subclasses which do not provide their own.
void currentCollision(tCollPtr c)
Set current collision.
HandlerGroup< HadronizationHandler > optHadronizationGroup
Utility object to facilitate default selection of step handlers.
const GroupVector & groups() const
Access the step handler groups.
The HadronizationHandler is the base class of all handlers implementing models for hadronization of c...
Level
Enumeration for the type of step handler.
long maxLoop() const
Return the maximum number attemts allowed to select a sub-process for each event. ...
EventHandler & operator=(const EventHandler &)
Private and non-existent assignment operator.
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
virtual void dofinish()
Finalize this object.
ConsistencyLevel theConsistencyLevel
Determines how often the event handler should check for charge and energy-momentum conservation...
ThePEG::Ptr< StepHandler >::transient_pointer tStepHdlPtr
Alias for a transient pointer to StepHandler .
CollPtr theCurrentCollision
The current Collision.
virtual CrossSection integratedXSec() const
The total integrated cross section of the processes generated in this run.
HandlerGroup< DecayHandler > optDecayGroup
Utility object to facilitate default selection of step handlers.
const cPDPair & incoming() const
The pair of incoming particle types.
The DecayHandler is the base class of all handlers implementing the administration of decays of unsta...
HandlerGroup< SubProcessHandler > theSubprocessGroup
The SubProcessHandler group.
HandlerGroup< MultipleInteractionHandler > optMultiGroup
Utility object to facilitate default selection of step handlers.
void addStep(Group::Level, Group::Handler, tStepHdlPtr=tStepHdlPtr(), tHintPtr=tHintPtr())
In the curresnt list of step handlers to go through, add another step handler and/or hint...
tCascHdlPtr CKKWHandler() const
Return a pointer (possibly null) to the assigned main CascadeHandler to be used as CKKW-reweighter...
The MultipleInteractionHandler is the base class of all handlers implementing models for multiple int...
LuminosityFunction & lumiFn()
Access to the luminosity function.
tcLumiFnPtr lumiFnPtr() const
Access the luminosity function.
Handler
Enumeration for the type of HandlerGroups.
RCPtr is a reference counted (smart) pointer.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
cPDPair theIncoming
The pair of incoming particle types.
virtual void dofinish()
Finalize this object.
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
virtual CrossSection integratedXSecErr() const
The estimated error in the total integrated cross section of the processes generated in this run...
Do not perform consistency checks.
tStepPtr newStep(tcStepHdlPtr sh)
Create a new step and make it current.
virtual CrossSection histogramScale() const
Histogram scale.
virtual EventPtr generateEvent()
Generate an event.
ThePEG::Ptr< Collision >::transient_pointer tCollPtr
Alias for a transient pointer to Collision .
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
HandlerGroup< DecayHandler > theDecayGroup
The DecayHandler group.
ConsistencyLevel
Enumerate the different levels of consistency checking.
Exception is the base class for all exceptions to be used in ThePEG.
HandlerGroup< SubProcessHandler > optSubprocessGroup
Utility object to facilitate default selection of step handlers.
virtual void clean()
Throw away the last generated event before generating a new one.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::Ptr< Event >::transient_pointer tEventPtr
Alias for a transient pointer to Event .
HandlerGroup is a templated utility class to manage a group of StepHandlers.
virtual IBPtr clone() const
Make a simple clone of this object.
long theMaxLoop
The maximum number of attempts to select a sub-process allowed per event.
virtual void checkConsistency() const
Check that the charge and energy-momentum in the last step of the current collision is consistent wit...
virtual ~EventHandler()
Destructor.
The CascadeHandler is the base class of all handlers implementing perturbative partonic cascade model...
This template class allows the compiler to check calculations with physical quantities for dimensiona...
void throwCurrent()
Throw away the current event/collision.
pair< cPDPtr, cPDPtr > cPDPair
A pair of pointers to const ParticleData objects.
HandlerGroup< HadronizationHandler > theHadronizationGroup
The HadronizationHandler group.
PExtrPtr thePartonExtractor
A PartonExtractor object to be used by sub classes which do not provide their own.
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
GroupVector theGroups
The step handler groups.
StepHdlPtr theCurrentStepHandler
The current StepHandler.
int statLevel() const
The level of statistics.
HandlerGroup< CascadeHandler > optCascadeGroup
Utility object to facilitate default selection of step handlers.
void currentStepHandler(tStepHdlPtr sh)
Set current StepHandler.
GroupVector & groups()
Access the step handler groups.
virtual void select(tXCombPtr newXComb)
Change the XComb object.
tPExtrPtr partonExtractor() const
A PartonExtractor object to be used by sub classes which do not provide their own.
tEventPtr currentEvent() const
Gget current event.