11#ifndef ROOSTATS_NumEventsTestStat
12#define ROOSTATS_NumEventsTestStat
50 if(
data.isWeighted()) {
51 return data.sumEntries();
56 return data.numEntries();
60 if(
data.numEntries() == 1) {
61 double numEvents = 0.0;
62 for (
auto const *obs : static_range_cast<RooRealVar *>(*
data.get(0))) {
63 numEvents += obs->getValV();
68 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.