CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
11#include "CLHEP/GenericFunctions/AbsFunction.hh"
12#include "CLHEP/GenericFunctions/Parameter.hh"
13
14namespace Genfun {
15
16 /**
17 * @author
18 * @ingroup genfun
19 */
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 override;
37 virtual double operator ()(const Argument & a) const override {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 override;
49
50 // Does this function have an analytic derivative?
51 virtual bool hasAnalyticDerivative() const override {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
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
Parameter & mean()
Definition: Gaussian.cc:41
virtual bool hasAnalyticDerivative() const override
Definition: Gaussian.hh:51
virtual double operator()(double argument) const override
Definition: Gaussian.cc:34
virtual ~Gaussian()
Definition: Gaussian.cc:24
Derivative partial(unsigned int) const override
Definition: Gaussian.cc:68
Parameter & sigma()
Definition: Gaussian.cc:45
Definition: Abs.hh:14