CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/TrackingTools/TrajectoryParametrization/interface/PerigeeTrajectoryError.h

Go to the documentation of this file.
00001 #ifndef PerigeeTrajectoryError_H
00002 #define PerigeeTrajectoryError_H
00003 
00004 #include "TrackingTools/TrajectoryParametrization/interface/TrajectoryStateExceptions.h"
00005 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
00006 #include "FWCore/Utilities/interface/Likely.h"
00014 class PerigeeTrajectoryError
00015 {
00016 
00017 public:
00018 
00019   PerigeeTrajectoryError() {}
00020   // ~PerigeeTrajectoryError() {}
00021 
00022   /*
00023   PerigeeTrajectoryError(AlgebraicSymMatrix aPerigeeError):
00024     thePerigeeError(asSMatrix<5>(aPerigeeError)), weightIsAvailable(false) {}
00025   */
00026   PerigeeTrajectoryError(const AlgebraicSymMatrix55 &aPerigeeError):
00027     thePerigeeError(aPerigeeError), weightIsAvailable(false) {
00028          
00029   }
00030 
00031 
00035   const AlgebraicSymMatrix55 & covarianceMatrix() const {return thePerigeeError;}
00036 
00037 
00042   const AlgebraicSymMatrix55 &weightMatrix(int & error) const
00043   {
00044     if unlikely(!weightIsAvailable) calculateWeightMatrix();
00045     error = inverseError;
00046     return thePerigeeWeight;
00047   }
00048 
00049   void calculateWeightMatrix() const;
00050 
00051   double transverseCurvatureError() const {return sqrt(thePerigeeError(0,0));}
00052 
00057   double thetaError() const {return sqrt(thePerigeeError(1,1));}
00058 
00063   double phiError() const {return sqrt(thePerigeeError(2,2));}
00064 
00069   double transverseImpactParameterError() const {return sqrt(thePerigeeError(3,3));}
00070 
00075   double longitudinalImpactParameterError() const {return sqrt(thePerigeeError(4,4));}
00076 
00077 
00078 private:
00079   AlgebraicSymMatrix55 thePerigeeError;
00080   mutable AlgebraicSymMatrix55 thePerigeeWeight;
00081   mutable int inverseError;
00082   mutable bool weightIsAvailable;
00083 
00084 };
00085 #endif