Mantid
Loading...
Searching...
No Matches
PolarizationCorrectionWildes.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
11#include "MantidAlgorithms/DllConfig.h"
12
13namespace Mantid {
14namespace API {
15class ISpectrum;
16}
17
18namespace Algorithms {
19
25class MANTID_ALGORITHMS_DLL PolarizationCorrectionWildes final : public API::Algorithm {
26public:
27 const std::string name() const override;
28 int version() const override;
29 const std::string category() const override;
30 const std::string summary() const override;
31
32private:
34 struct WorkspaceMap {
39 size_t size() const noexcept;
40 };
41
44 const API::ISpectrum *P1{nullptr};
45 const API::ISpectrum *P2{nullptr};
46 const API::ISpectrum *F1{nullptr};
47 const API::ISpectrum *F2{nullptr};
48 };
49
50 void init() override;
51 void exec() override;
52 std::map<std::string, std::string> validateInputs() override;
53 void checkConsistentNumberHistograms(const WorkspaceMap &inputs);
54 void checkConsistentX(const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
55 EfficiencyMap efficiencyFactors();
56 WorkspaceMap directBeamCorrections(const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
57 WorkspaceMap analyzerlessCorrections(const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
58 WorkspaceMap twoInputCorrections(const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
59 WorkspaceMap threeInputCorrections(const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
60 WorkspaceMap fullCorrections(const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
61 API::WorkspaceGroup_sptr groupOutput(const WorkspaceMap &outputs);
62 WorkspaceMap mapInputsToDirections(const std::vector<std::string> &flippers);
63 void threeInputsSolve01(WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
64 void threeInputsSolve10(WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
65 void twoInputsSolve01And10(WorkspaceMap &fullInputs, const WorkspaceMap &inputs, const EfficiencyMap &efficiencies);
66};
67} // namespace Algorithms
68} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
A "spectrum" is an object that holds the data for a particular spectrum, in particular:
Definition: ISpectrum.h:39
PolarizationCorrectionWildes : This algorithm corrects for non-ideal component efficiencies in polari...
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.
A convenience set of workspaces corresponding flipper configurations.