Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TestStatSampler.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
3/*************************************************************************
4 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOSTATS_TestStatSampler
12#define ROOSTATS_TestStatSampler
13
14
15#include "Rtypes.h"
16
17class RooAbsArg;
18class RooAbsData;
19class RooArgSet;
20class RooAbsPdf;
21
22
23
24
25namespace RooStats {
26
27 class SamplingDistribution;
28 class TestStatistic;
29
30/** \class RooStats::TestStatSampler
31 \ingroup Roostats
32
33TestStatSampler is an interface class for a tools which produce RooStats
34SamplingDistributions. Tools that implement this interface are expected to be
35used for coverage studies, the Neyman Construction, etc.
36
37*/
38
40
41 public:
42 virtual ~TestStatSampler() {}
43
44 /// Main interface to get a ConfInterval, pure virtual
46
47 /// Main interface to evaluate the test statistic on a dataset
48 virtual double EvaluateTestStatistic(RooAbsData& data, RooArgSet& paramsOfInterest) = 0;
49
50 /// Get the TestStatistic
51 virtual TestStatistic* GetTestStatistic() const = 0;
52
53 /// Get the Confidence level for the test
54 virtual double ConfidenceLevel() const = 0;
55
56 /// Common Initialization
57 virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOfInterest, RooArgSet& nuisanceParameters) = 0;
58
59 /// Set the Pdf, add to the workspace if not already there
60 virtual void SetPdf(RooAbsPdf&) = 0;
61
62 /// How to randomize the prior. Set to nullptr to deactivate randomization.
63 virtual void SetPriorNuisance(RooAbsPdf*) = 0;
64
65 /// specify the values of parameters used when evaluating test statistic
66 virtual void SetParametersForTestStat(const RooArgSet& /*nullpoi*/) = 0;
67
68 /// specify the nuisance parameters (eg. the rest of the parameters)
69 virtual void SetNuisanceParameters(const RooArgSet&) = 0;
70 /// specify the observables in the dataset (needed to evaluate the test statistic)
71 virtual void SetObservables(const RooArgSet& ) = 0;
72 /// specify the conditional observables
73 virtual void SetGlobalObservables(const RooArgSet& ) = 0;
74
75 /// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
76 virtual void SetTestSize(double size) = 0;
77 /// set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
78 virtual void SetConfidenceLevel(double cl) = 0;
79
80 /// Set the TestStatistic (want the argument to be a function of the data & parameter points
81 virtual void SetTestStatistic(TestStatistic* testStatistic) = 0;
82
83 /// Set the name of the sampling distribution used for plotting
84 virtual void SetSamplingDistName(const char* name) = 0;
85
86
87 protected:
88 ClassDef(TestStatSampler,1) // Interface for tools setting limits (producing confidence intervals)
89 };
90}
91
92
93#endif
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
Definition Rtypes.h:342
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char name[80]
Definition TGX11.cxx:110
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:77
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
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 SetTestSize(double size)=0
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
virtual void SetConfidenceLevel(double cl)=0
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
virtual void SetObservables(const RooArgSet &)=0
specify the observables in the dataset (needed to evaluate the test statistic)
virtual double ConfidenceLevel() const =0
Get the Confidence level for the test.
virtual void Initialize(RooAbsArg &testStatistic, RooArgSet &paramsOfInterest, RooArgSet &nuisanceParameters)=0
Common Initialization.
virtual TestStatistic * GetTestStatistic() const =0
Get the TestStatistic.
virtual void SetTestStatistic(TestStatistic *testStatistic)=0
Set the TestStatistic (want the argument to be a function of the data & parameter points.
virtual void SetParametersForTestStat(const RooArgSet &)=0
specify the values of parameters used when evaluating test statistic
virtual void SetPriorNuisance(RooAbsPdf *)=0
How to randomize the prior. Set to nullptr to deactivate randomization.
virtual double EvaluateTestStatistic(RooAbsData &data, RooArgSet &paramsOfInterest)=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 &paramsOfInterest)=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 SetGlobalObservables(const RooArgSet &)=0
specify the conditional observables
virtual void SetPdf(RooAbsPdf &)=0
Set the Pdf, add to the workspace if not already there.
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
Namespace for the RooStats classes.
Definition Asimov.h:19