Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator Class Reference

MuonPairAsymmetryCalculator : Calculates asymmetry for a given pair of groups, given the alpha value. More...

#include <MuonPairAsymmetryCalculator.h>

Inheritance diagram for Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator:
Mantid::WorkflowAlgorithms::IMuonAsymmetryCalculator

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...
 

Detailed Description

MuonPairAsymmetryCalculator : Calculates asymmetry for a given pair of groups, given the alpha value.

Definition at line 17 of file MuonPairAsymmetryCalculator.h.

Constructor & Destructor Documentation

◆ MuonPairAsymmetryCalculator()

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.

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
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.

Member Function Documentation

◆ asymmetryCalc()

MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::asymmetryCalc ( const API::Workspace_sptr inputWS) const
private

Calculate asymmetry for the given workspace.

Performs asymmetry calculation on the given workspace.

Parameters
inputWS:: [input] Workspace to calculate asymmetry from
Returns
Result of the calculation

Definition at line 74 of file MuonPairAsymmetryCalculator.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), m_alpha, m_firstPairIndex, and m_secondPairIndex.

Referenced by calculate().

◆ calculate()

MatrixWorkspace_sptr Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::calculate ( ) const
overridevirtual

Member Data Documentation

◆ m_alpha

const double Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::m_alpha
private

Alpha value of the pair.

Definition at line 31 of file MuonPairAsymmetryCalculator.h.

Referenced by asymmetryCalc().

◆ m_firstPairIndex

const int Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::m_firstPairIndex
private

Workspace index of the first group of the pair.

Definition at line 34 of file MuonPairAsymmetryCalculator.h.

Referenced by asymmetryCalc().

◆ m_secondPairIndex

const int Mantid::WorkflowAlgorithms::MuonPairAsymmetryCalculator::m_secondPairIndex
private

Workspace index of the second group of the pair.

Definition at line 37 of file MuonPairAsymmetryCalculator.h.

Referenced by asymmetryCalc().


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