herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ThePEG::FxFxEventHandler Class Reference

The FxFxEventHandler inherits from the general EventHandler class and administers the reading of events generated by external matrix element generator programs according to the Les Houches accord. More...

#include <FxFxEventHandler.h>

Inheritance diagram for ThePEG::FxFxEventHandler:

Public Types

enum  WeightOpt { unitweight = 1, unitnegweight = -1, varweight = 2, varnegweight = -2 }
 Enumerate the weighting options. More...
 
typedef vector< FxFxReaderPtr > ReaderVector
 A vector of FxFxReader objects.
 
typedef CompSelector< int, CrossSection > ReaderSelector
 A selector of readers.
 
- Public Types inherited from ThePEG::EventHandler
enum  ConsistencyLevel
 
typedef vector< HandlerGroupBase *> GroupVector
 
- Public Types inherited from ThePEG::InterfacedBase
enum  InitState
 
- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 
- Public Types inherited from ThePEG::LastXCombInfo<>
typedef ThePEG::Ptr< XC >::pointer XCPtr
 
typedef ThePEG::Ptr< XC >::const_pointer cXCPtr
 
typedef ThePEG::Ptr< XC >::transient_pointer tXCPtr
 
typedef ThePEG::Ptr< XC >::transient_const_pointer tcXCPtr
 

Public Member Functions

Standard constructors and destructors.
 FxFxEventHandler ()
 The default constructor.
 
virtual ~FxFxEventHandler ()
 The destructor.
 
Initialization and finalization functions.
virtual void initialize ()
 Initialize this event handler and all related objects needed to generate events.
 
virtual void statistics (ostream &) const
 Write out accumulated statistics about intergrated cross sections and stuff.
 
virtual CrossSection histogramScale () const
 Histogram scale. More...
 
virtual CrossSection integratedXSec () const
 The estimated total integrated cross section of the processes generated in this run. More...
 
virtual int ntriesinternal () const
 
virtual CrossSection integratedXSecErr () const
 The estimated error in the total integrated cross section of the processes generated in this run. More...
 
virtual map< string, CrossSection > optintegratedXSecMap () const
 
Functions used for the actual generation
virtual EventPtr generateEvent ()
 Generate an event.
 
virtual tCollPtr performCollision ()
 Create the Event and Collision objects. More...
 
virtual EventPtr continueEvent ()
 Continue generating an event if the generation has been stopped before finishing.
 
Functions to manipulate statistics.
void select (double weight)
 An event has been selected. More...
 
void accept ()
 Accept the current event, taking care of the statistics collection of the corresponding reader objects.
 
void reject (double weight)
 Reject the current event, taking care of the statistics collection of the corresponding reader objects.
 
void increaseMaxXSec (CrossSection maxxsec)
 Increase the overestimated cross section for the selected reader.
 
void skipEvents ()
 Skip some events. More...
 
Simple access functions.
WeightOpt weightOption () const
 The way weights are to be treated.
 
double unitTolerance () const
 If the weight option is set to unit weight, do not start compensating unless the weight is this much larger than unity.
 
const ReaderVectorreaders () const
 Access the list of readers.
 
const ReaderSelectorselector () const
 The selector to choose readers according to their overestimated cross section.
 
tFxFxReaderPtr currentReader () const
 The currently selected reader object.
 
void currentReader (tFxFxReaderPtr x)
 Set the currently selected reader object.
 
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::EventHandler
 EventHandler (bool warnincomplete=true)
 
 EventHandler (const EventHandler &)
 
tEventPtr generateEvent (tEventPtr e)
 
tEventPtr generateEvent (tStepPtr s)
 
tCollPtr continueCollision ()
 
void clearEvent ()
 
virtual void select (tXCombPtr newXComb)
 
virtual bool empty () const
 
long maxLoop () const
 
const cPDPairincoming () const
 
const LuminosityFunctionlumiFn () const
 
tcLumiFnPtr lumiFnPtr () const
 
tLumiFnPtr lumiFnPtr ()
 
tCutsPtr cuts () const
 
tPExtrPtr partonExtractor () const
 
tCascHdlPtr cascadeHandler () const
 
tCascHdlPtr CKKWHandler () const
 
tEventPtr currentEvent () const
 
tCollPtr currentCollision () const
 
tStepPtr currentStep () const
 
bool weighted () const
 
int statLevel () const
 
ConsistencyLevel consistencyLevel () const
 
double consistencyEpsilon () const
 
void performStep (tStepHdlPtr handler, tHintPtr hint)
 
