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
12
13namespace Mantid {
14namespace CurveFitting {
15namespace Functions {
22struct xnlc {
23 double x;
24 size_t n;
25 size_t l;
26};
27
30struct linearJ {
31 double slope;
32 double intercept;
33};
34
39class MANTID_CURVEFITTING_DLL InelasticDiffSphere : public FunctionQDepends {
40public:
42
44 void init() override;
45
47 std::string name() const override { return "InelasticDiffSphere"; }
48
50 const std::string category() const override { return "QuasiElastic"; }
51
53 std::vector<double> LorentzianCoefficients(double a) const;
54
55protected:
56 void function1D(double *out, const double *xValues, const size_t nData) const override;
57
58private:
60 void initXnlCoeff();
61
63 void initAlphaCoeff();
64
67 void initLinJlist();
68
70 void setWorkspace(std::shared_ptr<const API::Workspace> ws) override;
71
73 std::vector<xnlc> m_xnl;
74
76 std::vector<double> m_alpha;
77
79 size_t m_lmax;
80
82 double m_divZone;
83
85 double m_hbar;
86
88 std::vector<linearJ> m_linearJlist;
89
91 std::vector<double> m_qValueCache;
92
93}; // end of class InelasticDiffSphere
94
95} // namespace Functions
96} // namespace CurveFitting
97} // 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