Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

BaseFitObject.h

Go to the documentation of this file.
00001 
00019 #ifndef __BASEFITOBJECT_H
00020 #define __BASEFITOBJECT_H
00021 
00022 #include <iostream>
00023 
00024 
00025 // Class BaseFitObject
00027 
00085 class BaseFitObject {
00086   public:
00087     virtual ~BaseFitObject() {};
00088     
00090     virtual bool setParam (int ilocal,         
00091                            double par_,        
00092                            bool measured_,     
00093                            bool fixed_ = false 
00094                           ) = 0;  
00096     virtual bool setParam (int ilocal,    
00097                            double par_    
00098                           ) = 0;  
00100     virtual bool setMParam (int ilocal,    
00101                             double mpar_   
00102                            ) = 0;  
00104     virtual bool setError (int ilocal,    
00105                            double err_    
00106                            ) = 0;
00108     virtual bool setCov (int ilocal,    
00109                          int jlocal,    
00110                          double cov_    
00111                         ) = 0;
00114     virtual bool setGlobalParNum (int ilocal,  
00115                                   int iglobal  
00116                                   ) = 0; 
00117     
00119     virtual bool fixParam (int ilocal,    
00120                            bool fix=true  
00121                           ) = 0;
00123     virtual bool releaseParam (int ilocal    
00124                               ) 
00125     { return fixParam (ilocal, false); } 
00126     
00128     virtual bool isParamFixed (int ilocal     
00129                               ) const = 0; 
00130     
00132     virtual double getParam (int ilocal     
00133                             ) const = 0;
00135     virtual const char *getParamName (int ilocal     
00136                             ) const { return "???";}
00138     virtual const char *getName () const { return "???";}
00140     virtual void setName (const char * name_) {}
00142     virtual double getMParam (int ilocal     
00143                              ) const = 0;
00145     virtual double getError (int ilocal     
00146                             ) const = 0;
00148     virtual double getCov (int ilocal,    
00149                            int jlocal     
00150                           ) const = 0;
00152     virtual bool isParamMeasured (int ilocal    
00153                                    ) const = 0;
00155     virtual int getGlobalParNum(int ilocal     
00156                                 ) const = 0;
00158     virtual int getNPar() const = 0;
00160     virtual int getNMeasured() const;
00162     virtual int getNUnmeasrd() const;
00164     virtual int getNFree() const;
00166     virtual int getNFixed() const;
00167     
00170     virtual void addToGlobCov(double *glcov, int idim) const = 0; 
00171             
00173     virtual double getChi2() const = 0;
00175     virtual double getDChi2DParam(int ilocal   
00176                                    ) const = 0;
00178     virtual double getD2Chi2DParam2(int ilocal,   
00179                                     int jlocal    
00180                                    ) const = 0;
00181     
00183     virtual void addToGlobalChi2DerMatrix (int idim,    
00184                                            double *M    
00185                                           ) const = 0;
00187     virtual void addToGlobalDerMatrix (int idim,    
00188                                        double c,    
00189                                        double *M    
00190                                       ) const = 0;
00192     virtual std::ostream& printParams (std::ostream& os  
00193                                       ) const;
00194     
00196     virtual std::ostream&  print (std::ostream& os       
00197                                  ) const = 0;
00198 };
00199 
00203 inline std::ostream& operator<< (std::ostream& os,         
00204                                  const BaseFitObject& bfo  
00205                                 ) {
00206   return bfo.print(os);
00207 }
00208 
00209 #endif // __BASEFITOBJECT_H
00210 

Generated on Fri Sep 14 17:38:20 2007 for Kinfit by doxygen 1.3.2