ThePEG::HepMCConverter< HepMCEventT, Traits > Class Template Reference

The HepMCConverter defines only one public static function which converts a ThePEG::Event object to a HepMC::GenEvent. More...

#include <HepMCConverter.h>

List of all members.

Public Types

typedef Traits::ParticleT GenParticle
 Forward typedefs from Traits class.
typedef Traits::EventT GenEvent
 Forward typedefs from Traits class.
typedef Traits::VertexT GenVertex
 Forward typedefs from Traits class.
typedef Traits::PdfInfoT PdfInfo
 Forward typedefs from Traits class.
typedef map< tcPPtr,
GenParticle * > 
ParticleMap
 Map ThePEG particles to HepMC particles.
typedef map< tcColinePtr, long > FlowMap
 Map ThePEG colour lines to HepMC colour indices.
typedef map< tcPPtr, Vertex * > VertexMap
 Map ThePEG particles to vertices.
typedef map< const Vertex
*, GenVertex * > 
GenVertexMap
 Map vertices to GenVertex.

Static Public Member Functions

static GenEventconvert (const Event &ev, bool nocopies=false, Energy eunit=Traits::defaultEnergyUnit(), Length lunit=Traits::defaultLengthUnit())
 Convert a ThePEG::Event to a HepMC::GenEvent.
static void convert (const Event &ev, GenEvent &gev, bool nocopies, Energy eunit, Length lunit)
 Convert a ThePEG::Event to a HepMC::GenEvent.
static void convert (const Event &ev, GenEvent &gev, bool nocopies=false)
 Convert a ThePEG::Event to a HepMC::GenEvent.

Private Member Functions

 HepMCConverter (const Event &ev, bool nocopies, Energy eunit, Length lunit)
 The proper constructors are private.
 HepMCConverter (const Event &ev, GenEvent &gev, bool nocopies, Energy eunit, Length lunit)
 The proper constructors are private.
void init (const Event &ev, bool nocopies)
 Common init function used by the constructors.
 HepMCConverter ()
 Default constructor is unimplemented and private and should never be used.
 HepMCConverter (const HepMCConverter &)
 Copy constructor is unimplemented and private and should never be used.
HepMCConverteroperator= (const HepMCConverter &)
 Assignment is unimplemented and private and should never be used.
GenParticlecreateParticle (tcPPtr p) const
 Create a GenParticle from a ThePEG Particle.
void join (tcPPtr parent, tcPPtr child)
 Join the decay vertex of the parent with the decay vertex of the child.
GenVertexcreateVertex (Vertex *v)
 Create a GenVertex from a temporary Vertex.
void setPdfInfo (const Event &e)
 Create and set a PdfInfo object for the event.

Private Attributes

GenEventgeneve
 The constructed GenEvent.
ParticleMap pmap
 The translation table between the ThePEG particles and the GenParticles.
FlowMap flowmap
 The translation table between ThePEG ColourLine objects and HepMC Flow indices.
vector< Vertexvertices
 All temporary vertices created.
VertexMap prov
 The mapping of particles to their production vertices.
VertexMap decv
 The mapping of particles to their decy vertices.
GenVertexMap vmap
 The mapping between temporary vertices and the created GenVertex Objects.
Energy energyUnit
 The energy unit to be used in the GenEvent.
Length lengthUnit
 The length unit to be used in the GenEvent.

Classes

struct  Vertex
 Help class to represent a temporary vertex which can be converted to a GenVertex. More...


Detailed Description

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
class ThePEG::HepMCConverter< HepMCEventT, Traits >

The HepMCConverter defines only one public static function which converts a ThePEG::Event object to a HepMC::GenEvent.

All mother-daughter relationships and colour information is preserved.

See also:
Event

Particle

Author:
Leif Lönnblad

Definition at line 32 of file HepMCConverter.h.


Member Typedef Documentation

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef Traits::ParticleT ThePEG::HepMCConverter< HepMCEventT, Traits >::GenParticle

