#include <G4GeneralParticleSource.hh>
Definition at line 58 of file G4GeneralParticleSource.hh.
◆ G4GeneralParticleSource()
G4GeneralParticleSource::G4GeneralParticleSource |
( |
| ) |
|
Definition at line 49 of file G4GeneralParticleSource.cc.
50{
52
53
54
55
56
57
59
60
61
63 static G4bool onlyOnce =
false;
64 if ( !onlyOnce )
65 {
67 IntensityNormalization();
68 onlyOnce = true;
69 }
70}
G4SingleParticleSource * GetCurrentSource(G4int idx)
static G4GeneralParticleSourceData * Instance()
static G4GeneralParticleSourceMessenger * GetInstance(G4GeneralParticleSource *)
void SetParticleGun(G4SingleParticleSource *fpg)
◆ ~G4GeneralParticleSource()
G4GeneralParticleSource::~G4GeneralParticleSource |
( |
| ) |
|
|
override |
◆ AddaSource()
void G4GeneralParticleSource::AddaSource |
( |
G4double |
aV | ) |
|
◆ ClearAll()
void G4GeneralParticleSource::ClearAll |
( |
| ) |
|
◆ DeleteaSource()
void G4GeneralParticleSource::DeleteaSource |
( |
G4int |
aV | ) |
|
◆ GeneratePrimaryVertex()
void G4GeneralParticleSource::GeneratePrimaryVertex |
( |
G4Event * |
evt | ) |
|
|
overridevirtual |
Implements G4VPrimaryGenerator.
Definition at line 180 of file G4GeneralParticleSource.cc.
181{
183 {
186 {
187
188 if (! normalised )
189 {
190
191
192
195 if (!norm)
196 {
197 IntensityNormalization();
198 }
199
200
203 }
207 {
210 }
211 else
212 {
215 }
216 }
218 }
219 else
220 {
222 {
224 }
225 }
226}
G4bool GetMultipleVertex() const
G4bool GetFlatSampling() const
G4double GetSourceProbability(G4int idx) const
void GeneratePrimaryVertex(G4Event *evt) override
◆ GetCurrentSource()
◆ GetCurrentSourceIndex()
G4int G4GeneralParticleSource::GetCurrentSourceIndex |
( |
| ) |
const |
|
inline |
◆ GetCurrentSourceIntensity()
G4double G4GeneralParticleSource::GetCurrentSourceIntensity |
( |
| ) |
const |
|
inline |
◆ GetNumberOfParticles()
G4int G4GeneralParticleSource::GetNumberOfParticles |
( |
| ) |
const |
|
inline |
◆ GetNumberofSource()
G4int G4GeneralParticleSource::GetNumberofSource |
( |
| ) |
|
|
inline |
◆ GetParticleDefinition()
◆ GetParticleEnergy()
G4double G4GeneralParticleSource::GetParticleEnergy |
( |
| ) |
const |
|
inline |
◆ GetParticleMomentumDirection()
G4ThreeVector G4GeneralParticleSource::GetParticleMomentumDirection |
( |
| ) |
const |
|
inline |
◆ GetParticlePolarization()
G4ThreeVector G4GeneralParticleSource::GetParticlePolarization |
( |
| ) |
const |
|
inline |
◆ GetParticlePosition()
G4ThreeVector G4GeneralParticleSource::GetParticlePosition |
( |
| ) |
const |
|
inline |
◆ GetParticleTime()
G4double G4GeneralParticleSource::GetParticleTime |
( |
| ) |
const |
|
inline |
◆ ListSource()
void G4GeneralParticleSource::ListSource |
( |
| ) |
|
Definition at line 96 of file G4GeneralParticleSource.cc.
97{
98 G4cout <<
"The number of particle sources is: "
104 {
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: "
125 }
126
127
129}
const G4String & GetParticleName() const
G4ThreeVector GetDirection()
const G4String & GetEnergyDisType()
const G4ThreeVector & GetCentreCoords() const
const G4String & GetPosDisType() const
const G4String & GetPosDisShape() const
G4SPSAngDistribution * GetAngDist() const
G4SPSEneDistribution * GetEneDist() const
G4SPSPosDistribution * GetPosDist() const
Referenced by G4GeneralParticleSourceMessenger::SetNewValue().
◆ SetCurrentSourceIntensity()
void G4GeneralParticleSource::SetCurrentSourceIntensity |
( |
G4double |
aV | ) |
|
◆ SetCurrentSourceto()
void G4GeneralParticleSource::SetCurrentSourceto |
( |
G4int |
aV | ) |
|
Definition at line 131 of file G4GeneralParticleSource.cc.
132{
134 if ( id < GPSData->GetIntensityVectorSize() )
135 {
136
137
139 }
140 else
141 {
143 msg << "Trying to set source to index " << aV << " but only "
145 G4Exception(
"G4GeneralParticleSoruce::SetCurrentSourceto",
"G4GPS004",
147 }
148}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
Referenced by G4GeneralParticleSourceMessenger::SetNewValue().
◆ SetFlatSampling()
void G4GeneralParticleSource::SetFlatSampling |
( |
G4bool |
av | ) |
|
|
inline |
◆ SetMultipleVertex()
void G4GeneralParticleSource::SetMultipleVertex |
( |
G4bool |
av | ) |
|
|
inline |
◆ SetNumberOfParticles()
void G4GeneralParticleSource::SetNumberOfParticles |
( |
G4int |
i | ) |
|
|
inline |
◆ SetParticleCharge()
void G4GeneralParticleSource::SetParticleCharge |
( |
G4double |
aCharge | ) |
|
|
inline |
◆ SetParticleDefinition()
◆ SetParticlePolarization()
void G4GeneralParticleSource::SetParticlePolarization |
( |
G4ThreeVector |
aVal | ) |
|
|
inline |
◆ SetParticleTime()
void G4GeneralParticleSource::SetParticleTime |
( |
G4double |
aTime | ) |
|
|
inline |
◆ SetVerbosity()
void G4GeneralParticleSource::SetVerbosity |
( |
G4int |
i | ) |
|
|
inline |
The documentation for this class was generated from the following files: