16using namespace CurveFitting;
18using namespace Kernel;
25 declareParameter(
"Lambda", 0.2,
"decay rate");
26 declareParameter(
"Omega", 0.5,
"angular frequency");
27 declareParameter(
"Beta", 1,
"exponent");
28 declareParameter(
"A", 1,
"Amplitude at 0");
36 const double sqrt3 = sqrt(3.0);
38 for (
size_t i = 0; i < nData; i++) {
39 double A1 = exp(-pow(
lambda * xValues[i], beta)) * A / 6;
40 double A2 = cos(sqrt3 * omega * xValues[i]);
41 double A3 = (1.0 - 1.0 / sqrt3) * cos(((3.0 - sqrt3) / 2.0) * omega * xValues[i]);
42 double A4 = (1.0 + 1.0 / sqrt3) * cos(((3.0 + sqrt3) / 2.0) * omega * xValues[i]);
44 out[i] = A1 * (3 + A2 + A3 + A4);
const std::vector< double > * lambda
#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.
Provide Muon F Interaction fitting function.
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.