Mantid
Loading...
Searching...
No Matches
FindCenterOfMassPosition2.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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"
16
17namespace Mantid {
18namespace Algorithms {
50class MANTID_ALGORITHMS_DLL FindCenterOfMassPosition2 final : public API::Algorithm {
51public:
53 const std::string name() const override { return "FindCenterOfMassPosition"; }
55 const std::string summary() const override { return "Finds the beam center in a 2D SANS data set."; }
56
58 int version() const override { return (2); }
59
61 const std::string category() const override { return "SANS"; }
62
63private:
65 void init() override;
67 void exec() override;
69 void findCenterOfMass(const API::MatrixWorkspace_sptr &inputWS, double &centerX, double &centerY, const int numSpec,
70 API::Progress &progress);
71 void storeOutputWorkspace(double centerX, double centerY);
72 // Iteration cutoff
73 const int m_maxIteration = 200;
74};
75
76} // namespace Algorithms
77} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Helper class for reporting progress from algorithms.
Definition: Progress.h:25
const std::string category() const override
Algorithm's category for identification.
const std::string name() const override
Algorithm's name.
int version() const override
Algorithm's version.
const std::string summary() const override
Summary of algorithms purpose.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.