Mantid
Loading...
Searching...
No Matches
ConvertToYSpace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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
11#include "MantidCurveFitting/DllConfig.h"
14
15namespace Mantid {
16
17namespace Kernel {
18class V3D;
19}
20
21namespace Geometry {
22class ParameterMap;
23}
24
25namespace CurveFitting {
26namespace Algorithms {
27
31 double l1;
32 double l2;
34 double theta;
35 double t0;
36 double efixed;
37};
38
44class MANTID_CURVEFITTING_DLL ConvertToYSpace final : public API::Algorithm {
45public:
48
49 const std::string name() const override;
51 const std::string summary() const override {
52 return "Converts workspace in units of TOF to Y-space as defined in "
53 "Compton scattering field";
54 }
55
56 int version() const override;
57 const std::string category() const override;
58
61 static DetectorParams getDetectorParameters(const API::MatrixWorkspace_const_sptr &ws, const size_t index);
63 static double getComponentParameter(const Geometry::IComponent &det, const Geometry::ParameterMap &pmap,
64 const std::string &name);
66 static void calculateY(double &yspace, double &qspace, double &ei, const double mass, const double tsec,
67 const double k1, const double v1, const DetectorParams &detpar);
68
69private:
70 void init() override;
71 void exec() override;
72
74 bool convert(const size_t index);
76 void retrieveInputs();
78 void createOutputWorkspace();
80 void cacheInstrumentGeometry();
81
85 double m_mass;
87 double m_l1;
90
94};
95
96} // namespace Algorithms
97} // namespace CurveFitting
98} // namespace Mantid
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Takes a workspace with X axis in TOF and converts it to Y-space where the transformation is defined b...
API::MatrixWorkspace_sptr m_outputWS
Output workspace.
const std::string summary() const override
Summary of algorithms purpose.
API::MatrixWorkspace_sptr m_inputWS
Input workspace.
base class for Geometric IComponent
Definition: IComponent.h:51
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
Generate a tableworkspace to store the calibration results.
Simple data structure to store nominal detector values It avoids some functions taking a huge number ...
double theta
scattering angle in radians
double l1
source-sample distance in metres
double l2
sample-detector distance in metres