1 #ifndef PhysicsTools_Utilities_Gaussian_h 2 #define PhysicsTools_Utilities_Gaussian_h 4 #include <boost/shared_ptr.hpp> 14 Gaussian(boost::shared_ptr<double>
m, boost::shared_ptr<double>
s):
17 mean(new double(m)),
sigma(new double(s)){}
20 if(fabs(z)>8)
return 0;
21 return oneOverSqrtTwoPi/ *
sigma *
exp(-z*z/2);
Gaussian(boost::shared_ptr< double > m, boost::shared_ptr< double > s)
const double oneOverSqrtTwoPi
Exp< T >::type exp(const T &t)
Sqrt< T >::type sqrt(const T &t)
Gaussian(const Parameter &m, const Parameter &s)
Gaussian(double m, double s)
boost::shared_ptr< double > mean
double operator()(double x) const
boost::shared_ptr< double > sigma