00001 #ifndef _TRACKER_LOCALTRAJECTORYERROR_H_ 00002 #define _TRACKER_LOCALTRAJECTORYERROR_H_ 00003 00004 #include "DataFormats/GeometrySurface/interface/LocalError.h" 00005 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h" 00006 00007 #include <boost/shared_ptr.hpp> 00008 00021 class LocalTrajectoryError { 00022 public: 00023 // construct 00024 LocalTrajectoryError(); 00025 // destruct 00026 ~LocalTrajectoryError(); 00027 00032 LocalTrajectoryError(const AlgebraicSymMatrix55& aCovarianceMatrix); 00033 00034 LocalTrajectoryError(const AlgebraicSymMatrix& aCovarianceMatrix); 00035 00042 LocalTrajectoryError( float dx, float dy, float dxdir, float dydir, 00043 float dpinv); 00044 00045 // access 00046 00050 const AlgebraicSymMatrix55 &matrix() const { 00051 return theCovarianceMatrix; 00052 } 00053 00057 const AlgebraicSymMatrix matrix_old() const { 00058 return asHepMatrix(theCovarianceMatrix); 00059 } 00060 00061 const AlgebraicSymMatrix55 &weightMatrix() const; 00062 00063 00067 LocalTrajectoryError & operator *= (double factor) { 00068 theCovarianceMatrix *= factor; 00069 if ((theWeightMatrixPtr.get() != 0) && (factor != 0.0)) { (*theWeightMatrixPtr) /= factor; } 00070 return *this; 00071 } 00072 00077 LocalError positionError() const { 00078 return LocalError( theCovarianceMatrix(3,3),theCovarianceMatrix(3,4), 00079 theCovarianceMatrix(4,4)); 00080 } 00081 00082 private: 00083 AlgebraicSymMatrix55 theCovarianceMatrix; 00084 mutable boost::shared_ptr<AlgebraicSymMatrix55> theWeightMatrixPtr; 00085 }; 00086 00087 #endif