6 #ifndef HEPMC3_HEPEVT_WRAPPER_H
7 #define HEPMC3_HEPEVT_WRAPPER_H
24 #ifndef HEPMC3_HEPEVT_NMXHEP
26 #define HEPMC3_HEPEVT_NMXHEP 10000
29 #ifndef HEPMC3_HEPEVT_PRECISION
31 #define HEPMC3_HEPEVT_PRECISION double
71 #ifndef HEPEVT_WRAPPER_HEADER_ONLY
78 #ifndef NO_DECLSPEC_hepevtptr
81 #define DECLSPEC_hepevtptr __declspec(dllexport)
83 #define DECLSPEC_hepevtptr __declspec(dllimport)
86 #define NO_DECLSPEC_hepevtptr
90 #ifdef NO_DECLSPEC_hepevtptr
106 static void print_hepevt( std::ostream& ostr = std::cout );
117 #ifndef HEPEVT_WRAPPER_HEADER_ONLY
156 static void set_parents(
const int& index,
const int& firstparent,
const int& lastparent );
157 static void set_children(
const int& index,
const int& firstchild,
const int& lastchild );
158 static void set_momentum(
const int& index,
const double&
px,
const double&
py,
const double&
pz,
const double&
e );
159 static void set_mass(
const int& index,
double mass );
160 static void set_position(
const int& index,
const double&
x,
const double&
y,
const double&
z,
const double&
t );
169 ostr<<
" Nr Type Parent(s) Daughter(s) Px Py Pz E Inv. M." << std::endl;
188 ostr << buf << std::endl;
static double m(const int &index)
Get generated mass.
static int number_children_exact(const int &index)
Get number of children by counting.
static int last_child(const int &index)
Get index of last daughter.
static double z(const int &index)
Get Z Production vertex.
static double y(const int &index)
Get Y Production vertex.
static double t(const int &index)
Get production time.
static int status(const int &index)
Get status code.
static int event_number()
Get event number.
int nhep
Number of entries in the event.
static double x(const int &index)
Get X Production vertex.
#define HEPMC3_HEPEVT_NMXHEP
static const int NMXHEP
Number of particles in the HEPEVT structure.
static void set_mass(const int &index, double mass)
Set mass.
static double pz(const int &index)
Get Z momentum.
static void set_children(const int &index, const int &firstchild, const int &lastchild)
Set children.
momentum_t phep[NMXHEP][5]
Momentum: px, py, pz, e, m.
static double e(const int &index)
Get Energy.
struct HEPEVT * hepevtptr
This is a pointer to HEPEVT common block.
momentum_t vhep[NMXHEP][4]
Time-space position: x, y, z, t.
static int number_parents(const int &index)
Get number of parents.
static void set_hepevt_address(char *c)
Set Fortran block address.
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 void set_parents(const int &index, const int &firstparent, const int &lastparent)
Set parents.
static void set_id(const int &index, const int &id)
Set PDG particle id.
HEPMC3_HEPEVT_PRECISION momentum_t
Precision of the 4-momentum, time-space position and mass.
static bool fix_daughters()
Tries to fix list of daughters.
Stores event-related information.
static void print_hepevt(std::ostream &ostr=std::cout)
Print information from HEPEVT common block.
static void zero_everything()
Check for problems with HEPEVT common block.
static double py(const int &index)
Get Y momentum.
Fortran common block HEPEVT.
static int first_child(const int &index)
Get index of 1st daughter.
static void set_number_entries(const int &noentries)
Set number of entries.
static bool HEPEVT_to_GenEvent(GenEvent *evt)
Convert HEPEVT to GenEvent.
An interface to HEPEVT common block.
static int id(const int &index)
Get PDG particle id.
static int number_children(const int &index)
Get number of children from the range of daughters.
static void set_event_number(const int &evtno)
Set event number.
int jmohep[NMXHEP][2]
Pointer to position of 1st and 2nd (or last!) mother.
static bool GenEvent_to_HEPEVT(const GenEvent *evt)
Convert GenEvent to HEPEVT.
static int first_parent(const int &index)
Get index of 1st mother.
static double px(const int &index)
Get X momentum.
int isthep[NMXHEP]
Status code.
static void set_status(const int &index, const int &status)
Set status code.
Definition of class GenEvent.
static int last_parent(const int &index)
Get index of last mother.
int jdahep[NMXHEP][2]
Pointer to position of 1nd and 2nd (or last!) daughter.
static void print_hepevt_particle(int index, std::ostream &ostr=std::cout)
Print particle information.
static void set_momentum(const int &index, const double &px, const double &py, const double &pz, const double &e)
Set 4-momentum.
#define HEPMC3_HEPEVT_PRECISION
static int number_entries()
Get number of entries.
static int max_number_entries()
Block size.