Mantid
Loading...
Searching...
No Matches
XrayAbsorptionCorrection.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2020 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"
18
19#include <span>
20
21namespace Mantid {
22namespace API {
23class Sample;
24}
25namespace Geometry {
26class Instrument;
27}
28
29namespace Algorithms {
30class DetectorGridDefinition;
31class MCInteractionVolume;
32
36class MANTID_ALGORITHMS_DLL XrayAbsorptionCorrection : public API::Algorithm {
37public:
38 ~XrayAbsorptionCorrection() override = default;
40 const std::string name() const override { return "XrayAbsorptionCorrection"; }
42 int version() const override { return 1; }
44 const std::string category() const override { return "CorrectionFunctions\\AbsorptionCorrections"; }
46 const std::string summary() const override {
47 return "Calculates attenuation of xrays produced by negative muons due"
48 " to absorption in a sample for elemental analysis ";
49 }
50 const std::vector<std::string> seeAlso() const override { return {"SetSample", "SetSampleMaterial"}; }
51
52protected:
53 double degreesToRadians(double degrees);
54
55 Kernel::V3D calculateDetectorPos(double const detectorAngle, double detectorDistance);
56
57 std::vector<Kernel::V3D> calculateMuonPos(API::MatrixWorkspace_sptr &muonProfile,
58 const API::MatrixWorkspace_sptr &inputWS, double detectorDistance);
59
60 std::vector<double> normaliseMuonIntensity(std::span<double const> muonIntensity);
61
62private:
63 void init() override;
64 void exec() override;
65 std::map<std::string, std::string> validateInputs() override;
66};
67} // namespace Algorithms
68} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Calculates attenuation of xrays due to absorption in a sample.
int version() const override
Algorithm's version.
const std::string category() const override
Algorithm's category for identification.
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Class for 3D vectors.
Definition V3D.h:34
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.