Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_Rtypes
16 #include "Rtypes.h"
17 #endif
18 
19 class RooAbsArg;
20 class RooAbsData;
21 class RooArgSet;
22 class RooAbsPdf;
23 
24 
25 
26 
27 namespace RooStats {
28 
29  class SamplingDistribution;
30  class TestStatistic;
31 
32  /**
33  TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.
34  Tools that implement this interface are expected to be used for coverage studies, the Neyman Construction, etc.
35 
36  \ingroup Roostats
37  */
38 
39 
41 
42  public:
43  // TestStatSampler();
44  virtual ~TestStatSampler() {}
45 
46  // Main interface to get a ConfInterval, pure virtual
47  virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& paramsOfInterest) = 0;
48 
49  // Main interface to evaluate the test statistic on a dataset
50  virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& paramsOfInterest) = 0;
51 
52  // Get the TestStatistic
53  virtual TestStatistic* GetTestStatistic() const = 0;
54 
55  // Get the Confidence level for the test
56  virtual Double_t ConfidenceLevel() const = 0;
57 
58  // Common Initialization
59  virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOfInterest, RooArgSet& nuisanceParameters) = 0;
60 
61  // Set the Pdf, add to the the workspace if not already there
62  virtual void SetPdf(RooAbsPdf&) = 0;
63  // How to randomize the prior. Set to NULL to deactivate randomization.
64  virtual void SetPriorNuisance(RooAbsPdf*) = 0;
65 
66  // specify the values of parameters used when evaluating test statistic
67  virtual void SetParametersForTestStat(const RooArgSet& /*nullpoi*/) = 0;
68 
69  // REMOVE THIS
70  // specify the parameters of interest in the interval
71  // virtual void SetParameters(const RooArgSet&) = 0;
72 
73  // specify the nuisance parameters (eg. the rest of the parameters)
74  virtual void SetNuisanceParameters(const RooArgSet&) = 0;
75  // specify the observables in the dataset (needed to evaluate the test statistic)
76  virtual void SetObservables(const RooArgSet& ) = 0;
77  // specify the conditional observables
78  virtual void SetGlobalObservables(const RooArgSet& ) = 0;
79 
80  // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
81  virtual void SetTestSize(Double_t size) = 0;
82  // set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
83  virtual void SetConfidenceLevel(Double_t cl) = 0;
84 
85  // Set the TestStatistic (want the argument to be a function of the data & parameter points
86  virtual void SetTestStatistic(TestStatistic* testStatistic) = 0;
87 
88  // Set the name of the sampling distribution used for plotting
89  virtual void SetSamplingDistName(const char* name) = 0;
90 
91 
92  protected:
93  ClassDef(TestStatSampler,1) // Interface for tools setting limits (producing confidence intervals)
94  };
95 }
96 
97 
98 #endif
virtual void SetParametersForTestStat(const RooArgSet &)=0
virtual TestStatistic * GetTestStatistic() const =0
TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.
virtual void SetTestSize(Double_t size)=0
virtual void SetPdf(RooAbsPdf &)=0
virtual Double_t ConfidenceLevel() const =0
virtual void SetSamplingDistName(const char *name)=0
virtual void SetNuisanceParameters(const RooArgSet &)=0
virtual void SetTestStatistic(TestStatistic *testStatistic)=0
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void Initialize(RooAbsArg &testStatistic, RooArgSet &paramsOfInterest, RooArgSet &nuisanceParameters)=0
virtual void SetObservables(const RooArgSet &)=0
virtual SamplingDistribution * GetSamplingDistribution(RooArgSet &paramsOfInterest)=0
virtual void SetConfidenceLevel(Double_t cl)=0
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
This class simply holds a sampling distribution of some test statistic.
Namespace for the RooStats classes.
Definition: Asimov.h:20
double Double_t
Definition: RtypesCore.h:55
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
virtual Double_t EvaluateTestStatistic(RooAbsData &data, RooArgSet &paramsOfInterest)=0
virtual void SetGlobalObservables(const RooArgSet &)=0
virtual void SetPriorNuisance(RooAbsPdf *)=0
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
Definition: TestStatistic.h:33
char name[80]
Definition: TGX11.cxx:109