25 if (bankName ==
"None") {
28 size_t parentIndex = compInfo.
indexOfAny(bankName);
29 if (compInfo.
componentType(parentIndex) == Beamline::ComponentType::Rectangular) {
32 return col < Edge || col >= (RDet->xpixels() - Edge) || row < Edge || row >= (RDet->ypixels() - Edge);
36 auto children = compInfo.
children(parentIndex);
38 if (!children.empty() && compInfo.
name(children[0]) ==
"sixteenpack") {
40 children = compInfo.
children(children[0]);
42 auto grandchildren = compInfo.
children(children[0]);
45 auto NROWS =
static_cast<int>(grandchildren.size());
46 auto NCOLS =
static_cast<int>(children.size());
48 return col - startI < Edge || col - startI >= (NCOLS - Edge) || row - startI < Edge ||
49 row - startI >= (NROWS - Edge);
ComponentInfo : Provides a component centric view on to the instrument.
size_t indexOfAny(const std::string &name) const
const std::vector< size_t > & children(size_t componentIndex) const
const IComponent * componentID(const size_t componentIndex) const
const std::string & name(const size_t componentIndex) const
Beamline::ComponentType componentType(const size_t componentIndex) const
RectangularDetector is a type of CompAssembly, an assembly of components.
MANTID_GEOMETRY_DLL bool edgePixel(ComponentInfo const &info, const std::string &bankName, int col, int row, int Edge)
Function to find peaks near detector edge.