Mantid
Loading...
Searching...
No Matches
ReferenceFrame.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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 "MantidGeometry/DllConfig.h"
10#include "MantidKernel/V3D.h"
11#include <string>
12
13namespace Mantid {
14namespace Geometry {
16enum PointingAlong { X = 0, Y = 1, Z = 2 };
19
26class MANTID_GEOMETRY_DLL ReferenceFrame {
27public:
31 ReferenceFrame(PointingAlong up, PointingAlong alongBeam, Handedness handedness, std::string origin);
33 ReferenceFrame(PointingAlong up, PointingAlong alongBeam, PointingAlong thetaSign, Handedness handedness,
34 std::string origin);
36 PointingAlong pointingUp() const;
38 PointingAlong pointingAlongBeam() const;
41 PointingAlong pointingHorizontal() const;
43 Handedness getHandedness() const;
45 std::string origin() const;
47 virtual ~ReferenceFrame() = default;
49 Mantid::Kernel::V3D vecPointingUp() const;
51 Mantid::Kernel::V3D vecPointingAlongBeam() const;
53 Mantid::Kernel::V3D vecPointingHorizontal() const;
55 Mantid::Kernel::V3D vecThetaSign() const;
57 std::string pointingUpAxis() const;
59 std::string pointingAlongBeamAxis() const;
61 std::string pointingHorizontalAxis() const;
63 bool isVectorPointingAlongBeam(const Mantid::Kernel::V3D &v) const;
64
65private:
77 std::string m_origin;
84};
85
86} // namespace Geometry
87} // namespace Mantid
ReferenceFrame : Holds reference frame information from the geometry description file.
PointingAlong m_up
Pointing up axis.
ReferenceFrame & operator=(const ReferenceFrame &)
Disabled assignment.
virtual ~ReferenceFrame()=default
Destructor.
Handedness m_handedness
Handedness.
Mantid::Kernel::V3D m_vecPointingAlongBeam
Vector pointing along the beam.
PointingAlong m_alongBeam
Beam pointing along axis.
Mantid::Kernel::V3D m_vecPointingUp
Vector pointing up instrument.
PointingAlong m_thetaSign
Axis defining the 2theta sign.
Mantid::Kernel::V3D m_vecThetaSign
Vector denoting the direction defining the 2theta sign.
Class for 3D vectors.
Definition: V3D.h:34
Handedness
Type to distingusih between l and r handedness.
PointingAlong
Type to describe pointing along options.
Helper class which provides the Collimation Length for SANS instruments.