Mantid
Loading...
Searching...
No Matches
IkedaCarpenterPV.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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
14#include "MantidCurveFitting/DllConfig.h"
15
16namespace Mantid {
17namespace CurveFitting {
18namespace Functions {
26class MANTID_CURVEFITTING_DLL IkedaCarpenterPV : virtual public API::IPeakFunction, virtual public API::IFunctionMW {
27public:
29 double centre() const override;
30 double height() const override;
31 double fwhm() const override;
32 void setCentre(const double c) override;
33 void setHeight(const double h) override;
34 void setFwhm(const double w) override;
35
37 std::string name() const override { return "IkedaCarpenterPV"; }
38 const std::string category() const override { return "Peak"; }
39
41 double intensity() const override;
42
43 void setMatrixWorkspace(std::shared_ptr<const API::MatrixWorkspace> workspace, size_t wi, double startX,
44 double endX) override;
45
46protected:
47 void functionLocal(double *out, const double *xValues, const size_t nData) const override;
48 void functionDerivLocal(API::Jacobian *out, const double *xValues, const size_t nData) override;
49 void functionDeriv(const API::FunctionDomain &domain, API::Jacobian &jacobian) override;
50
52 void init() override;
53
54private:
56 mutable std::vector<double> m_waveLength;
57
59 void constFunction(double *out, const double *xValues, const int &nData) const;
60
62 void calWavelengthAtEachDataPoint(const double *xValues, const size_t &nData) const;
63
65 void convertVoigtToPseudo(const double &voigtSigmaSq, const double &voigtGamma, double &H, double &eta) const;
66
68 void lowerConstraint0(const std::string &paramName);
69};
70
71} // namespace Functions
72} // namespace CurveFitting
73} // namespace Mantid
double height
Definition GetAllEi.cpp:155
IPeaksWorkspace_sptr workspace
Base class that represents the domain of a function.
This is a specialization of IFunction for functions defined on a MatrixWorkspace.
Definition IFunctionMW.h:30
An interface to a peak function, which extend the interface of IFunctionWithLocation by adding method...
Represents the Jacobian in IFitFunction::functionDeriv.
Definition Jacobian.h:22
Provide Ikeda-Carpenter-pseudo-Voigt peak shape function interface to IPeakFunction.
std::vector< double > m_waveLength
container for storing wavelength values for each data point
const std::string category() const override
The categories the Fit function belong to.
std::string name() const override
overwrite IFunction base class methods
Helper class which provides the Collimation Length for SANS instruments.