Mantid
Loading...
Searching...
No Matches
MDTransfQ3D.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
31class MANTID_MDALGORITHMS_DLL MDTransfQ3D : public MDTransfModQ {
32public:
35 const std::string transfID() const override;
36 bool calcYDepCoordinates(std::vector<coord_t> &Coord, size_t i) override;
37 bool calcMatrixCoord(const double &deltaEOrK0, std::vector<coord_t> &Coord, double &s, double &err) const override;
38 // constructor;
40 /* clone method allowing to provide the copy of the particular class */
41 MDTransfInterface *clone() const override { return new MDTransfQ3D(*this); }
42 //
43 void initialize(const MDWSDescription &ConvParams) override;
44
45 std::vector<double> getExtremumPoints(const double xMin, const double xMax, size_t det_num) const override;
46
47 // WARNING!!!! THESE METHODS ARE USED BEFORE INITIALIZE IS EXECUTED SO THEY
48 // CAN NOT RELY ON THE CONTENTS OF THE CLASS (THEY ARE VIRTUAL STATIC METHODS)
53 unsigned int
54 getNMatrixDimensions(Kernel::DeltaEMode::Type mode,
58 std::vector<std::string>
59 outputUnitID(Kernel::DeltaEMode::Type dEmode,
62 std::vector<std::string>
63 getDefaultDimID(Kernel::DeltaEMode::Type dEmode,
65
66protected:
67 // the variable which verifies if Lorentz corrections have to be calculated in
68 // Elastic mode;
70 // pointer to the array of precalculated sin^2(Theta) values for all
71 // detectors, used if Lorentz corrections calculations are requested
72 double const *m_SinThetaSqArray;
73 // the vector containing precaluclated sin^2(theta) values
74 std::vector<double> SinThetaSq;
75 // current value of Sin(Theta)^2 corresponding to the current detector value
76 // and used to calculate Lorentz corrections
78 // ki-kf for Inelastic convention; kf-ki for Crystallography convention
79 std::string convention;
80 // all other variables are the same as in ModQ
81 // hole near origin of Q
82 double m_AbsMin;
83
84private:
86 inline bool calcMatrixCoord3DElastic(const double &k0, std::vector<coord_t> &Coord, double &signal,
87 double &errSq) const;
89 inline bool calcMatrixCoord3DInelastic(const double &deltaE, std::vector<coord_t> &Coord) const;
90};
91
92} // namespace MDAlgorithms
93} // namespace Mantid
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 for ...
Definition: MDTransfModQ.h:30
Class responsible for conversion of input workspace data into proper number of output dimensions for ...
Definition: MDTransfQ3D.h:31
const std::string transfID() const override
the name, this ChildAlgorithm is known to users (will appear in selection list)
MDTransfInterface * clone() const override
Definition: MDTransfQ3D.h:41
std::vector< double > SinThetaSq
Definition: MDTransfQ3D.h:74
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)
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