void addStep (Group::Level, Group::Handler, tStepHdlPtr=tStepHdlPtr(), tHintPtr=tHintPtr())
 
tStepPtr newStep (tcStepHdlPtr sh)
 
void popStep ()
 
virtual void initGroups ()
 
void currentEvent (tEventPtr e)
 
void currentCollision (tCollPtr c)
 
void currentStep (tStepPtr s)
 
tStepHdlPtr currentStepHandler () const
 
void currentStepHandler (tStepHdlPtr sh)
 
void throwCurrent ()
 
virtual void clean ()
 
virtual void checkConsistency () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
 EventHandler (bool warnincomplete=true)
 
 EventHandler (const EventHandler &)
 
tEventPtr generateEvent (tEventPtr e)
 
tEventPtr generateEvent (tStepPtr s)
 
tCollPtr continueCollision ()
 
void clearEvent ()
 
virtual void select (tXCombPtr newXComb)
 
virtual bool empty () const
 
long maxLoop () const
 
const cPDPairincoming () const
 
const LuminosityFunctionlumiFn () const
 
tcLumiFnPtr lumiFnPtr () const
 
tLumiFnPtr lumiFnPtr ()
 
tCutsPtr cuts () const
 
tPExtrPtr partonExtractor () const
 
tCascHdlPtr cascadeHandler () const
 
tCascHdlPtr CKKWHandler () const
 
tEventPtr currentEvent () const
 
tCollPtr currentCollision () const
 
tStepPtr currentStep () const
 
bool weighted () const
 
int statLevel () const
 
ConsistencyLevel consistencyLevel () const
 
double consistencyEpsilon () const
 
void performStep (tStepHdlPtr handler, tHintPtr hint)
 
void addStep (Group::Level, Group::Handler, tStepHdlPtr=tStepHdlPtr(), tHintPtr=tHintPtr())
 
tStepPtr newStep (tcStepHdlPtr sh)
 
void popStep ()
 
virtual void initGroups ()
 
void currentEvent (tEventPtr e)
 
void currentCollision (tCollPtr c)
 
void currentStep (tStepPtr s)
 
tStepHdlPtr currentStepHandler () const
 
void currentStepHandler (tStepHdlPtr sh)
 
void throwCurrent ()
 
virtual void clean ()
 
virtual void checkConsistency () const
 
void persistentOutput (PersistentOStream &os) const
 
void persistentInput (PersistentIStream &is, int version)
 
- Public Member Functions inherited from HandlerBaseT< UseRandom >
double rnd () const
 
double rnd (double xu) const
 
double rnd (double xl, double xu) const
 
bool rndbool () const
 
bool rndbool (double p) const
 
bool rndbool (double p1, double p2) const
 
int rndsign (double p1, double p2, double p3) const
 
int rnd2 (double p0, double p1) const
 
int rnd3 (double p0, double p1, double p2) const
 
int rnd4 (double p0, double p1, double p2, double p3) const
 
long irnd (long xu=2) const
 
long irnd (long xl, long xu) const
 
const StandardModelBase & SM () const
 
tSMPtr standardModel () 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
 
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())
 
 Named (const Named &)=default
 
const string & name () const
 
bool operator== (const Named &other) const
 
bool operator< (const Named &other) const
 
- Public Member Functions inherited from ThePEG::LastXCombInfo<>
const XC & lastXComb () const
 
const XC & lastXComb () const
 
tXCPtr lastXCombPtr () const
 
tXCPtr lastXCombPtr () const
 
const XC & lastHeadXComb () const
 
const XC & lastHeadXComb () const
 
tXCPtr lastHeadXCombPtr () const
 
tXCPtr lastHeadXCombPtr () const
 
const EventHandlerlastEventHandler () const
 
const EventHandlerlastEventHandler () const
 
tPExtrPtr lastExtractor () const
 
tPExtrPtr lastExtractor () const
 
PDFT pdf (tcPPtr parton) const
 
PDFT pdf (tcPPtr parton) const
 
const CutslastCuts () const
 
const CutslastCuts () const
 
tCutsPtr lastCutsPtr () const
 
tCutsPtr lastCutsPtr () const
 
const PPairlastParticles () const
 
const PPairlastParticles () const
 
Energy2 lastS () const
 
Energy2 lastS () const
 
const PPairlastPartons () const
 
const PPairlastPartons () const
 
Energy2 lastSHat () const
 
Energy2 lastSHat () const
 
double lastTau () const
 
double lastTau () const
 
double lastY () const
 
double lastY () const
 
double lastP1 () const
 
double lastP1 () const
 
double lastP2 () const
 
double lastP2 () const
 
