Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:18:22

0001 //
0002 // Assume that HEPMC3 input is not really needed here; 
0003 //
0004 
0005 #ifndef _PFRICH_SIMPLE_PRIMARY_GENERATOR_
0006 #define _PFRICH_SIMPLE_PRIMARY_GENERATOR_
0007 
0008 #include "G4VUserPrimaryGeneratorAction.hh"
0009 #include "G4ParticleGun.hh"
0010 
0011 #include "Randomize.hh"
0012 
0013 class G4Event;
0014 
0015 class SimplePrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
0016 {
0017   public:
0018   SimplePrimaryGeneratorAction(const char *hepmc);
0019     ~SimplePrimaryGeneratorAction();
0020 
0021     void GeneratePrimaries(G4Event*);
0022 
0023   private:
0024     G4ParticleGun* fParticleGun;
0025 
0026   double UniformRand(double from, double to) {
0027     return from + (to-from)*G4UniformRand();
0028   };
0029 };
0030 
0031 #endif