6#ifndef HEPMC3_HEPEVT_WRAPPER_RUNTIME_STATIC_H
7#define HEPMC3_HEPEVT_WRAPPER_RUNTIME_STATIC_H
38 static void print_hepevt( std::ostream& ostr = std::cout );
51 HEPMC3_EXPORT_API
static std::shared_ptr<struct HEPEVT_Pointers<double> >
m_hepevtptr;
69 static double px(
const int index ) {
return m_hepevtptr->phep[5*(index-1)]; }
70 static double py(
const int index ) {
return m_hepevtptr->phep[5*(index-1)+1]; }
71 static double pz(
const int index ) {
return m_hepevtptr->phep[5*(index-1)+2]; }
72 static double e(
const int index ) {
return m_hepevtptr->phep[5*(index-1)+3]; }
73 static double m(
const int index ) {
return m_hepevtptr->phep[5*(index-1)+4]; }
74 static double x(
const int index ) {
return m_hepevtptr->vhep[4*(index-1)]; }
75 static double y(
const int index ) {
return m_hepevtptr->vhep[4*(index-1)+1]; }
76 static double z(
const int index ) {
return m_hepevtptr->vhep[4*(index-1)+2]; }
77 static double t(
const int index ) {
return m_hepevtptr->vhep[4*(index-1)+3]; }
85 static void set_parents(
const int index,
const int firstparent,
const int lastparent );
86 static void set_children(
const int index,
const int firstchild,
const int lastchild );
87 static void set_momentum(
const int index,
const double px,
const double py,
const double pz,
const double e );
88 static void set_mass(
const int index,
double mass );
89 static void set_position(
const int index,
const double x,
const double y,
const double z,
const double t );
97 m_hepevtptr = std::make_shared<struct HEPEVT_Pointers<double> >();
118 ostr <<
" Event No.: " << *(
m_hepevtptr->nevhep) << std::endl;
119 ostr <<
" Nr Type Parent(s) Daughter(s) Px Py Pz E Inv. M." << std::endl;
130 sprintf(buf,
"%5i %6i", index,
m_hepevtptr->idhep[index-1]);
138 ostr << buf << std::endl;
218 bool is_fixed =
true;
Definition of class GenEvent.
Definition of class GenParticle.
Definition of class GenVertex.
Helper functions used to manipulate with HEPEVT block.
Stores event-related information.
A static interface to HEPEVT common block implemented to deal with varying block size in runtime.
static void set_number_entries(const int noentries)
Set number of entries.
static int status(const int index)
Get status code.
static void set_status(const int index, const int status)
Set status code.
static bool HEPEVT_to_GenEvent(GenEvent *evt)
Convert HEPEVT to GenEvent.
static void print_hepevt_particle(int index, std::ostream &ostr=std::cout)
Print particle information.
static void print_hepevt(std::ostream &ostr=std::cout)
Print information from HEPEVT common block.
static double e(const int index)
Get Energy.
static void zero_everything()
Set all entries in HEPEVT to zero.
static void set_parents(const int index, const int firstparent, const int lastparent)
Set parents.
static HEPMC3_EXPORT_API int m_max_particles
Block size.
static void set_max_number_entries(unsigned int size)
Set block size.
static int max_number_entries()
Block size.
static void set_momentum(const int index, const double px, const double py, const double pz, const double e)
Set 4-momentum.
static void set_children(const int index, const int firstchild, const int lastchild)
Set children.
static double z(const int index)
Get Z Production vertex.
static void set_position(const int index, const double x, const double y, const double z, const double t)
Set position in time-space.
static bool fix_daughters()
Tries to fix list of daughters.
static void set_hepevt_address(char *c)
Set Fortran block address.
static double m(const int index)
Get generated mass.
static int number_children(const int index)
Get number of children from the range of daughters.
static bool GenEvent_to_HEPEVT(const GenEvent *evt)
Convert GenEvent to HEPEVT.
static double px(const int index)
Get X momentum.
static double pz(const int index)
Get Z momentum.
static int event_number()
Get event number.
static int last_parent(const int index)
Get index of last mother.
static void set_mass(const int index, double mass)
Set mass.
static int id(const int index)
Get PDG particle id.
static int number_children_exact(const int index)
Get number of children by counting.
static void set_event_number(const int evtno)
Set event number.
static void set_id(const int index, const int id)
Set PDG particle id.
static double x(const int index)
Get X Production vertex.
static double y(const int index)
Get Y Production vertex.
static int first_child(const int index)
Get index of 1st daughter.
static int number_entries()
Get number of entries.
static int first_parent(const int index)
Get index of 1st mother.
static int last_child(const int index)
Get index of last daughter.
static HEPMC3_EXPORT_API std::shared_ptr< struct HEPEVT_Pointers< double > > m_hepevtptr
Fortran common block HEPEVT.
static int number_parents(const int index)
Get number of parents.
static double t(const int index)
Get production time.
static double py(const int index)
Get Y momentum.