CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: 00003 //---------------------SphericalHarmonicFit------------------------------------------// 00004 // // 00005 // Class SphericalHarmonicFit. 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 SphericalHarmonicFit_h 00012 #define SphericalHarmonicFit_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 SphericalHarmonicFit : public AbsFunction { 00023 00024 FUNCTION_OBJECT_DEF(SphericalHarmonicFit) 00025 00026 public: 00027 00028 // Constructor. Builds all the 00029 SphericalHarmonicFit(unsigned int LMAX); 00030 00031 // Copy constructor 00032 SphericalHarmonicFit(const SphericalHarmonicFit &right); 00033 00034 // Destructor 00035 virtual ~SphericalHarmonicFit(); 00036 00037 // Dimensionality=2. They are; cosTheta (not theta) and phi 00038 virtual unsigned int dimensionality() const {return 2;} 00039 00040 // Retreive function value 00041 virtual double operator ()(double argument) const; // Gives an error. 00042 virtual double operator ()(const Argument & a) const; // Must use this one 00043 00044 // Total number of parameters 00045 unsigned int numComponents() const; 00046 00047 // Max L ("angular momentum") 00048 unsigned int lMax() const; 00049 00050 // MINUIT-SAFE PARAMETERIZATION: Fractions vary on the range 0,1, 00051 // Phases need not be bounded: 00052 00053 // The fraction of amplitude sq which is L OR HIGHER: 00054 Parameter *getFractionLOrHigher(unsigned int L); 00055 const Parameter *getFractionLOrHigher(unsigned int L) const; 00056 00057 // The phase of coefficient L, M=0; 00058 Parameter *getPhaseLM0(unsigned int L); 00059 const Parameter *getPhaseLM0(unsigned int L) const; 00060 00061 // The fraction of amplitude sq which is L which is +- M OR HIGHER 00062 Parameter *getFractionAbsMOrHigher(unsigned int L, unsigned int M); 00063 const Parameter *getFractionAbsMOrHigher(unsigned int L, unsigned int M) const; 00064 00065 // The fraction of amplitude sq which is +- M, which is positive 00066 Parameter *getFractionMPositive(unsigned int L, unsigned int M); 00067 const Parameter *getFractionMPositive(unsigned int L, unsigned int M) const; 00068 00069 // The phase of the positive M coefficient 00070 Parameter *getPhaseMPlus(unsigned int L, unsigned int M); 00071 const Parameter *getPhaseMPlus(unsigned int L, unsigned int M) const; 00072 00073 // The phase of the negative M coefficient 00074 Parameter *getPhaseMMinus(unsigned int L, unsigned int M); 00075 const Parameter *getPhaseMMinus(unsigned int L, unsigned int M) const; 00076 00077 // Gets the coefficients the coefficients of the function which is 00078 // Squared to obtain a probability distribution (amplitude) 00079 const SphericalHarmonicCoefficientSet & coefficientsA() const; 00080 00081 // Gets the coefficients the coefficients of the function which is 00082 // Squared to obtain a probability distribution: 00083 const SphericalHarmonicCoefficientSet & coefficientsASq() const; 00084 00085 // Recompute coefficients from the parameters: 00086 void recomputeCoefficients() const; 00087 00088 private: 00089 00090 // It is illegal to assign an adjustable constant 00091 const SphericalHarmonicFit & operator=(const SphericalHarmonicFit &right); 00092 00093 00094 class Clockwork; 00095 Clockwork *c; 00096 00097 }; 00098 } // namespace Genfun 00099 00100 00101 00102 #include "CLHEP/GenericFunctions/SphericalHarmonicFit.icc" 00103 #endif