Mantid
Loading...
Searching...
No Matches
SofQCommon.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 "MantidAlgorithms/DllConfig.h"
13// Routines used by all SofQW algorithms intended to provide united
14// user interface to all SofQ algorihtms.
15namespace Mantid {
16namespace Algorithms {
17
18struct MANTID_ALGORITHMS_DLL SofQCommon {
19
25 double m_efixed;
26
27 // Constructor
28 SofQCommon() : m_emode(0), m_efixedGiven(false), m_efixed(0.0) {}
29 // init the class parameters, defined above
30 void initCachedValues(const API::MatrixWorkspace &workspace, API::Algorithm *const hostAlgorithm);
31
33 double getEFixed(const Geometry::IDetector &det) const;
34
36 double q(const double deltaE, const double twoTheta, const Geometry::IDetector *det) const;
37
39 std::pair<double, double> qBinHints(const API::MatrixWorkspace &ws, const double minE, const double maxE) const;
40
41private:
42 double directQ(const double deltaE, const double twoTheta) const;
43 double indirectQ(const double deltaE, const double twoTheta, const Geometry::IDetector *det) const;
44 std::pair<double, double> qBinHintsDirect(const API::MatrixWorkspace &ws, const double minE, const double maxE) const;
45 std::pair<double, double> qBinHintsIndirect(const API::MatrixWorkspace &ws, const double minE,
46 const double maxE) const;
47};
48} // namespace Algorithms
49} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Base MatrixWorkspace Abstract Class.
Interface class for detector objects.
Definition: IDetector.h:43
Helper class which provides the Collimation Length for SANS instruments.
bool m_efixedGiven
EFixed has been provided.
Definition: SofQCommon.h:23