79   fMaxDegree(10), fMaxCorrection(100), fTolerance(
tolerance){
 
 
   95  if (!
x || !nominal || !
data) {
 
   96     std::cout << 
"Error:  wrong name for pdf or variable or dataset - return -1 " << std::endl;
 
  100  std::cout << 
"BernsteinCorrection::ImportCorrectedPdf -  Doing initial Fit with nominal model " << std::endl;
 
  109     std::cout << 
"BernsteinCorrection::ImportCorrectedPdf  - Error fit with nominal model failed - exit" << std::endl;
 
  114  std::stringstream log;
 
  115  log << 
"------ Begin Bernstein Correction Log --------" << std::endl;
 
  129    std::stringstream str;
 
  133         "Bernstein basis poly coefficient",
 
  136    coefficients.push_back(
newCoef);
 
  153    if (
result->status() != 0) {
 
  154       std::cout << 
"BernsteinCorrection::ImportCorrectedPdf  - Error fit with corrected model failed" << std::endl;
 
  179      log << 
"degree = " << degree
 
  180     << 
" -log L("<<degree-1<<
") = " << 
lastNll 
  181     << 
" -log L(" << degree <<
") = " << 
result->minNll()
 
  183     << 
" P(chi^2_1 > q) = " << 
TMath::Prob(
q,1) << std::endl;
 
  190  log << 
"------ End Bernstein Correction Log --------" << std::endl;
 
  191  std::cout << log.str();
 
 
  213  if (!
x || !nominal || !
data) {
 
  214     std::cout << 
"Error:  wrong name for pdf or variable or dataset ! " << std::endl;
 
  219  std::stringstream log;
 
  220  log << 
"------ Begin Bernstein Correction Log --------" << std::endl;
 
  229  for(
int i = 0; i<=degree+1; ++i) {
 
  231    std::stringstream str;
 
  235         "Bernstein basis poly coefficient",
 
  242    coefficients.push_back(
newCoef);
 
  268  std::cout << 
"made pdfs, make toy generator" << std::endl;
 
  286    for (
int i = 0; i < 
nToys; ++i) {
 
  287       std::cout << 
"on toy " << i << std::endl;
 
  291       std::unique_ptr<RooFitResult> 
result{
 
  309      std::cout << 
"NLL Results: null " << 
resultNull->minNll() << 
" ref = " << 
result->minNll() << 
" extra" 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 result
static int DefaultPrintLevel()
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
RooFit::OwningPtr< RooFitResult > fitTo(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Fit PDF to given dataset.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Bernstein basis polynomials are positive-definite in the range [0,1].
Container class to hold N-dimensional binned data.
The class RooEffProd implements the product of a PDF with an efficiency function.
A probability density function sampled from a multidimensional histogram.
static RooMsgService & instance()
Return reference to singleton instance.
Variable that can be changed from the outside.
Int_t ImportCorrectedPdf(RooWorkspace *, const char *, const char *, const char *)
Main method for Bernstein correction.
double fMaxCorrection
maximum correction factor at any point (default is 100)
BernsteinCorrection(double tolerance=0.05)
double fTolerance
probability to add an unnecessary term
Int_t fMaxDegree
maximum polynomial degree correction (default is 10)
void CreateQSamplingDist(RooWorkspace *wks, const char *nominalName, const char *varName, const char *dataName, TH1F *, TH1F *, Int_t degree, Int_t nToys=500)
Create sampling distribution for q given degree-1 vs. degree corrections.
Persistable container for RooFit projects.
1-D histogram with a float per channel (see TH1 documentation)
RooCmdArg Hesse(bool flag=true)
RooCmdArg Save(bool flag=true)
RooCmdArg Minos(bool flag=true)
RooCmdArg PrintLevel(Int_t code)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
Namespace for the RooStats classes.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...