11#include <boost/math/special_functions/hermite.hpp>
27 declareParameter(
"A", 0.01,
"Amplitude");
28 declareParameter(
"X0", 0.2,
"Position of the centroid");
29 declareParameter(
"Sigma", 4,
"Std. Deviation of distribution");
30 declareParameter(
"C4", -0.005,
"Coefficient of 4th Hermite polynomial");
31 declareParameter(
"C6", -0.003,
"Coefficient of 6th Hermite polynomial");
32 declareParameter(
"C8", -0.002,
"Coefficient of 8th Hermite polynomial");
33 declareParameter(
"C10", -0.001,
"Coefficient of 10th Hermite polynomial");
34 declareParameter(
"Afse", 0.01,
"Ampliude of final-state effects term");
45 using boost::math::hermite;
61 const double root2Sigma = sqrt(2) *
sigma;
62 const double norm = 1 / (root2Sigma * sqrt(M_PI));
63 const double prefactorFSE = root2Sigma / 12.0;
65 for (
size_t i = 0; i <
n; ++i) {
66 const double z = (
x[i] - x0) / root2Sigma;
67 out[i] = amp * norm * exp(-
z *
z) *
68 (1 + c4 * hermite(4,
z) + c6 * hermite(6,
z) + c8 * hermite(8,
z) + c10 * hermite(10,
z)) +
69 ampFSE * norm * prefactorFSE * exp(-
z *
z) * hermite(3,
z);
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
double getParameter(size_t i) const override
Get i-th parameter.
Implements a Gram-Charlier A series expansion.
void function1D(double *out, const double *x, const size_t n) const override
GramCharlier::function1D Computes the value of the function.