Mantid
Loading...
Searching...
No Matches
CrystalFieldControl.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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 "MantidCurveFitting/DllConfig.h"
12
13namespace Mantid {
14namespace CurveFitting {
15namespace Functions {
16
20class MANTID_CURVEFITTING_DLL CrystalFieldControl : public API::CompositeFunction {
21public:
24 void setAttribute(const std::string &name, const Attribute &) override;
26 void buildControls();
28 API::IFunction_sptr buildSource();
30 API::IFunction_sptr buildSingleSite();
32 API::IFunction_sptr buildMultiSite();
34 API::IFunction_sptr buildSingleSiteSingleSpectrum();
36 API::IFunction_sptr buildSingleSiteMultiSpectrum();
38 API::IFunction_sptr buildMultiSiteSingleSpectrum();
40 API::IFunction_sptr buildMultiSiteMultiSpectrum();
42 bool isMultiSite() const;
44 bool isMultiSpectrum() const;
46 bool hasPeaks() const;
48 bool hasPhysProperties() const;
49 const std::vector<double> &temperatures() const;
50 const std::vector<double> &FWHMs() const;
51 const std::vector<std::string> &physProps() const;
52
53private:
55 void buildPhysPropControls();
57 void cacheAttributes();
59 void checkConsistent();
61 void parseStringListAttribute(const std::string &attName, const std::string &value, std::vector<std::string> &cache);
65 std::vector<std::string> m_ions;
67 std::vector<std::string> m_symmetries;
69 std::vector<double> m_temperatures;
71 std::vector<double> m_FWHMs;
73 std::vector<std::vector<double>> m_fwhmX;
74 std::vector<std::vector<double>> m_fwhmY;
76 std::vector<std::string> m_physProps;
78};
79
80class MANTID_CURVEFITTING_DLL CrystalFieldSpectrumControl : public API::ParamFunction {
81public:
83 std::string name() const override;
84 void function(const API::FunctionDomain &, API::FunctionValues &) const override;
85};
86
87class MANTID_CURVEFITTING_DLL CrystalFieldPhysPropControl : public API::ParamFunction {
88public:
90 std::string name() const override;
91 void function(const API::FunctionDomain &, API::FunctionValues &) const override;
92};
93
94} // namespace Functions
95} // namespace CurveFitting
96} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
A composite function is a function containing other functions.
Base class that represents the domain of a function.
A class to store values calculated by a function.
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
Implements the part of IFunction interface dealing with parameters.
Definition: ParamFunction.h:33
A function that controls creation of the source of CrystalFieldFunction.
std::vector< std::string > m_physProps
The physical properties.
std::vector< double > m_temperatures
The temperatures.
std::vector< double > m_FWHMs
Cache the default peak FWHMs.
std::vector< std::string > m_symmetries
The symmetries.
std::vector< std::vector< double > > m_fwhmX
Caches of the width functions.
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Definition: IFunction.h:732
Helper class which provides the Collimation Length for SANS instruments.