LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TrackHitMeta.h
Go to the documentation of this file.
1 
11 #ifndef LARDATAOBJ_RECOBASE_TRACKHITMETA_H
12 #define LARDATAOBJ_RECOBASE_TRACKHITMETA_H
13 
14 #include <iosfwd>
15 
16 // #include "larcoreobj/SimpleTypesAndConstants/geo_vectors.h"
17 
18 namespace recob {
19 
43  class TrackHitMeta {
44  public:
46  TrackHitMeta() = default;
47 
49  TrackHitMeta(unsigned int idx, double dx = 0.0) : fIndex(idx), fDx(dx) {}
50 
52  unsigned int Index() const { return fIndex; }
53 
62  double Dx() const { return fDx; }
63 
64  // /// Candidate to keep 3D trajectory point here instead of inside recob::Track
65  //geo::Point_t const & Position3D(void) const { return fPosition3D; }
66 
67  private:
68  unsigned int fIndex = 0U;
69  double fDx = 0.0;
70 
71  //geo::Point_t fPosition3D;
72  }; // class TrackHitMeta
73 
74  inline std::ostream& operator<<(std::ostream& o, const TrackHitMeta& a)
75  {
76  o << a.Index();
77  return o;
78  }
79 
80  inline bool operator<(const TrackHitMeta& a, const TrackHitMeta& b)
81  {
82  return a.Index() < b.Index();
83  }
84 
85 } // namespace recob
86 
87 #endif // LARDATAOBJ_RECOBASE_TRACKHITMETA_H
Reconstruction base classes.
bool operator<(Cluster const &a, Cluster const &b)
Definition: Cluster.cxx:188
Data related to recob::Hit associated with recob::Track.The purpose is to collect several variables t...
Definition: TrackHitMeta.h:43
TrackHitMeta(unsigned int idx, double dx=0.0)
Constructor with initialization.
Definition: TrackHitMeta.h:49
double Dx() const
Length of the track segments associated with the 2D hit.
Definition: TrackHitMeta.h:62
unsigned int Index() const
Hit index along the track trajectory.
Definition: TrackHitMeta.h:52
double fDx
Stored dx size, in centimeters.
Definition: TrackHitMeta.h:69
unsigned int fIndex
Stored index of the hit in the sequence.
Definition: TrackHitMeta.h:68
std::ostream & operator<<(std::ostream &o, Cluster const &c)
Definition: Cluster.cxx:168
TrackHitMeta()=default
Default needed by ROOT.