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/V3D.h"
14
15namespace Mantid {
16
17namespace API {
18class Sample;
19}
20
21namespace Algorithms {
22
23class MANTID_ALGORITHMS_DLL EstimateScatteringVolumeCentreOfMass : public API::Algorithm {
24public:
28 const std::string category() const override { return "CorrectionFunctions\\EstimateScatteringVolumeCentreOfMass"; }
30 const std::string name() const override { return "EstimateScatteringVolumeCentreOfMass"; };
32 const std::string summary() const override {
33 return "Estimate the centre of mass of the illuminated volume of the sample";
34 }
35
37 int version() const override { return 1; };
38
40 double m_cubeSide;
41 const Geometry::IObject_sptr getGaugeVolumeObject();
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);
47
48private:
50 void init() override;
52 void exec() override;
53};
54
55} // namespace Algorithms
56} // 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.
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.