All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GradientDescent.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Minuit2/MnApplication.h"
4 
5 namespace ana
6 {
7  /// A minimalistic gradient descent fitter to complement MINUIT's more
8  /// elaborate offerings
9  class GradientDescent: public ROOT::Minuit2::MnApplication
10  {
11  public:
12  GradientDescent(const ROOT::Minuit2::FCNGradientBase& func,
13  const ROOT::Minuit2::MnUserParameters& pars);
14 
15  virtual ROOT::Minuit2::FunctionMinimum operator()(unsigned int maxfcn,
16  double tolerance) override;
17 
18  virtual const ROOT::Minuit2::ModularFunctionMinimizer& Minimizer() const override
19  {
20  abort();
21  }
22 
23  protected:
24  ROOT::Minuit2::FunctionMinimum Package(const std::vector<double>& pt,
25  double chi, int ncalls) const;
26 
27  double Magnitude(const std::vector<double>& xs) const;
28  void MakeUnit(std::vector<double>& xs) const;
29 
30  const ROOT::Minuit2::FCNGradientBase& fFunc;
31  const ROOT::Minuit2::MnUserParameters& fPars;
32  };
33 }
const ROOT::Minuit2::MnUserParameters & fPars
double Magnitude(const std::vector< double > &xs) const
auto const tolerance
GradientDescent(const ROOT::Minuit2::FCNGradientBase &func, const ROOT::Minuit2::MnUserParameters &pars)
process_name opflashCryoW ana
ROOT::Minuit2::FunctionMinimum Package(const std::vector< double > &pt, double chi, int ncalls) const
const ROOT::Minuit2::FCNGradientBase & fFunc
virtual const ROOT::Minuit2::ModularFunctionMinimizer & Minimizer() const override
virtual ROOT::Minuit2::FunctionMinimum operator()(unsigned int maxfcn, double tolerance) override
void MakeUnit(std::vector< double > &xs) const