// MyPrimaryGenerator, inherits from G4VUserPrimaryGeneratorAction and is responsible // for defining how primary particles are generated in your simulation. #ifndef GENERATOR_HH #define GENERATOR_HH #include "G4VUserPrimaryGeneratorAction.hh" #include "G4ParticleGun.hh" #include "G4SystemOfUnits.hh" #include "G4ParticleTable.hh" class MyPrimaryGenerator : public G4VUserPrimaryGeneratorAction { public: MyPrimaryGenerator(); ~MyPrimaryGenerator(); virtual void GeneratePrimaries(G4Event*) ; //declares a variable fParticleGun, which is a pointer to G4ParticleGun object private: G4ParticleGun *fParticleGun; }; #endif