PH_HEPEVT_Interface.h

00001 #ifndef _PH_HEPEVT_Interface_included_
00002 #define _PH_HEPEVT_Interface_included_
00003 
00004 #include <vector>
00005 #include "PhotosBranch.h"
00006 #include "PhotosParticle.h"
00007 
00008 namespace Photospp
00009 {
00010 
00011 const static int NMXHEP = 10000;
00012 const static double NO_BOOST_THRESHOLD=1.0e-8;
00013 
00014 extern "C"
00015 {
00016         /** Definition of the PH_HEPEVT common block */
00017         extern struct
00018         {
00019                 int    nevhep;
00020                 int    nhep;
00021                 int    isthep[NMXHEP];
00022                 int    idhep[NMXHEP];
00023                 int    jmohep[NMXHEP][2];
00024                 int    jdahep[NMXHEP][2];
00025                 double phep[NMXHEP][5];
00026                 double vhep[NMXHEP][4];
00027                 //      COMMON/PH_HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
00028                 //  &JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
00029         } ph_hepevt_;
00030 
00031         extern struct
00032         { 
00033                 int qedrad[NMXHEP];
00034         } ph_phoqed_;
00035 
00036         /** Fortran debug routine */
00037         extern "C" void phodmp_();
00038 }
00039 
00040 class PH_HEPEVT_Interface
00041 {
00042 public:
00043         /** Convert PhotosBranch to HEPEVT */
00044         static int  set(PhotosBranch* branch);
00045 
00046         /** Update event record with data from HEPEVT */
00047         static void get();
00048 
00049         /** Prepare particles for processing */
00050         static void prepare();
00051 
00052         /** Check channel for complete matrix element calculation */
00053         static void check_ME_channel();
00054 
00055         /** Finalize processing */
00056         static void complete();
00057 
00058         /** Clear HEPEVT */
00059         static void clear();
00060 public:
00061         /** Index of decaying particle*/
00062         static int decay_idx;
00063         /** Number of channel to be used - flag for fortran routines */
00064         static int ME_channel;
00065 private:
00066         /** Add single particle to HEPEVT */
00067         static void add_particle(int i, PhotosParticle * particle,
00068                                  int first_mother, int last_mother,
00069                                  int first_daughter, int last_daughter);
00070 
00071         /** List of particles added to HEPEVT */
00072         static std::vector<PhotosParticle*> m_particle_list;
00073 };
00074 
00075 } // namespace Photospp
00076 #endif
Generated on Sun Oct 20 20:23:56 2013 for C++InterfacetoPHOTOS by  doxygen 1.6.3