Mantid
Loading...
Searching...
No Matches
GramCharlierComptonProfile.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
9#include "MantidCurveFitting/DllConfig.h"
11
12namespace Mantid {
13namespace CurveFitting {
14namespace Functions {
22class MANTID_CURVEFITTING_DLL GramCharlierComptonProfile : public ComptonProfile {
23public:
26
27private:
29 std::string name() const override;
31 void declareParameters() override;
33 void declareAttributes() override;
35 void setAttribute(const std::string &name, const Attribute &value) override;
37 void setHermiteCoefficients(const std::string &coeffs);
39 void declareGramCharlierParameters();
40
42 std::vector<size_t> intensityParameterIndices() const override;
44 size_t fillConstraintMatrix(Kernel::DblMatrix &cmatrix, const size_t start,
45 const HistogramData::HistogramE &errors) const override;
47 void massProfile(double *result, const size_t nData) const override;
50 void addMassProfile(double *result, const unsigned int npoly) const;
51
53 void addFSETerm(std::vector<double> &lhs) const;
55 void convoluteVoigt(double *result, const size_t nData, const std::vector<double> &profile) const;
57 void setMatrixWorkspace(std::shared_ptr<const API::MatrixWorkspace> workspace, size_t wi, double startX,
58 double endX) override;
60 void cacheYSpaceValues(const HistogramData::Points &tseconds, const Algorithms::DetectorParams &detpar) override;
61
63 std::vector<short> m_hermite;
65 std::vector<double> m_yfine;
67 std::vector<double> m_qfine;
68
71 std::vector<std::vector<double>> m_voigt;
74 mutable std::vector<double> m_voigtProfile;
75
78};
79
80} // namespace Functions
81} // namespace CurveFitting
82} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
This class serves as a base-class for ComptonProfile type functions.
Implements a function to calculate the Compton profile of a nucleus using a Gram-Charlier approximati...
std::vector< double > m_qfine
Interpolated Q values over a finer Y range.
std::vector< double > m_yfine
Y values over a finer range.
std::vector< double > m_voigtProfile
Holds the result Voigt multiplied by the profile function for the extended Y space range.
bool m_userFixedFSE
Flag to hold whether the FSE parameter is fixed by the user.
std::vector< short > m_hermite
The active hermite coefficents.
std::vector< std::vector< double > > m_voigt
Holds the value of the Voigt function for each coarse y-space point as this is an expensive calculati...
Helper class which provides the Collimation Length for SANS instruments.
Simple data structure to store nominal detector values It avoids some functions taking a huge number ...