LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
KHitGroup.h
Go to the documentation of this file.
1 
29 #ifndef KHITGROUP_H
30 #define KHITGROUP_H
31 
32 #include <vector>
34 
35 namespace trkf {
36 
37  class KHitGroup
38  {
39  public:
40 
42  KHitGroup(bool has_path = false, double path = 0.);
43 
45  virtual ~KHitGroup();
46 
47  // Accessors.
48 
50  const std::shared_ptr<const Surface>& getSurface() const {return fSurf;}
51 
53  int getPlane() const {return fPlane;}
54 
56  const std::vector<std::shared_ptr<const KHitBase> >& getHits() const {return fHits;}
57 
59  bool getHasPath() const {return fHasPath;}
60 
62  double getPath() const {return fPath;}
63 
64  // Modifiers.
65 
67  void clear() {fHits.clear();}
68 
70  void addHit(const std::shared_ptr<const KHitBase>& hit);
71 
73  void setPath(bool has_path, double path) {fHasPath = has_path; fPath = path;}
74 
75  // Relational operators, sort by estimated path distance.
76 
77  bool operator==(const KHitGroup& obj) const;
78  bool operator<(const KHitGroup& obj) const;
79 
80  private:
81 
82  // Attributes.
83 
84  std::shared_ptr<const Surface> fSurf;
85  int fPlane;
86  std::vector<std::shared_ptr<const KHitBase> > fHits;
87  bool fHasPath;
88  double fPath;
89  };
90 }
91 
92 #endif
bool operator<(const KHitGroup &obj) const
Less than operator.
Definition: KHitGroup.cxx:107
const std::vector< std::shared_ptr< const KHitBase > > & getHits() const
Measurement collection accessor.
Definition: KHitGroup.h:56
void setPath(bool has_path, double path)
Set path flag and estimated path distance.
Definition: KHitGroup.h:73
bool getHasPath() const
Path flag.
Definition: KHitGroup.h:59
bool fHasPath
Path flag.
Definition: KHitGroup.h:87
double getPath() const
Estimated path distance.
Definition: KHitGroup.h:62
KHitGroup(bool has_path=false, double path=0.)
Default constructor.
Definition: KHitGroup.cxx:23
virtual ~KHitGroup()
Destructor.
Definition: KHitGroup.cxx:30
void clear()
Clear the collection.
Definition: KHitGroup.h:67
std::shared_ptr< const Surface > fSurf
Common surface.
Definition: KHitGroup.h:84
int fPlane
Plane index of measurements.
Definition: KHitGroup.h:85
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:39
std::vector< std::shared_ptr< const KHitBase > > fHits
Measuement collection.
Definition: KHitGroup.h:86
const std::shared_ptr< const Surface > & getSurface() const
Surface accessor.
Definition: KHitGroup.h:50
bool operator==(const KHitGroup &obj) const
Equivalance operator.
Definition: KHitGroup.cxx:86
double fPath
Estimated path distance.
Definition: KHitGroup.h:88
Base class for Kalman filter measurement.
int getPlane() const
Plane index.
Definition: KHitGroup.h:53