Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

StatedFCN.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _StatedFCN_H_
00015 #define _StatedFCN_H_
00016 
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020 
00021 
00022 #ifdef HAVE_MINUIT
00023 #include "pattern/libhippo.h"
00024 #include "Minuit/FCNBase.h"
00025 #else
00026 #include "FCNBase.h"
00027 #endif
00028 
00029 #include <string>
00030 
00031 class DataSource;
00032 class FunctionBase;
00033 class TupleCut;
00034 
00046 class MDL_HIPPOPLOT_API StatedFCN : public FCNBase 
00047 {
00048 
00049 private:
00050 
00057   std::vector < int > m_fixed_flags;
00058 
00059 protected:
00060 
00064   FunctionBase * m_function;
00065 
00071   bool m_has_errors;
00072 
00076   StatedFCN ();
00077 
00081   StatedFCN ( const StatedFCN & );
00082 
00083  public:
00084 
00087   StatedFCN ( FunctionBase * function );
00088 
00091   virtual StatedFCN * clone ( ) const = 0;
00092 
00096   bool hasFunction () const;
00097 
00101   void setFunction ( FunctionBase * function );
00102 
00106   virtual void setDataSource ( const DataSource * source ) = 0;
00107 
00116   virtual void setDataSource ( const DataSource * source,
00117                                int dimension,
00118                                const std::vector < int > & ) = 0;
00119 
00123   virtual bool setUseErrors ( bool yes = true ) = 0;
00124 
00127   const std::vector < std::string > & getParmNames () const;
00128 
00131   const std::vector < double > & getParameters () const;
00132 
00135   void setParameters ( const std::vector < double > & parms );
00136 
00139   void fillFreeParameters ( std::vector < double > & free_parms ) const;
00140 
00143   unsigned int getNumberFreeParms () const;
00144 
00149   const std::vector < int > & getFixedFlags () const;
00150 
00154   virtual void setFixedFlags ( const std::vector < int > & flags );
00155 
00158   virtual void setFreeParameters ( const std::vector < double > & parms );
00159 
00163   void fillFreeDerivatives ( std::vector < double > &, double x );
00164 
00168   virtual double operator () ( const std::vector < double > & parms ) const;
00169 
00176   virtual double objectiveValue () const = 0;
00177 
00180   virtual int degreesOfFreedom() const = 0;
00181 
00182   virtual void calcAlphaBeta ( std::vector < std::vector < double > > & alpha,
00183                                std::vector < double > & beta ) = 0;
00184 
00189   virtual bool needsIntegrated () const = 0;
00190 
00193   virtual void setFitCut ( TupleCut * cut ) = 0;
00194 
00197   virtual void setFitRange ( bool yes = true ) = 0;
00198 
00199 };
00200 
00201 #endif // _StatedFCN_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3