|
Mantid
|
MuonGroupAsymmetryCalculator : Calculates asymmetry between given group (specified via GroupIndex) and Muon exponential decay. More...
#include <MuonGroupAsymmetryCalculator.h>
Public Member Functions | |
| API::MatrixWorkspace_sptr | calculate () const override |
| Performs group asymmetry calculation. More... | |
| MuonGroupAsymmetryCalculator (const API::WorkspaceGroup_sptr &inputWS, const std::vector< int > &summedPeriods, const std::vector< int > &subtractedPeriods, const int groupIndex, const double start=0.0, const double end=30.0, const std::string &wsName="") | |
| Constructor. More... | |
Public Member Functions inherited from Mantid::WorkflowAlgorithms::MuonGroupCalculator | |
| MuonGroupCalculator (const Mantid::API::WorkspaceGroup_sptr &inputWS, const std::vector< int > &summedPeriods, const std::vector< int > &subtractedPeriods, const int groupIndex) | |
| Constructor. More... | |
| void | setStartEnd (const double start, const double end) |
| void | setWSName (const std::string &wsName) |
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 | estimateAsymmetry (const API::Workspace_sptr &inputWS, const int index) const |
| Estimate the asymmetrey for the given workspace (TF data). More... | |
| API::MatrixWorkspace_sptr | removeExpDecay (const API::Workspace_sptr &inputWS, const int index) const |
| Removes exponential decay from the workspace. 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::MuonGroupCalculator | |
| double | m_endX |
| const int | m_groupIndex |
| Workspace index of the group to analyse. More... | |
| double | m_startX |
| std::string | m_wsName |
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... | |
MuonGroupAsymmetryCalculator : Calculates asymmetry between given group (specified via GroupIndex) and Muon exponential decay.
Definition at line 17 of file MuonGroupAsymmetryCalculator.h.
| Mantid::WorkflowAlgorithms::MuonGroupAsymmetryCalculator::MuonGroupAsymmetryCalculator | ( | const API::WorkspaceGroup_sptr & | inputWS, |
| const std::vector< int > & | summedPeriods, | ||
| const std::vector< int > & | subtractedPeriods, | ||
| const int | groupIndex, | ||
| const double | start = 0.0, |
||
| const double | end = 30.0, |
||
| const std::string & | wsName = "" |
||
| ) |
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 |
| start | is the start time |
| end | is the end time |
| groupIndex | :: [input] Workspace index of the group to analyse |
| wsName | :: the name of the workspace (for normalization table) |
Definition at line 34 of file MuonGroupAsymmetryCalculator.cpp.
References Mantid::WorkflowAlgorithms::MuonGroupCalculator::setStartEnd(), and Mantid::WorkflowAlgorithms::MuonGroupCalculator::setWSName().
|
overridevirtual |
Performs group asymmetry calculation.
Calculates asymmetry between given group (specified via group index) and Muon exponential decay.
Implements Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator.
Definition at line 49 of file MuonGroupAsymmetryCalculator.cpp.
References estimateAsymmetry(), Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::extractSpectrum(), Mantid::WorkflowAlgorithms::MuonGroupCalculator::m_groupIndex, 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 |
Estimate the asymmetrey for the given workspace (TF data).
| inputWS | :: [input] Workspace to calculate asymmetry for |
| index | :: [input] GroupIndex (fit only the requested spectrum): use -1 for "unset" |
Definition at line 120 of file MuonGroupAsymmetryCalculator.cpp.
References Mantid::API::AnalysisDataServiceImpl::addOrReplace(), Mantid::Kernel::DataService< T >::doesExist(), Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator::extractSpectrum(), Mantid::WorkflowAlgorithms::getStoredNorm(), index, Mantid::Kernel::SingletonHolder< T >::Instance(), Mantid::WorkflowAlgorithms::MuonGroupCalculator::m_endX, Mantid::WorkflowAlgorithms::MuonGroupCalculator::m_startX, and Mantid::WorkflowAlgorithms::MuonGroupCalculator::m_wsName.
Referenced by calculate().
|
private |
Removes exponential decay from the workspace.
Removes exponential decay from the given workspace.
| inputWS | :: [input] Workspace to remove decay from |
| index | :: [input] GroupIndex (fit only the requested spectrum): use -1 for "unset" |
Definition at line 92 of file MuonGroupAsymmetryCalculator.cpp.
References index, and Mantid::Kernel::SingletonHolder< T >::Instance().