Mantid
Loading...
Searching...
No Matches
ComptonScatteringCountRate.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
11#include "MantidKernel/Matrix.h"
12
13namespace Mantid {
14namespace CurveFitting {
15namespace Functions {
16
22class MANTID_CURVEFITTING_DLL ComptonScatteringCountRate : public API::CompositeFunction {
23public:
26
27private:
29 std::string name() const override { return "ComptonScatteringCountRate"; }
31 void setAttribute(const std::string &name, const Attribute &value) override;
33 void parseIntensityConstraintMatrix(const std::string &value);
34
36 void iterationStarting() override;
38 void setFixedParameterValues(const std::vector<double> &values);
40 void updateCMatrixValues() const;
41
43 void setMatrixWorkspace(std::shared_ptr<const API::MatrixWorkspace> matrix, size_t wsIndex, double startX,
44 double endX) override;
46 void cacheFunctions();
48 void cacheComptonProfile(const std::shared_ptr<ComptonProfile> &profile, const size_t paramsOffset);
50 void cacheBackground(const API::IFunction1D_sptr &function1D, const size_t paramsOffset);
52 void createConstraintMatrices();
54 void createPositivityCM();
56 void createEqualityCM(const size_t nmasses);
57
59 std::vector<ComptonProfile *> m_profiles;
61 std::vector<size_t> m_fixedParamIndices;
67 std::string m_bkgdOrderAttr;
71 std::shared_ptr<HistogramData::Histogram> m_hist;
73 size_t wsIndex;
75 std::vector<double> m_dataErrorRatio;
76};
77
78} // namespace Functions
79} // namespace CurveFitting
80} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
A composite function is a function containing other functions.
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
Implements a specialized function that encapsulates the combination of ComptonProfile functions that ...
Kernel::DblMatrix m_cmatrix
Positivity constraints on J(y)
std::string m_bkgdOrderAttr
Name of order attribute on background function.
Kernel::DblMatrix m_eqMatrix
Intensity equality constraints.
std::vector< double > m_dataErrorRatio
Ratio of data & errors.
std::vector< ComptonProfile * > m_profiles
Holder for non-owning functions cast as ComptonProfiles.
std::shared_ptr< HistogramData::Histogram > m_hist
The histogram of the matrix workspace being cached for use.
std::vector< size_t > m_fixedParamIndices
Store parameter indices of intensity parameters that are fixed.
std::shared_ptr< IFunction1D > IFunction1D_sptr
Definition: IFunction1D.h:80
Helper class which provides the Collimation Length for SANS instruments.