16 int ind = wires.size()/2;
23 const Vector center0 = zero->center();
38 copy_if(all_wires.begin(), all_wires.end(),
42 pitch_unit = pitch_vector.norm();
43 pitch_mag = pitch_vector.magnitude();
47 if (index < 0 || index >= (
int)wires.size()) {
70 for (
auto wire : wires) {
72 chan2wire[wire->channel()].insert(wire);
81 for (
int ind=0; ind<3; ++ind) {
82 delete plane_cache[ind];
87 return plane(wpid.
index());
90 if (index<0 ||index>2)
return 0;
91 return plane_cache[
index];
139 int index = wire->index();
141 Vector topoint = point - wire->ray().first;
143 int other_index = index - 1;
145 other_index = index + 1;
150 if (index < other_index) {
186 return m_cache->by_chan(channel);
WirePlaneCache(WirePlaneId wpid, const IWire::vector &all_wires)
virtual const Vector & pitch_direction(WirePlaneId wpid) const
Return a unit vector along the direction of the pitch.
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
virtual IWire::pointer closest(const Point &point, WirePlaneId wpid) const
std::shared_ptr< const IWire > pointer
D3Vector< double > Point
A 3D Cartesian point in double precision.
std::set< IWire::pointer, IWireCompareSegment > IWireSegmentSet
static IWire::vector dummy_vector
IWire::vector by_chan(int chan)
WirePlaneCache * plane(int index)
std::vector< pointer > vector
virtual IWirePair bounding_wires(const Point &point, WirePlaneId wpid) const
WireSummary(const IWire::vector &wires)
static Ray pitch2(const IWire::vector &wires)
virtual IWire::vector by_channel(int channel) const
Return all wires, in order of segment number, attached to the channel.
double ray_dist(const Ray &ray, const Point &point)
wire_selector select_uvw_wires[3]
std::pair< IWire::pointer, IWire::pointer > IWirePair
Some common collections.
double pitch_distance(const Point &point)
WireSummaryCache * m_cache
virtual const BoundingBox & box() const
Return the bounding box of the wire planes.
WirePlaneCache * plane(WirePlaneId wpid)
std::vector< float > Vector
Ray ray_pitch(const Ray &ray1, const Ray &ray2)
IWire::pointer wire_by_index(int index)
virtual double pitch_distance(const Point &point, WirePlaneId wpid) const
cet::LibraryManager dummy("noplugin")
Vector ray_vector(const Ray &ray)
std::map< int, IWireSegmentSet > chan2wire
int index() const
Layer as index number (0,1 or 2). -1 if unknown.
WireSummaryCache(const IWire::vector &wires)