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
27
28#include "RooAbsPdf.h"
29#include "RooArgSet.h"
30#include "RooRealVar.h"
31#include "RooDataSet.h"
33#include "TRandom.h"
34
35namespace RooStats {
36
38
39 public:
41 fTestStatistic{new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1)},
42 fRand{new TRandom()}
43 {}
44
45 /// Main interface to evaluate the test statistic on a dataset
46 double Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/) override {
47 //data = data; // avoid warning
48 //paramsOfInterest = paramsOfInterest; //avoid warning
49 return fRand->Uniform();
50 }
51
52
53
54
55 private:
56
59
60 protected:
61 ClassDefOverride(DebuggingTestStat,1) // A concrete implementation of the TestStatistic interface, useful for debugging.
62 };
63
64}
65
66
67#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Variable that can be changed from the outside.
Definition RooRealVar.h:37
double Evaluate(RooAbsData &, RooArgSet &) override
Main interface to evaluate the test statistic on a dataset.
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:682
Namespace for the RooStats classes.
Definition Asimov.h:19