New energy distribution function to better approximate
the energy distribution of the ions created in the T2 beta decay; Does not take into account the distribution due to angular distribution nor the fact that that a dissociative decay is possible. Note: drawing the ion energy also draws a new electron energy, which, however, is discarded.
This commit is contained in:
@@ -15,8 +15,14 @@ std::shared_ptr<EnergyDistributionFunction> buildEnergyDistributionFunction(
|
||||
DEBUG_LEVEL_2("Creating energy distribution function: tritium beta decay.");
|
||||
#endif
|
||||
return std::shared_ptr<EnergyDistributionFunction>(new TritiumBetaDecay());
|
||||
|
||||
} else if (json_object_by_path(object, {"MaxwellBoltzmann"})) {
|
||||
} else if(json_object_by_path(object, {"TritiumBetaDecayIon"})) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating energy distribution function: tritium beta decay ion.");
|
||||
#endif
|
||||
double endpoint_eV = json_read_energy(json_object_by_path(object,
|
||||
{"TritiumBetaDecayIon", "MaxRecoilEnergy"}));
|
||||
return std::shared_ptr<EnergyDistributionFunction>(new TritiumBetaDecayIon(endpoint_eV));
|
||||
}else if (json_object_by_path(object, {"MaxwellBoltzmann"})) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating energy distribution function: Maxwell Boltzmann.");
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,31 @@ double TritiumBetaDecay::rollEnergy(std::mt19937* engine) {
|
||||
return random_number_x;
|
||||
}
|
||||
|
||||
// endpoint_eV is the recoil energy of the target species for an electron
|
||||
// energy at 18.6keV (i.e. the endpoint energy of the electron distribution)
|
||||
TritiumBetaDecayIon::TritiumBetaDecayIon(double endpoint_eV)
|
||||
: x_distribution_(
|
||||
std::uniform_real_distribution<double>(0., T2BetaDecay::E0_T)),
|
||||
y_distribution_(std::uniform_real_distribution<double>(
|
||||
0.,
|
||||
T2BetaDecay::spectrum_maximum)),
|
||||
tritium_spectrum_(tritiumDecayEnergySpectrum(1.)),
|
||||
tritium_spectrum_ion_(tritiumDecayEnergySpectrumIon(endpoint_eV)) {}
|
||||
|
||||
// due to not great structure, draw a(nother) electron energy to inject
|
||||
// the ion at the corresponding (approximated) energy
|
||||
double TritiumBetaDecayIon::rollEnergy(std::mt19937* engine) {
|
||||
double random_number_x;
|
||||
double random_number_y;
|
||||
double return_value;
|
||||
do {
|
||||
random_number_x = x_distribution_(*engine);
|
||||
random_number_y = y_distribution_(*engine);
|
||||
} while (random_number_y > tritium_spectrum_(random_number_x));
|
||||
|
||||
return tritium_spectrum_ion_(random_number_x);
|
||||
}
|
||||
|
||||
MaxwellBoltzmann::MaxwellBoltzmann(double temperature_K)
|
||||
: distribution_(std::gamma_distribution<double>(
|
||||
3. / 2.,
|
||||
|
||||
@@ -32,4 +32,17 @@ std::function<double(double)> tritiumDecayEnergySpectrum(double prefactor) {
|
||||
(energy_eV + HEPunits::me) * p *
|
||||
(T2BetaDecay::E0_T - energy_eV)*(T2BetaDecay::E0_T - energy_eV) * prefactor;
|
||||
};
|
||||
}
|
||||
|
||||
std::function<double(double)> tritiumDecayEnergySpectrumIon(double endpoint) {
|
||||
if (endpoint <= 0.) {
|
||||
ERROR("Endpoint energy must be positive");
|
||||
}
|
||||
|
||||
return [=](double energy_eV) {
|
||||
if (energy_eV < 0.) {
|
||||
ERROR("Beta decay spectrum (ion) not defined for negative energies.");
|
||||
}
|
||||
return energy_eV*endpoint/T2BetaDecay::E0_T;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user