G4-DESCSS/include/PrimaryGeneratorAction.h
2022-05-18 22:28:11 +08:00

28 lines
662 B
C++

#ifndef DESCSS_PrimaryGeneratorAction_h
#define DESCSS_PrimaryGeneratorAction_h
#include "G4ParticleDefinition.hh"
#include "G4ParticleGun.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
public:
PrimaryGeneratorAction();
~PrimaryGeneratorAction();
G4ParticleDefinition* DefineParticle();
virtual void GeneratePrimaries(G4Event*);
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
private:
G4int Z;
G4String particleType = "TE";
G4ParticleGun* fParticleGun = nullptr;
};
#endif