CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: 00003 //---------------------Gaussian---------------------------------------------// 00004 // // 00005 // Class LogisticFunction // 00006 // Joe Boudreau, November 2002 // 00007 // // 00008 //--------------------------------------------------------------------------// 00009 #ifndef LogisticFunction_h 00010 #define LogisticFunction_h 1 00011 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00012 #include "CLHEP/GenericFunctions/Parameter.hh" 00013 #include <vector> 00014 namespace Genfun { 00015 00020 class LogisticFunction : public AbsFunction { 00021 00022 FUNCTION_OBJECT_DEF(LogisticFunction) 00023 00024 public: 00025 00026 // Constructor 00027 LogisticFunction(); 00028 00029 // Copy constructor 00030 LogisticFunction(const LogisticFunction &right); 00031 00032 // Destructor 00033 virtual ~LogisticFunction(); 00034 00035 // Retreive function value 00036 virtual double operator ()(double argument) const; 00037 virtual double operator ()(const Argument & arg) const {return operator() (arg[0]);} 00038 00039 // Get the starting value of the LogisticFunction 00040 Parameter & x0(); 00041 const Parameter & x0() const; 00042 00043 // Get the control parameter of the LogisticFunction 00044 Parameter & a(); 00045 const Parameter & a() const; 00046 00047 private: 00048 00049 // It is illegal to assign an adjustable constant 00050 const LogisticFunction & operator=(const LogisticFunction &right); 00051 00052 // Here is the decay constant 00053 Parameter _x0; 00054 00055 // Here is the sigma 00056 Parameter _a; 00057 00058 // A vector of values. 00059 mutable std::vector<double> fx; 00060 // Some cache: 00061 mutable double __a, __x0; 00062 00063 }; 00064 } // namespace Genfun 00065 00066 #endif