Mantid
Loading...
Searching...
No Matches
PeaksIntersection.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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 "MantidCrystal/DllConfig.h"
11#include "MantidKernel/V3D.h"
12
13namespace Mantid {
14namespace Crystal {
15
16using VecV3D = std::vector<Mantid::Kernel::V3D>;
17using VecVecV3D = std::vector<VecV3D>;
18
23class MANTID_CRYSTAL_DLL PeaksIntersection : public API::Algorithm {
24public:
25 static std::string detectorSpaceFrame();
26 static std::string qLabFrame();
27 static std::string qSampleFrame();
28 static std::string hklFrame();
30 virtual int numberOfFaces() const = 0;
31
32protected:
33 ~PeaksIntersection() = default;
35 void initBaseProperties();
36
38 void executePeaksIntersection(const bool checkPeakExtents = true);
39
41 double getPeakRadius() const;
42
43private:
45 virtual void validateExtentsInput() const = 0;
47 virtual VecVecV3D createFaces() const = 0;
49 virtual bool pointOutsideAnyExtents(const Mantid::Kernel::V3D &testPoint) const = 0;
51 virtual bool pointInsideAllExtents(const Mantid::Kernel::V3D &testPoints,
52 const Mantid::Kernel::V3D &peakCenter) const = 0;
53
56 virtual void checkTouchPoint(const Mantid::Kernel::V3D &touchPoint, const Mantid::Kernel::V3D &normal,
57 const Mantid::Kernel::V3D &faceVertex) const = 0;
58
59 // The peak radius.
60 double m_peakRadius = 0.0;
61};
62
63} // namespace Crystal
64} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
PeaksIntersection : Abstract base algorithm class for algorithms that identify peaks interacting with...
virtual VecVecV3D createFaces() const =0
Create all faces.
virtual void checkTouchPoint(const Mantid::Kernel::V3D &touchPoint, const Mantid::Kernel::V3D &normal, const Mantid::Kernel::V3D &faceVertex) const =0
Verfifies that the normals have been set up correctly such that the touch point falls onto the plane.
virtual bool pointOutsideAnyExtents(const Mantid::Kernel::V3D &testPoint) const =0
Check that a point is outside any of the extents.
virtual void validateExtentsInput() const =0
Validate the input extents.
virtual bool pointInsideAllExtents(const Mantid::Kernel::V3D &testPoints, const Mantid::Kernel::V3D &peakCenter) const =0
Check that a point is inside ALL of the extents.
virtual int numberOfFaces() const =0
Number of surface faces that make up this object.
Class for 3D vectors.
Definition: V3D.h:34
std::vector< VecV3D > VecVecV3D
std::vector< Mantid::Kernel::V3D > VecV3D
Helper class which provides the Collimation Length for SANS instruments.