Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: 
0003 //---------------------SphericalHarmonicFit------------------------------------------//
0004 //                                                                          //
0005 // Class SphericalHarmonicFit.  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 SphericalHarmonicFit_h
0012 #define SphericalHarmonicFit_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 SphericalHarmonicFit : public AbsFunction  {
0023 
0024     FUNCTION_OBJECT_DEF(SphericalHarmonicFit)
0025 
0026       public:
0027 
0028      // Constructor.  Builds all the 
0029     SphericalHarmonicFit(unsigned int LMAX);
0030 
0031     // Copy constructor
0032     SphericalHarmonicFit(const SphericalHarmonicFit &right);
0033   
0034     // Destructor
0035     virtual ~SphericalHarmonicFit();
0036   
0037     // Dimensionality=2.  They are; cosTheta (not theta) and phi
0038     virtual unsigned int dimensionality() const override {return 2;}
0039 
0040     // Retreive function value
0041     virtual double operator ()(double argument) const override;    // Gives an error.
0042     virtual double operator ()(const Argument & a) const override; // Must use this one
0043 
0044     // Total number of parameters
0045     unsigned int numComponents() const;
0046     
0047     // Max L ("angular momentum")
0048     unsigned int lMax() const;
0049     
0050     // MINUIT-SAFE PARAMETERIZATION: Fractions vary on the range 0,1, 
0051     // Phases need not be bounded:
0052 
0053     // The fraction of amplitude sq which is L OR HIGHER:
0054     Parameter *getFractionLOrHigher(unsigned int L);
0055     const Parameter *getFractionLOrHigher(unsigned int L) const;
0056 
0057     // The phase of coefficient L, M=0;
0058     Parameter *getPhaseLM0(unsigned int L);
0059     const Parameter *getPhaseLM0(unsigned int L) const;
0060 
0061     // The fraction of amplitude sq which is L which is +- M OR HIGHER
0062     Parameter *getFractionAbsMOrHigher(unsigned int L, unsigned int M);
0063     const Parameter *getFractionAbsMOrHigher(unsigned int L, unsigned int M) const;
0064 
0065     // The fraction of amplitude sq which is +- M, which is positive
0066     Parameter *getFractionMPositive(unsigned int L, unsigned int M);
0067     const Parameter *getFractionMPositive(unsigned int L, unsigned int M) const;
0068 
0069     // The phase of the positive M coefficient
0070     Parameter *getPhaseMPlus(unsigned int L, unsigned int M);
0071     const Parameter *getPhaseMPlus(unsigned int L, unsigned int M) const;
0072 
0073     // The phase of the negative M coefficient
0074     Parameter *getPhaseMMinus(unsigned int L, unsigned int M);
0075     const Parameter *getPhaseMMinus(unsigned int L, unsigned int M) const;
0076 
0077     // Gets the coefficients the coefficients of the function which is
0078     // Squared to obtain a probability distribution (amplitude)
0079     const SphericalHarmonicCoefficientSet & coefficientsA() const;
0080 
0081     // Gets the coefficients the coefficients of the function which is
0082     // Squared to obtain a probability distribution: 
0083     const SphericalHarmonicCoefficientSet & coefficientsASq() const;
0084 
0085     // Recompute coefficients from the parameters:
0086     void recomputeCoefficients() const;
0087 
0088   private:
0089 
0090     // It is illegal to assign an adjustable constant
0091     const SphericalHarmonicFit & operator=(const SphericalHarmonicFit &right);
0092     
0093     
0094     class Clockwork;
0095     Clockwork *c;
0096 
0097   };
0098 } // namespace Genfun
0099 
0100 
0101 
0102 #include "CLHEP/GenericFunctions/SphericalHarmonicFit.icc"
0103 #endif