9#include "MantidGeometry/DllConfig.h"
19class ComponentVisitor;
34 std::string
type()
const override {
return "StructuredDetector"; }
37 static bool compareName(
const std::string &proposedMatch);
49 void initialize(
size_t xPixels,
size_t yPixels, std::vector<double> &&x, std::vector<double> &&y,
bool isZBeam,
50 detid_t idStart,
bool idFillByFirstY,
int idStepByRow,
int idStep = 1);
55 std::shared_ptr<Detector> getAtXY(
const size_t x,
const size_t y)
const;
57 detid_t getDetectorIDAtXY(
const size_t X,
const size_t Y)
const;
58 std::pair<size_t, size_t> getXYForDetectorID(
const detid_t detectorID)
const;
60 std::vector<double>
const &getXValues()
const;
61 std::vector<double>
const &getYValues()
const;
63 void setColors(
const std::vector<int> &r,
const std::vector<int> &g,
const std::vector<int> &b)
const;
65 std::vector<int>
const &getR()
const;
66 std::vector<int>
const &getG()
const;
67 std::vector<int>
const &getB()
const;
69 size_t xPixels()
const;
70 size_t yPixels()
const;
72 bool idFillByFirstY()
const;
73 int idStepByRow()
const;
81 std::shared_ptr<const IComponent> getComponentByName(
const std::string &cname,
int nlevels = 0)
const override;
87 using CompAssembly::getBoundingBox;
92 bool isValid(
const Kernel::V3D &point)
const override;
95 bool isOnSide(
const Kernel::V3D &point)
const override;
98 int interceptSurface(
Track &track)
const override;
104 void getBoundingBox(
BoundingBox &assemblyBox)
const override;
107 int getPointInObject(
Kernel::V3D &point)
const override;
111 void draw()
const override;
114 void drawObject()
const override;
118 void initDraw()
const override;
121 const std::shared_ptr<const IObject> shape()
const override;
126 virtual size_t registerContents(
class ComponentVisitor &componentVisitor)
const override;
133 void createDetectors();
164 mutable std::vector<int>
r;
165 mutable std::vector<int>
g;
166 mutable std::vector<int>
b;
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
Class for Assembly of geometric components.
ComponentVisitor : Visitor for IComponents.
This class represents a detector - i.e.
Class for Assembly of geometric components.
base class for Geometric IComponent
Object Component class, this class brings together the physical attributes of the component to the po...
Parameter map iterator typedef.
StructuredDetector is a type of CompAssembly, an assembly of components.
size_t m_xPixels
The number of pixels in the X (horizontal) direction;.
detid_t m_maxDetId
maximum detector id
size_t m_yPixels
The number of pixels in the Y (vertical) direction;.
const StructuredDetector * m_base
Pointer to the base RectangularDetector, for parametrized instruments.
int m_idStepByRow
Step size in ID in each row.
int m_idStep
Step size in ID in each col.
std::vector< double > m_yvalues
detid_t m_minDetId
minimum detector id
bool m_idFillByFirstY
IDs are filled in Y fastest.
std::string type() const override
String description of the type of component.
StructuredDetector & operator=(const ICompAssembly &)
Private copy assignment operator.
std::vector< double > m_xvalues
detid_t m_idStart
IDs start here.
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< StructuredDetector > StructuredDetector_sptr
MANTID_GEOMETRY_DLL std::ostream & operator<<(std::ostream &stream, const PointGroup &self)
Returns a streamed representation of the PointGroup object.
std::shared_ptr< const StructuredDetector > StructuredDetector_const_sptr
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.