CMS 3D CMS Logo

SingleGaussianState1D.h
Go to the documentation of this file.
1 #ifndef SingleGaussianState1D_H
2 #define SingleGaussianState1D_H
3 
5 
11  // private:
12  // typedef SingleGaussianState<1> SingleState;
13 
14 public:
16 
17  SingleGaussianState1D(double aMean, double aVariance, double aWeight = 1.)
18  : theWeight(aWeight), theMean(aMean), theVariance(aVariance), theStandardDeviation(-1.) {}
19 
21 
23  inline double weight() const { return theWeight; }
25  inline double mean() const { return theMean; }
27  inline double variance() const { return theVariance; }
29  double standardDeviation() const {
30  if (theStandardDeviation < 0.)
32  return theStandardDeviation;
33  }
34  // /// state
35  // std::shared_ptr<SingleState> state() {return theState;}
36 
37 private:
38  double theWeight;
39  double theMean;
40  double theVariance;
41  mutable double theStandardDeviation;
42 };
43 
44 #endif
T sqrt(T t)
Definition: SSEVec.h:23
double standardDeviation() const
standardDeviation
SingleGaussianState1D(double aMean, double aVariance, double aWeight=1.)
double mean() const
parameter vector
double weight() const
weight
double variance() const
variance