LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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  {
55  public:
56 
58  KHitMulti();
59 
61  KHitMulti(const std::shared_ptr<const Surface>& psurf);
62 
64  virtual ~KHitMulti();
65 
66  // Accessors.
67 
69  int getMeasDim() const {return fMeasDim;}
70 
72  const std::vector<std::shared_ptr<const KHit<1> > >& getMeasVec() const {return fMeasVec;}
73 
75  const ublas::vector<double>& getMeasVector() const {return fMvec;}
76 
78  const ublas::symmetric_matrix<double>& getMeasError() const {return fMerr;}
79 
81  const ublas::vector<double>& getPredVector() const {return fPvec;}
82 
84  const ublas::symmetric_matrix<double>& getPredError() const {return fPerr;}
85 
87  const ublas::vector<double>& getResVector() const {return fRvec;}
88 
90  const ublas::symmetric_matrix<double>& getResError() const {return fRerr;}
91 
93  const ublas::symmetric_matrix<double>& getResInvError() const {return fRinv;}
94 
96  const ublas::matrix<double>& getH() const {return fH;}
97 
99  double getChisq() const {return fChisq;}
100 
101  // Modifiers.
102 
104  void addMeas(const std::shared_ptr<const KHitBase>& pmeas);
105 
107  void addMeas(const std::shared_ptr<const KHit<1> >& pmeas);
108 
109  // Overrides.
110 
112  bool predict(const KETrack& tre, const Propagator* prop = 0,
113  const KTrack* ref = 0) const;
114 
116  void update(KETrack& tre) const;
117 
119  virtual std::ostream& Print(std::ostream& out, bool doTitle = true) const;
120 
121  private:
122 
123  // Attributes.
124 
125  int fMeasDim;
126  std::vector<std::shared_ptr<const KHit<1> > > fMeasVec;
127  mutable ublas::vector<double> fMvec;
128  mutable ublas::symmetric_matrix<double> fMerr;
129  mutable ublas::vector<double> fPvec;
130  mutable ublas::symmetric_matrix<double> fPerr;
131  mutable ublas::vector<double> fRvec;
132  mutable ublas::symmetric_matrix<double> fRerr;
133  mutable ublas::symmetric_matrix<double> fRinv;
134  mutable ublas::matrix<double> fH;
135  mutable double fChisq;
136  };
137 }
138 
139 #endif
ublas::vector< double > fPvec
Prediction vector.
Definition: KHitMulti.h:129
bool predict(const KETrack &tre, const Propagator *prop=0, const KTrack *ref=0) const
Prediction method (return false if fail).
Definition: KHitMulti.cxx:98
const ublas::symmetric_matrix< double > & getResError() const
Residual error matrix.
Definition: KHitMulti.h:90
int getMeasDim() const
Measurement space dimension.
Definition: KHitMulti.h:69
const ublas::symmetric_matrix< double > & getPredError() const
Prediction matrix.
Definition: KHitMulti.h:84
const ublas::symmetric_matrix< double > & getMeasError() const
Measurement error matrix.
Definition: KHitMulti.h:78
const ublas::matrix< double > & getH() const
Kalman H-matrix.
Definition: KHitMulti.h:96
std::vector< std::shared_ptr< const KHit< 1 > > > fMeasVec
Underlying measurements.
Definition: KHitMulti.h:126
const ublas::vector< double > & getMeasVector() const
Measurement vector.
Definition: KHitMulti.h:75
Kalman filter measurement class template.
const std::vector< std::shared_ptr< const KHit< 1 > > > & getMeasVec() const
Measurement collection.
Definition: KHitMulti.h:72
void addMeas(const std::shared_ptr< const KHitBase > &pmeas)
Add a measurement of unknown type.
Definition: KHitMulti.cxx:47
ublas::symmetric_matrix< double > fRinv
Residual inverse error matrix.
Definition: KHitMulti.h:133
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KHitMulti.cxx:247
KHitMulti()
Default constructor.
Definition: KHitMulti.cxx:17
ublas::symmetric_matrix< double > fPerr
Prediction error matrix.
Definition: KHitMulti.h:130
ublas::vector< double > fRvec
Residual vector.
Definition: KHitMulti.h:131
ublas::matrix< double > fH
Kalman H-matrix.
Definition: KHitMulti.h:134
ublas::symmetric_matrix< double > fRerr
Residual error matrix.
Definition: KHitMulti.h:132
ublas::symmetric_matrix< double > fMerr
Measurement error matrix.
Definition: KHitMulti.h:128
double getChisq() const
Incremental chisquare.
Definition: KHitMulti.h:99
void update(KETrack &tre) const
Update track method.
Definition: KHitMulti.cxx:205
double fChisq
Incremental chisquare.
Definition: KHitMulti.h:135
const ublas::vector< double > & getResVector() const
Residual vector.
Definition: KHitMulti.h:87
ublas::vector< double > fMvec
Measurement vector.
Definition: KHitMulti.h:127
const ublas::vector< double > & getPredVector() const
Prediction vector.
Definition: KHitMulti.h:81
virtual ~KHitMulti()
Destructor.
Definition: KHitMulti.cxx:35
int fMeasDim
Measurement space dimension.
Definition: KHitMulti.h:125
const ublas::symmetric_matrix< double > & getResInvError() const
Residual inv. error matrix.
Definition: KHitMulti.h:93