Herwig 7.3.0
|
The EvtGenInterface class is the main class for the use of the EvtGen decay package with Herwig. More...
#include <EvtGenInterface.h>
Public Member Functions | |
EvtGenInterface () | |
The default constructor. | |
EvtGenInterface (const EvtGenInterface &) | |
The copy constructor (explicit as cannot copy streams) | |
ParticleVector | decay (const Particle &parent, bool recursive, const DecayMode &dm) const |
Use EvtGen to perform a decay. | |
![]() | |
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 |
![]() | |
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 |
![]() | |
void | debug () const |
virtual void | debugme () const |
![]() | |
CounterType | referenceCount () const |
![]() | |
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 |
Protected Member Functions | |
Functions to convert between EvtGen and Herwig classes | |
EvtParticle * | EvtGenParticle (const Particle &part) const |
Convert a particle to an EvtGen particle. | |
ParticleVector | decayProducts (EvtParticle *evtpart, bool boost=true) const |
Return the decay products of an EvtGen particle in as ThePEG particles. | |
EvtVector4R | EvtGenMomentum (const Lorentz5Momentum &mom) const |
Convert a Lorentz5Momentum to a real EvtGen 4-vector. | |
EvtId | EvtGenID (int id, bool exception=true) const |
Convert a PDG code from ThePEG into an EvtGen particle id. | |
EvtDiracSpinor | EvtGenSpinor (const LorentzSpinor< SqrtEnergy > &sp) const |
Convert a LorentzSpinor to an EvtGen one. | |
EvtVector4C | EvtGenPolarization (const LorentzPolarizationVector &eps) const |
Convert a LorentzPolarizationVector to a complex EvtGen 4-vector. | |
EvtRaritaSchwinger | EvtGenRSSpinor (const LorentzRSSpinor< SqrtEnergy > &sp) const |
Convert our Rarita-Schwinger spinor to the EvtGen one. | |
EvtTensor4C | EvtGenTensor (const LorentzTensor< double > &ten) const |
Convert our tensor to the EvtGen one. | |
EvtSpinDensity | EvtGenSpinDensity (const RhoDMatrix &rho) const |
Convert a spin density matrix to an EvtGen spin density matrix. | |
EvtComplex | EvtGenComplex (Complex c) const |
Convert from our complex to the EvtGen one. | |
PPtr | ThePEGParticle (EvtParticle *part, tcPDPtr pd, bool spin=true) const |
Functions to convert between EvtGen and Herwig classes. | |
void | ThePEGSpin (PPtr pegpart, EvtParticle *evtpart) const |
Set the SpinInfo for a ThePEG particle using an EvtGen particle. | |
int | ThePEGID (EvtId id, bool exception=true) const |
Convert an EvtGen EvtId to a PDG code in our conventions. | |
Lorentz5Momentum | ThePEGMomentum (const EvtVector4R &mom, double mass) const |
Convert from EvtGen momentum to Lorentz5Momentum. | |
Complex | ThePEGComplex (EvtComplex c) const |
Convert from EvtGen complex to ours. | |
RhoDMatrix | ThePEGSpinDensity (const EvtSpinDensity &rho, int id) const |
Convert a spin density to a ThePEG one from an EvtGen one. | |
LorentzSpinor< SqrtEnergy > | ThePEGSpinor (const EvtDiracSpinor &sp) const |
Convert an EvtDiracSpinor a LorentzSpinor. | |
LorentzPolarizationVector | ThePEGPolarization (const EvtVector4C &eps) const |
Convert an EvtGen complex 4-vector to a LorentzPolarizationVector. | |
LorentzRSSpinor< SqrtEnergy > | ThePEGRSSpinor (const EvtRaritaSchwinger &sp) const |
Convert an EvtGen Rarita-Schwinger spinor to ours. | |
LorentzTensor< double > | ThePEGTensor (const EvtTensor4C &ten) const |
Convert an EvtGen tensor to ThePEG. | |
void | checkConversion () const |
Check the conversion of particles between Herwig and EvtGen. | |
void | outputEvtGenDecays (long id) const |
Output the EvtGen decay modes for a given particle. | |
int | EvtGenChannel (const DecayMode &dm) const |
Find the location in the EvtGen list of decay channels for a given decay mode. | |
tSpinPtr | getSpinInfo (const Particle &part) const |
Check the particle has SpinInfo and if not create it. | |
void | constructVertex (const Particle &parent, ParticleVector products, EvtDecayAmp *damp) const |
Construct the DecayVertex for Herwig using the information from EvtGen. | |
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. | |
![]() | |
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) |
![]() | |
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 &) |
![]() | |
ReferenceCounted (const ReferenceCounted &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
![]() | |
const Named & | operator= (const Named &other) |
const string & | name (const string &newName) |
Standard Interfaced functions. | |
string | decayName_ |
Names of the various EvtGen parameter files. | |
string | pdtName_ |
The name of the file containing the particle data. | |
vector< string > | userDecays_ |
Names of addition user specified decays. | |
bool | reDirect_ |
Whether or not to redirect cout and cerr when EvtGen is running. | |
bool | checkConv_ |
Check the conversion of the particles. | |
vector< long > | convID_ |
Particles for which to output the EvtGen decays. | |
string | p8Data_ |
Location of the PYTHIA8 data directory. | |
EvtRandomEngine * | evtrnd_ |
Pointer to the random number generator for EvtGen. | |
EvtGen * | evtgen_ |
Main EvtGen object. | |
ofstream | logFile_ |
File to output the log info to. | |
virtual void | doinitrun () |
Initialize this object. | |
virtual void | dofinish () |
Finalize this object. | |
EvtGenInterface & | operator= (const EvtGenInterface &)=delete |
The assignment operator is private and must never be called. | |
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 () |
The standard Init function used to initialize the interfaces. | |
Additional Inherited Members | |
![]() | |
enum | InitState |
![]() | |
typedef unsigned int | CounterType |
![]() | |
static void | Init () |
![]() | |
static void | Init () |
![]() | |
static void | Init () |
![]() | |
initializing | |
uninitialized | |
initialized | |
runready | |
![]() | |
const unsigned long | uniqueId |
![]() | |
static void | registerRepository (IBPtr) |
static void | registerRepository (IBPtr, string newName) |
The EvtGenInterface class is the main class for the use of the EvtGen decay package with Herwig.
Definition at line 40 of file EvtGenInterface.h.
|
protectedvirtual |
Make a simple clone of this object.
Implements ThePEG::InterfacedBase.
|
protected |
Construct the DecayVertex for Herwig using the information from EvtGen.
parent | The decaying particle |
products | The outgoing particles |
damp | Pointer to the EvtGen decayer |
ParticleVector Herwig::EvtGenInterface::decay | ( | const Particle & | parent, |
bool | recursive, | ||
const DecayMode & | dm | ||
) | const |
Use EvtGen to perform a decay.
parent | The decaying particle |
dm | The decaymode |
|
protected |
Return the decay products of an EvtGen particle in as ThePEG particles.
evtpart | The EvtGen particle |
Referenced by ThePEGParticle().
|
protectedvirtual |
Finalize this object.
Called in the run phase just after a run has ended. Used eg. to write out statistics.
Reimplemented from ThePEG::InterfacedBase.
|
protectedvirtual |
Initialize this object.
Called in the run phase just before a run begins.
Reimplemented from ThePEG::InterfacedBase.
|
inlineprotected |
Convert from our complex to the EvtGen one.
Definition at line 199 of file EvtGenInterface.h.
Referenced by EvtGenPolarization(), EvtGenRSSpinor(), EvtGenSpinDensity(), EvtGenSpinor(), and EvtGenTensor().
|
protected |
Convert a PDG code from ThePEG into an EvtGen particle id.
id | The PDG code |
exception | Whether or not to throw an Exception if fails |
|
inlineprotected |
Convert a Lorentz5Momentum to a real EvtGen 4-vector.
mom | The momentum to be converted |
Definition at line 111 of file EvtGenInterface.h.
|
protected |
Convert a particle to an EvtGen particle.
part | The particle to be converted. |
|
inlineprotected |
Convert a LorentzPolarizationVector to a complex EvtGen 4-vector.
eps | The polarization vector to be converted |
Definition at line 141 of file EvtGenInterface.h.
References EvtGenComplex().
|
inlineprotected |
Convert our Rarita-Schwinger spinor to the EvtGen one.
sp | Our RS Spinor |
Definition at line 150 of file EvtGenInterface.h.
References EvtGenComplex(), and ThePEG::sqrt().
|
inlineprotected |
Convert a spin density matrix to an EvtGen spin density matrix.
rho | The spin density matrix to be converted. |
Definition at line 185 of file EvtGenInterface.h.
References EvtGenComplex(), and ThePEG::RhoDMatrix::iSpin().
|
inlineprotected |
Convert a LorentzSpinor to an EvtGen one.
The spinor is converted to the EvtGen Dirac representation/
sp | The LorentzSpinor |
Definition at line 127 of file EvtGenInterface.h.
References EvtGenComplex(), ThePEG::Helicity::LorentzSpinor< typename Value >::s1(), ThePEG::Helicity::LorentzSpinor< typename Value >::s2(), ThePEG::Helicity::LorentzSpinor< typename Value >::s3(), ThePEG::Helicity::LorentzSpinor< typename Value >::s4(), and ThePEG::sqrt().
|
inlineprotected |
Convert our tensor to the EvtGen one.
ten | Our tensor |
Definition at line 172 of file EvtGenInterface.h.
References EvtGenComplex().
|
protectedvirtual |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from ThePEG::InterfacedBase.
Check the particle has SpinInfo and if not create it.
part | The particle |
Definition at line 342 of file EvtGenInterface.h.
References ThePEG::Particle::dataPtr(), ThePEG::Exception::eventerror, ThePEG::Particle::momentum(), ThePEG::PDT::Spin0, ThePEG::PDT::Spin1, ThePEG::PDT::Spin1Half, ThePEG::PDT::Spin2, ThePEG::PDT::Spin3Half, and ThePEG::Particle::spinInfo().
|
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.
|
privatedelete |
The assignment operator is private and must never be called.
In fact, it should not even be implemented.
|
protected |
Output the EvtGen decay modes for a given particle.
id | The PDG code of the particle to output |
void Herwig::EvtGenInterface::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 Herwig::EvtGenInterface::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
|
inlineprotected |
Convert from EvtGen complex to ours.
Definition at line 250 of file EvtGenInterface.h.
Referenced by ThePEGPolarization(), ThePEGRSSpinor(), ThePEGSpinor(), and ThePEGTensor().
|
protected |
Convert an EvtGen EvtId to a PDG code in our conventions.
id | The EvtGen ID. |
exception | Whether or not to throw an Exception if fails |
|
inlineprotected |
Convert from EvtGen momentum to Lorentz5Momentum.
mom | The EvtGen 4-momentum |
mass | The mass |
Definition at line 243 of file EvtGenInterface.h.
Referenced by ThePEGParticle().
|
inlineprotected |
Functions to convert between EvtGen and Herwig classes.
Convert a particle from an EvtGen one to ThePEG one.
part | The EvtGen particle. |
pd | Pointer to the particle data object of ThePEG for the particle. |
spin | Convert the spin information as well |
Definition at line 214 of file EvtGenInterface.h.
References decayProducts(), ThePEGMomentum(), and ThePEGSpin().
|
inlineprotected |
Convert an EvtGen complex 4-vector to a LorentzPolarizationVector.
eps | The complex 4-vector to be converted. |
Definition at line 278 of file EvtGenInterface.h.
References ThePEGComplex().
|
inlineprotected |
Convert an EvtGen Rarita-Schwinger spinor to ours.
sp | The EvtGen RS spinor. |
Definition at line 289 of file EvtGenInterface.h.
References ThePEG::sqrt(), and ThePEGComplex().
|
protected |
Set the SpinInfo for a ThePEG particle using an EvtGen particle.
pegpart | ThePEG particle. |
evtpart | The EvtGen particle. |
Referenced by ThePEGParticle().
|
protected |
Convert a spin density to a ThePEG one from an EvtGen one.
rho | The spin density matrix to be converted |
id | The PDG code of the particle to get special cases right. |
|
inlineprotected |
Convert an EvtDiracSpinor a LorentzSpinor.
This spinor is converted to the default Dirac matrix representation used by ThePEG.
sp | The EvtDiracSpinor |
Definition at line 266 of file EvtGenInterface.h.
References ThePEG::sqrt(), and ThePEGComplex().
|
inlineprotected |
Convert an EvtGen tensor to ThePEG.
ten | The EvtGen tensor |
Definition at line 311 of file EvtGenInterface.h.
References ThePEGComplex().
|
private |
Check the conversion of the particles.
Definition at line 445 of file EvtGenInterface.h.
|
private |
Particles for which to output the EvtGen decays.
Definition at line 450 of file EvtGenInterface.h.
|
private |
Names of the various EvtGen parameter files.
The name of the file containing the decays
Definition at line 424 of file EvtGenInterface.h.
|
private |
Main EvtGen object.
Definition at line 467 of file EvtGenInterface.h.
|
private |
Pointer to the random number generator for EvtGen.
Definition at line 462 of file EvtGenInterface.h.
|
mutableprivate |
File to output the log info to.
Definition at line 472 of file EvtGenInterface.h.
|
private |
Location of the PYTHIA8 data directory.
Definition at line 455 of file EvtGenInterface.h.
|
private |
The name of the file containing the particle data.
Definition at line 429 of file EvtGenInterface.h.
|
private |
Whether or not to redirect cout and cerr when EvtGen is running.
Definition at line 440 of file EvtGenInterface.h.
|
private |
Names of addition user specified decays.
Definition at line 434 of file EvtGenInterface.h.