HepMC3 event record library
Public Member Functions | Private Attributes
HEPEVT_Wrapper_Runtime Class Reference

Detailed Description

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>

+ Collaboration diagram for HEPEVT_Wrapper_Runtime:

Public Member Functions

 HEPEVT_Wrapper_Runtime ()
 Default constructor. More...
 
 ~HEPEVT_Wrapper_Runtime ()
 Default destructor. More...
 
void print_hepevt (std::ostream &ostr=std::cout) const
 Print information from HEPEVT common block. More...
 
void print_hepevt_particle (int index, std::ostream &ostr=std::cout) const
 Print particle information. More...
 
void zero_everything ()
 Set all entries in HEPEVT to zero. More...
 
bool GenEvent_to_HEPEVT (const GenEvent *evt)
 Convert GenEvent to HEPEVT. More...
 
bool HEPEVT_to_GenEvent (GenEvent *evt) const
 Convert HEPEVT to GenEvent. More...
 
bool fix_daughters ()
 Tries to fix list of daughters. More...
 
void allocate_internal_storage ()
 
void copy_to_internal_storage (char *c, int N)
 !< Allocates m_internal_storage storage in smart pointer to hold HEPEVT of fixed size More...
 
void set_max_number_entries (unsigned int size)
 !< Copies the content of foreight common block into the internal storage More...
 
void set_hepevt_address (char *c)
 Set Fortran block address. More...
 
int max_number_entries () const
 Block size. More...
 
int event_number () const
 Get event number. More...
 
int number_entries () const
 Get number of entries. More...
 
int status (const int index) const
 Get status code. More...
 
int id (const int index) const
 Get PDG particle id. More...
 
int first_parent (const int index) const
 Get index of 1st mother. More...
 
int last_parent (const int index) const
 Get index of last mother. More...
 
int first_child (const int index) const
 Get index of 1st daughter. More...
 
int last_child (const int index) const
 Get index of last daughter. More...
 
double px (const int index) const
 Get X momentum. More...
 
double py (const int index) const
 Get Y momentum. More...
 
double pz (const int index) const
 Get Z momentum. More...
 
double e (const int index) const
 Get Energy. More...
 
double m (const int index) const
 Get generated mass. More...
 
double x (const int index) const
 Get X Production vertex. More...
 
double y (const int index) const
 Get Y Production vertex. More...
 
double z (const int index) const
 Get Z Production vertex. More...
 
double t (const int index) const
 Get production time. More...
 
int number_parents (const int index) const
 Get number of parents. More...
 
int number_children (const int index) const
 Get number of children from the range of daughters. More...
 
int number_children_exact (const int index) const
 Get number of children by counting. More...
 
void set_event_number (const int evtno)
 Set event number. More...
 
void set_number_entries (const int noentries)
 Set number of entries. More...
 
void set_status (const int index, const int status)
 Set status code. More...
 
void set_id (const int index, const int id)
 Set PDG particle id. More...
 
void set_parents (const int index, const int firstparent, const int lastparent)
 Set parents. More...
 
void set_children (const int index, const int firstchild, const int lastchild)
 Set children. More...
 
void set_momentum (const int index, const double px, const double py, const double pz, const double e)
 Set 4-momentum. More...
 
void set_mass (const int index, double mass)
 Set mass. More...
 
void set_position (const int index, const double x, const double y, const double z, const double t)
 Set position in time-space. More...
 

Private Attributes

std::shared_ptr< struct HEPEVT_Pointers< double > > m_hepevtptr
 Fortran common block HEPEVT. More...
 
int m_max_particles
 Block size. More...
 
std::vector< char > m_internal_storage
 Internalstorage storage. Optional. More...
 

Constructor & Destructor Documentation

◆ HEPEVT_Wrapper_Runtime()

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.

◆ ~HEPEVT_Wrapper_Runtime()

Default destructor.

Definition at line 38 of file HEPEVT_Wrapper_Runtime.h.

Member Function Documentation

◆ copy_to_internal_storage()

void copy_to_internal_storage ( char *  c,
int  N 
)

!< Allocates m_internal_storage storage in smart pointer to hold HEPEVT of fixed size

Definition at line 237 of file HEPEVT_Wrapper.cc.

