Mantid
Loading...
Searching...
No Matches
IDetector.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidGeometry/DllConfig.h"
17
18namespace Mantid {
19namespace Geometry {
26 rect, //< rectangular geometry
27 cyl, //< cylindrical geometry
28 undef //< the geometry is yet undefined, if you need to know the geometry, a
29 // method to identify it must be deployed
30};
31
37class MANTID_GEOMETRY_DLL IDetector : public virtual IObjComponent {
38public:
40 virtual IDetector *cloneParameterized(const ParameterMap *map) const = 0;
41
43 virtual detid_t getID() const = 0;
44
46 virtual std::size_t nDets() const = 0;
47
52 double getDistance(const IComponent &comp) const override = 0;
53
60 virtual double getTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis) const = 0;
61
70 virtual double getSignedTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis,
71 const Kernel::V3D &instrumentUp) const = 0;
72
74 virtual double getPhi() const = 0;
75
77 virtual double getPhiOffset(const double &offset) const = 0;
78
81 virtual det_topology getTopology(Kernel::V3D &center) const = 0;
82
84 virtual const ParameterMap &parameterMap() const = 0;
86 virtual size_t index() const = 0;
87
90 IDetector() {} // NOLINT
91};
92
94using IDetector_sptr = std::shared_ptr<Mantid::Geometry::IDetector>;
96using IDetector_const_sptr = std::shared_ptr<const Mantid::Geometry::IDetector>;
97
98} // namespace Geometry
99} // namespace Mantid
base class for Geometric IComponent
Definition IComponent.h:53
Interface class for detector objects.
Definition IDetector.h:37
virtual double getPhi() const =0
Gives the phi of this detector object in radians.
virtual std::size_t nDets() const =0
Get the number of physical detectors this object represents.
virtual size_t index() const =0
Helper for legacy access mode. Returns the index of the detector.
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 double getSignedTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis, const Kernel::V3D &instrumentUp) const =0
Gives the signed angle of this detector object with respect to an axis.
virtual IDetector * cloneParameterized(const ParameterMap *map) const =0
Create a cloned instance with a parameter map applied.
virtual det_topology getTopology(Kernel::V3D &center) const =0
returns the geometry of detectors, meaningful for groups, rectangular for single; returns the centre ...
double getDistance(const IComponent &comp) const override=0
Get the distance of this detector object from another Component.
virtual detid_t getID() const =0
Get the detector ID.
virtual double getPhiOffset(const double &offset) const =0
Gives the phi of this detector offset from y=0 by offset.
IDetector()
(Empty) Constructor.
Definition IDetector.h:90
virtual const ParameterMap & parameterMap() const =0
Helper for legacy access mode. Returns a reference to the ParameterMap.
Object Component class, this class brings together the physical attributes of the component to the po...
Parameter map iterator typedef.
Class for 3D vectors.
Definition V3D.h:35
std::shared_ptr< const Mantid::Geometry::IDetector > IDetector_const_sptr
Shared pointer to IDetector (const version)
Definition IDetector.h:96
det_topology
Describes the topology of a detectors group used to calculate angular position and angular measures f...
Definition IDetector.h:25
std::shared_ptr< Mantid::Geometry::IDetector > IDetector_sptr
Shared pointer to IDetector.
Definition IDetector.h:94
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.