Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: FunctionProduct.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
0003 //--------------------------FunctionProduct---------------------------------//
0004 //                                                                          //
0005 // FunctionProduct, result of multiplication of two functions.              //
0006 // Joe Boudreau, Petar Maksimovic, November 1999                            //
0007 //                                                                          //
0008 //--------------------------------------------------------------------------//
0009 
0010 #ifndef FunctionProduct_h
0011 #define FunctionProduct_h 1
0012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0013 namespace Genfun {
0014 
0015   /**
0016    * @author
0017    * @ingroup genfun
0018    */
0019   class FunctionProduct : public AbsFunction {
0020 
0021     FUNCTION_OBJECT_DEF(FunctionProduct)
0022 
0023       public:
0024 
0025     // Constructor
0026     FunctionProduct(const AbsFunction *arg1, const AbsFunction *arg2);
0027 
0028     // Copy constructor
0029     FunctionProduct(const FunctionProduct &right);
0030   
0031     // Destructor
0032     virtual ~FunctionProduct();
0033 
0034     // Retreive function value
0035     virtual double operator ()(double argument) const override;
0036     virtual double operator ()(const Argument & a) const override;
0037 
0038     // Dimensionality 
0039     virtual unsigned int dimensionality() const override;
0040 
0041     // Derivative.  
0042     Derivative partial (unsigned int) const override;
0043 
0044     // Does this function have an analytic derivative?
0045     virtual bool hasAnalyticDerivative() const override {return true;}
0046 
0047   private:
0048 
0049     // It is illegal to assign a FunctionProduct
0050     const FunctionProduct & operator=(const FunctionProduct &right);
0051 
0052     const AbsFunction *_arg1;
0053     const AbsFunction *_arg2;  
0054   };
0055 } // namespace Genfun
0056 
0057 #endif