Logo ROOT   6.14/05
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;
23 class RooAbsData;
24 // class RooArgSet;
25 class RooWorkspace;
26 
27 
28 namespace RooStats {
29 
30  class HypoTestResult;
31 
32  class ModelConfig;
33 
34 
35 /** \class HypoTestCalculator
36  \ingroup Roostats
37 
38 HypoTestCalculator is an interface class for a tools which produce RooStats
39 HypoTestResults. The interface currently assumes that any hypothesis test
40 calculator 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 
48 The interface allows one to pass the model, data, and parameters via a workspace
49 and then specify them with names. The interface will be extended so that one does
50 not need to use a workspace.
51 
52 After configuring the calculator, one only needs to ask GetHypoTest, which will
53 return a HypoTestResult pointer.
54 
55 The concrete implementations of this interface should deal with the details of
56 how the nuisance parameters are dealt with (eg. integration vs. profiling) and
57 which test-statistic is used (perhaps this should be added to the interface).
58 
59 The motivation for this interface is that we hope to be able to specify the
60 problem in a common way for several concrete calculators.
61 
62 */
63 
64 
66 
67  public:
68 
69 
70  virtual ~HypoTestCalculator() {}
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
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
Definition: ModelConfig.h:30
HypoTestResult is a base class for results from hypothesis tests.
#define ClassDef(name, id)
Definition: Rtypes.h:320
HypoTestCalculator is an interface class for a tools which produce RooStats HypoTestResults.
virtual void SetAlternateModel(const ModelConfig &model)=0
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
virtual HypoTestResult * GetHypoTest() const =0
Namespace for the RooStats classes.
Definition: Asimov.h:20
virtual void SetNullModel(const ModelConfig &model)=0
virtual void SetCommonModel(const ModelConfig &model)
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:43
virtual void SetData(RooAbsData &data)=0