50G4SingleParticleSource::part_prop_t::part_prop_t()
62 NumberOfParticlesToBeGenerated = 1;
105 definition = aParticleDefinition;
111 if (definition ==
nullptr)
117 if (verbosityLevel > 1)
119 G4cout <<
" NumberOfParticlesToBeGenerated: "
120 << NumberOfParticlesToBeGenerated <<
G4endl;
123 part_prop_t& pp = ParticleProperties.
Get();
131 for (
G4int i=0; i<NumberOfParticlesToBeGenerated; ++i)
134 pp.momentum_direction = angGenerator->
GenerateOne();
139 if (verbosityLevel >= 2)
141 G4cout <<
"Creating primaries and assigning to vertex" <<
G4endl;
155 if (verbosityLevel > 1)
160 G4cout <<
" Direction: " << pp.momentum_direction <<
G4endl;
182 if (verbosityLevel > 1)
G4ThreeVector G4ParticleMomentum
#define G4MUTEXDESTROY(mutex)
#define G4MUTEXINIT(mutex)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
static G4Geantino * GeantinoDefinition()
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
void SetCharge(G4double chg)
void SetPolarization(const G4ThreeVector &pol)
void SetKineticEnergy(G4double eKin)
void SetWeight(G4double w)
void SetMomentumDirection(const G4ThreeVector &p)
void SetMass(G4double mas)
void SetPrimary(G4PrimaryParticle *pp)
void SetPosDistribution(G4SPSPosDistribution *a)
G4ParticleMomentum GenerateOne()
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetVerbosity(G4int a)
G4double GetArbEneWeight(G4double)
G4double GenerateOne(G4ParticleDefinition *)
G4double GetWeight() const
void SetVerbosity(G4int a)
G4bool IfApplyEnergyWeight() const
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetVerbosity(G4int a)
G4ThreeVector GenerateOne()
G4double GetBiasWeight() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
void GeneratePrimaryVertex(G4Event *evt)
~G4SingleParticleSource()
G4double energy(const ThreeVector &p, const G4double m)