References HEPEVT_Wrapper_Runtime::m_internal_storage, and HEPEVT_Wrapper_Runtime::m_max_particles.

◆ e()

double e ( const int  index) const
inline

Get Energy.

Definition at line 78 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ event_number()

int event_number ( ) const
inline

Get event number.

Definition at line 67 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ first_child()

int first_child ( const int  index) const
inline

Get index of 1st daughter.

Definition at line 73 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ first_parent()

int first_parent ( const int  index) const
inline

Get index of 1st mother.

Definition at line 71 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ fix_daughters()

bool fix_daughters ( )

◆ GenEvent_to_HEPEVT()

bool GenEvent_to_HEPEVT ( const GenEvent evt)
inline

Convert GenEvent to HEPEVT.

Definition at line 46 of file HEPEVT_Wrapper_Runtime.h.

References HepMC3::GenEvent_to_HEPEVT_nonstatic().

◆ HEPEVT_to_GenEvent()

bool HEPEVT_to_GenEvent ( GenEvent evt) const
inline

Convert HEPEVT to GenEvent.

Definition at line 48 of file HEPEVT_Wrapper_Runtime.h.

References HepMC3::HEPEVT_to_GenEvent_nonstatic().

◆ id()

int id ( const int  index) const
inline

Get PDG particle id.

Definition at line 70 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ last_child()

int last_child ( const int  index) const
inline

Get index of last daughter.

Definition at line 74 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ last_parent()

int last_parent ( const int  index) const
inline

Get index of last mother.

Definition at line 72 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ m()

double m ( const int  index) const
inline

Get generated mass.

Definition at line 79 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ max_number_entries()

int max_number_entries ( ) const
inline

Block size.

Definition at line 66 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_max_particles.

◆ number_children()

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.

◆ number_children_exact()

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.

◆ number_entries()

int number_entries ( ) const
inline

Get number of entries.

Definition at line 68 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ number_parents()

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.

◆ print_hepevt()

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().

◆ 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.

◆ px()

double px ( const int  index) const
inline

Get X momentum.

Definition at line 75 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ py()

double py ( const int  index) const
inline

Get Y momentum.

Definition at line 76 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ pz()

double pz ( const int  index) const
inline

Get Z momentum.

Definition at line 77 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ set_children()

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.

◆ set_event_number()

void set_event_number ( const int  evtno)
inline

Set event number.

Definition at line 87 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ set_hepevt_address()

void set_hepevt_address ( char *  c)

◆ set_id()

void set_id ( const int  index,
const int  id 
)
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.

◆ set_mass()

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.

◆ set_max_number_entries()

void set_max_number_entries ( unsigned int  size)
inline

!< Copies the content of foreight common block into the internal storage

Set block size

Definition at line 64 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_max_particles.

◆ set_momentum()

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

◆ set_number_entries()

void set_number_entries ( const int  noentries)
inline

Set number of entries.

Definition at line 88 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ set_parents()

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.

◆ set_position()

void set_position ( const int  index,
const double  x,
const double  y,
const double  z,
const double  t 
)

◆ set_status()

void set_status ( const int  index,
const int  status 
)
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().

◆ status()

int status ( const int  index) const
inline

Get status code.

Definition at line 69 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ t()

double t ( const int  index) const
inline

Get production time.

Definition at line 83 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ x()

double x ( const int  index) const
inline

Get X Production vertex.

Definition at line 80 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ y()

double y ( const int  index) const
inline

Get Y Production vertex.

Definition at line 81 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ z()

double z ( const int  index) const
inline

Get Z Production vertex.

Definition at line 82 of file HEPEVT_Wrapper_Runtime.h.

References HEPEVT_Wrapper_Runtime::m_hepevtptr.

◆ zero_everything()

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.

Field Documentation

◆ m_hepevtptr

std::shared_ptr<struct HEPEVT_Pointers<double> > m_hepevtptr
private

Fortran common block HEPEVT.

Definition at line 53 of file HEPEVT_Wrapper_Runtime.h.

◆ m_internal_storage

std::vector<char> m_internal_storage
private

Internalstorage storage. Optional.

Definition at line 57 of file HEPEVT_Wrapper_Runtime.h.

◆ m_max_particles

int m_max_particles
private

Block size.

Definition at line 55 of file HEPEVT_Wrapper_Runtime.h.


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