double lastL1 () const
 
double lastL1 () const
 
double lastL2 () const
 
double lastL2 () const
 
double lastX1 () const
 
double lastX1 () const
 
double lastX2 () const
 
double lastX2 () const
 
double lastE1 () const
 
double lastE1 () const
 
double lastE2 () const
 
double lastE2 () const
 
double lastFL1L2 () const
 
double lastFL1L2 () const
 
Energy2 lastScale () const
 
Energy2 lastScale () const
 
double lastAlphaS () const
 
double lastAlphaS () const
 
double lastAlphaEM () const
 
double lastAlphaEM () const
 
const vector< Lorentz5Momentum > & meMomenta () const
 
const vector< Lorentz5Momentum > & meMomenta () const
 
double lastME2 () const
 
double lastME2 () const
 
double lastPreweight () const
 
double lastPreweight () const
 
double jacobian () const
 
double jacobian () const
 
CrossSection lastMECrossSection () const
 
CrossSection lastMECrossSection () const
 
double lastMEPDFWeight () const
 
double lastMEPDFWeight () const
 
double lastMECouplings () const
 
double lastMECouplings () const
 
tSubProPtr subProcess () const
 
tSubProPtr subProcess () const
 
const cPDVectormePartonData () const
 
const cPDVectormePartonData () 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::EventHandler
static void Init ()
 
- Static Public Member Functions inherited from ThePEG::HandlerBase
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

tFxFxReaderPtr theCurrentReader
 The currently selected reader object.
 
- Public Attributes inherited from ThePEG::EventHandler
 clNoCheck
 
 clCollision
 
 clStep
 
 clPrintCollision
 
 clPrintStep
 
- Public Attributes inherited from ThePEG::InterfacedBase
 initializing
 
 uninitialized
 
 initialized
 
 runready
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 

Protected Member Functions

ReaderVectorreaders ()
 Access the list of readers.
 
ReaderSelectorselector ()
 The selector to choose readers according to their overestimated cross section.
 
void setUnitTolerance (double)
 Helper function for the interface;.
 
map< string, XSecStatOptStatsFunc ()
 
map< string, CrossSection > OptXsFunc ()
 
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 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...
 
- Protected Member Functions inherited from ThePEG::EventHandler
LuminosityFunctionlumiFn ()
 
void setupGroups ()
 
GroupVectorgroups ()
 
const GroupVectorgroups () const
 
void lumiFn (LumiFnPtr)
 
virtual void rebind (const TranslationMap &trans)
 
virtual IVector getReferences ()
 
virtual void rebind (const TranslationMap &trans)
 
virtual IVector getReferences ()
 
- 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 doupdate ()
 
virtual void readSetup (istream &is)
 
virtual void doupdate ()
 
- 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)
 

Protected Attributes

XSecStat stats
 Collect statistics for this event handler.
 
map< string, XSecStatoptstats
 
map< string, CrossSection > optxs
 
int ntries
 
XSecStat histStats
 Collect statistics for this event handler. More...
 
map< string, XSecStatopthistStats
 
vector< string > weightnames
 
- Protected Attributes inherited from ThePEG::EventHandler
HandlerGroup< SubProcessHandleroptSubprocessGroup
 
HandlerGroup< CascadeHandleroptCascadeGroup
 
HandlerGroup< MultipleInteractionHandleroptMultiGroup
 
HandlerGroup< HadronizationHandleroptHadronizationGroup
 
HandlerGroup< DecayHandleroptDecayGroup
 
GroupVector optGroups
 
bool warnIncomplete
 
cPDPair theIncoming
 
- Protected Attributes inherited from ThePEG::LastXCombInfo<>
XCPtr theLastXComb
 

Private Member Functions

FxFxEventHandleroperator= (const FxFxEventHandler &)=delete
 The assignment operator is private and must never be called. More...
 

Private Attributes

ReaderVector theReaders
 The list of readers.
 
ReaderSelector theSelector
 The selector to choose readers according to their overestimated cross section.
 
WeightOpt theWeightOption
 The way weights are to be treated.
 
double theUnitTolerance
 If the weight option is set to unit weight, do not start compensating unless the weight is this much larger than unity.
 
bool warnPNum
 Warn if the same process number is used in more than one FxFxReader.
 
unsigned int theNormWeight
 How to normalize the weights.
 

Static Private Attributes

static ClassDescription< FxFxEventHandlerinitFxFxEventHandler
 The static object used to initialize the description of this class. More...
 

Friends

class FxFxHandler
 

Additional Inherited Members

