FairRoot/PandaRoot
3.52/src/eventRecordInterfaces/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 
26 // Uncomment this line to use interface to common block HEPEVT
27 // But first be sure about suitable for you value of NMXHEP
28 // and whether phep, vhep should be declared float or double
29 //#define USE_HEPEVT_INTERFACE
30 
31 #ifdef USE_HEPEVT_INTERFACE
32 
33 // Change this value to match HEPEVT size
34 const int NMXHEP = 10000;
35 
36 extern "C" struct {
37  int nevhep; // serial number
38  int nhep; // number of particles
39  int isthep[NMXHEP]; // status code
40  int idhep [NMXHEP]; // particle PDG ID
41  int jmohep[NMXHEP][2]; // parent particles
42  int jdahep[NMXHEP][2]; // childreen particles
43  double phep [NMXHEP][5]; // four-momentum, mass [GeV]
44  double vhep [NMXHEP][4]; // vertex [mm]
45 } hepevt_;
46 
47 #endif
48 
50 
51 class PhotosHEPEVTEvent : public PhotosEvent {
52 
53  public:
54 
57 
60 
63 
66 
68  void setParticle(int i, PhotosHEPEVTParticle *p);
69 
71  int getParticleCount();
72 
74  std::vector<PhotosParticle*> getParticleList();
75 
77  void print();
78 
80  void clear();
81 
82 #ifdef USE_HEPEVT_INTERFACE
83 
84  static void read_event_from_HEPEVT(PhotosHEPEVTEvent *evt);
85 
87  static void write_event_to_HEPEVT(PhotosHEPEVTEvent *evt);
88 #endif
89 
90  private:
91 
93  std::vector<PhotosHEPEVTParticle*> particle_list;
94 };
95 
96 } // namespace Photospp
97 #endif
98 
Double_t p
Definition: anasim.C:58
std::vector< PhotosParticle * > getParticleList()
double vhep[NMXHEP][4]
Int_t i
Definition: run_full.C:25
PhotosHEPEVTParticle * getParticle(int i)
int evt
Definition: checkhelixhit.C:36
int isthep[NMXHEP]
static const int NMXHEP
std::vector< PhotosHEPEVTParticle * > particle_list
int idhep[NMXHEP]
double phep[NMXHEP][5]
Abstract base class for containing the event information.
int jdahep[NMXHEP][2]
void setParticle(int i, PhotosHEPEVTParticle *p)
void addParticle(PhotosHEPEVTParticle *p)
Single particle of HEPEVT event record.
int jmohep[NMXHEP][2]