#ifndef ROOSTATS_HypoTestInverter
#define ROOSTATS_HypoTestInverter
#ifndef ROOSTATS_IntervalCalculator
#include "RooStats/IntervalCalculator.h"
#endif
#ifndef ROOSTATS_HypoTestCalculator
#include "RooStats/HypoTestCalculator.h"
#endif
#ifndef ROOSTATS_HypoTestInverterResult
#include "RooStats/HypoTestInverterResult.h"
#endif
class RooRealVar;
namespace RooStats {
class HypoTestInverter : public IntervalCalculator, public TNamed {
public:
HypoTestInverter();
HypoTestInverter( HypoTestCalculator& myhc0,
RooRealVar& scannedVariable,
double size = 0.05) ;
virtual HypoTestInverterResult* GetInterval() const { return fResults; } ;
bool RunAutoScan( double xMin, double xMax, double target, double epsilon=0.005, unsigned int numAlgorithm=0 );
bool RunFixedScan( int nBins, double xMin, double xMax );
bool RunOnePoint( double thisX );
void UseCLs( bool on = true) { fUseCLs = on; if (fResults) fResults->UseCLs(on); }
virtual void SetData(RooAbsData &) { }
virtual void SetModel(const ModelConfig &) { }
virtual void SetTestSize(Double_t size) {fSize = size; if (fResults) fResults->SetTestSize(size); }
virtual void SetConfidenceLevel(Double_t cl) {fSize = 1.-cl; if (fResults) fResults->SetConfidenceLevel(cl); }
virtual Double_t Size() const {return fSize;}
virtual Double_t ConfidenceLevel() const {return 1.-fSize;}
virtual ~HypoTestInverter() ;
private:
void CreateResults();
HypoTestCalculator* fCalculator0;
RooRealVar* fScannedVariable;
HypoTestInverterResult* fResults;
bool fUseCLs;
double fSize;
protected:
ClassDef(HypoTestInverter,1)
};
}
#endif