17#ifdef XROOFIT_USE_PRAGMA_ONCE
20#if (!defined(XROOFIT_USE_PRAGMA_ONCE) && !defined(XROOFIT_XROOFIT_H)) || \
21 (defined(XROOFIT_USE_PRAGMA_ONCE) && !defined(XROOFIT_XROOFIT_H_XROOFIT))
22#ifndef XROOFIT_USE_PRAGMA_ONCE
23#define XROOFIT_XROOFIT_H
25#define XROOFIT_XROOFIT_H_XROOFIT
71 static constexpr double OBS = std::numeric_limits<double>::quiet_NaN();
74 static std::pair<double, double>
matchPrecision(
const std::pair<double, double> &in);
83 static std::pair<std::shared_ptr<RooAbsData>, std::shared_ptr<const RooAbsCollection>>
85 static std::shared_ptr<const RooFitResult>
86 fitTo(
RooAbsPdf &pdf,
const std::pair<std::shared_ptr<RooAbsData>, std::shared_ptr<const RooAbsCollection>> &data,
89 const std::pair<RooAbsData *, const RooAbsCollection *> &data,
92 static xRooNLLVar createNLL(
const std::shared_ptr<RooAbsPdf> pdf,
const std::shared_ptr<RooAbsData> data,
108 const std::shared_ptr<ROOT::Fit::FitConfig> &fitConfig =
nullptr,
109 const std::shared_ptr<RooLinkedList> &nllOpts =
nullptr);
111 const std::shared_ptr<ROOT::Fit::FitConfig> &_fitConfig =
nullptr);
121 std::shared_ptr<RooFitResult>
fr;
161 std::vector<std::pair<double, int>> out;
165 out.emplace_back(std::make_pair(mu, 0));
167 out.emplace_back(std::make_pair(-std::numeric_limits<double>::infinity(), 0));
168 out.emplace_back(std::make_pair(mu, 1));
170 out.emplace_back(std::make_pair(-std::numeric_limits<double>::infinity(), 0));
171 out.emplace_back(std::make_pair(-mu, 1));
172 out.emplace_back(std::make_pair(mu, 0));
174 out.emplace_back(std::make_pair(-std::numeric_limits<double>::infinity(), -1));
175 out.emplace_back(std::make_pair(mu, 1));
177 throw std::runtime_error(
"Unknown PLL Type");
183 static double k(
const IncompatFunc &compatRegions,
double pValue,
double poiVal,
double poiPrimeVal,
184 double sigma_mu = 0,
double mu_low = -std::numeric_limits<double>::infinity(),
185 double mu_high = std::numeric_limits<double>::infinity());
187 static double k(
const PLLType &pllType,
double pValue,
double mu,
double mu_prime,
double sigma_mu = 0,
188 double mu_low = -std::numeric_limits<double>::infinity(),
189 double mu_high = std::numeric_limits<double>::infinity())
195 static double PValue(
const IncompatFunc &compatRegions,
double k,
double mu,
double mu_prime,
double sigma_mu = 0,
196 double mu_low = -std::numeric_limits<double>::infinity(),
197 double mu_high = std::numeric_limits<double>::infinity());
199 static double PValue(
const PLLType &pllType,
double k,
double mu,
double mu_prime,
double sigma_mu = 0,
200 double mu_low = -std::numeric_limits<double>::infinity(),
201 double mu_high = std::numeric_limits<double>::infinity())
206 static double Phi_m(
double mu,
double mu_prime,
double a,
double sigma,
const IncompatFunc &compatRegions);
208 static int CompatFactor(
const IncompatFunc &func,
double mu_hat);
#define ClassDefOverride(name, id)
static double k(const IncompatFunc &compatRegions, double pValue, double poiVal, double poiPrimeVal, double sigma_mu=0, double mu_low=-std::numeric_limits< double >::infinity(), double mu_high=std::numeric_limits< double >::infinity())
static double PValue(const PLLType &pllType, double k, double mu, double mu_prime, double sigma_mu=0, double mu_low=-std::numeric_limits< double >::infinity(), double mu_high=std::numeric_limits< double >::infinity())
static int CompatFactor(int type, double mu, double mu_hat)
static IncompatFunc IncompatibilityFunction(const PLLType &type, double mu)
static double PValue(const IncompatFunc &compatRegions, double k, double mu, double mu_prime, double sigma_mu=0, double mu_low=-std::numeric_limits< double >::infinity(), double mu_high=std::numeric_limits< double >::infinity())
std::vector< std::pair< double, int > > IncompatFunc
static double k(const PLLType &pllType, double pValue, double mu, double mu_prime, double sigma_mu=0, double mu_low=-std::numeric_limits< double >::infinity(), double mu_high=std::numeric_limits< double >::infinity())
static int CompatFactor(const IncompatFunc &func, double mu_hat)
StoredFitResult(RooFitResult *_fr)
std::shared_ptr< RooFitResult > fr
!
static std::shared_ptr< ROOT::Fit::FitConfig > defaultFitConfig()
static RooCmdArg Tolerance(double value)
static const char * GetVersionDate()
static TCanvas * hypoTest(RooWorkspace &w, const xRooFit::Asymptotics::PLLType &pllType=xRooFit::Asymptotics::Unknown)
static const char * GetVersion()
static RooCmdArg MaxIterations(int nIterations)
static std::shared_ptr< ROOT::Fit::FitConfig > sDefaultFitConfig
static RooCmdArg StrategySequence(const char *stratSeq)
static std::shared_ptr< const RooFitResult > fitTo(RooAbsPdf &pdf, const std::pair< std::shared_ptr< RooAbsData >, std::shared_ptr< const RooAbsCollection > > &data, const RooLinkedList &nllOpts, const ROOT::Fit::FitConfig &fitConf)
static std::shared_ptr< ROOT::Fit::FitConfig > createFitConfig()
static std::shared_ptr< RooLinkedList > defaultNLLOptions()
static constexpr double OBS
static RooCmdArg ReuseNLL(bool flag)
static int minos(RooAbsReal &nll, const RooFitResult &ufit, const char *parName="", const std::shared_ptr< ROOT::Fit::FitConfig > &_fitConfig=nullptr)
static xRooNLLVar createNLL(const std::shared_ptr< RooAbsPdf > pdf, const std::shared_ptr< RooAbsData > data, const RooLinkedList &nllOpts)
static ROOT::Math::IOptions * defaultFitConfigOptions()
static std::shared_ptr< const RooFitResult > minimize(RooAbsReal &nll, const std::shared_ptr< ROOT::Fit::FitConfig > &fitConfig=nullptr, const std::shared_ptr< RooLinkedList > &nllOpts=nullptr)
static std::shared_ptr< RooLinkedList > sDefaultNLLOptions
static std::shared_ptr< RooLinkedList > createNLLOptions()
static std::pair< double, double > matchPrecision(const std::pair< double, double > &in)
static std::pair< std::shared_ptr< RooAbsData >, std::shared_ptr< const RooAbsCollection > > generateFrom(RooAbsPdf &pdf, const RooFitResult &fr, bool expected=false, int seed=0)
This xRooNLLVar object has several special methods, e.g.
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::Pa...
Generic interface for defining configuration options of a numerical algorithm.
Abstract container object that can hold multiple RooAbsArg objects.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
Named container for two doubles, two integers two object points and three string pointers that can be...
static const RooCmdArg & none()
Return reference to null argument.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Persistable container for RooFit projects.
#define BEGIN_XROOFIT_NAMESPACE
#define END_XROOFIT_NAMESPACE