Mantid
Loading...
Searching...
No Matches
MultivariateGaussianComptonProfile.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 <cmath>
10
11#include "MantidCurveFitting/DllConfig.h"
13
14namespace Mantid {
15namespace CurveFitting {
16namespace Functions {
17
18class MANTID_CURVEFITTING_DLL MultivariateGaussianComptonProfile : public ComptonProfile {
19public:
20 static const char *AMP_PARAM;
21 static const char *SIGMA_X_PARAM;
22 static const char *SIGMA_Y_PARAM;
23 static const char *SIGMA_Z_PARAM;
24 static const char *STEPS_ATTR;
25
28
29 void buildS2Cache(std::vector<double> &s2Cache) const;
30
31private:
33 std::string name() const override;
35 void declareParameters() override;
37 void declareAttributes() override;
39 void setAttribute(const std::string &name, const Attribute &value) override;
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;
46
48 void massProfile(double *result, const size_t nData) const override;
49
51 void massProfile(double *result, const size_t nData, const double amplitude) const;
52
53 double calculateJ(std::vector<double> s2Cache, double y) const;
54 double calculateFSE(std::vector<double> s2Cache, double y) const;
55
62 inline double calculateIntegrandJ(double s2, double y) const { return s2 * exp(-(y * y) / (2.0 * s2)); }
63
70 inline double calculateIntegrandFSE(double s2, double y) const {
71 return ((pow(y, 3) / pow(s2, 4)) - ((3 * y) / pow(s2, 2))) * exp(-(y * y) / (2.0 * s2));
72 }
73
74 double intervalCoeff(int i, int j) const;
75
77 double m_thetaStep;
78 double m_phiStep;
79};
80
81} // namespace Functions
82} // namespace CurveFitting
83} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
This class serves as a base-class for ComptonProfile type functions.
double calculateIntegrandFSE(double s2, double y) const
Calculates the integrand of the A3 FSE correction.
double calculateIntegrandJ(double s2, double y) const
Calculates the integrand of the mass profile.
Helper class which provides the Collimation Length for SANS instruments.