#include <HepMCTraits.h>
Public Types | |
typedef HepMCParticleT | ParticleT |
Typedef of the particle class. | |
typedef HepMCEventT | EventT |
Typedef of the event class. | |
typedef HepMCVertexT | VertexT |
Typedef of the vertex class. | |
typedef HepMCPolarizationT | PolarizationT |
Typedef of the polarization class. | |
typedef HepMCPdfInfoT | PdfInfoT |
Typedef of the PdfInfo class. | |
Static Public Member Functions | |
static EventT * | newEvent (long evno, double weight) |
Create an event object with number evno and weight. | |
static bool | hasUnits () |
Return true if this version of HepMC accept user-defined units. | |
static Energy | defaultEnergyUnit () |
Return the energy unit used in the installed version of HepMC. | |
static Length | defaultLengthUnit () |
Return the length unit used in the installed version of HepMC. | |
static Energy | momentumUnit (const EventT &e) |
Return the momentum unit used by a given GenEvent object. | |
static Length | lengthUnit (const EventT &e) |
Return the length unit used by a given GenEvent object. | |
static void | setUnits (EventT &, Energy, Length) |
Set the units to be used by the given GenEvent object. | |
static void | setScaleAndAlphas (EventT &e, Energy2 scale, double aS, double aEM, Energy unit) |
Set the scale, (aS) and (aEM) for the event e. | |
static void | setSignalProcessVertex (EventT &e, VertexT *v) |
Set the primary vertex, v, for the event e. | |
static void | addVertex (EventT &e, VertexT *v) |
Set a vertex, v, for the event e. | |
static ParticleT * | newParticle (const Lorentz5Momentum &p, long id, int status, Energy unit) |
Create a new particle object with momentum p, PDG number id and status code status. | |
static void | setPolarization (ParticleT &genp, double the, double phi) |
Set the polarization directions, the and phi, for particle p. | |
static void | setColourLine (ParticleT &p, int indx, int coline) |
Set the colour line (with index indx) to coline for particle p. | |
static VertexT * | newVertex () |
Create a new vertex. | |
static void | addIncoming (VertexT &v, ParticleT *p) |
Add an incoming particle, p, to the vertex, v. | |
static void | addOutgoing (VertexT &v, ParticleT *p) |
Add an outgoing particle, p, to the vertex, v. | |
static void | setPosition (VertexT &v, const LorentzPoint &p, Length unit) |
Set the position p for the vertex, v. | |
static void | setBeamParticles (EventT &e, ParticleT *p1, ParticleT *p2) |
Set the beam particles for the event. | |
static void | setPdfInfo (EventT &, int, int, double, double, double, double, double) |
Set the PDF info for the event. | |
static void | setCrossSection (EventT &, double, double) |
Set the cross section info for the event. |
The default version will work for the CLHEP implementation of HepMC. To use the HepMCConverter class for any flavour of HepMC you have to specialize the HepMCTraits class accordingly, possibly inheriting the functionality from the HepMCTraitsBase class and only overriding the functions and typedefs which are different. For the CLHEP flavour of HepMC you only need to do template<> struct HepMCTraits<HepMC::GenEvent>: public HepMCTraitsBase<HepMC::GenEvent,HepMC::GenParticle,HepMC::GenVertex, HepMC::Polarization> {};
somewhere inside the ThePEG namespace. The boolean template argument determines whether the HepMC implementation is specifying units or not.
Definition at line 46 of file HepMCTraits.h.
typedef HepMCParticleT ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::ParticleT |
typedef HepMCEventT ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::EventT |
typedef HepMCVertexT ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::VertexT |
typedef HepMCPolarizationT ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::PolarizationT |
typedef HepMCPdfInfoT ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::PdfInfoT |
static EventT* ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::newEvent | ( | long | evno, | |
double | weight | |||
) | [inline, static] |
static Energy ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::momentumUnit | ( | const EventT & | e | ) | [inline, static] |
Return the momentum unit used by a given GenEvent object.
If HepMC does not support units this must return GeV.
Definition at line 109 of file HepMCTraits.h.
static Length ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::lengthUnit | ( | const EventT & | e | ) | [inline, static] |
Return the length unit used by a given GenEvent object.
If HepMC does not support units this must return millimeter.
Definition at line 121 of file HepMCTraits.h.
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setUnits | ( | EventT & | , | |
Energy | , | |||
Length | ||||
) | [inline, static] |
Set the units to be used by the given GenEvent object.
If HepMC does not support units this should be a no-op.
Definition at line 139 of file HepMCTraits.h.
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setScaleAndAlphas | ( | EventT & | e, | |
Energy2 | scale, | |||
double | aS, | |||
double | aEM, | |||
Energy | unit | |||
) | [inline, static] |
Set the scale, (aS) and (aEM) for the event e.
The scale will be scaled with unit before given to the GenEvent.
Definition at line 146 of file HepMCTraits.h.
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setSignalProcessVertex | ( | EventT & | e, | |
VertexT * | v | |||
) | [inline, static] |
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::addVertex | ( | EventT & | e, | |
VertexT * | v | |||
) | [inline, static] |
static ParticleT* ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::newParticle | ( | const Lorentz5Momentum & | p, | |
long | id, | |||
int | status, | |||
Energy | unit | |||
) | [inline, static] |
Create a new particle object with momentum p, PDG number id and status code status.
The momentum will be scaled with unit which according to the HepMC documentation should be GeV.
Definition at line 167 of file HepMCTraits.h.
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setPolarization | ( | ParticleT & | genp, | |
double | the, | |||
double | phi | |||
) | [inline, static] |
Set the polarization directions, the and phi, for particle p.
Definition at line 179 of file HepMCTraits.h.
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setColourLine | ( | ParticleT & | p, | |
int | indx, | |||
int | coline | |||
) | [inline, static] |
Set the colour line (with index indx) to coline for particle p.
Definition at line 185 of file HepMCTraits.h.
static VertexT* ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::newVertex | ( | ) | [inline, static] |
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::addIncoming | ( | VertexT & | v, | |
ParticleT * | p | |||
) | [inline, static] |
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::addOutgoing | ( | VertexT & | v, | |
ParticleT * | p | |||
) | [inline, static] |
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setPosition | ( | VertexT & | v, | |
const LorentzPoint & | p, | |||
Length | unit | |||
) | [inline, static] |
Set the position p for the vertex, v.
The length will be scaled with unit which normally should be millimeters.
Definition at line 206 of file HepMCTraits.h.
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setBeamParticles | ( | EventT & | e, | |
ParticleT * | p1, | |||
ParticleT * | p2 | |||
) | [inline, static] |
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setPdfInfo | ( | EventT & | , | |
int | , | |||
int | , | |||
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | ||||
) | [inline, static] |
static void ThePEG::HepMCTraitsBase< HepMCEventT, HepMCParticleT, HepMCVertexT, HepMCPolarizationT, HepMCPdfInfoT >::setCrossSection | ( | EventT & | , | |
double | , | |||
double | ||||
) | [inline, static] |