Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: Exponential.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
0003 //---------------------Exponential------------------------------------------//
0004 //                                                                          //
0005 // Class Exponential                                                        //
0006 // Joe Boudreau, Petar Maksimovic, November 1999                            //
0007 //                                                                          //
0008 //--------------------------------------------------------------------------//
0009 #ifndef Exponential_h
0010 #define Exponential_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 Exponential : public AbsFunction  {
0021 
0022     FUNCTION_OBJECT_DEF(Exponential)
0023 
0024       public:
0025 
0026     // Constructor
0027     Exponential();
0028 
0029     // Copy constructor
0030     Exponential(const Exponential &right);
0031   
0032     // Destructor
0033     virtual ~Exponential();
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 decay constant
0040     Parameter & decayConstant(); 
0041     const Parameter & decayConstant() const; 
0042   
0043     // Derivative.  
0044     Derivative partial (unsigned int) const override;
0045 
0046     // Does this function have an analytic derivative?
0047     virtual bool hasAnalyticDerivative() const override {return true;}
0048 
0049   private:
0050 
0051     // It is illegal to assign an adjustable constant
0052     const Exponential & operator=(const Exponential &right);
0053 
0054     // Here is the decay constant
0055     Parameter _decayConstant;
0056 
0057   };
0058 } // namespace Genfun
0059 #endif