Mantid
|
IMuonAsymmetryCalculator : Abstract base class for muon asymmetry calculations. More...
#include <IMuonAsymmetryCalculator.h>
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... | |
IMuonAsymmetryCalculator : Abstract base class for muon asymmetry calculations.
Definition at line 21 of file IMuonAsymmetryCalculator.h.
Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::IMuonAsymmetryCalculator | ( | API::WorkspaceGroup_sptr | inputWS, |
std::vector< int > | summedPeriods, | ||
std::vector< int > | subtractedPeriods | ||
) |
Constructor.
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.
|
virtualdefault |
|
pure virtual |
Overridden in derived classes to perform asymmetry calculation.
Implemented in Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator, Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator, and Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator.
|
protected |
Extracts a single spectrum from a workspace.
Extracts a single spectrum from the given workspace.
inputWS | :: [input] Workspace to extract spectrum from |
index | :: [input] Index of spectrum to extract |
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().
|
protected |
Subtracts one workspace from another (lhs - rhs)
Subtracts one workspace from another: lhs - rhs.
lhs | :: [input] Workspace on LHS of subtraction |
rhs | :: [input] Workspace on RHS of 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().
|
protected |
Sums the specified periods in the input workspace group.
Sums the specified periods of the input workspace group.
periodsToSum | :: [input] List of period indexes (1-based) to be summed |
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().
|
protected |
Input workspace.
Definition at line 41 of file IMuonAsymmetryCalculator.h.
Referenced by Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::calculate(), and sumPeriods().
|
protected |
List of subtracted periods.
Definition at line 47 of file IMuonAsymmetryCalculator.h.
Referenced by Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator::calculate(), and Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::calculate().
|
protected |
List of summed periods.
Definition at line 44 of file IMuonAsymmetryCalculator.h.
Referenced by Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::calculate(), Mantid::WorkflowAlgorithms::MuonGroupCountsCalculator::calculate(), and Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::calculate().