HepMC3 event record library
Public Member Functions | Data Fields | Private Attributes
HEPEVT_Wrapper_Template< max_particles, momentum_type > Class Template Reference

Detailed Description

template<int max_particles, typename momentum_type = double>
class HepMC3::HEPEVT_Wrapper_Template< max_particles, momentum_type >

An interface to HEPEVT common block implemented as template class.

Definition at line 31 of file HEPEVT_Wrapper_Template.h.

#include <HEPEVT_Wrapper_Template.h>

+ Collaboration diagram for HEPEVT_Wrapper_Template< max_particles, momentum_type >:

Public Member Functions

 HEPEVT_Wrapper_Template ()
 Default constructor.
 
 ~HEPEVT_Wrapper_Template ()
 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.
 

Data Fields

struct HEPEVT_Templated< max_particles, momentum_type > * m_hepevtptr
 Fortran common block HEPEVT.
 

Private Attributes

std::shared_ptr< struct HEPEVT_Templated< max_particles, momentum_type > > m_internal_storage
 Internalstorage storage. Optional.
 

Constructor & Destructor Documentation

◆ HEPEVT_Wrapper_Template()

Default constructor.

Definition at line 38 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ ~HEPEVT_Wrapper_Template()

Default destructor.

Definition at line 40 of file HEPEVT_Wrapper_Template.h.

Member Function Documentation

◆ allocate_internal_storage()

void allocate_internal_storage
inline

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

Definition at line 127 of file HEPEVT_Wrapper_Template.h.

◆ copy_to_internal_storage()

void copy_to_internal_storage ( char *  c,
int  N 
)

Copies the content of foreight common block into the internal storage.

Definition at line 134 of file HEPEVT_Wrapper_Template.h.

◆ e()

double e ( const int  index) const
inline

◆ event_number()

int event_number ( ) const
inline

◆ first_child()

int first_child ( const int  index) const
inline

Get index of 1st daughter.

Definition at line 73 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::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_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ fix_daughters()

bool fix_daughters
inline

Tries to fix list of daughters.

Definition at line 223 of file HEPEVT_Wrapper_Template.h.

◆ GenEvent_to_HEPEVT()

bool GenEvent_to_HEPEVT ( const GenEvent evt)
inline

Convert GenEvent to HEPEVT.

Definition at line 48 of file HEPEVT_Wrapper_Template.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 50 of file HEPEVT_Wrapper_Template.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_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::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_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::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_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ m()

double m ( const int  index) const
inline

Get generated mass.

Definition at line 79 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ max_number_entries()

int max_number_entries ( ) const
inline

Block size.

Definition at line 66 of file HEPEVT_Wrapper_Template.h.

◆ number_children()

int number_children ( const int  index) const
inline

Get number of children from the range of daughters.

Definition at line 170 of file HEPEVT_Wrapper_Template.h.

◆ number_children_exact()

int number_children_exact ( const int  index) const
inline

Get number of children by counting.

Definition at line 176 of file HEPEVT_Wrapper_Template.h.

◆ number_entries()

int number_entries ( ) const
inline

Get number of entries.

Definition at line 68 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ number_parents()

int number_parents ( const int  index) const
inline

Get number of parents.

Definition at line 164 of file HEPEVT_Wrapper_Template.h.

◆ print_hepevt()

void print_hepevt ( std::ostream &  ostr = std::cout) const
inline

Print information from HEPEVT common block.

Definition at line 102 of file HEPEVT_Wrapper_Template.h.

◆ print_hepevt_particle()

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

Print particle information.

Definition at line 112 of file HEPEVT_Wrapper_Template.h.

◆ px()

double px ( const int  index) const
inline

◆ py()

double py ( const int  index) const
inline

◆ pz()

double pz ( const int  index) const
inline

◆ set_children()

void set_children ( const int  index,
const int  firstchild,
const int  lastchild 
)
inline

Set children.

Definition at line 192 of file HEPEVT_Wrapper_Template.h.

◆ set_event_number()

void set_event_number ( const int  evtno)
inline

◆ set_hepevt_address()

void set_hepevt_address ( char *  c)
inline

Set Fortran block address.

Definition at line 65 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ set_id()

void set_id ( const int  index,
const int  id 
)
inline

◆ set_mass()

void set_mass ( const int  index,
double  mass 
)
inline

Set mass.

Definition at line 208 of file HEPEVT_Wrapper_Template.h.

◆ set_max_number_entries()

void set_max_number_entries ( unsigned int  size)
inline

Set block size.

Definition at line 64 of file HEPEVT_Wrapper_Template.h.

◆ set_momentum()

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

Set 4-momentum.

Definition at line 199 of file HEPEVT_Wrapper_Template.h.

◆ set_number_entries()

void set_number_entries ( const int  noentries)
inline

Set number of entries.

Definition at line 88 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ set_parents()

void set_parents ( const int  index,
const int  firstparent,
const int  lastparent 
)
inline

Set parents.

Definition at line 185 of file HEPEVT_Wrapper_Template.h.

◆ set_position()

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

Set position in time-space.

Definition at line 214 of file HEPEVT_Wrapper_Template.h.

◆ set_status()

void set_status ( const int  index,
const int  status 
)
inline

◆ status()

int status ( const int  index) const
inline

◆ t()

double t ( const int  index) const
inline

Get production time.

Definition at line 83 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ x()

double x ( const int  index) const
inline

Get X Production vertex.

Definition at line 80 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ y()

double y ( const int  index) const
inline

Get Y Production vertex.

Definition at line 81 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ z()

double z ( const int  index) const
inline

Get Z Production vertex.

Definition at line 82 of file HEPEVT_Wrapper_Template.h.

References HEPEVT_Wrapper_Template< max_particles, momentum_type >::m_hepevtptr.

◆ zero_everything()

void zero_everything
inline

Set all entries in HEPEVT to zero.

Definition at line 158 of file HEPEVT_Wrapper_Template.h.

Field Documentation

◆ m_hepevtptr

struct HEPEVT_Templated< max_particles, momentum_type >* m_hepevtptr

Fortran common block HEPEVT.

Definition at line 54 of file HEPEVT_Wrapper_Template.h.

◆ m_internal_storage

std::shared_ptr<struct HEPEVT_Templated<max_particles, momentum_type> > m_internal_storage
private

Internalstorage storage. Optional.

Definition at line 57 of file HEPEVT_Wrapper_Template.h.


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