Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:34

0001 // -*- C++ -*-
0002 // $Id: 
0003 //---------------------FourierFit-------------------------------------------//
0004 //                                                                          //
0005 // Class FourierFit.  This is a fitting function consisting of a super      //
0006 // position of N legendre polynomials.  Cascading fractions and phases are  //
0007 // the input parameters. Function is normalized to one (on [0,2PI])         //
0008 // Joe Boudreau, Petar Maksimovic, January 2000                             //
0009 //                                                                          //
0010 //--------------------------------------------------------------------------//
0011 #ifndef FourierFit_h
0012 #define FourierFit_h 1
0013 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0014 #include "CLHEP/GenericFunctions/Parameter.hh"
0015 namespace Genfun {
0016 
0017   /**
0018    * @author
0019    * @ingroup genfun
0020    */
0021   class FourierFit : public AbsFunction  {
0022 
0023     FUNCTION_OBJECT_DEF(FourierFit)
0024 
0025       public:
0026 
0027     // Constructor
0028     FourierFit(unsigned int N);
0029 
0030     // Copy constructor
0031     FourierFit(const FourierFit &right);
0032   
0033     // Destructor
0034     virtual ~FourierFit();
0035   
0036     // Retreive function value
0037     virtual double operator ()(double argument) const override;
0038     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0039   
0040     unsigned int order() const;
0041 
0042     Parameter *getFraction(unsigned int i);
0043     const Parameter *getFraction(unsigned int i) const;
0044 
0045     Parameter *getPhase(unsigned int i);
0046     const Parameter *getPhase(unsigned int i) const;
0047 
0048 
0049   private:
0050 
0051     // It is illegal to assign an adjustable constant
0052     const FourierFit & operator=(const FourierFit &right);
0053 
0054     // 
0055     const unsigned   int                    N;
0056     std::vector <Genfun::Parameter *> fraction;
0057     std::vector <Genfun::Parameter *> phase;
0058 
0059 
0060   };
0061 } // namespace Genfun
0062 #include "CLHEP/GenericFunctions/FourierFit.icc"
0063 #endif