38 std::size_t nDets()
const override;
40 double getDistance(
const IComponent &comp)
const override;
44 double getPhi()
const override;
45 double getPhiOffset(
const double &offset)
const override;
46 double solidAngle(
const Kernel::V3D &observer)
const override;
47 bool isParametrized()
const override;
48 bool isValid(
const Kernel::V3D &point)
const override;
49 bool isOnSide(
const Kernel::V3D &point)
const override;
51 int getPointInObject(
Kernel::V3D &point)
const override;
53 void getBoundingBox(
BoundingBox &boundingBox)
const override;
56 std::vector<detid_t> getDetectorIDs()
const;
58 std::vector<IDetector_const_sptr> getDetectors()
const;
66 std::set<std::string> getParameterNames(
bool recursive =
true)
const override;
68 std::map<std::string, ComponentID> getParameterNamesByComponent()
const override;
70 bool hasParameter(
const std::string &name,
bool recursive =
true)
const override;
73 std::string getParameterType(
const std::string &name,
bool recursive =
true)
const override;
81 std::vector<double> getNumberParameter(
const std::string &pname,
bool recursive =
true)
const override;
89 std::vector<Kernel::V3D> getPositionParameter(
const std::string &pname,
bool recursive =
true)
const override;
97 std::vector<Kernel::Quat> getRotationParameter(
const std::string &pname,
bool recursive =
true)
const override;
106 std::vector<std::string> getStringParameter(
const std::string &pname,
bool recursive =
true)
const override;
115 std::vector<int> getIntParameter(
const std::string &pname,
bool recursive =
true)
const override;
124 std::vector<bool> getBoolParameter(
const std::string &pname,
bool recursive =
true)
const override;
133 std::string getParameterAsString(
const std::string &pname,
bool recursive =
true)
const override;
141 bool getParameterVisible(
const std::string &pname,
bool recursive =
true)
const override;
157 size_t index()
const override;
158 virtual size_t registerContents(
class ComponentVisitor &visitor)
const override;
181 std::shared_ptr<const IComponent>
getParent()
const override {
return std::shared_ptr<const IComponent>(); }
183 std::vector<std::shared_ptr<const IComponent>>
getAncestors()
const override {
184 return std::vector<std::shared_ptr<const IComponent>>();
186 std::string
getName()
const override;
187 std::string getFullName()
const override;
191 void setPos(
double,
double,
double)
override {}
201 throw std::runtime_error(
"Cannot call getRelativePos on a DetectorGroup");
204 throw std::runtime_error(
"Cannot call getRelativeRot on a DetectorGroup");
211 void getBoundingBox(
double &,
double &,
double &,
double &,
double &,
double &)
const {}
218 const std::shared_ptr<const IObject>
shape()
const override {
return std::shared_ptr<const IObject>(); }
229 void calculateGroupTopology()
const;
std::map< DeltaEMode::Type, std::string > index
std::string getName(const IMDDimension &self)
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
ComponentVisitor : Visitor for IComponents.
Component is a wrapper for a Component which can modify some of its parameters, e....
Holds a collection of detectors.
std::vector< std::shared_ptr< const IComponent > > getAncestors() const override
Return an array of all ancestors, the nearest first.
IDetector * cloneParameterized(const ParameterMap *) const override
Create a cloned instance with a parameter map applied.
DetectorGroup(const DetectorGroup &)
Private, unimplemented copy constructor.
void setPos(const Kernel::V3D &) override
Set the position of the component The position is with respect to the parent component.
DetCollection m_detectors
The collection of grouped detectors.
void setPos(double, double, double) override
Set the IComponent position, x, y, z respective to parent (if present)
void setParent(IComponent *) override
Assign a parent IComponent. Previous parent link is lost.
void translate(double, double, double) override
Translate the IComponent (x,y,z form). This is relative to parent if.
Kernel::V3D groupCentre
group centre is the geometrical centre of the detectors group calculated when the calculate group top...
DetectorGroup & operator=(const DetectorGroup &)
Private, unimplemented copy assignment operator.
int interceptSurface(Track &) const override
Checks whether the track given will pass through this Component.
std::map< int, IDetector_const_sptr > DetCollection
The type of collection used for the detectors.
void getBoundingBox(double &, double &, double &, double &, double &, double &) const
Kernel::Quat getRotation() const override
Get the absolute orientation of the IComponent.
const std::shared_ptr< const IObject > shape() const override
Returns the shape of the Object.
void initDraw() const override
Initializes the ObjComponent for rendering, this function should be called before rendering.
void setRot(const Kernel::Quat &) override
Set the orientation Kernel::Quaternion relative to parent (if present)
Kernel::Quat getRelativeRot() const override
Get the relative Orientation.
void rotate(const Kernel::Quat &) override
Rotate the IComponent. This is relative to parent.
std::string getNameSeparator() const
Return separator for list of names of detectors.
void translate(const Kernel::V3D &) override
Copy the Rotation from another IComponent.
void drawObject() const override
Draws the Object.
void setName(const std::string &) override
Set the IComponent name.
ComponentID getComponentID() const override
Returns the ComponentID - a unique identifier of the component.
Component * clone() const override
Virtual Copy Constructor.
IComponent const * getBaseComponent() const override
Returns const pointer to itself.
Kernel::V3D getRelativePos() const override
Get the position relative to the parent IComponent (absolute if no parent)
void printSelf(std::ostream &) const override
Prints a text representation of itself.
int m_id
The ID of this effective detector.
void rotate(double, const Kernel::V3D &) override
Rotate the IComponent by an angle in degrees with respect to an axis.
void draw() const override
Draws the objcomponent.
void copyRot(const IComponent &)
std::shared_ptr< const IComponent > getParent() const override
Return a pointer to the current parent.
const IComponent * getBareParent() const override
Returns the bare pointer to the IComponent parent.
det_topology group_topology
the parameter describes the topology of the detector's group namely if detectors form a box or a ring...
base class for Geometric IComponent
Interface class for detector objects.
Defines a track as a start point and a direction.
A material is defined as being composed of a given element, defined as a PhysicalConstants::NeutronAt...
std::shared_ptr< const DetectorGroup > DetectorGroup_const_sptr
Typedef for shared pointer to a const object.
std::shared_ptr< const Mantid::Geometry::IDetector > IDetector_const_sptr
Shared pointer to IDetector (const version)
det_topology
Describes the topology of a detectors group used to calculate angular position and angular measures f...
std::shared_ptr< DetectorGroup > DetectorGroup_sptr
Typedef for shared pointer.
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.