Public Member Functions | Private Attributes | Friends | List of all members
gar::rec::VecHit Class Reference

#include <VecHit.h>

Public Member Functions

 VecHit ()
 
 VecHit (float *pos, float *dir, float len)
 
const float * Position () const
 
const float * Direction () const
 
float Length () const
 

Private Attributes

float fPosition [3]
 position of the vector hit More...
 
float fDirection [3]
 direction cosines More...
 
float fLength
 length of VH (centered on fPosition, half of the length is in either direction) More...
 

Friends

std::ostream & operator<< (std::ostream &o, gar::rec::VecHit const &h)
 

Detailed Description

Definition at line 15 of file VecHit.h.

Constructor & Destructor Documentation

gar::rec::VecHit::VecHit ( )

Definition at line 15 of file VecHit.cxx.

16  {
17  return;
18  }
gar::rec::VecHit::VecHit ( float *  pos,
float *  dir,
float  len 
)

Definition at line 21 of file VecHit.cxx.

24  : fLength (len )
25  {
26 
27  fPosition[0] = pos[0];
28  fPosition[1] = pos[1];
29  fPosition[2] = pos[2];
30 
31  fDirection[0] = dir[0];
32  fDirection[1] = dir[1];
33  fDirection[2] = dir[2];
34 
35  return;
36  }
string dir
float fPosition[3]
position of the vector hit
Definition: VecHit.h:24
float fDirection[3]
direction cosines
Definition: VecHit.h:25
float fLength
length of VH (centered on fPosition, half of the length is in either direction)
Definition: VecHit.h:26

Member Function Documentation

const float * gar::rec::VecHit::Direction ( ) const
inline

Definition at line 48 of file VecHit.h.

48 { return &fDirection[0]; }
float fDirection[3]
direction cosines
Definition: VecHit.h:25
float gar::rec::VecHit::Length ( ) const
inline

Definition at line 49 of file VecHit.h.

49 { return fLength; }
float fLength
length of VH (centered on fPosition, half of the length is in either direction)
Definition: VecHit.h:26
const float * gar::rec::VecHit::Position ( ) const
inline

Definition at line 47 of file VecHit.h.

47 { return &fPosition[0]; }
float fPosition[3]
position of the vector hit
Definition: VecHit.h:24

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
gar::rec::VecHit const &  h 
)
friend

Definition at line 39 of file VecHit.cxx.

40  {
41 
42  o << "Vector Hit "
43  << "\n\tposition = ("
44  << h.Position()[0]
45  << ", "
46  << h.Position()[1]
47  << ", "
48  << h.Position()[2]
49  << ")"
50  << "\tdirection = ("
51  << h.Direction()[0]
52  << ", "
53  << h.Direction()[1]
54  << ", "
55  << h.Direction()[2]
56  << ")"
57  << "\tLength = " << h.Length();
58 
59  return o;
60  }

Member Data Documentation

float gar::rec::VecHit::fDirection[3]
private

direction cosines

Definition at line 25 of file VecHit.h.

float gar::rec::VecHit::fLength
private

length of VH (centered on fPosition, half of the length is in either direction)

Definition at line 26 of file VecHit.h.

float gar::rec::VecHit::fPosition[3]
private

position of the vector hit

Definition at line 24 of file VecHit.h.


The documentation for this class was generated from the following files: