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. More...
 
bool compare (const SXPeak &rhs, double tolerance) const
 Object comparison. More...
 
detid_t getDetectorId () const
 Getter for the detector Id. More...
 
const double & getIntensity () const
 Getter for the intensity. More...
 
Mantid::Kernel::V3D getQ () const
 Getter for LabQ. More...
 
SXPeakoperator+= (const SXPeak &rhs)
 Operator addition overload. More...
 
void reduce ()
 Normalise by number of pixels. More...
 
 SXPeak (double t, double phi, double intensity, const std::vector< int > &spectral, const size_t wsIndex, const Mantid::API::SpectrumInfo &spectrumInfo)
 Constructor. More...
 

Private Attributes

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

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 130 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 120 of file FindSXPeaksHelper.cpp.

References m_nPixels, m_phi, m_tof, m_twoTheta, rhs, and tolerance.

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 202 of file FindSXPeaksHelper.cpp.

References m_detId.

◆ getIntensity()

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

Getter for the intensity.

Definition at line 197 of file FindSXPeaksHelper.cpp.

References m_intensity.

◆ getQ()

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

Getter for LabQ.

Returns
q vector

Definition at line 153 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 173 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 185 of file FindSXPeaksHelper.cpp.

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

Friends And Related Function 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 90 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 76 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 82 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 86 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 92 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 80 of file FindSXPeaksHelper.h.

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

◆ m_qConvention

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

Q Convention.

Definition at line 96 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 84 of file FindSXPeaksHelper.h.

Referenced by operator+=().

◆ m_tof

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

TOF for the peak centre.

Definition at line 74 of file FindSXPeaksHelper.h.

Referenced by 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 78 of file FindSXPeaksHelper.h.

Referenced by 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 94 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 88 of file FindSXPeaksHelper.h.

Referenced by SXPeak().


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