Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:37

0001 
0002 #ifndef HEPMC3WRITER_H
0003 #define HEPMC3WRITER_H
0004 
0005 #include "inputParameters.h"
0006 #include "eXevent.h"
0007 #include  "HepMC3/WriterAscii.h"
0008 #include "HepMC3/FourVector.h"
0009 
0010 using HepMC3::WriterAscii;
0011 using HepMC3::FourVector;
0012 
0013 class hepMC3Writer
0014 {
0015 
0016  public:
0017   /** Default Constructor **/
0018   hepMC3Writer();
0019   ~hepMC3Writer();
0020   
0021   /** Init HepMC3 Writer with input parameters **/
0022   int initWriter(const inputParameters & param);
0023   
0024   /** Write an eX event to file  **/
0025   int writeEvent(const eXEvent &event, int eventnumber);
0026 
0027   /* closes file */
0028   void close(){ _hepmc3_output->close(); };
0029   
0030  private:
0031 
0032   /** Init HepMC3 Beam Four Vectors **/
0033   int initBeamHepMC3(const inputParameters &param);
0034   
0035   WriterAscii * _hepmc3_output;
0036   FourVector hepmc3_electronBeam_four_vector_;
0037   FourVector hepmc3_targetBeam_four_vector_;
0038   int electronBeam_pdg_id_;
0039   int targetBeam_pdg_id_;
0040   
0041 };
0042 
0043 #endif // HEPMC3WRITER_H