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 SphericalHarmonicExpansion.  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 [-1,1])          //
0008 // Joe Boudreau, Petar Maksimovic, January 2000                             //
0009 //                                                                          //
0010 //--------------------------------------------------------------------------//
0011 #ifndef SphericalHarmonicExpansion_h
0012 #define SphericalHarmonicExpansion_h
0013 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0014 #include "CLHEP/GenericFunctions/Parameter.hh"
0015 #include "CLHEP/GenericFunctions/SphericalHarmonicCoefficientSet.hh"
0016 namespace Genfun {
0017 
0018   /**
0019    * @author
0020    * @ingroup genfun
0021    */
0022   class SphericalHarmonicExpansion : public AbsFunction  {
0023 
0024     FUNCTION_OBJECT_DEF(SphericalHarmonicExpansion)
0025 
0026       public:
0027 
0028     enum Type {REAL,IMAG,MAG, MAGSQ};
0029 
0030      // Constructor.  Builds all the 
0031     SphericalHarmonicExpansion(Type type, const SphericalHarmonicCoefficientSet & coefficients);
0032 
0033     // Copy constructor
0034     SphericalHarmonicExpansion(const SphericalHarmonicExpansion &right);
0035   
0036     // Destructor
0037     virtual ~SphericalHarmonicExpansion();
0038   
0039     // Dimensionality=2.  They are; cosTheta (not theta) and phi
0040     virtual unsigned int dimensionality() const override {return 2;}
0041 
0042     // Retreive function value
0043     virtual double operator ()(double argument) const override;    // Gives an error.
0044     virtual double operator ()(const Argument & a) const override; // Must use this one
0045 
0046     // Get the expansion coefficients:
0047     SphericalHarmonicCoefficientSet & coefficientSet();
0048     const SphericalHarmonicCoefficientSet & coefficientSet() const;
0049     
0050   private:
0051 
0052     // It is illegal to assign an adjustable constant
0053     const SphericalHarmonicExpansion & operator=(const SphericalHarmonicExpansion &right);
0054     
0055     
0056     class Clockwork;
0057     Clockwork *c;
0058 
0059   };
0060 } // namespace Genfun
0061 
0062 
0063 
0064 #include "CLHEP/GenericFunctions/SphericalHarmonicExpansion.icc"
0065 #endif