11#include "MantidAlgorithms/DllConfig.h"
37 const std::string
name()
const override {
return "SpatialGrouping"; }
39 const std::string
summary()
const override {
40 return "This algorithm creates an XML grouping file, which can be used in "
41 "GroupDetectors or ReadGroupsFromFile, which groups the detectors "
42 "of an instrument based on the distance between the detectors. It "
43 "does this by querying the getNeighbours method on the Detector "
48 int version()
const override {
return (1); }
49 const std::vector<std::string>
seeAlso()
const override {
return {
"GroupDetectors"}; }
51 const std::string
category()
const override {
return "Transforms\\Grouping"; }
60 bool expandNet(std::map<specnum_t, Mantid::Kernel::V3D> &nearest,
specnum_t spec,
const size_t noNeighbours,
63 void sortByDistance(std::map<specnum_t, Mantid::Kernel::V3D> &nearest,
const size_t noNeighbours);
67 void growBox(
double &min,
double &max,
const double factor);
Base class from which all concrete algorithm classes should be derived.
This algorithm creates an XML Grouping File for use in the GroupDetectors (v2) or ReadGroupsFromFile ...
std::map< specnum_t, Kernel::V3D > m_positions
map of detectors in the instrument
const std::string summary() const override
Summary of algorithms purpose.
std::vector< std::vector< int > > m_groups
first and last values for each group
std::unique_ptr< API::WorkspaceNearestNeighbourInfo > m_neighbourInfo
NearestNeighbourInfo used by expandNet()
std::set< specnum_t > m_included
flag which detectors are included in a group already
int version() const override
Algorithm's version.
const std::string category() const override
Algorithm's category for identification.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string name() const override
Algorithm's name.
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
Interface class for detector objects.
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.