00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ROOSTATS_HypoTestInverter
00012 #define ROOSTATS_HypoTestInverter
00013
00014
00015
00016 #ifndef ROOSTATS_IntervalCalculator
00017 #include "RooStats/IntervalCalculator.h"
00018 #endif
00019
00020 #ifndef ROOSTATS_HypoTestCalculator
00021 #include "RooStats/HypoTestCalculator.h"
00022 #endif
00023
00024 #ifndef ROOSTATS_HypoTestInverterResult
00025 #include "RooStats/HypoTestInverterResult.h"
00026 #endif
00027
00028 class RooRealVar;
00029
00030
00031 namespace RooStats {
00032
00033 class HypoTestInverter : public IntervalCalculator, public TNamed {
00034
00035 public:
00036
00037
00038 HypoTestInverter();
00039
00040
00041
00042 HypoTestInverter( HypoTestCalculator& myhc0,
00043 RooRealVar& scannedVariable,
00044 double size = 0.05) ;
00045
00046
00047
00048 virtual HypoTestInverterResult* GetInterval() const { return fResults; } ;
00049
00050 bool RunAutoScan( double xMin, double xMax, double target, double epsilon=0.005, unsigned int numAlgorithm=0 );
00051
00052 bool RunFixedScan( int nBins, double xMin, double xMax );
00053
00054 bool RunOnePoint( double thisX );
00055
00056 void UseCLs( bool on = true) { fUseCLs = on; if (fResults) fResults->UseCLs(on); }
00057
00058 virtual void SetData(RooAbsData &) { }
00059
00060 virtual void SetModel(const ModelConfig &) { }
00061
00062
00063 virtual void SetTestSize(Double_t size) {fSize = size; if (fResults) fResults->SetTestSize(size); }
00064
00065 virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl; if (fResults) fResults->SetConfidenceLevel(cl); }
00066
00067 virtual Double_t Size() const {return fSize;}
00068
00069 virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
00070
00071
00072 virtual ~HypoTestInverter() ;
00073
00074 private:
00075
00076 void CreateResults();
00077
00078 HypoTestCalculator* fCalculator0;
00079 RooRealVar* fScannedVariable;
00080 HypoTestInverterResult* fResults;
00081
00082 bool fUseCLs;
00083 double fSize;
00084
00085 protected:
00086
00087 ClassDef(HypoTestInverter,1)
00088
00089 };
00090 }
00091
00092 #endif