CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: FunctionDirectProduct.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $ 00003 //--------------------------FunctionDirectProduct---------------------------// 00004 // // 00005 // FunctionDirectProduct, result of multiplication of taking the direct // 00006 // product of two functions: f(x)*g(y)= h(x,y). The direct product always // 00007 // gives a function taking an argument of higher dimensionality than the // 00008 // arguments. // 00009 // // 00010 // Joe Boudreau, Petar Maksimovic, November 1999 // 00011 // // 00012 //--------------------------------------------------------------------------// 00013 #ifndef FunctionDirectProduct_h 00014 #define FunctionDirectProduct_h 1 00015 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00016 00017 namespace Genfun { 00018 00023 class FunctionDirectProduct : public AbsFunction { 00024 00025 FUNCTION_OBJECT_DEF(FunctionDirectProduct) 00026 00027 public: 00028 00029 // Constructor 00030 FunctionDirectProduct(const AbsFunction *arg1, const AbsFunction *arg2); 00031 00032 // Copy constructor 00033 FunctionDirectProduct(const FunctionDirectProduct &right); 00034 00035 // Destructor 00036 virtual ~FunctionDirectProduct(); 00037 00038 // Retreive function value 00039 virtual double operator ()(double argument) const; // Gives an error. 00040 virtual double operator ()(const Argument & a) const; // Must use this one 00041 00042 // Dimensionality 00043 virtual unsigned int dimensionality() const; 00044 00045 // Derivative. 00046 Derivative partial (unsigned int) const; 00047 00048 // Does this function have an analytic derivative? 00049 virtual bool hasAnalyticDerivative() const {return true;} 00050 00051 private: 00052 00053 // It is illegal to assign a FunctionDirectProduct 00054 const FunctionDirectProduct & operator=(const FunctionDirectProduct &right); 00055 00056 AbsFunction *_arg1; 00057 AbsFunction *_arg2; 00058 unsigned int _m; // dimension of arg1 00059 unsigned int _n; // dimension of arg2 00060 00061 }; 00062 } // namespace Genfun 00063 #endif