Mantid
Loading...
Searching...
No Matches
DetectorGridDefinition.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 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#include "MantidAlgorithms/DllConfig.h"
10
11#include <array>
12#include <cstddef>
13
14namespace Mantid {
15namespace Algorithms {
16
20class MANTID_ALGORITHMS_DLL DetectorGridDefinition {
21public:
22 DetectorGridDefinition(const double minLatitude, const double maxLatitude, const size_t latitudePoints,
23 const double minLongitude, const double maxLongitude, const size_t longitudeStep);
24
25 double latitudeAt(const size_t row) const;
26 double longitudeAt(const size_t column) const;
27 std::array<size_t, 4> nearestNeighbourIndices(const double latitude, const double longitude) const;
28 std::pair<size_t, size_t> getNearestVertex(const double latitude, const double longitude) const;
29 size_t numberColumns() const;
30 size_t numberRows() const;
31 size_t getDetectorIndex(size_t row, size_t col);
32
33private:
42};
43
44} // namespace Algorithms
45} // namespace Mantid
DetectorGridDefinition is a helper class for building the sparse instrument in MonteCarloAbsorption.
Helper class which provides the Collimation Length for SANS instruments.