113 BinCountTestStat(
void) : fColumnName(
"tmp") {}
114 BinCountTestStat(
string columnName) : fColumnName(columnName) {}
116 virtual Double_t Evaluate(RooAbsData &data, RooArgSet & )
120 for (
int i = 0; i < data.numEntries(); i++) {
121 value += data.get(i)->getRealValue(fColumnName.c_str());
125 virtual const TString GetVarName()
const {
return fColumnName; }
139void HybridStandardForm(
int ntoys = 6000)
141 double nToysRatio = 20;
174 w->factory(
"Uniform::f(m[0,1])");
175 w->factory(
"ExtendPdf::px(f,sum::splusb(s[0,0,100],b[100,0.1,300]))");
176 w->factory(
"Poisson::py(y[100,0.1,500],prod::taub(tau[1.],b))");
177 w->factory(
"PROD::model(px,py)");
178 w->factory(
"Uniform::prior_b(b)");
194 cout <<
"-----------------------------------------" << endl;
195 cout <<
"Part 3" << endl;
196 std::cout <<
"Z_Bi p-value (analytic): " << p_Bi << std::endl;
197 std::cout <<
"Z_Bi significance (analytic): " << Z_Bi << std::endl;
221 w->defineSet(
"obs",
"m");
222 w->defineSet(
"poi",
"s");
233 b_model.SetPdf(*w->pdf(
"px"));
234 b_model.SetObservables(*w->set(
"obs"));
235 b_model.SetParametersOfInterest(*w->set(
"poi"));
236 w->var(
"s")->setVal(0.0);
237 b_model.SetSnapshot(*w->set(
"poi"));
241 sb_model.SetPdf(*w->pdf(
"px"));
242 sb_model.SetObservables(*w->set(
"obs"));
243 sb_model.SetParametersOfInterest(*w->set(
"poi"));
244 w->var(
"s")->setVal(50.0);
245 sb_model.SetSnapshot(*w->set(
"poi"));
278 w->factory(
"Gaussian::gauss_prior(b,y, expr::sqrty('sqrt(y)',y))");
282 w->factory(
"Lognormal::lognorm_prior(b,y, expr::kappa('1+1./sqrt(y)',y))");
305 hc1.SetToys(ntoys, ntoys / nToysRatio);
306 hc1.ForcePriorNuisanceAlt(*w->pdf(
"py"));
307 hc1.ForcePriorNuisanceNull(*w->pdf(
"py"));
324 cout <<
"-----------------------------------------" << endl;
325 cout <<
"Part 4" << endl;
346 slrts.SetNullParameters(*b_model.GetSnapshot());
347 slrts.SetAltParameters(*sb_model.GetSnapshot());
355 hc2.SetToys(ntoys, ntoys / nToysRatio);
356 hc2.ForcePriorNuisanceAlt(*w->pdf(
"py"));
357 hc2.ForcePriorNuisanceNull(*w->pdf(
"py"));
373 cout <<
"-----------------------------------------" << endl;
374 cout <<
"Part 5" << endl;
double Double_t
Double 8 bytes.
#define ClassDef(name, id)
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...
NumEventsTestStat is a simple implementation of the TestStatistic interface used for simple number co...
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.
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 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.
RooStats::ModelConfig ModelConfig
double BinomialWithTauObsZ(double nObs, double bExp, double tau)
See BinomialWithTauObsP.
double BinomialWithTauObsP(double nObs, double bExp, double tau)
P-value for s=nullptr in a ratio of Poisson means.
Namespace for the RooStats classes.