ROOT logo
ROOT » ROOFIT » ROOSTATS » RooStats::HypoTestInverter

class RooStats::HypoTestInverter: public RooStats::IntervalCalculator, public TNamed


   HypoTestInverter class for performing an hypothesis test inversion by scanning the hypothesis test results of the
  HybridCalculator  for various values of the parameter of interest. By looking at the confidence level curve of
 the result  an upper limit, where it intersects the desired confidence level, can be derived.
 The class implements the RooStats::IntervalCalculator interface and returns an  RooStats::HypoTestInverterResult class.
 The result is a SimpleInterval, which via the method UpperLimit returns to the user the upper limit value.

The  HypoTestInverter implements various option for performing the scan. HypoTestInverter::RunFixedScan will scan using a fixed grid the parameter of interest. HypoTestInverter::RunAutoScan will perform an automatic scan to find optimally the curve and it will stop until the desired precision is obtained.
The confidence level value at a given point can be done via  HypoTestInverter::RunOnePoint.
The class can scan the CLs+b values or alternativly CLs (if the method HypoTestInverter::UseCLs has been called).


   New contributions to this class have been written by Matthias Wolf (advanced AutoRun algorithm)

Function Members (Methods)

public:
virtual~HypoTestInverter()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Double_tConfidenceLevel() const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual RooStats::HypoTestInverterResult*GetInterval() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
RooStats::HypoTestInverterHypoTestInverter()
RooStats::HypoTestInverterHypoTestInverter(const RooStats::HypoTestInverter&)
RooStats::HypoTestInverterHypoTestInverter(RooStats::HypoTestCalculator& myhc0, RooRealVar& scannedVariable, double size = 0.05)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
RooStats::HypoTestInverter&operator=(const RooStats::HypoTestInverter&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
boolRunAutoScan(double xMin, double xMax, double target, double epsilon = 0.005, unsigned int numAlgorithm = 0)
boolRunFixedScan(int nBins, double xMin, double xMax)
boolRunOnePoint(double thisX)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetConfidenceLevel(Double_t cl)
virtual voidSetData(RooAbsData&)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetModel(const RooStats::ModelConfig&)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetTestSize(Double_t size)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Double_tSize() const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidUseCLs(bool on = true)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidCreateResults()

Data Members

protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
RooStats::HypoTestCalculator*fCalculator0pointer to the calculator passed in the constructor
RooStats::HypoTestInverterResult*fResults
RooRealVar*fScannedVariablepointer to the constrained variable
doublefSize
boolfUseCLs

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HypoTestInverter()
 default constructor (doesn't do anything)
HypoTestInverter(RooStats::HypoTestCalculator& myhc0, RooRealVar& scannedVariable, double size = 0.05)
 constructor from a reference to an HypoTestCalculator
 (it must be an HybridCalculator type) and a RooRealVar for the variable
~HypoTestInverter()
 destructor
void CreateResults()
 create a new HypoTestInverterResult to hold all computed results
bool RunAutoScan(double xMin, double xMax, double target, double epsilon = 0.005, unsigned int numAlgorithm = 0)
 Search for the value of the parameter of interest (vary the
 hypothesis being tested) in the specified range [xMin,xMax]
 until the confidence level is compatible with the target value
 within one time the estimated error (and the estimated error
 should also become smaller than the specified parameter epsilon)
bool RunFixedScan(int nBins, double xMin, double xMax)
 Run a Fixed scan in npoints between min and max
bool RunOnePoint(double thisX)
 run only one point
HypoTestInverter()
 default constructor (used only for I/O)
HypoTestInverterResult* GetInterval() const
{ return fResults; }
void UseCLs(bool on = true)
{ fUseCLs = on; if (fResults) fResults->UseCLs(on); }
void SetData(RooAbsData& )
{ }
void SetModel(const RooStats::ModelConfig& )
{ }
void SetTestSize(Double_t size)
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
{fSize = size; if (fResults) fResults->SetTestSize(size); }
void SetConfidenceLevel(Double_t cl)
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{fSize = 1.-cl; if (fResults) fResults->SetConfidenceLevel(cl); }
Double_t Size() const
 Get the size of the test (eg. rate of Type I error)
{return fSize;}
Double_t ConfidenceLevel() const
 Get the Confidence level for the test
{return 1.-fSize;}