67 NumberOfParticlesToBeGenerated = 1;
71 particle_energy = 1.0 *
MeV;
72 particle_position = zero;
74 particle_polarization = zero;
75 particle_charge = 0.0;
76 particle_weight = 1.0;
104 G4cout <<
"Verbosity Set to: " << verbosityLevel <<
G4endl;
109 particle_definition = aParticleDefinition;
114 if (particle_definition == NULL)
117 if (verbosityLevel > 1)
118 G4cout <<
" NumberOfParticlesToBeGenerated: "
119 << NumberOfParticlesToBeGenerated <<
G4endl;
128 for (
G4int i = 0; i < NumberOfParticlesToBeGenerated; i++) {
130 particle_momentum_direction = angGenerator->
GenerateOne();
132 particle_energy = eneGenerator->
GenerateOne(particle_definition);
134 if (verbosityLevel >= 2)
135 G4cout <<
"Creating primaries and assigning to vertex" <<
G4endl;
145 particle_polarization.
y(),
146 particle_polarization.
z());
147 if (verbosityLevel > 1) {
148 G4cout <<
"Particle name: "
152 G4cout <<
" Direction: " << particle_momentum_direction
166 if (verbosityLevel > 1)
static G4Geantino * GeantinoDefinition()
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetVerbosity(G4int a)
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
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)
void SetWeight(G4double w)
void SetCharge(G4double chg)
void SetPrimary(G4PrimaryParticle *pp)
void GeneratePrimaryVertex(G4Event *evt)
void SetVerbosity(G4int a)
G4double GetPDGCharge() const
G4ThreeVector G4ParticleMomentum
void SetPolarization(const G4ThreeVector &pol)
G4ThreeVector GenerateOne()
void SetVerbosity(G4int a)