Mantid
Loading...
Searching...
No Matches
MDTransfNoQ.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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
13namespace Mantid {
14namespace MDAlgorithms {
15
24class MANTID_MDALGORITHMS_DLL MDTransfNoQ : public MDTransfInterface {
25public:
28 const std::string transfID() const override; // {return "NoQ"; }
29 // calc target coordinates interface:
30 bool calcGenericVariables(std::vector<coord_t> &Coord, size_t nd) override;
31 bool calcYDepCoordinates(std::vector<coord_t> &Coord, size_t i) override;
32 bool calcMatrixCoord(const double &X, std::vector<coord_t> &Coord, double &s, double &err) const override;
33 // constructor;
35 /* clone method allowing to provide the copy of the particular class */
36 MDTransfInterface *clone() const override { return new MDTransfNoQ(*this); }
37 // initializes the contents of the class
38 void initialize(const MDWSDescription &ConvParams) override;
39
43 std::vector<double> getExtremumPoints(const double xMin, const double xMax, size_t det_num) const override;
44
45 // WARNING!!!! THESE METHODS ARE USED BEFORE INITIALIZE IS EXECUTED SO THEY
46 // CAN NOT RELY ON THE CONTENTS OF THE CLASS TO BE DEFINED (THEY ARE VIRTUAL
47 // STATIC METHODS)
48 //***** output WS definition interface:
53 unsigned int getNMatrixDimensions(Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override;
56 std::vector<std::string> outputUnitID(Kernel::DeltaEMode::Type mode,
57 API::MatrixWorkspace_const_sptr inWS) const override;
58 std::vector<std::string> getDefaultDimID(Kernel::DeltaEMode::Type mode,
59 API::MatrixWorkspace_const_sptr inWS) const override;
60 const std::string inputUnitID(Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override;
61
62 void setDisplayNormalization(Mantid::API::IMDWorkspace_sptr mdWorkspace,
63 Mantid::API::MatrixWorkspace_sptr underlyingWorkspace) const override;
64
65private:
66 unsigned int m_NMatrixDim;
67 // the variables used for exchange data between different specific parts of
68 // the generic ND algorithm:
69 // pointer to Y axis of MD workspace
71
72 // pointer to the class, which contains the information about precprocessed
73 // detectors (fake in this case)
75 // min and max values for this conversion
76 std::vector<double> m_DimMin, m_DimMax;
81 std::vector<coord_t> m_AddDimCoordinates;
82
83private:
84 // internal helper function which extract one or two axis from input matrix
85 // workspace;
86 static void getAxes(const API::MatrixWorkspace_const_sptr &inWS, API::NumericAxis *&pXAxis,
87 API::NumericAxis *&pYAxis);
88};
89
90} // namespace MDAlgorithms
91} // namespace Mantid
Class to represent a numeric axis of a workspace.
Definition NumericAxis.h:29
Class for 3D vectors.
Definition V3D.h:34
Interface to set of sub-classes used by ConvertToMD algorithm and responsible for conversion of input...
Class responsible for conversion of input workspace data into proper number of output dimensions in N...
Definition MDTransfNoQ.h:24
MDTransfInterface * clone() const override
Definition MDTransfNoQ.h:36
const std::string transfID() const override
the name, this ChildAlgorithm is known to users (will appear in selection list)
std::vector< double > m_DimMax
Definition MDTransfNoQ.h:76
std::vector< coord_t > m_AddDimCoordinates
the vector of the additional coordinates which define additional MD dimensions.
Definition MDTransfNoQ.h:81
helper class describes the properties of target MD workspace, which should be obtained as the result ...
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
Type
Define the available energy transfer modes It is important to assign enums proper numbers,...
Definition DeltaEMode.h:29