114 BinCountTestStat(
void) : fColumnName(
"tmp") {}
115 BinCountTestStat(
string columnName) : fColumnName(columnName) {}
121 for (
int i = 0; i <
data.numEntries(); i++) {
122 value +=
data.get(i)->getRealValue(fColumnName.c_str());
126 virtual const TString GetVarName()
const {
return fColumnName; }
141 void HybridStandardForm()
176 w->factory(
"Uniform::f(m[0,1])");
177 w->factory(
"ExtendPdf::px(f,sum::splusb(s[0,0,100],b[100,0,300]))");
178 w->factory(
"Poisson::py(y[100,0,500],prod::taub(tau[1.],b))");
179 w->factory(
"PROD::model(px,py)");
180 w->factory(
"Uniform::prior_b(b)");
200 double p_Bi = NumberCountingUtils::BinomialWithTauObsP(150, 100, 1);
201 double Z_Bi = NumberCountingUtils::BinomialWithTauObsZ(150, 100, 1);
202 cout <<
"-----------------------------------------" << endl;
203 cout <<
"Part 3" << endl;
204 std::cout <<
"Z_Bi p-value (analytic): " << p_Bi << std::endl;
205 std::cout <<
"Z_Bi significance (analytic): " << Z_Bi << std::endl;
229 w->defineSet(
"obs",
"m");
230 w->defineSet(
"poi",
"s");
235 std::unique_ptr<RooDataSet>
data{
w->pdf(
"px")->generate(*
w->set(
"obs"), 150)};
241 b_model.SetPdf(*
w->pdf(
"px"));
242 b_model.SetObservables(*
w->set(
"obs"));
243 b_model.SetParametersOfInterest(*
w->set(
"poi"));
244 w->var(
"s")->setVal(0.0);
245 b_model.SetSnapshot(*
w->set(
"poi"));
249 sb_model.SetPdf(*
w->pdf(
"px"));
250 sb_model.SetObservables(*
w->set(
"obs"));
251 sb_model.SetParametersOfInterest(*
w->set(
"poi"));
252 w->var(
"s")->setVal(50.0);
253 sb_model.SetSnapshot(*
w->set(
"poi"));
286 w->factory(
"Gaussian::gauss_prior(b,y, expr::sqrty('sqrt(y)',y))");
290 w->factory(
"Lognormal::lognorm_prior(b,y, expr::kappa('1+1./sqrt(y)',y))");
313 hc1.SetToys(30000, 1000);
314 hc1.ForcePriorNuisanceAlt(*
w->pdf(
"py"));
315 hc1.ForcePriorNuisanceNull(*
w->pdf(
"py"));
336 cout <<
"-----------------------------------------" << endl;
337 cout <<
"Part 4" << endl;
358 slrts.SetNullParameters(*b_model.GetSnapshot());
359 slrts.SetAltParameters(*sb_model.GetSnapshot());
367 hc2.SetToys(20000, 1000);
368 hc2.ForcePriorNuisanceAlt(*
w->pdf(
"py"));
369 hc2.ForcePriorNuisanceNull(*
w->pdf(
"py"));
389 cout <<
"-----------------------------------------" << endl;
390 cout <<
"Part 5" << endl;
#define ClassDef(name, id)
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 value
Abstract base class for binned and unbinned datasets.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
static RooMsgService & instance()
Return reference to singleton instance.
void setGlobalKillBelow(RooFit::MsgLevel level)
RooFit::MsgLevel globalKillBelow() const
Same purpose as HybridCalculatorOriginal, but different implementation.
This class provides the plots for the result of a study performed with any of the HypoTestCalculatorG...
HypoTestResult is a base class for results from hypothesis tests.
void Print(const Option_t *="") const override
Print out some information about the results Note: use Alt/Null labels for the hypotheses here as the...
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
NumEventsTestStat is a simple implementation of the TestStatistic interface used for simple number co...
Holds configuration options for proof and proof-lite.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
TestStatistic class that returns -log(L[null] / L[alt]) where L is the likelihood.
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
ToyMCSampler is an implementation of the TestStatSampler interface.
void SetProofConfig(ProofConfig *pc=nullptr)
calling with argument or nullptr deactivates proof
virtual void SetTestStatistic(TestStatistic *testStatistic, unsigned int i)
Set the TestStatistic (want the argument to be a function of the data & parameter points.
Persistable container for RooFit projects.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Stop()
Stop the stopwatch.
void Print(Option_t *option="") const override
Print the real and cpu time passed between the start and stop events.
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.