Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
|
#include <G4FPYSamplingOps.hh>
Public Member Functions | |
G4FPYSamplingOps () | |
G4FPYSamplingOps (G4int Verbosity) | |
G4int | G4SampleIntegerGaussian (G4double Mean, G4double StdDev) |
G4int | G4SampleIntegerGaussian (G4double Mean, G4double StdDev, G4FFGEnumerations::GaussianRange Range) |
G4double | G4SampleGaussian (G4double Mean, G4double StdDev) |
G4double | G4SampleGaussian (G4double Mean, G4double StdDev, G4FFGEnumerations::GaussianRange Range) |
G4double | G4SampleUniform () |
G4double | G4SampleUniform (G4double Lower, G4double Upper) |
G4double | G4SampleWatt (G4int WhatIsotope, G4FFGEnumerations::FissionCause WhatCause, G4double WhatEnergy) |
void | G4SetVerbosity (G4int WhatVerbosity) |
~G4FPYSamplingOps () | |
Protected Member Functions | |
void | Initialize () |
G4bool | CheckAndSetParameters () |
void | EvaluateWattConstants () |
G4double | SampleGaussian () |
void | ShiftParameters (G4FFGEnumerations::GaussianReturnType Type) |
G4FPYSamplingOps performs all the uniform and Gaussian distribution sampling operations
Definition at line 51 of file G4FPYSamplingOps.hh.
G4FPYSamplingOps::G4FPYSamplingOps | ( | ) |
Default constructor
Definition at line 49 of file G4FPYSamplingOps.cc.
G4FPYSamplingOps::G4FPYSamplingOps | ( | G4int | Verbosity | ) |
Overloaded constructor
Verbosity:
Verbosity levelDefinition at line 58 of file G4FPYSamplingOps.cc.
G4FPYSamplingOps::~G4FPYSamplingOps | ( | ) |
Default deconstructor.
Definition at line 609 of file G4FPYSamplingOps.cc.
|
protected |
Check to see if the user requested parameters have already been calculated. If they have, it recalls the stored parameters and sets them as the current values.
Definition at line 308 of file G4FPYSamplingOps.cc.
Referenced by ShiftParameters().
|
protected |
Evaluates the constants that are required for the Watt fission spectrum sampling.
Definition at line 324 of file G4FPYSamplingOps.cc.
Referenced by G4SampleWatt().
Returns a double value taken from a Gaussian distribution about Mean
and with a standard deviation of StdDev
.
Mean:
Mean about which the Gaussian distribution will be sampledStdDev:
Standard deviation of the Gaussian distribution. 68.3% of the values will lie within the first standard deviation, 95.4% within the second standard deviation, etc...Definition at line 89 of file G4FPYSamplingOps.cc.
Referenced by G4FissionProductYieldDist::G4GetFission(), G4SampleGaussian(), G4FissionProductYieldDist::SampleAlphaEnergies(), and G4FissionProductYieldDist::SampleGammaEnergies().
G4double G4FPYSamplingOps::G4SampleGaussian | ( | G4double | Mean, |
G4double | StdDev, | ||
G4FFGEnumerations::GaussianRange | Range ) |
Returns a double value taken from a Gaussian distribution about Mean
and with a standard deviation of StdDev
.
Mean:
Mean about which the Gaussian distribution will be sampledStdDev:
Standard deviation of the Gaussian distribution. 68.3% of the values will lie within the first standard deviation, 95.4% within the second standard deviation, etc...Range:
POSITIVE
or ALL
Definition at line 109 of file G4FPYSamplingOps.cc.
Returns an integer value taken from a Gaussian distribution. This overloaded version assumes that the range is not restricted to positive values only.
Mean:
Mean about which the Gaussian distribution will be sampledStdDev:
Standard deviation of the Gaussian distribution. 68.3% of the values will lie within the first standard deviation, 95.4% within the second standard deviation, etc...Definition at line 153 of file G4FPYSamplingOps.cc.
Referenced by G4SampleIntegerGaussian(), G4FissionProductYieldDist::GenerateAlphas(), and G4FissionProductYieldDist::GenerateNeutrons().
G4int G4FPYSamplingOps::G4SampleIntegerGaussian | ( | G4double | Mean, |
G4double | StdDev, | ||
G4FFGEnumerations::GaussianRange | Range ) |
Returns an integer value taken from a Gaussian distribution about Mean
and with a standard deviation of StdDev
.
Mean:
Mean about which the Gaussian distribution will be sampledStdDev:
Standard deviation of the Gaussian distribution. 68.3% of the values will lie within the first standard deviation, 95.4% within the second standard deviation, etc...Range:
POSITIVE
or ALL
Definition at line 174 of file G4FPYSamplingOps.cc.
G4double G4FPYSamplingOps::G4SampleUniform | ( | ) |
Returns a double value evenly distributed in the range (0, 1].
Definition at line 229 of file G4FPYSamplingOps.cc.
Referenced by G4FissionProductYieldDist::G4GetFission(), G4FissionProductYieldDist::G4GetFissionProduct(), G4SampleUniform(), G4SampleWatt(), G4FissionProductYieldDist::GenerateAlphas(), G4FPYBiasedLightFragmentDist::GetFissionProduct(), G4FPYNormalFragmentDist::GetFissionProduct(), and SampleGaussian().
Returns a double value evenly distributed in the range (Lower
, Upper
].
Lower:
Lower bounds of the distributionUpper:
Upper bounds of the distributionDefinition at line 239 of file G4FPYSamplingOps.cc.
G4double G4FPYSamplingOps::G4SampleWatt | ( | G4int | WhatIsotope, |
G4FFGEnumerations::FissionCause | WhatCause, | ||
G4double | WhatEnergy ) |
Samples the Watt fission spectrum for the selected isotope, using an algorithm adopted from Ref. 1
WhatIsotope:
The isotope that is to be sampledWhatCause:
The cause of the isotope to be sampledWhatEnergy:
The energy, in MeV of the incident particleDefinition at line 253 of file G4FPYSamplingOps.cc.
Referenced by G4FissionProductYieldDist::SampleNeutronEnergies().
void G4FPYSamplingOps::G4SetVerbosity | ( | G4int | WhatVerbosity | ) |
Sets the verbosity levels
WhichVerbosity:
Combination of levelsSILENT:
All verbose output is repressedUPDATES:
Only high-level internal changes are reportedDAUGHTER_INFO:
Displays information about daughter product samplingNEUTRON_INFO:
Displays information about neutron samplingGAMMA_INFO:
Displays information about gamma samplingALPHA_INFO:
Displays information about alpha samplingMOMENTUM_INFO:
Displays information about momentum balancingEXTRAPOLATION_INTERPOLATION_INFO:
Displays information about any data extrapolation or interpolation that occursDEBUG:
Reports program flow as it steps through functionsPRINT_ALL:
Displays any and all output Definition at line 297 of file G4FPYSamplingOps.cc.
Referenced by G4FissionProductYieldDist::G4SetVerbosity().
|
protected |
Initialize is a common function called by all constructors.
Definition at line 67 of file G4FPYSamplingOps.cc.
Referenced by G4FPYSamplingOps(), and G4FPYSamplingOps().
|
protected |
Samples a Gaussian distribution defined by the internal class variables NewMean_ and NewStdDev_.
Definition at line 433 of file G4FPYSamplingOps.cc.
Referenced by G4SampleGaussian(), G4SampleGaussian(), G4SampleIntegerGaussian(), and G4SampleIntegerGaussian().
|
protected |
Sets the mean and standard deviation of the Gaussian distribution sampled by this class when POSITIVE
values are requested. ShiftMean() performs two different operations based on the requested data type.
INTEGER:
Iteratively searches for an adjusted mean that produces the same result as the mean requested by the implementor. In this instance the standard deviation is not adjusted.DOUBLE:
Adjusts the standard deviation of the Gaussian distribution so that the first seven standard deviations occur are all positive. The chance that a negative value will result using this method is 2.56E-12 Definition at line 467 of file G4FPYSamplingOps.cc.
Referenced by G4SampleGaussian(), and G4SampleIntegerGaussian().
|
protected |
Contains the first of the two paired random numbers from the Gaussian distribution sampling.
Definition at line 198 of file G4FPYSamplingOps.hh.
Referenced by Initialize(), and SampleGaussian().
|
protected |
Contains the second of the two paired random numbers from the Gaussian distribution sampling.
Definition at line 202 of file G4FPYSamplingOps.hh.
Referenced by Initialize(), and SampleGaussian().
|
protected |
Mean for sampling a Gaussian distribution
Definition at line 172 of file G4FPYSamplingOps.hh.
Referenced by CheckAndSetParameters(), G4SampleGaussian(), G4SampleGaussian(), G4SampleIntegerGaussian(), G4SampleIntegerGaussian(), Initialize(), SampleGaussian(), and ShiftParameters().
|
protected |
Declares whether the second paired random number has been already returned.
Definition at line 194 of file G4FPYSamplingOps.hh.
Referenced by G4SampleGaussian(), G4SampleIntegerGaussian(), Initialize(), SampleGaussian(), and ShiftParameters().
|
protected |
Pointer to the CLHEP random number generator.
Definition at line 188 of file G4FPYSamplingOps.hh.
Referenced by G4SampleUniform(), and Initialize().
|
protected |
Structure chain that contains the all the previous values used for sampling a Gaussian distribution
Definition at line 178 of file G4FPYSamplingOps.hh.
Referenced by CheckAndSetParameters(), G4SetVerbosity(), Initialize(), ShiftParameters(), and ~G4FPYSamplingOps().
|
protected |
Standard deviation for sampling a GaussianDistribution
Definition at line 174 of file G4FPYSamplingOps.hh.
Referenced by CheckAndSetParameters(), G4SampleGaussian(), G4SampleGaussian(), G4SampleIntegerGaussian(), G4SampleIntegerGaussian(), Initialize(), SampleGaussian(), and ShiftParameters().
|
protected |
Defines the tolerance that ShiftParameters() must match.
Definition at line 204 of file G4FPYSamplingOps.hh.
Referenced by Initialize(), and ShiftParameters().
|
protected |
Verbosity level
Definition at line 180 of file G4FPYSamplingOps.hh.
Referenced by G4FPYSamplingOps(), G4FPYSamplingOps(), and G4SetVerbosity().
|
protected |
Structure that contains the values for sampling the Watt fission spectrum
Definition at line 184 of file G4FPYSamplingOps.hh.
Referenced by EvaluateWattConstants(), G4SampleWatt(), Initialize(), and ~G4FPYSamplingOps().