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