HepMC event record
Static Public Member Functions
HEPEVT_Wrapper Class Reference

Detailed Description

An interface to HEPEVT common block.

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.
Todo:
Do we just make write_event and fill_next_event 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.
Todo:
Do we just make write_event and fill_next_event instead?
Examples:
hepevt_wrapper_example_main.cc.

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

Member Function Documentation

◆ check_hepevt_consistency() [1/2]

bool check_hepevt_consistency ( std::ostream &  ostr = std::cout)
inlinestatic

Check for problems with HEPEVT common block.

<

Todo:
HEPEVT_Wrapper::check_hepevt_consistency unimplemented!

<

Todo:
HEPEVT_Wrapper::check_hepevt_consistency unimplemented!

Definition at line 173 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

◆ check_hepevt_consistency() [2/2]

static bool check_hepevt_consistency ( std::ostream &  ostr = std::cout)
static

Check for problems with HEPEVT common block.

◆ e() [1/2]

static double e ( int  index)
inlinestatic

Get Energy.

Definition at line 123 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ e() [2/2]

static double e ( int  index)
inlinestatic

Get Energy.

Definition at line 123 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ event_number() [1/2]

static int event_number ( )
inlinestatic

Get event number.

Definition at line 112 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nevhep.

◆ event_number() [2/2]

static int event_number ( )
inlinestatic

Get event number.

Definition at line 112 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nevhep.

◆ first_child() [1/2]

static int first_child ( int  index)
inlinestatic

Get index of 1st daughter.

Definition at line 118 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jdahep.

◆ first_child() [2/2]

static int first_child ( int  index)
inlinestatic

Get index of 1st daughter.

Definition at line 118 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jdahep.

◆ first_parent() [1/2]

static int first_parent ( int  index)
inlinestatic

Get index of 1st mother.

Definition at line 116 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jmohep.

◆ first_parent() [2/2]

static int first_parent ( int  index)
inlinestatic

Get index of 1st mother.

Definition at line 116 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jmohep.

◆ fix_daughters() [1/2]

static bool fix_daughters ( )
static

Tries to fix list of daughters.

◆ fix_daughters() [2/2]

bool fix_daughters ( )
inlinestatic

◆ GenEvent_to_HEPEVT() [1/2]

bool GenEvent_to_HEPEVT ( const GenEvent evt)
static

Convert GenEvent to HEPEVT.

This writes an event out to the HEPEVT common block. The daughters field is NOT filled, because it is possible to contruct graphs for which the mothers and daughters cannot both be make sequential. This is consistent with how pythia fills HEPEVT (daughters are not necessarily filled properly) and how IO_HEPEVT reads HEPEVT.

Definition at line 172 of file HEPEVT_Wrapper.cc.

References GenEvent::event_number(), HEPEVT_Wrapper::m(), HEPEVT_Wrapper::max_number_entries(), HEPEVT_Wrapper::set_children(), HEPEVT_Wrapper::set_event_number(), HEPEVT_Wrapper::set_id(), HEPEVT_Wrapper::set_mass(), HEPEVT_Wrapper::set_momentum(), HEPEVT_Wrapper::set_number_entries(), HEPEVT_Wrapper::set_parents(), HEPEVT_Wrapper::set_position(), HEPEVT_Wrapper::set_status(), HEPEVT_Wrapper::status(), FourVector::t(), GenEvent::vertices(), FourVector::x(), FourVector::y(), and FourVector::z().

◆ GenEvent_to_HEPEVT() [2/2]

static bool GenEvent_to_HEPEVT ( const GenEvent evt)
static

Convert GenEvent to HEPEVT.

◆ HEPEVT_to_GenEvent() [1/2]

static bool HEPEVT_to_GenEvent ( GenEvent evt)
static

Convert HEPEVT to GenEvent.

◆ HEPEVT_to_GenEvent() [2/2]

bool HEPEVT_to_GenEvent ( GenEvent evt)
static

◆ id() [1/2]

static int id ( int  index)
inlinestatic

Get PDG particle id.

Definition at line 115 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::idhep.

◆ id() [2/2]

static int id ( int  index)
inlinestatic

Get PDG particle id.

Definition at line 115 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::idhep.

◆ last_child() [1/2]

static int last_child ( int  index)
inlinestatic

Get index of last daughter.

Definition at line 119 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jdahep.

◆ last_child() [2/2]

static int last_child ( int  index)
inlinestatic

Get index of last daughter.

Definition at line 119 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jdahep.

◆ last_parent() [1/2]

static int last_parent ( int  index)
inlinestatic

Get index of last mother.

Definition at line 117 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jmohep.

◆ last_parent() [2/2]

static int last_parent ( int  index)
inlinestatic

Get index of last mother.

Definition at line 117 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jmohep.

◆ m() [1/2]

static double m ( int  index)
inlinestatic

Get generated mass.

Definition at line 124 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ m() [2/2]

static double m ( int  index)
inlinestatic

Get generated mass.

Definition at line 124 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ max_number_entries() [1/2]

static int max_number_entries ( )
inlinestatic

Block size.

Definition at line 111 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

◆ max_number_entries() [2/2]

static int max_number_entries ( )
inlinestatic

Block size.

Definition at line 111 of file include/HepMC/HEPEVT_Wrapper.h.

◆ number_children() [1/2]

static int number_children ( int  index)
static

Get number of children from the range of daughters.

◆ number_children() [2/2]

int number_children ( int  index)
inlinestatic

Get number of children from the range of daughters.

Definition at line 190 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jdahep.

◆ number_children_exact() [1/2]

static int number_children_exact ( int  index)
static

Get number of children by counting.

◆ number_children_exact() [2/2]

int number_children_exact ( int  index)
inlinestatic

Get number of children by counting.

Definition at line 195 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

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

◆ number_entries() [1/2]

static int number_entries ( )
inlinestatic

Get number of entries.

Definition at line 113 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nhep.

◆ number_entries() [2/2]

static int number_entries ( )
inlinestatic

Get number of entries.

Definition at line 113 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nhep.

◆ number_parents() [1/2]

static int number_parents ( int  index)
static

Get number of parents.

◆ number_parents() [2/2]

int number_parents ( int  index)
inlinestatic

Get number of parents.

Definition at line 185 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jmohep.

◆ print_hepevt() [1/2]

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

Print information from HEPEVT common block.

◆ print_hepevt() [2/2]

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

Print information from HEPEVT common block.

Definition at line 147 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

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

◆ print_hepevt_particle() [1/2]

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

Print particle information.

◆ print_hepevt_particle() [2/2]

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

Print particle information.

Definition at line 157 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

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

◆ px() [1/2]

static double px ( int  index)
inlinestatic

Get X momentum.

Definition at line 120 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ px() [2/2]

static double px ( int  index)
inlinestatic

Get X momentum.

Definition at line 120 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ py() [1/2]

static double py ( int  index)
inlinestatic

Get Y momentum.

Definition at line 121 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ py() [2/2]

static double py ( int  index)
inlinestatic

Get Y momentum.

Definition at line 121 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ pz() [1/2]

static double pz ( int  index)
inlinestatic

Get Z momentum.

Definition at line 122 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ pz() [2/2]

static double pz ( int  index)
inlinestatic

Get Z momentum.

Definition at line 122 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ set_children() [1/2]

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

Set children.

Definition at line 211 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jdahep.

◆ set_children() [2/2]

static void set_children ( int  index,
int  firstchild,
int  lastchild 
)
static

Set children.

◆ set_event_number() [1/2]

static void set_event_number ( int  evtno)
inlinestatic

Set event number.

Definition at line 133 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nevhep.

◆ set_event_number() [2/2]

static void set_event_number ( int  evtno)
inlinestatic

