TestStatSampler.h

Go to the documentation of this file.
00001 // @(#)root/roostats:$Id: TestStatSampler.h 34109 2010-06-24 15:00:16Z moneta $
00002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
00003 /*************************************************************************
00004  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
00005  * All rights reserved.                                                  *
00006  *                                                                       *
00007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00009  *************************************************************************/
00010 
00011 #ifndef ROOSTATS_TestStatSampler
00012 #define ROOSTATS_TestStatSampler
00013 
00014 //_________________________________________________
00015 /*
00016 BEGIN_HTML
00017 <p>
00018 TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.  
00019 Tools that implement this interface are expected to be used for coverage studies, the Neyman Construction, etc.
00020 </p>
00021 END_HTML
00022 */
00023 //
00024 
00025 #ifndef ROOT_Rtypes
00026 #include "Rtypes.h"
00027 #endif
00028 
00029 class RooAbsArg; 
00030 class RooAbsData; 
00031 class RooArgSet; 
00032 class RooAbsPdf;
00033 
00034 namespace RooStats {
00035 
00036    class SamplingDistribution; 
00037    class TestStatistic;
00038 
00039    class TestStatSampler {
00040 
00041    public:
00042      //     TestStatSampler();
00043      virtual ~TestStatSampler() {}
00044     
00045       // Main interface to get a ConfInterval, pure virtual
00046       virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& paramsOfInterest) = 0; 
00047 
00048       // Main interface to evaluate the test statistic on a dataset
00049       virtual Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& paramsOfInterest) = 0;
00050 
00051       // Get the TestStatistic
00052       virtual TestStatistic* GetTestStatistic()  const = 0;  
00053     
00054       // Get the Confidence level for the test
00055       virtual Double_t ConfidenceLevel()  const = 0;  
00056 
00057       // Common Initialization
00058       virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOfInterest, RooArgSet& nuisanceParameters) = 0;
00059 
00060       // Set the Pdf, add to the the workspace if not already there
00061       virtual void SetPdf(RooAbsPdf&) = 0;
00062       // How to randomize the prior. Set to NULL to deactivate randomization.
00063       virtual void SetPriorNuisance(RooAbsPdf*) = 0;
00064 
00065       // specify the values of parameters used when evaluating test statistic
00066       virtual void SetParametersForTestStat(const RooArgSet& /*nullpoi*/) = 0;
00067       
00068       // REMOVE THIS
00069       // specify the parameters of interest in the interval
00070       //      virtual void SetParameters(const RooArgSet&) = 0;
00071 
00072       // specify the nuisance parameters (eg. the rest of the parameters)
00073       virtual void SetNuisanceParameters(const RooArgSet&) = 0;
00074       // specify the observables in the dataset (needed to evaluate the test statistic)
00075       virtual void SetObservables(const RooArgSet& ) = 0;
00076       // specify the conditional observables
00077       virtual void SetGlobalObservables(const RooArgSet& ) = 0;
00078 
00079       // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
00080       virtual void SetTestSize(Double_t size) = 0;
00081       // set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
00082       virtual void SetConfidenceLevel(Double_t cl) = 0;
00083 
00084       // Set the TestStatistic (want the argument to be a function of the data & parameter points
00085       virtual void SetTestStatistic(TestStatistic* testStatistic) = 0;
00086       
00087       // Set the name of the sampling distribution used for plotting
00088       virtual void SetSamplingDistName(const char* name) = 0;
00089 
00090 
00091    protected:
00092       ClassDef(TestStatSampler,1)   // Interface for tools setting limits (producing confidence intervals)
00093    };
00094 }
00095 
00096 
00097 #endif

Generated on Tue Jul 5 14:26:26 2011 for ROOT_528-00b_version by  doxygen 1.5.1