CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: Gaussian.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $ 00003 //---------------------Gaussian---------------------------------------------// 00004 // // 00005 // Class Gaussian // 00006 // Joe Boudreau, Petar Maksimovic, November 1999 // 00007 // // 00008 //--------------------------------------------------------------------------// 00009 #ifndef Gaussian_h 00010 #define Gaussian_h 1 00011 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00012 #include "CLHEP/GenericFunctions/Parameter.hh" 00013 00014 namespace Genfun { 00015 00020 class Gaussian : public AbsFunction { 00021 00022 FUNCTION_OBJECT_DEF(Gaussian) 00023 00024 public: 00025 00026 // Constructor 00027 Gaussian(); 00028 00029 // Copy constructor 00030 Gaussian(const Gaussian &right); 00031 00032 // Destructor 00033 virtual ~Gaussian(); 00034 00035 // Retreive function value 00036 virtual double operator ()(double argument) const; 00037 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00038 00039 // Get the mean of the Gaussian 00040 Parameter & mean(); 00041 const Parameter & mean() const; 00042 00043 // Get the sigma of the Gaussian 00044 Parameter & sigma(); 00045 const Parameter & sigma() const; 00046 00047 // Derivative. 00048 Derivative partial (unsigned int) const; 00049 00050 // Does this function have an analytic derivative? 00051 virtual bool hasAnalyticDerivative() const {return true;} 00052 00053 00054 private: 00055 00056 // It is illegal to assign an adjustable constant 00057 const Gaussian & operator=(const Gaussian &right); 00058 00059 // Here is the decay constant 00060 Parameter _mean; 00061 00062 // Here is the sigma 00063 Parameter _sigma; 00064 }; 00065 } // namespace Genfun 00066 00067 #endif