Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HypoTestCalculator.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_HypoTestCalculator
12#define ROOSTATS_HypoTestCalculator
13
14#include "Rtypes.h"
15
16// class RooAbsPdf;
17class RooAbsData;
18// class RooArgSet;
19class RooWorkspace;
20
21
22namespace RooStats {
23
24 class HypoTestResult;
25
26 class ModelConfig;
27
28
29/** \class HypoTestCalculator
30 \ingroup Roostats
31
32HypoTestCalculator is an interface class for a tools which produce RooStats
33HypoTestResults. The interface currently assumes that any hypothesis test
34calculator can be configured by specifying:
35
36 - a model for the null,
37 - a model for the alternate,
38 - a data set,
39 - a set of parameters of which specify the null (including values and const/non-const status), and
40 - a set of parameters of which specify the alternate (including values and const/non-const status).
41
42The interface allows one to pass the model, data, and parameters via a workspace
43and then specify them with names. The interface will be extended so that one does
44not need to use a workspace.
45
46After configuring the calculator, one only needs to ask GetHypoTest, which will
47return a HypoTestResult pointer.
48
49The concrete implementations of this interface should deal with the details of
50how the nuisance parameters are dealt with (eg. integration vs. profiling) and
51which test-statistic is used (perhaps this should be added to the interface).
52
53The motivation for this interface is that we hope to be able to specify the
54problem in a common way for several concrete calculators.
55
56*/
57
58
60
61 public:
62
63
65
66 // main interface to get a HypoTestResult, pure virtual
67 virtual HypoTestResult* GetHypoTest() const = 0;
68
69 // Set a common model for both the null and alternate, add to the the workspace if not already there
70 virtual void SetCommonModel(const ModelConfig& model) {
71 SetNullModel(model);
72 SetAlternateModel(model);
73 }
74
75 // Set the model for the null hypothesis
76 virtual void SetNullModel(const ModelConfig& model) = 0;
77 // Set the model for the alternate hypothesis
78 virtual void SetAlternateModel(const ModelConfig& model) = 0;
79 // Set the DataSet
80 virtual void SetData(RooAbsData& data) = 0;
81
82
83 protected:
84 ClassDef(HypoTestCalculator,1) // Interface for tools doing hypothesis tests
85 };
86}
87
88
89#endif
#define ClassDef(name, id)
Definition Rtypes.h:325
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:49
HypoTestCalculator is an interface class for a tools which produce RooStats HypoTestResults.
virtual void SetNullModel(const ModelConfig &model)=0
virtual void SetData(RooAbsData &data)=0
virtual HypoTestResult * GetHypoTest() const =0
virtual void SetCommonModel(const ModelConfig &model)
virtual void SetAlternateModel(const ModelConfig &model)=0
HypoTestResult is a base class for results from hypothesis tests.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
Definition ModelConfig.h:30
The RooWorkspace is a persistable container for RooFit projects.
Namespace for the RooStats classes.
Definition Asimov.h:19