HepMC3 event record library
WriterHEPEVTZEUS.cc
1 #include "WriterHEPEVTZEUS.h"
3 namespace HepMC3
4 {
5 WriterHEPEVTZEUS::WriterHEPEVTZEUS(const std::string &filename):WriterHEPEVT(filename) {}
7 {
8  fprintf(m_file," E % 12i% 12i% 12i\n",HEPEVT_Wrapper::event_number(),0,HEPEVT_Wrapper::number_entries());
9 }
10  void WriterHEPEVTZEUS::write_hepevt_particle( int index, bool /*iflong*/ )
11 {
12  fprintf(m_file,"% 12i% 8i",HEPEVT_Wrapper::status(index), HEPEVT_Wrapper::id(index));
13  fprintf(m_file,"% 8i% 8i",HEPEVT_Wrapper::first_parent(index),HEPEVT_Wrapper::last_parent(index));
14  fprintf(m_file,"% 8i% 8i",HEPEVT_Wrapper::first_child(index),HEPEVT_Wrapper::last_child(index));
15  fprintf(m_file, "% 19.11E% 19.11E% 19.11E% 19.11E% 19.11E\n",HEPEVT_Wrapper::px(index),HEPEVT_Wrapper::py(index),HEPEVT_Wrapper::pz(index),HEPEVT_Wrapper::e(index),HEPEVT_Wrapper::m(index));
16  fprintf(m_file, "%-52s% 19.11E% 19.11E% 19.11E% 19.11E% 19.11E\n"," ",HEPEVT_Wrapper::x(index),HEPEVT_Wrapper::y(index),HEPEVT_Wrapper::z(index),HEPEVT_Wrapper::t(index),0.0);
17 }
18 }// namespace HepMC3
static double m(const int &index)
Get generated mass.
HepMC3 main namespace.
Definition: WriterDOT.h:19
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.
static double x(const int &index)
Get X Production vertex.
static double pz(const int &index)
Get Z momentum.
static double e(const int &index)
Get Energy.
void write_hepevt_particle(int index, bool iflong)
Write particle to file.
FILE * m_file
File to write. Need to be public to be accessible by children.
Definition: WriterHEPEVT.h:67
static double py(const int &index)
Get Y momentum.
static int first_child(const int &index)
Get index of 1st daughter.
static int id(const int &index)
Get PDG particle id.
static int first_parent(const int &index)
Get index of 1st mother.
static double px(const int &index)
Get X momentum.
static int last_parent(const int &index)
Get index of last mother.
void write_hepevt_event_header()
Write event header to file.
Definition of class HEPEVT_Wrapper.
static int number_entries()
Get number of entries.