Go to the documentation of this file.00001 #ifndef SingleGaussianState_H
00002 #define SingleGaussianState_H
00003
00004 #include "Math/SVector.h"
00005 #include "Math/SMatrix.h"
00006
00011 template <unsigned int N> class SingleGaussianState {
00012 public:
00013 typedef ROOT::Math::SVector<double, N> Vector;
00014 typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > Matrix;
00015
00016 public:
00017 SingleGaussianState() :
00018 theHasWeightMatrix(false) {
00019
00020 }
00021
00022
00023
00024
00025
00026
00027
00028 SingleGaussianState(const Vector& aMean,
00029 const Matrix& aCovariance,
00030 double aWeight = 1.) :
00031 theCovariance(aCovariance), theMean(aMean), theWeight(aWeight),
00032 theHasWeightMatrix(false) {
00033
00034 }
00035
00036 ~SingleGaussianState() {
00037
00038 }
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00050 inline double weight() const {return theWeight;}
00052 inline const Vector & mean() const {return theMean;}
00054 inline const Matrix & covariance() const {return theCovariance;}
00056 const Matrix & weightMatrix() const;
00058 inline unsigned int dimension () const {return N;}
00060 void rescaleWeight (double scale) {theWeight *= scale;}
00061
00062
00063 private:
00064 Matrix theCovariance;
00065 Vector theMean;
00066 double theWeight;
00067
00068 mutable Matrix theWeightMatrix;
00069 mutable bool theHasWeightMatrix;
00070
00071
00072
00073
00074
00075 };
00076
00077 #include "TrackingTools/GsfTools/interface/SingleGaussianState.icc"
00078
00079
00080
00081
00082 #endif