Mantid
Loading...
Searching...
No Matches
CalculateEfficiency.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"
14#include "MantidAlgorithms/DllConfig.h"
15
16namespace Mantid {
17namespace Algorithms {
51class MANTID_ALGORITHMS_DLL CalculateEfficiency final : public API::Algorithm {
52public:
54 const std::string name() const override { return "CalculateEfficiency"; }
56 const std::string summary() const override { return "Calculates the detector efficiency for a SANS instrument."; }
57
59 int version() const override { return (1); }
61 const std::string category() const override { return "SANS;CorrectionFunctions\\EfficiencyCorrections"; }
62
63private:
64 // Overridden Algorithm methods
65 void init() override;
66 void exec() override;
67
69 void sumUnmaskedDetectors(const API::MatrixWorkspace_sptr &rebinnedWS, double &sum, double &error, int &nPixels);
70
72 void normalizeDetectors(const API::MatrixWorkspace_sptr &rebinnedWS, const API::MatrixWorkspace_sptr &outputWS,
73 double sum, double error, int nPixels, double min_eff, double max_eff);
74
75 void maskComponent(API::MatrixWorkspace &ws, const std::string &componentName);
76 void maskEdges(const API::MatrixWorkspace_sptr &ws, int left, int right, int high, int low,
77 const std::string &componentName);
78};
79
80} // namespace Algorithms
81} // namespace Mantid
double error
Definition: IndexPeaks.cpp:133
double left
Definition: LineProfile.cpp:80
double right
Definition: LineProfile.cpp:81
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Base MatrixWorkspace Abstract Class.
Compute relative detector pixel efficiency from flood data as part of SANS reduction.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.