reduction of std::pow calls; stronger usage of

Cartesian- and CylinderCoordinate objects
This commit is contained in:
2025-06-02 11:09:57 +02:00
parent f510d0a39a
commit d6578e540d
19 changed files with 120 additions and 77 deletions
+4 -1
View File
@@ -25,8 +25,11 @@ std::function<double(double)> tritiumDecayEnergySpectrum(double prefactor) {
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 *
std::pow(T2BetaDecay::E0_T - energy_eV, 2) * prefactor;
(T2BetaDecay::E0_T - energy_eV)*(T2BetaDecay::E0_T - energy_eV) * prefactor;
};
}