LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SpacePoint.h
Go to the documentation of this file.
1 //
3 // Definition of SpacePoint class for LArSoft
4 //
5 // SpacePoints are 3D objects that contain pointers to Hits from multiple
6 // wireplanes that have been identified as matching.
7 //
8 // msoderbe@syr.edu
9 //
11 
12 #ifndef SPACEPOINT_H
13 #define SPACEPOINT_H
14 
15 #include <iosfwd>
16 
18 #include <Rtypes.h>
19 
20 namespace recob {
21 
22  class SpacePoint {
23 
24  public:
25  using ID_t = int;
26 
28  static constexpr ID_t InvalidID = util::kBogusI;
29 
30 
31  SpacePoint();
32 
33  private:
35  Double32_t fXYZ[3];
36  Double32_t fErrXYZ[6];
37  Double32_t fChisq;
38 
39  public:
40  SpacePoint(Double32_t const*xyz,
41  Double32_t const*err,
42  Double32_t chisq,
43  int id=InvalidID);
44 
45  ID_t ID() const;
46  const Double32_t* XYZ() const;
47  const Double32_t* ErrXYZ() const;
48  Double32_t Chisq() const;
49 
50  friend std::ostream& operator << (std::ostream& o, const SpacePoint & a);
51  friend bool operator < (const SpacePoint & a, const SpacePoint & b);
52 
53 
54  };
55 
57  inline bool operator< (SpacePoint const& s, SpacePoint::ID_t id) { return s.ID() < id; }
59  inline bool operator< (SpacePoint::ID_t id, SpacePoint const& s) { return id < s.ID(); }
60 
61 }
62 
63 
65 inline const Double32_t* recob::SpacePoint::XYZ() const { return fXYZ; }
66 inline const Double32_t* recob::SpacePoint::ErrXYZ() const { return fErrXYZ; }
67 inline Double32_t recob::SpacePoint::Chisq() const { return fChisq; }
68 
69 #endif //SPACEPOINT_H
Float_t s
Definition: plot.C:23
Reconstruction base classes.
int ID_t
type of spacepoint ID
Definition: SpacePoint.h:25
Double32_t Chisq() const
Definition: SpacePoint.h:67
ID_t fID
Default constructor.
Definition: SpacePoint.h:34
constexpr int kBogusI
obviously bogus integer value
Double32_t fXYZ[3]
position of SpacePoint in xyz
Definition: SpacePoint.h:35
Double32_t fChisq
Chisquare.
Definition: SpacePoint.h:37
friend bool operator<(const SpacePoint &a, const SpacePoint &b)
Definition: SpacePoint.cxx:56
const Double32_t * XYZ() const
Definition: SpacePoint.h:65
static constexpr ID_t InvalidID
Special value for an invalid ID.
Definition: SpacePoint.h:28
const Double32_t * ErrXYZ() const
Definition: SpacePoint.h:66
Double32_t fErrXYZ[6]
Error matrix (triangular).
Definition: SpacePoint.h:36
ID_t ID() const
Definition: SpacePoint.h:64
friend std::ostream & operator<<(std::ostream &o, const SpacePoint &a)
Definition: SpacePoint.cxx:40