Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends | List of all members
Mantid::Crystal::FindSXPeaksHelper::SXPeak Struct Reference

#include <FindSXPeaksHelper.h>

Public Member Functions

bool compare (const SXPeak &rhs, const double xTolerance, const double phiTolerance, const double thetaTolerance, const XAxisUnit tofUnits=XAxisUnit::TOF) const
 Object comparison.
 
bool compare (const SXPeak &rhs, double tolerance) const
 Object comparison.
 
detid_t getDetectorId () const
 Getter for the detector Id.
 
const double & getIntensity () const
 Getter for the intensity.
 
const std::vector< int > & getPeakSpectras () const
 Getter for spectrum indexes of a peak.
 
Mantid::Kernel::V3D getQ () const
 Getter for LabQ.
 
SXPeakoperator+= (const SXPeak &rhs)
 Operator addition overload.
 
void reduce ()
 Normalise by number of pixels.
 
 SXPeak (double t, double phi, double intensity, const std::vector< int > &spectral, const size_t wsIndex, const Mantid::API::SpectrumInfo &spectrumInfo)
 Constructor.
 

Private Attributes

detid_t m_detId
 Detector ID.
 
double m_dSpacing
 d-spacing at the peak centre
 
double m_intensity
 Measured intensity of centre of the peak.
 
double m_LTotal
 Detector-sample distance.
 
int m_nPixels
 Number of contributing pixels.
 
double m_phi
 Phi angle for the centre detector of the peak.
 
std::string m_qConvention
 Q Convention.
 
std::vector< int > m_spectra
 Contributing spectra to this peak.
 
double m_tof
 TOF for the peak centre.
 
double m_twoTheta
 2 * theta angle for then centre detector of the peak
 
Kernel::V3D m_unitWaveVector
 Unit vector in the direction of the wavevector.
 
size_t m_wsIndex
 Detector workspace index.
 

Friends

std::ostream & operator<< (std::ostream &os, const SXPeak &rhs)
 

Detailed Description

Definition at line 38 of file FindSXPeaksHelper.h.

Constructor & Destructor Documentation

◆ SXPeak()

Mantid::Crystal::FindSXPeaksHelper::SXPeak::SXPeak ( double  t,
double  phi,
double  intensity,
const std::vector< int > &  spectral,
const size_t  wsIndex,
const Mantid::API::SpectrumInfo spectrumInfo 
)

Member Function Documentation

◆ compare() [1/2]

bool Mantid::Crystal::FindSXPeaksHelper::SXPeak::compare ( const SXPeak rhs,
const double  xTolerance,
const double  phiTolerance,
const double  thetaTolerance,
const XAxisUnit  tofUnits = XAxisUnit::TOF 
) const

Object comparison.

Note that the tolerances are absolute and there is one per trait.

Definition at line 131 of file FindSXPeaksHelper.cpp.

References m_dSpacing, m_phi, m_tof, m_twoTheta, rhs, and Mantid::Crystal::FindSXPeaksHelper::TOF.

◆ compare() [2/2]

bool Mantid::Crystal::FindSXPeaksHelper::SXPeak::compare ( const SXPeak rhs,
double  tolerance 
) const

Object comparison.

Object comparision.

Note that the tolerance is relative and used for all three traits.

Parameters
rhs: other SXPeak
tolerance: tolerance

Definition at line 121 of file FindSXPeaksHelper.cpp.

References m_nPixels, m_phi, m_tof, m_twoTheta, rhs, tolerance, and Mantid::Kernel::withinRelativeDifference().

Referenced by Mantid::Crystal::FindSXPeaksHelper::RelativeCompareStrategy::compare(), and Mantid::Crystal::FindSXPeaksHelper::AbsoluteCompareStrategy::compare().

◆ getDetectorId()

detid_t Mantid::Crystal::FindSXPeaksHelper::SXPeak::getDetectorId ( ) const

Getter for the detector Id.

Definition at line 203 of file FindSXPeaksHelper.cpp.

References m_detId.

◆ getIntensity()

const double & Mantid::Crystal::FindSXPeaksHelper::SXPeak::getIntensity ( ) const

Getter for the intensity.

Definition at line 198 of file FindSXPeaksHelper.cpp.

