Mantid
Loading...
Searching...
No Matches
CalculateReflectometry.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
10#include <cmath>
11
12namespace Mantid {
13namespace DataObjects {
14
19
20protected:
21 double m_theta_i{0.0};
22 const double to_radians_factor = M_PI / 180.0;
24
25public:
26 CalculateReflectometry(int version) : m_version{version} {}
27 virtual ~CalculateReflectometry() = default;
28
33 void setThetaIncident(double thetaIncident) {
34 m_theta_i = thetaIncident;
35 updateThetaIncident(thetaIncident);
36 };
37
42 virtual void updateThetaIncident(double thetaIncident) = 0;
43
48 virtual void setThetaFinal(double thetaFinal) = 0;
49
54 virtual void setTwoTheta(double twoTheta) = 0;
55
60 virtual double calculateDim0(double wavelength) const = 0;
61
66 virtual double calculateDim1(double wavelength) const = 0;
67
68 virtual Mantid::Geometry::Quadrilateral createQuad(double lamLower, double lamUpper, double thetaLower,
69 double thetaUpper) = 0;
70};
71} // namespace DataObjects
72} // namespace Mantid
Provides a common interface to Reflectometry Transform calculators.
virtual Mantid::Geometry::Quadrilateral createQuad(double lamLower, double lamUpper, double thetaLower, double thetaUpper)=0
virtual void updateThetaIncident(double thetaIncident)=0
Derived class setter for the final theta value require for the calculation.
virtual double calculateDim0(double wavelength) const =0
Executes the calculation on dimension 0.
void setThetaIncident(double thetaIncident)
Setter for the incident theta value require for the calculation.
virtual void setThetaFinal(double thetaFinal)=0
Setter for the final theta value require for the calculation.
virtual void setTwoTheta(double twoTheta)=0
Set the final theta value from the detector twoTheta angle.
virtual double calculateDim1(double wavelength) const =0
Executes the calculation on dimension 1.
A ConvexPolygon with only 4 vertices.
Definition: Quadrilateral.h:24
Helper class which provides the Collimation Length for SANS instruments.