VecHit.h
Go to the documentation of this file.
1 //
2 // VecHit.h
3 //
4 // Created by Tom Junk on Feb. 5, 2019.
5 //
6 
7 #ifndef GAR_RECONSTRUCTIONDATAPRODUCTS_VecHit_h
8 #define GAR_RECONSTRUCTIONDATAPRODUCTS_VecHit_h
9 
10 #include <iostream>
11 
12 namespace gar {
13  namespace rec {
14 
15  class VecHit {
16 
17  public:
18  VecHit();
19 
20  // let the compiler provide the dtor
21 
22  private:
23 
24  float fPosition[3]; ///< position of the vector hit
25  float fDirection[3]; ///< direction cosines
26  float fLength; ///< length of VH (centered on fPosition, half of the length is in either direction)
27 
28 
29 #ifndef __GCCXML__
30 
31  public:
32 
33  VecHit(float *pos,
34  float *dir,
35  float len);
36 
37  const float* Position() const;
38  const float* Direction() const;
39  float Length() const;
40 
41  friend std::ostream& operator << (std::ostream & o, gar::rec::VecHit const& h);
42 
43 #endif
44 
45  };
46 
47  inline const float* VecHit::Position() const { return &fPosition[0]; }
48  inline const float* VecHit::Direction() const { return &fDirection[0]; }
49  inline float VecHit::Length() const { return fLength; }
50  } // rec
51 } // gar
52 
53 
54 #endif /* GAR_RECONSTRUCTIONDATAPRODUCTS_VecHit_h */
rec
Definition: tracks.py:88
const float * Position() const
Definition: VecHit.h:47
string dir
float fPosition[3]
position of the vector hit
Definition: VecHit.h:24
const float * Direction() const
Definition: VecHit.h:48
friend std::ostream & operator<<(std::ostream &o, gar::rec::VecHit const &h)
Definition: VecHit.cxx:39
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
float Length() const
Definition: VecHit.h:49
General GArSoft Utilities.