Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:03:26

0001 // -*- C++ -*-
0002 // $Id:
0003 //---------------------Gaussian---------------------------------------------//
0004 //                                                                          //
0005 // Class LogisticFunction                                                   //
0006 // Joe Boudreau, November 2002                                              //
0007 //                                                                          //
0008 //--------------------------------------------------------------------------//
0009 #ifndef LogisticFunction_h
0010 #define LogisticFunction_h 1
0011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0012 #include "CLHEP/GenericFunctions/Parameter.hh"
0013 #include <vector>
0014 namespace Genfun {
0015 
0016   /**
0017    * @author
0018    * @ingroup genfun
0019    */
0020   class LogisticFunction : public AbsFunction  {
0021 
0022     FUNCTION_OBJECT_DEF(LogisticFunction)
0023 
0024       public:
0025 
0026     // Constructor
0027     LogisticFunction();
0028 
0029     // Copy constructor
0030     LogisticFunction(const LogisticFunction &right);
0031   
0032     // Destructor
0033     virtual ~LogisticFunction();
0034   
0035     // Retreive function value
0036     virtual double operator ()(double argument) const override;
0037     virtual double operator ()(const Argument & arg) const override {return operator() (arg[0]); }
0038   
0039     // Get the starting value of the LogisticFunction
0040     Parameter & x0(); 
0041     const Parameter & x0() const; 
0042 
0043     // Get the control parameter of the LogisticFunction
0044     Parameter & a();
0045     const Parameter & a() const;
0046 
0047   private:
0048 
0049     // It is illegal to assign an adjustable constant
0050     const LogisticFunction & operator=(const LogisticFunction &right);
0051 
0052     // Here is the decay constant
0053     Parameter _x0;
0054 
0055     // Here is the sigma
0056     Parameter _a;
0057 
0058     // A vector of values.
0059     mutable std::vector<double> fx;
0060     // Some cache:
0061     mutable double __a, __x0;
0062 
0063   };
0064 } // namespace Genfun
0065 
0066 #endif