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