Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator Class Referenceabstract

IMuonAsymmetryCalculator : Abstract base class for muon asymmetry calculations. More...

#include <IMuonAsymmetryCalculator.h>

Inheritance diagram for Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator:
Mantid::WorkflowAlgorithms::MuonGroupCalculator Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator

Public Member Functions

virtual API::MatrixWorkspace_sptr calculate () const =0
 Overridden in derived classes to perform asymmetry calculation. More...
 
 IMuonAsymmetryCalculator (API::WorkspaceGroup_sptr inputWS, std::vector< int > summedPeriods, std::vector< int > subtractedPeriods)
 Constructor. More...
 
virtual ~IMuonAsymmetryCalculator ()=default
 

Protected Member Functions

API::MatrixWorkspace_sptr extractSpectrum (const API::Workspace_sptr &inputWS, const int index) const
 Extracts a single spectrum from a workspace. More...
 
API::MatrixWorkspace_sptr subtractWorkspaces (const API::MatrixWorkspace_sptr &lhs, const API::MatrixWorkspace_sptr &rhs) const
 Subtracts one workspace from another (lhs - rhs) More...
 
API::MatrixWorkspace_sptr sumPeriods (const std::vector< int > &periodsToSum) const
 Sums the specified periods in the input workspace group. More...
 

Protected Attributes

const API::WorkspaceGroup_sptr m_inputWS
 Input workspace. More...
 
const std::vector< int > m_subtractedPeriods
 List of subtracted periods. More...
 
const std::vector< int > m_summedPeriods
 List of summed periods. More...
 

Detailed Description

IMuonAsymmetryCalculator : Abstract base class for muon asymmetry calculations.

Definition at line 21 of file IMuonAsymmetryCalculator.h.

Constructor & Destructor Documentation

◆ IMuonAsymmetryCalculator()

Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::IMuonAsymmetryCalculator ( API::WorkspaceGroup_sptr  inputWS,
std::vector< int >  summedPeriods,
std::vector< int >  subtractedPeriods 
)

Constructor.

Parameters
inputWS:: [input] Input workspace group
summedPeriods:: [input] Vector of period indexes to be summed
subtractedPeriods:: [input] Vector of period indexes to be subtracted from summed periods

Definition at line 28 of file IMuonAsymmetryCalculator.cpp.

◆ ~IMuonAsymmetryCalculator()

virtual Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::~IMuonAsymmetryCalculator ( )
virtualdefault

Member Function Documentation

◆ calculate()

virtual API::MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::calculate ( ) const
pure virtual

◆ extractSpectrum()

MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::extractSpectrum ( const API::Workspace_sptr inputWS,
const int  index 
) const
protected

Extracts a single spectrum from a workspace.

Extracts a single spectrum from the given workspace.

Parameters
inputWS:: [input] Workspace to extract spectrum from
index:: [input] Index of spectrum to extract
Returns
Result of the extraction

Definition at line 87 of file IMuonAsymmetryCalculator.cpp.

References index, and Mantid::Kernel::SingletonHolder< T >::Instance().

Referenced by Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator::calculate(), and Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::estimateAsymmetry().

◆ subtractWorkspaces()

MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::subtractWorkspaces ( const API::MatrixWorkspace_sptr lhs,
const API::MatrixWorkspace_sptr rhs 
) const
protected

Subtracts one workspace from another (lhs - rhs)

Subtracts one workspace from another: lhs - rhs.

Parameters
lhs:: [input] Workspace on LHS of subtraction
rhs:: [input] Workspace on RHS of subtraction
Returns
Result of the subtraction

Definition at line 66 of file IMuonAsymmetryCalculator.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), and rhs.

Referenced by Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator::calculate(), and Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::calculate().

◆ sumPeriods()

MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::sumPeriods ( const std::vector< int > &  periodsToSum) const
protected

Sums the specified periods in the input workspace group.

Sums the specified periods of the input workspace group.

Parameters
periodsToSum:: [input] List of period indexes (1-based) to be summed
Returns
Workspace containing the sum

Definition at line 38 of file IMuonAsymmetryCalculator.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), and m_inputWS.

Referenced by Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator::calculate(), and Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::calculate().

Member Data Documentation

◆ m_inputWS

const API::WorkspaceGroup_sptr Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::m_inputWS
protected

◆ m_subtractedPeriods

const std::vector<int> Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::m_subtractedPeriods
protected

◆ m_summedPeriods

const std::vector<int> Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::m_summedPeriods
protected

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