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