64 G4SingleParticleSource::part_prop_t::part_prop_t() {
75 NumberOfParticlesToBeGenerated = 1;
122 definition = aParticleDefinition;
130 if (definition == NULL) {
136 if (verbosityLevel > 1)
137 G4cout <<
" NumberOfParticlesToBeGenerated: "
138 <<NumberOfParticlesToBeGenerated <<
G4endl;
140 part_prop_t&
pp = ParticleProperties.
Get();
147 for (
G4int i = 0; i < NumberOfParticlesToBeGenerated; i++) {
149 pp.momentum_direction = angGenerator->
GenerateOne();
153 if (verbosityLevel >= 2)
154 G4cout <<
"Creating primaries and assigning to vertex" <<
G4endl;
166 if (verbosityLevel > 1) {
167 G4cout <<
"Particle name: "
171 G4cout <<
" Direction: " << pp.momentum_direction
185 if (verbosityLevel > 1)
static G4Geantino * GeantinoDefinition()
void SetBiasRndm(G4SPSRandomGenerator *a)
CLHEP::Hep3Vector G4ThreeVector
void SetVerbosity(G4int a)
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
#define G4MUTEXINIT(mutex)
const G4String & GetParticleName() const
void SetKineticEnergy(G4double eKin)
~G4SingleParticleSource()
G4GLOB_DLL std::ostream G4cout
G4ParticleMomentum GenerateOne()
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetMass(G4double mas)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GenerateOne(G4ParticleDefinition *)
void SetBiasRndm(G4SPSRandomGenerator *a)
G4double GetPDGMass() const
void SetPosDistribution(G4SPSPosDistribution *a)
void SetMomentumDirection(const G4ThreeVector &p)
G4double energy(const ThreeVector &p, const G4double m)
void SetWeight(G4double w)
void SetCharge(G4double chg)
void SetPrimary(G4PrimaryParticle *pp)
static constexpr double MeV
void GeneratePrimaryVertex(G4Event *evt)
void SetVerbosity(G4int a)
G4double GetPDGCharge() const
G4ThreeVector G4ParticleMomentum
#define G4MUTEXDESTROY(mutex)
void SetPolarization(const G4ThreeVector &pol)
G4ThreeVector GenerateOne()
void SetVerbosity(G4int a)