Loading src/core/geometry/PixelDetectorModel.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,8 @@ ROOT::Math::XYZPoint PixelDetectorModel::getSensorIntercept(const ROOT::Math::XY // We have to be centered around the sensor box. This means we need to shift by the matrix center auto translation_local = ROOT::Math::Translation3D(static_cast<ROOT::Math::XYZVector>(getMatrixCenter())); auto intersection_point = LiangBarsky(direction, translation_local.Inverse()(inside), getSensorSize()); auto intersection_point = LiangBarskyClosestIntersection(direction, translation_local.Inverse()(inside), getSensorSize()); // Get intersection from Liang-Barsky line clipping and re-transform to local coordinates: if(intersection_point) { Loading src/tools/liang_barsky.h +3 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ namespace allpix { * direction from the given position. * */ inline std::optional<ROOT::Math::XYZPoint> LiangBarsky(const ROOT::Math::XYZVector& direction, inline std::optional<ROOT::Math::XYZPoint> LiangBarskyClosestIntersection(const ROOT::Math::XYZVector& direction, const ROOT::Math::XYZPoint& position, const ROOT::Math::XYZVector& box) { Loading Loading
src/core/geometry/PixelDetectorModel.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,8 @@ ROOT::Math::XYZPoint PixelDetectorModel::getSensorIntercept(const ROOT::Math::XY // We have to be centered around the sensor box. This means we need to shift by the matrix center auto translation_local = ROOT::Math::Translation3D(static_cast<ROOT::Math::XYZVector>(getMatrixCenter())); auto intersection_point = LiangBarsky(direction, translation_local.Inverse()(inside), getSensorSize()); auto intersection_point = LiangBarskyClosestIntersection(direction, translation_local.Inverse()(inside), getSensorSize()); // Get intersection from Liang-Barsky line clipping and re-transform to local coordinates: if(intersection_point) { Loading
src/tools/liang_barsky.h +3 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ namespace allpix { * direction from the given position. * */ inline std::optional<ROOT::Math::XYZPoint> LiangBarsky(const ROOT::Math::XYZVector& direction, inline std::optional<ROOT::Math::XYZPoint> LiangBarskyClosestIntersection(const ROOT::Math::XYZVector& direction, const ROOT::Math::XYZPoint& position, const ROOT::Math::XYZVector& box) { Loading