18#ifdef XROOFIT_USE_PRAGMA_ONCE
21#if !defined(XROOFIT_XROOFIT_H) || defined(XROOFIT_USE_PRAGMA_ONCE)
22#ifndef XROOFIT_USE_PRAGMA_ONCE
23#define XROOFIT_XROOFIT_H
64 static std::pair<std::shared_ptr<RooAbsData>, std::shared_ptr<const RooAbsCollection>>
65 generateFrom(
RooAbsPdf &pdf,
const std::shared_ptr<const RooFitResult> &fr,
bool expected =
false,
int seed = 0);
66 static std::shared_ptr<const RooFitResult>
67 fitTo(
RooAbsPdf &pdf,
const std::pair<std::shared_ptr<RooAbsData>, std::shared_ptr<const RooAbsCollection>> &
data,
69 static std::shared_ptr<const RooFitResult> fitTo(
RooAbsPdf &pdf,
70 const std::pair<RooAbsData *, const RooAbsCollection *> &
data,
73 static xRooNLLVar createNLL(
const std::shared_ptr<RooAbsPdf> pdf,
const std::shared_ptr<RooAbsData>
data,
82 static std::shared_ptr<ROOT::Fit::FitConfig> createFitConfig();
83 static std::shared_ptr<RooLinkedList> createNLLOptions();
85 static std::shared_ptr<const RooFitResult>
86 minimize(
RooAbsReal &nll,
const std::shared_ptr<ROOT::Fit::FitConfig> &fitConfig =
nullptr);
88 const std::shared_ptr<ROOT::Fit::FitConfig> &_fitConfig =
nullptr);
110 std::vector<std::pair<double, int>> out;
111 if (
type == TwoSided) {
113 }
else if (
type == OneSidedPositive) {
114 out.emplace_back(std::make_pair(mu, 0));
115 }
else if (
type == OneSidedNegative) {
116 out.emplace_back(std::make_pair(-std::numeric_limits<double>::infinity(), 0));
117 out.emplace_back(std::make_pair(mu, 1));
118 }
else if (
type == OneSidedAbsolute) {
119 out.emplace_back(std::make_pair(-std::numeric_limits<double>::infinity(), 0));
120 out.emplace_back(std::make_pair(-mu, 1));
121 out.emplace_back(std::make_pair(mu, 0));
122 }
else if (
type == Uncapped) {
123 out.emplace_back(std::make_pair(-std::numeric_limits<double>::infinity(), -1));
124 out.emplace_back(std::make_pair(mu, 1));
126 throw std::runtime_error(
"Unknown PLL Type");
133 double sigma_mu = 0,
double mu_low = -std::numeric_limits<double>::infinity(),
134 double mu_high = std::numeric_limits<double>::infinity());
136 static Double_t k(
const PLLType &pllType,
double pValue,
double mu,
double mu_prime,
double sigma_mu = 0,
137 double mu_low = -std::numeric_limits<double>::infinity(),
138 double mu_high = std::numeric_limits<double>::infinity())
140 return k(IncompatibilityFunction(pllType, mu), pValue, mu, mu_prime, sigma_mu, mu_low, mu_high);
145 double sigma_mu = 0,
double mu_low = -std::numeric_limits<double>::infinity(),
146 double mu_high = std::numeric_limits<double>::infinity());
149 double mu_low = -std::numeric_limits<double>::infinity(),
150 double mu_high = std::numeric_limits<double>::infinity())
152 return PValue(IncompatibilityFunction(pllType, mu), k, mu, mu_prime, sigma_mu, mu_low, mu_high);
155 static Double_t Phi_m(
double mu,
double mu_prime,
double a,
double sigma,
const IncompatFunc &compatRegions);
157 static int CompatFactor(
const IncompatFunc &func,
double mu_hat);
161 return CompatFactor(IncompatibilityFunction((
PLLType)
type, mu), mu_hat);
176 return hypoTest(
w, 0, 0, pllType);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::Pa...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
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.
std::vector< std::pair< double, int > > IncompatFunc
static Double_t 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_t 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())
static IncompatFunc IncompatibilityFunction(const PLLType &type, double mu)
static Double_t 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 Double_t 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 TCanvas * hypoTest(RooWorkspace &w, const xRooFit::Asymptotics::PLLType &pllType=xRooFit::Asymptotics::Unknown)
static TCanvas * hypoTest(RooWorkspace &w, int nToysNull, int nToysAlt, const xRooFit::Asymptotics::PLLType &pllType=xRooFit::Asymptotics::Unknown)
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
The RooWorkspace is a persistable container for RooFit projects.
#define BEGIN_XROOFIT_NAMESPACE
#define END_XROOFIT_NAMESPACE