25 "frustum with circular base",
26 {{
"Radius",
"nm",
"radius of base", 0, +
INF, 0},
27 {
"Height",
"nm",
"height", 0, +
INF, 0},
28 {
"Alpha",
"rad",
"angle between base and side", 0.,
M_PI_2, 0}}},
35 if (!std::isfinite(m_cot_alpha) || m_cot_alpha < 0)
36 throw std::runtime_error(
"pyramid angle alpha out of bounds");
37 if (m_cot_alpha * m_height > m_radius) {
38 std::ostringstream ostr;
39 ostr <<
"FormFactorCone() -> Error in class initialization ";
40 ostr <<
"with parameters radius:" << m_radius;
41 ostr <<
" m_height:" << m_height;
42 ostr <<
" alpha[rad]:" << m_alpha <<
"\n\n";
43 ostr <<
"Check for 'height <= radius*tan(alpha)' failed.";
44 throw std::runtime_error(ostr.str());
65 if (std::abs(
m_q.
mag()) < std::numeric_limits<double>::epsilon()) {
69 return M_PI * R * R * H;
72 return M_PI / 3. * (R * R * H + (R * R - R2 * R2) * (apex_height - H));
Defines Bessel functions in namespace Math.
std::complex< double > complex_t
complex_t exp_I(complex_t z)
Returns exp(I*z), where I is the imaginary unit.
Defines M_PI and some more mathematical constants.
Defines class DoubleEllipse.
Defines functions in namespace Math.
Defines classes RealIntegrator, ComplexIntegrator.
double mag() const
Returns magnitude of the vector.
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.
To integrate a complex function of a real variable.
complex_t integrate(const std::function< complex_t(double)> &f, double lmin, double lmax)
Abstract base class for Born form factors.
std::unique_ptr< IShape3D > m_shape3D
IShape3D object, used to retrieve vertices (which may be approximate in the case of round shapes).
static SlicingEffects computeSlicingEffects(ZLimits limits, const kvector_t &position, double height)
Helper method for slicing.
Abstract base class for rotations.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
double J1c(double x)
Bessel function J1(x)/x.
double cot(double x)
cotangent function: