20 FormFactorGaussSphere::FormFactorGaussSphere(
const std::vector<double> P)
23 {{
"MeanRadius",
"nm",
"para_tooltip", 0, +INF, 0}}},
30 FormFactorGaussSphere::FormFactorGaussSphere(
double mean_radius)
37 const double max_ql = std::sqrt(-4 * M_PI * std::log(std::numeric_limits<double>::min()) / 3);
39 double qzh = q.
z().real() * m_mean_radius;
40 if (std::abs(qzh) > max_ql)
42 double qxr = q.
x().real() * m_mean_radius;
43 if (std::abs(qxr) > max_ql)
45 double qyr = q.
y().real() * m_mean_radius;
46 if (std::abs(qyr) > max_ql)
49 return pow(m_mean_radius, 3) * std::exp(-(qxr * qxr + qyr * qyr + qzh * qzh) / 4.0 / M_PI);
Defines M_PI and some more mathematical constants.
T z() const
Returns z-component in cartesian coordinate system.
T y() const
Returns y-component in cartesian coordinate system.
T x() const
Returns x-component in cartesian coordinate system.