24 if (bankName ==
"None")
26 std::shared_ptr<const Geometry::IComponent> parent = inst->getComponentByName(bankName);
27 if (parent->type() ==
"RectangularDetector") {
28 std::shared_ptr<const Geometry::RectangularDetector> RDet =
29 std::dynamic_pointer_cast<const Geometry::RectangularDetector>(parent);
31 return col < Edge || col >= (RDet->xpixels() - Edge) || row < Edge || row >= (RDet->ypixels() - Edge);
33 std::vector<Geometry::IComponent_const_sptr> children;
34 std::shared_ptr<const Geometry::ICompAssembly> asmb =
35 std::dynamic_pointer_cast<const Geometry::ICompAssembly>(parent);
36 asmb->getChildren(children,
false);
38 if (children[0]->
getName() ==
"sixteenpack") {
42 asmb = std::dynamic_pointer_cast<const Geometry::ICompAssembly>(parent);
43 asmb->getChildren(children,
false);
45 std::shared_ptr<const Geometry::ICompAssembly> asmb2 =
46 std::dynamic_pointer_cast<const Geometry::ICompAssembly>(children[0]);
47 std::vector<Geometry::IComponent_const_sptr> grandchildren;
48 asmb2->getChildren(grandchildren,
false);
49 auto NROWS =
static_cast<int>(grandchildren.size());
50 auto NCOLS =
static_cast<int>(children.size());
52 return col - startI < Edge || col - startI >= (NCOLS - Edge) || row - startI < Edge ||
53 row - startI >= (NROWS - Edge);
std::string getName(const IMDDimension &self)
MANTID_GEOMETRY_DLL bool edgePixel(const Geometry::Instrument_const_sptr &inst, const std::string &bankName, int col, int row, int Edge)
Function to find peaks near detector edge.
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.