Back to home page

EIC code displayed by LXR

 
 

    


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

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