ROOT  6.06/09
Reference Guide
GaussFcn2.h
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #ifndef MN_GaussFcn2_H_
11 #define MN_GaussFcn2_H_
12 
13 #include "Minuit2/FCNBase.h"
14 
15 #include <vector>
16 
17 namespace ROOT {
18 
19  namespace Minuit2 {
20 
21 
22 class GaussFcn2 : public FCNBase {
23 
24 public:
25 
26  GaussFcn2(const std::vector<double>& meas,
27  const std::vector<double>& pos,
28  const std::vector<double>& mvar) : fMeasurements(meas),
29  fPositions(pos),
30  fMVariances(mvar),
31  fMin(0.) {Init();}
33 
34  virtual void Init();
35 
36  virtual double Up() const {return 1.;}
37  virtual double operator()(const std::vector<double>&) const;
38  virtual double ErrorDef() const {return Up();}
39 
40  std::vector<double> Measurements() const {return fMeasurements;}
41  std::vector<double> Positions() const {return fPositions;}
42  std::vector<double> Variances() const {return fMVariances;}
43 
44 private:
45 
46  std::vector<double> fMeasurements;
47  std::vector<double> fPositions;
48  std::vector<double> fMVariances;
49  double fMin;
50 };
51 
52  } // namespace Minuit2
53 
54 } // namespace ROOT
55 
56 #endif //MN_GaussFcn2_H_
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
std::vector< double > fMVariances
Definition: GaussFcn2.h:48
std::vector< double > fPositions
Definition: GaussFcn2.h:47
std::vector< double > Measurements() const
Definition: GaussFcn2.h:40
std::vector< double > fMeasurements
Definition: GaussFcn2.h:46
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:47
std::vector< double > Positions() const
Definition: GaussFcn2.h:41
GaussFcn2(const std::vector< double > &meas, const std::vector< double > &pos, const std::vector< double > &mvar)
Definition: GaussFcn2.h:26
virtual void Init()
Definition: GaussFcn2.cxx:37
virtual double ErrorDef() const
Error definition of the function.
Definition: GaussFcn2.h:38
virtual double Up() const
Error definition of the function.
Definition: GaussFcn2.h:36
virtual double operator()(const std::vector< double > &) const
The meaning of the vector of parameters is of course defined by the user, who uses the values of thos...
Definition: GaussFcn2.cxx:21
std::vector< double > Variances() const
Definition: GaussFcn2.h:42