CMS 3D CMS Logo

SingleGaussianState1D.h
Go to the documentation of this file.
1 #ifndef SingleGaussianState1D_H
2 #define SingleGaussianState1D_H
3 
5 #include "boost/shared_ptr.hpp"
6 
12 // private:
13 // typedef SingleGaussianState<1> SingleState;
14 
15 public:
16 
18  theWeight(0.), theMean(0.), theVariance(0.), theStandardDeviation(-1.) {}
19 
20  SingleGaussianState1D (double aMean,
21  double aVariance,
22  double aWeight = 1.) :
23  theWeight(aWeight), theMean(aMean), theVariance(aVariance), theStandardDeviation(-1.) {}
24 
26 
28  inline double weight() const {return theWeight;}
30  inline double mean() const {return theMean;}
32  inline double variance() const {return theVariance;}
34  double standardDeviation() const {
36  return theStandardDeviation;
37  }
38 // /// state
39 // std::shared_ptr<SingleState> state() {return theState;}
40 
41 private:
42  double theWeight;
43  double theMean;
44  double theVariance;
45  mutable double theStandardDeviation;
46 };
47 
48 #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