Forward typedefs from Traits class.

Definition at line 53 of file HepMCConverter.h.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef Traits::EventT ThePEG::HepMCConverter< HepMCEventT, Traits >::GenEvent

Forward typedefs from Traits class.

Definition at line 55 of file HepMCConverter.h.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef Traits::VertexT ThePEG::HepMCConverter< HepMCEventT, Traits >::GenVertex

Forward typedefs from Traits class.

Definition at line 57 of file HepMCConverter.h.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef Traits::PdfInfoT ThePEG::HepMCConverter< HepMCEventT, Traits >::PdfInfo

Forward typedefs from Traits class.

Definition at line 59 of file HepMCConverter.h.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef map<tcPPtr,GenParticle*> ThePEG::HepMCConverter< HepMCEventT, Traits >::ParticleMap

Map ThePEG particles to HepMC particles.

Definition at line 61 of file HepMCConverter.h.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef map<tcColinePtr,long> ThePEG::HepMCConverter< HepMCEventT, Traits >::FlowMap

Map ThePEG colour lines to HepMC colour indices.

Definition at line 63 of file HepMCConverter.h.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
typedef map<tcPPtr,Vertex*> ThePEG::HepMCConverter< HepMCEventT, Traits >::VertexMap

Map ThePEG particles to vertices.

Definition at line 65 of file HepMCConverter.h.


Constructor & Destructor Documentation

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
ThePEG::HepMCConverter< HepMCEventT, Traits >::HepMCConverter ( const Event ev,
bool  nocopies,
Energy  eunit,
Length  lunit 
) [private]

The proper constructors are private.

The class is only instantiated within the convert method.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
ThePEG::HepMCConverter< HepMCEventT, Traits >::HepMCConverter ( const Event ev,
GenEvent gev,
bool  nocopies,
Energy  eunit,
Length  lunit 
) [private]

The proper constructors are private.

The class is only instantiated within the convert method.


Member Function Documentation

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
static GenEvent* ThePEG::HepMCConverter< HepMCEventT, Traits >::convert ( const Event ev,
bool  nocopies = false,
Energy  eunit = Traits::defaultEnergyUnit(),
Length  lunit = Traits::defaultLengthUnit() 
) [static]

Convert a ThePEG::Event to a HepMC::GenEvent.

The caller is responsible for deleting the constructed GenEvent object. If nocopies is true, only final copies of particles connected with Particle::previous() and Particle::next() will be entered in the HepMC::GenEvent. In the GenEvent object, the energy/momentum variables will be in units of eunit and lengths variables in units of lunit.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
static void ThePEG::HepMCConverter< HepMCEventT, Traits >::convert ( const Event ev,
GenEvent gev,
bool  nocopies,
Energy  eunit,
Length  lunit 
) [static]

Convert a ThePEG::Event to a HepMC::GenEvent.

The caller supplies a GenEvent object, gev, which will be filled. If nocopies is true, only final copies of particles connected with Particle::previous() and Particle::next() will be entered in the HepMC::GenEvent. In the GenEvent object, the energy/momentum variables will be in units of eunit and lengths variables in units of lunit.

template<typename HepMCEventT, typename Traits = HepMCTraits<HepMCEventT>>
static void ThePEG::HepMCConverter< HepMCEventT, Traits >::convert ( const Event ev,
GenEvent gev,
bool  nocopies = false 
) [static]

Convert a ThePEG::Event to a HepMC::GenEvent.

The caller supplies a GenEvent object, gev, which will be filled. If nocopies is true, only final copies of particles connected with Particle::previous() and Particle::next() will be entered in the HepMC::GenEvent. In the GenEvent object, the energy/momentum variables will be in units of eunit and lengths variables in units of lunit.


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

Generated on Thu Apr 29 12:43:25 2010 for ThePEG by  doxygen 1.5.5