PandaRoot
PhotosHEPEVTEvent.h
Go to the documentation of this file.
1 #ifndef _PhotosHEPEVTEvent_h_included_
2 #define _PhotosHEPEVTEvent_h_included_
3 
18 #include <iostream>
19 #include "PhotosEvent.h"
20 #include "PhotosParticle.h"
21 #include "PhotosHEPEVTParticle.h"
22 
23 namespace Photospp {
24 
25 // Uncomment this line to use interface to common block HEPEVT
26 // But first be sure about suitable for you value of NMXHEP
27 // and whether phep, vhep should be declared float or double
28 //#define USE_HEPEVT_INTERFACE
29 
30 #ifdef USE_HEPEVT_INTERFACE
31 
32 // Change this value to match HEPEVT size
33 const int NMXHEP = 10000;
34 
35 extern "C" struct {
36  int nevhep; // serial number
37  int nhep; // number of particles
38  int isthep[NMXHEP]; // status code
39  int idhep[NMXHEP]; // particle PDG ID
40  int jmohep[NMXHEP][2]; // parent particles
41  int jdahep[NMXHEP][2]; // childreen particles
42  double phep[NMXHEP][5]; // four-momentum, mass [GeV]
43  double vhep[NMXHEP][4]; // vertex [mm]
44 } hepevt_;
45 
46 #endif
47 
49 
51 
52  public:
55 
58 
61 
64 
66  void setParticle(int i, PhotosHEPEVTParticle *p);
67 
69  int getParticleCount();
70 
72  std::vector<PhotosParticle *> getParticleList();
73 
75  void print();
76 
78  void clear();
79 
80 #ifdef USE_HEPEVT_INTERFACE
81 
82  static void read_event_from_HEPEVT(PhotosHEPEVTEvent *evt);
83 
85  static void write_event_to_HEPEVT(PhotosHEPEVTEvent *evt);
86 #endif
87 
88  private:
90  std::vector<PhotosHEPEVTParticle *> particle_list;
91 };
92 
93 } // namespace Photospp
94 #endif
double vhep[NMXHEP][4]
int isthep[NMXHEP]
unsigned int i
Definition: P4_F32vec4.h:21
Definition: Log.h:30
static const int NMXHEP
int idhep[NMXHEP]
double phep[NMXHEP][5]
int jdahep[NMXHEP][2]
std::vector< PhotosParticle * > getParticleList()
void setParticle(int i, PhotosHEPEVTParticle *p)
void addParticle(PhotosHEPEVTParticle *p)
PhotosHEPEVTParticle * getParticle(int i)
Single particle of HEPEVT event record.
int jmohep[NMXHEP][2]