Fixed Bug:

Forgot Theta distributino function in integration
This commit is contained in:
Christian
2019-11-15 19:17:06 +01:00
parent 2b894eaf02
commit c920a0ef98
+4 -4
View File
@@ -95,7 +95,7 @@ protected:
} else {
double v1_ms = sqrt(2*E_eV/mI_eV)*c_ms;
auto integrand = [&](double theta) {
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);
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);
return get_microSigma_m2(E_eV);
};
return integrate(integrand, 0., pi, 30, simpson());
@@ -154,7 +154,7 @@ 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 * (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/pi * (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());
@@ -195,7 +195,7 @@ 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 * (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/pi * (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());
@@ -252,7 +252,7 @@ protected:
return get_microSigma_m2(Ee_mids[Ee_bin]); // location is dummy again...
} else {
auto integrand = [&](double theta) {
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);
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);
return get_microSigma_m2(E_eV); // location is dummy again...
};
return integrate(integrand, 0., pi, 30, simpson());