Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: FunctionTimesParameter.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
0003 //--------------------------FunctionTimesParameter--------------------------//
0004 //                                                                          //
0005 // ConstOverFunction, result of multiplying a function and a parameter      //
0006 // Joe Boudreau, Petar Maksimovic, November 1999                            //
0007 //                                                                          //
0008 //--------------------------------------------------------------------------//
0009 
0010 #ifndef FunctionTimesParameter_h
0011 #define FunctionTimesParameter_h 1
0012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0013 
0014 namespace Genfun {
0015   class Argument;
0016 
0017   /**
0018    * @author
0019    * @ingroup genfun
0020    */
0021   class FunctionTimesParameter : public AbsFunction  {
0022 
0023     FUNCTION_OBJECT_DEF(FunctionTimesParameter)
0024   
0025       public:
0026   
0027     // Constructor
0028     FunctionTimesParameter(const AbsParameter *parameter, const AbsFunction *function);
0029   
0030     // Copy constructor
0031     FunctionTimesParameter(const FunctionTimesParameter &right);
0032 
0033     // Destructor
0034     virtual ~FunctionTimesParameter();
0035   
0036     // Retreive function value
0037     virtual double operator ()(double argument) const override;
0038     virtual double operator ()(const Argument & a) const override;
0039 
0040     // Dimensionality 
0041     virtual unsigned int dimensionality() const override;
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 a FunctionTimesParameter
0052     const FunctionTimesParameter & operator=(const FunctionTimesParameter &right);
0053 
0054     const AbsFunction  *_function;
0055     AbsParameter       *_parameter;
0056 
0057   };
0058 } // namespace Genfun
0059 #endif