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#include "MantidKernel/System.h"
12
13namespace Mantid {
14namespace CurveFitting {
15namespace Functions {
16
24class MANTID_CURVEFITTING_DLL NeutronBk2BkExpConvPVoigt : public API::IPowderDiffPeakFunction {
25
26public:
28
30 std::string name() const override { return "NeutronBk2BkExpConvPVoigt"; }
31
33 const std::string category() const override { return "General"; }
34
36 double getPeakParameter(const std::string &) override;
37
39 void calculateParameters(bool explicitoutput) const override;
40
42 void setParameter(size_t i, const double &value, bool explicitlySet = true) override;
43
45 void setParameter(const std::string &name, const double &value, bool explicitlySet = true) override;
46
48 // virtual void setHeight(const double h);
50 // virtual double height()const;
51
52 using IFunction1D::function;
53 void function(std::vector<double> &out, const std::vector<double> &xValues) const override;
54
56 void function1D(double *out, const double *xValues, const size_t nData) const override;
57
58private:
59 //----- Overwrite IFunction ------------------------------------------------
61 // void functionLocal(double* out, const double* xValues, const size_t
62 // nData)const;
64 // virtual void functionDerivLocal(API::Jacobian* out, const double* xValues,
65 // const size_t nData);
67 // virtual void functionDeriv(const API::FunctionDomain& domain,
68 // API::Jacobian& jacobian);
69
71 void init() override;
72
73private:
75 void calHandEta(double sigma2, double gamma, double &H, double &eta) const;
76
78 double calOmega(const double x, const double eta, const double N, const double alpha, const double beta,
79 const double H, const double sigma2, const double invert_sqrt2sigma,
80 const bool explicitoutput = false) const;
81
82 static int s_peakRadius;
83
85 /*
86 virtual void setCentre(const double c);
87 virtual void setFwhm(const double w);
88 */
89
90 //------------------------------------------ Variables
91 //--------------------------------------
92
94 mutable double m_Alpha;
95 mutable double m_Beta;
96 mutable double m_Sigma2;
97 mutable double m_Gamma;
98
100 // mutable double m_fwhm;
101
103 // mutable double m_centre;
104 // mutable double m_dcentre;
105
107 mutable double m_eta;
108 mutable double m_N;
109};
110
111} // namespace Functions
112} // namespace CurveFitting
113} // namespace Mantid
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.