Herwig 7.3.0
|
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>
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< typename XC > | |
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 | |
FxFxEventHandler () | |
The default constructor. | |
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. | |
virtual CrossSection | integratedXSec () const |
The estimated total integrated cross section of the processes generated in this run. | |
virtual int | ntriesinternal () const |
virtual CrossSection | integratedXSecErr () const |
The estimated error in the total integrated cross section of the processes generated in this run. | |
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. | |
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. | |
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. | |
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 ReaderVector & | readers () const |
Access the list of readers. | |
const ReaderSelector & | selector () 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. | |
Public Member Functions inherited from ThePEG::EventHandler | |
EventHandler (bool warnincomplete=true) | |
EventHandler (const EventHandler &) | |
virtual void | initialize () |
virtual EventPtr | generateEvent () |
tEventPtr | generateEvent (tEventPtr e) |
tEventPtr | generateEvent (tStepPtr s) |
virtual EventPtr | continueEvent () |
tCollPtr | continueCollision () |
void | clearEvent () |
virtual void | select (tXCombPtr newXComb) |
virtual bool | empty () const |
virtual void | statistics (ostream &) const |
virtual CrossSection | histogramScale () const |
virtual CrossSection | integratedXSec () const |
virtual CrossSection | integratedXSecErr () const |
long | maxLoop () const |
const cPDPair & | incoming () const |
const LuminosityFunction & | lumiFn () 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 |
EventHandler (bool warnincomplete=true) | |
EventHandler (const EventHandler &) | |
virtual void | initialize () |
virtual EventPtr | generateEvent () |
tEventPtr | generateEvent (tEventPtr e) |
tEventPtr | generateEvent (tStepPtr s) |
virtual EventPtr | continueEvent () |
tCollPtr | continueCollision () |
void | clearEvent () |
virtual void | select (tXCombPtr newXComb) |
virtual bool | empty () const |
virtual void | statistics (ostream &) const |
virtual CrossSection | histogramScale () const |
virtual CrossSection | integratedXSec () const |
virtual CrossSection | integratedXSecErr () const |
long | maxLoop () const |
const cPDPair & | incoming () const |
const LuminosityFunction & | lumiFn () 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 ThePEG::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 |
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 |
Public Member Functions inherited from ThePEG::LastXCombInfo< typename XC > | |
const XC & | lastXComb () const |
tXCPtr | lastXCombPtr () const |
const XC & | lastHeadXComb () const |
tXCPtr | lastHeadXCombPtr () const |
const EventHandler & | lastEventHandler () const |
tPExtrPtr | lastExtractor () const |
PDFT | pdf (tcPPtr parton) const |
const Cuts & | lastCuts () const |
tCutsPtr | lastCutsPtr () const |
const PPair & | lastParticles () const |
Energy2 | lastS () const |
const PPair & | lastPartons () const |
Energy2 | lastSHat () const |
double | lastTau () const |
double | lastY () const |
double | lastP1 () const |
double | lastP2 () const |
double | lastL1 () const |
double | lastL2 () const |
double | lastX1 () const |
double | lastX2 () const |
double | lastE1 () const |
double | lastE2 () const |
double | lastFL1L2 () const |
Energy2 | lastScale () const |
double | lastAlphaS () const |
double | lastAlphaEM () const |
const vector< Lorentz5Momentum > & | meMomenta () const |
double | lastME2 () const |
double | lastPreweight () const |
double | jacobian () const |
CrossSection | lastMECrossSection () const |
double | lastMEPDFWeight () const |
double | lastMECouplings () const |
tSubProPtr | subProcess () const |
const cPDVector & | mePartonData () const |
const XC & | lastXComb () const |
tXCPtr | lastXCombPtr () const |
const XC & | lastHeadXComb () const |
tXCPtr | lastHeadXCombPtr () const |
const EventHandler & | lastEventHandler () const |
tPExtrPtr | lastExtractor () const |
PDFT | pdf (tcPPtr parton) const |
const Cuts & | lastCuts () const |
tCutsPtr | lastCutsPtr () const |
const PPair & | lastParticles () const |
Energy2 | lastS () const |
const PPair & | lastPartons () const |
Energy2 | lastSHat () const |
double | lastTau () const |
double | lastY () const |
double | lastP1 () const |
double | lastP2 () const |
double | lastL1 () const |
double | lastL2 () const |
double | lastX1 () const |
double | lastX2 () const |
double | lastE1 () const |
double | lastE2 () const |
double | lastFL1L2 () 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::EventHandler | |
virtual IBPtr | clone () const |
virtual IBPtr | fullclone () const |
virtual void | dofinish () |
virtual void | rebind (const TranslationMap &trans) |
virtual IVector | getReferences () |
LuminosityFunction & | lumiFn () |
void | setupGroups () |
GroupVector & | groups () |
const GroupVector & | groups () const |
void | lumiFn (LumiFnPtr) |
virtual IBPtr | clone () const |
virtual IBPtr | fullclone () 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 &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
Protected Member Functions inherited from ThePEG::Named | |
const Named & | operator= (const Named &other) |
const string & | name (const string &newName) |
Friends | |
class | FxFxHandler |
Functions used by the persistent I/O system. | |
tFxFxReaderPtr | theCurrentReader |
The currently selected reader object. | |
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. | |
Standard Interfaced functions. | |
XSecStat | stats |
Collect statistics for this event handler. | |
map< string, XSecStat > | optstats |
map< string, CrossSection > | optxs |
int | ntries |
XSecStat | histStats |
Collect statistics for this event handler. | |
map< string, XSecStat > | opthistStats |
vector< string > | weightnames |
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. | |
unsigned int | UseLHEEvent |
How to number the events. | |
static ClassDescription< FxFxEventHandler > | initFxFxEventHandler |
The static object used to initialize the description of this class. | |
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. | |
ReaderVector & | readers () |
Access the list of readers. | |
ReaderSelector & | selector () |
The selector to choose readers according to their overestimated cross section. | |
void | setUnitTolerance (double) |
Helper function for the interface;. | |
map< string, XSecStat > | OptStatsFunc () |
map< string, CrossSection > | OptXsFunc () |
FxFxEventHandler & | operator= (const FxFxEventHandler &)=delete |
The assignment operator is private and must never be called. | |
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 FxFxReader
s 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.
Definition at line 40 of file FxFxEventHandler.h.
typedef CompSelector<int,CrossSection> ThePEG::FxFxEventHandler::ReaderSelector |
A selector of readers.
Definition at line 52 of file FxFxEventHandler.h.
typedef vector<FxFxReaderPtr> ThePEG::FxFxEventHandler::ReaderVector |
A vector of FxFxReader objects.
Definition at line 47 of file FxFxEventHandler.h.
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.
|
inline |
The default constructor.
Definition at line 72 of file FxFxEventHandler.h.
References selector(), ThePEG::CompSelector< typename T, typename WeightType >::tolerance(), and unitTolerance().
|
protectedvirtual |
Make a simple clone of this object.
Reimplemented from ThePEG::EventHandler.
|
virtual |
Continue generating an event if the generation has been stopped before finishing.
Reimplemented from ThePEG::EventHandler.
|
inline |
The currently selected reader object.
Definition at line 203 of file FxFxEventHandler.h.
References theCurrentReader.
|
inline |
Set the currently selected reader object.
Definition at line 209 of file FxFxEventHandler.h.
References theCurrentReader.
|
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.
|
protectedvirtual |
Initialize this object after the setup phase before saving an EventGenerator to disk.
InitException | if object could not be initialized properly. |
Reimplemented from ThePEG::InterfacedBase.
|
protectedvirtual |
Initialize this object.
Called in the run phase just before a run begins.
Reimplemented from ThePEG::InterfacedBase.
|
protectedvirtual |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from ThePEG::EventHandler.
|
virtual |
Generate an event.
Reimplemented from ThePEG::EventHandler.
|
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.
|
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.
|
virtual |
Initialize this event handler and all related objects needed to generate events.
Reimplemented from ThePEG::EventHandler.
|
virtual |
The estimated total integrated cross section of the processes generated in this run.
Reimplemented from ThePEG::EventHandler.
|
virtual |
The estimated error in the total integrated cross section of the processes generated in this run.
Reimplemented from ThePEG::EventHandler.
|
privatedelete |
The assignment operator is private and must never be called.
In fact, it should not even be implemented.
|
inlineprotected |
Definition at line 316 of file FxFxEventHandler.h.
|
inlineprotected |
Definition at line 318 of file FxFxEventHandler.h.
|
virtual |
Create the Event and Collision objects.
Used by the generateEvent() function.
void ThePEG::FxFxEventHandler::persistentInput | ( | PersistentIStream & | is, |
int | version | ||
) |
Function used to read in object persistently.
is | the persistent input stream read from. |
version | the version number of the object when written. |
void ThePEG::FxFxEventHandler::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
|
inlineprotected |
Access the list of readers.
Definition at line 292 of file FxFxEventHandler.h.
References theReaders.
|
inline |
Access the list of readers.
Definition at line 192 of file FxFxEventHandler.h.
References theReaders.
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.
|
inlineprotected |
The selector to choose readers according to their overestimated cross section.
Definition at line 298 of file FxFxEventHandler.h.
References theSelector.
|
inline |
The selector to choose readers according to their overestimated cross section.
Definition at line 198 of file FxFxEventHandler.h.
References theSelector.
Referenced by FxFxEventHandler().
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.
|
virtual |
Write out accumulated statistics about intergrated cross sections and stuff.
Reimplemented from ThePEG::EventHandler.
|
inline |
If the weight option is set to unit weight, do not start compensating unless the weight is this much larger than unity.
Definition at line 187 of file FxFxEventHandler.h.
References theUnitTolerance.
Referenced by FxFxEventHandler().
|
inline |
The way weights are to be treated.
Definition at line 181 of file FxFxEventHandler.h.
References theWeightOption.
|
friend |
Definition at line 64 of file FxFxEventHandler.h.
|
protected |
Collect statistics for this event handler.
To be used for histogram scaling.
Definition at line 325 of file FxFxEventHandler.h.
|
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 399 of file FxFxEventHandler.h.
|
protected |
Definition at line 314 of file FxFxEventHandler.h.
|
protected |
Definition at line 327 of file FxFxEventHandler.h.
|
protected |
Definition at line 310 of file FxFxEventHandler.h.
|
protected |
Definition at line 312 of file FxFxEventHandler.h.
|
protected |
Collect statistics for this event handler.
Definition at line 308 of file FxFxEventHandler.h.
tFxFxReaderPtr ThePEG::FxFxEventHandler::theCurrentReader |
The currently selected reader object.
Definition at line 242 of file FxFxEventHandler.h.
Referenced by currentReader().
|
private |
How to normalize the weights.
Definition at line 370 of file FxFxEventHandler.h.
|
private |
|
private |
The selector to choose readers according to their overestimated cross section.
Definition at line 347 of file FxFxEventHandler.h.
Referenced by selector().
|
private |
If the weight option is set to unit weight, do not start compensating unless the weight is this much larger than unity.
Definition at line 358 of file FxFxEventHandler.h.
Referenced by unitTolerance().
|
private |
The way weights are to be treated.
Definition at line 352 of file FxFxEventHandler.h.
Referenced by weightOption().
|
private |
How to number the events.
Definition at line 375 of file FxFxEventHandler.h.
|
private |
Warn if the same process number is used in more than one FxFxReader.
Definition at line 365 of file FxFxEventHandler.h.
|
protected |
Definition at line 334 of file FxFxEventHandler.h.