6#ifndef HEPMC3_HEPEVT_WRAPPER_H
7#define HEPMC3_HEPEVT_WRAPPER_H
26#ifndef HEPMC3_HEPEVT_NMXHEP
28#define HEPMC3_HEPEVT_NMXHEP 10000
31#ifndef HEPMC3_HEPEVT_PRECISION
33#define HEPMC3_HEPEVT_PRECISION double
74#ifndef HEPEVT_WRAPPER_HEADER_ONLY
94 static void print_hepevt( std::ostream& ostr = std::cout );
99#ifndef HEPEVT_WRAPPER_HEADER_ONLY
138 static void set_parents(
const int& index,
const int& firstparent,
const int& lastparent );
139 static void set_children(
const int& index,
const int& firstchild,
const int& lastchild );
140 static void set_momentum(
const int& index,
const double&
px,
const double&
py,
const double&
pz,
const double&
e );
141 static void set_mass(
const int& index,
double mass );
142 static void set_position(
const int& index,
const double&
x,
const double&
y,
const double&
z,
const double&
t );
151 ostr<<
" Nr Type Parent(s) Daughter(s) Px Py Pz E Inv. M." << std::endl;
169 ostr << buf << std::endl;
239 bool is_fixed =
true;
Definition of class GenEvent.
Definition of class GenParticle.
Definition of class GenVertex.
Helper functions used to manipulate with HEPEVT block.
#define HEPMC3_HEPEVT_NMXHEP
HEPMC3_HEPEVT_PRECISION momentum_t
Precision of the 4-momentum, time-space position and mass.
#define HEPMC3_HEPEVT_PRECISION
static const int NMXHEP
Number of particles in the HEPEVT structure.
HEPMC3_EXPORT_API struct HEPEVT * hepevtptr
Pointer to HEPEVT common block.
Stores event-related information.
An interface to HEPEVT common block implemented in a traditional way. When possible this implementati...
static double pz(const int &index)
Get Z momentum.
static int last_child(const int &index)
Get index of last daughter.
static void set_mass(const int &index, double mass)
Set mass.
static double py(const int &index)
Get Y momentum.
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_number_entries(const int &noentries)
Set number of entries.
static int number_children_exact(const int &index)
Get number of children by counting.
static double m(const int &index)
Get generated mass.
static int number_parents(const int &index)
Get number of parents.
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 void zero_everything()
Set all entries in HEPEVT to zero.
static void set_max_number_entries(unsigned int size)
Set block size.
static void set_id(const int &index, const int &id)
Set PDG particle id.
static int max_number_entries()
Block size.
static void set_status(const int &index, const int &status)
Set status code.
static bool fix_daughters()
Tries to fix list of daughters.
static void set_hepevt_address(char *c)
Set Fortran block address.
static double y(const int &index)
Get Y Production vertex.
static double t(const int &index)
Get production time.
static int last_parent(const int &index)
Get index of last mother.
static double e(const int &index)
Get Energy.
static double z(const int &index)
Get Z Production vertex.
static double x(const int &index)
Get X Production vertex.
static bool GenEvent_to_HEPEVT(const GenEvent *evt)
Convert GenEvent to HEPEVT.
static int first_child(const int &index)
Get index of 1st daughter.
static int event_number()
Get event number.
static int status(const int &index)
Get status code.
static void set_parents(const int &index, const int &firstparent, const int &lastparent)
Set parents.
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 double px(const int &index)
Get X momentum.
static int first_parent(const int &index)
Get index of 1st mother.
static void set_children(const int &index, const int &firstchild, const int &lastchild)
Set children.
static int number_entries()
Get number of entries.
static int id(const int &index)
Get PDG particle id.
static void set_event_number(const int &evtno)
Set event number.
static int number_children(const int &index)
Get number of children from the range of daughters.
Fortran common block HEPEVT.
int jmohep[NMXHEP][2]
Pointer to position of 1st and 2nd (or last!) mother.
int isthep[NMXHEP]
Status code.
momentum_t phep[NMXHEP][5]
Momentum: px, py, pz, e, m.
momentum_t vhep[NMXHEP][4]
Time-space position: x, y, z, t.
int jdahep[NMXHEP][2]
Pointer to position of 1nd and 2nd (or last!) daughter.
int nhep
Number of entries in the event.