Logo ROOT   6.14/05
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 
17 DebuggingTestStat is a simple implementation of the DistributionCreator interface used for debugging.
18 The sampling distribution is uniformly random between [0,1] and is INDEPENDENT of the data. So it is not useful
19 for 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"
28 #include "RooStats/TestStatistic.h"
29 #include "RooStats/ToyMCSampler.h"
30 
31 #include "RooAbsPdf.h"
32 #include "RooArgSet.h"
33 #include "RooRealVar.h"
34 #include "RooDataSet.h"
35 #include "SamplingDistribution.h"
36 #include "TRandom.h"
37 
38 namespace RooStats {
39 
41 
42  public:
44  fTestStatistic = new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1);
45  fRand = new TRandom();
46  }
47  virtual ~DebuggingTestStat() {
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
virtual Double_t Evaluate(RooAbsData &, RooArgSet &)
Main interface to evaluate the test statistic on a dataset given the values for the Null Parameters O...
#define ClassDef(name, id)
Definition: Rtypes.h:320
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
Namespace for the RooStats classes.
Definition: Asimov.h:20
double Double_t
Definition: RtypesCore.h:55
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Definition: TRandom.cxx:627
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
Definition: TestStatistic.h:31