2022-05-09 00:31:02 +08:00
|
|
|
#ifndef DESCSS_PrimaryGeneratorAction_h
|
|
|
|
#define DESCSS_PrimaryGeneratorAction_h
|
|
|
|
|
2022-05-16 18:08:47 +08:00
|
|
|
#include "G4ParticleGun.hh"
|
2022-05-09 00:31:02 +08:00
|
|
|
#include "G4VUserPrimaryGeneratorAction.hh"
|
|
|
|
#include "globals.hh"
|
|
|
|
|
|
|
|
class G4ParticleGun;
|
|
|
|
class G4Event;
|
|
|
|
|
2022-05-17 00:34:06 +08:00
|
|
|
extern G4String particleType;
|
|
|
|
|
2022-05-09 00:31:02 +08:00
|
|
|
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
|
|
|
|
public:
|
|
|
|
PrimaryGeneratorAction();
|
2022-05-16 18:08:47 +08:00
|
|
|
|
2022-05-09 00:31:02 +08:00
|
|
|
~PrimaryGeneratorAction();
|
|
|
|
virtual void GeneratePrimaries(G4Event*);
|
2022-05-17 22:22:18 +08:00
|
|
|
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
|
2022-05-09 00:31:02 +08:00
|
|
|
|
|
|
|
private:
|
2022-05-17 22:22:18 +08:00
|
|
|
G4ParticleGun* fParticleGun = nullptr;
|
2022-05-09 00:31:02 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|