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 96 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 void zero_everything ()
 Check for problems with HEPEVT common block. 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

◆ fix_daughters()

bool fix_daughters ( )
inlinestatic

Tries to fix list of daughters.

Definition at line 259 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 209 of file HEPEVT_Wrapper.h.

◆ number_children_exact()

int number_children_exact ( const int &  index)
inlinestatic

Get number of children by counting.

Definition at line 214 of file HEPEVT_Wrapper.h.

◆ number_parents()

int number_parents ( const int &  index)
inlinestatic

Get number of parents.

Definition at line 204 of file HEPEVT_Wrapper.h.

◆ 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 164 of file HEPEVT_Wrapper.h.

◆ print_hepevt_particle()

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

Print particle information.

◆ 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 230 of file HEPEVT_Wrapper.h.

◆ set_mass()

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

Set mass.

Examples
hepevt_wrapper_example_main.cc.

Definition at line 244 of file HEPEVT_Wrapper.h.

◆ 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 236 of file HEPEVT_Wrapper.h.

◆ 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 224 of file HEPEVT_Wrapper.h.

◆ 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 249 of file HEPEVT_Wrapper.h.

◆ zero_everything()

void zero_everything ( )
inlinestatic

Check for problems with HEPEVT common block.

<

Todo:
HEPEVT_Wrapper::check_hepevt_consistency is not implemented!

Set all entries in HEPEVT to zero

Examples
hepevt_wrapper_example_main.cc.

Definition at line 199 of file HEPEVT_Wrapper.h.


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