CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

CLHEP/GenericFunctions/Gaussian.hh
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: Gaussian.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3 //---------------------Gaussian---------------------------------------------//
4 // //
5 // Class Gaussian //
6 // Joe Boudreau, Petar Maksimovic, November 1999 //
7 // //
8 //--------------------------------------------------------------------------//
9 #ifndef Gaussian_h
10 #define Gaussian_h 1
13 
14 namespace Genfun {
15 
20  class Gaussian : public AbsFunction {
21 
23 
24  public:
25 
26  // Constructor
27  Gaussian();
28 
29  // Copy constructor
30  Gaussian(const Gaussian &right);
31 
32  // Destructor
33  virtual ~Gaussian();
34 
35  // Retreive function value
36  virtual double operator ()(double argument) const;
37  virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
38 
39  // Get the mean of the Gaussian
40  Parameter & mean();
41  const Parameter & mean() const;
42 
43  // Get the sigma of the Gaussian
44  Parameter & sigma();
45  const Parameter & sigma() const;
46 
47  // Derivative.
48  Derivative partial (unsigned int) const;
49 
50  // Does this function have an analytic derivative?
51  virtual bool hasAnalyticDerivative() const {return true;}
52 
53 
54  private:
55 
56  // It is illegal to assign an adjustable constant
57  const Gaussian & operator=(const Gaussian &right);
58 
59  // Here is the decay constant
60  Parameter _mean;
61 
62  // Here is the sigma
63  Parameter _sigma;
64  };
65 } // namespace Genfun
66 
67 #endif