Mantid
Loading...
Searching...
No Matches
PeakShapeEllipsoid.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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 "MantidKernel/Matrix.h"
11#include "MantidKernel/V3D.h"
12
13namespace Mantid {
14namespace DataObjects {
15
18class MANTID_DATAOBJECTS_DLL PeakShapeEllipsoid : public PeakShapeBase {
19public:
21 PeakShapeEllipsoid(const std::vector<Mantid::Kernel::V3D> &directions, const std::vector<double> &abcRadii,
22 const std::vector<double> &abcRadiiBackgroundInner,
23 const std::vector<double> &abcRadiiBackgroundOuter, Kernel::SpecialCoordinateSystem frame,
24 std::string algorithmName = std::string(), int algorithmVersion = -1,
25 const Mantid::Kernel::V3D &translation = {0.0, 0.0, 0.0});
27 bool operator==(const PeakShapeEllipsoid &other) const;
29 const std::vector<double> &abcRadii() const;
31 const std::vector<double> &abcRadiiBackgroundInner() const;
33 const std::vector<double> &abcRadiiBackgroundOuter() const;
35 const std::vector<Mantid::Kernel::V3D> &directions() const;
37 const Kernel::V3D &translation() const;
39 std::vector<Kernel::V3D> getDirectionInSpecificFrame(Kernel::Matrix<double> &invertedGoniometerMatrix) const;
40
42 std::string toJSON() const override;
44 PeakShapeEllipsoid *clone() const override;
46 std::string shapeName() const override;
47
49 boost::optional<double> radius(RadiusType type = RadiusType::Radius) const override;
50 static const std::string ellipsoidShapeName();
51
52private:
54 std::vector<Mantid::Kernel::V3D> m_directions;
56 std::vector<double> m_abc_radii;
58 std::vector<double> m_abc_radiiBackgroundInner;
60 std::vector<double> m_abc_radiiBackgroundOuter;
63};
64
65using PeakShapeEllipsoid_sptr = std::shared_ptr<PeakShapeEllipsoid>;
66using PeakShapeEllipsoid_const_sptr = std::shared_ptr<const PeakShapeEllipsoid>;
67
68} // namespace DataObjects
69} // namespace Mantid
double radius
Definition: Rasterize.cpp:31
PeakShapeBase : Base class for concrete PeakShapes containing common code.
Definition: PeakShapeBase.h:26
PeakShapeEllipsoid : PeakShape representing a 3D ellipsoid.
Mantid::Kernel::V3D m_translation
translation of center
std::vector< Mantid::Kernel::V3D > m_directions
principle axis
std::vector< double > m_abc_radiiBackgroundInner
inner radii
std::vector< double > m_abc_radii
radii
std::vector< double > m_abc_radiiBackgroundOuter
outer radii
RadiusType
For selecting different radius types.
Definition: PeakShape.h:35
Numerical Matrix class.
Definition: Matrix.h:42
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< const PeakShapeEllipsoid > PeakShapeEllipsoid_const_sptr
std::shared_ptr< PeakShapeEllipsoid > PeakShapeEllipsoid_sptr
SpecialCoordinateSystem
Special coordinate systems for Q3D.
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)