Mantid
|
Holds a collection of detectors. More...
#include <DetectorGroup.h>
Public Member Functions | |
void | addDetector (const IDetector_const_sptr &det) |
Add a detector to the collection. More... | |
IDetector * | cloneParameterized (const ParameterMap *) const override |
Create a cloned instance with a parameter map applied. More... | |
DetectorGroup () | |
Default constructor. More... | |
DetectorGroup (const std::vector< IDetector_const_sptr > &dets) | |
Constructor that takes a list of detectors to add. More... | |
void | getBoundingBox (BoundingBox &boundingBox) const override |
Get the bounding box for this component and store it in the given argument. More... | |
std::vector< detid_t > | getDetectorIDs () const |
What detectors are contained in the group? More... | |
std::vector< IDetector_const_sptr > | getDetectors () const |
What detectors are contained in the group? More... | |
double | getDistance (const IComponent &comp) const override |
Gives the average distance of a group of detectors from the given component. More... | |
detid_t | getID () const override |
Get the detector ID. More... | |
double | getPhi () const override |
Computes the average position and returns the phi value. More... | |
double | getPhiOffset (const double &offset) const override |
Computes the average position and returns the phi value. More... | |
int | getPointInObject (Kernel::V3D &point) const override |
Try to find a point that lies within (or on) the object. More... | |
Kernel::V3D | getPos () const override |
Returns the position of the DetectorGroup. More... | |
double | getSignedTwoTheta (const Kernel::V3D &observer, const Kernel::V3D &axis, const Kernel::V3D &instrumentUp) const override |
Gives the signed angle of this detector object with respect to an axis. More... | |
double | getTwoTheta (const Kernel::V3D &observer, const Kernel::V3D &axis) const override |
Gives the average angle of a group of detectors from the observation point, relative to the axis given. More... | |
bool | isOnSide (const Kernel::V3D &point) const override |
Does the point given lie on the surface of one of the detectors. More... | |
bool | isParametrized () const override |
Return true if any detector in the group is parametrized. More... | |
bool | isValid (const Kernel::V3D &point) const override |
isValid() is true if the point is inside any of the detectors, i.e. More... | |
std::size_t | nDets () const override |
Get the number of physical detectors this object represents. More... | |
double | solidAngle (const Kernel::V3D &observer) const override |
Gives the total solid angle subtended by a group of detectors by summing the contributions from the individual detectors. More... | |
Public Member Functions inherited from Mantid::Geometry::IDetector | |
virtual IDetector * | cloneParameterized (const ParameterMap *map) const =0 |
Create a cloned instance with a parameter map applied. More... | |
double | getDistance (const IComponent &comp) const override=0 |
Get the distance of this detector object from another Component. More... | |
virtual detid_t | getID () const =0 |
Get the detector ID. More... | |
virtual double | getPhi () const =0 |
Gives the phi of this detector object in radians. More... | |
virtual double | getPhiOffset (const double &offset) const =0 |
Gives the phi of this detector offset from y=0 by offset. More... | |
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. More... | |
virtual det_topology | getTopology (Kernel::V3D ¢er) const =0 |
returns the geometry of detectors, meaningful for groups, rectangular for single; returns the centre of a detector More... | |
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. More... | |
IDetector () | |
(Empty) Constructor. More... | |
virtual size_t | index () const =0 |
Helper for legacy access mode. Returns the index of the detector. More... | |
virtual std::size_t | nDets () const =0 |
Get the number of physical detectors this object represents. More... | |
virtual const ParameterMap & | parameterMap () const =0 |
Helper for legacy access mode. Returns a reference to the ParameterMap. More... | |
Public Member Functions inherited from Mantid::Geometry::IObjComponent | |
IComponent * | clone () const override=0 |
Virtual Copy Constructor. More... | |
virtual void | draw () const =0 |
Draws the objcomponent. More... | |
virtual void | drawObject () const =0 |
Draws the Object. More... | |
virtual int | getPointInObject (Kernel::V3D &point) const =0 |
Try to find a point that lies within (or on) the object. More... | |
GeometryHandler * | Handle () const |
Gets the GeometryHandler. More... | |
virtual void | initDraw () const =0 |
Initializes the ObjComponent for rendering, this function should be called before rendering. More... | |
virtual int | interceptSurface (Track &track) const =0 |
Checks whether the track given will pass through this Component. More... | |
IObjComponent () | |
IObjComponent (const IObjComponent &) | |
Copy constructor. More... | |
IObjComponent (GeometryHandler *the_handler) | |
Constructor, specifying the GeometryHandler (renderer engine) for this IObjComponent. More... | |
virtual bool | isOnSide (const Kernel::V3D &point) const =0 |
Does the point given lie on the surface of this object component? More... | |
virtual bool | isValid (const Kernel::V3D &point) const =0 |
Does the point given lie within this object component? More... | |
virtual const Kernel::Material | material () const =0 |
Returns the material of the Object. More... | |
IObjComponent & | operator= (const IObjComponent &rhs) |
Assignment operator. More... | |
virtual const std::shared_ptr< const IObject > | shape () const =0 |
Returns the shape of the Object. More... | |
virtual double | solidAngle (const Kernel::V3D &observer) const =0 |
Finds the approximate solid angle covered by the component when viewed from the point given. More... | |
std::string | type () const override |
type string More... | |
~IObjComponent () override | |
Public Member Functions inherited from Mantid::Geometry::IComponent | |
virtual IComponent * | clone () const =0 |
Return a clone to the current object. More... | |
virtual std::vector< std::shared_ptr< const IComponent > > | getAncestors () const =0 |
Return an array of all ancestors, the nearest first. More... | |
virtual const IComponent * | getBareParent () const =0 |
Returns the bare pointer to the IComponent parent. More... | |
virtual IComponent const * | getBaseComponent () const =0 |
Returns const pointer to base component if this component is parametrized. More... | |
virtual void | getBoundingBox (BoundingBox &boundingBox) const =0 |
Get the bounding box for this component and store it in the given argument. More... | |
virtual ComponentID | getComponentID () const =0 |
Returns the ComponentID - a unique identifier of the component. More... | |
virtual double | getDistance (const IComponent &) const =0 |
Get the distance to another IComponent. More... | |
virtual std::string | getFullName () const =0 |
Get the IComponent full path name. More... | |
virtual std::string | getName () const =0 |
Get the IComponent name. More... | |
virtual std::shared_ptr< const IComponent > | getParent () const =0 |
Return a pointer to the current parent. More... | |
virtual Kernel::V3D | getPos () const =0 |
Get the position of the IComponent. Tree structure is traverse through the. More... | |
virtual Kernel::V3D | getRelativePos () const =0 |
Get the position relative to the parent IComponent (absolute if no parent) More... | |
virtual Kernel::Quat | getRelativeRot () const =0 |
Get the relative Orientation. More... | |
virtual Kernel::Quat | getRotation () const =0 |
Get the absolute orientation of the IComponent. More... | |
virtual Kernel::V3D | getScaleFactor () const |
Gets the scaling factor of the object for the Object Component. More... | |
virtual void | rotate (const Kernel::Quat &)=0 |
Rotate the IComponent. This is relative to parent. More... | |
virtual void | rotate (double, const Kernel::V3D &)=0 |
Rotate the IComponent by an angle in degrees with respect to an axis. More... | |
virtual void | setName (const std::string &)=0 |
Set the IComponent name. More... | |
virtual void | setParent (IComponent *)=0 |
Assign a parent IComponent. Previous parent link is lost. More... | |
virtual void | setPos (const Kernel::V3D &)=0 |
Set the position of the component The position is with respect to the parent component. More... | |
virtual void | setPos (double, double, double)=0 |
Set the IComponent position, x, y, z respective to parent (if present) More... | |
virtual void | setRot (const Kernel::Quat &)=0 |
Set the orientation Kernel::Quaternion relative to parent (if present) More... | |
virtual void | translate (const Kernel::V3D &)=0 |
Copy the Rotation from another IComponent. More... | |
virtual void | translate (double, double, double)=0 |
Translate the IComponent (x,y,z form). This is relative to parent if. More... | |
virtual std::string | type () const |
Returns a string representation of the IComponent type. More... | |
virtual | ~IComponent ()=default |
Destructor. More... | |
ParameterMap access | |
using | DetCollection = std::map< int, IDetector_const_sptr > |
The type of collection used for the detectors. More... | |
int | m_id |
The ID of this effective detector. More... | |
DetCollection | m_detectors |
The collection of grouped detectors. More... | |
det_topology | group_topology |
the parameter describes the topology of the detector's group namely if detectors form a box or a ring. More... | |
Kernel::V3D | groupCentre |
group centre is the geometrical centre of the detectors group calculated when the calculate group topology is invoked More... | |
std::set< std::string > | getParameterNames (bool recursive=true) const override |
Return the parameter names. More... | |
std::map< std::string, ComponentID > | getParameterNamesByComponent () const override |
return the parameter names and the component they are from More... | |
bool | hasParameter (const std::string &name, bool recursive=true) const override |
Returns a boolean indicating whether the parameter exists or not. More... | |
std::string | getParameterType (const std::string &name, bool recursive=true) const override |
Detectors group assumed to be non-parameterized. More... | |
std::vector< double > | getNumberParameter (const std::string &pname, bool recursive=true) const override |
Get a parameter defined as a double. More... | |
std::vector< Kernel::V3D > | getPositionParameter (const std::string &pname, bool recursive=true) const override |
Get a parameter defined as a Kernel::V3D. More... | |
std::vector< Kernel::Quat > | getRotationParameter (const std::string &pname, bool recursive=true) const override |
Get a parameter defined as a Kernel::Quaternion. More... | |
std::vector< std::string > | getStringParameter (const std::string &pname, bool recursive=true) const override |
Get a parameter defined as a string. More... | |
std::vector< int > | getIntParameter (const std::string &pname, bool recursive=true) const override |
Get a parameter defined as an integer. More... | |
std::vector< bool > | getBoolParameter (const std::string &pname, bool recursive=true) const override |
Get a parameter defined as an integer. More... | |
std::string | getParameterAsString (const std::string &pname, bool recursive=true) const override |
Get a string representation of a parameter. More... | |
bool | getParameterVisible (const std::string &pname, bool recursive=true) const override |
Get a visibility attribute of a parameter. More... | |
det_topology | getTopology (Kernel::V3D ¢er) const override |
returns the detector's group topology if it has been calculated before or invokes the procedure of calculating such topology if it was not More... | |
std::string | getNameSeparator () const |
Return separator for list of names of detectors. More... | |
IComponent const * | getBaseComponent () const override |
Returns const pointer to itself. More... | |
const ParameterMap & | parameterMap () const override |
Helper for legacy access mode. Always throws for DetectorGroup. More... | |
size_t | index () const override |
Helper for legacy access mode. Always throws for DetectorGroup. More... | |
virtual size_t | registerContents (class ComponentVisitor &visitor) const override |
Component * | clone () const override |
Virtual Copy Constructor. More... | |
ComponentID | getComponentID () const override |
Returns the ComponentID - a unique identifier of the component. More... | |
std::shared_ptr< const IComponent > | getParent () const override |
Return a pointer to the current parent. More... | |
const IComponent * | getBareParent () const override |
Returns the bare pointer to the IComponent parent. More... | |
std::vector< std::shared_ptr< const IComponent > > | getAncestors () const override |
Return an array of all ancestors, the nearest first. More... | |
std::string | getName () const override |
Get the IComponent name. More... | |
std::string | getFullName () const override |
Get the IComponent full path name. More... | |
void | setParent (IComponent *) override |
Assign a parent IComponent. Previous parent link is lost. More... | |
void | setName (const std::string &) override |
Set the IComponent name. More... | |
void | setPos (double, double, double) override |
Set the IComponent position, x, y, z respective to parent (if present) More... | |
void | setPos (const Kernel::V3D &) override |
Set the position of the component The position is with respect to the parent component. More... | |
void | setRot (const Kernel::Quat &) override |
Set the orientation Kernel::Quaternion relative to parent (if present) More... | |
void | copyRot (const IComponent &) |
int | interceptSurface (Track &) const override |
Checks whether the track given will pass through this Component. More... | |
void | translate (const Kernel::V3D &) override |
Copy the Rotation from another IComponent. More... | |
void | translate (double, double, double) override |
Translate the IComponent (x,y,z form). This is relative to parent if. More... | |
void | rotate (const Kernel::Quat &) override |
Rotate the IComponent. This is relative to parent. More... | |
void | rotate (double, const Kernel::V3D &) override |
Rotate the IComponent by an angle in degrees with respect to an axis. More... | |
Kernel::V3D | getRelativePos () const override |
Get the position relative to the parent IComponent (absolute if no parent) More... | |
Kernel::Quat | getRelativeRot () const override |
Get the relative Orientation. More... | |
Kernel::Quat | getRotation () const override |
Get the absolute orientation of the IComponent. More... | |
void | printSelf (std::ostream &) const override |
Prints a text representation of itself. More... | |
void | getBoundingBox (double &, double &, double &, double &, double &, double &) const |
void | draw () const override |
Draws the objcomponent. More... | |
void | drawObject () const override |
Draws the Object. More... | |
void | initDraw () const override |
Initializes the ObjComponent for rendering, this function should be called before rendering. More... | |
const std::shared_ptr< const IObject > | shape () const override |
Returns the shape of the Object. More... | |
const Kernel::Material | material () const override |
Returns the material of the Object. More... | |
DetectorGroup (const DetectorGroup &) | |
Private, unimplemented copy constructor. More... | |
DetectorGroup & | operator= (const DetectorGroup &) |
Private, unimplemented copy assignment operator. More... | |
void | calculateGroupTopology () const |
function calculates the detectors arrangement (topology) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::Geometry::IObjComponent | |
void | setGeometryHandler (GeometryHandler *h) |
Reset the current geometry handler. More... | |
Holds a collection of detectors.
Responds to IDetector methods as though it were a single detector. Currently, detectors in a group are treated as pointlike (or at least) homogenous entities. This means that it's up to the use to make only sensible groupings of similar detectors since no weighting according to solid angle size takes place and the DetectorGroup's position is just a simple average of its constituents.
Definition at line 28 of file DetectorGroup.h.
|
protected |
The type of collection used for the detectors.
Definition at line 166 of file DetectorGroup.h.
Mantid::Geometry::DetectorGroup::DetectorGroup | ( | ) |
Default constructor.
Definition at line 28 of file DetectorGroup.cpp.
Mantid::Geometry::DetectorGroup::DetectorGroup | ( | const std::vector< IDetector_const_sptr > & | dets | ) |
Constructor that takes a list of detectors to add.
dets | :: The vector of IDetector pointers that this virtual detector will hold |
std::invalid_argument | If an empty vector is passed as argument |
Definition at line 35 of file DetectorGroup.cpp.
References addDetector(), Mantid::Kernel::Logger::error(), and Mantid::Geometry::g_log.
|
private |
Private, unimplemented copy constructor.
void Mantid::Geometry::DetectorGroup::addDetector | ( | const IDetector_const_sptr & | det | ) |
Add a detector to the collection.
det | :: A pointer to the detector to add |
Definition at line 50 of file DetectorGroup.cpp.
References group_topology, m_detectors, m_id, and Mantid::Geometry::undef.
Referenced by DetectorGroup().
|
private |
function calculates the detectors arrangement (topology)
the private function calculates the topology of the detector's group, namely if the detectors arranged into a ring or into a rectangle.
Uses assumption that a ring has hole inside, so geometrical centre of the shape does not belong to a ring but does belong to a rectangle
Definition at line 381 of file DetectorGroup.cpp.
References Mantid::Geometry::cyl, getPos(), group_topology, groupCentre, isValid(), m_detectors, Mantid::Geometry::rect, Mantid::Geometry::undef, and Mantid::Geometry::BoundingBox::width().
Referenced by getTopology().
|
inlineoverrideprotectedvirtual |
Virtual Copy Constructor.
Implements Mantid::Geometry::IObjComponent.
Definition at line 179 of file DetectorGroup.h.
|
inlineoverridevirtual |
Create a cloned instance with a parameter map applied.
Implements Mantid::Geometry::IDetector.
Definition at line 36 of file DetectorGroup.h.
|
inlineprotected |
Definition at line 194 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Draws the objcomponent.
Implements Mantid::Geometry::IObjComponent.
Definition at line 213 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Draws the Object.
Implements Mantid::Geometry::IObjComponent.
Definition at line 214 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Return an array of all ancestors, the nearest first.
Implements Mantid::Geometry::IComponent.
Definition at line 183 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Returns the bare pointer to the IComponent parent.
Implements Mantid::Geometry::IComponent.
Definition at line 182 of file DetectorGroup.h.
|
inlineoverridevirtual |
Returns const pointer to itself.
This currently (2914/04/24) contradicts the logic behind getComponentID overload, so CopyInstrumentParameters will fail on grouped instrument but it is something TO DO:
Implements Mantid::Geometry::IComponent.
Definition at line 154 of file DetectorGroup.h.
|
overridevirtual |
Get a parameter defined as an integer.
Default implementation.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 363 of file DetectorGroup.cpp.
|
overridevirtual |
Get the bounding box for this component and store it in the given argument.
Get the bounding box for this group of detectors.
It is simply the sum of the bounding boxes of its constituents.
boundingBox | :: [Out] The resulting bounding box is stored here. |
Implements Mantid::Geometry::IComponent.
Definition at line 305 of file DetectorGroup.cpp.
References Mantid::Geometry::BoundingBox::getCoordSystem(), Mantid::Geometry::BoundingBox::grow(), Mantid::Geometry::BoundingBox::isAxisAligned(), m_detectors, and Mantid::Geometry::BoundingBox::realign().
|
inlineprotected |
Definition at line 211 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Returns the ComponentID - a unique identifier of the component.
Implements Mantid::Geometry::IComponent.
Definition at line 180 of file DetectorGroup.h.
std::vector< detid_t > Mantid::Geometry::DetectorGroup::getDetectorIDs | ( | ) | const |
What detectors are contained in the group?
Return IDs for the detectors grouped.
Definition at line 160 of file DetectorGroup.cpp.
References m_detectors.
Referenced by Mantid::DataHandling::GenerateGroupingPowder::exec(), export_DetectorGroup(), Mantid::Algorithms::SofQWNormalisedPolygon::initAngularCachesNonPSD(), and Mantid::Algorithms::SofQWNormalisedPolygon::initAngularCachesTable().
std::vector< IDetector_const_sptr > Mantid::Geometry::DetectorGroup::getDetectors | ( | ) | const |
What detectors are contained in the group?
Return the list of detectors held within this group.
Definition at line 174 of file DetectorGroup.cpp.
References m_detectors.
Referenced by Mantid::Algorithms::CreatePSDBleedMask::exec().
|
overridevirtual |
Gives the average distance of a group of detectors from the given component.
Implements Mantid::Geometry::IDetector.
Definition at line 93 of file DetectorGroup.cpp.
References m_detectors.
|
overrideprotectedvirtual |
Get the IComponent full path name.
Implements Mantid::Geometry::IComponent.
Definition at line 431 of file DetectorGroup.cpp.
References getNameSeparator(), and m_detectors.
|
overridevirtual |
Get the detector ID.
Implements Mantid::Geometry::IDetector.
Definition at line 62 of file DetectorGroup.cpp.
References m_id.
|
overridevirtual |
Get a parameter defined as an integer.
Default implementation.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 358 of file DetectorGroup.cpp.
|
overrideprotectedvirtual |
Get the IComponent name.
Implements Mantid::Geometry::IComponent.
Definition at line 422 of file DetectorGroup.cpp.
References getNameSeparator(), and m_detectors.
|
inline |
Return separator for list of names of detectors.
Definition at line 149 of file DetectorGroup.h.
Referenced by export_DetectorGroup(), getFullName(), and getName().
|
overridevirtual |
Get a parameter defined as a double.
Default implementation.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 338 of file DetectorGroup.cpp.
|
overridevirtual |
Get a string representation of a parameter.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 281 of file DetectorGroup.cpp.
|
overridevirtual |
Return the parameter names.
Get the names of the parameters for this component.
recursive | :: If true, the parameters for all of the parent components are also included |
Implements Mantid::Geometry::IComponent.
Definition at line 259 of file DetectorGroup.cpp.
|
overridevirtual |
return the parameter names and the component they are from
Get the names of the parameters for this component and it's parents.
Implements Mantid::Geometry::IComponent.
Definition at line 270 of file DetectorGroup.cpp.
|
overridevirtual |
Detectors group assumed to be non-parameterized.
Implements Mantid::Geometry::IComponent.
Definition at line 333 of file DetectorGroup.cpp.
|
overridevirtual |
Get a visibility attribute of a parameter.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 294 of file DetectorGroup.cpp.
|
inlineoverrideprotectedvirtual |
Return a pointer to the current parent.
Implements Mantid::Geometry::IComponent.
Definition at line 181 of file DetectorGroup.h.
|
overridevirtual |
Computes the average position and returns the phi value.
Implements Mantid::Geometry::IDetector.
Definition at line 143 of file DetectorGroup.cpp.
References getPos(), and Mantid::Kernel::V3D::getSpherical().
Referenced by getPhiOffset().
|
overridevirtual |
Computes the average position and returns the phi value.
Implements Mantid::Geometry::IDetector.
Definition at line 151 of file DetectorGroup.cpp.
References getPhi().
|
overridevirtual |
Try to find a point that lies within (or on) the object.
tries to find a point that lies on or within the first detector in the storage found in the storage map
point | :: if a point is found its coordinates will be stored in this varible |
Implements Mantid::Geometry::IObjComponent.
Definition at line 245 of file DetectorGroup.cpp.
References m_detectors.
|
overridevirtual |
Returns the position of the DetectorGroup.
In the absence of a full surface/solid angle implementation, this is a simple average of the component detectors (i.e. there's no weighting for size or if one or more of the detectors is masked). Also, no regard is made to whether a constituent detector is itself a DetectorGroup - it's just treated as a single, pointlike object with the same weight as any other detector.
Implements Mantid::Geometry::IComponent.
Definition at line 74 of file DetectorGroup.cpp.
References m_detectors, and Mantid::Kernel::Tolerance.
Referenced by calculateGroupTopology(), and getPhi().
|
overridevirtual |
Get a parameter defined as a Kernel::V3D.
Default implementation.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 343 of file DetectorGroup.cpp.
|
inlineoverrideprotectedvirtual |
Get the position relative to the parent IComponent (absolute if no parent)
Implements Mantid::Geometry::IComponent.
Definition at line 200 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Get the relative Orientation.
Implements Mantid::Geometry::IComponent.
Definition at line 203 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Get the absolute orientation of the IComponent.
Implements Mantid::Geometry::IComponent.
Definition at line 206 of file DetectorGroup.h.
|
overridevirtual |
Get a parameter defined as a Kernel::Quaternion.
Default implementation.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 348 of file DetectorGroup.cpp.
|
overridevirtual |
Gives the signed angle of this detector object with respect to an axis.
observer | :: The point to calculate the angle relative to (typically the sample position) |
axis | :: The axis to which the required angle is relative |
instrumentUp | :: Direction corresponding to the instrument up direction. Used to determine signs. |
Implements Mantid::Geometry::IDetector.
Definition at line 124 of file DetectorGroup.cpp.
References Mantid::Kernel::V3D::angle(), Mantid::Kernel::V3D::cross_prod(), m_detectors, and Mantid::Kernel::V3D::scalar_prod().
|
overridevirtual |
Get a parameter defined as a string.
Default implementation.
pname | :: The name of the parameter |
recursive | :: If true the search will walk up through the parent components |
Implements Mantid::Geometry::IComponent.
Definition at line 353 of file DetectorGroup.cpp.
|
overridevirtual |
returns the detector's group topology if it has been calculated before or invokes the procedure of calculating such topology if it was not
Implements Mantid::Geometry::IDetector.
Definition at line 368 of file DetectorGroup.cpp.
References calculateGroupTopology(), group_topology, groupCentre, and Mantid::Geometry::undef.
|
overridevirtual |
Gives the average angle of a group of detectors from the observation point, relative to the axis given.
Implements Mantid::Geometry::IDetector.
Definition at line 104 of file DetectorGroup.cpp.
References Mantid::Kernel::V3D::angle(), and m_detectors.
|
overridevirtual |
Returns a boolean indicating whether the parameter exists or not.
Returns a boolean indicating if the component has the named parameter.
name | :: The name of the parameter |
recursive | :: If true the parent components will also be searched (Default: true) |
Implements Mantid::Geometry::IComponent.
Definition at line 327 of file DetectorGroup.cpp.
|
overridevirtual |
Helper for legacy access mode. Always throws for DetectorGroup.
Implements Mantid::Geometry::IDetector.
Definition at line 448 of file DetectorGroup.cpp.
|
inlineoverrideprotectedvirtual |
Initializes the ObjComponent for rendering, this function should be called before rendering.
Implements Mantid::Geometry::IObjComponent.
Definition at line 215 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Checks whether the track given will pass through this Component.
Implements Mantid::Geometry::IObjComponent.
Definition at line 195 of file DetectorGroup.h.
|
overridevirtual |
Does the point given lie on the surface of one of the detectors.
point | :: the point that is tested to see if it is one of the detectors |
Implements Mantid::Geometry::IObjComponent.
Definition at line 229 of file DetectorGroup.cpp.
References m_detectors.
|
overridevirtual |
Return true if any detector in the group is parametrized.
Implements Mantid::Geometry::IComponent.
Definition at line 201 of file DetectorGroup.cpp.
References m_detectors.
|
overridevirtual |
isValid() is true if the point is inside any of the detectors, i.e.
one of the detectors has isValid() == true
point | :: this point is tested to see if it is one of the detectors |
Implements Mantid::Geometry::IObjComponent.
Definition at line 215 of file DetectorGroup.cpp.
References m_detectors.
Referenced by calculateGroupTopology().
|
overrideprotectedvirtual |
Returns the material of the Object.
Implements Mantid::Geometry::IObjComponent.
Definition at line 440 of file DetectorGroup.cpp.
|
overridevirtual |
Get the number of physical detectors this object represents.
Implements Mantid::Geometry::IDetector.
Definition at line 64 of file DetectorGroup.cpp.
References m_detectors.
|
private |
Private, unimplemented copy assignment operator.
|
overridevirtual |
Helper for legacy access mode. Always throws for DetectorGroup.
Implements Mantid::Geometry::IDetector.
Definition at line 443 of file DetectorGroup.cpp.
|
inlineoverrideprotectedvirtual |
Prints a text representation of itself.
Implements Mantid::Geometry::IComponent.
Definition at line 207 of file DetectorGroup.h.
|
overridevirtual |
Implements Mantid::Geometry::IComponent.
Definition at line 450 of file DetectorGroup.cpp.
|
inlineoverrideprotectedvirtual |
Rotate the IComponent. This is relative to parent.
Implements Mantid::Geometry::IComponent.
Definition at line 198 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Rotate the IComponent by an angle in degrees with respect to an axis.
Implements Mantid::Geometry::IComponent.
Definition at line 199 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Set the IComponent name.
Implements Mantid::Geometry::IComponent.
Definition at line 189 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Assign a parent IComponent. Previous parent link is lost.
Implements Mantid::Geometry::IComponent.
Definition at line 188 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Set the position of the component The position is with respect to the parent component.
Implements Mantid::Geometry::IComponent.
Definition at line 192 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Set the IComponent position, x, y, z respective to parent (if present)
Implements Mantid::Geometry::IComponent.
Definition at line 191 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Set the orientation Kernel::Quaternion relative to parent (if present)
Implements Mantid::Geometry::IComponent.
Definition at line 193 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Returns the shape of the Object.
Implements Mantid::Geometry::IObjComponent.
Definition at line 218 of file DetectorGroup.h.
|
overridevirtual |
Gives the total solid angle subtended by a group of detectors by summing the contributions from the individual detectors.
observer | :: The point from which the detector is being viewed |
NullPointerException | If geometrical form of any detector has not been provided in the instrument definition file |
Implements Mantid::Geometry::IObjComponent.
Definition at line 191 of file DetectorGroup.cpp.
References m_detectors.
|
inlineoverrideprotectedvirtual |
Copy the Rotation from another IComponent.
Translate the IComponent (vector form). This is relative to parent if
Implements Mantid::Geometry::IComponent.
Definition at line 196 of file DetectorGroup.h.
|
inlineoverrideprotectedvirtual |
Translate the IComponent (x,y,z form). This is relative to parent if.
Implements Mantid::Geometry::IComponent.
Definition at line 197 of file DetectorGroup.h.
|
mutableprotected |
the parameter describes the topology of the detector's group namely if detectors form a box or a ring.
the topology is undefined on construction and calculated on first request
Definition at line 173 of file DetectorGroup.h.
Referenced by addDetector(), calculateGroupTopology(), and getTopology().
|
mutableprotected |
group centre is the geometrical centre of the detectors group calculated when the calculate group topology is invoked
Definition at line 176 of file DetectorGroup.h.
Referenced by calculateGroupTopology(), and getTopology().
|
protected |
The collection of grouped detectors.
Definition at line 168 of file DetectorGroup.h.
Referenced by addDetector(), calculateGroupTopology(), getBoundingBox(), getDetectorIDs(), getDetectors(), getDistance(), getFullName(), getName(), getPointInObject(), getPos(), getSignedTwoTheta(), getTwoTheta(), isOnSide(), isParametrized(), isValid(), nDets(), and solidAngle().
|
protected |
The ID of this effective detector.
Definition at line 162 of file DetectorGroup.h.
Referenced by addDetector(), and getID().