GaussFcn2.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: GaussFcn2.h 20880 2007-11-19 11:23:41Z rdm $
00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #ifndef MN_GaussFcn2_H_
00011 #define MN_GaussFcn2_H_
00012 
00013 #include "Minuit2/FCNBase.h"
00014 
00015 #include <vector>
00016 
00017 namespace ROOT {
00018 
00019    namespace Minuit2 {
00020 
00021 
00022 class GaussFcn2 : public FCNBase {
00023 
00024 public:
00025 
00026   GaussFcn2(const std::vector<double>& meas,
00027           const std::vector<double>& pos,
00028           const std::vector<double>& mvar) : fMeasurements(meas),
00029                                              fPositions(pos),
00030                                              fMVariances(mvar), 
00031                                              fMin(0.) {Init();}
00032   ~GaussFcn2() {}
00033 
00034   virtual void Init();
00035 
00036   virtual double Up() const {return 1.;}
00037   virtual double operator()(const std::vector<double>&) const;
00038   virtual double ErrorDef() const {return Up();}
00039   
00040   std::vector<double> Measurements() const {return fMeasurements;}
00041   std::vector<double> Positions() const {return fPositions;}
00042   std::vector<double> Variances() const {return fMVariances;}
00043   
00044 private:
00045 
00046   std::vector<double> fMeasurements;
00047   std::vector<double> fPositions;
00048   std::vector<double> fMVariances;
00049   double fMin;
00050 };
00051 
00052   }  // namespace Minuit2
00053 
00054 }  // namespace ROOT
00055 
00056 #endif //MN_GaussFcn2_H_

Generated on Tue Jul 5 14:37:12 2011 for ROOT_528-00b_version by  doxygen 1.5.1