herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
Herwig::EvtGenInterface Class Reference

The EvtGenInterface class is the main class for the use of the EvtGen decay package with Herwig. More...

#include <EvtGenInterface.h>

Inheritance diagram for Herwig::EvtGenInterface:

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

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.
 
- 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 &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
- Protected Member Functions inherited from ThePEG::Named
const Namedoperator= (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.
 
EvtGenInterfaceoperator= (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

- Public Types inherited from ThePEG::InterfacedBase
enum  InitState
 
- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 
- 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)
 

Detailed Description

The EvtGenInterface class is the main class for the use of the EvtGen decay package with Herwig.

See also
The interfaces defined for EvtGenInterface.

Definition at line 40 of file EvtGenInterface.h.

Member Function Documentation

◆ clone()

virtual IBPtr Herwig::EvtGenInterface::clone ( ) const
protectedvirtual

Make a simple clone of this object.

Returns
a pointer to the new object.

Implements ThePEG::InterfacedBase.

◆ constructVertex()

void Herwig::EvtGenInterface::constructVertex ( const Particle parent,
ParticleVector  products,
EvtDecayAmp *  damp 
) const
protected

Construct the DecayVertex for Herwig using the information from EvtGen.

Parameters
parentThe decaying particle
productsThe outgoing particles
dampPointer to the EvtGen decayer

◆ decay()

ParticleVector Herwig::EvtGenInterface::decay ( const Particle parent,
bool  recursive,
const DecayMode dm 
) const

Use EvtGen to perform a decay.

Parameters
parentThe decaying particle
dmThe decaymode
Returns
The decay products

◆ decayProducts()

ParticleVector Herwig::EvtGenInterface::decayProducts ( EvtParticle *  evtpart,
bool  boost = true 
) const
protected

Return the decay products of an EvtGen particle in as ThePEG particles.

Parameters
evtpartThe EvtGen particle

Referenced by ThePEGParticle().

◆ dofinish()

virtual void Herwig::EvtGenInterface::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::InterfacedBase.

◆ doinitrun()

virtual void Herwig::EvtGenInterface::doinitrun ( )
protectedvirtual

Initialize this object.

Called in the run phase just before a run begins.

Reimplemented from ThePEG::InterfacedBase.

◆ EvtGenComplex()

EvtComplex Herwig::EvtGenInterface::EvtGenComplex ( Complex  c) const
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().

◆ EvtGenID()

EvtId Herwig::EvtGenInterface::EvtGenID ( int  id,
bool  exception = true 
) const
protected

Convert a PDG code from ThePEG into an EvtGen particle id.

Parameters
idThe PDG code
exceptionWhether or not to throw an Exception if fails

◆ EvtGenMomentum()

EvtVector4R Herwig::EvtGenInterface::EvtGenMomentum ( const Lorentz5Momentum &  mom) const
inlineprotected

Convert a Lorentz5Momentum to a real EvtGen 4-vector.

Parameters
momThe momentum to be converted

Definition at line 111 of file EvtGenInterface.h.

◆ EvtGenParticle()

EvtParticle * Herwig::EvtGenInterface::EvtGenParticle ( const Particle part) const
protected

Convert a particle to an EvtGen particle.

Parameters
partThe particle to be converted.

◆ EvtGenPolarization()

EvtVector4C Herwig::EvtGenInterface::EvtGenPolarization ( const LorentzPolarizationVector eps) const
inlineprotected

Convert a LorentzPolarizationVector to a complex EvtGen 4-vector.

Parameters
epsThe polarization vector to be converted

Definition at line 141 of file EvtGenInterface.h.

References EvtGenComplex().

◆ EvtGenRSSpinor()

EvtRaritaSchwinger Herwig::EvtGenInterface::EvtGenRSSpinor ( const LorentzRSSpinor< SqrtEnergy > &  sp) const
inlineprotected

Convert our Rarita-Schwinger spinor to the EvtGen one.

Parameters
spOur RS Spinor

Definition at line 150 of file EvtGenInterface.h.

References EvtGenComplex(), and ThePEG::sqrt().

◆ EvtGenSpinDensity()

EvtSpinDensity Herwig::EvtGenInterface::EvtGenSpinDensity ( const RhoDMatrix rho) const
inlineprotected

Convert a spin density matrix to an EvtGen spin density matrix.

Parameters
rhoThe spin density matrix to be converted.

Definition at line 185 of file EvtGenInterface.h.

References EvtGenComplex(), and ThePEG::RhoDMatrix::iSpin().

◆ EvtGenSpinor()

EvtDiracSpinor Herwig::EvtGenInterface::EvtGenSpinor ( const LorentzSpinor< SqrtEnergy > &  sp) const
inlineprotected

Convert a LorentzSpinor to an EvtGen one.

The spinor is converted to the EvtGen Dirac representation/

Parameters
spThe 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().

◆ EvtGenTensor()

EvtTensor4C Herwig::EvtGenInterface::EvtGenTensor ( const LorentzTensor< double > &  ten) const
inlineprotected

Convert our tensor to the EvtGen one.

Parameters
tenOur tensor

Definition at line 172 of file EvtGenInterface.h.

References EvtGenComplex().

◆ fullclone()

virtual IBPtr Herwig::EvtGenInterface::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::InterfacedBase.

◆ getSpinInfo()

tSpinPtr Herwig::EvtGenInterface::getSpinInfo ( const Particle part) const
inlineprotected

◆ Init()

static void Herwig::EvtGenInterface::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.

◆ operator=()

EvtGenInterface & Herwig::EvtGenInterface::operator= ( const EvtGenInterface )
privatedelete

The assignment operator is private and must never be called.

In fact, it should not even be implemented.

◆ outputEvtGenDecays()

void Herwig::EvtGenInterface::outputEvtGenDecays ( long  id) const
protected

Output the EvtGen decay modes for a given particle.

Parameters
idThe PDG code of the particle to output

◆ persistentInput()

void Herwig::EvtGenInterface::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.

◆ persistentOutput()

void Herwig::EvtGenInterface::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ ThePEGComplex()

Complex Herwig::EvtGenInterface::ThePEGComplex ( EvtComplex  c) const
inlineprotected

Convert from EvtGen complex to ours.

Definition at line 250 of file EvtGenInterface.h.

Referenced by ThePEGPolarization(), ThePEGRSSpinor(), ThePEGSpinor(), and ThePEGTensor().

◆ ThePEGID()

int Herwig::EvtGenInterface::ThePEGID ( EvtId  id,
bool  exception = true 
) const
protected

Convert an EvtGen EvtId to a PDG code in our conventions.

Parameters
idThe EvtGen ID.
exceptionWhether or not to throw an Exception if fails

◆ ThePEGMomentum()

Lorentz5Momentum Herwig::EvtGenInterface::ThePEGMomentum ( const EvtVector4R &  mom,
double  mass 
) const
inlineprotected

Convert from EvtGen momentum to Lorentz5Momentum.

Parameters
momThe EvtGen 4-momentum
massThe mass

Definition at line 243 of file EvtGenInterface.h.

Referenced by ThePEGParticle().

◆ ThePEGParticle()

PPtr Herwig::EvtGenInterface::ThePEGParticle ( EvtParticle *  part,
tcPDPtr  pd,
bool  spin = true 
) const
inlineprotected

Functions to convert between EvtGen and Herwig classes.

Convert a particle from an EvtGen one to ThePEG one.

Parameters
partThe EvtGen particle.
pdPointer to the particle data object of ThePEG for the particle.
spinConvert the spin information as well

Definition at line 214 of file EvtGenInterface.h.

References decayProducts(), ThePEGMomentum(), and ThePEGSpin().

◆ ThePEGPolarization()

LorentzPolarizationVector Herwig::EvtGenInterface::ThePEGPolarization ( const EvtVector4C &  eps) const
inlineprotected

Convert an EvtGen complex 4-vector to a LorentzPolarizationVector.

Parameters
epsThe complex 4-vector to be converted.

Definition at line 278 of file EvtGenInterface.h.

References ThePEGComplex().

◆ ThePEGRSSpinor()

LorentzRSSpinor< SqrtEnergy > Herwig::EvtGenInterface::ThePEGRSSpinor ( const EvtRaritaSchwinger &  sp) const
inlineprotected

Convert an EvtGen Rarita-Schwinger spinor to ours.

Parameters
spThe EvtGen RS spinor.

Definition at line 289 of file EvtGenInterface.h.

References ThePEG::sqrt(), and ThePEGComplex().

◆ ThePEGSpin()

void Herwig::EvtGenInterface::ThePEGSpin ( PPtr  pegpart,
EvtParticle *  evtpart 
) const
protected

Set the SpinInfo for a ThePEG particle using an EvtGen particle.

Parameters
pegpartThePEG particle.
evtpartThe EvtGen particle.

Referenced by ThePEGParticle().

◆ ThePEGSpinDensity()

RhoDMatrix Herwig::EvtGenInterface::ThePEGSpinDensity ( const EvtSpinDensity &  rho,
int  id 
) const
protected

Convert a spin density to a ThePEG one from an EvtGen one.

Parameters
rhoThe spin density matrix to be converted
idThe PDG code of the particle to get special cases right.

◆ ThePEGSpinor()

LorentzSpinor< SqrtEnergy > Herwig::EvtGenInterface::ThePEGSpinor ( const EvtDiracSpinor &  sp) const
inlineprotected

Convert an EvtDiracSpinor a LorentzSpinor.

This spinor is converted to the default Dirac matrix representation used by ThePEG.

Parameters
spThe EvtDiracSpinor

Definition at line 266 of file EvtGenInterface.h.

References ThePEG::sqrt(), and ThePEGComplex().

◆ ThePEGTensor()

LorentzTensor< double > Herwig::EvtGenInterface::ThePEGTensor ( const EvtTensor4C &  ten) const
inlineprotected

Convert an EvtGen tensor to ThePEG.

Parameters
tenThe EvtGen tensor

Definition at line 311 of file EvtGenInterface.h.

References ThePEGComplex().

Member Data Documentation

◆ checkConv_

bool Herwig::EvtGenInterface::checkConv_
private

Check the conversion of the particles.

Definition at line 445 of file EvtGenInterface.h.

◆ convID_

vector<long> Herwig::EvtGenInterface::convID_
private

Particles for which to output the EvtGen decays.

Definition at line 450 of file EvtGenInterface.h.

◆ decayName_

string Herwig::EvtGenInterface::decayName_
private

Names of the various EvtGen parameter files.

The name of the file containing the decays

Definition at line 424 of file EvtGenInterface.h.

◆ evtgen_

EvtGen* Herwig::EvtGenInterface::evtgen_
private

Main EvtGen object.

Definition at line 467 of file EvtGenInterface.h.

◆ evtrnd_

EvtRandomEngine* Herwig::EvtGenInterface::evtrnd_
private

Pointer to the random number generator for EvtGen.

Definition at line 462 of file EvtGenInterface.h.

◆ logFile_

ofstream Herwig::EvtGenInterface::logFile_
mutableprivate

File to output the log info to.

Definition at line 472 of file EvtGenInterface.h.

◆ p8Data_

string Herwig::EvtGenInterface::p8Data_
private

Location of the PYTHIA8 data directory.

Definition at line 455 of file EvtGenInterface.h.

◆ pdtName_

string Herwig::EvtGenInterface::pdtName_
private

The name of the file containing the particle data.

Definition at line 429 of file EvtGenInterface.h.

◆ reDirect_

bool Herwig::EvtGenInterface::reDirect_
private

Whether or not to redirect cout and cerr when EvtGen is running.

Definition at line 440 of file EvtGenInterface.h.

◆ userDecays_

vector<string> Herwig::EvtGenInterface::userDecays_
private

Names of addition user specified decays.

Definition at line 434 of file EvtGenInterface.h.


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