Mantid
Loading...
Searching...
No Matches
ReflectometryTransform.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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 "MantidDataObjects/DllConfig.h"
13
15#include <memory>
16
17namespace Mantid {
18namespace API {
19class MatrixWorkspace;
20}
21namespace DataObjects {
22
23class CalculateReflectometry;
24class TableWorkspace;
25
29struct MANTID_DATAOBJECTS_DLL DetectorAngularCache {
30 std::vector<double> twoThetaWidths;
31 std::vector<double> twoThetas;
32 std::vector<double> detectorHeights;
33};
34
40class MANTID_DATAOBJECTS_DLL ReflectometryTransform {
41protected:
42 const size_t m_d0NumBins;
43 const size_t m_d1NumBins;
44 const double m_d0Min;
45 const double m_d1Min;
46 const double m_d0Max;
47 const double m_d1Max;
48 const std::string m_d0Label;
49 const std::string m_d1Label;
50 const std::string m_d0ID;
51 const std::string m_d1ID;
52 std::shared_ptr<CalculateReflectometry> m_calculator;
53
54 std::shared_ptr<DataObjects::MDEventWorkspace2Lean>
55 createMDWorkspace(const Geometry::IMDDimension_sptr &, const Geometry::IMDDimension_sptr &,
56 const API::BoxController_sptr &boxController) const;
57
58public:
59 // Execute the strategy to produce a transformed, output MDWorkspace
61 const Mantid::API::BoxController_sptr &boxController,
63
64 // Execute the strategy to produce a transformed, output group of Matrix (2D)
65 // Workspaces
67
70 std::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes,
71 bool dumpVertexes, const std::string &outputDimensions) const;
72
74 virtual ~ReflectometryTransform() = default;
75 ReflectometryTransform(std::string d0Label, std::string d0ID, double d0Min, double d0Max, std::string d1Label,
76 std::string d1ID, double d1Min, double d1Max, size_t d0NumBins, size_t d1NumBins,
78};
79
81MANTID_DATAOBJECTS_DLL MantidVec createXAxis(Mantid::API::MatrixWorkspace *const ws, const double gradX,
82 const double cxToUnit, const size_t nBins, const std::string &caption,
83 const std::string &units);
84
86MANTID_DATAOBJECTS_DLL void createVerticalAxis(Mantid::API::MatrixWorkspace *const ws, const MantidVec &xAxisVec,
87 const double gradY, const double cyToUnit, const size_t nBins,
88 const std::string &caption, const std::string &units);
89
92
93// Helper typedef for scoped pointer of this type.
94using ReflectometryTransform_sptr = std::shared_ptr<ReflectometryTransform>;
95} // namespace DataObjects
96} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base MatrixWorkspace Abstract Class.
Provides a common interface to Reflectometry Transform calculators.
ReflectometryMDTransform : Base type for reflectometry transforms to MDWorkspaces.
std::shared_ptr< CalculateReflectometry > m_calculator
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< IMDHistoWorkspace > IMDHistoWorkspace_sptr
shared pointer to Mantid::API::IMDHistoWorkspace
std::shared_ptr< BoxController > BoxController_sptr
Shared ptr to BoxController.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
MANTID_DATAOBJECTS_DLL void createVerticalAxis(Mantid::API::MatrixWorkspace *const ws, const MantidVec &xAxisVec, const double gradY, const double cyToUnit, const size_t nBins, const std::string &caption, const std::string &units)
Create a new y(vertical)-axis for the output workspace.
MANTID_DATAOBJECTS_DLL DetectorAngularCache initAngularCaches(const Mantid::API::MatrixWorkspace *const workspace)
Create angular caches.
MANTID_DATAOBJECTS_DLL MantidVec createXAxis(Mantid::API::MatrixWorkspace *const ws, const double gradX, const double cxToUnit, const size_t nBins, const std::string &caption, const std::string &units)
Create a new x-axis for the output workspace.
std::shared_ptr< ReflectometryTransform > ReflectometryTransform_sptr
std::unique_ptr< MDFrame > MDFrame_uptr
Definition: MDFrame.h:36
std::shared_ptr< IMDDimension > IMDDimension_sptr
Shared Pointer for IMDDimension. Frequently used type in framework.
Definition: IMDDimension.h:98
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
Definition: cow_ptr.h:172
Simple container for porting detector angular information.