Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:30:43

0001 
0002 #ifndef _PFRICH_EPIC_PRIMARY_GENERATOR_
0003 #define _PFRICH_EPIC_PRIMARY_GENERATOR_
0004 
0005 #include "G4VUserPrimaryGeneratorAction.hh"
0006 #include "G4ParticleGun.hh"
0007 #include "Randomize.hh"
0008 #include "globals.hh"
0009 
0010 class G4Event;
0011 
0012 //#include <tuning.h>
0013 //#include <epic.h>
0014 
0015 #if defined(HEPMC3) 
0016 #include "HepMC3/ReaderAscii.h"
0017 #endif
0018 
0019 class EpicPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
0020 {
0021   public:
0022     EpicPrimaryGeneratorAction(const char *hepmc);
0023     ~EpicPrimaryGeneratorAction();
0024 
0025     void GeneratePrimaries(G4Event*);
0026 
0027   private:
0028     G4ParticleGun* fParticleGun;
0029 
0030 #if defined(HEPMC3) 
0031     HepMC3::ReaderAscii *m_hepmc_input;
0032 #endif
0033 
0034   double UniformRand(double from, double to) {
0035     return from + (to-from)*G4UniformRand();
0036   };
0037 };
0038 
0039 #endif