Mantid
Loading...
Searching...
No Matches
ComponentInfoBankHelpers.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2020 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 "MantidGeometry/DllConfig.h"
10#include <Eigen/Core>
11
12namespace Mantid {
13namespace Geometry {
14
15class ComponentInfo;
16class DetectorInfo;
17namespace ComponentInfoBankHelpers {
18
19MANTID_GEOMETRY_DLL bool isDetectorFixedInBank(const ComponentInfo &compInfo, const size_t detIndex);
20MANTID_GEOMETRY_DLL bool isSaveableBank(const ComponentInfo &compInfo, const DetectorInfo &detInfo, const size_t idx);
21
22MANTID_GEOMETRY_DLL bool isAncestorOf(const ComponentInfo &compInfo, const size_t possibleAncestor,
23 const size_t current);
24MANTID_GEOMETRY_DLL Eigen::Vector3d offsetFromAncestor(const Mantid::Geometry::ComponentInfo &compInfo,
25 const size_t ancestorIdx, const size_t currentIdx);
26} // namespace ComponentInfoBankHelpers
27} // namespace Geometry
28} // namespace Mantid
ComponentInfo : Provides a component centric view on to the instrument.
Definition: ComponentInfo.h:40
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2....
Definition: DetectorInfo.h:49
MANTID_GEOMETRY_DLL Eigen::Vector3d offsetFromAncestor(const Mantid::Geometry::ComponentInfo &compInfo, const size_t ancestorIdx, const size_t currentIdx)
Returns the position of the component at the current index relative to the ancestor component at the ...
MANTID_GEOMETRY_DLL bool isAncestorOf(const ComponentInfo &compInfo, const size_t possibleAncestor, const size_t current)
Finds all ancestors up to the root of a component index and returns true if the possible ancestor is ...
MANTID_GEOMETRY_DLL bool isSaveableBank(const ComponentInfo &compInfo, const DetectorInfo &detInfo, const size_t idx)
Function: isSaveableBank.
MANTID_GEOMETRY_DLL bool isDetectorFixedInBank(const ComponentInfo &compInfo, const size_t detIndex)
Tests whether or not the detector is within a fixed bank.
Helper class which provides the Collimation Length for SANS instruments.