Mantid
Loading...
Searching...
No Matches
EQSANSResolution.cpp
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//----------------------------------------------------------------------
8// Includes
9//----------------------------------------------------------------------
11#include <cmath>
12
13namespace Mantid::Algorithms {
14
15// Register the algorithm into the AlgorithmFactory
16DECLARE_ALGORITHM(EQSANSResolution)
17
18/*
19 * Double Boltzmann fit to the TOF resolution as a function of wavelength
20 */
21double EQSANSResolution::getTOFResolution(double wl) {
22 if (wl > 2.0) {
23 return 0.0148 * wl * wl * wl - 0.5233 * wl * wl + 6.4797 * wl + 231.99;
24 } else {
25 return 392.31 * pow(wl, 6) - 3169.3 * pow(wl, 5) + 10445 * pow(wl, 4) - 17872 * wl * wl * wl + 16509 * wl * wl -
26 7448.4 * wl + 1280.5;
27 }
28}
29
30} // namespace Mantid::Algorithms
#define DECLARE_ALGORITHM(classname)
Definition: Algorithm.h:576
Computes the resolution on EQSANS data Required Properties: