Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:03:26

0001 // -*- C++ -*-
0002 // $Id: KroneckerDelta.hh,v 1.1 2007/01/21 20:54:33 boudreau Exp $
0003 //---------------------Rectangular------------------------------------------//
0004 //                                                                          //
0005 // Class KroneckerDelta by Joe Boudreau                                     //
0006 //                                                                          //
0007 //--------------------------------------------------------------------------//
0008 #ifndef KroneckerDelta_h
0009 #define KroneckerDelta_h 1
0010 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0011 #include "CLHEP/GenericFunctions/Parameter.hh"
0012 namespace Genfun {
0013 
0014   /**
0015    * @author
0016    * @ingroup genfun
0017    */
0018   class KroneckerDelta : public AbsFunction  {
0019 
0020     FUNCTION_OBJECT_DEF(KroneckerDelta)
0021 
0022       public:
0023 
0024     // Constructor
0025     KroneckerDelta();
0026 
0027     // Copy constructor
0028     KroneckerDelta(const KroneckerDelta &right);
0029   
0030     // Destructor
0031     virtual ~KroneckerDelta();
0032   
0033     // Retreive function value
0034     virtual double operator ()(double argument) const override;
0035     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0036   
0037     // Derivative.  
0038     Derivative partial (unsigned int) const override;
0039 
0040     // Does this function have an analytic derivative?
0041     virtual bool hasAnalyticDerivative() const override {return true;}
0042 
0043   private:
0044 
0045     // It is illegal to assign an adjustable constant
0046     const KroneckerDelta & operator=(const KroneckerDelta &right);
0047 
0048  
0049   };
0050 } // namespace Genfun
0051 #endif