00001 // @(#)root/roostats:$Id: DebuggingTestStat.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_DebuggingTestStat 00012 #define ROOSTATS_DebuggingTestStat 00013 00014 //_________________________________________________ 00015 /* 00016 BEGIN_HTML 00017 <p> 00018 DebuggingTestStat is a simple implementation of the DistributionCreator interface used for debugging. 00019 The sampling distribution is uniformly random between [0,1] and is INDEPENDENT of the data. So it is not useful 00020 for true statistical tests, but it is useful for debugging. 00021 </p> 00022 END_HTML 00023 */ 00024 // 00025 00026 #ifndef ROOT_Rtypes 00027 #include "Rtypes.h" 00028 #endif 00029 00030 #include <vector> 00031 00032 //#include "RooStats/DistributionCreator.h" 00033 #include "RooStats/TestStatistic.h" 00034 #include "RooStats/ToyMCSampler.h" 00035 00036 #include "RooAbsPdf.h" 00037 #include "RooArgSet.h" 00038 #include "RooRealVar.h" 00039 #include "RooDataSet.h" 00040 #include "SamplingDistribution.h" 00041 #include "TRandom.h" 00042 00043 namespace RooStats { 00044 00045 class DebuggingTestStat : public TestStatistic { 00046 00047 public: 00048 DebuggingTestStat() { 00049 fTestStatistic = new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1); 00050 fRand = new TRandom(); 00051 } 00052 virtual ~DebuggingTestStat() { 00053 // delete fRand; 00054 // delete fTestStatistic; 00055 } 00056 00057 // Main interface to evaluate the test statistic on a dataset 00058 virtual Double_t Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/) { 00059 //data = data; // avoid warning 00060 //paramsOfInterest = paramsOfInterest; //avoid warning 00061 return fRand->Uniform(); 00062 } 00063 00064 00065 00066 00067 private: 00068 00069 RooRealVar* fTestStatistic; 00070 TRandom* fRand; 00071 00072 protected: 00073 ClassDef(DebuggingTestStat,1) // A concrete implementation of the TestStatistic interface, useful for debugging. 00074 }; 00075 00076 } 00077 00078 00079 #endif