Logo ROOT   6.08/07
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 //_________________________________________________
15 /*
16 BEGIN_HTML
17 <p>
18 DebuggingTestStat is a simple implementation of the DistributionCreator interface used for debugging.
19 The sampling distribution is uniformly random between [0,1] and is INDEPENDENT of the data. So it is not useful
20 for true statistical tests, but it is useful for debugging.
21 </p>
22 END_HTML
23 */
24 //
25 
26 #ifndef ROOT_Rtypes
27 #include "Rtypes.h"
28 #endif
29 
30 #include <vector>
31 
32 //#include "RooStats/DistributionCreator.h"
33 #include "RooStats/TestStatistic.h"
34 #include "RooStats/ToyMCSampler.h"
35 
36 #include "RooAbsPdf.h"
37 #include "RooArgSet.h"
38 #include "RooRealVar.h"
39 #include "RooDataSet.h"
40 #include "SamplingDistribution.h"
41 #include "TRandom.h"
42 
43 namespace RooStats {
44 
46 
47  public:
49  fTestStatistic = new RooRealVar("UniformTestStatistic","UniformTestStatistic",0,0,1);
50  fRand = new TRandom();
51  }
52  virtual ~DebuggingTestStat() {
53  // delete fRand;
54  // delete fTestStatistic;
55  }
56 
57  // Main interface to evaluate the test statistic on a dataset
58  virtual Double_t Evaluate(RooAbsData& /*data*/, RooArgSet& /*paramsOfInterest*/) {
59  //data = data; // avoid warning
60  //paramsOfInterest = paramsOfInterest; //avoid warning
61  return fRand->Uniform();
62  }
63 
64 
65 
66 
67  private:
68 
71 
72  protected:
73  ClassDef(DebuggingTestStat,1) // A concrete implementation of the TestStatistic interface, useful for debugging.
74  };
75 
76 }
77 
78 
79 #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:254
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:31
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:37
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:606
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
Definition: TestStatistic.h:33