Mantid
Loading...
Searching...
No Matches
NormaliseByPeakArea.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
10#include "MantidCurveFitting/DllConfig.h"
12
13namespace Mantid {
14
15namespace HistogramData {
16class HistogramY;
17class HistogramE;
18} // namespace HistogramData
19
20namespace CurveFitting {
21namespace Algorithms {
22
23class MANTID_CURVEFITTING_DLL NormaliseByPeakArea final : public API::Algorithm {
24public:
26
27 const std::string name() const override;
29 const std::string summary() const override {
30 return "Normalises the input data by the area of of peak defined by the "
31 "input mass value.";
32 }
33
34 const std::vector<std::string> seeAlso() const override { return {"MonitorEfficiencyCorUser", "Divide"}; }
35
36 int version() const override;
37 const std::string category() const override;
38
39private:
40 void init() override;
41 void exec() override;
42
44 void retrieveInputs();
46 void createOutputWorkspaces(const API::MatrixWorkspace_sptr &yspaceIn);
48 void setUnitsToMomentum(const API::MatrixWorkspace_sptr &workspace);
49
51 API::MatrixWorkspace_sptr convertInputToY();
53 double fitToMassPeak(const API::MatrixWorkspace_sptr &yspace, const size_t index);
55 void normaliseTOFData(const double area, const size_t index);
57 void saveToOutput(const API::MatrixWorkspace_sptr &accumWS, const Kernel::cow_ptr<HistogramData::HistogramY> &yValues,
58 const Kernel::cow_ptr<HistogramData::HistogramE> &eValues, const size_t index);
60 void symmetriseYSpace();
61
64 double m_mass;
75
77 std::unique_ptr<API::Progress> m_progress;
78};
79
80} // namespace Algorithms
81} // namespace CurveFitting
82} // namespace Mantid
std::string name
Definition Run.cpp:60
IPeaksWorkspace_sptr workspace
std::map< DeltaEMode::Type, std::string > index
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
const std::string summary() const override
Summary of algorithms purpose.
API::MatrixWorkspace_sptr m_normalisedWS
Normalised output in TOF.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
API::MatrixWorkspace_sptr m_symmetrisedWS
Fitted output.
API::MatrixWorkspace_sptr m_yspaceWS
Input data converted (and possible summed) to Y space.
bool m_sumResults
Flag to indicate if results are to be summed.
std::unique_ptr< API::Progress > m_progress
Reporting.
API::MatrixWorkspace_sptr m_fittedWS
Fitted output.
Implements a copy on write data template.
Definition cow_ptr.h:41
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.