Mantid
Loading...
Searching...
No Matches
SumOverlappingTubes.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 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#include "MantidAlgorithms/DllConfig.h"
10
11#include "MantidAPI/Algorithm.h"
13#include "MantidAPI/Progress.h"
14
15#include <list>
16
17namespace Mantid {
18namespace Algorithms {
19
24class MANTID_ALGORITHMS_DLL SumOverlappingTubes final : public API::Algorithm {
25public:
26 const std::string name() const override { return "SumOverlappingTubes"; }
27 const std::string category() const override { return "ILL\\Diffraction"; }
28 const std::string summary() const override {
29 return "Takes workspaces containing an instrument with PSD and tubes, and "
30 "converts to a workspace with counts as a function of height and "
31 "scattering angle. Detector scans with overlapping tubes are "
32 "supported.";
33 }
34 int version() const override { return 1; }
35 const std::vector<std::string> seeAlso() const override { return {"SumSpectra"}; }
36
37private:
38 void init() override;
39 void exec() override;
40
41 std::list<API::MatrixWorkspace_sptr> m_workspaceList;
42
45
49
52 std::vector<double> m_heightAxis;
53 std::string m_outputType;
54
55 void getInputParameters();
56 void getScatteringAngleBinning();
57 void getHeightAxis(const std::string &componentName);
58 std::vector<std::vector<double>> performBinning(API::MatrixWorkspace_sptr &outputWS);
59
60 double distanceFromAngle(const int angleIndex, const double angle) const;
61
63
64 std::unique_ptr<API::Progress> m_progress;
65};
66
67} // namespace Algorithms
68} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
SumOverlappingTubes : Converts workspaces containing an instrument with PSD tubes into a workspace wi...
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
const std::string summary() const override
function returns a summary message that will be displayed in the default GUI, and in the help.
std::list< API::MatrixWorkspace_sptr > m_workspaceList
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
std::unique_ptr< API::Progress > m_progress
holds the sign flipper for 2theta
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string category() const override
function to return a category of the algorithm.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.