HepMC3 event record library
Static Public Member Functions
HEPEVT_Wrapper Class Reference

Detailed Description

An interface to HEPEVT common block implemented in a traditional way. When possible this implementation should be avoided and the templated version should be used instead.

Note
This header file does not include HEPEVT definition, only declaration. Including this wrapper requires that HEPEVT is defined somewhere in the project (most likely as FORTRAN common block).
Make sure that HEPEVT definition in project matches this definition (NMXHEP, double precision, etc.) Change this definition if necessary.

Definition at line 85 of file HEPEVT_Wrapper.h.

#include <HEPEVT_Wrapper.h>

Static Public Member Functions

static void print_hepevt (std::ostream &ostr=std::cout)
 Print information from HEPEVT common block.
 
static void print_hepevt_particle (int index, std::ostream &ostr=std::cout)
 Print particle information.
 
static void zero_everything ()
 Set all entries in HEPEVT to zero.
 
static bool GenEvent_to_HEPEVT (const GenEvent *evt)
 Convert GenEvent to HEPEVT.
 
static bool HEPEVT_to_GenEvent (GenEvent *evt)
 Convert HEPEVT to GenEvent.
 
static bool fix_daughters ()
 Tries to fix list of daughters.
 
static void set_max_number_entries (unsigned int size)
 Set block size.
 
static void set_hepevt_address (char *c)
 Set Fortran block address.
 
static int max_number_entries ()
 Block size.
 
static int event_number ()
 Get event number.
 
static int number_entries ()
 Get number of entries.
 
static int status (const int &index)
 Get status code.
 
static int id (const int &index)
 Get PDG particle id.
 
static int first_parent (const int &index)
 Get index of 1st mother.
 
static int last_parent (const int &index)
 Get index of last mother.
 
static int first_child (const int &index)
 Get index of 1st daughter.
 
static int last_child (const int &index)
 Get index of last daughter.
 
static double px (const int &index)
 Get X momentum.
 
static double py (const int &index)
 Get Y momentum.
 
static double pz (const int &index)
 Get Z momentum.
 
static double e (const int &index)
 Get Energy.
 
static double m (const int &index)
 Get generated mass.
 
static double x (const int &index)
 Get X Production vertex.
 
static double y (const int &index)
 Get Y Production vertex.
 
static double z (const int &index)
 Get Z Production vertex.
 
static double t (const int &index)
 Get production time.
 
static int number_parents (const int &index)
 Get number of parents.
 
static int number_children (const int &index)
 Get number of children from the range of daughters.
 
static int number_children_exact (const int &index)
 Get number of children by counting.
 
static void set_event_number (const int &evtno)
 Set event number.
 
static void set_number_entries (const int &noentries)
 Set number of entries.
 
static void set_status (const int &index, const int &status)
 Set status code.
 
static void set_id (const int &index, const int &id)
 Set PDG particle id.
 
static void set_parents (const int &index, const int &firstparent, const int &lastparent)
 Set parents.
 
static void set_children (const int &index, const int &firstchild, const int &lastchild)
 Set children.
 
static void set_momentum (const int &index, const double &px, const double &py, const double &pz, const double &e)
 Set 4-momentum.
 
static void set_mass (const int &index, double mass)
 Set mass.
 
static void set_position (const int &index, const double &x, const double &y, const double &z, const double &t)
 Set position in time-space.
 

Member Function Documentation

◆ e()

static double e ( const int &  index)
inlinestatic

Get Energy.

Definition at line 125 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::phep.

◆ event_number()

static int event_number ( )
inlinestatic

Get event number.

Definition at line 114 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::nevhep.

◆ first_child()

static int first_child ( const int &  index)
inlinestatic

Get index of 1st daughter.

Definition at line 120 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jdahep.

◆ first_parent()

static int first_parent ( const int &  index)
inlinestatic

Get index of 1st mother.

Definition at line 118 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jmohep.

◆ fix_daughters()

bool fix_daughters ( )
inlinestatic

◆ GenEvent_to_HEPEVT()

static bool GenEvent_to_HEPEVT ( const GenEvent evt)
inlinestatic

Convert GenEvent to HEPEVT.

Definition at line 101 of file HEPEVT_Wrapper.h.

◆ HEPEVT_to_GenEvent()

static bool HEPEVT_to_GenEvent ( GenEvent evt)
inlinestatic

Convert HEPEVT to GenEvent.

Definition at line 103 of file HEPEVT_Wrapper.h.

◆ id()

static int id ( const int &  index)
inlinestatic

Get PDG particle id.

Definition at line 117 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::idhep.

◆ last_child()

static int last_child ( const int &  index)
inlinestatic

Get index of last daughter.

Definition at line 121 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jdahep.

◆ last_parent()

static int last_parent ( const int &  index)
inlinestatic

Get index of last mother.

Definition at line 119 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jmohep.

◆ m()

static double m ( const int &  index)
inlinestatic

Get generated mass.

Definition at line 126 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::phep.

◆ max_number_entries()

static int max_number_entries ( )
inlinestatic

Block size.

