38using std::endl, std::string;
 
   56   fDefaultSampler(nullptr),
 
   57   fDefaultTestStat(nullptr),
 
 
  114      oocoutE(
nullptr,Generation) << 
"Null model needs a snapshot. Set using modelconfig->SetSnapshot(poi)." << std::endl;
 
  120      oocoutE(
nullptr,Generation) << 
"There was an error in CheckHook(). Stop." << std::endl;
 
  125      oocoutE(
nullptr,InputArguments) << 
"Test Statistic Sampler or Test Statistics not defined. Stop." << std::endl;
 
  143   std::unique_ptr<RooArgList> 
allTS;
 
  146      if (!
allTS) 
return nullptr;
 
  151      if (
allTS->size()<=1) {
 
  158   oocoutP(
nullptr,Generation) << 
"Test Statistic on data: " << 
obsTestStat << std::endl;
 
  169      int nEventsPerToy = 
toymcs->nEventsPerToy();
 
  171      if (nEventsPerToy == 0 && (!pdf->canBeExtended() || pdf->expectedEvents(
modelConfig->GetObservables()) <= 0)) {
 
  181      oocoutE(
nullptr,Generation) << 
"PreNullHook did not return 0." << std::endl;
 
  205      oocoutE(
nullptr,Generation) << 
"PreAltHook did not return 0." << std::endl;
 
  239   string resultname = 
"HypoTestCalculator_result";
 
  250   if (
aset != 
nullptr) {
 
 
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
 
Abstract base class for binned and unbinned datasets.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
Container class to hold unbinned data.
 
static UInt_t integer(UInt_t max, TRandom *generator=randomGenerator())
Return an integer uniformly distributed from [0,n-1].
 
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
 
Variable that can be changed from the outside.
 
const ModelConfig * fAltModel
 
virtual void PreHook() const
 
HypoTestResult * GetHypoTest() const override
inherited methods from HypoTestCalculator interface
 
~HypoTestCalculatorGeneric() override
 
virtual int PreNullHook(RooArgSet *, double) const
 
void SetupSampler(const ModelConfig &model) const
common setup for both models
 
TestStatSampler * fTestStatSampler
 
unsigned int fAltToysSeed
 
virtual int PreAltHook(RooArgSet *, double) const
 
const ModelConfig * fNullModel
 
TestStatistic * fDefaultTestStat
 
virtual int CheckHook(void) const
 
virtual const RooArgSet * GetFitInfo() const
 
void UseSameAltToys()
Set this for re-using always the same toys for alternate hypothesis in case of calls at different nul...
 
TestStatSampler * fDefaultSampler
 
virtual void PostHook() const
 
HypoTestCalculatorGeneric(const RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, TestStatSampler *sampler=nullptr)
Constructor.
 
HypoTestResult is a base class for results from hypothesis tests.
 
void SetAltDetailedOutput(RooDataSet *d)
 
void SetNullDetailedOutput(RooDataSet *d)
 
void SetAllTestStatisticsData(const RooArgList *tsd)
 
void SetNullDistribution(SamplingDistribution *null)
 
void SetTestStatisticData(const double tsd)
 
void SetFitInfo(RooDataSet *d)
 
void SetAltDistribution(SamplingDistribution *alt)
 
void SetPValueIsRightTail(bool pr)
 
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
 
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return nullptr if not existing)
 
void LoadSnapshot() const
load the snapshot from ws if it exists
 
RooAbsPdf * GetPdf() const
get model PDF (return nullptr if pdf has not been specified or does not exist)
 
TestStatistic that returns the ratio of profiled likelihoods.
 
This class simply holds a sampling distribution of some test statistic.
 
TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.
 
virtual void SetObservables(const RooArgSet &)=0
specify the observables in the dataset (needed to evaluate the test statistic)
 
virtual TestStatistic * GetTestStatistic() const =0
Get the TestStatistic.
 
virtual void SetParametersForTestStat(const RooArgSet &)=0
specify the values of parameters used when evaluating test statistic
 
virtual double EvaluateTestStatistic(RooAbsData &data, RooArgSet ¶msOfInterest)=0
Main interface to evaluate the test statistic on a dataset.
 
virtual void SetNuisanceParameters(const RooArgSet &)=0
specify the nuisance parameters (eg. the rest of the parameters)
 
virtual SamplingDistribution * GetSamplingDistribution(RooArgSet ¶msOfInterest)=0
Main interface to get a ConfInterval, pure virtual.
 
virtual void SetSamplingDistName(const char *name)=0
Set the name of the sampling distribution used for plotting.
 
virtual void SetPdf(RooAbsPdf &)=0
Set the Pdf, add to the workspace if not already there.
 
ToyMCSampler is an implementation of the TestStatSampler interface.
 
const char * GetName() const override
Returns name of object.
 
Namespace for the RooStats classes.