Mantid
|
MuonPairAsymmetryCalculator : Calculates asymmetry for a given pair of groups, given the alpha value. More...
#include <MuonPairAsymmetryCalculator.h>
Public Member Functions | |
API::MatrixWorkspace_sptr | calculate () const override |
Performs pair asymmetry calculation. More... | |
MuonPairAsymmetryCalculator (const API::WorkspaceGroup_sptr &inputWS, const std::vector< int > &summedPeriods, const std::vector< int > &subtractedPeriods, const int firstPairIndex, const int secondPairIndex, const double alpha=1) | |
Constructor. More... | |
Public Member Functions inherited from Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator | |
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 |
Private Member Functions | |
API::MatrixWorkspace_sptr | asymmetryCalc (const API::Workspace_sptr &inputWS) const |
Calculate asymmetry for the given workspace. More... | |
Private Attributes | |
const double | m_alpha |
Alpha value of the pair. More... | |
const int | m_firstPairIndex |
Workspace index of the first group of the pair. More... | |
const int | m_secondPairIndex |
Workspace index of the second group of the pair. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator | |
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 inherited from Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator | |
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... | |
MuonPairAsymmetryCalculator : Calculates asymmetry for a given pair of groups, given the alpha value.
Definition at line 17 of file MuonPairAsymmetryCalculator.h.
Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::MuonPairAsymmetryCalculator | ( | const API::WorkspaceGroup_sptr & | inputWS, |
const std::vector< int > & | summedPeriods, | ||
const std::vector< int > & | subtractedPeriods, | ||
const int | firstPairIndex, | ||
const int | secondPairIndex, | ||
const double | alpha = 1 |
||
) |
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 |
firstPairIndex | :: [input] Workspace index of the first (forward) group of the pair |
secondPairIndex | :: [input] Workspace index of the second (backward) group of the pair |
alpha | :: [input] Alpha (balance) value of the pair |
Definition at line 28 of file MuonPairAsymmetryCalculator.cpp.
|
private |
Calculate asymmetry for the given workspace.
Performs asymmetry calculation on the given workspace.
inputWS | :: [input] Workspace to calculate asymmetry from |
Definition at line 74 of file MuonPairAsymmetryCalculator.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance(), m_alpha, m_firstPairIndex, and m_secondPairIndex.
Referenced by calculate().
|
overridevirtual |
Performs pair asymmetry calculation.
Calculates asymmetry for the given pair of groups, using the alpha value provided.
Implements Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator.
Definition at line 41 of file MuonPairAsymmetryCalculator.cpp.
References asymmetryCalc(), Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::m_inputWS, Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::m_subtractedPeriods, Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::m_summedPeriods, Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::subtractWorkspaces(), and Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::sumPeriods().
|
private |
Alpha value of the pair.
Definition at line 31 of file MuonPairAsymmetryCalculator.h.
Referenced by asymmetryCalc().
|
private |
Workspace index of the first group of the pair.
Definition at line 34 of file MuonPairAsymmetryCalculator.h.
Referenced by asymmetryCalc().
|
private |
Workspace index of the second group of the pair.
Definition at line 37 of file MuonPairAsymmetryCalculator.h.
Referenced by asymmetryCalc().