MyWire.h
Go to the documentation of this file.
1 #ifndef WIRECELLIFACE_TEST_MYWIRE
2 #define WIRECELLIFACE_TEST_MYWIRE
3 
4 #include "WireCellIface/IWire.h"
5 #include "WireCellUtil/Point.h"
6 
7 class MyWire : public WireCell::IWire {
9  int m_index;
11 
12 public:
14  : m_wpid(layer), m_index(index), m_ray(ray)
15  {}
16  virtual ~MyWire() {}
17 
18  int ident() const {
19  int iplane = 1+m_wpid.index();
20  return iplane*100000 + m_index;
21  }
22 
23  WireCell::WirePlaneId planeid() const { return m_wpid; }
24 
25  int index() const { return m_index; }
26 
27  int channel() const { return ident(); }
28 
29  WireCell::Ray ray() const { return m_ray; }
30 
31  int segment() const {return 0;}
32 
33 };
34 
35 #endif
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
Definition: Point.h:21
int ident() const
Definition: MyWire.h:18
WireCell::Ray m_ray
Definition: MyWire.h:10
int channel() const
Definition: MyWire.h:27
WireCell::WirePlaneId m_wpid
Definition: MyWire.h:8
virtual ~MyWire()
Definition: MyWire.h:16
int segment() const
Definition: MyWire.h:31
Interface to information about a physical wire segment.
Definition: IWire.h:18
Definition: MyWire.h:7
int index() const
Definition: MyWire.h:25
MyWire(WireCell::WirePlaneLayer_t layer, int index, const WireCell::Ray &ray)
Definition: MyWire.h:13
WireCell::WirePlaneId planeid() const
The ID of the plane this wire is in.
Definition: MyWire.h:23
int m_index
Definition: MyWire.h:9
WirePlaneLayer_t
Enumerate layer IDs. These are not indices!
Definition: WirePlaneId.h:13
WireCell::Ray ray() const
Return the ray representing the wire segment.
Definition: MyWire.h:29
int index() const
Layer as index number (0,1 or 2). -1 if unknown.
Definition: WirePlaneId.cxx:34