Base class for fitters. More...
#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-04-14/CAFAna/Fit/IFitter.h"
Classes | |
class | IFitSummary |
struct | SeedPt |
Public Types | |
enum | Verbosity { kQuiet, kVerbose } |
Public Member Functions | |
IFitter (const std::vector< const IFitVar * > &vars, const std::vector< const ISyst * > &systs={}) | |
IFitter (const IFitter &f) | |
virtual | ~IFitter () |
virtual std::unique_ptr< IFitSummary > | Fit (osc::IOscCalcAdjustable *seed, SystShifts &bestSysts=junkShifts, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systSeedPts={}, Verbosity verb=kVerbose) const |
Master fitting method. Depends on FitHelper and FitHelperSeeded. More... | |
virtual std::unique_ptr< IFitSummary > | Fit (osc::IOscCalcAdjustable *seed, SystShifts &systSeed, Verbosity verb) const |
Variant with no seedPts. More... | |
virtual std::unique_ptr< IFitSummary > | Fit (osc::IOscCalcAdjustable *seed, Verbosity verb) const |
Variant with no seedPts and no systematics result returned. More... | |
virtual std::unique_ptr< IFitSummary > | Fit (SystShifts &systSeed, Verbosity verb=kVerbose) const |
Variant with no oscillations - useful for ND fits. More... | |
std::unique_ptr< SystShifts > | GetSystShifts () const |
Protected Member Functions | |
std::vector< SeedPt > | ExpandSeeds (const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts) const |
virtual std::unique_ptr< IFitSummary > | FitHelperSeeded (osc::IOscCalcAdjustable *seed, SystShifts &systSeed, Verbosity verb) const =0 |
Helper for FitHelper – actually does fitting. Reimplement in derived classes. More... | |
virtual std::unique_ptr< IFitSummary > | FitHelper (osc::IOscCalcAdjustable *seed, SystShifts &bestSysts, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts, Verbosity verb) const |
Helper for Fit. More... | |
void | ValidateSeeds (osc::IOscCalcAdjustable *seed, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts) const |
Check that the seeds that were specified are compatible with the vars being fitted. More... | |
Protected Attributes | |
std::vector< const IFitVar * > | fVars |
std::vector< const ISyst * > | fSysts |
std::unique_ptr< SystShifts > | fShifts |
Verbosity | fVerb |
Static Protected Attributes | |
static SystShifts | junkShifts = SystShifts() |
Enumerator | |
---|---|
kQuiet | |
kVerbose |
Definition at line 22 of file IFitter.h.
ana::IFitter::IFitter | ( | const std::vector< const IFitVar * > & | vars, |
const std::vector< const ISyst * > & | systs = {} |
||
) |
Definition at line 21 of file IFitter.cxx.
ana::IFitter::IFitter | ( | const IFitter & | f | ) |
Definition at line 28 of file IFitter.cxx.
|
virtual |
Definition at line 35 of file IFitter.cxx.
|
protected |
Definition at line 46 of file IFitter.cxx.
References ana::SeedList::GetSeeds(), ana::SystShifts::Nominal(), gen_hdf5record::pt, runNovaSAM::ret, and seed.
Referenced by FitHelper().
|
virtual |
Master fitting method. Depends on FitHelper and FitHelperSeeded.
[out] | seed | Seed parameter and output best-fit point |
[out] | bestSysts | Best systematics result returned here |
seedPts | List of oscillation parameter seeds | |
systSeedPts | If non-empty, try fit starting at each of these | |
verb | If quiet, no printout |
Reimplemented in ana::StanFitter.
Definition at line 69 of file IFitter.cxx.
References om::cout, allTimeWatchdog::endl, FitHelper(), fSysts, fVars, fVerb, ana::SystShifts::GetShift(), kVerbose, registry_explorer::v, and ValidateSeeds().
Referenced by BlessedPlotsAna(), BlessedPlotsAnaByPeriod(), cc(), fake_future_data(), FCContour(), FCTutorial2020(), fill_col(), ana::FrequentistSurface::FillSurfacePoint(), ana::FrequentistSurface::FindMinimum(), ana::FindValley(), Fit(), ana::StanFitter::Fit(), ana::MinuitFitter::FitHelperSeeded(), getBestFit(), joint_fit_2017_contours(), joint_fit_2017_make_fc_slice(), joint_fit_2017_make_fc_surf(), joint_fit_2017_slices(), joint_fit_2018_contours(), joint_fit_2018_slices(), joint_fit_future_bestfit_univ(), joint_fit_future_contour_univ(), make_fc_mass_and_oct_nersc_2018(), make_fc_mh_nersc_2018(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_surfaces_2020(), make_fc_surfaces_2020_validation(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_nus17_fc_surfs(), make_nus_fc_surfs(), make_starplots(), MakeCAFSensitivities_for_FNEX(), numu_sig_nonmax(), plot_shifts(), PlotNus17Prediction(), ana::Profile(), reach_2018_dCPfractions(), ana::RefineSeeds(), run_joint_fit_2020_bestfit(), run_joint_fit_2020_contours(), run_joint_fit_2020_slices(), RunFitter(), sensitivity2018(), sensitivity2020(), starPlot(), syst_test(), and test_ana().
|
inlinevirtual |
Variant with no seedPts.
Definition at line 61 of file IFitter.h.
References Fit().
|
inlinevirtual |
Variant with no seedPts and no systematics result returned.
Definition at line 69 of file IFitter.h.
References Fit().
|
inlinevirtual |
Variant with no oscillations - useful for ND fits.
Definition at line 76 of file IFitter.h.
References Fit().
|
protectedvirtual |
Definition at line 117 of file IFitter.cxx.
References ana::assert(), ana::SystShifts::Copy(), osc::_IOscCalcAdjustable< T >::Copy(), ExpandSeeds(), FitHelperSeeded(), fShifts, fSysts, fVars, MECModelEnuComparisons::i, gen_hdf5record::pt, seed, ana::SystShifts::SetShift(), and registry_explorer::v.
Referenced by Fit().
|
protectedpure virtual |
Helper for FitHelper – actually does fitting. Reimplement in derived classes.
Implemented in ana::StanFitter, and ana::MinuitFitter.
Referenced by FitHelper().
|
inline |
|
protected |
Check that the seeds that were specified are compatible with the vars being fitted.
Definition at line 170 of file IFitter.cxx.
References ana::SeedList::ActiveFitVars(), om::cout, allTimeWatchdog::endl, fSysts, fVars, gen_hdf5record::pt, and registry_explorer::v.
Referenced by Fit().
|
mutableprotected |
Definition at line 116 of file IFitter.h.
Referenced by ana::MinuitFitter::DecodePars(), FitHelper(), ana::MinuitFitter::FitHelperSeeded(), ana::StanFitter::FitHelperSeeded(), GetSystShifts(), ana::StanFitter::log_prob(), ana::MinuitFitter::operator()(), and ana::StanFitter::TestGradients().
|
protected |
Definition at line 115 of file IFitter.h.
Referenced by ana::StanFitter::BuildInitContext(), ana::MinuitFitter::DecodePars(), Fit(), FitHelper(), ana::MinuitFitter::FitHelperSeeded(), ana::StanFitter::FitHelperSeeded(), ana::StanFitter::get_param_names(), ana::StanFitter::log_prob(), ana::MinuitFitter::operator()(), ana::MinuitFitter::SetFitOpts(), ana::StanFitter::transform_inits(), and ValidateSeeds().
|
protected |
Definition at line 114 of file IFitter.h.
Referenced by ana::StanFitter::BuildInitContext(), ana::MinuitFitter::DecodePars(), Fit(), FitHelper(), ana::MinuitFitter::FitHelperSeeded(), ana::StanFitter::FitHelperSeeded(), ana::StanFitter::get_param_names(), ana::StanFitter::log_prob(), ana::MinuitFitter::operator()(), ana::StanFitter::transform_inits(), ValidateSeeds(), and ana::StanFitter::write_array().
|
mutableprotected |
Definition at line 117 of file IFitter.h.
Referenced by Fit(), and ana::MinuitFitter::FitHelperSeeded().
|
staticprotected |