HepMC event record
WriterHEPEVTZEUS.cc
1 #include "WriterHEPEVTZEUS.h"
2 #include "HepMC/HEPEVT_Wrapper.h"
3 namespace HepMC
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 HepMC
static double py(int index)
Get Y momentum.
static int status(int index)
Get status code.
static double y(int index)
Get Y Production vertex.
static double e(int index)
Get Energy.
static double px(int index)
Get X momentum.
static double pz(int index)
Get Z momentum.
static int first_child(int index)
Get index of 1st daughter.
static double z(int index)
Get Z Production vertex.
void write_hepevt_event_header()
Write event header to file.
static double t(int index)
Get production time.
static int last_child(int index)
Get index of last daughter.
static double x(int index)
Get X Production vertex.
static int first_parent(int index)
Get index of 1st mother.
static int id(int index)
Get PDG particle id.
static double m(int index)
Get generated mass.
void write_hepevt_particle(int index, bool iflong)
Write particle to file.
static int number_entries()
Get number of entries.
static int last_parent(int index)
Get index of last mother.
Definition of template class SmartPointer.
FILE * m_file
File to write. Need to be public to be accessible by children.