Mantid
|
PeakShapeSpherical : PeakShape for a spherical peak. More...
#include <PeakShapeSpherical.h>
Public Member Functions | |
boost::optional< double > | backgroundInnerRadius () const |
Peak inner background radius. More... | |
boost::optional< double > | backgroundOuterRadius () const |
Peak outer background radius. More... | |
PeakShapeSpherical * | clone () const override |
Clone the peak shape. More... | |
bool | operator== (const PeakShapeSpherical &other) const |
Equals operator. More... | |
PeakShapeSpherical (const double &peakRadius, const double &peakInnerRadius, const double &peakOuterRadius, Kernel::SpecialCoordinateSystem frame, std::string algorithmName=std::string(), int algorithmVersion=-1) | |
Constructor. More... | |
PeakShapeSpherical (const double &peakRadius, Kernel::SpecialCoordinateSystem frame, std::string algorithmName=std::string(), int algorithmVersion=-1) | |
Constructor. More... | |
boost::optional< double > | radius (RadiusType type=RadiusType::Radius) const override |
Peak radius. More... | |
std::string | shapeName () const override |
Shape name. More... | |
std::string | toJSON () const override |
Serialization method. More... | |
Public Member Functions inherited from Mantid::DataObjects::PeakShapeBase | |
std::string | algorithmName () const override |
Get the name of the algorithm used to make this shape. More... | |
int | algorithmVersion () const override |
Get the version of the algorithm used to make this shape. More... | |
Kernel::SpecialCoordinateSystem | frame () const override |
Get the coordinate frame. More... | |
PeakShapeBase (Kernel::SpecialCoordinateSystem frame, std::string algorithmName=std::string(), int algorithmVersion=-1) | |
Constructor. More... | |
Public Member Functions inherited from Mantid::Geometry::PeakShape | |
virtual std::string | algorithmName () const =0 |
Algorithm. More... | |
virtual int | algorithmVersion () const =0 |
Algorithm Version. More... | |
virtual PeakShape * | clone () const =0 |
Deep copy this. More... | |
virtual Mantid::Kernel::SpecialCoordinateSystem | frame () const =0 |
Coordinte frame used upon creation. More... | |
virtual boost::optional< double > | radius (RadiusType type) const =0 |
Radius. More... | |
virtual std::string | shapeName () const =0 |
Shape name. More... | |
virtual std::string | toJSON () const =0 |
Serialize. More... | |
virtual | ~PeakShape ()=default |
Destructor. More... | |
Static Public Member Functions | |
static const std::string | sphereShapeName () |
Non-instance shape name. More... | |
Private Attributes | |
boost::optional< double > | m_backgroundInnerRadius |
Background inner radius;. More... | |
boost::optional< double > | m_backgroundOuterRadius |
Background outer radius. More... | |
double | m_radius |
Peak radius. More... | |
Additional Inherited Members | |
Public Types inherited from Mantid::Geometry::PeakShape | |
enum | RadiusType { Radius = 0 , OuterRadius = 1 , InnerRadius = 2 } |
For selecting different radius types. More... | |
Protected Member Functions inherited from Mantid::DataObjects::PeakShapeBase | |
void | buildCommon (Json::Value &root) const |
Build common parts of outgoing JSON serialization. More... | |
PeakShapeBase & | operator= (const PeakShapeBase &)=default |
Assignment operator. More... | |
bool | operator== (const PeakShapeBase &other) const |
Equals operator. More... | |
PeakShapeBase (const PeakShapeBase &)=default | |
Copy constructor. More... | |
Protected Attributes inherited from Mantid::DataObjects::PeakShapeBase | |
std::string | m_algorithmName |
Generating algorithm name. More... | |
int | m_algorithmVersion |
Generating algorithm version. More... | |
Mantid::Kernel::SpecialCoordinateSystem | m_frame |
Special coordinate system. More... | |
PeakShapeSpherical : PeakShape for a spherical peak.
Definition at line 19 of file PeakShapeSpherical.h.
Mantid::DataObjects::PeakShapeSpherical::PeakShapeSpherical | ( | const double & | peakRadius, |
Kernel::SpecialCoordinateSystem | frame, | ||
std::string | algorithmName = std::string() , |
||
int | algorithmVersion = -1 |
||
) |
Constructor.
peakRadius | : Peak radius |
frame | : Coordinate frame used for the integration |
algorithmName | : Algorithm name used for the integration |
algorithmVersion | : Algorithm version used for the integration |
Definition at line 22 of file PeakShapeSpherical.cpp.
Mantid::DataObjects::PeakShapeSpherical::PeakShapeSpherical | ( | const double & | peakRadius, |
const double & | peakInnerRadius, | ||
const double & | peakOuterRadius, | ||
Kernel::SpecialCoordinateSystem | frame, | ||
std::string | algorithmName = std::string() , |
||
int | algorithmVersion = -1 |
||
) |
Constructor.
PeakShapeSpherical::PeakShapeSpherical.
peakRadius | : Peak radius |
peakInnerRadius | : Peak inner radius |
peakOuterRadius | : Peak outer radius |
frame | : Coordinate frame used for the integration |
algorithmName | : Algorithm name |
algorithmVersion | : Algorithm version |
Definition at line 35 of file PeakShapeSpherical.cpp.
References m_backgroundOuterRadius.
boost::optional< double > Mantid::DataObjects::PeakShapeSpherical::backgroundInnerRadius | ( | ) | const |
Peak inner background radius.
Get the background inner radius.
The inner radius may not be set, so this is optional.
Definition at line 110 of file PeakShapeSpherical.cpp.
References m_backgroundInnerRadius.
Referenced by operator==().
boost::optional< double > Mantid::DataObjects::PeakShapeSpherical::backgroundOuterRadius | ( | ) | const |
Peak outer background radius.
Get the background outer radius.
The outer radius may not be set, so this is optional.
Definition at line 103 of file PeakShapeSpherical.cpp.
References m_backgroundOuterRadius.
Referenced by operator==().
|
overridevirtual |
Clone the peak shape.
Clone object as deep copy.
Implements Mantid::Geometry::PeakShape.
Definition at line 66 of file PeakShapeSpherical.cpp.
bool Mantid::DataObjects::PeakShapeSpherical::operator== | ( | const PeakShapeSpherical & | other | ) | const |
Equals operator.
Definition at line 70 of file PeakShapeSpherical.cpp.
References backgroundInnerRadius(), backgroundOuterRadius(), Mantid::DataObjects::PeakShapeBase::operator==(), and radius.
|
overridevirtual |
Peak radius.
Get radius of sphere.
type | Which radius to get. |
Implements Mantid::Geometry::PeakShape.
Definition at line 81 of file PeakShapeSpherical.cpp.
References Mantid::Geometry::PeakShape::InnerRadius, m_backgroundInnerRadius, m_backgroundOuterRadius, m_radius, Mantid::Geometry::PeakShape::OuterRadius, Mantid::Geometry::PeakShape::Radius, and value.
|
overridevirtual |
Shape name.
Implements Mantid::Geometry::PeakShape.
Definition at line 68 of file PeakShapeSpherical.cpp.
References sphereShapeName().
|
static |
Non-instance shape name.
PeakShapeSpherical::sphereShapeName.
Definition at line 116 of file PeakShapeSpherical.cpp.
Referenced by Mantid::DataObjects::PeakShapeSphericalFactory::create(), and shapeName().
|
overridevirtual |
Serialization method.
Serialize to JSON object.
Implements Mantid::Geometry::PeakShape.
Definition at line 49 of file PeakShapeSpherical.cpp.
References Mantid::DataObjects::PeakShapeBase::buildCommon(), m_backgroundInnerRadius, m_backgroundOuterRadius, and m_radius.
|
private |
Background inner radius;.
Definition at line 49 of file PeakShapeSpherical.h.
Referenced by backgroundInnerRadius(), radius(), and toJSON().
|
private |
Background outer radius.
Definition at line 51 of file PeakShapeSpherical.h.
Referenced by backgroundOuterRadius(), PeakShapeSpherical(), radius(), and toJSON().
|
private |
Peak radius.
Definition at line 47 of file PeakShapeSpherical.h.