Public Member Functions | Private Attributes | List of all members
ana::MinuitFitter::MinuitFitSummary Class Reference

Concrete instance of IFitSummary for use in MinuitFitter. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/CAFAna/Fit/MinuitFitter.h"

Inheritance diagram for ana::MinuitFitter::MinuitFitSummary:

Public Member Functions

 MinuitFitSummary (std::unique_ptr< ROOT::Minuit2::FunctionMinimum > &&minimum)
 
const ROOT::Minuit2::FunctionMinimum * GetMinimizer () const
 
double EvalMetricVal () const override
 The chi^2 passed to the fitter. More...
 
bool IsBetterThan (const IFitSummary *other) const override
 Is the current fit better than other? More...
 

Private Attributes

std::unique_ptr< ROOT::Minuit2::FunctionMinimum > fMinimum
 the minimizer instance More...
 

Detailed Description

Concrete instance of IFitSummary for use in MinuitFitter.

Definition at line 64 of file MinuitFitter.h.

Constructor & Destructor Documentation

ana::MinuitFitter::MinuitFitSummary::MinuitFitSummary ( std::unique_ptr< ROOT::Minuit2::FunctionMinimum > &&  minimum)

Definition at line 35 of file MinuitFitter.cxx.

References ana::assert(), and fMinimum.

36  : fMinimum(std::move(minimum))
37  {
38  assert (fMinimum.get() && "Can't make a MinuitFitSummary from a null ROOT::Minuit2::FunctionMinimum");
39  }
assert(nhit_max >=nhit_nbins)
std::unique_ptr< ROOT::Minuit2::FunctionMinimum > fMinimum
the minimizer instance
Definition: MinuitFitter.h:76

Member Function Documentation

double ana::MinuitFitter::MinuitFitSummary::EvalMetricVal ( ) const
override

The chi^2 passed to the fitter.

Definition at line 57 of file MinuitFitter.cxx.

References fMinimum.

Referenced by GetMinimizer(), and IsBetterThan().

58  {
59  return fMinimum->Fval();
60  }
std::unique_ptr< ROOT::Minuit2::FunctionMinimum > fMinimum
the minimizer instance
Definition: MinuitFitter.h:76
const ROOT::Minuit2::FunctionMinimum* ana::MinuitFitter::MinuitFitSummary::GetMinimizer ( ) const
inline

Definition at line 69 of file MinuitFitter.h.

References EvalMetricVal(), fMinimum, IsBetterThan(), and fhicl::other.

69 { return fMinimum.get(); }
std::unique_ptr< ROOT::Minuit2::FunctionMinimum > fMinimum
the minimizer instance
Definition: MinuitFitter.h:76
bool ana::MinuitFitter::MinuitFitSummary::IsBetterThan ( const IFitSummary other) const
override

Is the current fit better than other?

Definition at line 42 of file MinuitFitter.cxx.

References ana::assert(), and EvalMetricVal().

Referenced by GetMinimizer().

43  {
44  if (!other)
45  return true;
46 
47  if (const auto mnFitSummary = dynamic_cast<const MinuitFitSummary*>(other))
48  return EvalMetricVal() < mnFitSummary->EvalMetricVal();
49  else
50  {
51  assert(false && "Can't compare a MinuitFitSummary to another kind of IFitSummary");
52  return false; // prevent compiler warnings
53  }
54  }
double EvalMetricVal() const override
The chi^2 passed to the fitter.
assert(nhit_max >=nhit_nbins)

Member Data Documentation

std::unique_ptr<ROOT::Minuit2::FunctionMinimum> ana::MinuitFitter::MinuitFitSummary::fMinimum
private

the minimizer instance

Definition at line 76 of file MinuitFitter.h.

Referenced by EvalMetricVal(), GetMinimizer(), and MinuitFitSummary().


The documentation for this class was generated from the following files: