Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
HypoTestInverterOriginal.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_HypoTestInverterOriginal
12 #define ROOSTATS_HypoTestInverterOriginal
13 
14 
15 
17 
19 
21 
22 class RooRealVar;
23 
24 
25 namespace RooStats {
26 
27  class HypoTestInverterOriginal : public IntervalCalculator, public TNamed {
28 
29  public:
30 
31  // default constructor (used only for I/O)
32  HypoTestInverterOriginal();
33 
34 
35  // constructor
36  HypoTestInverterOriginal( HypoTestCalculator& myhc0,
37  RooRealVar& scannedVariable,
38  double size = 0.05) ;
39 
40 
41 
42  virtual HypoTestInverterResult* GetInterval() const { return fResults; } ;
43 
44  bool RunAutoScan( double xMin, double xMax, double target, double epsilon=0.005, unsigned int numAlgorithm=0 );
45 
46  bool RunFixedScan( int nBins, double xMin, double xMax );
47 
48  bool RunOnePoint( double thisX );
49 
50  void UseCLs( bool on = true) { fUseCLs = on; if (fResults) fResults->UseCLs(on); }
51 
52  virtual void SetData(RooAbsData &) { } // not needed
53 
54  virtual void SetModel(const ModelConfig &) { } // not needed
55 
56  // set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
57  virtual void SetTestSize(Double_t size) {fSize = size; if (fResults) fResults->SetTestSize(size); }
58  // set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
59  virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl; if (fResults) fResults->SetConfidenceLevel(cl); }
60  // Get the size of the test (eg. rate of Type I error)
61  virtual Double_t Size() const {return fSize;}
62  // Get the Confidence level for the test
63  virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
64 
65  // destructor
66  virtual ~HypoTestInverterOriginal() ;
67 
68  private:
69 
70  void CreateResults();
71 
72  HypoTestCalculator* fCalculator0; // pointer to the calculator passed in the constructor
73  RooRealVar* fScannedVariable; // pointer to the constrained variable
74  HypoTestInverterResult* fResults;
75 
76  bool fUseCLs;
77  double fSize;
78 
79  protected:
80 
81  ClassDef(HypoTestInverterOriginal,1) // HypoTestInverterOriginal class
82 
83  };
84 }
85 
86 #endif