CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: LegendreFit.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $ 00003 //---------------------LegendreFit------------------------------------------// 00004 // // 00005 // Class LegendreFit. This is a fitting function consisting of a super // 00006 // position of N legendre polynomials. Cascading fractions and phases are // 00007 // the input parameters. Function is normalized to one (on [-1,1]) // 00008 // Joe Boudreau, Petar Maksimovic, January 2000 // 00009 // // 00010 //--------------------------------------------------------------------------// 00011 #ifndef LegendreFit_h 00012 #define LegendreFit_h 1 00013 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00014 #include "CLHEP/GenericFunctions/Parameter.hh" 00015 namespace Genfun { 00016 00021 class LegendreFit : public AbsFunction { 00022 00023 FUNCTION_OBJECT_DEF(LegendreFit) 00024 00025 public: 00026 00027 // Constructor 00028 LegendreFit(unsigned int N); 00029 00030 // Copy constructor 00031 LegendreFit(const LegendreFit &right); 00032 00033 // Destructor 00034 virtual ~LegendreFit(); 00035 00036 // Retreive function value 00037 virtual double operator ()(double argument) const; 00038 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00039 00040 unsigned int order() const; 00041 00042 Parameter *getFraction(unsigned int i); 00043 const Parameter *getFraction(unsigned int i) const; 00044 00045 Parameter *getPhase(unsigned int i); 00046 const Parameter *getPhase(unsigned int i) const; 00047 00048 00049 private: 00050 00051 // It is illegal to assign an adjustable constant 00052 const LegendreFit & operator=(const LegendreFit &right); 00053 00054 // 00055 const unsigned int N; 00056 std::vector <Genfun::Parameter *> fraction; 00057 std::vector <Genfun::Parameter *> phase; 00058 00059 00060 }; 00061 } // namespace Genfun 00062 #include "CLHEP/GenericFunctions/LegendreFit.icc" 00063 #endif