G4-DESCSS/include/PrimaryGeneratorAction.h
2022-05-19 16:27:50 +08:00

27 lines
656 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();
virtual void GeneratePrimaries(G4Event*);
void DefineParticle(G4String particleType);
const G4ParticleGun* GetParticleGun() const { return fParticleGun; };
private:
G4String particleType = "NULL";
G4ParticleGun* fParticleGun = nullptr;
};
#endif