LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
KHitGroup.h
Go to the documentation of this file.
1 
29 #ifndef KHITGROUP_H
30 #define KHITGROUP_H
31 
33 #include <vector>
34 
35 namespace trkf {
36 
37  class KHitGroup {
38  public:
40  KHitGroup(bool has_path = false, double path = 0.);
41 
43  virtual ~KHitGroup();
44 
45  // Accessors.
46 
48  const std::shared_ptr<const Surface>& getSurface() const { return fSurf; }
49 
51  int getPlane() const { return fPlane; }
52 
54  const std::vector<std::shared_ptr<const KHitBase>>& getHits() const { return fHits; }
55 
57  bool getHasPath() const { return fHasPath; }
58 
60  double getPath() const { return fPath; }
61 
62  // Modifiers.
63 
65  void clear() { fHits.clear(); }
66 
68  void addHit(const std::shared_ptr<const KHitBase>& hit);
69 
71  void setPath(bool has_path, double path)
72  {
73  fHasPath = has_path;
74  fPath = path;
75  }
76 
77  // Relational operators, sort by estimated path distance.
78 
79  bool operator==(const KHitGroup& obj) const;
80  bool operator<(const KHitGroup& obj) const;
81 
82  private:
83  // Attributes.
84 
85  std::shared_ptr<const Surface> fSurf;
86  int fPlane;
87  std::vector<std::shared_ptr<const KHitBase>> fHits;
88  bool fHasPath;
89  double fPath;
90  };
91 }
92 
93 #endif
bool operator<(const KHitGroup &obj) const
Less than operator.
Definition: KHitGroup.cxx:100
const std::vector< std::shared_ptr< const KHitBase > > & getHits() const
Measurement collection accessor.
Definition: KHitGroup.h:54
void setPath(bool has_path, double path)
Set path flag and estimated path distance.
Definition: KHitGroup.h:71
bool getHasPath() const
Path flag.
Definition: KHitGroup.h:57
bool fHasPath
Path flag.
Definition: KHitGroup.h:88
double getPath() const
Estimated path distance.
Definition: KHitGroup.h:60
KHitGroup(bool has_path=false, double path=0.)
Default constructor.
Definition: KHitGroup.cxx:23
virtual ~KHitGroup()
Destructor.
Definition: KHitGroup.cxx:26
void clear()
Clear the collection.
Definition: KHitGroup.h:65
std::shared_ptr< const Surface > fSurf
Common surface.
Definition: KHitGroup.h:85
int fPlane
Plane index of measurements.
Definition: KHitGroup.h:86
Detector simulation of raw signals on wires.
void addHit(const std::shared_ptr< const KHitBase > &hit)
Add a mesaurement into the colleciton.
Definition: KHitGroup.cxx:34
std::vector< std::shared_ptr< const KHitBase > > fHits
Measuement collection.
Definition: KHitGroup.h:87
const std::shared_ptr< const Surface > & getSurface() const
Surface accessor.
Definition: KHitGroup.h:48
bool operator==(const KHitGroup &obj) const
Equivalance operator.
Definition: KHitGroup.cxx:81
double fPath
Estimated path distance.
Definition: KHitGroup.h:89
Base class for Kalman filter measurement.
int getPlane() const
Plane index.
Definition: KHitGroup.h:51