Public Member Functions | Public Attributes | List of all members
WirePlaneCache Struct Reference

Public Member Functions

 WirePlaneCache (WirePlaneId wpid, const IWire::vector &all_wires)
 
IWire::pointer wire_by_index (int index)
 
double pitch_distance (const Point &point)
 

Public Attributes

WirePlaneId wpid
 
IWire::vector wires
 
Ray pitch_ray
 
Vector pitch_vector
 
Vector pitch_unit
 
double pitch_mag
 

Detailed Description

Definition at line 27 of file WireSummary.cxx.

Constructor & Destructor Documentation

WirePlaneCache::WirePlaneCache ( WirePlaneId  wpid,
const IWire::vector all_wires 
)
inline

Definition at line 35 of file WireSummary.cxx.

36  : wpid(wpid) // maybe one day support more then one face/apa
37  {
38  copy_if(all_wires.begin(), all_wires.end(),
39  back_inserter(wires), select_uvw_wires[wpid.index()]);
41  pitch_vector = ray_vector(pitch_ray); // cache
42  pitch_unit = pitch_vector.norm(); // the
43  pitch_mag = pitch_vector.magnitude(); // things!
44  }
IWire::vector wires
Definition: WireSummary.cxx:29
static Ray pitch2(const IWire::vector &wires)
Definition: WireSummary.cxx:13
wire_selector select_uvw_wires[3]
Vector pitch_vector
Definition: WireSummary.cxx:31
WirePlaneId wpid
Definition: WireSummary.cxx:28
Vector ray_vector(const Ray &ray)
Definition: Point.cxx:67
int index() const
Layer as index number (0,1 or 2). -1 if unknown.
Definition: WirePlaneId.cxx:34

Member Function Documentation

double WirePlaneCache::pitch_distance ( const Point point)
inline

Definition at line 53 of file WireSummary.cxx.

53  {
54  return ray_dist(pitch_ray, point);
55  }
double ray_dist(const Ray &ray, const Point &point)
Definition: Point.cxx:95
IWire::pointer WirePlaneCache::wire_by_index ( int  index)
inline

Definition at line 46 of file WireSummary.cxx.

46  {
47  if (index < 0 || index >= (int)wires.size()) {
48  return 0;
49  }
50  return wires[index];
51  }
IWire::vector wires
Definition: WireSummary.cxx:29

Member Data Documentation

double WirePlaneCache::pitch_mag

Definition at line 33 of file WireSummary.cxx.

Ray WirePlaneCache::pitch_ray

Definition at line 30 of file WireSummary.cxx.

Vector WirePlaneCache::pitch_unit

Definition at line 32 of file WireSummary.cxx.

Vector WirePlaneCache::pitch_vector

Definition at line 31 of file WireSummary.cxx.

IWire::vector WirePlaneCache::wires

Definition at line 29 of file WireSummary.cxx.

WirePlaneId WirePlaneCache::wpid

Definition at line 28 of file WireSummary.cxx.


The documentation for this struct was generated from the following file: