8#include "MantidBeamline/DetectorInfo.h"
19Kernel::Logger
g_log(
"Detector");
72 const V3D sampleDetVec = this->
getPos() - observer;
73 return sampleDetVec.
angle(axis);
84 const V3D sampleDetVec = this->
getPos() - observer;
85 double angle = sampleDetVec.
angle(axis);
102 return std::atan2(pos[1], pos[0]);
112 return avgPos < 0 ? -(offset + avgPos) : offset - avgPos;
139 auto instrument =
dynamic_cast<const Instrument *
>(root);
ComponentVisitor : Visitor for IComponents.
virtual size_t registerDetector(const IDetector &detector)=0
const ParameterMap * m_map
A pointer to const ParameterMap containing the parameters.
Kernel::V3D getPos() const override
Get the position of the IComponent. Tree structure is traverse through the.
const Component * m_base
The base component - this is the unmodified component (without the parameters).
This class represents a detector - i.e.
const detid_t m_id
The detector id.
bool hasDetectorInfo() const
double getDistance(const IComponent &comp) const override
Get the distance between the detector and another component.
size_t index() const override
Helper for legacy access mode. Returns the index of the detector.
double getPhi() const override
Get the phi angle between the detector with reference to the origin This function will not be support...
double getTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis) const override
Get the twotheta angle between the detector and an observer.
det_topology getTopology(Kernel::V3D ¢er) const override
returns the detector's topology, namely, the meaning of the detector's angular measurements.
virtual size_t registerContents(class ComponentVisitor &componentVisitor) const override
Register the contents of this ObjComponent.
double getPhiOffset(const double &offset) const override
Calculate the phi angle between detector and beam, and then offset.
Detector(const std::string &name, int id, IComponent *parent)
Constructor.
detid_t getID() const override
Gets the detector id.
const ParameterMap & parameterMap() const override
Helper for legacy access mode. Returns a reference to the ParameterMap.
double getSignedTwoTheta(const Kernel::V3D &observer, const Kernel::V3D &axis, const Kernel::V3D &instrumentUp) const override
Get the two theata angle signed according the quadrant.
base class for Geometric IComponent
virtual double getDistance(const IComponent &) const =0
Get the distance to another IComponent.
virtual const IComponent * getBareParent() const =0
Returns the bare pointer to the IComponent parent.
Interface class for detector objects.
Object Component class, this class brings together the physical attributes of the component to the po...
size_t detectorIndex(const detid_t detID) const
Only for use by Detector. Returns a detector index for a detector ID.
bool hasDetectorInfo(const Instrument *instrument) const
Only for use by ExperimentInfo.
constexpr double scalar_prod(const V3D &v) const noexcept
Calculates the cross product.
constexpr V3D cross_prod(const V3D &v) const noexcept
Cross product (this * argument)
double angle(const V3D &) const
Angle between this and another vector.
Mantid::Kernel::Logger g_log("Goniometer")
det_topology
Describes the topology of a detectors group used to calculate angular position and angular measures f...
int32_t detid_t
Typedef for a detector ID.