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:
@@ -20,6 +20,17 @@ class TritiumBetaDecay : public EnergyDistributionFunction {
|
|||||||
std::uniform_real_distribution<double> y_distribution_;
|
std::uniform_real_distribution<double> y_distribution_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TritiumBetaDecayIon : public EnergyDistributionFunction {
|
||||||
|
public:
|
||||||
|
TritiumBetaDecayIon(double endpoint_eV);
|
||||||
|
double rollEnergy(std::mt19937* engine);
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::function<double(double)> tritium_spectrum_, tritium_spectrum_ion_;
|
||||||
|
std::uniform_real_distribution<double> x_distribution_;
|
||||||
|
std::uniform_real_distribution<double> y_distribution_;
|
||||||
|
};
|
||||||
|
|
||||||
class MaxwellBoltzmann : public EnergyDistributionFunction {
|
class MaxwellBoltzmann : public EnergyDistributionFunction {
|
||||||
public:
|
public:
|
||||||
MaxwellBoltzmann(double temperature_K);
|
MaxwellBoltzmann(double temperature_K);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
std::function<double(double)> tritiumDecayEnergySpectrum(double prefactor);
|
std::function<double(double)> tritiumDecayEnergySpectrum(double prefactor);
|
||||||
|
std::function<double(double)> tritiumDecayEnergySpectrumIon(double endpoint);
|
||||||
|
|
||||||
|
|
||||||
#endif /* TRITIUM_SPECTRUM_H */
|
#endif /* TRITIUM_SPECTRUM_H */
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ std::shared_ptr<EnergyDistributionFunction> buildEnergyDistributionFunction(
|
|||||||
DEBUG_LEVEL_2("Creating energy distribution function: tritium beta decay.");
|
DEBUG_LEVEL_2("Creating energy distribution function: tritium beta decay.");
|
||||||
#endif
|
#endif
|
||||||
return std::shared_ptr<EnergyDistributionFunction>(new TritiumBetaDecay());
|
return std::shared_ptr<EnergyDistributionFunction>(new TritiumBetaDecay());
|
||||||
|
} 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"})) {
|
}else if (json_object_by_path(object, {"MaxwellBoltzmann"})) {
|
||||||
#ifdef debug_level2
|
#ifdef debug_level2
|
||||||
DEBUG_LEVEL_2("Creating energy distribution function: Maxwell Boltzmann.");
|
DEBUG_LEVEL_2("Creating energy distribution function: Maxwell Boltzmann.");
|
||||||
|
|||||||
@@ -27,6 +27,31 @@ double TritiumBetaDecay::rollEnergy(std::mt19937* engine) {
|
|||||||
return random_number_x;
|
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)
|
MaxwellBoltzmann::MaxwellBoltzmann(double temperature_K)
|
||||||
: distribution_(std::gamma_distribution<double>(
|
: distribution_(std::gamma_distribution<double>(
|
||||||
3. / 2.,
|
3. / 2.,
|
||||||
|
|||||||
@@ -33,3 +33,16 @@ std::function<double(double)> tritiumDecayEnergySpectrum(double prefactor) {
|
|||||||
(T2BetaDecay::E0_T - energy_eV)*(T2BetaDecay::E0_T - energy_eV) * prefactor;
|
(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