References m_intensity.

◆ getPeakSpectras()

const std::vector< int > & Mantid::Crystal::FindSXPeaksHelper::SXPeak::getPeakSpectras ( ) const

Getter for spectrum indexes of a peak.

Definition at line 208 of file FindSXPeaksHelper.cpp.

References m_spectra.

◆ getQ()

Mantid::Kernel::V3D Mantid::Crystal::FindSXPeaksHelper::SXPeak::getQ ( ) const

Getter for LabQ.

Returns
q vector

Definition at line 154 of file FindSXPeaksHelper.cpp.

References Mantid::PhysicalConstants::h_bar, m_LTotal, m_qConvention, m_tof, m_unitWaveVector, and Mantid::PhysicalConstants::NeutronMass.

◆ operator+=()

SXPeak & Mantid::Crystal::FindSXPeaksHelper::SXPeak::operator+= ( const SXPeak rhs)

Operator addition overload.

Parameters
rhs: Right hand slide peak for addition.

Definition at line 174 of file FindSXPeaksHelper.cpp.

References m_intensity, m_LTotal, m_nPixels, m_phi, m_spectra, m_tof, m_twoTheta, and rhs.

◆ reduce()

void Mantid::Crystal::FindSXPeaksHelper::SXPeak::reduce ( )

Normalise by number of pixels.

Definition at line 186 of file FindSXPeaksHelper.cpp.

References m_intensity, m_LTotal, m_nPixels, m_phi, m_tof, and m_twoTheta.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const SXPeak rhs 
)
friend

Definition at line 61 of file FindSXPeaksHelper.h.

Member Data Documentation

◆ m_detId

detid_t Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_detId
private

Detector ID.

Definition at line 92 of file FindSXPeaksHelper.h.

Referenced by getDetectorId(), and SXPeak().

◆ m_dSpacing

double Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_dSpacing
private

d-spacing at the peak centre

Definition at line 78 of file FindSXPeaksHelper.h.

Referenced by compare(), and SXPeak().

◆ m_intensity

double Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_intensity
private

Measured intensity of centre of the peak.

Definition at line 84 of file FindSXPeaksHelper.h.

Referenced by getIntensity(), operator+=(), and reduce().

◆ m_LTotal

double Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_LTotal
private

Detector-sample distance.

Definition at line 88 of file FindSXPeaksHelper.h.

Referenced by getQ(), operator+=(), reduce(), and SXPeak().

◆ m_nPixels

int Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_nPixels
private

Number of contributing pixels.

Definition at line 94 of file FindSXPeaksHelper.h.

Referenced by compare(), operator+=(), reduce(), and SXPeak().

◆ m_phi

double Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_phi
private

Phi angle for the centre detector of the peak.

Definition at line 82 of file FindSXPeaksHelper.h.

Referenced by compare(), compare(), operator+=(), and reduce().

◆ m_qConvention

std::string Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_qConvention
private

Q Convention.

Definition at line 98 of file FindSXPeaksHelper.h.

Referenced by getQ(), and SXPeak().

◆ m_spectra

std::vector<int> Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_spectra
private

Contributing spectra to this peak.

Definition at line 86 of file FindSXPeaksHelper.h.

Referenced by getPeakSpectras(), and operator+=().

◆ m_tof

double Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_tof
private

TOF for the peak centre.

Definition at line 76 of file FindSXPeaksHelper.h.

Referenced by compare(), compare(), getQ(), operator+=(), reduce(), and SXPeak().

◆ m_twoTheta

double Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_twoTheta
private

2 * theta angle for then centre detector of the peak

Definition at line 80 of file FindSXPeaksHelper.h.

Referenced by compare(), compare(), operator+=(), reduce(), and SXPeak().

◆ m_unitWaveVector

Kernel::V3D Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_unitWaveVector
private

Unit vector in the direction of the wavevector.

Definition at line 96 of file FindSXPeaksHelper.h.

Referenced by getQ(), and SXPeak().

◆ m_wsIndex

size_t Mantid::Crystal::FindSXPeaksHelper::SXPeak::m_wsIndex
private

Detector workspace index.

Definition at line 90 of file FindSXPeaksHelper.h.

Referenced by SXPeak().


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