Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches
FitResult Struct Reference

Result of one fit: peaks, background, quality, and diagnostics. More...

#include <FittingUtils.hpp>

Public Attributes

std::vector< PeakFitResultpeaks
 One entry per peak; 1 to 3 supported.
Float_t bkg_constant = -1
Float_t bkg_constant_error = -1
 Background offset.
Float_t lin_bkg_slope = -1
Float_t lin_bkg_slope_error = -1
 Background slope.
Float_t reduced_chi2 = -1
 Chi-squared per degree of freedom.
Bool_t valid = kFALSE
 In the RooFit backend this is computed post hoc against the display binning, and drives component pruning; the fit itself is unbinned.
Minuit and RooFit diagnostics

Populated only by RooFitUtils simultaneous fits, so that downstream code can tell a true minimum from a local or failed one.

Every other fit leaves these at their sentinel defaults.

Int_t fit_status = -999
 Minuit migrad status; 0 means success.
Int_t cov_qual = -999
 Covariance quality: 0 Exact, 1 NotPositiveDefinite, 2 Approximate, 3 External.
Double_t edm = -1
 Estimated distance to the minimum.
Double_t min_nll = -1
 Minimised negative log-likelihood.
Bool_t has_fit_diagnostics = kFALSE
 Whether a RooFitResult was available, and hence whether the fields in this group mean anything.
Int_t n_invalid_nll = -1
 Invalid NLL evaluations; -1 if unknown.
std::vector< FitParameterDiagnosticparameter_diagnostics
 One entry per fitted RooRealVar, peak and background alike.

Detailed Description

Result of one fit: peaks, background, quality, and diagnostics.

Returned by both backends. The diagnostic fields below the background are only populated by RooFitUtils simultaneous fits; everything else leaves them at their sentinel defaults, flagged by has_fit_diagnostics.

Definition at line 200 of file FittingUtils.hpp.

Member Data Documentation

◆ bkg_constant

◆ bkg_constant_error

◆ cov_qual

Int_t FitResult::cov_qual = -999

Covariance quality: 0 Exact, 1 NotPositiveDefinite, 2 Approximate, 3 External.

Anything but 0 means the errors are unreliable.

Definition at line 217 of file FittingUtils.hpp.

Referenced by RooFitUtils::FitSimultaneous().

◆ edm

Double_t FitResult::edm = -1

Estimated distance to the minimum.

Definition at line 218 of file FittingUtils.hpp.

Referenced by RooFitUtils::FitSimultaneous().

◆ fit_status

Int_t FitResult::fit_status = -999

Minuit migrad status; 0 means success.

Definition at line 214 of file FittingUtils.hpp.

Referenced by RooFitUtils::FitSimultaneous().

◆ has_fit_diagnostics

Bool_t FitResult::has_fit_diagnostics = kFALSE

Whether a RooFitResult was available, and hence whether the fields in this group mean anything.

Definition at line 222 of file FittingUtils.hpp.

Referenced by RooFitUtils::FitSimultaneous().

◆ lin_bkg_slope

◆ lin_bkg_slope_error

◆ min_nll

Double_t FitResult::min_nll = -1

Minimised negative log-likelihood.

Definition at line 219 of file FittingUtils.hpp.

Referenced by RooFitUtils::FitSimultaneous().

◆ n_invalid_nll

Int_t FitResult::n_invalid_nll = -1

Invalid NLL evaluations; -1 if unknown.

Definition at line 223 of file FittingUtils.hpp.

◆ parameter_diagnostics

std::vector<FitParameterDiagnostic> FitResult::parameter_diagnostics

One entry per fitted RooRealVar, peak and background alike.

Definition at line 225 of file FittingUtils.hpp.

Referenced by RooFitUtils::FitSimultaneous().

◆ peaks

◆ reduced_chi2

◆ valid

Bool_t FitResult::valid = kFALSE

In the RooFit backend this is computed post hoc against the display binning, and drives component pruning; the fit itself is unbinned.

Whether the fit succeeded. Check this first.

Definition at line 207 of file FittingUtils.hpp.

Referenced by FittingUtils::FitDoublePeak(), FittingUtils::FitDoublePeak(), RooFitUtils::FitDoublePeak(), RooFitUtils::FitDoublePeak(), RooFitUtils::FitSimultaneous(), FittingUtils::FitSinglePeak(), RooFitUtils::FitSinglePeak(), FittingUtils::FitTriplePeak(), and RooFitUtils::FitTriplePeak().


The documentation for this struct was generated from the following file: