HepMC3 event record library
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.

Definition at line 80 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. 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 int number_parents (const int &index)
 Get number of parents. More...
 
static int number_children (const int &index)
 Get number of children from the range of daughters. More...
 
static int number_children_exact (const int &index)
 Get number of children by counting. More...
 
static void set_parents (const int &index, const int &firstparent, const int &lastparent)
 Set parents. More...
 
static void set_children (const int &index, const int &firstchild, const int &lastchild)
 Set children. More...
 
static void set_momentum (const int &index, const double &px, const double &py, const double &pz, const double &e)
 Set 4-momentum. More...
 
static void set_mass (const int &index, double mass)
 Set mass. More...
 
static void set_position (const int &index, const double &x, const double &y, const double &z, const double &t)
 Set position in time-space. More...
 

Member Function Documentation

◆ check_hepevt_consistency()

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

Check for problems with HEPEVT common block.

<

Todo:
HEPEVT_Wrapper::check_hepevt_consistency is not implemented!

Definition at line 173 of file HEPEVT_Wrapper.h.

◆ fix_daughters()

bool fix_daughters ( )
inlinestatic

Tries to fix list of daughters.

Definition at line 240 of file HEPEVT_Wrapper.h.

References HEPEVT_Wrapper::number_children(), HEPEVT_Wrapper::number_children_exact(), and HEPEVT_Wrapper::set_children().

◆ GenEvent_to_HEPEVT()

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 176 of file HEPEVT_Wrapper.cc.

References HepMC3::calculate_longest_path_to_top(), FourVector::e(), GenEvent::event_number(), FourVector::px(), FourVector::py(), FourVector::pz(), HEPEVT_Wrapper::set_children(), HEPEVT_Wrapper::set_mass(), HEPEVT_Wrapper::set_momentum(), HEPEVT_Wrapper::set_parents(), HEPEVT_Wrapper::set_position(), FourVector::t(), GenEvent::vertices(), FourVector::x(), FourVector::y(), and FourVector::z().

◆ HEPEVT_to_GenEvent()

bool HEPEVT_to_GenEvent ( GenEvent evt)
static

Convert HEPEVT to GenEvent.

Definition at line 107 of file HEPEVT_Wrapper.cc.

References GenEvent::add_tree(), and GenEvent::set_event_number().

◆ number_children()

int number_children ( const int &  index)
inlinestatic

Get number of children from the range of daughters.

Definition at line 190 of file HEPEVT_Wrapper.h.

References HepMC3::hepevtptr, and HEPEVT::jdahep.

◆ number_children_exact()

int number_children_exact ( const int &  index)
inlinestatic

Get number of children by counting.

Definition at line 195 of file HEPEVT_Wrapper.h.

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

◆ number_parents()

int number_parents ( const int &  index)
inlinestatic

Get number of parents.

Definition at line 185 of file HEPEVT_Wrapper.h.

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

◆ print_hepevt()

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

Print information from HEPEVT common block.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 147 of file HEPEVT_Wrapper.h.

References HepMC3::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 157 of file HEPEVT_Wrapper.h.

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

◆ set_children()

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

Set children.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 211 of file HEPEVT_Wrapper.h.

References HepMC3::hepevtptr, and HEPEVT::jdahep.

◆ set_mass()

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

Set mass.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 225 of file HEPEVT_Wrapper.h.

References HepMC3::hepevtptr, and HEPEVT::phep.

◆ set_momentum()

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

Set 4-momentum.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 217 of file HEPEVT_Wrapper.h.

References HepMC3::hepevtptr, and HEPEVT::phep.

◆ set_parents()

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

Set parents.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 205 of file HEPEVT_Wrapper.h.

References HepMC3::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 230 of file HEPEVT_Wrapper.h.

References HepMC3::hepevtptr, and HEPEVT::vhep.

◆ zero_everything()

void zero_everything ( )
inlinestatic

Set all entries in HEPEVT to zero.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 180 of file HEPEVT_Wrapper.h.

References HepMC3::hepevtptr.


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