Herwig 7.3.0
|
FxFxReader is an abstract base class to be used for objects which reads event files or streams from matrix element generators. More...
#include <FxFxReader.h>
Public Member Functions | |
Standard constructors and destructors. | |
FxFxReader (bool active=false) | |
Default constructor. | |
FxFxReader (const FxFxReader &) | |
Copy-constructor. | |
virtual | ~FxFxReader () |
Destructor. | |
Other important function which may be overridden in | |
virtual void | initialize (FxFxEventHandler &eh) |
Initialize. | |
virtual double | getEvent () |
Calls readEvent() or uncacheEvent() to read information into the FxFx common block variables. | |
virtual bool | readEvent () |
Calls doReadEvent() and performs pre-defined reweightings. | |
virtual void | skip (long n) |
Skip n events. | |
tXCombPtr | getXComb () |
Get an XComb object. | |
tSubProPtr | getSubProcess () |
Get a SubProcess object corresponding to the information in the Les Houches common block variables. | |
virtual long | scan () |
Scan the file or stream to obtain information about cross section weights and particles etc. | |
virtual void | initStat () |
Take the information corresponding to the HEPRUP common block and initialize the statistics for this reader. | |
double | reweight () |
Reweights the current event using the reweights and preweights vectors. | |
virtual void | fillEvent () |
Converts the information in the Les Houches common block variables into a Particle objects. | |
void | reset () |
Removes the particles created in the last generated event, preparing to produce a new one. | |
virtual void | setWeightScale (long neve) |
Possibility for subclasses to recover from non-conformant settings of XMAXUP when an event file has been scanned with neve events. | |
Other inlined access functions. | |
long | NEvents () const |
The number of events found in this reader. | |
long | currentPosition () const |
The number of events produced so far. | |
long | maxScan () const |
The maximum number of events to scan to collect information about processes and cross sections. | |
bool | active () const |
Return true if this reader is active. | |
bool | negativeWeights () const |
True if negative weights may be produced. | |
const XSecStat & | xSecStats () const |
The collected cross section statistics for this reader. | |
const StatMap & | processStats () const |
Collected statistics about the individual processes. | |
void | select (double weight) |
Select the current event. | |
void | accept () |
Accept the current event assuming it was previously selcted. | |
void | reject (double w) |
Reject the current event assuming it was previously accepted. | |
virtual void | increaseMaxXSec (CrossSection maxxsec) |
Increase the overestimated cross section for this reader. | |
tPExtrPtr | partonExtractor () const |
The PartonExtractor object used to construct remnants. | |
tCascHdlPtr | CKKWHandler () const |
Return a possibly null pointer to a CascadeHandler to be used for CKKW-reweighting. | |
const PartonPairVec & | partonBins () const |
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor object. | |
const XCombMap & | xCombs () const |
The map of XComb objects indexed by the corresponding PartonBin pair. | |
const Cuts & | cuts () const |
The Cuts object to be used for this reader. | |
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<> | |
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 EventHandler & | lastEventHandler () const |
const EventHandler & | lastEventHandler () const |
tPExtrPtr | lastExtractor () const |
tPExtrPtr | lastExtractor () const |
PDFT | pdf (tcPPtr parton) const |
PDFT | pdf (tcPPtr parton) const |
const Cuts & | lastCuts () const |
const Cuts & | lastCuts () const |
tCutsPtr | lastCutsPtr () const |
tCutsPtr | lastCutsPtr () const |
const PPair & | lastParticles () const |
const PPair & | lastParticles () const |
Energy2 | lastS () const |
Energy2 | lastS () const |
const PPair & | lastPartons () const |
const PPair & | lastPartons () 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 |
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 |
Protected Member Functions | |
Auxilliary virtual methods which may be verridden by sub-classes. | |
virtual bool | checkPartonBin () |
Check the existence of a pair of PartonBin objects corresponding to the current event. | |
virtual void | createParticles () |
Create instances of all particles in the event and store them in particleIndex. | |
virtual tcPBPair | createPartonBinInstances () |
Using the already created particles create a pair of PartonBinInstance objects corresponding to the incoming partons. | |
virtual void | createBeams () |
Create instances of the incoming beams in the event and store them in particleIndex. | |
virtual void | connectMothers () |
Go through the mother indices and connect up the Particles. | |
Set functions for some variables not in the Les Houches accord. | |
void | NEvents (long x) |
The number of events in this reader. | |
XCombMap & | xCombs () |
The map of XComb objects indexed by the corresponding PartonBin pair. | |
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) |
Private Types | |
typedef map< int, XSecStat > | StatMap |
Map for accumulating statistics of cross sections per process number. | |
typedef map< tcPBPair, XCombPtr > | XCombMap |
Map of XComb objects describing the incoming partons indexed by the corresponding PartonBin pair. | |
typedef vector< ReweightPtr > | ReweightVector |
A vector of pointers to ReweightBase objects. | |
Friends | |
class | FxFxEventHandler |
FxFxEventHandler should have access to our private parts. | |
Main virtual fuctions to be overridden in | |
sub-classes. They are named as if we are reading from event files, but could equally well implement the actual generation of events. | |
vector< string > | optionalWeightsNames |
virtual void | open ()=0 |
Open a file or stream with events and read in the run information into the heprup variable. | |
virtual bool | doReadEvent ()=0 |
Read the next event from the file or stream into the corresponding protected variables. | |
virtual void | close ()=0 |
Close the file or stream from which events have been read. | |
virtual vector< string > | optWeightsNamesFunc ()=0 |
return the weight names | |
Standard (and non-standard) Interfaced functions. | |
HEPRUP | heprup |
The HEPRUP common block. | |
HEPEUP | hepeup |
The HEPEUP common block. | |
tcPDPair | inData |
The ParticleData objects corresponding to the incoming particles. | |
pair< PDFPtr, PDFPtr > | inPDF |
The PDFBase objects which has been used for the beam particle when generating the events being read. | |
pair< cPDFPtr, cPDFPtr > | outPDF |
The PDFBase object to be used in the subsequent generation. | |
PExtrPtr | thePartonExtractor |
The PartonExtractor object used to construct remnants. | |
tCascHdlPtr | theCKKW |
A pointer to a CascadeHandler to be used for CKKW-reweighting. | |
PartonPairVec | thePartonBins |
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor object. | |
XCombMap | theXCombs |
The map of XComb objects indexed by the corresponding PartonBin pair. | |
CutsPtr | theCuts |
The Cuts object to be used for this reader. | |
long | theNEvents |
The number of events in this reader. | |
long | position |
The number of events produced by this reader so far. | |
int | reopened |
The number of times this reader has been reopened. | |
long | theMaxScan |
The maximum number of events to scan to collect information about processes and cross sections. | |
bool | scanning |
Flag to tell whether we are in the process of scanning. | |
bool | isActive |
True if this is an active reader. | |
string | theCacheFileName |
Name of file used to cache the events form the reader in a fast-readable form. | |
bool | doCutEarly |
Determines whether to apply cuts to events before converting them to ThePEG format. | |
XSecStat | stats |
Collect statistics for this reader. | |
StatMap | statmap |
Collect statistics for each individual process. | |
PBIPair | thePartonBinInstances |
The pair of PartonBinInstance objects describing the current incoming partons in the event. | |
ObjectIndexer< long, ColourLine > | colourIndex |
Association between ColourLines and colour indices in the current translation. | |
ObjectIndexer< long, Particle > | particleIndex |
Association between Particles and indices in the current translation. | |
PPair | theBeams |
The instances of the beam particles for the current event. | |
PPair | theIncoming |
The instances of the incoming particles to the sub process for the current event. | |
PVector | theOutgoing |
The instances of the outgoing particles from the sub process for the current event. | |
PVector | theIntermediates |
The instances of the intermediate particles in the sub process for the current event. | |
CFile | theCacheFile |
File stream for the cache. | |
ReweightVector | reweights |
The reweight objects modifying the weights of this reader. | |
ReweightVector | preweights |
The preweight objects modifying the weights of this reader. | |
double | preweight |
The factor with which this reader was last pre-weighted. | |
bool | reweightPDF |
Should the event be reweighted by PDFs used by the PartonExtractor? | |
bool | doInitPDFs |
Should PDFBase objects be constructed from the information in the event file in the initialization? | |
int | theMaxMultCKKW |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the highest multiplicity matrix element in the group. | |
int | theMinMultCKKW |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the lowest multiplicity matrix element in the group. | |
double | lastweight |
The weight multiplying the last read event due to PDF reweighting, CKKW reweighting or assigned reweight and preweight objects. | |
map< string, double > | optionalWeights |
The optional weights associated to the last read events. | |
long | LHEeventnum |
The event number. | |
double | maxFactor |
If the maximum cross section of this reader has been increased with increaseMaxXSec(), this is the total factor with which it has been increased. | |
int | optionalnpLO |
npLO for FxFx merging | |
int | optionalnpNLO |
npNLO for FxFx merging | |
CrossSection | weightScale |
The (reweighted) XWGTUP value should be scaled with this cross section when compared to the overestimated cross section. | |
vector< double > | xSecWeights |
Individual scales for different sub-processes if reweighted. | |
map< int, double > | maxWeights |
Individual maximum weights for individual (possibly reweighted) processes. | |
bool | skipping |
Is set to true when getEvent() is called from skip(int). | |
unsigned int | theMomentumTreatment |
Option for the treatment of the momenta supplied. | |
bool | useWeightWarnings |
Set to true if warnings about possible weight incompatibilities should be issued. | |
bool | theReOpenAllowed |
Option to allow reopening of the file. | |
bool | theIncludeSpin |
Use the spin information. | |
static AbstractClassDescription< FxFxReader > | initFxFxReader |
Describe an abstract base class with persistent data. | |
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. | |
virtual bool | preInitialize () const |
Return true if this object needs to be initialized before all other objects because it needs to extract PDFs from the event file. | |
virtual void | initPDFs () |
Called from doinit() to extract PDFs from the event file and add the corresponding objects to the current EventGenerator. | |
void | setBeamA (long id) |
Access function for the interface. | |
long | getBeamA () const |
Access function for the interface. | |
void | setBeamB (long id) |
Access function for the interface. | |
long | getBeamB () const |
Access function for the interface. | |
void | setEBeamA (Energy e) |
Access function for the interface. | |
Energy | getEBeamA () const |
Access function for the interface. | |
void | setEBeamB (Energy e) |
Access function for the interface. | |
Energy | getEBeamB () const |
Access function for the interface. | |
void | setPDFA (PDFPtr) |
Access function for the interface. | |
PDFPtr | getPDFA () const |
Access function for the interface. | |
void | setPDFB (PDFPtr) |
Access function for the interface. | |
PDFPtr | getPDFB () const |
Access function for the interface. | |
FxFxReader & | operator= (const FxFxReader &)=delete |
Private and non-existent assignment operator. | |
Access information about the current event. | |
double | eventWeight () const |
The current event weight given by XWGTUP times possible reweighting. | |
const map< string, double > & | optionalEventWeights () const |
Return the optional named weights associated to the current event. | |
const long & | LHEEventNum () const |
Return the Les Houches event number associated with the current event. | |
const int & | optionalEventnpLO () const |
Return the optional npLO and npNLO. | |
const int & | optionalEventnpNLO () const |
const PBIPair & | partonBinInstances () const |
The pair of PartonBinInstance objects describing the current incoming partons in the event. | |
const PPair & | beams () const |
Return the instances of the beam particles for the current event. | |
const PPair & | incoming () const |
Return the instances of the incoming particles to the sub process for the current event. | |
const PVector & | outgoing () const |
Return the instances of the outgoing particles from the sub process for the current event. | |
const PVector & | intermediates () const |
Return the instances of the intermediate particles in the sub process for the current event. | |
int | maxMultCKKW () const |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the highest multiplicity matrix element in the group. | |
int | minMultCKKW () const |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the lowest multiplicity matrix element in the group. | |
static size_t | eventSize (int N) |
Return the size of this event in bytes. | |
Functions used by the persistent I/O system. | |
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 () |
Standard Init function used to initialize the interfaces. | |
Functions for manipulating cache files. | |
string | cacheFileName () const |
Name of file used to cache the events form the reader in a fast-readable form. | |
bool | cutEarly () const |
Determines whether to apply cuts to events converting them to ThePEG format. | |
CFile | cacheFile () const |
File stream for the cache. | |
void | openReadCacheFile () |
Open the cache file for reading. | |
void | openWriteCacheFile () |
Open the cache file for writing. | |
void | closeCacheFile () |
Close the cache file;. | |
void | cacheEvent () const |
Write the current event to the cache file. | |
bool | uncacheEvent () |
Read an event from the cache file. | |
void | reopen () |
Reopen a reader. | |
template<typename T > | |
static char * | mwrite (char *pos, const T &t, size_t n=1) |
Helper function to write a variable to a memory location. | |
template<typename T > | |
static const char * | mread (const char *pos, T &t, size_t n=1) |
Helper function to read a variable from a memory location. | |
Additional Inherited Members | |
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 |
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 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) |
Protected Attributes inherited from ThePEG::LastXCombInfo<> | |
XCPtr | theLastXComb |
FxFxReader is an abstract base class to be used for objects which reads event files or streams from matrix element generators.
Derived classes must at least implement the open() and doReadEvent() methods to read in information about the whole run into the HEPRUP variable and next event into the HEPEUP variable respectively. Also the close() function to close the file or stream read must be implemented. Although these functions are named as if we are reading from event files, they could just as well implement the actual generation of events.
After filling the HEPRUP and HEPEUP variables, which are protected and easily accesible from the sub-class, this base class will then be responsible for transforming this data to the ThePEG Event record in the getEvent() method. FxFxReader
s can only be used inside FxFxEventHandler objects.
In the initialization the virtual open() and scan() functions are called. Here the derived class must provide the information about the processes in the variables corresponding to the HEPRUP common block. Note that the IDWTUP is required to be +/- 1, and sub classes are required to change the information accordingly to ensure the correct corss section sampling. Note also that the controlling FxFxEventHandler may choose to generate weighted events even if IDWTUP is 1.
Note that the information given per process in e.g. the XSECUP and XMAXUP vectors is not used by the FxFxEventHandler and by default the FxFxReader is not assumed to be able to actively choose between the sub-processes. Instead, the FxFxEventHandler can handle several FxFxReader objects and choose between them. However, a sub-class of FxFxReader may set the flag isActive, in which case it is assumed to be able to select between its sub-processes itself.
The FxFxReader may be assigned a number ReweightBase objects which either completely reweights the events produced (in the reweights vector), or only biases the selection without influencing the cross section (in the preweights vector). Note that it is the responsibility of a sub-class to call the reweight() function and multiply the weight according to its return value (typically done in the readEvent() function).
Definition at line 77 of file FxFxReader.h.
|
private |
A vector of pointers to ReweightBase objects.
Definition at line 99 of file FxFxReader.h.
|
private |
Map for accumulating statistics of cross sections per process number.
Definition at line 88 of file FxFxReader.h.
|
private |
Map of XComb objects describing the incoming partons indexed by the corresponding PartonBin pair.
Definition at line 94 of file FxFxReader.h.
ThePEG::FxFxReader::FxFxReader | ( | bool | active = false | ) |
Default constructor.
If the optional argument is true, the reader is assumed to be able to produce events on demand for a given process.
|
inline |
Accept the current event assuming it was previously selcted.
Definition at line 396 of file FxFxReader.h.
References ThePEG::XSecStat::accept(), hepeup, ThePEG::HEPEUP::IDPRUP, statmap, and stats.
|
inline |
Return true if this reader is active.
Definition at line 367 of file FxFxReader.h.
References isActive.
|
inline |
Return the instances of the beam particles for the current event.
Definition at line 312 of file FxFxReader.h.
References theBeams.
|
inlineprotected |
|
inlineprotected |
Name of file used to cache the events form the reader in a fast-readable form.
If empty, no cache file will be generated.
Definition at line 453 of file FxFxReader.h.
References theCacheFileName.
|
protectedvirtual |
|
inline |
Return a possibly null pointer to a CascadeHandler to be used for CKKW-reweighting.
Definition at line 423 of file FxFxReader.h.
References theCKKW.
|
pure virtual |
Close the file or stream from which events have been read.
Implemented in ThePEG::FxFxFileReader.
Referenced by dofinish().
|
protectedvirtual |
Create instances of the incoming beams in the event and store them in particleIndex.
If no beam particles are included in the event they are created from the run info.
|
protectedvirtual |
Using the already created particles create a pair of PartonBinInstance objects corresponding to the incoming partons.
Return the corresponding PartonBin objects.
|
inline |
The number of events produced so far.
Is reset to zero if an event file is reopened.
Definition at line 355 of file FxFxReader.h.
References position.
|
inlineprotected |
Determines whether to apply cuts to events converting them to ThePEG format.
Definition at line 459 of file FxFxReader.h.
References doCutEarly.
|
inline |
The Cuts object to be used for this reader.
Definition at line 440 of file FxFxReader.h.
References theCuts.
|
inlineprotectedvirtual |
Finalize this object.
Called in the run phase just after a run has ended. Used eg. to write out statistics.
Reimplemented from ThePEG::InterfacedBase.
Definition at line 613 of file FxFxReader.h.
References close(), and ThePEG::InterfacedBase::dofinish().
|
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.
Reimplemented in ThePEG::FxFxFileReader.
|
protectedvirtual |
Initialize this object.
Called in the run phase just before a run begins.
Reimplemented from ThePEG::InterfacedBase.
|
pure virtual |
Read the next event from the file or stream into the corresponding protected variables.
Return false if there is no more events.
Implemented in ThePEG::FxFxFileReader.
|
inlinestatic |
Return the size of this event in bytes.
To be used for the cache file. npart is the number of particles. If npart is 0, the number is taken from NUP.
Definition at line 270 of file FxFxReader.h.
|
inline |
The current event weight given by XWGTUP times possible reweighting.
Note that this is not necessarily the same as what is returned by getEvent(), which is scaled with the maximum weight.
Definition at line 286 of file FxFxReader.h.
References hepeup, lastweight, and ThePEG::HEPEUP::XWGTUP.
|
virtual |
Calls readEvent() or uncacheEvent() to read information into the FxFx common block variables.
This function is called by the FxFxEventHandler if this reader has been selectod to produce an event.
tXCombPtr ThePEG::FxFxReader::getXComb | ( | ) |
Get an XComb object.
Converts the information in the Les Houches common block variables to an XComb object describing the sub process. This is the way information is conveyed from the reader to the controlling FxFxEventHandler.
|
inline |
Return the instances of the incoming particles to the sub process for the current event.
Definition at line 317 of file FxFxReader.h.
References theIncoming.
|
virtual |
Initialize.
This function is called by the FxFxEventHandler to which this object is assigned.
Reimplemented in ThePEG::FxFxFileReader.
|
inline |
Return the instances of the intermediate particles in the sub process for the current event.
Definition at line 327 of file FxFxReader.h.
References theIntermediates.
|
inline |
Return the Les Houches event number associated with the current event.
Definition at line 296 of file FxFxReader.h.
References LHEeventnum.
|
inline |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the highest multiplicity matrix element in the group.
Definition at line 334 of file FxFxReader.h.
References theMaxMultCKKW.
|
inline |
The maximum number of events to scan to collect information about processes and cross sections.
If less than 0, all events will be scanned.
Definition at line 362 of file FxFxReader.h.
References theMaxScan.
|
inline |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the lowest multiplicity matrix element in the group.
Definition at line 341 of file FxFxReader.h.
References theMinMultCKKW.
|
inlinestaticprotected |
Helper function to read a variable from a memory location.
Definition at line 511 of file FxFxReader.h.
|
inlinestaticprotected |
Helper function to write a variable to a memory location.
Definition at line 502 of file FxFxReader.h.
|
inline |
True if negative weights may be produced.
Definition at line 372 of file FxFxReader.h.
References heprup, and ThePEG::HEPRUP::IDWTUP.
|
inline |
The number of events found in this reader.
If less than zero the number of events are unlimited.
Definition at line 349 of file FxFxReader.h.
References theNEvents.
|
inlineprotected |
The number of events in this reader.
If less than zero the number of events is unlimited.
Definition at line 585 of file FxFxReader.h.
References theNEvents.
|
pure virtual |
Open a file or stream with events and read in the run information into the heprup variable.
Implemented in ThePEG::FxFxFileReader.
|
inline |
Return the optional npLO and npNLO.
Definition at line 301 of file FxFxReader.h.
References optionalnpLO.
|
inline |
Definition at line 302 of file FxFxReader.h.
|
inline |
Return the optional named weights associated to the current event.
Definition at line 291 of file FxFxReader.h.
References optionalWeights.
|
pure virtual |
return the weight names
Implemented in ThePEG::FxFxFileReader.
|
inline |
Return the instances of the outgoing particles from the sub process for the current event.
Definition at line 322 of file FxFxReader.h.
References theOutgoing.
|
inline |
The pair of PartonBinInstance objects describing the current incoming partons in the event.
Definition at line 308 of file FxFxReader.h.
References thePartonBinInstances.
|
inline |
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor object.
Definition at line 429 of file FxFxReader.h.
References thePartonBins.
|
inline |
The PartonExtractor object used to construct remnants.
Definition at line 417 of file FxFxReader.h.
References thePartonExtractor.
void ThePEG::FxFxReader::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::FxFxReader::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
|
protectedvirtual |
Return true if this object needs to be initialized before all other objects because it needs to extract PDFs from the event file.
Reimplemented from ThePEG::InterfacedBase.
Reimplemented in ThePEG::FxFxFileReader.
|
inline |
Collected statistics about the individual processes.
Definition at line 382 of file FxFxReader.h.
References statmap.
|
virtual |
Calls doReadEvent() and performs pre-defined reweightings.
A sub-class overrides this function it must make sure that the corresponding reweightings are done.
|
inline |
Reject the current event assuming it was previously accepted.
Definition at line 404 of file FxFxReader.h.
References hepeup, ThePEG::HEPEUP::IDPRUP, ThePEG::XSecStat::reject(), statmap, and stats.
|
protected |
Reopen a reader.
If we have reached the end of an event file, reopen it and issue a warning if we have used up a large fraction of it.
double ThePEG::FxFxReader::reweight | ( | ) |
Reweights the current event using the reweights and preweights vectors.
It is the responsibility of the sub-class to call this function after the HEPEUP information has been retrieved.
|
virtual |
Scan the file or stream to obtain information about cross section weights and particles etc.
This function should fill the variables corresponding to the /HEPRUP/ common block. The function returns the number of events scanned.
|
inline |
Select the current event.
It will later be rejected with a probability given by weight.
Definition at line 388 of file FxFxReader.h.
References hepeup, ThePEG::HEPEUP::IDPRUP, ThePEG::XSecStat::select(), statmap, and stats.
|
virtual |
Possibility for subclasses to recover from non-conformant settings of XMAXUP when an event file has been scanned with neve events.
Should set weightScale so that the average XMAXUP times weightScale gives the cross section for a process. (This is needed for MadEvent).
|
virtual |
Skip n events.
Used by FxFxEventHandler to make sure that a file is scanned an even number of times in case the events are not ramdomly distributed in the file.
|
protected |
Read an event from the cache file.
Return false if something went wrong.
|
inlineprotected |
The map of XComb objects indexed by the corresponding PartonBin pair.
Definition at line 591 of file FxFxReader.h.
References theXCombs.
|
inline |
The map of XComb objects indexed by the corresponding PartonBin pair.
Definition at line 435 of file FxFxReader.h.
References theXCombs.
|
inline |
The collected cross section statistics for this reader.
Definition at line 377 of file FxFxReader.h.
References stats.
|
friend |
FxFxEventHandler should have access to our private parts.
Definition at line 82 of file FxFxReader.h.
|
protected |
Association between ColourLines and colour indices in the current translation.
Definition at line 753 of file FxFxReader.h.
|
protected |
Determines whether to apply cuts to events before converting them to ThePEG format.
Definition at line 731 of file FxFxReader.h.
Referenced by cutEarly().
|
protected |
Should PDFBase objects be constructed from the information in the event file in the initialization?
Definition at line 813 of file FxFxReader.h.
|
protected |
The HEPEUP common block.
Definition at line 641 of file FxFxReader.h.
Referenced by accept(), eventWeight(), reject(), and select().
|
protected |
The HEPRUP common block.
Definition at line 636 of file FxFxReader.h.
Referenced by negativeWeights().
|
protected |
The ParticleData objects corresponding to the incoming particles.
Definition at line 646 of file FxFxReader.h.
|
staticprivate |
Describe an abstract base class with persistent data.
Definition at line 940 of file FxFxReader.h.
The PDFBase objects which has been used for the beam particle when generating the events being read.
Specified in the interface or derived from PDFGUP and PDFSUP.
Definition at line 653 of file FxFxReader.h.
|
protected |
True if this is an active reader.
Definition at line 719 of file FxFxReader.h.
Referenced by active().
|
protected |
The weight multiplying the last read event due to PDF reweighting, CKKW reweighting or assigned reweight and preweight objects.
Definition at line 836 of file FxFxReader.h.
Referenced by eventWeight().
|
protected |
|
protected |
If the maximum cross section of this reader has been increased with increaseMaxXSec(), this is the total factor with which it has been increased.
Definition at line 853 of file FxFxReader.h.
|
protected |
Individual maximum weights for individual (possibly reweighted) processes.
Definition at line 880 of file FxFxReader.h.
|
protected |
npLO for FxFx merging
Definition at line 858 of file FxFxReader.h.
Referenced by optionalEventnpLO().
|
protected |
npNLO for FxFx merging
Definition at line 863 of file FxFxReader.h.
|
protected |
The optional weights associated to the last read events.
Definition at line 841 of file FxFxReader.h.
Referenced by optionalEventWeights().
vector<string> ThePEG::FxFxReader::optionalWeightsNames |
Definition at line 154 of file FxFxReader.h.
The PDFBase object to be used in the subsequent generation.
Definition at line 658 of file FxFxReader.h.
|
protected |
Association between Particles and indices in the current translation.
Definition at line 759 of file FxFxReader.h.
|
protected |
The number of events produced by this reader so far.
Is reset every time an event file is reopened.
Definition at line 697 of file FxFxReader.h.
Referenced by currentPosition().
|
protected |
The factor with which this reader was last pre-weighted.
Definition at line 802 of file FxFxReader.h.
|
protected |
The preweight objects modifying the weights of this reader.
Definition at line 797 of file FxFxReader.h.
|
protected |
The number of times this reader has been reopened.
Definition at line 702 of file FxFxReader.h.
|
protected |
Should the event be reweighted by PDFs used by the PartonExtractor?
Definition at line 807 of file FxFxReader.h.
|
protected |
The reweight objects modifying the weights of this reader.
Definition at line 792 of file FxFxReader.h.
|
protected |
Flag to tell whether we are in the process of scanning.
Definition at line 714 of file FxFxReader.h.
|
protected |
Is set to true when getEvent() is called from skip(int).
Definition at line 885 of file FxFxReader.h.
|
protected |
Collect statistics for each individual process.
Definition at line 741 of file FxFxReader.h.
Referenced by accept(), processStats(), reject(), and select().
|
protected |
Collect statistics for this reader.
Definition at line 736 of file FxFxReader.h.
Referenced by accept(), reject(), select(), and xSecStats().
|
protected |
The instances of the beam particles for the current event.
Definition at line 764 of file FxFxReader.h.
Referenced by beams().
|
protected |
|
protected |
Name of file used to cache the events form the reader in a fast-readable form.
If empty, no cache file will be generated.
Definition at line 725 of file FxFxReader.h.
Referenced by cacheFileName().
|
protected |
A pointer to a CascadeHandler to be used for CKKW-reweighting.
Definition at line 668 of file FxFxReader.h.
Referenced by CKKWHandler().
|
protected |
The Cuts object to be used for this reader.
Definition at line 685 of file FxFxReader.h.
Referenced by cuts().
|
protected |
Use the spin information.
Definition at line 906 of file FxFxReader.h.
|
protected |
The instances of the incoming particles to the sub process for the current event.
Definition at line 770 of file FxFxReader.h.
Referenced by incoming().
|
protected |
The instances of the intermediate particles in the sub process for the current event.
Definition at line 782 of file FxFxReader.h.
Referenced by intermediates().
|
protected |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the highest multiplicity matrix element in the group.
Definition at line 821 of file FxFxReader.h.
Referenced by maxMultCKKW().
|
protected |
The maximum number of events to scan to collect information about processes and cross sections.
If less than 0, all events will be scanned.
Definition at line 709 of file FxFxReader.h.
Referenced by maxScan().
|
protected |
If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the lowest multiplicity matrix element in the group.
Definition at line 829 of file FxFxReader.h.
Referenced by minMultCKKW().
|
protected |
Option for the treatment of the momenta supplied.
Definition at line 890 of file FxFxReader.h.
|
protected |
The number of events in this reader.
If less than zero the number of events is unlimited.
Definition at line 691 of file FxFxReader.h.
Referenced by NEvents().
|
protected |
The instances of the outgoing particles from the sub process for the current event.
Definition at line 776 of file FxFxReader.h.
Referenced by outgoing().
|
protected |
The pair of PartonBinInstance objects describing the current incoming partons in the event.
Definition at line 747 of file FxFxReader.h.
Referenced by partonBinInstances().
|
protected |
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor object.
Definition at line 674 of file FxFxReader.h.
Referenced by partonBins().
|
protected |
The PartonExtractor object used to construct remnants.
Definition at line 663 of file FxFxReader.h.
Referenced by partonExtractor().
|
protected |
Option to allow reopening of the file.
Definition at line 901 of file FxFxReader.h.
|
protected |
The map of XComb objects indexed by the corresponding PartonBin pair.
Definition at line 680 of file FxFxReader.h.
Referenced by xCombs().
|
protected |
Set to true if warnings about possible weight incompatibilities should be issued.
Definition at line 896 of file FxFxReader.h.
|
protected |
The (reweighted) XWGTUP value should be scaled with this cross section when compared to the overestimated cross section.
Definition at line 869 of file FxFxReader.h.
|
protected |
Individual scales for different sub-processes if reweighted.
Definition at line 874 of file FxFxReader.h.