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.
48 lines
1.6 KiB
C++
Executable File
48 lines
1.6 KiB
C++
Executable File
#include "simulation/tritium_spectrum.h"
|
|
|
|
#include "constants/T2_beta_decay.h"
|
|
#include "constants/physical_constants.h"
|
|
#include "simulation/errors.h"
|
|
#include "simulation/kinematic.h"
|
|
|
|
std::function<double(double)> tritiumDecayEnergySpectrum(double prefactor) {
|
|
if (prefactor <= 0.) {
|
|
ERROR("Prefactor must be positive");
|
|
}
|
|
|
|
return [=](double energy_eV) {
|
|
if (energy_eV < 0.) {
|
|
ERROR("Beta decay spectrum not defined for negative energies.");
|
|
}
|
|
|
|
else if ((energy_eV == 0.) || (energy_eV > T2BetaDecay::E0_T)) {
|
|
return 0.;
|
|
}
|
|
|
|
const double Z = 2.0;
|
|
const double beta = kinematic::relativisticBeta(energy_eV, HEPunits::me);
|
|
const double p = kinematic::relativisticMomentum(energy_eV, HEPunits::me);
|
|
const double eta = 2.0 * M_PI * Z / (137.0 * beta);
|
|
const double fermi_function = eta / (1. - std::exp(-eta));
|
|
|
|
// return T2BetaDecay::spectrum_prefactor * fermi_function *
|
|
// (energy_eV + HEPunits::me) * p *
|
|
// std::pow(T2BetaDecay::E0_T - energy_eV, 2) * prefactor;
|
|
return T2BetaDecay::spectrum_prefactor * fermi_function *
|
|
(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;
|
|
};
|
|
} |