ROOT logo
// @(#)root/roostats:$Id: DebuggingTestStat.h 34109 2010-06-24 15:00:16Z moneta $
// 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_DebuggingTestStat
#define ROOSTATS_DebuggingTestStat

//_________________________________________________
/*
BEGIN_HTML
<p>
DebuggingTestStat is a simple implementation of the DistributionCreator interface used for debugging.
The sampling distribution is uniformly random between [0,1] and is INDEPENDENT of the data.  So it is not useful
for true statistical tests, but it is useful for debugging.
</p>
END_HTML
*/
//

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

#include <vector>

//#include "RooStats/DistributionCreator.h"
#include "RooStats/TestStatistic.h"
#include "RooStats/ToyMCSampler.h"

#include "RooAbsPdf.h"
#include "RooArgSet.h"
#include "RooRealVar.h"
#include "RooDataSet.h"
#include "SamplingDistribution.h"
#include "TRandom.h"

namespace RooStats {

  class DebuggingTestStat : public TestStatistic {

   public:
     DebuggingTestStat() {
       fTestStatistic = new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1);
       fRand = new TRandom();
     }
     virtual ~DebuggingTestStat() {
       //       delete fRand;
       //       delete fTestStatistic;
     }
    
     // Main interface to evaluate the test statistic on a dataset
     virtual Double_t Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/)  {
       //data = data; // avoid warning
       //paramsOfInterest = paramsOfInterest; //avoid warning
       return fRand->Uniform();
     }

   

     
   private:

      RooRealVar* fTestStatistic;
      TRandom* fRand;

   protected:
      ClassDef(DebuggingTestStat,1)   // A concrete implementation of the TestStatistic interface, useful for debugging.
   };

}


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