LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
KHitMulti.h
Go to the documentation of this file.
1 
46 #ifndef KHITMULTI_H
47 #define KHITMULTI_H
48 
50 
51 namespace trkf {
52 
53  class KHitMulti : public KHitBase {
54  public:
56  KHitMulti();
57 
59  KHitMulti(const std::shared_ptr<const Surface>& psurf);
60 
62  virtual ~KHitMulti();
63 
64  // Accessors.
65 
67  int getMeasDim() const { return fMeasDim; }
68 
70  const std::vector<std::shared_ptr<const KHit<1>>>& getMeasVec() const { return fMeasVec; }
71 
73  const ublas::vector<double>& getMeasVector() const { return fMvec; }
74 
76  const ublas::symmetric_matrix<double>& getMeasError() const { return fMerr; }
77 
79  const ublas::vector<double>& getPredVector() const { return fPvec; }
80 
82  const ublas::symmetric_matrix<double>& getPredError() const { return fPerr; }
83 
85  const ublas::vector<double>& getResVector() const { return fRvec; }
86 
88  const ublas::symmetric_matrix<double>& getResError() const { return fRerr; }
89 
91  const ublas::symmetric_matrix<double>& getResInvError() const { return fRinv; }
92 
94  const ublas::matrix<double>& getH() const { return fH; }
95 
97  double getChisq() const { return fChisq; }
98 
99  // Modifiers.
100 
102  void addMeas(const std::shared_ptr<const KHitBase>& pmeas);
103 
105  void addMeas(const std::shared_ptr<const KHit<1>>& pmeas);
106 
107  // Overrides.
108 
110  bool predict(const KETrack& tre, const Propagator& prop, const KTrack* ref = 0) const;
111 
113  void update(KETrack& tre) const;
114 
116  virtual std::ostream& Print(std::ostream& out, bool doTitle = true) const;
117 
118  private:
119  // Attributes.
120 
121  int fMeasDim;
122  std::vector<std::shared_ptr<const KHit<1>>> fMeasVec;
123  mutable ublas::vector<double> fMvec;
124  mutable ublas::symmetric_matrix<double> fMerr;
125  mutable ublas::vector<double> fPvec;
126  mutable ublas::symmetric_matrix<double> fPerr;
127  mutable ublas::vector<double> fRvec;
128  mutable ublas::symmetric_matrix<double> fRerr;
129  mutable ublas::symmetric_matrix<double> fRinv;
130  mutable ublas::matrix<double> fH;
131  mutable double fChisq;
132  };
133 }
134 
135 #endif
ublas::vector< double > fPvec
Prediction vector.
Definition: KHitMulti.h:125
const ublas::symmetric_matrix< double > & getResError() const
Residual error matrix.
Definition: KHitMulti.h:88
int getMeasDim() const
Measurement space dimension.
Definition: KHitMulti.h:67
const ublas::symmetric_matrix< double > & getPredError() const
Prediction matrix.
Definition: KHitMulti.h:82
const ublas::symmetric_matrix< double > & getMeasError() const
Measurement error matrix.
Definition: KHitMulti.h:76
const ublas::matrix< double > & getH() const
Kalman H-matrix.
Definition: KHitMulti.h:94
std::vector< std::shared_ptr< const KHit< 1 > > > fMeasVec
Underlying measurements.
Definition: KHitMulti.h:122
const ublas::vector< double > & getMeasVector() const
Measurement vector.
Definition: KHitMulti.h:73
Kalman filter measurement class template.
const std::vector< std::shared_ptr< const KHit< 1 > > > & getMeasVec() const
Measurement collection.
Definition: KHitMulti.h:70
void addMeas(const std::shared_ptr< const KHitBase > &pmeas)
Add a measurement of unknown type.
Definition: KHitMulti.cxx:41
ublas::symmetric_matrix< double > fRinv
Residual inverse error matrix.
Definition: KHitMulti.h:129
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KHitMulti.cxx:240
KHitMulti()
Default constructor.
Definition: KHitMulti.cxx:17
ublas::symmetric_matrix< double > fPerr
Prediction error matrix.
Definition: KHitMulti.h:126
ublas::vector< double > fRvec
Residual vector.
Definition: KHitMulti.h:127
bool predict(const KETrack &tre, const Propagator &prop, const KTrack *ref=0) const
Prediction method (return false if fail).
Definition: KHitMulti.cxx:92
ublas::matrix< double > fH
Kalman H-matrix.
Definition: KHitMulti.h:130
ublas::symmetric_matrix< double > fRerr
Residual error matrix.
Definition: KHitMulti.h:128
ublas::symmetric_matrix< double > fMerr
Measurement error matrix.
Definition: KHitMulti.h:124
double getChisq() const
Incremental chisquare.
Definition: KHitMulti.h:97
void update(KETrack &tre) const
Update track method.
Definition: KHitMulti.cxx:198
double fChisq
Incremental chisquare.
Definition: KHitMulti.h:131
const ublas::vector< double > & getResVector() const
Residual vector.
Definition: KHitMulti.h:85
ublas::vector< double > fMvec
Measurement vector.
Definition: KHitMulti.h:123
const ublas::vector< double > & getPredVector() const
Prediction vector.
Definition: KHitMulti.h:79
virtual ~KHitMulti()
Destructor.
Definition: KHitMulti.cxx:30
int fMeasDim
Measurement space dimension.
Definition: KHitMulti.h:121
const ublas::symmetric_matrix< double > & getResInvError() const
Residual inv. error matrix.
Definition: KHitMulti.h:91