LArSoft  v06_85_00
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 
19 namespace recob {
20 
21  class SpacePoint {
22 
23  public:
24  using ID_t = int;
25 
27  static constexpr ID_t InvalidID = util::kBogusI;
28 
29 
30  SpacePoint();
31 
32  private:
34  double fXYZ[3];
35  double fErrXYZ[6];
36  double fChisq;
37 
38  public:
39  SpacePoint(double const*xyz,
40  double const*err,
41  double chisq,
42  int id=InvalidID);
43 
44  ID_t ID() const;
45  const double* XYZ() const;
46  const double* ErrXYZ() const;
47  double Chisq() const;
48 
49  friend std::ostream& operator << (std::ostream& o, const SpacePoint & a);
50  friend bool operator < (const SpacePoint & a, const SpacePoint & b);
51 
52 
53  };
54 
56  inline bool operator< (SpacePoint const& s, SpacePoint::ID_t id) { return s.ID() < id; }
58  inline bool operator< (SpacePoint::ID_t id, SpacePoint const& s) { return id < s.ID(); }
59 
60 }
61 
62 
64 inline const double* recob::SpacePoint::XYZ() const { return fXYZ; }
65 inline const double* recob::SpacePoint::ErrXYZ() const { return fErrXYZ; }
66 inline double recob::SpacePoint::Chisq() const { return fChisq; }
67 
68 #endif //SPACEPOINT_H
Float_t s
Definition: plot.C:23
Reconstruction base classes.
int ID_t
type of spacepoint ID
Definition: SpacePoint.h:24
ID_t fID
Default constructor.
Definition: SpacePoint.h:33
constexpr int kBogusI
obviously bogus integer value
double fChisq
Chisquare.
Definition: SpacePoint.h:36
friend bool operator<(const SpacePoint &a, const SpacePoint &b)
Definition: SpacePoint.cxx:56
static constexpr ID_t InvalidID
Special value for an invalid ID.
Definition: SpacePoint.h:27
double fErrXYZ[6]
Error matrix (triangular).
Definition: SpacePoint.h:35
const double * ErrXYZ() const
Definition: SpacePoint.h:65
ID_t ID() const
Definition: SpacePoint.h:63
double Chisq() const
Definition: SpacePoint.h:66
const double * XYZ() const
Definition: SpacePoint.h:64
friend std::ostream & operator<<(std::ostream &o, const SpacePoint &a)
Definition: SpacePoint.cxx:40
double fXYZ[3]
position of SpacePoint in xyz
Definition: SpacePoint.h:34