11#ifndef ROOSTATS_NumEventsTestStat
12#define ROOSTATS_NumEventsTestStat
52 if(
data.isWeighted()) {
53 return data.sumEntries();
58 return data.numEntries();
62 if(
data.numEntries() == 1) {
63 double numEvents = 0.0;
64 for (
auto const *obs : static_range_cast<RooRealVar *>(*
data.get(0))) {
65 numEvents += obs->getValV();
70 std::cout <<
"Data set is invalid" << std::endl;
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
bool canBeExtended() const
If true, PDF can provide extended likelihood term.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
NumEventsTestStat is a simple implementation of the TestStatistic interface used for simple number co...
double Evaluate(RooAbsData &data, RooArgSet &) override
Main interface to evaluate the test statistic on a dataset given the values for the Null Parameters O...
NumEventsTestStat(RooAbsPdf &pdf)
const TString GetVarName() const override
virtual const RooAbsArg * GetTestStatistic() const
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
Namespace for the RooStats classes.