Mantid
Loading...
Searching...
No Matches
IMuonAsymmetryCalculator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12#include "MantidWorkflowAlgorithms/DllConfig.h"
13
14#include <vector>
15
16namespace Mantid {
17namespace WorkflowAlgorithms {
18
22class MANTID_WORKFLOWALGORITHMS_DLL IMuonAsymmetryCalculator {
23public:
24 IMuonAsymmetryCalculator(API::WorkspaceGroup_sptr inputWS, std::vector<int> summedPeriods,
25 std::vector<int> subtractedPeriods);
26 virtual ~IMuonAsymmetryCalculator() = default;
29
30protected:
32 API::MatrixWorkspace_sptr sumPeriods(const std::vector<int> &periodsToSum) const;
33
35 API::MatrixWorkspace_sptr subtractWorkspaces(const API::MatrixWorkspace_sptr &lhs,
36 const API::MatrixWorkspace_sptr &rhs) const;
37
39 API::MatrixWorkspace_sptr extractSpectrum(const API::Workspace_sptr &inputWS, const int index) const;
40
43
45 const std::vector<int> m_summedPeriods;
46
48 const std::vector<int> m_subtractedPeriods;
49};
50
51} // namespace WorkflowAlgorithms
52} // namespace Mantid
const std::vector< double > & rhs
std::map< DeltaEMode::Type, std::string > index
IMuonAsymmetryCalculator : Abstract base class for muon asymmetry calculations.
const API::WorkspaceGroup_sptr m_inputWS
Input workspace.
const std::vector< int > m_subtractedPeriods
List of subtracted periods.
const std::vector< int > m_summedPeriods
List of summed periods.
virtual API::MatrixWorkspace_sptr calculate() const =0
Overridden in derived classes to perform asymmetry calculation.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.