CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

FourierFit.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: 
00003 //---------------------FourierFit-------------------------------------------//
00004 //                                                                          //
00005 // Class FourierFit.  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 [0,2PI])         //
00008 // Joe Boudreau, Petar Maksimovic, January 2000                             //
00009 //                                                                          //
00010 //--------------------------------------------------------------------------//
00011 #ifndef FourierFit_h
00012 #define FourierFit_h 1
00013 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00014 #include "CLHEP/GenericFunctions/Parameter.hh"
00015 namespace Genfun {
00016 
00021   class FourierFit : public AbsFunction  {
00022 
00023     FUNCTION_OBJECT_DEF(FourierFit)
00024 
00025       public:
00026 
00027     // Constructor
00028     FourierFit(unsigned int N);
00029 
00030     // Copy constructor
00031     FourierFit(const FourierFit &right);
00032   
00033     // Destructor
00034     virtual ~FourierFit();
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 FourierFit & operator=(const FourierFit &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/FourierFit.icc"
00063 #endif

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7