Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: 
0003 //---------------------SphericalHarmonicExpansion---------------------------//
0004 //                                                                          //
0005 // Class LegendreExpansion  This is an expansion in terms of  a super       //
0006 // position of N legendre polynomials.                                      //
0007 //--------------------------------------------------------------------------//
0008 #ifndef LegendreExpansion_h
0009 #define LegendreExpansion_h 
0010 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0011 #include "CLHEP/GenericFunctions/Parameter.hh"
0012 #include "CLHEP/GenericFunctions/LegendreCoefficientSet.hh"
0013 namespace Genfun {
0014 
0015   /**
0016    * @author
0017    * @ingroup genfun
0018    */
0019   class LegendreExpansion : public AbsFunction  {
0020 
0021     FUNCTION_OBJECT_DEF(LegendreExpansion)
0022 
0023       public:
0024 
0025     enum Type {REAL,IMAG,MAG, MAGSQ};
0026 
0027      // Constructor.  Builds all the 
0028     LegendreExpansion(Type type, const LegendreCoefficientSet & coefficients);
0029 
0030     // Copy constructor
0031     LegendreExpansion(const LegendreExpansion &right);
0032   
0033     // Destructor
0034     virtual ~LegendreExpansion();
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     // Get the expansion coefficients:
0040     const LegendreCoefficientSet & coefficientSet() const;
0041     
0042   private:
0043 
0044     // It is illegal to assign an adjustable constant
0045     const LegendreExpansion & operator=(const LegendreExpansion &right);
0046     
0047     
0048     class Clockwork;
0049     Clockwork *c;
0050 
0051   };
0052 } // namespace Genfun
0053 
0054 
0055 
0056 #include "CLHEP/GenericFunctions/LegendreExpansion.icc"
0057 #endif