CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
funct::Gaussian Struct Reference

#include <Gaussian.h>

Public Member Functions

 Gaussian (const Parameter &m, const Parameter &s)
 
 Gaussian (boost::shared_ptr< double > m, boost::shared_ptr< double > s)
 
 Gaussian (double m, double s)
 
double operator() (double x) const
 

Public Attributes

boost::shared_ptr< double > mean
 
boost::shared_ptr< double > sigma
 

Detailed Description

Definition at line 11 of file Gaussian.h.

Constructor & Destructor Documentation

funct::Gaussian::Gaussian ( const Parameter m,
const Parameter s 
)
inline

Definition at line 12 of file Gaussian.h.

12  :
13  mean(m.ptr()), sigma(s.ptr()) { }
boost::shared_ptr< double > mean
Definition: Gaussian.h:23
boost::shared_ptr< double > sigma
Definition: Gaussian.h:23
funct::Gaussian::Gaussian ( boost::shared_ptr< double >  m,
boost::shared_ptr< double >  s 
)
inline

Definition at line 14 of file Gaussian.h.

14  :
15  mean(m), sigma(s) { }
boost::shared_ptr< double > mean
Definition: Gaussian.h:23
boost::shared_ptr< double > sigma
Definition: Gaussian.h:23
funct::Gaussian::Gaussian ( double  m,
double  s 
)
inline

Definition at line 16 of file Gaussian.h.

16  :
17  mean(new double(m)), sigma(new double(s)){}
boost::shared_ptr< double > mean
Definition: Gaussian.h:23
boost::shared_ptr< double > sigma
Definition: Gaussian.h:23

Member Function Documentation

double funct::Gaussian::operator() ( double  x) const
inline

Definition at line 18 of file Gaussian.h.

References funct::exp(), mean, funct::oneOverSqrtTwoPi, sigma, and detailsBasic3DVector::z.

18  {
19  double z = (x - *mean)/ *sigma;
20  if(fabs(z)>8) return 0;
21  return oneOverSqrtTwoPi/ *sigma * exp(-z*z/2);
22  }
const double oneOverSqrtTwoPi
Definition: Gaussian.h:9
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
double double double z
boost::shared_ptr< double > mean
Definition: Gaussian.h:23
boost::shared_ptr< double > sigma
Definition: Gaussian.h:23
x
Definition: VDTMath.h:216

Member Data Documentation

boost::shared_ptr<double> funct::Gaussian::mean

Definition at line 23 of file Gaussian.h.

Referenced by operator()().

boost::shared_ptr<double> funct::Gaussian::sigma

Definition at line 23 of file Gaussian.h.

Referenced by operator()().