LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
KHitBase.h
Go to the documentation of this file.
1 
49 #ifndef KHITBASE_H
50 #define KHITBASE_H
51 
52 #include <ostream>
56 
57 namespace trkf {
58 
59  class KHitBase
60  {
61  public:
62 
64  KHitBase();
65 
67  KHitBase(const std::shared_ptr<const Surface>& psurf, int plane = -1);
68 
70  virtual ~KHitBase();
71 
72  // Accessors.
73 
75  const std::shared_ptr<const Surface>& getPredSurface() const {return fPredSurf;}
76 
78  double getPredDistance() const {return fPredDist;}
79 
81  const std::shared_ptr<const Surface>& getMeasSurface() const {return fMeasSurf;}
82 
84  int getMeasPlane() const {return fMeasPlane;}
85 
87  int getID() const {return fID;}
88 
89  // Modifiers.
90 
92  void setMeasSurface(const std::shared_ptr<const Surface>& psurf) {fMeasSurf = psurf;}
93 
95  void setMeasPlane(int plane) {fMeasPlane = plane;}
96 
97  // Pure virtual methods.
98 
100  virtual bool predict(const KETrack& tre, const Propagator* prop = 0,
101  const KTrack* ref = 0) const = 0;
102 
104  virtual double getChisq() const = 0;
105 
107  virtual void update(KETrack& tre) const = 0;
108 
110  virtual std::ostream& Print(std::ostream& out, bool doTitle = true) const;
111 
112  // Attributes.
113 
114  protected:
115 
116  mutable std::shared_ptr<const Surface> fPredSurf;
117  mutable double fPredDist;
118  int fID;
119 
120  private:
121 
122  std::shared_ptr<const Surface> fMeasSurf;
124  };
125 
127  std::ostream& operator<<(std::ostream& out, const KHitBase& trk);
128 }
129 
130 #endif
void setMeasSurface(const std::shared_ptr< const Surface > &psurf)
Measurement surface.
Definition: KHitBase.h:92
double getPredDistance() const
Prediction distance.
Definition: KHitBase.h:78
int getMeasPlane() const
Measurement plane index.
Definition: KHitBase.h:84
std::shared_ptr< const Surface > fMeasSurf
Measurement surface.
Definition: KHitBase.h:122
int getID() const
Unique id.
Definition: KHitBase.h:87
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KHitBase.cxx:40
std::shared_ptr< const Surface > fPredSurf
Prediction surface.
Definition: KHitBase.h:116
std::ostream & operator<<(std::ostream &out, const KGTrack &trg)
Output operator.
Definition: KGTrack.cxx:306
Base class for Kalman filter surface.
KHitBase()
Default constructor.
Definition: KHitBase.cxx:16
Base class for Kalman filter track propagator.
int fID
Unique id.
Definition: KHitBase.h:118
double fPredDist
Prediction distance.
Definition: KHitBase.h:117
virtual ~KHitBase()
Destructor.
Definition: KHitBase.cxx:36
virtual void update(KETrack &tre) const =0
Update track method.
virtual double getChisq() const =0
Return incremental chisquare.
int fMeasPlane
Measurement plane index.
Definition: KHitBase.h:123
void setMeasPlane(int plane)
Measurement plane.
Definition: KHitBase.h:95
Basic Kalman filter track class, with error.
const std::shared_ptr< const Surface > & getMeasSurface() const
Measurement surface.
Definition: KHitBase.h:81
virtual bool predict(const KETrack &tre, const Propagator *prop=0, const KTrack *ref=0) const =0
Prediction method (return false if fail).
const std::shared_ptr< const Surface > & getPredSurface() const
Predition surface.
Definition: KHitBase.h:75