Fitter.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _Fitter_H_
15 #define _Fitter_H_
16 
17 #include "pattern/libhippo.h"
18 
19 #include <string>
20 #include <vector>
21 
22 namespace hippodraw {
23 
24  class DataSource;
25  class FunctionBase;
26  class StatedFCN;
27  class TupleCut;
28 
34 {
35 
36 private:
37 
41  unsigned int getParameterIndex ( const std::string & name );
42 
43 protected:
44 
48  Fitter ( const Fitter & );
49 
51  std::string m_name;
52 
55  Fitter ( const char * name );
56 
60 
63 
64  public:
65 
67  virtual ~Fitter();
68 
74  virtual Fitter * clone () const = 0;
75 
78  virtual void copyFrom ( const Fitter * other );
79 
82  const std::string & name () const;
83 
93  virtual void setFCN ( StatedFCN * fcn );
94 
97  StatedFCN * getFCN ( );
98 
101  void setFunction ( FunctionBase * function );
102 
105  bool isCompatible ( const FunctionBase * ) const;
106 
109  void setDataSource ( const DataSource * source );
110 
114  void setUseErrors ( bool yes = true );
115 
119  bool getUseErrors () const;
120 
123  bool needsIntegrated () const;
124 
127  void fillFreeParameters ( std::vector < double > & ) const;
128 
132  virtual void setFixedFlags ( const std::vector < int > & flags );
133 
145  virtual const std::vector < int > & getFixedFlags () const;
146 
152  virtual void setLimits ( unsigned int i, double lower, double upper );
153 
157  void setLimits ( const std::string & name,
158  double lower,
159  double upper );
160 
163  virtual bool calcBestFit () = 0;
164 
170  virtual void setStepSize ( unsigned int i, double size );
171 
174  void setStepSize ( const std::string & name, double size );
175 
179  virtual double objectiveValue() const;
180 
183  virtual int calcDegreesOfFreedom () const;
184 
194  virtual
195  int calcCovariance ( std::vector < std::vector < double > > & cov );
196 
199  virtual void setFitCut ( TupleCut * cut );
200 
203  virtual void setFitRange ( bool yes = true );
204 
205 };
206 
207 } // namespace hippodraw
208 
209 #endif // _Fitter_H_

Generated for HippoDraw Class Library by doxygen