|
|
|||
File indexing completed on 2025-12-16 10:29:46
0001 // @(#)root/roostats:$Id$ 0002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke 0003 /************************************************************************* 0004 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * 0005 * All rights reserved. * 0006 * * 0007 * For the licensing terms see $ROOTSYS/LICENSE. * 0008 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0009 *************************************************************************/ 0010 0011 #ifndef ROOSTATS_TestStatSampler 0012 #define ROOSTATS_TestStatSampler 0013 0014 0015 #include "Rtypes.h" 0016 0017 class RooAbsArg; 0018 class RooAbsData; 0019 class RooArgSet; 0020 class RooAbsPdf; 0021 0022 0023 0024 0025 namespace RooStats { 0026 0027 class SamplingDistribution; 0028 class TestStatistic; 0029 0030 /** \class RooStats::TestStatSampler 0031 \ingroup Roostats 0032 0033 TestStatSampler is an interface class for a tools which produce RooStats 0034 SamplingDistributions. Tools that implement this interface are expected to be 0035 used for coverage studies, the Neyman Construction, etc. 0036 0037 */ 0038 0039 class TestStatSampler { 0040 0041 public: 0042 virtual ~TestStatSampler() {} 0043 0044 /// Main interface to get a ConfInterval, pure virtual 0045 virtual SamplingDistribution* GetSamplingDistribution(RooArgSet& paramsOfInterest) = 0; 0046 0047 /// Main interface to evaluate the test statistic on a dataset 0048 virtual double EvaluateTestStatistic(RooAbsData& data, RooArgSet& paramsOfInterest) = 0; 0049 0050 /// Get the TestStatistic 0051 virtual TestStatistic* GetTestStatistic() const = 0; 0052 0053 /// Get the Confidence level for the test 0054 virtual double ConfidenceLevel() const = 0; 0055 0056 /// Common Initialization 0057 virtual void Initialize(RooAbsArg& testStatistic, RooArgSet& paramsOfInterest, RooArgSet& nuisanceParameters) = 0; 0058 0059 /// Set the Pdf, add to the workspace if not already there 0060 virtual void SetPdf(RooAbsPdf&) = 0; 0061 0062 /// How to randomize the prior. Set to nullptr to deactivate randomization. 0063 virtual void SetPriorNuisance(RooAbsPdf*) = 0; 0064 0065 /// specify the values of parameters used when evaluating test statistic 0066 virtual void SetParametersForTestStat(const RooArgSet& /*nullpoi*/) = 0; 0067 0068 /// specify the nuisance parameters (eg. the rest of the parameters) 0069 virtual void SetNuisanceParameters(const RooArgSet&) = 0; 0070 /// specify the observables in the dataset (needed to evaluate the test statistic) 0071 virtual void SetObservables(const RooArgSet& ) = 0; 0072 /// specify the conditional observables 0073 virtual void SetGlobalObservables(const RooArgSet& ) = 0; 0074 0075 /// set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval) 0076 virtual void SetTestSize(double size) = 0; 0077 /// set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) 0078 virtual void SetConfidenceLevel(double cl) = 0; 0079 0080 /// Set the TestStatistic (want the argument to be a function of the data & parameter points 0081 virtual void SetTestStatistic(TestStatistic* testStatistic) = 0; 0082 0083 /// Set the name of the sampling distribution used for plotting 0084 virtual void SetSamplingDistName(const char* name) = 0; 0085 0086 0087 protected: 0088 ClassDef(TestStatSampler,1) // Interface for tools setting limits (producing confidence intervals) 0089 }; 0090 } 0091 0092 0093 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|