Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
DebuggingTestStat.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
3/*************************************************************************
4 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOSTATS_DebuggingTestStat
12#define ROOSTATS_DebuggingTestStat
13
14/** \class DebuggingTestStat
15 \ingroup Roostats
16
17DebuggingTestStat is a simple implementation of the DistributionCreator interface used for debugging.
18The sampling distribution is uniformly random between [0,1] and is INDEPENDENT of the data. So it is not useful
19for true statistical tests, but it is useful for debugging.
20
21*/
22
23#include "Rtypes.h"
24
25//#include "RooStats/DistributionCreator.h"
28
29#include "RooAbsPdf.h"
30#include "RooArgSet.h"
31#include "RooRealVar.h"
32#include "RooDataSet.h"
34#include "TRandom.h"
35
36namespace RooStats {
37
39
40 public:
42 fTestStatistic = new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1);
43 fRand = new TRandom();
44 }
46 // delete fRand;
47 // delete fTestStatistic;
48 }
49
50 // Main interface to evaluate the test statistic on a dataset
51 virtual Double_t Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/) {
52 //data = data; // avoid warning
53 //paramsOfInterest = paramsOfInterest; //avoid warning
54 return fRand->Uniform();
55 }
56
57
58
59
60 private:
61
64
65 protected:
66 ClassDef(DebuggingTestStat,1) // A concrete implementation of the TestStatistic interface, useful for debugging.
67 };
68
69}
70
71
72#endif
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:49
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:29
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
virtual Double_t Evaluate(RooAbsData &, RooArgSet &)
Main interface to evaluate the test statistic on a dataset given the values for the Null Parameters O...
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Definition TRandom.cxx:672
Namespace for the RooStats classes.
Definition Asimov.h:19