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:
15 
17  theWeight(0.), theMean(0.), theVariance(0.), theStandardDeviation(-1.) {}
18 
19  SingleGaussianState1D (double aMean,
20  double aVariance,
21  double aWeight = 1.) :
22  theWeight(aWeight), theMean(aMean), theVariance(aVariance), theStandardDeviation(-1.) {}
23 
25 
27  inline double weight() const {return theWeight;}
29  inline double mean() const {return theMean;}
31  inline double variance() const {return theVariance;}
33  double standardDeviation() const {
35  return theStandardDeviation;
36  }
37 // /// state
38 // std::shared_ptr<SingleState> state() {return theState;}
39 
40 private:
41  double theWeight;
42  double theMean;
43  double theVariance;
44  mutable double theStandardDeviation;
45 };
46 
47 #endif
double standardDeviation() const
standardDeviation
double mean() const
parameter vector
T sqrt(T t)
Definition: SSEVec.h:18
double variance() const
variance
SingleGaussianState1D(double aMean, double aVariance, double aWeight=1.)
double weight() const
weight