Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:35

0001 // -*- C++ -*-
0002 // $Id: Gaussian.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
0003 //---------------------Gaussian---------------------------------------------//
0004 //                                                                          //
0005 // Class Gaussian                                                           //
0006 // Joe Boudreau, Petar Maksimovic, November 1999                            //
0007 //                                                                          //
0008 //--------------------------------------------------------------------------//
0009 #ifndef Gaussian_h
0010 #define Gaussian_h 1
0011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0012 #include "CLHEP/GenericFunctions/Parameter.hh"
0013 
0014 namespace Genfun {
0015 
0016   /**
0017    * @author
0018    * @ingroup genfun
0019    */
0020   class Gaussian : public AbsFunction  {
0021 
0022     FUNCTION_OBJECT_DEF(Gaussian)
0023 
0024       public:
0025 
0026     // Constructor
0027     Gaussian();
0028 
0029     // Copy constructor
0030     Gaussian(const Gaussian &right);
0031   
0032     // Destructor
0033     virtual ~Gaussian();
0034   
0035     // Retreive function value
0036     virtual double operator ()(double argument) const override;
0037     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0038   
0039     // Get the mean of the Gaussian
0040     Parameter & mean(); 
0041     const Parameter & mean() const; 
0042 
0043     // Get the sigma of the Gaussian
0044     Parameter & sigma();
0045     const Parameter & sigma() const;
0046 
0047     // Derivative.  
0048     Derivative partial (unsigned int) const override;
0049 
0050     // Does this function have an analytic derivative?
0051     virtual bool hasAnalyticDerivative() const override {return true;}
0052 
0053   
0054   private:
0055 
0056     // It is illegal to assign an adjustable constant
0057     const Gaussian & operator=(const Gaussian &right);
0058 
0059     // Here is the decay constant
0060     Parameter _mean;
0061 
0062     // Here is the sigma
0063     Parameter _sigma;
0064   };
0065 } // namespace Genfun
0066 
0067 #endif