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 {
27class MANTID_CURVEFITTING_DLL IkedaCarpenterPV : virtual public API::IPeakFunction, virtual public API::IFunctionMW {
28public:
30 double centre() const override;
31 double height() const override;
32 double fwhm() const override;
33 void setCentre(const double c) override;
34 void setHeight(const double h) override;
35 void setFwhm(const double w) override;
36
38 std::string name() const override { return "IkedaCarpenterPV"; }
39 const std::string category() const override { return "Peak"; }
40
42 double intensity() const override;
43
44 void setMatrixWorkspace(std::shared_ptr<const API::MatrixWorkspace> workspace, size_t wi, double startX,
45 double endX) override;
46
47protected:
48 void functionLocal(double *out, const double *xValues, const size_t nData) const override;
49 void functionDerivLocal(API::Jacobian *out, const double *xValues, const size_t nData) override;
50 void functionDeriv(const API::FunctionDomain &domain, API::Jacobian &jacobian) override;
51
53 void init() override;
54
55private:
57 mutable std::vector<double> m_waveLength;
58
60 void constFunction(double *out, const double *xValues, const int &nData) const;
61
63 void calWavelengthAtEachDataPoint(const double *xValues, const size_t &nData) const;
64
66 void convertVoigtToPseudo(const double &voigtSigmaSq, const double &voigtGamma, double &H, double &eta) const;
67
69 void lowerConstraint0(const std::string &paramName);
70};
71
72} // namespace Functions
73} // namespace CurveFitting
74} // namespace Mantid
double height
Definition: GetAllEi.cpp:155
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
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...
Definition: IPeakFunction.h:51
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.