Logo ROOT  
Reference Guide
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 <vector>
26
27//#include "RooStats/DistributionCreator.h"
30
31#include "RooAbsPdf.h"
32#include "RooArgSet.h"
33#include "RooRealVar.h"
34#include "RooDataSet.h"
36#include "TRandom.h"
37
38namespace RooStats {
39
41
42 public:
44 fTestStatistic = new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1);
45 fRand = new TRandom();
46 }
48 // delete fRand;
49 // delete fTestStatistic;
50 }
51
52 // Main interface to evaluate the test statistic on a dataset
53 virtual Double_t Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/) {
54 //data = data; // avoid warning
55 //paramsOfInterest = paramsOfInterest; //avoid warning
56 return fRand->Uniform();
57 }
58
59
60
61
62 private:
63
66
67 protected:
68 ClassDef(DebuggingTestStat,1) // A concrete implementation of the TestStatistic interface, useful for debugging.
69 };
70
71}
72
73
74#endif
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:326
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:39
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:35
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...
Definition: TestStatistic.h:31
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:635
Namespace for the RooStats classes.
Definition: Asimov.h:20