G4-DESCSS/include/PrimaryGeneratorAction.h

27 lines
647 B
C
Raw Normal View History

#ifndef DESCSS_PrimaryGeneratorAction_h
#define DESCSS_PrimaryGeneratorAction_h
2022-05-18 22:28:11 +08:00
#include "G4ParticleDefinition.hh"
#include "G4ParticleGun.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
public:
PrimaryGeneratorAction();
~PrimaryGeneratorAction();
2022-05-18 22:28:11 +08:00
virtual void GeneratePrimaries(G4Event*);
2022-05-19 15:41:19 +08:00
void DefineParticle(G4String particleType);
const G4ParticleGun* GetParticleGun() const { return fParticleGun; };
private:
2022-05-19 15:41:19 +08:00
G4String particleType;
G4ParticleGun* fParticleGun = nullptr;
};
#endif