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
19namespace Mantid {
20namespace API {
21class Sample;
22}
23namespace Geometry {
24class Instrument;
25}
26
27namespace Algorithms {
28class DetectorGridDefinition;
29class MCInteractionVolume;
30
34class MANTID_ALGORITHMS_DLL XrayAbsorptionCorrection : public API::Algorithm {
35public:
36 virtual ~XrayAbsorptionCorrection() = default;
38 const std::string name() const override { return "XrayAbsorptionCorrection"; }
40 int version() const override { return 1; }
42 const std::string category() const override { return "CorrectionFunctions\\AbsorptionCorrections"; }
44 const std::string summary() const override {
45 return "Calculates attenuation of xrays produced by negative muons due"
46 " to absorption in a sample for elemental analysis ";
47 }
48 const std::vector<std::string> seeAlso() const override { return {"SetSample", "SetSampleMaterial"}; }
49
50protected:
51 double degreesToRadians(double degrees);
52
53 Kernel::V3D calculateDetectorPos(double const detectorAngle, double detectorDistance);
54
55 std::vector<Kernel::V3D> calculateMuonPos(API::MatrixWorkspace_sptr &muonProfile,
56 const API::MatrixWorkspace_sptr &inputWS, double detectorDistance);
57
58 std::vector<double> normaliseMuonIntensity(MantidVec muonIntensity);
59
60private:
61 void init() override;
62 void exec() override;
63 std::map<std::string, std::string> validateInputs() override;
64};
65} // namespace Algorithms
66} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
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.