Perform MINUIT fits in one or two dimensions. More...
#include <Fit.h>
Classes | |
struct | SeedPt |
Public Types | |
enum | Verbosity { kQuiet, kVerbose } |
enum | Precision { kFast = 0, kNormal = 1, kCareful = 2, kGradDesc = 3, kAlgoMask = 3, kIncludeSimplex = 4, kIncludeHesse = 8, kIncludeMinos = 16 } |
Public Member Functions | |
void | SetPrecision (Precision prec) |
Fitter (const IExperiment *expt, std::vector< const IFitVar * > vars, std::vector< const ISyst * > systs={}, Precision prec=kNormal) | |
double | Fit (osc::IOscCalcAdjustable *seed, SystShifts &bestSysts=junkShifts, const std::map< const IFitVar *, std::vector< double >> &seedPts={}, const std::vector< SystShifts > &systSeedPts={}, Verbosity verb=kVerbose) const |
double | Fit (osc::IOscCalcAdjustable *seed, SystShifts &systSeed, Verbosity verb) const |
Variant with no seedPts. More... | |
double | Fit (osc::IOscCalcAdjustable *seed, Verbosity verb) const |
Variant with no seedPts and no systematics result returned. More... | |
double | Fit (SystShifts &systSeed, Verbosity verb=kVerbose) const |
Variant with no oscillations - useful for ND fits. More... | |
TMatrixDSym * | GetCovariance () |
Return the fit covariance. More... | |
int | GetCovarianceStatus () |
covariance matrix status (0 = not valid, 1 approximate, 2, full but made pos def, 3 accurate and not pos def) More... | |
std::vector< std::string > | GetParamNames () |
Return the fit names. More... | |
std::vector< double > | GetPreFitValues () |
Return the prefit values. More... | |
std::vector< double > | GetPreFitErrors () |
Return the prefit errors. More... | |
std::vector< double > | GetPostFitValues () |
Return the postfit values. More... | |
std::vector< double > | GetPostFitErrors () |
Return the postfit errors. More... | |
std::vector< std::pair< double, double > > | GetMinosErrors () |
Return the minos errors. More... | |
int | GetNFCN () |
Return number of function calls. More... | |
double | GetEDM () |
Return edm form the fit. More... | |
bool | GetIsValid () |
Say whether the fit was good. More... | |
SystShifts | GetSystShifts () const |
virtual double | DoEval (const double *pars) const override |
Evaluate the log-likelihood, as required by MINUT interface. More... | |
virtual unsigned int | NDim () const override |
Fitter * | Clone () const override |
Protected Member Functions | |
std::vector< SeedPt > | ExpandSeeds (const std::map< const IFitVar *, std::vector< double >> &seedPts, std::vector< SystShifts > systSeedPts) const |
std::unique_ptr < ROOT::Math::Minimizer > | FitHelperSeeded (osc::IOscCalcAdjustable *seed, SystShifts &systSeed, Verbosity verb) const |
Helper for FitHelper. More... | |
double | FitHelper (osc::IOscCalcAdjustable *seed, SystShifts &bestSysts, const std::map< const IFitVar *, std::vector< double >> &seedPts, std::vector< SystShifts > systSeedPts, Verbosity verb) const |
Helper for Fit. More... | |
void | DecodePars (const double *pars) const |
Updates mutable fCalc and fShifts. More... | |
Protected Attributes | |
const IExperiment * | fExpt |
std::vector< const IFitVar * > | fVars |
std::vector< const ISyst * > | fSysts |
Precision | fPrec = kNormal |
osc::IOscCalcAdjustable * | fCalc |
SystShifts | fShifts |
int | fNEval = 0 |
int | fNEvalGrad = 0 |
int | fNEvalFiniteDiff = 0 |
double | fEdm = -1 |
bool | fIsValid = false |
TMatrixDSym * | fCovar |
bool | fCovarStatus |
std::vector< std::string > | fParamNames |
std::vector< double > | fPreFitValues |
std::vector< double > | fPreFitErrors |
std::vector< double > | fPostFitValues |
std::vector< double > | fPostFitErrors |
std::vector< std::pair< double, double > > | fMinosErrors |
std::vector< std::pair< double, double > > | fTempMinosErrors |
Enumerator | |
---|---|
kFast | |
kNormal | |
kCareful | |
kGradDesc | |
kAlgoMask | |
kIncludeSimplex | |
kIncludeHesse | |
kIncludeMinos |
ana::Fitter::Fitter | ( | const IExperiment * | expt, |
std::vector< const IFitVar * > | vars, | ||
std::vector< const ISyst * > | systs = {} , |
||
Precision | prec = kNormal |
||
) |
|
protected |
Updates mutable fCalc and fShifts.
Definition at line 338 of file Fit.cxx.
|
overridevirtual |
Evaluate the log-likelihood, as required by MINUT interface.
Definition at line 365 of file Fit.cxx.
|
protected |
Definition at line 64 of file Fit.cxx.
double ana::Fitter::Fit | ( | osc::IOscCalcAdjustable * | seed, |
SystShifts & | bestSysts = junkShifts , |
||
const std::map< const IFitVar *, std::vector< double >> & | seedPts = {} , |
||
const std::vector< SystShifts > & | systSeedPts = {} , |
||
Verbosity | verb = kVerbose |
||
) | const |
[out] | seed | Seed parameter and output best-fit point |
[out] | bestSysts | Best systematics result returned here |
seedPts | Set each var to each of the values. Try all combinations. Beware of combinatorical explosion... | |
systSeedPts | If non-empty, try fit starting at each of these | |
verb | If quiet, no printout |
Definition at line 276 of file Fit.cxx.
|
inline |
Variant with no seedPts.
Definition at line 79 of file Fit.h.
|
inline |
Variant with no seedPts and no systematics result returned.
Definition at line 87 of file Fit.h.
|
inline |
Variant with no oscillations - useful for ND fits.
Definition at line 94 of file Fit.h.
|
protected |
Helper for Fit.
Definition at line 176 of file Fit.cxx.
|
protected |
Helper for FitHelper.
Definition at line 102 of file Fit.cxx.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |