Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Mantid::DataObjects::PeakShapeSpherical Class Reference

PeakShapeSpherical : PeakShape for a spherical peak. More...

#include <PeakShapeSpherical.h>

Inheritance diagram for Mantid::DataObjects::PeakShapeSpherical:
Mantid::DataObjects::PeakShapeBase Mantid::Geometry::PeakShape

Public Member Functions

boost::optional< double > backgroundInnerRadius () const
 Peak inner background radius. More...
 
boost::optional< double > backgroundOuterRadius () const
 Peak outer background radius. More...
 
PeakShapeSphericalclone () 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 PeakShapeclone () 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...
 
PeakShapeBaseoperator= (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...
 

Detailed Description

PeakShapeSpherical : PeakShape for a spherical peak.

Definition at line 19 of file PeakShapeSpherical.h.

Constructor & Destructor Documentation

◆ PeakShapeSpherical() [1/2]

Mantid::DataObjects::PeakShapeSpherical::PeakShapeSpherical ( const double &  peakRadius,
Kernel::SpecialCoordinateSystem  frame,
std::string  algorithmName = std::string(),
int  algorithmVersion = -1 
)

Constructor.

Parameters
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.

◆ PeakShapeSpherical() [2/2]

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.

Parameters
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.

Member Function Documentation

◆ backgroundInnerRadius()

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.

Returns
boost optional inner radius.

Definition at line 110 of file PeakShapeSpherical.cpp.

References m_backgroundInnerRadius.

Referenced by operator==().

◆ backgroundOuterRadius()

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.

Returns
boost optional outer radius

Definition at line 103 of file PeakShapeSpherical.cpp.

References m_backgroundOuterRadius.

Referenced by operator==().

◆ clone()

PeakShapeSpherical * Mantid::DataObjects::PeakShapeSpherical::clone ( ) const
overridevirtual

Clone the peak shape.

Clone object as deep copy.

Returns
pointer to new object

Implements Mantid::Geometry::PeakShape.

Definition at line 66 of file PeakShapeSpherical.cpp.

◆ operator==()

bool Mantid::DataObjects::PeakShapeSpherical::operator== ( const PeakShapeSpherical other) const

◆ radius()

boost::optional< double > Mantid::DataObjects::PeakShapeSpherical::radius ( RadiusType  type = RadiusType::Radius) const
overridevirtual

Peak radius.

Get radius of sphere.

Parameters
typeWhich radius to get.
Returns
radius

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.

◆ shapeName()

std::string Mantid::DataObjects::PeakShapeSpherical::shapeName ( ) const
overridevirtual

Shape name.

Implements Mantid::Geometry::PeakShape.

Definition at line 68 of file PeakShapeSpherical.cpp.

References sphereShapeName().

◆ sphereShapeName()

const std::string Mantid::DataObjects::PeakShapeSpherical::sphereShapeName ( )
static

Non-instance shape name.

PeakShapeSpherical::sphereShapeName.

Returns
Spherical shape name for this type.

Definition at line 116 of file PeakShapeSpherical.cpp.

Referenced by Mantid::DataObjects::PeakShapeSphericalFactory::create(), and shapeName().

◆ toJSON()

std::string Mantid::DataObjects::PeakShapeSpherical::toJSON ( ) const
overridevirtual

Serialization method.

Serialize to JSON object.

Returns
JSON object as std::string

Implements Mantid::Geometry::PeakShape.

Definition at line 49 of file PeakShapeSpherical.cpp.

References Mantid::DataObjects::PeakShapeBase::buildCommon(), m_backgroundInnerRadius, m_backgroundOuterRadius, and m_radius.

Member Data Documentation

◆ m_backgroundInnerRadius

boost::optional<double> Mantid::DataObjects::PeakShapeSpherical::m_backgroundInnerRadius
private

Background inner radius;.

Definition at line 49 of file PeakShapeSpherical.h.

Referenced by backgroundInnerRadius(), radius(), and toJSON().

◆ m_backgroundOuterRadius

boost::optional<double> Mantid::DataObjects::PeakShapeSpherical::m_backgroundOuterRadius
private

Background outer radius.

Definition at line 51 of file PeakShapeSpherical.h.

Referenced by backgroundOuterRadius(), PeakShapeSpherical(), radius(), and toJSON().

◆ m_radius

double Mantid::DataObjects::PeakShapeSpherical::m_radius
private

Peak radius.

Definition at line 47 of file PeakShapeSpherical.h.

Referenced by radius(), and toJSON().


The documentation for this class was generated from the following files: