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
28class MANTID_MDALGORITHMS_DLL MDTransfNoQ : public MDTransfInterface {
29public:
32 const std::string transfID() const override; // {return "NoQ"; }
33 // calc target coordinates interface:
34 bool calcGenericVariables(std::vector<coord_t> &Coord, size_t nd) override;
35 bool calcYDepCoordinates(std::vector<coord_t> &Coord, size_t i) override;
36 bool calcMatrixCoord(const double &X, std::vector<coord_t> &Coord, double &s, double &err) const override;
37 // constructor;
39 /* clone method allowing to provide the copy of the particular class */
40 MDTransfInterface *clone() const override { return new MDTransfNoQ(*this); }
41 // initializes the contents of the class
42 void initialize(const MDWSDescription &ConvParams) override;
43
47 std::vector<double> getExtremumPoints(const double xMin, const double xMax, size_t det_num) const override;
48
49 // WARNING!!!! THESE METHODS ARE USED BEFORE INITIALIZE IS EXECUTED SO THEY
50 // CAN NOT RELY ON THE CONTENTS OF THE CLASS TO BE DEFINED (THEY ARE VIRTUAL
51 // STATIC METHODS)
52 //***** output WS definition interface:
57 unsigned int getNMatrixDimensions(Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override;
60 std::vector<std::string> outputUnitID(Kernel::DeltaEMode::Type mode,
61 API::MatrixWorkspace_const_sptr inWS) const override;
62 std::vector<std::string> getDefaultDimID(Kernel::DeltaEMode::Type mode,
63 API::MatrixWorkspace_const_sptr inWS) const override;
64 const std::string inputUnitID(Kernel::DeltaEMode::Type mode, API::MatrixWorkspace_const_sptr inWS) const override;
65
66 void setDisplayNormalization(Mantid::API::IMDWorkspace_sptr mdWorkspace,
67 Mantid::API::MatrixWorkspace_sptr underlyingWorkspace) const override;
68
69private:
70 unsigned int m_NMatrixDim;
71 // the variables used for exchange data between different specific parts of
72 // the generic ND algorithm:
73 // pointer to Y axis of MD workspace
75
76 // pointer to the class, which contains the information about precprocessed
77 // detectors (fake in this case)
79 // min and max values for this conversion
80 std::vector<double> m_DimMin, m_DimMax;
85 std::vector<coord_t> m_AddDimCoordinates;
86
87private:
88 // internal helper function which extract one or two axis from input matrix
89 // workspace;
90 static void getAxes(const API::MatrixWorkspace_const_sptr &inWS, API::NumericAxis *&pXAxis,
91 API::NumericAxis *&pYAxis);
92};
93
94} // namespace MDAlgorithms
95} // 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:28
MDTransfInterface * clone() const override
Definition: MDTransfNoQ.h:40
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:80
std::vector< coord_t > m_AddDimCoordinates
the vector of the additional coordinates which define additional MD dimensions.
Definition: MDTransfNoQ.h:85
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.
Definition: IMDWorkspace.h:146
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