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"
16
17namespace Mantid {
18namespace Kernel {
19//----------------------------------------------------------------------
20// Forward declaration
21//----------------------------------------------------------------------
22class V3D;
23} // namespace Kernel
24
25namespace Geometry {
32 rect, //< rectangular geometry
33 cyl, //< cylindrical geometry
34 undef //< the geometry is yet undefined, if you need to know the geometry, a
35 // method to identify it must be deployed
36};
37
43class MANTID_GEOMETRY_DLL IDetector : public virtual IObjComponent {
44public:
46 virtual IDetector *cloneParameterized(const ParameterMap *map) const = 0;
47
49 virtual detid_t getID() const = 0;
50
52 virtual std::size_t nDets() const = 0;
53
58 double getDistance(const IComponent &comp) const override = 0;
59
66 virtual double getTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis) const = 0;
67
76 virtual double getSignedTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis,
77 const Kernel::V3D &instrumentUp) const = 0;
78
80 virtual double getPhi() const = 0;
81
83 virtual double getPhiOffset(const double &offset) const = 0;
84
87 virtual det_topology getTopology(Kernel::V3D &center) const = 0;
88
90 virtual const ParameterMap &parameterMap() const = 0;
92 virtual size_t index() const = 0;
93
96 IDetector() {} // NOLINT
97};
98
100using IDetector_sptr = std::shared_ptr<Mantid::Geometry::IDetector>;
102using IDetector_const_sptr = std::shared_ptr<const Mantid::Geometry::IDetector>;
103
104} // namespace Geometry
105} // namespace Mantid
base class for Geometric IComponent
Definition: IComponent.h:51
Interface class for detector objects.
Definition: IDetector.h:43
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:96
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...
Definition: IObjComponent.h:37
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< const Mantid::Geometry::IDetector > IDetector_const_sptr
Shared pointer to IDetector (const version)
Definition: IDetector.h:102
det_topology
Describes the topology of a detectors group used to calculate angular position and angular measures f...
Definition: IDetector.h:31
std::shared_ptr< Mantid::Geometry::IDetector > IDetector_sptr
Shared pointer to IDetector.
Definition: IDetector.h:100
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.
Definition: SpectrumInfo.h:21