#include <FlavourGenerator.h>
Public Member Functions | |
Virtual functions to be overridden by subclasses. | |
virtual tcPDPair | generateHadron (tcPDPtr quark) const =0 |
Generate a hadron from a quark. | |
tcPDPair | alwaysGenerateHadron (tcPDPtr quark) const |
Same as generateHadron(tcPDPtr), but throws an exception if no hadron could be produced. | |
virtual tcPDPtr | getHadron (tcPDPtr q1, tcPDPtr q2) const |
Get hadron from flavours. | |
virtual tcPDPtr | getHadron (long iq1, long iq2) const |
Get hadron from flavours. | |
tcPDPtr | alwaysGetHadron (tcPDPtr q1, tcPDPtr q2) const |
Same as getHadron(tcPDPtr, tcPDPtr) but thows an exception if no hadron could be produced. | |
tcPDPtr | alwaysGetHadron (long iq1, long iq2) const |
Same as getHadron(long, long) but thows an exception if no hadron could be produced. | |
virtual tcPDPtr | getBaryon (tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const |
Return a baryon with the flavour content given by the (anti)quarks in the argument. | |
virtual tcPDPtr | getBaryon (long q1, long q2, long q3) const |
Return a baryon with the flavour content given by the (anti)quarks in the argument. | |
tcPDPtr | alwaysGetBaryon (tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const |
Same as getBaryon(tcPDPtr, tcPDPtr, tcPDPtr), but throws an exception if no baryon could be produced. | |
tcPDPtr | alwaysGetBaryon (long q1, long q2, long q3) const |
Same as getBaryon(long, long, long), but throws an exception if no baryon could be produced. | |
virtual long | selectQuark () const =0 |
Generate a random quark flavour. | |
virtual long | selectFlavour () const =0 |
Generate a random (di)quark flavour. | |
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 Public Member Functions | |
static void | Init () |
Standard Init function used to initialize the interface. | |
Private Member Functions | |
FlavourGenerator & | operator= (const FlavourGenerator &) |
Private and non-existent assignment operator. | |
Static Private Attributes | |
static AbstractNoPIOClassDescription < FlavourGenerator > | initFlavourGenerator |
Describe aa abstract class without persistent data. |
FlavourGenerator inherits from the HandlerBase class.
The interface is based on the flavour generation implementation in Pythia but is general enough to be used in other situations. The main virtual functions to be overridden in subclasses are generateHadron(tcPDPtr), getHadron(tcPDPtr, tcPDPtr), getHadron(long, long) getBaryon(tcPDPtr, tcPDPtr, tcPDPtr), getBaryon(long, long, long), selectQuark() and selectFlavour(). In this base class the getHadron(tcPDPtr, tcPDPtr) and getHadron(long, long) are implemented to call eachother, so a subclass must implement at least one of them. The same thing is true for getBaryon(tcPDPtr, tcPDPtr, tcPDPtr) and getBaryon(long, long, long)
Definition at line 39 of file FlavourGenerator.h.
Generate a hadron from a quark.
Given a quark(antiquark, diquark or antidiquark), choose a quark-antiquark (or antidiquark-diquark) pair. Return (first) a hadron formed by the original quark and the antiquark together with (second) the generated quark. Returns null pointers if the generation failed.
quark | a quark, antiquark, diquark or antidiquark. |
Implemented in ThePEG::SimpleFlavour.
Get hadron from flavours.
Return a hadron with the flavour content given by the (anti-)(di-)quarks in the argument. The arguments are given as ParticleData pointers. The default versions will call the getHadron(long, long).
q1 | the first flavour. | |
q2 | the second flavour. |
virtual tcPDPtr ThePEG::FlavourGenerator::getHadron | ( | long | iq1, | |
long | iq2 | |||
) | const [virtual] |
Get hadron from flavours.
Return a hadron with the flavour content given by the (anti-)(di-)quarks in the argument. The arguments are given as PDG codes. The default versions will call the getHadron(tcPDPtr, tcPDPtr).
iq1 | the PDG code of the first flavour. | |
iq2 | the PDG code of the second flavour. |
Reimplemented in ThePEG::SimpleFlavour.
virtual tcPDPtr ThePEG::FlavourGenerator::getBaryon | ( | tcPDPtr | q1, | |
tcPDPtr | q2, | |||
tcPDPtr | q3 | |||
) | const [virtual] |
Return a baryon with the flavour content given by the (anti)quarks in the argument.
The arguments are given as particle data pointers. The default versions will call getBaryon(long, long, long). If no corresponding hadron was formed it should return the null pointer.
q1 | the first flavour. | |
q2 | the second flavour. | |
q3 | the third flavour. |
virtual tcPDPtr ThePEG::FlavourGenerator::getBaryon | ( | long | q1, | |
long | q2, | |||
long | q3 | |||
) | const [virtual] |
Return a baryon with the flavour content given by the (anti)quarks in the argument.
The arguments are given as particle data pointers. The default versions will call getBaryon(tcPDPtr, tcPDPtr, tcPDPtr). If no corresponding hadron was formed it should return the null pointer.
q1 | the PDG code of the first flavour. | |
q2 | the PDG code of the second flavour. | |
q3 | the PDG code of the third flavour. |
Reimplemented in ThePEG::SimpleFlavour.
void ThePEG::FlavourGenerator::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
Reimplemented from ThePEG::Interfaced.
Reimplemented in ThePEG::SimpleFlavour.
void ThePEG::FlavourGenerator::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. |
Reimplemented from ThePEG::Interfaced.
Reimplemented in ThePEG::SimpleFlavour.