// @(#)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_TestStatSampler
#define ROOSTATS_TestStatSampler

//_________________________________________________
/*
BEGIN_HTML
<p>
TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.  
Tools that implement this interface are expected to be used for coverage studies, the Neyman Construction, etc.
</p>
END_HTML
*/
//

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

class RooAbsArg; 
class RooAbsData; 
class RooArgSet; 
class RooAbsPdf;

namespace RooStats {

   class SamplingDistribution; 
   class TestStatistic;

   class TestStatSampler {

   public:
     //     TestStatSampler();
     virtual ~TestStatSampler() {}
    
      // Main interface to get a ConfInterval, pure virtual
      virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& paramsOfInterest) = 0; 

      // Main interface to evaluate the test statistic on a dataset
      virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& paramsOfInterest) = 0;

      // Get the TestStatistic
      virtual TestStatistic* GetTestStatistic()  const = 0;  
    
      // Get the Confidence level for the test
      virtual Double_t ConfidenceLevel()  const = 0;  

      // Common Initialization
      virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOfInterest, RooArgSet& nuisanceParameters) = 0;

      // Set the Pdf, add to the the workspace if not already there
      virtual void SetPdf(RooAbsPdf&) = 0;
      // How to randomize the prior. Set to NULL to deactivate randomization.
      virtual void SetPriorNuisance(RooAbsPdf*) = 0;

      // specify the values of parameters used when evaluating test statistic
      virtual void SetParametersForTestStat(const RooArgSet& /*nullpoi*/) = 0;
      
      // REMOVE THIS
      // specify the parameters of interest in the interval
      //      virtual void SetParameters(const RooArgSet&) = 0;

      // specify the nuisance parameters (eg. the rest of the parameters)
      virtual void SetNuisanceParameters(const RooArgSet&) = 0;
      // specify the observables in the dataset (needed to evaluate the test statistic)
      virtual void SetObservables(const RooArgSet& ) = 0;
      // specify the conditional observables
      virtual void SetGlobalObservables(const RooArgSet& ) = 0;

      // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
      virtual void SetTestSize(Double_t size) = 0;
      // set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
      virtual void SetConfidenceLevel(Double_t cl) = 0;

      // Set the TestStatistic (want the argument to be a function of the data & parameter points
      virtual void SetTestStatistic(TestStatistic* testStatistic) = 0;
      
      // Set the name of the sampling distribution used for plotting
      virtual void SetSamplingDistName(const char* name) = 0;


   protected:
      ClassDef(TestStatSampler,1)   // Interface for tools setting limits (producing confidence intervals)
   };
}


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