Log-likelihood scan across two parameters. More...
Public Member Functions | |
FrequentistSurface (const IExperiment *expt, osc::IOscCalcAdjustable *calc, const FitAxis &xax, const FitAxis &yax, const std::vector< const IFitVar * > &profVars={}, const std::vector< const ISyst * > &profSysts={}, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systSeedPts={}, bool parallel=false, MinuitFitter::FitOpts opts=MinuitFitter::kNormal) | |
FrequentistSurface (const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *xvar, int nbinsx, double xmin, double xmax, const IFitVar *yvar, int nbinsy, double ymin, double ymax, const std::vector< const IFitVar * > &profVars={}, const std::vector< const ISyst * > &profSysts={}, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systSeedPts={}, bool parallel=false, MinuitFitter::FitOpts opts=MinuitFitter::kNormal) | |
virtual | ~FrequentistSurface () |
std::vector< TH2 * > | GetProfiledHists () |
Maps of the values taken on by the profiled parameters. More... | |
void | SaveTo (TDirectory *dir, const std::string &name) const |
double | BestLikelihood () const |
double | GetBestFitX () const |
double | GetBestFitY () const |
void | Draw () const |
Draw the surface itself. More... | |
void | DrawBestFit (Color_t color, Int_t marker=kFullCircle) const |
Draw the best fit point. More... | |
void | DrawContour (TH2 *fc, Style_t style, Color_t color, double minchi=-1) |
std::vector< TGraph * > | GetGraphs (TH2 *fc, double minchi=-1) |
For expert use, custom painting of contours. More... | |
TH2 * | ToTH2 (double minchi=-1) const |
void | SetTitle (const char *str) |
Static Public Member Functions | |
static std::unique_ptr< FrequentistSurface > | LoadFrom (TDirectory *dir, const std::string &name) |
static std::unique_ptr< FrequentistSurface > | LoadFromMulti (std::vector< TFile * > files, std::string label) |
static std::unique_ptr< FrequentistSurface > | LoadFromMulti (std::string wildcard, std::string label) |
Protected Member Functions | |
FrequentistSurface () | |
void | CreateHistograms (const FitAxis &xax, const FitAxis &yax, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts) |
std::string | ProgressBarTitle (const IFitVar *xvar, const IFitVar *yvar, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts) const |
virtual void | FillSurface (const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *xvar, const IFitVar *yvar, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts) |
double | FillSurfacePoint (const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *xvar, double x, const IFitVar *yvar, double y, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts) |
void | FindMinimum (const IExperiment *expt, osc::IOscCalcAdjustable *calc, const IFitVar *xvar, const IFitVar *yvar, const std::vector< const IFitVar * > &profVars, const std::vector< const ISyst * > &profSysts, const SeedList &seedPts, const std::vector< SystShifts > &systSeedPts) |
double | BinCenterX (int bin) const |
double | BinCenterY (int bin) const |
void | SaveToHelper (TDirectory *dir) const |
dir should already be the appropriate sub-directory More... | |
void | EnsureAxes () const |
void | CheckMask (const std::string &func) const |
Static Protected Member Functions | |
static void | FillSurfObj (ISurface &surf, TDirectory *dir) |
Protected Attributes | |
bool | fParallel |
MinuitFitter::FitOpts | fFitOpts |
std::vector< TH2 * > | fProfHists |
double | fBestLikelihood |
double | fBestFitX |
double | fBestFitY |
TH2F * | fHist |
bool | fLogX |
bool | fLogY |
std::vector< double > | fSeedValues |
std::vector< int > | fBinMask |
Log-likelihood scan across two parameters.
Definition at line 27 of file FrequentistSurface.h.
ana::FrequentistSurface::FrequentistSurface | ( | const IExperiment * | expt, |
osc::IOscCalcAdjustable * | calc, | ||
const FitAxis & | xax, | ||
const FitAxis & | yax, | ||
const std::vector< const IFitVar * > & | profVars = {} , |
||
const std::vector< const ISyst * > & | profSysts = {} , |
||
const SeedList & | seedPts = SeedList() , |
||
const std::vector< SystShifts > & | systSeedPts = {} , |
||
bool | parallel = false , |
||
MinuitFitter::FitOpts | opts = MinuitFitter::kNormal |
||
) |
expt | The experiment object to draw ![]() |
calc | Values for oscillation parameters to be held fixed |
xax | Definition of the x-axis |
yax | Definition of the y-axis |
profVars | Oscillation parameters to profile over |
profSysts | Systematic parameters to profile over |
seedPts | Try all combinations of these params as seeds |
systSeedPts | Try all of these systematic combinations as seeds |
parallel | Use all the cores on this machine? Be careful... |
Definition at line 32 of file FrequentistSurface.cxx.
References CreateHistograms(), FillSurface(), FindMinimum(), ana::ISurface::fLogX, ana::ISurface::fLogY, ana::ISurface::fSeedValues, ana::FitAxis::islog, registry_explorer::v, and ana::FitAxis::var.
|
inline |
expt | The experiment object to draw ![]() |
calc | Values for oscillation parameters to be held fixed |
xvar | Oscillation parameter to place on the x axis |
nbinsx | Number of bins along x axis |
xmin | Minimum value of x axis |
xmax | Maximum value of x axis |
nbinsy | Number of bins along y axis |
ymin | Minimum value of y axis |
ymax | Maximum value of y axis |
profVars | Oscillation parameters to profile over |
profSysts | Systematic parameters to profile over |
seedPts | Try all combinations of these params as seeds |
systSeedPts | Try all of these systematic combinations as seeds |
parallel | Use all the cores on this machine? Be careful... |
Definition at line 63 of file FrequentistSurface.h.
References FrequentistSurface(), ana::MinuitFitter::kNormal, plot_validation_datamc::opts, and ~FrequentistSurface().
|
virtual |
Definition at line 57 of file FrequentistSurface.cxx.
References CreateHistograms().
Referenced by FrequentistSurface().
|
inlineprotected |
Definition at line 91 of file FrequentistSurface.h.
References CreateHistograms(), FillSurface(), FillSurfacePoint(), FindMinimum(), ProgressBarTitle(), string, submit_syst::x, and submit_syst::y.
Referenced by FrequentistSurface().
|
inlineinherited |
|
protectedinherited |
Definition at line 265 of file ISurface.cxx.
References visualisationForPaperMasterPlot::ax, ana::ISurface::fHist, and ana::ISurface::fLogX.
Referenced by ana::BayesianSurface::BuildHist(), ana::ISurface::EnsureAxes(), FillSurface(), FindMinimum(), and ana::ISurface::GetBestFitY().
|
protectedinherited |
Definition at line 272 of file ISurface.cxx.
References visualisationForPaperMasterPlot::ax, ana::ISurface::fHist, and ana::ISurface::fLogY.
Referenced by ana::BayesianSurface::BuildHist(), ana::ISurface::EnsureAxes(), FillSurface(), FindMinimum(), and ana::ISurface::GetBestFitY().
|
protectedinherited |
Definition at line 279 of file ISurface.cxx.
References om::cout, allTimeWatchdog::endl, and ana::ISurface::fBinMask.
Referenced by ana::ISurface::DrawBestFit(), ana::ISurface::DrawContour(), and ana::ISurface::GetGraphs().
|
protected |
Definition at line 63 of file FrequentistSurface.cxx.
References ana::ExpandedHistogram(), ana::ISurface::fHist, fProfHists, MECModelEnuComparisons::i, ana::FitAxis::islog, ana::IFitVar::LatexName(), ana::FitAxis::max, ana::FitAxis::min, ana::FitAxis::nbins, ProgressBarTitle(), string, plotROC::title, and ana::FitAxis::var.
Referenced by FrequentistSurface(), and ~FrequentistSurface().
|
inherited |
Draw the surface itself.
Definition at line 21 of file ISurface.cxx.
References ana::ISurface::EnsureAxes(), and ana::ISurface::fHist.
Referenced by cc(), demo5(), ana::ISurface::GetBestFitY(), modularextrap_demo_nue(), modularextrap_demo_numu(), Plot2DSlices(), plot_3flavor_withsysts(), test_ana(), test_stanfit_statsonly(), test_stanfit_withsysts(), and test_surf_stride().
|
inherited |
Draw the best fit point.
Definition at line 37 of file ISurface.cxx.
References ana::ISurface::CheckMask(), ana::ISurface::EnsureAxes(), ana::ISurface::fBestFitX, and ana::ISurface::fBestFitY.
Referenced by cc(), demo5(), demo_CPT(), drawSensitivity(), ana::ISurface::GetBestFitY(), getSensitivity(), make_contours(), modularextrap_demo_nue(), modularextrap_demo_numu(), Plot2DSlices(), plot_3flavor_withsysts(), starPlot(), syst_test(), template_basic(), template_GENIE_systs(), template_nonGENIE_systs(), test_ana(), test_stanfit_statsonly(), and test_stanfit_withsysts().
|
inherited |
fc | Surface to compare against for this significance level |
style | Line style for TAttLine, solid, dotted, dashed etc |
color | Line color for TAttLine |
minchi | ![]() |
Definition at line 50 of file ISurface.cxx.
References ana::ISurface::CheckMask(), ana::ISurface::EnsureAxes(), MECModelEnuComparisons::g, ana::ISurface::GetGraphs(), and APDGainPoints::gs.
Referenced by cc(), demo5(), Draw2DSurface(), DrawContours(), drawSensitivity(), ana::ISurface::GetBestFitY(), getSensitivity(), make_contours(), make_nom_expt(), modularextrap_demo_nue(), modularextrap_demo_numu(), Plot2DSlice(), Plot2DSlices(), plot_3flavor_withsysts(), plotContProf(), plots(), starPlot(), syst_test(), template_basic(), template_GENIE_systs(), template_nonGENIE_systs(), test_ana(), test_stanfit_statsonly(), and test_stanfit_withsysts().
|
protectedinherited |
Definition at line 70 of file ISurface.cxx.
References visualisationForPaperMasterPlot::ax, file_size_ana::axes, ana::ISurface::BinCenterX(), ana::ISurface::BinCenterY(), ana::ISurface::fHist, ana::ISurface::fLogX, ana::ISurface::fLogY, genie::utils::style::Format(), and ana::UniqueName().
Referenced by ana::ISurface::Draw(), ana::ISurface::DrawBestFit(), and ana::ISurface::DrawContour().
|
protectedvirtual |
Reimplemented in ana::SurfaceKrige.
Definition at line 108 of file FrequentistSurface.cxx.
References ana::ThreadPool::AddTask(), bin, ana::ISurface::BinCenterX(), ana::ISurface::BinCenterY(), om::cerr, ana::IExperiment::ChiSq(), ana::Progress::Done(), e, allTimeWatchdog::endl, ana::ISurface::fBinMask, ana::ISurface::fHist, FillSurfacePoint(), ana::ThreadPool::Finish(), genie::utils::style::Format(), fParallel, site_stats_from_log::job, ana::JobNumber(), ana::ThreadPool::NThreads(), ana::NumJobs(), ana::IFitVar::Penalty(), time_estimates::pool, cacheDefinitionData::prog, ProgressBarTitle(), ana::RunningOnGrid(), ana::Progress::SetProgress(), ana::IFitVar::ShortName(), ana::ThreadPool::ShowProgress(), fillBadChanDBTables::step, update_sam_good_runs_metadata::stride, string, submit_syst::x, and submit_syst::y.
Referenced by FrequentistSurface().
|
protected |
Definition at line 227 of file FrequentistSurface.cxx.
References calc, ana::IExperiment::ChiSq(), osc::_IOscCalcAdjustable< T >::Copy(), fFitOpts, ana::ISurface::fHist, ana::IFitter::Fit(), fParallel, fProfHists, ana::ISurface::fSeedValues, ana::SystShifts::GetShift(), MECModelEnuComparisons::i, makeTrainCVSamples::int, calib::j, ana::IFitter::kQuiet, ana::MinuitFitter::SetFitOpts(), and ana::IFitVar::SetValue().
Referenced by FillSurface(), and FrequentistSurface().
Definition at line 229 of file ISurface.cxx.
References ana::ISurface::fBestFitX, ana::ISurface::fBestFitY, ana::ISurface::fBestLikelihood, ana::ISurface::fBinMask, ana::ISurface::fHist, ana::ISurface::fSeedValues, compare_h5_caf::idx, m, and registry_explorer::v.
Referenced by ana::ISurface::GetBestFitY(), ana::BayesianSurface::LoadFrom(), and LoadFrom().
|
protected |
Definition at line 275 of file FrequentistSurface.cxx.
References bin, ana::ISurface::BinCenterX(), ana::ISurface::BinCenterY(), confusionMatrixTree::count, ana::ISurface::fBestFitX, ana::ISurface::fBestFitY, ana::ISurface::fBestLikelihood, ana::ISurface::fBinMask, fFitOpts, ana::ISurface::fHist, ana::IFitter::Fit(), ana::ISurface::fSeedValues, ana::IFitVar::GetValue(), MECModelEnuComparisons::i, makeTrainCVSamples::int, ana::SystShifts::Nominal(), ana::NumJobs(), ana::RunningOnGrid(), ana::MinuitFitter::SetFitOpts(), ana::IFitVar::SetValue(), submit_syst::x, and submit_syst::y.
Referenced by FrequentistSurface().
|
inlineinherited |
Definition at line 30 of file ISurface.h.
References ana::ISurface::fBestFitX.
Referenced by test_stanfit_statsonly().
|
inlineinherited |
Definition at line 31 of file ISurface.h.
References bin, ana::ISurface::BinCenterX(), ana::ISurface::BinCenterY(), plot_validation_datamc_2018::color, dir, ana::ISurface::Draw(), ana::ISurface::DrawBestFit(), ana::ISurface::DrawContour(), ana::ISurface::fBestFitY, ana::ISurface::FillSurfObj(), ana::ISurface::Flat, ana::ISurface::GetGraphs(), ana::ISurface::SaveToHelper(), ana::ISurface::SetTitle(), submit_syst::str, demo5::surf, and ana::ISurface::ToTH2().
Referenced by test_stanfit_statsonly().
|
inherited |
For expert use, custom painting of contours.
Definition at line 113 of file ISurface.cxx.
References ana::ISurface::CheckMask(), ana::ISurface::fBestLikelihood, ana::ISurface::fHist, runNovaSAM::ret, PandAna.Demos.tute_pid_validation::specs, demo5::surf, tmp, and ana::UniqueName().
Referenced by ana::ISurface::DrawContour(), and ana::ISurface::GetBestFitY().
|
inline |
Maps of the values taken on by the profiled parameters.
Definition at line 83 of file FrequentistSurface.h.
References dir, compareCafs::files, fProfHists, label, LoadFrom(), LoadFromMulti(), SaveTo(), string, and wildcard().
Referenced by run_joint_fit_2020_contours().
|
static |
Definition at line 350 of file FrequentistSurface.cxx.
References ana::assert(), dir, ana::ISurface::FillSurfObj(), genie::utils::style::Format(), make_syst_table_plots::h, compare_h5_caf::idx, logx, logy, demo5::surf, and getGoodRuns4SAM::tag.
Referenced by compare_fits(), demoFitContours(), DrawExtrapSurface(), GetProfiledHists(), joint_fit_2018_contours(), joint_fit_2019_contours(), LoadFromMulti(), median_contours(), plot_joint_fit_2020_contours(), Plotting_CompareMultipleContours(), sensitivity2018(), and sensitivity2020().
|
static |
Definition at line 387 of file FrequentistSurface.cxx.
References ana::assert(), bin, confusionMatrixTree::count, om::cout, allTimeWatchdog::endl, MakeMiniprodValidationCuts::f, ana::ISurface::fBestLikelihood, ana::ISurface::fBinMask, fProfHists, make_syst_table_plots::h, MECModelEnuComparisons::i, calib::j, LoadFrom(), nbins, runNovaSAM::ret, ana::ISurface::ToTH2(), submit_syst::x, and submit_syst::y.
Referenced by GetProfiledHists(), LoadFromMulti(), MergeSurface(), MergeSurfaces(), and test_surf_stride().
|
static |
Definition at line 454 of file FrequentistSurface.cxx.
References MakeMiniprodValidationCuts::f, plotROC::fileName, compareCafs::files, LoadFromMulti(), runNovaSAM::ret, string, and ana::Wildcard().
|
protected |
Definition at line 87 of file FrequentistSurface.cxx.
References ana::IFitVar::ShortName(), string, plotROC::title, and registry_explorer::v.
Referenced by CreateHistograms(), FillSurface(), and FrequentistSurface().
void ana::FrequentistSurface::SaveTo | ( | TDirectory * | dir, |
const std::string & | name | ||
) | const |
Definition at line 324 of file FrequentistSurface.cxx.
References dir, genie::utils::style::Format(), fProfHists, compare_h5_caf::idx, it, ana::ISurface::SaveToHelper(), and tmp.
Referenced by getContProf(), getContProf_Sensitivity(), GetProfiledHists(), joint_fit_future_contour_univ(), make_surfprof(), make_surfprof_sensitivity(), MakeExtrapSurface(), MakeSurface(), run_joint_fit_2020_contours(), sensitivity2018(), and sensitivity2020().
|
protectedinherited |
dir should already be the appropriate sub-directory
Definition at line 198 of file ISurface.cxx.
References ana::ISurface::fBestFitX, ana::ISurface::fBestFitY, ana::ISurface::fBestLikelihood, ana::ISurface::fBinMask, ana::ISurface::fHist, ana::ISurface::fLogX, ana::ISurface::fLogY, ana::ISurface::fSeedValues, m, tmp, and registry_explorer::v.
Referenced by ana::ISurface::GetBestFitY(), ana::BayesianSurface::SaveTo(), and SaveTo().
|
inherited |
Definition at line 192 of file ISurface.cxx.
References ana::ISurface::fHist.
Referenced by ana::ISurface::GetBestFitY(), and plots().
|
inherited |
Definition at line 170 of file ISurface.cxx.
References ana::ISurface::fBestLikelihood, ana::ISurface::fHist, runNovaSAM::ret, submit_syst::x, and submit_syst::y.
Referenced by CAF_makeCAFSensitivities_for_FNEX(), demoFitContours(), ana::ISurface::GetBestFitY(), joint_fit_2017_contours(), joint_fit_2018_contours(), joint_fit_2019_contours(), joint_fit_future_contour_univ(), LoadFromMulti(), MakeCAFSensitivities_for_FNEX(), Plot2DSlice(), Plot2DSlices(), plot_3flavor_withsysts(), run_joint_fit_2020_contours(), sensitivity2018(), sensitivity2020(), and test_stanfit_withsysts().
|
protectedinherited |
Definition at line 66 of file ISurface.h.
Referenced by ana::BayesianSurface::BuildHist(), ana::ISurface::DrawBestFit(), ana::ISurface::FillSurfObj(), FindMinimum(), ana::ISurface::GetBestFitX(), and ana::ISurface::SaveToHelper().
|
protectedinherited |
Definition at line 67 of file ISurface.h.
Referenced by ana::BayesianSurface::BuildHist(), ana::ISurface::DrawBestFit(), ana::ISurface::FillSurfObj(), FindMinimum(), ana::ISurface::GetBestFitY(), and ana::ISurface::SaveToHelper().
|
protectedinherited |
Definition at line 65 of file ISurface.h.
Referenced by ana::ISurface::BestLikelihood(), ana::BayesianSurface::BuildHist(), ana::ISurface::FillSurfObj(), FindMinimum(), ana::ISurface::GetGraphs(), LoadFromMulti(), ana::ISurface::SaveToHelper(), and ana::ISurface::ToTH2().
|
protectedinherited |
Definition at line 71 of file ISurface.h.
Referenced by ana::ISurface::CheckMask(), FillSurface(), ana::ISurface::FillSurfObj(), FindMinimum(), LoadFromMulti(), and ana::ISurface::SaveToHelper().
|
protected |
Definition at line 128 of file FrequentistSurface.h.
Referenced by FillSurfacePoint(), and FindMinimum().
|
protectedinherited |
Definition at line 68 of file ISurface.h.
Referenced by ana::ISurface::BinCenterX(), ana::ISurface::BinCenterY(), ana::BayesianSurface::BuildHist(), CreateHistograms(), ana::ISurface::Draw(), ana::ISurface::EnsureAxes(), FillSurface(), FillSurfacePoint(), ana::ISurface::FillSurfObj(), FindMinimum(), ana::Flat(), ana::ISurface::GetGraphs(), ana::BayesianSurface::QuantileSurface(), ana::ISurface::SaveToHelper(), ana::ISurface::SetTitle(), and ana::ISurface::ToTH2().
|
protectedinherited |
Definition at line 69 of file ISurface.h.
Referenced by ana::BayesianSurface::BayesianSurface(), ana::ISurface::BinCenterX(), ana::BayesianSurface::BuildHist(), ana::ISurface::EnsureAxes(), FrequentistSurface(), and ana::ISurface::SaveToHelper().
|
protectedinherited |
Definition at line 69 of file ISurface.h.
Referenced by ana::BayesianSurface::BayesianSurface(), ana::ISurface::BinCenterY(), ana::BayesianSurface::BuildHist(), ana::ISurface::EnsureAxes(), FrequentistSurface(), and ana::ISurface::SaveToHelper().
|
protected |
Definition at line 126 of file FrequentistSurface.h.
Referenced by FillSurface(), and FillSurfacePoint().
|
protected |
Definition at line 131 of file FrequentistSurface.h.
Referenced by CreateHistograms(), FillSurfacePoint(), GetProfiledHists(), LoadFromMulti(), and SaveTo().
|
protectedinherited |
Definition at line 70 of file ISurface.h.
Referenced by FillSurfacePoint(), ana::ISurface::FillSurfObj(), FindMinimum(), FrequentistSurface(), and ana::ISurface::SaveToHelper().