CMS 3D CMS Logo

funct::Gaussian Struct Reference

#include <PhysicsTools/Utilities/interface/Gaussian.h>

List of all members.

Public Member Functions

 Gaussian (double m, double s)
 Gaussian (boost::shared_ptr< double > m, boost::shared_ptr< double > s)
 Gaussian (const Parameter &m, const Parameter &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.

00012                                                        : 
00013       mean(m.ptr()), sigma(s.ptr()) { }

funct::Gaussian::Gaussian ( boost::shared_ptr< double >  m,
boost::shared_ptr< double >  s 
) [inline]

Definition at line 14 of file Gaussian.h.

00014                                                                   : 
00015       mean(m), sigma(s) { }

funct::Gaussian::Gaussian ( double  m,
double  s 
) [inline]

Definition at line 16 of file Gaussian.h.

00016                                 : 
00017       mean(new double(m)), sigma(new double(s)){}


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 z.

00018                                       {
00019       double z = (x - *mean)/ *sigma;
00020       if(fabs(z)>8) return 0;
00021       return oneOverSqrtTwoPi/ *sigma * exp(-z*z/2);
00022     }


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()().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:47:01 2009 for CMSSW by  doxygen 1.5.4