Mantid
Loading...
Searching...
No Matches
EstimateScatteringVolumeCentreOfMass.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2025 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 "MantidAlgorithms/DllConfig.h"
13#include "MantidKernel/Matrix.h"
14#include "MantidKernel/V3D.h"
15
16namespace Mantid {
17
18namespace API {
19class Sample;
20}
21
22namespace Algorithms {
23
24class MANTID_ALGORITHMS_DLL EstimateScatteringVolumeCentreOfMass : public API::Algorithm {
25public:
29 const std::string category() const override { return "CorrectionFunctions\\EstimateScatteringVolumeCentreOfMass"; }
31 const std::string name() const override { return "EstimateScatteringVolumeCentreOfMass"; };
33 const std::string summary() const override {
34 return "Estimate the centre of mass of the illuminated volume of the sample";
35 }
36
38 int version() const override { return 1; };
39
41 double m_cubeSide;
42 const Kernel::V3D calcAveragePosition(const std::vector<Kernel::V3D> &pos);
43 const Kernel::V3D rasterizeGaugeVolumeAndCalculateMeanElementPosition(const Kernel::V3D beamDirection,
44 const Geometry::IObject_sptr integrationVolume,
45 const Geometry::IObject_sptr sampleObject);
46 const Geometry::IObject_sptr extractValidSampleObject(const API::Sample &sample);
52 const Kernel::V3D rasterizeLabGaugeAndCalculateMeanElementPosition(const Geometry::IObject &sampleObject,
53 const Kernel::Matrix<double> &gonioR);
54
55private:
57 void init() override;
59 void exec() override;
60};
61
62} // namespace Algorithms
63} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
This class stores information about the sample used in particular run.
Definition Sample.h:33
const std::string name() const override
Algorithm's name for identification.
const std::string summary() const override
Summary of algorithms purpose.
int version() const override
Algorithm's version for identification.
API::MatrixWorkspace_sptr m_inputWS
A pointer to the input workspace.
const std::string category() const override
Algorithm's category for identification.
IObject : Interface for geometry objects.
Definition IObject.h:42
Numerical Matrix class.
Definition Matrix.h:42
Class for 3D vectors.
Definition V3D.h:34
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< IObject > IObject_sptr
Typdef for a shared pointer.
Definition IObject.h:93
Helper class which provides the Collimation Length for SANS instruments.