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
double standardDeviation() const
standardDeviation
double mean() const
parameter vector
T sqrt(T t)
Definition: SSEVec.h:19
double variance() const
variance
SingleGaussianState1D(double aMean, double aVariance, double aWeight=1.)
double weight() const
weight