IWireSummary.h
Go to the documentation of this file.
1 #ifndef WIRECELL_IWIRESUMMARY
2 #define WIRECELL_IWIRESUMMARY
3 
5 #include "WireCellIface/IWire.h"
6 
7 namespace WireCell {
8 
9  /** Interface to summary information about wires.
10  *
11  * Note: the actual implementation of these are likely just a
12  * bunch of stand-alone functions. They are couched into a class
13  * in order to allow for caching optimization and to avoid having
14  * to constantly pass in the wires.
15  */
16  class IWireSummary : public IData<IWireSummary> {
17  public:
18  //typedef std::shared_ptr<IWireSummary> pointer;
19 
20  virtual ~IWireSummary();
21 
22  /// Return the bounding box of the wire planes.
23  virtual const BoundingBox& box() const = 0;
24 
25  /// Return the closest wire along the pitch direction to the
26  /// given point in the given wire plane. It is assumed the
27  /// point is in the (Y-Z) bounding box of the wire plane.
28  virtual IWire::pointer closest(const Point& point, WirePlaneId wpid) const = 0;
29 
30  /// Return a pair of adjacent wires from the given plane which
31  /// bound the given point along the pitch direction. The pair
32  /// is ordered by increasing wire index number. If one or
33  /// both sides of the point are unbound by wire (segments) the
34  /// associated pointer will be zero. It is assumed the point
35  /// is in the (Y-Z) bounding box of the wire plane.
36  virtual IWirePair bounding_wires(const Point& point, WirePlaneId wpid) const = 0;
37 
38  /// Return the distance along the pitch of the given wire
39  /// plane to the given point as measured from the zeroth wire.
40  virtual double pitch_distance(const Point& point, WirePlaneId wpid) const = 0;
41 
42  /// Return a unit vector along the direction of the pitch.
43  virtual const Vector& pitch_direction(WirePlaneId wpid) const = 0;
44 
45  /// Return all wires, in order of segment number, attached to the channel.
46  virtual IWire::vector by_channel(int channel) const = 0;
47  };
48 }
49 
50 #endif
std::shared_ptr< const IWire > pointer
Definition: IData.h:19
virtual IWire::vector by_channel(int channel) const =0
Return all wires, in order of segment number, attached to the channel.
virtual IWire::pointer closest(const Point &point, WirePlaneId wpid) const =0
virtual double pitch_distance(const Point &point, WirePlaneId wpid) const =0
virtual const BoundingBox & box() const =0
Return the bounding box of the wire planes.
std::vector< pointer > vector
Definition: IData.h:21
std::pair< IWire::pointer, IWire::pointer > IWirePair
Some common collections.
Definition: IWire.h:55
Definition: Main.h:22
virtual IWirePair bounding_wires(const Point &point, WirePlaneId wpid) const =0
virtual const Vector & pitch_direction(WirePlaneId wpid) const =0
Return a unit vector along the direction of the pitch.