Mantid
Loading...
Searching...
No Matches
IDetector.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
9#include <boost/python/class.hpp>
10#include <boost/python/register_ptr_to_python.hpp>
11
14using namespace boost::python;
15
17
19 register_ptr_to_python<std::shared_ptr<IDetector>>();
20 register_ptr_to_python<std::shared_ptr<const IDetector>>();
21
22 class_<IDetector, bases<IObjComponent>, boost::noncopyable>("IDetector", no_init)
23 .def("getID", &IDetector::getID, arg("self"), "Returns the detector ID")
24 .def("solidAngle", &IDetector::solidAngle, (arg("self"), arg("observer")),
25 "Return the solid angle in steradians between this "
26 "detector and an observer")
27 .def("getTwoTheta", &IDetector::getTwoTheta, (arg("self"), arg("observer"), arg("axis")),
28 "Calculate the angle between this detector, another component and "
29 "an axis")
30 .def("getPhi", &IDetector::getPhi, arg("self"), "Returns the azimuthal angle of this detector");
31}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_IDetector()
Definition: IDetector.cpp:18
Interface class for detector objects.
Definition: IDetector.h:43
virtual double getPhi() const =0
Gives the phi of this detector object in radians.
virtual double getTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis) const =0
Gives the angle of this detector object with respect to an axis.
virtual detid_t getID() const =0
Get the detector ID.
Object Component class, this class brings together the physical attributes of the component to the po...
Definition: IObjComponent.h:37
virtual double solidAngle(const Kernel::V3D &observer) const =0
Finds the approximate solid angle covered by the component when viewed from the point given.