#ifndef LGPrimaryGeneratorAction_h #define LGPrimaryGeneratorAction_h 1 #include "G4VUserPrimaryGeneratorAction.hh" #include "globals.hh" #include "G4ThreeVector.hh" #include "Randomize.hh" class G4ParticleGun; class G4Event; class LGPrimaryGeneratorMessenger; class LGPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction { public: LGPrimaryGeneratorAction(G4int); ~LGPrimaryGeneratorAction(); void GeneratePrimaries(G4Event* anEvent); G4ParticleGun* getGunPtr() { return particle_Gun; } G4double getParticleEnergy() { return particle_Energy; } G4double getPositionX() { return gun_Position.x(); } G4double getPositionY() { return gun_Position.y(); } void setParticleEnergy(G4double new_Value); void setGunPosition(G4ThreeVector new_Value); private: CLHEP::HepRandom RandGen; G4int RandomDir; G4ThreeVector gun_Position; G4ThreeVector momentum_Direction; G4ThreeVector particle_Polarization; G4double particle_Energy; G4ParticleGun* particle_Gun; LGPrimaryGeneratorMessenger* generator_Messenger; }; #endif /*LGPrimaryGeneratorAction_h*/