CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryError.h

Go to the documentation of this file.
00001 #ifndef ExtendedPerigeeTrajectoryError_H
00002 #define ExtendedPerigeeTrajectoryError_H
00003 
00004 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00006 
00007 class ExtendedPerigeeTrajectoryError
00008 { 
00009 public:
00010  ExtendedPerigeeTrajectoryError(): weightAvailable(false),vl(false)
00011  {}
00012 
00013  ExtendedPerigeeTrajectoryError(const AlgebraicSymMatrix66& covariance):
00014                                cov(covariance),weightAvailable(false),
00015                                vl(true)
00016  {}
00017 
00018 
00023  bool isValid() const
00024  {return vl;}
00025 
00026  bool weightIsAvailable() const
00027  {return weightAvailable;}
00028 
00029  const AlgebraicSymMatrix66 & covarianceMatrix()const
00030  {return cov;}
00031  
00032  const AlgebraicSymMatrix66 & weightMatrix(int & error)const
00033  {
00034   error = 0;
00035   if(! weightIsAvailable()) {
00036     weight = cov.Inverse(error);
00037    if(error != 0) LogDebug("RecoVertex/ExtendedPerigeeTrajectoryError") 
00038        << "unable to invert covariance matrix\n";
00039    weightAvailable = true;
00040   }
00041   return weight;
00042  }
00043  
00044 private:
00045  AlgebraicSymMatrix66 cov;
00046  mutable AlgebraicSymMatrix66 weight;
00047  mutable bool weightAvailable;
00048  mutable bool vl;
00049 };
00050 #endif