Mantid
Loading...
Searching...
No Matches
InelasticDiffSphere.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9// Mantid Coding standars <http://www.mantidproject.org/Coding_Standards>
10// Mantid Headers from the same project
13// Mantid headers from other projects
15// 3rd party library headers (N/A)
16// standard library headers (N/A)
17
18namespace Mantid {
19namespace CurveFitting {
20namespace Functions {
27struct xnlc {
28 double x;
29 size_t n;
30 size_t l;
31};
32
35struct linearJ {
36 double slope;
37 double intercept;
38};
39
44class MANTID_CURVEFITTING_DLL InelasticDiffSphere : public FunctionQDepends {
45public:
47
49 void init() override;
50
52 std::string name() const override { return "InelasticDiffSphere"; }
53
55 const std::string category() const override { return "QuasiElastic"; }
56
58 std::vector<double> LorentzianCoefficients(double a) const;
59
60protected:
61 void function1D(double *out, const double *xValues, const size_t nData) const override;
62
63private:
65 void initXnlCoeff();
66
68 void initAlphaCoeff();
69
72 void initLinJlist();
73
75 void setWorkspace(std::shared_ptr<const API::Workspace> ws) override;
76
78 std::vector<xnlc> m_xnl;
79
81 std::vector<double> m_alpha;
82
84 size_t m_lmax;
85
87 double m_divZone;
88
90 double m_hbar;
91
93 std::vector<linearJ> m_linearJlist;
94
96 std::vector<double> m_qValueCache;
97
98}; // end of class InelasticDiffSphere
99
100} // namespace Functions
101} // namespace CurveFitting
102} // namespace Mantid
This is a specialization of IFunction1D for functions having the magnitude of the momentum transfer (...
Inelastic part of the DiffSphere function.
double m_divZone
linear interpolation zone around the numerical divergence of factor J
const std::string category() const override
overwrite IFunction base class methods
std::string name() const override
overwrite IFunction base class methods
double m_hbar
Plank's constant divided by , in units of meV*THz.
std::vector< double > m_alpha
certain coefficients invariant during fitting
std::vector< linearJ > m_linearJlist
list of linearized J values
std::vector< double > m_qValueCache
list of calculated Q values
Helper class which provides the Collimation Length for SANS instruments.
simple structure to hold a linear interpolation of factor J around its numerical divergence point
structure to hold info on Volino's coefficients