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::~LocalTrajectoryError
~LocalTrajectoryError()
Definition: LocalTrajectoryError.h:29
LocalTrajectoryError::operator*=
LocalTrajectoryError & operator*=(double factor)
Definition: LocalTrajectoryError.h:69
LocalTrajectoryError::positionError
LocalError positionError() const
Definition: LocalTrajectoryError.h:81
LocalTrajectoryError::LocalTrajectoryError
LocalTrajectoryError(const AlgebraicSymMatrix55 &aCovarianceMatrix)
Definition: LocalTrajectoryError.h:44
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
LocalTrajectoryError::valid
bool valid() const
Definition: LocalTrajectoryError.h:32
LocalTrajectoryError::theCovarianceMatrix
AlgebraicSymMatrix55 theCovarianceMatrix
Definition: LocalTrajectoryError.h:86
LocalTrajectoryError::invalid
bool invalid() const
Definition: LocalTrajectoryError.h:31
LocalError.h
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
LocalError
Definition: LocalError.h:12
PVValHelper::dy
Definition: PVValidationHelpers.h:50
LocalTrajectoryError::LocalTrajectoryError
LocalTrajectoryError()
Definition: LocalTrajectoryError.h:23
LocalTrajectoryError::theWeightMatrixPtr
std::shared_ptr< AlgebraicSymMatrix55 > theWeightMatrixPtr
Definition: LocalTrajectoryError.h:87
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
ROOT
Definition: Transform3DPJ.h:35
AlgebraicROOTObjects.h
PVValHelper::dx
Definition: PVValidationHelpers.h:49
LocalTrajectoryError::LocalTrajectoryError
LocalTrajectoryError(InvalidError)
Definition: LocalTrajectoryError.h:25
LocalTrajectoryError::weightMatrix
const AlgebraicSymMatrix55 & weightMatrix() const
Definition: LocalTrajectoryError.cc:14
LocalTrajectoryError::posDef
bool posDef() const
Definition: LocalTrajectoryError.h:35
InvalidError
Definition: TrivialError.h:8