CLHEP 2.0.4.7 Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

ConstTimesFunction.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: ConstTimesFunction.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
00003 //--------------------------ConstOverFunction-------------------------------//
00004 //                                                                          //
00005 // ConstOverFunction, result of multiplying a constant and a function       //
00006 // Joe Boudreau, Petar Maksimovic, November 1999                            //
00007 //                                                                          //
00008 //--------------------------------------------------------------------------//
00009 
00010 #ifndef ConstTimesFunction_h
00011 #define ConstTimesFunction_h 1
00012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00013 namespace Genfun {
00014 
00019   class ConstTimesFunction : public AbsFunction  {
00020 
00021     FUNCTION_OBJECT_DEF(ConstTimesFunction)
00022   
00023       public:
00024   
00025     // Constructor
00026     ConstTimesFunction(double constant, const AbsFunction *arg);
00027   
00028     // Copy constructor
00029     ConstTimesFunction(const ConstTimesFunction &right);
00030 
00031     // Destructor
00032     virtual ~ConstTimesFunction();
00033   
00034     // Retreive function value
00035     virtual double operator ()(double argument) const;
00036     virtual double operator ()(const Argument & a) const;
00037 
00038     // Dimensionality 
00039     virtual unsigned int dimensionality() const;
00040 
00041     // Derivative.  
00042     Derivative partial (unsigned int) const;
00043 
00044     // Does this function have an analytic derivative?
00045     virtual bool hasAnalyticDerivative() const {return true;}
00046 
00047   private:
00048 
00049     // It is illegal to assign a ConstTimesFunction
00050     const ConstTimesFunction & operator=(const ConstTimesFunction &right);
00051 
00052     double             _constant;
00053     const AbsFunction *_arg;
00054   };
00055 } // namespace Genfun
00056 #endif

Generated on Thu Jul 1 22:02:30 2010 for CLHEP by  doxygen 1.4.7