G4-DESCSS/include/PrimaryGeneratorAction.h

28 lines
630 B
C
Raw Normal View History

#ifndef DESCSS_PrimaryGeneratorAction_h
#define DESCSS_PrimaryGeneratorAction_h
2022-05-14 17:50:03 +08:00
#include "G4GeneralParticleSource.hh"
#include "G4ParticleGun.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4GeneralParticleSource;
class G4ParticleGun;
class G4Event;
template <typename T>
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
public:
PrimaryGeneratorAction();
~PrimaryGeneratorAction();
virtual void GeneratePrimaries(G4Event*);
const T* GetParticleGun() const { return fParticleGun; }
private:
G4String particleType;
T* fParticleGun = nullptr;
};
#endif