From ed3b18c4f50b6c5ef9ca37782b8fedba7fc7b2da Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 16 Nov 2019 11:32:59 +0100 Subject: [PATCH] Fixed theta distribtuion in integration of cross sections. --- src/mc_electron/sub_interaction_base.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mc_electron/sub_interaction_base.h b/src/mc_electron/sub_interaction_base.h index 975023e..7a1d99b 100644 --- a/src/mc_electron/sub_interaction_base.h +++ b/src/mc_electron/sub_interaction_base.h @@ -95,10 +95,10 @@ protected: } else { double v1_ms = sqrt(2*E_eV/mI_eV)*c_ms; auto integrand = [&](double theta) { - double E_eV = m_eV/2/pi * (pow(v1_ms,2) + pow(v_therm,2) - 2*v1_ms*v_therm*cos(theta)) * pow(c_ms, -2); + double E_eV = m_eV/2 * (pow(v1_ms,2) + pow(v_therm,2) - 2*v1_ms*v_therm*cos(theta)) * pow(c_ms, -2); return get_microSigma_m2(E_eV); }; - return integrate(integrand, 0., pi, 30, simpson()); + return integrate(integrand, 0., pi, 30, simpson())/pi; } } @@ -154,10 +154,10 @@ protected: double calc_microSigma_m2(const double &E_eV) { double v1_ms = sqrt(2*E_eV/m2_eV)*c_ms; auto integrand = [&](double theta) { - double E_eV = m_eV/2/pi * (pow(v1_ms,2) + pow(v_therm,2) - 2*v1_ms*v_therm*cos(theta)) * pow(c_ms, -2); + double E_eV = m_eV/2 * (pow(v1_ms,2) + pow(v_therm,2) - 2*v1_ms*v_therm*cos(theta)) * pow(c_ms, -2); return get_microSigma_m2(E_eV); }; - return integrate(integrand, 0., pi, 30, simpson()); + return integrate(integrand, 0., pi, 30, simpson())/pi; } }; @@ -195,10 +195,10 @@ protected: double calc_microSigma_divbyn_m2(const double &E_eV) { double v1_ms = sqrt(2*E_eV/m2_eV)*c_ms; auto integrand = [&](double theta) { - double E_eV = m_eV/2/pi * (pow(v1_ms,2) + pow(v_therm,2) - 2*v1_ms*v_therm*cos(theta)) * pow(c_ms, -2); + double E_eV = m_eV/2 * (pow(v1_ms,2) + pow(v_therm,2) - 2*v1_ms*v_therm*cos(theta)) * pow(c_ms, -2); return get_microSigma_divbyn_m2(E_eV); }; - return integrate(integrand, 0., pi, 30, simpson()); + return integrate(integrand, 0., pi, 30, simpson())/pi; } }; @@ -252,10 +252,10 @@ protected: return get_microSigma_m2(Ee_mids[Ee_bin]); // location is dummy again... } else { auto integrand = [&](double theta) { - double E_eV = m_eV/2/pi * (pow(v1_ms,2) + pow(v2_ms,2) - 2*v1_ms*v2_ms*cos(theta)) * pow(c_ms, -2); + double E_eV = m_eV/2 * (pow(v1_ms,2) + pow(v2_ms,2) - 2*v1_ms*v2_ms*cos(theta)) * pow(c_ms, -2); return get_microSigma_m2(E_eV); // location is dummy again... }; - return integrate(integrand, 0., pi, 30, simpson()); + return integrate(integrand, 0., pi, 30, simpson())/pi; } } };