53 fUserPrimaryAction = 0;
54 fFirstPartOfBline =
true;
67 if (!fUserPrimaryAction)
69 G4Exception(
"G4BlinePrimaryGeneratorAction::GeneratePrimaries()",
71 "Primary generator action not defined !");
79 if (fFirstPartOfBline)
89 fFirstPartOfBline =
false;
100 G4double pmom = std::sqrt(energy*energy-mass*mass);
G4ThreeVector GetPosition() const
G4BlinePrimaryGeneratorAction()
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
static G4ChargedGeantino * ChargedGeantino()
void SetMass(G4double mas)
G4PrimaryVertex * GetPrimaryVertex(G4int i=0) const
Definition of the G4BlinePrimaryGeneratorAction class.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual ~G4BlinePrimaryGeneratorAction()
virtual void GeneratePrimaries(G4Event *anEvent)=0
G4double GetPDGMass() const
G4double energy(const ThreeVector &p, const G4double m)
void SetCharge(G4double chg)
void SetPrimary(G4PrimaryParticle *pp)
static constexpr double MeV
virtual void GeneratePrimaries(G4Event *anEvent)
G4double GetPDGCharge() const