// @(#)root/roostats:$Id$
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOSTATS_HypoTestCalculator
#define ROOSTATS_HypoTestCalculator

//#include "TNamed.h"

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif

//_________________________________________________
/*
BEGIN_HTML
<p>
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:
<ul>
 <li>a model for the null,</li>
 <li>a model for the alternate,</li>
 <li>a data set, </li>
 <li>a set of parameters of which specify the null (including values and const/non-const status), and </li>
 <li>a set of parameters of which specify the alternate (including values and const/non-const status).</li>
</ul>
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.
</p>
<p>
After configuring the calculator, one only needs to ask GetHypoTest, which will return a HypoTestResult pointer.
</p>
<p>
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).
</p>
<p>
The motivation for this interface is that we hope to be able to specify the problem in a common way for several concrete calculators.
</p>
END_HTML
*/
//

// class RooAbsPdf;
class RooAbsData;
// class RooArgSet; 
class RooWorkspace; 


namespace RooStats {

   class HypoTestResult;

   class ModelConfig;

   class HypoTestCalculator {

   public:


      virtual ~HypoTestCalculator() {}

      // main interface to get a HypoTestResult, pure virtual
      virtual HypoTestResult* GetHypoTest() const = 0;

      // Set a common model for both the null and alternate, add to the the workspace if not already there
      virtual void SetCommonModel(const ModelConfig& model) { 
         SetNullModel(model); 
         SetAlternateModel(model); 
      }

      // Set the model for the null hypothesis
      virtual void SetNullModel(const ModelConfig& model) = 0;
      // Set the model for the alternate hypothesis
      virtual void SetAlternateModel(const ModelConfig& model) = 0;
      // Set the DataSet
      virtual void SetData(RooAbsData& data) = 0;


   protected:
      ClassDef(HypoTestCalculator,1)  // Interface for tools doing hypothesis tests
   };
}


#endif
 HypoTestCalculator.h:1
 HypoTestCalculator.h:2
 HypoTestCalculator.h:3
 HypoTestCalculator.h:4
 HypoTestCalculator.h:5
 HypoTestCalculator.h:6
 HypoTestCalculator.h:7
 HypoTestCalculator.h:8
 HypoTestCalculator.h:9
 HypoTestCalculator.h:10
 HypoTestCalculator.h:11
 HypoTestCalculator.h:12
 HypoTestCalculator.h:13
 HypoTestCalculator.h:14
 HypoTestCalculator.h:15
 HypoTestCalculator.h:16
 HypoTestCalculator.h:17
 HypoTestCalculator.h:18
 HypoTestCalculator.h:19
 HypoTestCalculator.h:20
 HypoTestCalculator.h:21
 HypoTestCalculator.h:22
 HypoTestCalculator.h:23
 HypoTestCalculator.h:24
 HypoTestCalculator.h:25
 HypoTestCalculator.h:26
 HypoTestCalculator.h:27
 HypoTestCalculator.h:28
 HypoTestCalculator.h:29
 HypoTestCalculator.h:30
 HypoTestCalculator.h:31
 HypoTestCalculator.h:32
 HypoTestCalculator.h:33
 HypoTestCalculator.h:34
 HypoTestCalculator.h:35
 HypoTestCalculator.h:36
 HypoTestCalculator.h:37
 HypoTestCalculator.h:38
 HypoTestCalculator.h:39
 HypoTestCalculator.h:40
 HypoTestCalculator.h:41
 HypoTestCalculator.h:42
 HypoTestCalculator.h:43
 HypoTestCalculator.h:44
 HypoTestCalculator.h:45
 HypoTestCalculator.h:46
 HypoTestCalculator.h:47
 HypoTestCalculator.h:48
 HypoTestCalculator.h:49
 HypoTestCalculator.h:50
 HypoTestCalculator.h:51
 HypoTestCalculator.h:52
 HypoTestCalculator.h:53
 HypoTestCalculator.h:54
 HypoTestCalculator.h:55
 HypoTestCalculator.h:56
 HypoTestCalculator.h:57
 HypoTestCalculator.h:58
 HypoTestCalculator.h:59
 HypoTestCalculator.h:60
 HypoTestCalculator.h:61
 HypoTestCalculator.h:62
 HypoTestCalculator.h:63
 HypoTestCalculator.h:64
 HypoTestCalculator.h:65
 HypoTestCalculator.h:66
 HypoTestCalculator.h:67
 HypoTestCalculator.h:68
 HypoTestCalculator.h:69
 HypoTestCalculator.h:70
 HypoTestCalculator.h:71
 HypoTestCalculator.h:72
 HypoTestCalculator.h:73
 HypoTestCalculator.h:74
 HypoTestCalculator.h:75
 HypoTestCalculator.h:76
 HypoTestCalculator.h:77
 HypoTestCalculator.h:78
 HypoTestCalculator.h:79
 HypoTestCalculator.h:80
 HypoTestCalculator.h:81
 HypoTestCalculator.h:82
 HypoTestCalculator.h:83
 HypoTestCalculator.h:84
 HypoTestCalculator.h:85
 HypoTestCalculator.h:86
 HypoTestCalculator.h:87
 HypoTestCalculator.h:88
 HypoTestCalculator.h:89
 HypoTestCalculator.h:90
 HypoTestCalculator.h:91
 HypoTestCalculator.h:92