FunctionProjector.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _FunctionProjector_H_
15 #define _FunctionProjector_H_
16 
17 #include "ProjectorBase.h"
18 
19 namespace hippodraw {
20 
21 class BinsFunction;
22 class Fitter;
23 class FunctionBase;
24 class TupleCut;
25 
34 {
35 
36 private:
37 
40  mutable std::vector< std::vector < double > > m_covariance;
41 
44  mutable std::vector< double > m_principleErrors;
45 
47  static std::string s_x_label;
48 
53  std::vector< double > m_save_parms;
54 
56  std::string m_z_label;
57 
62 
65 
71 
73  virtual void addPointReps ();
74 
75 public:
76 
80  FunctionProjector ( FunctionBase * function,
81  ProjectorBase * targetProjector );
82 
85 
88  virtual ~FunctionProjector();
89 
90  virtual ProjectorBase * clone();
91 
93  virtual bool isEmpty () const;
94 
97  double objectiveValue () const;
98 
101  const std::vector < std::vector < double > > & covariance ( ) const;
102 
105  void calcPrincipleErrors() const;
106 
108  const std::vector< double > & principleErrors () const;
109 
114  void setPrincipleErrors ( std::vector < double > ::const_iterator first,
115  std::vector < double > ::const_iterator last );
116 
119  void setFitter ( Fitter * fitter );
120 
123  Fitter * getFitter ( ) const;
124 
126  int degreesOfFreedom () const;
127 
129  FunctionBase * function () const;
130 
132  bool hasSavedParameters () const;
133 
135  void saveParameters ();
136 
139  void restoreParameters ();
140 
143  void initializeFunction ( ProjectorBase * projector );
144 
149  bool fitFunction ( );
150 
151  virtual Range valueRange() const;
152 
153  virtual const std::string & getTitle() const;
154 
155  virtual void setRange( hippodraw::Axes::Type, bool );
156  virtual double getPosOn ( hippodraw::Axes::Type ) const;
157 
161  virtual const std::string & getXLabel() const;
162 
168  virtual const std::string & getYLabel ( bool density = false ) const;
169 
173  int getNumberOfEntries () const;
174 
176  int getUnderflow () const;
177 
179  int getOverflow () const;
180 
181 
182  virtual Range dataRangeOn ( hippodraw::Axes::Type ) const;
183 
185  const std::string & getZLabel() const;
186 
189  virtual DataSource * createNTuple () const;
190 
192  void setParameters( const std::vector<double> &params );
193 
196  virtual void setFitCut ( TupleCut * cut );
197 
200  virtual void setFitRange ( bool yes = true );
201 
202 protected:
203 
206  virtual void fillProjectedValues ( DataSource * ntuple,
207  bool in_range = false ) const;
208 
209 };
210 
211 } // namespace hippodraw
212 
213 #endif // _FunctionProjector_H_

Generated for HippoDraw Class Library by doxygen