Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: ReverseExponential.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
0003 //---------------------ReverseExponential-----------------------------------//
0004 //                                                                          //
0005 // Class ReverseExponential..like Exponential but appropriate for describing//
0006 // negative lifetime tails.                                                 //
0007 // Joe Boudreau, Petar Maksimovic, November 1999                            //
0008 //                                                                          //
0009 //--------------------------------------------------------------------------//
0010 #ifndef ReverseExponential_h
0011 #define ReverseExponential_h 1
0012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0013 #include "CLHEP/GenericFunctions/Parameter.hh"
0014 namespace Genfun {
0015 
0016   /**
0017    * @author
0018    * @ingroup genfun
0019    */
0020   class ReverseExponential : public AbsFunction  {
0021 
0022     FUNCTION_OBJECT_DEF(ReverseExponential)
0023 
0024       public:
0025 
0026     // Constructor
0027     ReverseExponential();
0028 
0029     // Copy constructor
0030     ReverseExponential(const ReverseExponential &right);
0031   
0032     // Destructor
0033     virtual ~ReverseExponential();
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   
0042     // Derivative.  
0043     Derivative partial (unsigned int) const override;
0044 
0045     // Does this function have an analytic derivative?
0046     virtual bool hasAnalyticDerivative() const override {return true;}
0047 
0048   private:
0049 
0050     // It is illegal to assign an adjustable constant
0051     const ReverseExponential & operator=(const ReverseExponential &right);
0052 
0053     // Here is the decay constant
0054     Parameter _decayConstant;
0055 
0056   };
0057 } // namespace Genfun
0058 
0059 #endif