StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | Static Protected Member Functions | List of all members
HepMC::HEPEVT_Wrapper Class Reference

Generic Wrapper for the fortran HEPEVT common block. More...

#include <HEPEVT_Wrapper.h>

Static Public Member Functions

static void print_hepevt (std::ostream &ostr=std::cout)
 write information from HEPEVT common block More...
 
static void print_hepevt_particle (int index, std::ostream &ostr=std::cout)
 write particle information to ostr More...
 
static bool is_double_precision ()
 True if common block uses double.
 
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
 
static int event_number ()
 event number
 
static int number_entries ()
 num entries in current evt
 
static int status (int index)
 status code
 
static int id (int index)
 PDG particle id.
 
static int first_parent (int index)
 index of 1st mother
 
static int last_parent (int index)
 index of last mother
 
static int number_parents (int index)
 number of parents
 
static int first_child (int index)
 index of 1st daughter
 
static int last_child (int index)
 index of last daughter
 
static int number_children (int index)
 number of children
 
static double px (int index)
 X momentum.
 
static double py (int index)
 Y momentum.
 
static double pz (int index)
 Z momentum.
 
static double e (int index)
 Energy.
 
static double m (int index)
 generated mass
 
static double x (int index)
 X Production vertex.
 
static double y (int index)
 Y Production vertex.
 
static double z (int index)
 Z Production vertex.
 
static double t (int index)
 production time
 
static void set_event_number (int evtno)
 set event number
 
static void set_number_entries (int noentries)
 set number of entries in HEPEVT
 
static void set_status (int index, int status)
 set particle status
 
static void set_id (int index, int id)
 set particle ID
 
static void set_parents (int index, int firstparent, int lastparent)
 define parents of a particle
 
static void set_children (int index, int firstchild, int lastchild)
 define children of a particle
 
static void set_momentum (int index, double px, double py, double pz, double e)
 set particle momentum
 
static void set_mass (int index, double mass)
 set particle mass
 
static void set_position (int index, double x, double y, double z, double t)
 set particle production vertex
 
static unsigned int sizeof_int ()
 size of integer in bytes
 
static unsigned int sizeof_real ()
 size of real in bytes
 
static int max_number_entries ()
 size of common block
 
static void set_sizeof_int (unsigned int)
 define size of integer
 
static void set_sizeof_real (unsigned int)
 define size of real
 
static void set_max_number_entries (unsigned int)
 define size of common block
 

Static Protected Member Functions

static double byte_num_to_double (unsigned int)
 navigate a byte array
 
static int byte_num_to_int (unsigned int)
 navigate a byte array
 
static void write_byte_num (double, unsigned int)
 pretend common block is an array of bytes
 
static void write_byte_num (int, unsigned int)
 pretend common block is an array of bytes
 
static void print_legend (std::ostream &ostr=std::cout)
 print output legend
 

Detailed Description

Generic Wrapper for the fortran HEPEVT common block.

This class is intended for static use only - it makes no sense to instantiate it.

Definition at line 130 of file HEPEVT_Wrapper.h.

Member Function Documentation

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

check for problems with HEPEVT common block

This method inspects the HEPEVT common block and looks for inconsistencies in the mother/daughter pointers

Definition at line 88 of file HEPEVT_Wrapper.cc.

References event_number(), first_child(), first_parent(), last_child(), last_parent(), m(), number_entries(), print_hepevt_particle(), and print_legend().

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

write information from HEPEVT common block

dumps the content of this HEPEVT event to ostr (Width is 80)

Definition at line 27 of file HEPEVT_Wrapper.cc.

References event_number(), is_double_precision(), max_number_entries(), number_entries(), print_hepevt_particle(), print_legend(), sizeof_int(), and sizeof_real().

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

write particle information to ostr

dumps the content HEPEVT particle entry i (Width is 120) here i is the C array index (i.e. it starts at 0 ... whereas the fortran array index starts at 1) So if there's 100 particles, the last valid index is 100-1=99

Definition at line 68 of file HEPEVT_Wrapper.cc.

References e(), first_child(), first_parent(), last_child(), last_parent(), m(), px(), py(), pz(), status(), t(), x(), y(), and z().

Referenced by check_hepevt_consistency(), and print_hepevt().


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