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
13#include <vector>
14
15namespace Mantid {
16namespace WorkflowAlgorithms {
17
22public:
23 IMuonAsymmetryCalculator(API::WorkspaceGroup_sptr inputWS, std::vector<int> summedPeriods,
24 std::vector<int> subtractedPeriods);
25 virtual ~IMuonAsymmetryCalculator() = default;
28
29protected:
31 API::MatrixWorkspace_sptr sumPeriods(const std::vector<int> &periodsToSum) const;
32
34 API::MatrixWorkspace_sptr subtractWorkspaces(const API::MatrixWorkspace_sptr &lhs,
35 const API::MatrixWorkspace_sptr &rhs) const;
36
38 API::MatrixWorkspace_sptr extractSpectrum(const API::Workspace_sptr &inputWS, const int index) const;
39
42
44 const std::vector<int> m_summedPeriods;
45
47 const std::vector<int> m_subtractedPeriods;
48};
49
50} // namespace WorkflowAlgorithms
51} // namespace Mantid
const std::vector< double > & rhs
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
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
Definition: Workspace_fwd.h:20
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.