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)
G4ThreeVector G4ParticleMomentum
G4DLLIMPORT 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 GenerateOne(G4ParticleDefinition *)
void SetVerbosity(G4int a)
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetBiasRndm(G4SPSRandomGenerator *a)
void SetVerbosity(G4int a)
G4ThreeVector GenerateOne()
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
void GeneratePrimaryVertex(G4Event *evt)
~G4SingleParticleSource()