HepMC3 event record library
|
An interface to HEPEVT common block implemented to deal with varying block size in runtime.
Definition at line 29 of file HEPEVT_Wrapper_Runtime.h.
#include <HEPEVT_Wrapper_Runtime.h>
Public Member Functions | |
HEPEVT_Wrapper_Runtime () | |
Default constructor. | |
~HEPEVT_Wrapper_Runtime () | |
Default destructor. | |
void | print_hepevt (std::ostream &ostr=std::cout) const |
Print information from HEPEVT common block. | |
void | print_hepevt_particle (int index, std::ostream &ostr=std::cout) const |
Print particle information. | |
void | zero_everything () |
Set all entries in HEPEVT to zero. | |
bool | GenEvent_to_HEPEVT (const GenEvent *evt) |
Convert GenEvent to HEPEVT. | |
bool | HEPEVT_to_GenEvent (GenEvent *evt) const |
Convert HEPEVT to GenEvent. | |
bool | fix_daughters () |
Tries to fix list of daughters. | |
void | allocate_internal_storage () |
Allocates m_internal_storage storage in smart pointer to hold HEPEVT of fixed size. | |
void | copy_to_internal_storage (char *c, int N) |
Copies the content of foreight common block into the internal storage. | |
void | set_max_number_entries (unsigned int size) |
Set block size. | |
void | set_hepevt_address (char *c) |
Set Fortran block address. | |
int | max_number_entries () const |
Block size. | |
int | event_number () const |
Get event number. | |
int | number_entries () const |
Get number of entries. | |
int | status (const int index) const |
Get status code. | |
int | id (const int index) const |
Get PDG particle id. | |
int | first_parent (const int index) const |
Get index of 1st mother. | |
int | last_parent (const int index) const |
Get index of last mother. | |
int | first_child (const int index) const |
Get index of 1st daughter. | |
int | last_child (const int index) const |
Get index of last daughter. | |
double | px (const int index) const |
Get X momentum. | |
double | py (const int index) const |
Get Y momentum. | |
double | pz (const int index) const |
Get Z momentum. | |
double | e (const int index) const |
Get Energy. | |
double | m (const int index) const |
Get generated mass. | |
double | x (const int index) const |
Get X Production vertex. | |
double | y (const int index) const |
Get Y Production vertex. | |
double | z (const int index) const |
Get Z Production vertex. | |
double | t (const int index) const |
Get production time. | |
int | number_parents (const int index) const |
Get number of parents. | |
int | number_children (const int index) const |
Get number of children from the range of daughters. | |
int | number_children_exact (const int index) const |
Get number of children by counting. | |
void | set_event_number (const int evtno) |
Set event number. | |
void | set_number_entries (const int noentries) |
Set number of entries. | |
void | set_status (const int index, const int status) |
Set status code. | |
void | set_id (const int index, const int id) |
Set PDG particle id. | |
void | set_parents (const int index, const int firstparent, const int lastparent) |
Set parents. | |
void | set_children (const int index, const int firstchild, const int lastchild) |
Set children. | |
void | set_momentum (const int index, const double px, const double py, const double pz, const double e) |
Set 4-momentum. | |
void | set_mass (const int index, double mass) |
Set mass. | |
void | set_position (const int index, const double x, const double y, const double z, const double t) |
Set position in time-space. | |
Private Attributes | |
std::shared_ptr< struct HEPEVT_Pointers< double > > | m_hepevtptr |
Fortran common block HEPEVT. | |
int | m_max_particles |
Block size. | |
std::vector< char > | m_internal_storage |
Internalstorage storage. Optional. | |
|
inline |
Default constructor.
Definition at line 36 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr, and HEPEVT_Wrapper_Runtime::m_max_particles.
|
inline |
Default destructor.
Definition at line 38 of file HEPEVT_Wrapper_Runtime.h.
void allocate_internal_storage | ( | ) |
Allocates m_internal_storage storage in smart pointer to hold HEPEVT of fixed size.
Definition at line 231 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_internal_storage, HEPEVT_Wrapper_Runtime::m_max_particles, and HEPEVT_Wrapper_Runtime::set_hepevt_address().
void copy_to_internal_storage | ( | char * | c, |
int | N | ||
) |
Copies the content of foreight common block into the internal storage.
Definition at line 237 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_internal_storage, and HEPEVT_Wrapper_Runtime::m_max_particles.
|
inline |
Get Energy.
Definition at line 78 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get event number.
Definition at line 67 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get index of 1st daughter.
Definition at line 73 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get index of 1st mother.
Definition at line 71 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
bool fix_daughters | ( | ) |
Tries to fix list of daughters.
Definition at line 213 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::first_child(), HEPEVT_Wrapper_Runtime::first_parent(), HEPEVT_Wrapper_Runtime::last_child(), HEPEVT_Wrapper_Runtime::last_parent(), HEPEVT_Wrapper_Runtime::number_children(), HEPEVT_Wrapper_Runtime::number_children_exact(), HEPEVT_Wrapper_Runtime::number_entries(), and HEPEVT_Wrapper_Runtime::set_children().
|
inline |
Definition at line 46 of file HEPEVT_Wrapper_Runtime.h.
References HepMC3::GenEvent_to_HEPEVT_nonstatic().
|
inline |
Definition at line 48 of file HEPEVT_Wrapper_Runtime.h.
References HepMC3::HEPEVT_to_GenEvent_nonstatic().
|
inline |
Get PDG particle id.
Definition at line 70 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get index of last daughter.
Definition at line 74 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get index of last mother.
Definition at line 72 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get generated mass.
Definition at line 79 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Block size.
Definition at line 66 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_max_particles.
int number_children | ( | const int | index | ) | const |
Get number of children from the range of daughters.
Definition at line 162 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
int number_children_exact | ( | const int | index | ) | const |
Get number of children by counting.
Definition at line 167 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get number of entries.
Definition at line 68 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
int number_parents | ( | const int | index | ) | const |
Get number of parents.
Definition at line 155 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
void print_hepevt | ( | std::ostream & | ostr = std::cout | ) | const |
Print information from HEPEVT common block.
Definition at line 116 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr, and HEPEVT_Wrapper_Runtime::print_hepevt_particle().
void print_hepevt_particle | ( | int | index, |
std::ostream & | ostr = std::cout |
||
) | const |
Print particle information.
Definition at line 127 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get X momentum.
Definition at line 75 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get Y momentum.
Definition at line 76 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get Z momentum.
Definition at line 77 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
void set_children | ( | const int | index, |
const int | firstchild, | ||
const int | lastchild | ||
) |
Set children.
Definition at line 182 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Set event number.
Definition at line 87 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
void set_hepevt_address | ( | char * | c | ) |
Set Fortran block address.
Definition at line 95 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr, HEPEVT_Wrapper_Runtime::m_max_particles, and HEPEVT_Wrapper_Runtime::x().
|
inline |
Set PDG particle id.
Definition at line 90 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::id(), and HEPEVT_Wrapper_Runtime::m_hepevtptr.
void set_mass | ( | const int | index, |
double | mass | ||
) |
Set mass.
Definition at line 198 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Set block size.
Definition at line 64 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_max_particles.
void set_momentum | ( | const int | index, |
const double | px, | ||
const double | py, | ||
const double | pz, | ||
const double | e | ||
) |
Set 4-momentum.
Definition at line 189 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::e(), HEPEVT_Wrapper_Runtime::m_hepevtptr, HEPEVT_Wrapper_Runtime::px(), HEPEVT_Wrapper_Runtime::py(), and HEPEVT_Wrapper_Runtime::pz().
|
inline |
Set number of entries.
Definition at line 88 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
void set_parents | ( | const int | index, |
const int | firstparent, | ||
const int | lastparent | ||
) |
Set parents.
Definition at line 176 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
void set_position | ( | const int | index, |
const double | x, | ||
const double | y, | ||
const double | z, | ||
const double | t | ||
) |
Set position in time-space.
Definition at line 204 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr, HEPEVT_Wrapper_Runtime::t(), HEPEVT_Wrapper_Runtime::x(), HEPEVT_Wrapper_Runtime::y(), and HEPEVT_Wrapper_Runtime::z().
|
inline |
Set status code.
Definition at line 89 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr, and HEPEVT_Wrapper_Runtime::status().
|
inline |
Get status code.
Definition at line 69 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get production time.
Definition at line 83 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get X Production vertex.
Definition at line 80 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get Y Production vertex.
Definition at line 81 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
|
inline |
Get Z Production vertex.
Definition at line 82 of file HEPEVT_Wrapper_Runtime.h.
References HEPEVT_Wrapper_Runtime::m_hepevtptr.
void zero_everything | ( | ) |
Set all entries in HEPEVT to zero.
Definition at line 142 of file HEPEVT_Wrapper.cc.
References HEPEVT_Wrapper_Runtime::m_hepevtptr, and HEPEVT_Wrapper_Runtime::m_max_particles.
|
private |
Fortran common block HEPEVT.
Definition at line 53 of file HEPEVT_Wrapper_Runtime.h.
|
private |
Internalstorage storage. Optional.
Definition at line 57 of file HEPEVT_Wrapper_Runtime.h.
|
private |
Block size.
Definition at line 55 of file HEPEVT_Wrapper_Runtime.h.