8 #ifndef WIRECELL_RAYTILING 9 #define WIRECELL_RAYTILING 35 return (bounds.first <= pitch_index) and (pitch_index < bounds.second);
38 return (bounds.first <= pitch_index) and (pitch_index <= bounds.second);
56 typedef std::pair<iterator_t,iterator_t>
range_t;
65 int offset=0,
double threshold=0.0);
70 int offset=0,
double threshold=0.0);
73 Activity subspan(
int pi_begin,
int pi_end)
const;
77 iterator_t
begin()
const;
78 iterator_t
end()
const;
84 int pitch_index(
const iterator_t& it)
const;
87 Strip make_strip(
const range_t& subspan)
const;
91 strips_t make_strips()
const;
94 ranges_t active_ranges()
const;
96 int offset()
const {
return m_offset; }
111 const strips_t&
strips()
const {
return m_strips; }
119 size_t nstrips = m_strips.size();
120 if (nstrips == 0) {
return false; }
121 if (nstrips == 1) {
return true; }
122 return corners().size() > 0;
145 blobs_t operator()(
const Activity& activity);
148 blobs_t operator()(
const blobs_t& prior,
174 os <<
"<strip L" << s.
layer <<
" pind:[" << s.
bounds.first <<
"," << s.
bounds.second <<
"]>";
183 os <<
"<activity L" << a.
layer() <<
" " << strips.size() <<
" strips over pind:[" << b <<
"," <<
e <<
"]>";
190 os <<
"<blob " << b.
strips().size() <<
" strips, " << b.
corners().size() <<
" corners>";
197 os <<
"<corner [{L" << c.first.layer <<
",G" << c.first.grid <<
"}," 198 <<
"{L" << c.second.layer <<
",G" << c.second.grid <<
"}]>";
span(IterB &&b, IterE &&e, Adaptor &&adaptor) -> span< decltype(adaptor(std::forward< IterB >(b))), decltype(adaptor(std::forward< IterE >(e))) >
bool in(grid_index_t pitch_index) const
Coord add(Coord c1, Coord c2)
strips_t make_strips() const
void prune(const Coordinates &coords, blobs_t &blobs)
std::vector< Strip > strips_t
std::vector< range_t > ranges_t
vector_t::const_iterator iterator_t
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
size_t drop_invalid(blobs_t &blobs)
free functions
def activity(output, slices, slice_line, cluster_tap_file)
std::ostream & operator<<(std::ostream &os, const WireCell::RayGrid::coordinate_t &ra)
std::pair< grid_index_t, grid_index_t > grid_range_t
int pitch_index(const iterator_t &it) const
layer_index_t layer() const
const strips_t & strips() const
std::vector< value_t > vector_t
const Coordinates & m_coords
std::vector< crossing_t > crossings_t
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
std::vector< Blob > blobs_t
bool on(grid_index_t pitch_index) const
std::pair< coordinate_t, coordinate_t > crossing_t
const GenericPointer< typename T::ValueType > T2 value
blobproj_t projection(const blobvec_t &blobs, layer_index_t layer)
blobs_t make_blobs(const Coordinates &coords, const activities_t &activities)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
const crossings_t & corners() const
std::vector< Activity > activities_t
std::pair< iterator_t, iterator_t > range_t
crossing_t addresses() const
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.