63 static G4bool onlyOnce =
false;
67 IntensityNormalization();
85 IntensityNormalization();
90void G4GeneralParticleSource::IntensityNormalization()
98 G4cout <<
"The number of particle sources is: "
105 G4cout <<
"\tsource " << i <<
" with intensity: "
109 <<
"; Particle type: "
113 G4cout <<
" \t\tDirection: "
117 G4cout <<
" \t\tAngular Distribution: "
119 G4cout <<
" \t\tEnergy Distribution: "
121 G4cout <<
" \t\tPosition Distribution Type: "
123 G4cout <<
"; Position Shape: "
134 if ( id < GPSData->GetIntensityVectorSize() )
143 msg <<
"Trying to set source to index " << aV <<
" but only "
145 G4Exception(
"G4GeneralParticleSoruce::SetCurrentSourceto",
"G4GPS004",
167 if ( id <= GPSData->GetIntensityVectorSize() )
175 G4cout <<
" it shall be <= "
197 IntensityNormalization();
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
void SetCurrentSourceIntensity(G4double)
G4int GetCurrentSourceIdx() const
G4SingleParticleSource * GetCurrentSource(G4int idx)
G4bool GetMultipleVertex() const
G4bool Normalised() const
G4int GetIntensityVectorSize() const
void AddASource(G4double intensity)
G4bool GetFlatSampling() const
void DeleteASource(G4int idx)
G4double GetSourceProbability(G4int idx) const
void IntensityNormalise()
G4double GetIntensity(G4int idx) const
static G4GeneralParticleSourceData * Instance()
static G4GeneralParticleSourceMessenger * GetInstance(G4GeneralParticleSource *)
void SetParticleGun(G4SingleParticleSource *fpg)
~G4GeneralParticleSource()
void AddaSource(G4double)
void SetCurrentSourceIntensity(G4double)
void GeneratePrimaryVertex(G4Event *)
void SetCurrentSourceto(G4int)
void DeleteaSource(G4int)
G4GeneralParticleSource()
const G4String & GetParticleName() const
G4ThreeVector GetDirection()
const G4String & GetEnergyDisType()
const G4ThreeVector & GetCentreCoords() const
const G4String & GetPosDisType() const
const G4String & GetPosDisShape() const
G4int GetNumberOfParticles() const
G4SPSAngDistribution * GetAngDist() const
void GeneratePrimaryVertex(G4Event *evt)
G4double GetParticleEnergy() const
G4SPSEneDistribution * GetEneDist() const
G4ParticleDefinition * GetParticleDefinition() const
G4SPSPosDistribution * GetPosDist() const