Loading src/core/geometry/DetectorModel.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -289,15 +289,14 @@ std::vector<SupportLayer> DetectorModel::getSupportLayers() const { std::optional<DetectorModel::Implant> DetectorModel::isWithinImplant(const ROOT::Math::XYZPoint& local_pos) const { // Bail out if we have no implants - no need to transform coordinates: auto implants = getImplants(); if(implants.empty()) { if(implants_.empty()) { return std::nullopt; } auto [xpixel, ypixel] = getPixelIndex(local_pos); auto inPixelPos = local_pos - getPixelCenter(xpixel, ypixel); for(const auto& implant : implants) { for(const auto& implant : implants_) { if(implant.contains(inPixelPos)) { return implant; } Loading Loading
src/core/geometry/DetectorModel.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -289,15 +289,14 @@ std::vector<SupportLayer> DetectorModel::getSupportLayers() const { std::optional<DetectorModel::Implant> DetectorModel::isWithinImplant(const ROOT::Math::XYZPoint& local_pos) const { // Bail out if we have no implants - no need to transform coordinates: auto implants = getImplants(); if(implants.empty()) { if(implants_.empty()) { return std::nullopt; } auto [xpixel, ypixel] = getPixelIndex(local_pos); auto inPixelPos = local_pos - getPixelCenter(xpixel, ypixel); for(const auto& implant : implants) { for(const auto& implant : implants_) { if(implant.contains(inPixelPos)) { return implant; } Loading