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

SphericalHarmonicExpansion.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: 
00003 //---------------------SphericalHarmonicExpansion------------------------------------------//
00004 //                                                                          //
00005 // Class SphericalHarmonicExpansion.  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 SphericalHarmonicExpansion_h
00012 #define SphericalHarmonicExpansion_h
00013 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00014 #include "CLHEP/GenericFunctions/Parameter.hh"
00015 #include "CLHEP/GenericFunctions/SphericalHarmonicCoefficientSet.hh"
00016 namespace Genfun {
00017 
00022   class SphericalHarmonicExpansion : public AbsFunction  {
00023 
00024     FUNCTION_OBJECT_DEF(SphericalHarmonicExpansion)
00025 
00026       public:
00027 
00028     enum Type {REAL,IMAG,MAG, MAGSQ};
00029 
00030      // Constructor.  Builds all the 
00031     SphericalHarmonicExpansion(Type type, const SphericalHarmonicCoefficientSet & coefficients);
00032 
00033     // Copy constructor
00034     SphericalHarmonicExpansion(const SphericalHarmonicExpansion &right);
00035   
00036     // Destructor
00037     virtual ~SphericalHarmonicExpansion();
00038   
00039     // Dimensionality=2.  They are; cosTheta (not theta) and phi
00040     virtual unsigned int dimensionality() const {return 2;}
00041 
00042     // Retreive function value
00043     virtual double operator ()(double argument) const;    // Gives an error.
00044     virtual double operator ()(const Argument & a) const; // Must use this one
00045 
00046     // Get the expansion coefficients:
00047     SphericalHarmonicCoefficientSet & coefficientSet();
00048     const SphericalHarmonicCoefficientSet & coefficientSet() const;
00049     
00050   private:
00051 
00052     // It is illegal to assign an adjustable constant
00053     const SphericalHarmonicExpansion & operator=(const SphericalHarmonicExpansion &right);
00054     
00055     
00056     class Clockwork;
00057     Clockwork *c;
00058 
00059   };
00060 } // namespace Genfun
00061 
00062 
00063 
00064 #include "CLHEP/GenericFunctions/SphericalHarmonicExpansion.icc"
00065 #endif

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7