Mantid
Loading...
Searching...
No Matches
UnwrapSNS.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidAlgorithms/DllConfig.h"
15
16namespace Mantid {
17namespace Algorithms {
34class MANTID_ALGORITHMS_DLL UnwrapSNS final : public API::Algorithm {
35public:
36 UnwrapSNS();
37 ~UnwrapSNS() override = default;
38 const std::string name() const override { return "UnwrapSNS"; }
40 const std::string summary() const override {
41 return "Takes an input workspace that contains 'raw' data, unwraps the "
42 "data according to the reference flightpath provided and converts "
43 "the units to wavelength. The output workspace will have common "
44 "bins in the maximum theoretical wavelength range.";
45 }
46
47 int version() const override { return 1; }
48
49 const std::string category() const override { return "CorrectionFunctions\\InstrumentCorrections"; }
50
51private:
52 void init() override;
53 void exec() override;
54 void execEvent();
55 void runMaskDetectors();
56
57 int unwrapX(const Mantid::HistogramData::HistogramX &, std::vector<double> &dataout, const double &Ld);
58 void getTofRangeData(const bool);
63 double m_LRef;
64 double m_Tmin;
65 double m_Tmax;
66 double m_frameWidth;
68 int m_XSize;
70 std::unique_ptr<API::Progress> m_progress;
71};
72
73} // namespace Algorithms
74} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Takes an input Workspace2D that contains 'raw' data, unwraps the data according to the reference flig...
Definition: UnwrapSNS.h:34
double m_conversionConstant
The constant used in the conversion from TOF.
Definition: UnwrapSNS.h:59
double m_Tmin
The start of the time-of-flight frame.
Definition: UnwrapSNS.h:64
double m_Tmax
The end of the time-of-flight frame.
Definition: UnwrapSNS.h:65
double m_frameWidth
The width of the frame cached to speed up things.
Definition: UnwrapSNS.h:66
double m_LRef
The 'reference' flightpath.
Definition: UnwrapSNS.h:63
DataObjects::EventWorkspace_const_sptr m_inputEvWS
Pointer to the input event workspace.
Definition: UnwrapSNS.h:62
API::MatrixWorkspace_const_sptr m_inputWS
to wavelength
Definition: UnwrapSNS.h:61
int m_XSize
The size of the X vectors in the input workspace.
Definition: UnwrapSNS.h:68
std::unique_ptr< API::Progress > m_progress
Progress reporting.
Definition: UnwrapSNS.h:70
~UnwrapSNS() override=default
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Definition: UnwrapSNS.h:38
const std::string summary() const override
Summary of algorithms purpose.
Definition: UnwrapSNS.h:40
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
Definition: UnwrapSNS.h:47
const std::string category() const override
function to return a category of the algorithm.
Definition: UnwrapSNS.h:49
int m_numberOfSpectra
The number of spectra in the workspace.
Definition: UnwrapSNS.h:67
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< const EventWorkspace > EventWorkspace_const_sptr
shared pointer to a const Workspace2D
Helper class which provides the Collimation Length for SANS instruments.