Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:20:26

0001 #ifndef _PhotosHEPEVTEvent_h_included_
0002 #define _PhotosHEPEVTEvent_h_included_
0003 
0004 /**
0005  * @class PhotosHEPEVTParticle
0006  *
0007  * @brief Single particle of HEPEVT event record
0008  *
0009  * This class implements the virtual methods of
0010  * PhotosEvent. In this way it provides an
0011  * interface between the generic PhotosEvent class
0012  * and information stored in HEPEVT event record.
0013  *
0014  * @author Tomasz Przedzinski
0015  * @date 24 November 2011
0016  */
0017 
0018 #include <iostream>
0019 #include "PhotosEvent.h"
0020 #include "PhotosParticle.h"
0021 #include "PhotosHEPEVTParticle.h"
0022 
0023 namespace Photospp
0024 {
0025 
0026 class PhotosHEPEVTParticle;
0027 
0028 class PhotosHEPEVTEvent : public PhotosEvent {
0029 
0030  public:
0031 
0032   /** Default destructor */
0033   ~PhotosHEPEVTEvent();
0034 
0035   /** Default constructor */
0036   PhotosHEPEVTEvent();
0037 
0038   /** Add particle at the end of event record */
0039   void addParticle(PhotosHEPEVTParticle *p);
0040 
0041   /** Get particle at index 'i' */
0042   PhotosHEPEVTParticle *getParticle(int i);
0043 
0044   /** Set particle at index 'i' */
0045   void setParticle(int i, PhotosHEPEVTParticle *p);
0046 
0047   /** Get higher-most index of the particles in event (nhep) */
0048   int getParticleCount();
0049 
0050   /** Get an unfiltered list of particles from the event record */
0051   std::vector<PhotosParticle*> getParticleList();
0052 
0053   /** Print out list of particles in the event */
0054   void print();
0055   
0056   /** Remove all particles from the event */
0057   void clear();
0058 
0059   /** Fill PhotosHEPEVTEvent from HEPEVT common block */
0060   static void read_event_from_HEPEVT(PhotosHEPEVTEvent *evt);
0061   
0062   /** Write to HEPEVT common block content of PhotosHEPEVTEvent */
0063   static void write_event_to_HEPEVT(PhotosHEPEVTEvent *evt);
0064 
0065  private:
0066 
0067   /** List of all particles */
0068   std::vector<PhotosHEPEVTParticle*> particle_list;
0069 };
0070 
0071 } // namespace Photospp
0072 #endif
0073