CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LocalTrajectoryError.h
Go to the documentation of this file.
1 #ifndef _TRACKER_LOCALTRAJECTORYERROR_H_
2 #define _TRACKER_LOCALTRAJECTORYERROR_H_
3 
6 
7 #include <boost/shared_ptr.hpp>
8 
22 public:
23  // construct
25 
26  LocalTrajectoryError(InvalidError) : theCovarianceMatrix(ROOT::Math::SMatrixNoInit()) {theCovarianceMatrix(0,0)=-99999.e10;}
27  // destruct
29 
30  bool invalid() const { return theCovarianceMatrix(0,0)<-1.e10;}
31  bool valid() const { return !invalid();}
32 
33  // not really full check of posdef
34  bool posDef() const {
35  return (theCovarianceMatrix(0,0)>=0) && (theCovarianceMatrix(1,1)>=0) &&
36  (theCovarianceMatrix(2,2)>=0) && (theCovarianceMatrix(3,3)>=0) && (theCovarianceMatrix(4,4)>=0);
37  }
38 
39 
44  LocalTrajectoryError(const AlgebraicSymMatrix55& aCovarianceMatrix):
45  theCovarianceMatrix(aCovarianceMatrix), theWeightMatrixPtr() { }
46 
53  LocalTrajectoryError( float dx, float dy, float dxdir, float dydir,
54  float dpinv);
55 
56 // access
57 
61  const AlgebraicSymMatrix55 &matrix() const {
62  return theCovarianceMatrix;
63  }
64 
67  const AlgebraicSymMatrix55 &weightMatrix() const;
68 
69 
74  theCovarianceMatrix *= factor;
75  if ((theWeightMatrixPtr.get() != 0) && (factor != 0.0)) { (*theWeightMatrixPtr) /= factor; }
76  return *this;
77  }
78 
85  theCovarianceMatrix(4,4));
86  }
87 
88 private:
90  mutable boost::shared_ptr<AlgebraicSymMatrix55> theWeightMatrixPtr;
91 };
92 
93 #endif
LocalTrajectoryError & operator*=(double factor)
LocalTrajectoryError(InvalidError)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
LocalError positionError() const
const AlgebraicSymMatrix55 & matrix() const
AlgebraicSymMatrix55 theCovarianceMatrix
LocalTrajectoryError(const AlgebraicSymMatrix55 &aCovarianceMatrix)
const AlgebraicSymMatrix55 & weightMatrix() const
boost::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr