-
Notifications
You must be signed in to change notification settings - Fork 122
/
ThermalNeutronBk2BkExpSigma.h
52 lines (41 loc) · 1.79 KB
/
ThermalNeutronBk2BkExpSigma.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidAPI/IFunction1D.h"
#include "MantidAPI/ParamFunction.h"
#include "MantidCurveFitting/DllConfig.h"
#include "MantidKernel/System.h"
namespace Mantid {
namespace CurveFitting {
namespace Functions {
/** ThermalNeutronBk2BkExpSIGMA : Function to calculate Sigma of Bk2Bk
Exponential function from
Thermal Neutron Function's Sig0, Sig1, Sig2, Width and etc.
*/
class MANTID_CURVEFITTING_DLL ThermalNeutronBk2BkExpSigma : virtual public API::IFunction1D, public API::ParamFunction {
public:
/// Override
void function1D(double *out, const double *xValues, const size_t nData) const override;
/// overwrite IFunction base class methods
std::string name() const override { return "ThermalNeutronBk2BkExpSigma"; }
/// Overwrite IFunction
const std::string category() const override { return "General"; }
protected:
/// overwrite IFunction base class method, which declare function parameters
void init() override;
private:
/// Derivative
void functionDerivLocal(API::Jacobian *, const double *, const size_t);
/// Derivative to overwrite
void functionDeriv(const API::FunctionDomain &domain, API::Jacobian &jacobian) override;
/// Core function (inline) to calcualte TOF_h from d-spacing
inline double corefunction(double dh, double sig0sq, double sig1sq, double sig2sq) const;
};
using ThermalNeutronBk2BkExpSigma_sptr = std::shared_ptr<ThermalNeutronBk2BkExpSigma>;
} // namespace Functions
} // namespace CurveFitting
} // namespace Mantid