![]() |
![]() |
00001 #ifndef PerigeeTrajectoryError_H 00002 #define PerigeeTrajectoryError_H 00003 00004 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h" 00005 #include "TrackingTools/TrajectoryParametrization/interface/TrajectoryStateExceptions.h" 00006 00014 class PerigeeTrajectoryError 00015 { 00016 00017 public: 00018 00019 PerigeeTrajectoryError() {} 00020 ~PerigeeTrajectoryError() {} 00021 00022 PerigeeTrajectoryError(AlgebraicSymMatrix aPerigeeError): 00023 thePerigeeError(asSMatrix<5>(aPerigeeError)), weightIsAvailable(false) {} 00024 00025 PerigeeTrajectoryError(const AlgebraicSymMatrix55 &aPerigeeError): 00026 thePerigeeError(aPerigeeError), weightIsAvailable(false) { 00027 00028 } 00029 00030 00035 const AlgebraicSymMatrix covarianceMatrix_old() const {return asHepMatrix(thePerigeeError);} 00036 const AlgebraicSymMatrix55 & covarianceMatrix() const {return thePerigeeError;} 00037 00038 00043 const AlgebraicSymMatrix weightMatrix_old(int & error) const { 00044 if (!weightIsAvailable) calculateWeightMatrix(); 00045 error = inverseError; 00046 return asHepMatrix(thePerigeeWeight); 00047 } 00053 const AlgebraicSymMatrix55 &weightMatrix(int & error) const 00054 { 00055 if (!weightIsAvailable) calculateWeightMatrix(); 00056 error = inverseError; 00057 return thePerigeeWeight; 00058 } 00059 00060 void calculateWeightMatrix() const; 00061 00062 double transverseCurvatureError() const {return sqrt(thePerigeeError(0,0));} 00063 00068 double thetaError() const {return sqrt(thePerigeeError(1,1));} 00069 00074 double phiError() const {return sqrt(thePerigeeError(2,2));} 00075 00080 double transverseImpactParameterError() const {return sqrt(thePerigeeError(3,3));} 00081 00086 double longitudinalImpactParameterError() const {return sqrt(thePerigeeError(4,4));} 00087 00088 00089 private: 00090 AlgebraicSymMatrix55 thePerigeeError; 00091 mutable AlgebraicSymMatrix55 thePerigeeWeight; 00092 mutable int inverseError; 00093 mutable bool weightIsAvailable; 00094 00095 }; 00096 #endif