- Static Protected Member Functions inherited from ThePEG::Interfaced
static void registerRepository (IBPtr)
 
static void registerRepository (IBPtr, string newName)
 

Detailed Description

The FxFxEventHandler inherits from the general EventHandler class and administers the reading of events generated by external matrix element generator programs according to the Les Houches accord.

The class has a list of FxFxReaders which typically are connected to files with event data produced by external matrix element generator programs. When an event is requested by FxFxEventHandler, one of the readers are chosen, an event is read in and then passed to the different StepHandler defined in the underlying EventHandler class.

See also
The interfaces defined for FxFxEventHandler.

Definition at line 40 of file FxFxEventHandler.h.

Member Enumeration Documentation

◆ WeightOpt

Enumerate the weighting options.

Enumerator
unitweight 

All events have unit weight.

unitnegweight 

All events have wight +/- 1.

varweight 

Varying positive weights.

varnegweight 

Varying positive or negative weights.

Definition at line 57 of file FxFxEventHandler.h.

Member Function Documentation

◆ clone()

virtual IBPtr ThePEG::FxFxEventHandler::clone ( ) const
protectedvirtual

Make a simple clone of this object.

Returns
a pointer to the new object.

Reimplemented from ThePEG::EventHandler.

◆ dofinish()

virtual void ThePEG::FxFxEventHandler::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::EventHandler.

◆ doinit()

virtual void ThePEG::FxFxEventHandler::doinit ( )
protectedvirtual

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 ThePEG::FxFxEventHandler::doinitrun ( )
protectedvirtual

Initialize this object.

Called in the run phase just before a run begins.

Reimplemented from ThePEG::InterfacedBase.

◆ fullclone()

virtual IBPtr ThePEG::FxFxEventHandler::fullclone ( ) const
protectedvirtual

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

◆ histogramScale()

virtual CrossSection ThePEG::FxFxEventHandler::histogramScale ( ) const
virtual

Histogram scale.

A histogram bin which has been filled with the weights associated with the Event objects should be scaled by this factor to give the correct cross section.

Reimplemented from ThePEG::EventHandler.

Referenced by FxFxEventHandler().

◆ Init()

static void ThePEG::FxFxEventHandler::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.

Referenced by currentReader().

◆ integratedXSec()

virtual CrossSection ThePEG::FxFxEventHandler::integratedXSec ( ) const
virtual

The estimated total integrated cross section of the processes generated in this run.

Returns
0 if no integrated cross section could be estimated.

Reimplemented from ThePEG::EventHandler.

Referenced by FxFxEventHandler().

◆ integratedXSecErr()

virtual CrossSection ThePEG::FxFxEventHandler::integratedXSecErr ( ) const
virtual

The estimated error in the total integrated cross section of the processes generated in this run.

Returns
0 if no integrated cross section error could be estimated.

Reimplemented from ThePEG::EventHandler.

Referenced by FxFxEventHandler().

◆ operator=()

FxFxEventHandler& ThePEG::FxFxEventHandler::operator= ( const FxFxEventHandler )
privatedelete

The assignment operator is private and must never be called.

In fact, it should not even be implemented.

◆ performCollision()

virtual tCollPtr ThePEG::FxFxEventHandler::performCollision ( )
virtual

Create the Event and Collision objects.

Used by the generateEvent() function.

Referenced by FxFxEventHandler().

◆ persistentInput()

void ThePEG::FxFxEventHandler::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.

Referenced by currentReader().

◆ persistentOutput()

void ThePEG::FxFxEventHandler::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

Referenced by currentReader().

◆ select()

void ThePEG::FxFxEventHandler::select ( double  weight)

An event has been selected.

Signal that an event has been selected with the given weight. If unit weights are requested, the event will be accepted with that weight. This also takes care of the statistics collection of the selected reader object.

Referenced by FxFxEventHandler().

◆ skipEvents()

void ThePEG::FxFxEventHandler::skipEvents ( )

Skip some events.

To ensure a reader file is scanned an even number of times, skip a number of events for the selected reader.

Referenced by FxFxEventHandler().

Member Data Documentation

◆ histStats

XSecStat ThePEG::FxFxEventHandler::histStats
protected

Collect statistics for this event handler.

To be used for histogram scaling.

Definition at line 333 of file FxFxEventHandler.h.

◆ initFxFxEventHandler

ClassDescription<FxFxEventHandler> ThePEG::FxFxEventHandler::initFxFxEventHandler
staticprivate

The static object used to initialize the description of this class.

Indicates that this is a concrete class with persistent data.

Definition at line 402 of file FxFxEventHandler.h.


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