Definition at line 113 of file HEPEVT_Wrapper.h.

References NMXHEP.

◆ number_children()

int number_children ( const int &  index)
inlinestatic

Get number of children from the range of daughters.

Definition at line 182 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jdahep.

◆ number_children_exact()

int number_children_exact ( const int &  index)
inlinestatic

Get number of children by counting.

Definition at line 187 of file HEPEVT_Wrapper.h.

References hepevtptr, HEPEVT::jmohep, and HEPEVT::nhep.

◆ number_entries()

static int number_entries ( )
inlinestatic

Get number of entries.

Definition at line 115 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::nhep.

◆ number_parents()

int number_parents ( const int &  index)
inlinestatic

Get number of parents.

Definition at line 177 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jmohep.

◆ print_hepevt()

void print_hepevt ( std::ostream &  ostr = std::cout)
inlinestatic

Print information from HEPEVT common block.

Definition at line 148 of file HEPEVT_Wrapper.h.

References hepevtptr, HEPEVT::nevhep, HEPEVT::nhep, and HEPEVT_Wrapper::print_hepevt_particle().

◆ print_hepevt_particle()

void print_hepevt_particle ( int  index,
std::ostream &  ostr = std::cout 
)
inlinestatic

Print particle information.

Definition at line 158 of file HEPEVT_Wrapper.h.

References hepevtptr, HEPEVT::idhep, HEPEVT::jdahep, HEPEVT::jmohep, and HEPEVT::phep.

◆ px()

static double px ( const int &  index)
inlinestatic

Get X momentum.

Definition at line 122 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::phep.

◆ py()

static double py ( const int &  index)
inlinestatic

Get Y momentum.

Definition at line 123 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::phep.

◆ pz()

static double pz ( const int &  index)
inlinestatic

Get Z momentum.

Definition at line 124 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::phep.

◆ set_children()

void set_children ( const int &  index,
const int &  firstchild,
const int &  lastchild 
)
inlinestatic

Set children.

Definition at line 201 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jdahep.

◆ set_event_number()

static void set_event_number ( const int &  evtno)
inlinestatic

Set event number.

Definition at line 134 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::nevhep.

◆ set_hepevt_address()

static void set_hepevt_address ( char *  c)
inlinestatic

Set Fortran block address.

Definition at line 112 of file HEPEVT_Wrapper.h.

References hepevtptr.

◆ set_id()

static void set_id ( const int &  index,
const int &  id 
)
inlinestatic

Set PDG particle id.

Definition at line 137 of file HEPEVT_Wrapper.h.

References hepevtptr, HEPEVT_Wrapper::id(), and HEPEVT::idhep.

◆ set_mass()

void set_mass ( const int &  index,
double  mass 
)
inlinestatic

Set mass.

Definition at line 215 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::phep.

◆ set_max_number_entries()

static void set_max_number_entries ( unsigned int  size)
inlinestatic

Set block size.

Definition at line 111 of file HEPEVT_Wrapper.h.

References NMXHEP.

◆ set_momentum()

void set_momentum ( const int &  index,
const double &  px,
const double &  py,
const double &  pz,
const double &  e 
)
inlinestatic

◆ set_number_entries()

static void set_number_entries ( const int &  noentries)
inlinestatic

Set number of entries.

Definition at line 135 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::nhep.

◆ set_parents()

void set_parents ( const int &  index,
const int &  firstparent,
const int &  lastparent 
)
inlinestatic

Set parents.

Definition at line 195 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::jmohep.

◆ set_position()

void set_position ( const int &  index,
const double &  x,
const double &  y,
const double &  z,
const double &  t 
)
inlinestatic

Set position in time-space.

Definition at line 220 of file HEPEVT_Wrapper.h.

References hepevtptr, HEPEVT_Wrapper::t(), HEPEVT::vhep, HEPEVT_Wrapper::x(), HEPEVT_Wrapper::y(), and HEPEVT_Wrapper::z().

◆ set_status()

static void set_status ( const int &  index,
const int &  status 
)
inlinestatic

Set status code.

Definition at line 136 of file HEPEVT_Wrapper.h.

References hepevtptr, HEPEVT::isthep, and HEPEVT_Wrapper::status().

◆ status()

static int status ( const int &  index)
inlinestatic

Get status code.

Definition at line 116 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::isthep.

◆ t()

static double t ( const int &  index)
inlinestatic

Get production time.

Definition at line 130 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::vhep.

◆ x()

static double x ( const int &  index)
inlinestatic

Get X Production vertex.

Definition at line 127 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::vhep.

◆ y()

static double y ( const int &  index)
inlinestatic

Get Y Production vertex.

Definition at line 128 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::vhep.

◆ z()

static double z ( const int &  index)
inlinestatic

Get Z Production vertex.

Definition at line 129 of file HEPEVT_Wrapper.h.

References hepevtptr, and HEPEVT::vhep.

◆ zero_everything()

void zero_everything ( )
inlinestatic

Set all entries in HEPEVT to zero.

Definition at line 172 of file HEPEVT_Wrapper.h.

References hepevtptr.


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