Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef _SPHERICALHARMONICCOEFFICIENTSET_H_
0002 #define _SPHERICALHARMONICCOEFFICIENTSET_H_
0003 #include <complex>
0004 namespace Genfun {
0005 
0006   class SphericalHarmonicCoefficientSet {
0007     
0008   public:
0009     
0010     
0011     // Constructor:
0012     SphericalHarmonicCoefficientSet(unsigned int LMAX);
0013     
0014     // Copy Constructor:
0015     SphericalHarmonicCoefficientSet(const SphericalHarmonicCoefficientSet &);
0016     
0017     // Destructor:
0018     ~SphericalHarmonicCoefficientSet();
0019     
0020     
0021     // Get the size of the set:
0022     unsigned int getLMax() const;
0023     
0024     // Readonly access to a specific coefficient:
0025     const std::complex<double> & operator () (unsigned int l, int m) const;
0026     
0027     // Read/write access to a specific coefficient:
0028     std::complex<double> & operator () (unsigned int l, int m);
0029     
0030     // Assignement
0031     SphericalHarmonicCoefficientSet & operator= (const SphericalHarmonicCoefficientSet & );
0032 
0033     // Scale:
0034     SphericalHarmonicCoefficientSet & operator*= (const std::complex<double> & s );
0035 
0036     // Addition:
0037     SphericalHarmonicCoefficientSet & operator+= (const SphericalHarmonicCoefficientSet & );
0038 
0039     // Subtraction:
0040     SphericalHarmonicCoefficientSet & operator-= (const SphericalHarmonicCoefficientSet & );
0041     
0042     
0043   private:
0044     
0045     
0046     class Clockwork;
0047     Clockwork *c;
0048     
0049     
0050   };
0051   
0052   // Dump:
0053   std::ostream & operator<< ( std::ostream & o, const SphericalHarmonicCoefficientSet & c); 
0054   
0055   // Take the dot product:
0056   std::complex<double>  dot(const SphericalHarmonicCoefficientSet &, 
0057                 const SphericalHarmonicCoefficientSet &) ;
0058 
0059   // If an expansion in Spherical Harmonics is squared, another expansion in Spherical
0060   // harmonics is the result:
0061   SphericalHarmonicCoefficientSet squareExpansionCoefficients(const SphericalHarmonicCoefficientSet &);
0062 
0063 
0064 }
0065 
0066 #include "CLHEP/GenericFunctions/SphericalHarmonicCoefficientSet.icc"
0067 
0068 #endif
0069 
0070