50 new TCanvas(
"rf903_numintcache",
"rf903_numintcache", 600, 600);
54 Error(
"rf903_numintcache",
"Cached histogram is not existing in workspace");
63 std::unique_ptr<RooDataSet>
d{w1->
pdf(
"model")->
generate({*w1->
var(
"x"), *w1->
var(
"y"), *w1->
var(
"z")}, 1000)};
74 auto canv =
new TCanvas(
"rf903_numintcache",
"rf903_numintcache", 600, 600);
99 w->factory(
"EXPR::model('1/((x-a)*(x-a)+0.01)+1/((y-a)*(y-a)+0.01)+1/"
100 "((z-a)*(z-a)+0.01)',x[-1,1],y[-1,1],z[-1,1],a[-5,5])");
111 w->pdf(
"model")->setStringAttribute(
"CACHEPARMINT",
"x:y:z");
114 RooArgSet normSet(*
w->var(
"x"), *
w->var(
"y"), *
w->var(
"z"));
115 w->pdf(
"model")->getVal(&normSet);
116 w->writeToFile(
"rf903_numintcache.root");
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char mode
TH1 * createHistogram(const char *name, const RooAbsRealLValue &xvar, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) c...
RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={}, const RooCmdArg &arg10={}) const override
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
RooFit::OwningPtr< RooFitResult > fitTo(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Fit PDF to given dataset.
RooFit::OwningPtr< RooDataSet > generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={})
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold N-dimensional binned data.
const TObject * getObj(Int_t uniqueID)
Retrieve payload object of cache element with given unique ID.
Plot frame and a container for graphics objects within that frame.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
Persistable container for RooFit projects.
void Print(Option_t *opts=nullptr) const override
Print contents of the workspace.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooExpensiveObjectCache & expensiveObjectCache()
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
void Draw(Option_t *option="") override
Draw this histogram with options.
RooCmdArg PrintLevel(Int_t code)
RooCmdArg Verbose(bool flag=true)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...