![]() |
HepMC Reference DocumentationHepMC |
#include <HEPEVT_Wrapper.h>
Static Public Member Functions | |
static void | print_hepevt (std::ostream &ostr=std::cout) |
write information from HEPEVT common block | |
static void | print_hepevt_particle (int index, std::ostream &ostr=std::cout) |
write particle information to ostr | |
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 | |
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 |
This class is intended for static use only - it makes no sense to instantiate it.
Definition at line 130 of file HEPEVT_Wrapper.h.
double HepMC::HEPEVT_Wrapper::byte_num_to_double | ( | unsigned | int | ) | [inline, static, protected] |
int HepMC::HEPEVT_Wrapper::byte_num_to_int | ( | unsigned | int | ) | [inline, static, protected] |
navigate a byte array
Definition at line 273 of file HEPEVT_Wrapper.h.
References hepevt, and hepevt_bytes_allocation.
Referenced by event_number(), first_child(), first_parent(), id(), last_child(), last_parent(), number_entries(), and status().
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().
double HepMC::HEPEVT_Wrapper::e | ( | int | index | ) | [inline, static] |
Energy.
Definition at line 446 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
int HepMC::HEPEVT_Wrapper::event_number | ( | ) | [inline, static] |
event number
Definition at line 343 of file HEPEVT_Wrapper.h.
References byte_num_to_int().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), check_hepevt_consistency(), HepMC::IO_HERWIG::fill_next_event(), HepMC::IO_HEPEVT::fill_next_event(), and print_hepevt().
int HepMC::HEPEVT_Wrapper::first_child | ( | int | index | ) | [inline, static] |
index of 1st daughter
Definition at line 394 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), max_number_entries(), number_entries(), and sizeof_int().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), check_hepevt_consistency(), last_child(), number_children(), print_hepevt_particle(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
int HepMC::HEPEVT_Wrapper::first_parent | ( | int | index | ) | [inline, static] |
index of 1st mother
Definition at line 362 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), max_number_entries(), number_entries(), and sizeof_int().
Referenced by HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), check_hepevt_consistency(), HepMC::IO_HERWIG::fill_next_event(), last_parent(), number_parents(), print_hepevt_particle(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
int HepMC::HEPEVT_Wrapper::id | ( | int | index | ) | [inline, static] |
PDG particle id.
Definition at line 356 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), max_number_entries(), and sizeof_int().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
bool HepMC::HEPEVT_Wrapper::is_double_precision | ( | ) | [inline, static] |
True if common block uses double.
Definition at line 337 of file HEPEVT_Wrapper.h.
References sizeof_real().
Referenced by print_hepevt().
int HepMC::HEPEVT_Wrapper::last_child | ( | int | index | ) | [inline, static] |
index of last daughter
Definition at line 402 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), first_child(), max_number_entries(), number_entries(), and sizeof_int().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), check_hepevt_consistency(), number_children(), print_hepevt_particle(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
int HepMC::HEPEVT_Wrapper::last_parent | ( | int | index | ) | [inline, static] |
index of last mother
Definition at line 370 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), first_parent(), max_number_entries(), number_entries(), and sizeof_int().
Referenced by HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), check_hepevt_consistency(), number_parents(), print_hepevt_particle(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
double HepMC::HEPEVT_Wrapper::m | ( | int | index | ) | [inline, static] |
generated mass
Definition at line 452 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), check_hepevt_consistency(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
int HepMC::HEPEVT_Wrapper::max_number_entries | ( | ) | [inline, static] |
size of common block
Definition at line 229 of file HEPEVT_Wrapper.h.
Referenced by e(), first_child(), first_parent(), id(), last_child(), last_parent(), m(), number_entries(), print_hepevt(), px(), py(), pz(), set_children(), set_id(), set_mass(), set_momentum(), set_parents(), set_position(), set_status(), t(), HepMC::IO_HEPEVT::write_event(), x(), y(), z(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
int HepMC::HEPEVT_Wrapper::number_children | ( | int | index | ) | [inline, static] |
number of children
Definition at line 420 of file HEPEVT_Wrapper.h.
References first_child(), and last_child().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), and HepMC::IO_HEPEVT::build_end_vertex().
int HepMC::HEPEVT_Wrapper::number_entries | ( | ) | [inline, static] |
num entries in current evt
Definition at line 346 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), max_number_entries(), and sizeof_int().
Referenced by check_hepevt_consistency(), HepMC::IO_HERWIG::fill_next_event(), HepMC::IO_HEPEVT::fill_next_event(), first_child(), first_parent(), last_child(), last_parent(), print_hepevt(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
int HepMC::HEPEVT_Wrapper::number_parents | ( | int | index | ) | [inline, static] |
number of parents
Definition at line 388 of file HEPEVT_Wrapper.h.
References first_parent(), and last_parent().
Referenced by HepMC::IO_HERWIG::build_production_vertex(), and HepMC::IO_HEPEVT::build_production_vertex().
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().
Referenced by main().
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().
void HepMC::HEPEVT_Wrapper::print_legend | ( | std::ostream & | ostr = std::cout |
) | [static, protected] |
print output legend
Definition at line 55 of file HEPEVT_Wrapper.cc.
Referenced by check_hepevt_consistency(), and print_hepevt().
double HepMC::HEPEVT_Wrapper::px | ( | int | index | ) | [inline, static] |
X momentum.
Definition at line 427 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
double HepMC::HEPEVT_Wrapper::py | ( | int | index | ) | [inline, static] |
Y momentum.
Definition at line 433 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
double HepMC::HEPEVT_Wrapper::pz | ( | int | index | ) | [inline, static] |
Z momentum.
Definition at line 440 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
void HepMC::HEPEVT_Wrapper::set_children | ( | int | index, | |
int | firstchild, | |||
int | lastchild | |||
) | [inline, static] |
define children of a particle
Definition at line 514 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HERWIG::repair_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
void HepMC::HEPEVT_Wrapper::set_event_number | ( | int | evtno | ) | [inline, static] |
set event number
Definition at line 486 of file HEPEVT_Wrapper.h.
References write_byte_num().
Referenced by HepMC::IO_HEPEVT::write_event(), and zero_everything().
void HepMC::HEPEVT_Wrapper::set_id | ( | int | index, | |
int | id | |||
) | [inline, static] |
set particle ID
Definition at line 498 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HERWIG::repair_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
void HepMC::HEPEVT_Wrapper::set_mass | ( | int | index, | |
double | mass | |||
) | [inline, static] |
set particle mass
Definition at line 538 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), sizeof_real(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
void HepMC::HEPEVT_Wrapper::set_max_number_entries | ( | unsigned | int | ) | [inline, static] |
define size of common block
Definition at line 251 of file HEPEVT_Wrapper.h.
Referenced by event_selection(), main(), pythia_in_out(), pythia_out(), pythia_particle_out(), and writePythiaStreamIO().
void HepMC::HEPEVT_Wrapper::set_momentum | ( | int | index, | |
double | px, | |||
double | py, | |||
double | pz, | |||
double | e | |||
) | [inline, static] |
set particle momentum
Definition at line 524 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), sizeof_real(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
void HepMC::HEPEVT_Wrapper::set_number_entries | ( | int | noentries | ) | [inline, static] |
set number of entries in HEPEVT
Definition at line 489 of file HEPEVT_Wrapper.h.
References sizeof_int(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HEPEVT::write_event(), and zero_everything().
void HepMC::HEPEVT_Wrapper::set_parents | ( | int | index, | |
int | firstparent, | |||
int | lastparent | |||
) | [inline, static] |
define parents of a particle
Definition at line 504 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HERWIG::repair_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
void HepMC::HEPEVT_Wrapper::set_position | ( | int | index, | |
double | x, | |||
double | y, | |||
double | z, | |||
double | t | |||
) | [inline, static] |
set particle production vertex
Definition at line 545 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), sizeof_real(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
void HepMC::HEPEVT_Wrapper::set_sizeof_int | ( | unsigned | int | ) | [inline, static] |
void HepMC::HEPEVT_Wrapper::set_sizeof_real | ( | unsigned | int | ) | [inline, static] |
define size of real
Definition at line 242 of file HEPEVT_Wrapper.h.
Referenced by event_selection(), main(), pythia_in_out(), pythia_out(), pythia_particle_out(), and writePythiaStreamIO().
void HepMC::HEPEVT_Wrapper::set_status | ( | int | index, | |
int | status | |||
) | [inline, static] |
set particle status
Definition at line 492 of file HEPEVT_Wrapper.h.
References max_number_entries(), sizeof_int(), and write_byte_num().
Referenced by HepMC::IO_HERWIG::remove_gaps_in_hepevt(), HepMC::IO_HEPEVT::write_event(), zero_everything(), and HepMC::IO_HERWIG::zero_hepevt_entry().
unsigned int HepMC::HEPEVT_Wrapper::sizeof_int | ( | ) | [inline, static] |
size of integer in bytes
Definition at line 225 of file HEPEVT_Wrapper.h.
Referenced by e(), first_child(), first_parent(), id(), last_child(), last_parent(), m(), number_entries(), print_hepevt(), px(), py(), pz(), set_children(), set_id(), set_mass(), set_momentum(), set_number_entries(), set_parents(), set_position(), set_status(), status(), t(), x(), y(), and z().
unsigned int HepMC::HEPEVT_Wrapper::sizeof_real | ( | ) | [inline, static] |
size of real in bytes
Definition at line 227 of file HEPEVT_Wrapper.h.
Referenced by e(), is_double_precision(), m(), print_hepevt(), px(), py(), pz(), set_mass(), set_momentum(), set_position(), t(), x(), y(), and z().
int HepMC::HEPEVT_Wrapper::status | ( | int | index | ) | [inline, static] |
status code
Definition at line 353 of file HEPEVT_Wrapper.h.
References byte_num_to_int(), and sizeof_int().
Referenced by HepMC::IO_HERWIG::build_particle(), HepMC::IO_HEPEVT::build_particle(), HepMC::IO_HERWIG::fill_next_event(), print_hepevt_particle(), HepMC::IO_HERWIG::remove_gaps_in_hepevt(), and HepMC::IO_HERWIG::repair_hepevt().
double HepMC::HEPEVT_Wrapper::t | ( | int | index | ) | [inline, static] |
production time
Definition at line 479 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
void HepMC::HEPEVT_Wrapper::write_byte_num | ( | int | , | |
unsigned | int | |||
) | [inline, static, protected] |
pretend common block is an array of bytes
Definition at line 312 of file HEPEVT_Wrapper.h.
References hepevt, and hepevt_bytes_allocation.
void HepMC::HEPEVT_Wrapper::write_byte_num | ( | double | , | |
unsigned | int | |||
) | [inline, static, protected] |
pretend common block is an array of bytes
Definition at line 295 of file HEPEVT_Wrapper.h.
References hepevt, and hepevt_bytes_allocation.
Referenced by set_children(), set_event_number(), set_id(), set_mass(), set_momentum(), set_number_entries(), set_parents(), set_position(), and set_status().
double HepMC::HEPEVT_Wrapper::x | ( | int | index | ) | [inline, static] |
X Production vertex.
Definition at line 458 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
double HepMC::HEPEVT_Wrapper::y | ( | int | index | ) | [inline, static] |
Y Production vertex.
Definition at line 465 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
double HepMC::HEPEVT_Wrapper::z | ( | int | index | ) | [inline, static] |
Z Production vertex.
Definition at line 472 of file HEPEVT_Wrapper.h.
References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().
Referenced by HepMC::IO_HERWIG::build_end_vertex(), HepMC::IO_HEPEVT::build_end_vertex(), HepMC::IO_HERWIG::build_production_vertex(), HepMC::IO_HEPEVT::build_production_vertex(), print_hepevt_particle(), and HepMC::IO_HERWIG::remove_gaps_in_hepevt().
void HepMC::HEPEVT_Wrapper::zero_everything | ( | ) | [static] |
set all entries in HEPEVT to zero
Definition at line 212 of file HEPEVT_Wrapper.cc.
References max_number_entries(), set_children(), set_event_number(), set_id(), set_mass(), set_momentum(), set_number_entries(), set_parents(), set_position(), and set_status().