Set event number.

Definition at line 133 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nevhep.

◆ set_hepevt_address() [1/2]

static void set_hepevt_address ( char *  c)
inlinestatic

Set Fortran block address.

Definition at line 110 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

◆ set_hepevt_address() [2/2]

static void set_hepevt_address ( char *  c)
inlinestatic

Set Fortran block address.

Definition at line 110 of file include/HepMC/HEPEVT_Wrapper.h.

◆ set_id() [1/2]

static void set_id ( int  index,
int  id 
)
inlinestatic

Set PDG particle id.

Definition at line 136 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

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

◆ set_id() [2/2]

static void set_id ( int  index,
int  id 
)
inlinestatic

Set PDG particle id.

Definition at line 136 of file include/HepMC/HEPEVT_Wrapper.h.

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

◆ set_mass() [1/2]

void set_mass ( int  index,
double  mass 
)
inlinestatic

Set mass.

Definition at line 225 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::phep.

◆ set_mass() [2/2]

static void set_mass ( int  index,
double  mass 
)
static

Set mass.

◆ set_momentum() [1/2]

static void set_momentum ( int  index,
double  px,
double  py,
double  pz,
double  e 
)
static

Set 4-momentum.

◆ set_momentum() [2/2]

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

◆ set_number_entries() [1/2]

static void set_number_entries ( int  noentries)
inlinestatic

Set number of entries.

Definition at line 134 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nhep.

◆ set_number_entries() [2/2]

static void set_number_entries ( int  noentries)
inlinestatic

Set number of entries.

Definition at line 134 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::nhep.

◆ set_parents() [1/2]

static void set_parents ( int  index,
int  firstparent,
int  lastparent 
)
static

Set parents.

◆ set_parents() [2/2]

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

Set parents.

Definition at line 205 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::jmohep.

◆ set_position() [1/2]

static void set_position ( int  index,
double  x,
double  y,
double  z,
double  t 
)
static

Set position in time-space.

◆ set_position() [2/2]

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

◆ set_status() [1/2]

static void set_status ( int  index,
int  status 
)
inlinestatic

Set status code.

Definition at line 135 of file include/HepMC/HEPEVT_Wrapper.h.

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

◆ set_status() [2/2]

static void set_status ( int  index,
int  status 
)
inlinestatic

Set status code.

Definition at line 135 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

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

◆ status() [1/2]

static int status ( int  index)
inlinestatic

Get status code.

Definition at line 114 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::isthep.

◆ status() [2/2]

static int status ( int  index)
inlinestatic

Get status code.

Definition at line 114 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::isthep.

◆ t() [1/2]

static double t ( int  index)
inlinestatic

Get production time.

Definition at line 128 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ t() [2/2]

static double t ( int  index)
inlinestatic

Get production time.

Definition at line 128 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ x() [1/2]

static double x ( int  index)
inlinestatic

Get X Production vertex.

Definition at line 125 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ x() [2/2]

static double x ( int  index)
inlinestatic

Get X Production vertex.

Definition at line 125 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ y() [1/2]

static double y ( int  index)
inlinestatic

Get Y Production vertex.

Definition at line 126 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ y() [2/2]

static double y ( int  index)
inlinestatic

Get Y Production vertex.

Definition at line 126 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ z() [1/2]

static double z ( int  index)
inlinestatic

Get Z Production vertex.

Definition at line 127 of file include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ z() [2/2]

static double z ( int  index)
inlinestatic

Get Z Production vertex.

Definition at line 127 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.

References HEPEVT::vhep.

◆ zero_everything() [1/2]

static void zero_everything ( )
static

Set all entries in HEPEVT to zero.

◆ zero_everything() [2/2]

void zero_everything ( )
inlinestatic

Set all entries in HEPEVT to zero.

Definition at line 180 of file build/outputs/include/HepMC/HEPEVT_Wrapper.h.


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