Mantid
Loading...
Searching...
No Matches
NeutronBk2BkExpConvPVoigt.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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
10#include "MantidCurveFitting/DllConfig.h"
11
12namespace Mantid {
13namespace CurveFitting {
14namespace Functions {
15
23class MANTID_CURVEFITTING_DLL NeutronBk2BkExpConvPVoigt : public API::IPowderDiffPeakFunction {
24
25public:
27
29 std::string name() const override { return "NeutronBk2BkExpConvPVoigt"; }
30
32 const std::string category() const override { return "General"; }
33
35 double getPeakParameter(const std::string &) override;
36
38 void calculateParameters(bool explicitoutput) const override;
39
41 void setParameter(size_t i, const double &value, bool explicitlySet = true) override;
42
44 void setParameter(const std::string &name, const double &value, bool explicitlySet = true) override;
45
47 // virtual void setHeight(const double h);
49 // virtual double height()const;
50
51 using IFunction1D::function;
52 void function(std::vector<double> &out, const std::vector<double> &xValues) const override;
53
55 void function1D(double *out, const double *xValues, const size_t nData) const override;
56
57private:
58 //----- Overwrite IFunction ------------------------------------------------
60 // void functionLocal(double* out, const double* xValues, const size_t
61 // nData)const;
63 // virtual void functionDerivLocal(API::Jacobian* out, const double* xValues,
64 // const size_t nData);
66 // virtual void functionDeriv(const API::FunctionDomain& domain,
67 // API::Jacobian& jacobian);
68
70 void init() override;
71
72private:
74 void calHandEta(double sigma2, double gamma, double &H, double &eta) const;
75
77 double calOmega(const double x, const double eta, const double N, const double alpha, const double beta,
78 const double H, const double sigma2, const double invert_sqrt2sigma,
79 const bool explicitoutput = false) const;
80
81 static int s_peakRadius;
82
84 /*
85 virtual void setCentre(const double c);
86 virtual void setFwhm(const double w);
87 */
88
89 //------------------------------------------ Variables
90 //--------------------------------------
91
93 mutable double m_Alpha;
94 mutable double m_Beta;
95 mutable double m_Sigma2;
96 mutable double m_Gamma;
97
99 // mutable double m_fwhm;
100
102 // mutable double m_centre;
103 // mutable double m_dcentre;
104
106 mutable double m_eta;
107 mutable double m_N;
108};
109
110} // namespace Functions
111} // namespace CurveFitting
112} // namespace Mantid
std::string name
Definition Run.cpp:60
double value
The value of the point.
Definition FitMW.cpp:51
An interface to a peak function, which extend the interface of IFunctionWithLocation by adding method...
NeutronBk2BkExpConvPVoigt : Back-to-back exponential function convoluted with pseudo-voigt for epithe...
static int s_peakRadius
Default value for the peak radius.
std::string name() const override
Overwrite IFunction base class method: name.
const std::string category() const override
Overwrite IFunction base class method: category.
double m_Alpha
Set 2 functions to be hidden from client.
Helper class which provides the Collimation Length for SANS instruments.