CMS 3D CMS Logo

LocalTrajectoryError.h
Go to the documentation of this file.
1 #ifndef _TRACKER_LOCALTRAJECTORYERROR_H_
2 #define _TRACKER_LOCALTRAJECTORYERROR_H_
3 
6 #include <memory>
7 
21 public:
22  // construct
24 
26  theCovarianceMatrix(0, 0) = -99999.e10;
27  }
28  // destruct
30 
31  bool invalid() const { return theCovarianceMatrix(0, 0) < -1.e10; }
32  bool valid() const { return !invalid(); }
33 
34  // not really full check of posdef
35  bool posDef() const {
36  return (theCovarianceMatrix(0, 0) >= 0) && (theCovarianceMatrix(1, 1) >= 0) && (theCovarianceMatrix(2, 2) >= 0) &&
37  (theCovarianceMatrix(3, 3) >= 0) && (theCovarianceMatrix(4, 4) >= 0);
38  }
39 
44  LocalTrajectoryError(const AlgebraicSymMatrix55 &aCovarianceMatrix)
45  : theCovarianceMatrix(aCovarianceMatrix), theWeightMatrixPtr() {}
46 
53  LocalTrajectoryError(float dx, float dy, float dxdir, float dydir, float dpinv);
54 
55  // access
56 
60  const AlgebraicSymMatrix55 &matrix() const { return theCovarianceMatrix; }
61 
64  const AlgebraicSymMatrix55 &weightMatrix() const;
65 
71  if ((theWeightMatrixPtr.get() != nullptr) && (factor != 0.0)) {
72  (*theWeightMatrixPtr) /= factor;
73  }
74  return *this;
75  }
76 
83  }
84 
85 private:
87  mutable std::shared_ptr<AlgebraicSymMatrix55> theWeightMatrixPtr;
88 };
89 
90 #endif
LocalTrajectoryError & operator*=(double factor)
LocalTrajectoryError(InvalidError)
LocalError positionError() const
std::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
AlgebraicSymMatrix55 theCovarianceMatrix
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
LocalTrajectoryError(const AlgebraicSymMatrix55 &aCovarianceMatrix)
const AlgebraicSymMatrix55 & matrix() const
const AlgebraicSymMatrix55 & weightMatrix() const