180 wspace->
factory(
"Poisson::on(non[0,1000], sum::splusb(s[40,0,100],b[100,0,300]))");
181 wspace->
factory(
"Poisson::off(noff[0,5000], prod::taub(b,tau[5,3,7],rho[1,0,2]))");
182 wspace->
factory(
"Poisson::onbar(nonbar[0,10000], bbar[1000,500,2000])");
183 wspace->
factory(
"Poisson::offbar(noffbar[0,1000000], prod::lambdaoffbar(bbar, tau))");
184 wspace->
factory(
"Gaussian::mcCons(rhonom[1.,0,2], rho, sigma[.2])");
185 wspace->
factory(
"PROD::model(on,off,onbar,offbar,mcCons)");
186 wspace->
defineSet(
"obs",
"non,noff,nonbar,noffbar,rhonom");
188 wspace->
factory(
"Uniform::prior_poi({s})");
189 wspace->
factory(
"Uniform::prior_nuis({b,bbar,tau, rho})");
190 wspace->
factory(
"PROD::prior(prior_poi,prior_nuis)");
197 wspace->
defineSet(
"nuis",
"b,tau,rho,bbar");
215 std::unique_ptr<RooDataSet>
data{wspace->
pdf(
"model")->
generate(*wspace->
set(
"obs"), 1)};
237 plc.SetConfidenceLevel(0.95);
241 plInt->LowerLimit(*wspace->
var(
"s"));
246 fc.SetConfidenceLevel(0.95);
248 fc.FluctuateNumDataEntries(
false);
249 fc.UseAdaptiveSampling(
true);
258 bc.SetConfidenceLevel(0.95);
263 cout <<
"Bayesian Calc. only supports on parameter of interest" << endl;
272 ph.SetCovMatrix(
fit->covarianceMatrix());
273 ph.SetUpdateProposalParameters(
kTRUE);
274 ph.SetCacheSize(100);
278 mc.SetConfidenceLevel(0.95);
279 mc.SetProposalFunction(*
pf);
280 mc.SetNumBurnInSteps(500);
281 mc.SetNumIters(50000);
282 mc.SetLeftSideTailFraction(0.5);
308 bc.SetScanOfPosterior(20);
324 cout <<
"Profile Likelihood interval on s = [" <<
plInt->LowerLimit(*wspace->
var(
"s")) <<
", "
325 <<
plInt->UpperLimit(*wspace->
var(
"s")) <<
"]" << endl;
329 cout <<
"Bayesian interval on s = [" <<
bInt->LowerLimit() <<
", " <<
bInt->UpperLimit() <<
"]" << endl;
333 cout <<
"Feldman Cousins interval on s = [" <<
fcInt->LowerLimit(*wspace->
var(
"s")) <<
", "
334 <<
fcInt->UpperLimit(*wspace->
var(
"s")) <<
"]" << endl;
339 cout <<
"MCMC interval on s = [" <<
mcInt->LowerLimit(*wspace->
var(
"s")) <<
", "
340 <<
mcInt->UpperLimit(*wspace->
var(
"s")) <<
"]" << endl;
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
Int_t getSize() const
Return the number of elements in the collection.
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&,...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
static RooMsgService & instance()
Return reference to singleton instance.
Plot frame and a container for graphics objects within that frame.
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
BayesianCalculator is a concrete implementation of IntervalCalculator, providing the computation of a...
The FeldmanCousins class (like the Feldman-Cousins technique) is essentially a specific configuration...
This class provides simple and straightforward utilities to plot a LikelihoodInterval object.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
This class provides simple and straightforward utilities to plot a MCMCInterval object.
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
PointSetInterval is a concrete implementation of the ConfInterval interface.
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
SimpleInterval is a concrete implementation of the ConfInterval interface.
Persistable container for RooFit projects.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
const RooArgSet * set(RooStringView name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
bool import(const RooAbsArg &arg, 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={})
Import a RooAbsArg object, e.g.
RooFactoryWSTool & factory()
Return instance to factory tool.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
bool defineSet(const char *name, const RooArgSet &aset, bool importMissing=false)
Define a named RooArgSet with given constituents.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Print(Option_t *option="") const override
Print the real and cpu time passed between the start and stop events.
RooCmdArg Save(bool flag=true)
fit(model, train_loader, val_loader, num_epochs, batch_size, optimizer, criterion, save_best, scheduler)
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.