CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SingleGaussianState.h
Go to the documentation of this file.
1 #ifndef SingleGaussianState_H
2 #define SingleGaussianState_H
3 
4 #include "Math/SVector.h"
5 #include "Math/SMatrix.h"
6 
11 template <unsigned int N> class SingleGaussianState {
12 public:
13  typedef ROOT::Math::SVector<double, N> Vector;
14  typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > Matrix;
15 
16 public:
19 // ++instances_;++maxInstances_;
20  }
21 
22 // SingleGaussianState(const SingleGaussianState<N>& rhs) :
23 // theWeight(rhs.theWeight), theMean(rhs.theMean), theCovariance(rhs.theCovariance),
24 // theHasWeightMatrix(rhs.theHasWeightMatrix), theWeightMatrix(rhs.theWeightMatrix) {
25 // ++instances_;++maxInstances_;
26 // }
27 
29  const Matrix& aCovariance,
30  double aWeight = 1.) :
31  theCovariance(aCovariance), theMean(aMean), theWeight(aWeight),
33 // ++instances_;++maxInstances_;
34  }
35 
37 // --instances_;
38  }
39 
40  // /**
41 // * Creates a new single-state with the given information.
42 // * For this base class, no information is passed from the initial
43 // * instance.
44 // */
45 // SingleGaussianState
46 // createState(const AlgebraicVector & aMean,
47 // const AlgebraicSymMatrix & aCovariance, double aWeight = 1) const;
48 
50  inline double weight() const {return theWeight;}
52  inline const Vector & mean() const {return theMean;}
54  inline const Matrix & covariance() const {return theCovariance;}
56  const Matrix & weightMatrix() const;
58  inline unsigned int dimension () const {return N;}
60  void rescaleWeight (double scale) {theWeight *= scale;}
61 
62 // protected:
63 private:
66  double theWeight;
67 
69  mutable bool theHasWeightMatrix;
70 
71 // public:
72 // static int instances_;
73 // static int maxInstances_;
74 // static int constructsWeightMatrix_;
75 };
76 
77 #include "TrackingTools/GsfTools/interface/SingleGaussianState.icc"
78 
79 // template <unsigned int N> int SingleGaussianState<N>::instances_ = 0;
80 // template <unsigned int N> int SingleGaussianState<N>::maxInstances_ = 0;
81 // template <unsigned int N> int SingleGaussianState<N>::constructsWeightMatrix_ = 0;
82 #endif
void rescaleWeight(double scale)
change weight
const Vector & mean() const
parameter vector
unsigned int dimension() const
size of parameter vector
const Matrix & covariance() const
covariance matrix
SingleGaussianState(const Vector &aMean, const Matrix &aCovariance, double aWeight=1.)
ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > Matrix
#define N
Definition: blowfish.cc:9
ROOT::Math::SVector< double, N > Vector
double weight() const
weight
const Matrix & weightMatrix() const
weight matrix