8#include "MantidGeometry/DllConfig.h"
21class ComponentVisitor;
39 std::string
type()
const override {
return "GridDetector"; }
48 static bool compareName(
const std::string &proposedMatch);
51 void initialize(std::shared_ptr<IObject> shape,
int xpixels,
double xstart,
double xstep,
int ypixels,
double ystart,
52 double ystep,
int zpixels,
double zstart,
double zstep,
int idstart,
const std::string &idFillOrder,
53 int idstepbyrow,
int idstep = 1);
58 std::shared_ptr<Detector> getAtXYZ(
const int x,
const int y,
const int z)
const;
60 detid_t getDetectorIDAtXYZ(
const int x,
const int y,
const int z)
const;
61 std::tuple<int, int, int> getXYZForDetectorID(
const detid_t detectorID)
const;
71 double xstart()
const;
72 double ystart()
const;
73 double zstart()
const;
83 bool idfillbyfirst_y()
const;
84 std::string idFillOrder()
const;
85 int idstepbyrow()
const;
88 Kernel::V3D getRelativePosAtXYZ(
int x,
int y,
int z)
const;
93 std::shared_ptr<const IComponent> getComponentByName(
const std::string &cname,
int nlevels = 0)
const override;
98 using CompAssembly::getBoundingBox;
100 void testIntersectionWithChildren(
Track &testRay, std::deque<IComponent_const_sptr> &searchQueue)
const override;
105 bool isValid(
const Kernel::V3D &point)
const override;
108 bool isOnSide(
const Kernel::V3D &point)
const override;
111 int interceptSurface(
Track &track)
const override;
115 double solidAngle(
const Kernel::V3D &observer)
const override;
117 void getBoundingBox(
BoundingBox &assemblyBox)
const override;
120 int getPointInObject(
Kernel::V3D &point)
const override;
124 void draw()
const override;
127 void drawObject()
const override;
131 void initDraw()
const override;
134 const std::shared_ptr<const IObject> shape()
const override;
138 virtual size_t registerContents(
class ComponentVisitor &componentVisitor)
const override;
144 void createLayer(
const std::string &name,
CompAssembly *parent,
int iz,
int &minDetID,
int &maxDetID);
147 void initializeValues(std::shared_ptr<IObject> shape,
int xpixels,
double xstart,
double xstep,
int ypixels,
148 double ystart,
double ystep,
int zpixels,
double zstart,
double zstep,
int idstart,
149 const std::string &idFillOrder,
int idstepbyrow,
int idstep);
151 void validateInput()
const;
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.
GridrDetectorPixel: a sub-class of Detector that is one pixel inside a GridDetector.
GridDetector is a type of CompAssembly, an assembly of components.
double m_zstart
Z position of the 0-th pixel.
bool m_idfillbyfirst_y
IDs are filled in Y fastest.
int m_xpixels
The number of pixels in the X (horizontal) direction.
double m_ysize
Size in Y of the detector.
std::shared_ptr< IObject > m_shape
Pointer to the shape of the pixels in this detector array.
int m_ypixels
The number of pixels in the Y (vertical) direction.
double m_ystart
Y position of the 0-th pixel.
int m_idstep
Step size in ID in each col.
double m_zstep
Step size in the Z direction of the detector.
GridDetector & operator=(const ICompAssembly &)
Private copy assignment operator.
detid_t m_minDetId
minimum detector id
double m_ystep
Step size in the Y direction of detector.
double m_xsize
Size in X of the detector.
std::string m_idFillOrder
The order in which to fill IDs.
const GridDetector * m_gridBase
Pointer to the base GridDetector, for parametrized instruments.
double m_xstart
X position of the 0-th pixel.
double m_zsize
Size in Z of the detector.
int m_idstart
IDs start here.
std::string type() const override
String description of the type of component.
double m_xstep
Step size in the X direction of detector.
int m_idstepbyrow
Step size in ID in each row.
int m_zpixels
The number of pixels in the Z (usually beam) direction.
detid_t m_maxDetId
maximum detector id
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...
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 GridDetector > GridDetector_const_sptr
MANTID_GEOMETRY_DLL std::ostream & operator<<(std::ostream &stream, const PointGroup &self)
Returns a streamed representation of the PointGroup object.
std::shared_ptr< GridDetector > GridDetector_sptr
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.