25 assert(opDets.size() % 2 == 0);
42 std::vector<OpDetSpan_t> OpDetsPerPlane;
45 auto const middle = std::next(opDets.begin(), opDets.size() / 2U);
48 OpDetsPerPlane.emplace_back(opDets.begin(), middle);
49 OpDetsPerPlane.emplace_back(middle, opDets.end());
50 assert(OpDetsPerPlane[0].
size() == OpDetsPerPlane[1].
size());
55 for (
auto const& planeOpDets: OpDetsPerPlane)
72 std::stable_sort(
begin(opDets),
end(opDets), fSmallerCenterY);
75 std::stable_sort(
begin(opDets),
end(opDets), fSmallerCenterZ);
OpDetGeoCenterCoordComparer<&geo::Point_t::X > const fSmallerCenterX
Sorting criterium according to x coordinate of geo::OpDetGeo center.
auto make_span(BIter begin, EIter end)
Creates a span from specified iterators (can use constructor instead).
std::size_t size(FixedBins< T, C > const &) noexcept
Simple class with a begin and an end.
void sortInPlane(OpDetSpan_t const &opDets) const
Sorts the geo::OpDetGeo assuming they belong to the same plane.
auto end(FixedBins< T, C > const &) noexcept
auto begin(FixedBins< T, C > const &) noexcept
Geometry obect sorter with PMT following TPC wire order.
void sort(std::vector< geo::OpDetGeo > &opDets) const
Sorts the specified optical detectors.