|
|
|||
File indexing completed on 2025-12-16 10:29:44
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_DebuggingTestStat 0012 #define ROOSTATS_DebuggingTestStat 0013 0014 /** \class DebuggingTestStat 0015 \ingroup Roostats 0016 0017 DebuggingTestStat is a simple implementation of the DistributionCreator interface used for debugging. 0018 The sampling distribution is uniformly random between [0,1] and is INDEPENDENT of the data. So it is not useful 0019 for true statistical tests, but it is useful for debugging. 0020 0021 */ 0022 0023 #include "Rtypes.h" 0024 0025 #include "RooStats/TestStatistic.h" 0026 #include "RooStats/ToyMCSampler.h" 0027 0028 #include "RooAbsPdf.h" 0029 #include "RooArgSet.h" 0030 #include "RooRealVar.h" 0031 #include "RooDataSet.h" 0032 #include "SamplingDistribution.h" 0033 #include "TRandom.h" 0034 0035 namespace RooStats { 0036 0037 class DebuggingTestStat : public TestStatistic { 0038 0039 public: 0040 DebuggingTestStat() : 0041 fTestStatistic{new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1)}, 0042 fRand{new TRandom()} 0043 {} 0044 0045 /// Main interface to evaluate the test statistic on a dataset 0046 double Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/) override { 0047 //data = data; // avoid warning 0048 //paramsOfInterest = paramsOfInterest; //avoid warning 0049 return fRand->Uniform(); 0050 } 0051 0052 0053 0054 0055 private: 0056 0057 RooRealVar* fTestStatistic; 0058 TRandom* fRand; 0059 0060 protected: 0061 ClassDefOverride(DebuggingTestStat,1) // A concrete implementation of the TestStatistic interface, useful for debugging. 0062 }; 0063 0064 } 0065 0066 0067 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|