ROOT  6.06/09
Reference Guide
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
RooStats::AsymptoticCalculator Class Reference

Hypothesis Test Calculator based on the asymptotic formulae for the profile likelihood ratio.

See G. Cowan, K. Cranmer, E. Gross and O. Vitells: Asymptotic formulae for likelihood- based tests of new physics. Eur. Phys. J., C71:1–19, 2011. It provides method to perform an hypothesis tests using the likelihood function and computes the p values for the null and the alternate using the asymptotic formulae for the profile likelihood ratio described in the given paper.

The calculator provides methods to produce the Asimov dataset, i.e a dataset generated where the observade values are equal to the expected ones. The Asimov data set is then used to compute the observed asymptotic p-value for the alternate hypothesis and the asympotic expected p-values.

The asymptotic formulae are valid only for one POI (parameter of interest). So the calculator works only for one-dimesional (one POI) model. If more than one POI exists consider as POI only the first one is used.

Definition at line 46 of file AsymptoticCalculator.h.

Public Member Functions

 AsymptoticCalculator (RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, bool nominalAsimov=false)
 
 ~AsymptoticCalculator ()
 
bool Initialize () const
 initialize the calculator by performin g a global fit and make the Asimov data set More...
 
virtual HypoTestResultGetHypoTest () const
 re-implement HypoTest computation using the asymptotic More...
 
void SetOneSided (bool on)
 set test statistic for one sided (upper limits) More...
 
void SetTwoSided ()
 set the test statistics for two sided (in case of upper limits for discovery does not make really sense) More...
 
void SetOneSidedDiscovery (bool on)
 set the test statistics for one-sided discovery More...
 
virtual void SetNullModel (const ModelConfig &nullModel)
 re-implementation of setters since they are needed to re-initialize the calculator More...
 
virtual void SetAlternateModel (const ModelConfig &altModel)
 
virtual void SetData (RooAbsData &data)
 
bool IsTwoSided () const
 
bool IsOneSidedDiscovery () const
 
void SetQTilde (bool on)
 set using of qtilde, by default is controlled if RoORealVar is limited or not More...
 
const RooArgSetGetBestFitPoi () const
 return snapshot of the best fit parameter More...
 
const RooRealVarGetMuHat () const
 return best fit parameter (firs of poi) More...
 
const RooArgSetGetBestFitParams () const
 return best fit value for all parameters More...
 
- Public Member Functions inherited from RooStats::HypoTestCalculatorGeneric
 HypoTestCalculatorGeneric (const RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, TestStatSampler *sampler=0)
 Constructor. More...
 
 ~HypoTestCalculatorGeneric ()
 
const RooAbsDataGetData (void) const
 
const ModelConfigGetNullModel (void) const
 
virtual const RooArgSetGetFitInfo () const
 
const ModelConfigGetAlternateModel (void) const
 
TestStatSamplerGetTestStatSampler (void) const
 
void UseSameAltToys ()
 to re-use same toys for alternate hypothesis More...
 
- Public Member Functions inherited from RooStats::HypoTestCalculator
virtual ~HypoTestCalculator ()
 
virtual void SetCommonModel (const ModelConfig &model)
 

Static Public Member Functions

static RooAbsDataMakeAsimovData (RooAbsData &data, const ModelConfig &model, const RooArgSet &poiValues, RooArgSet &globObs, const RooArgSet *genPoiValues=0)
 make the asimov data from the ModelConfig and list of poi - return data set annd snapshoot of global obs poiValues is the snapshot of POI used for finding the best buisance parameter values (conditioned at these values) genPoiValues is optionally a different set of POI values used for generating. More...
 
static RooAbsDataMakeAsimovData (const ModelConfig &model, const RooArgSet &allParamValues, RooArgSet &globObs)
 make a nominal asimov data from the ModelConfig and parameter values The parameter values (including the nunisance) could be given from a fit to data or be at the nominal values More...
 
static RooAbsDataGenerateAsimovData (const RooAbsPdf &pdf, const RooArgSet &observables)
 
static double GetExpectedPValues (double pnull, double palt, double nsigma, bool usecls, bool oneSided=true)
 function given the null and the alt p value - return the expected one given the N - sigma value More...
 
static void SetPrintLevel (int level)
 

Static Protected Member Functions

static RooAbsDataGenerateAsimovDataSinglePdf (const RooAbsPdf &pdf, const RooArgSet &obs, const RooRealVar &weightVar, RooCategory *channelCat=0)
 
static RooAbsDataGenerateCountingAsimovData (RooAbsPdf &pdf, const RooArgSet &obs, const RooRealVar &weightVar, RooCategory *channelCat=0)
 
static void FillBins (const RooAbsPdf &pdf, const RooArgList &obs, RooAbsData &data, int &index, double &binVolume, int &ibin)
 
static double EvaluateNLL (RooAbsPdf &pdf, RooAbsData &data, const RooArgSet *condObs, const RooArgSet *poiSet=0)
 
static bool SetObsToExpected (RooAbsPdf &pdf, const RooArgSet &obs)
 
static bool SetObsToExpected (RooProdPdf &prod, const RooArgSet &obs)
 

Protected Attributes

ClassDef(AsymptoticCalculator, 2) private bool fOneSidedDiscovery
 
bool fNominalAsimov
 
bool fIsInitialized
 
int fUseQTilde
 flag to check if calculator is initialized More...
 
double fNLLObs
 
double fNLLAsimov
 
RooAbsDatafAsimovData
 
RooArgSet fAsimovGlobObs
 
RooArgSet fBestFitPoi
 
RooArgSet fBestFitParams
 
- Protected Attributes inherited from RooStats::HypoTestCalculatorGeneric
const ModelConfigfAltModel
 
const ModelConfigfNullModel
 
const RooAbsDatafData
 
TestStatSamplerfTestStatSampler
 
TestStatSamplerfDefaultSampler
 
TestStatisticfDefaultTestStat
 
unsigned int fAltToysSeed
 

Static Protected Attributes

static int fgPrintLevel = 1
 

Additional Inherited Members

- Protected Member Functions inherited from RooStats::HypoTestCalculatorGeneric
virtual int CheckHook (void) const
 
virtual int PreNullHook (RooArgSet *, double) const
 
virtual int PreAltHook (RooArgSet *, double) const
 
virtual void PreHook () const
 
virtual void PostHook () const
 

#include <RooStats/AsymptoticCalculator.h>

+ Inheritance diagram for RooStats::AsymptoticCalculator:
+ Collaboration diagram for RooStats::AsymptoticCalculator:

Constructor & Destructor Documentation

AsymptoticCalculator::AsymptoticCalculator ( RooAbsData data,
const ModelConfig altModel,
const ModelConfig nullModel,
bool  nominalAsimov = false 
)

Definition at line 65 of file AsymptoticCalculator.cxx.

RooStats::AsymptoticCalculator::~AsymptoticCalculator ( )
inline

Definition at line 59 of file AsymptoticCalculator.h.

Member Function Documentation

Double_t AsymptoticCalculator::EvaluateNLL ( RooAbsPdf pdf,
RooAbsData data,
const RooArgSet condObs,
const RooArgSet poiSet = 0 
)
staticprotected

Definition at line 262 of file AsymptoticCalculator.cxx.

Referenced by GetHypoTest(), and Initialize().

void AsymptoticCalculator::FillBins ( const RooAbsPdf pdf,
const RooArgList obs,
RooAbsData data,
int &  index,
double binVolume,
int &  ibin 
)
staticprotected

Definition at line 818 of file AsymptoticCalculator.cxx.

Referenced by GenerateAsimovDataSinglePdf().

RooAbsData * AsymptoticCalculator::GenerateAsimovData ( const RooAbsPdf pdf,
const RooArgSet observables 
)
static

Definition at line 1081 of file AsymptoticCalculator.cxx.

Referenced by MakeAsimovData().

RooAbsData * AsymptoticCalculator::GenerateAsimovDataSinglePdf ( const RooAbsPdf pdf,
const RooArgSet obs,
const RooRealVar weightVar,
RooCategory channelCat = 0 
)
staticprotected

Definition at line 1003 of file AsymptoticCalculator.cxx.

Referenced by GenerateAsimovData().

RooAbsData * AsymptoticCalculator::GenerateCountingAsimovData ( RooAbsPdf pdf,
const RooArgSet obs,
const RooRealVar weightVar,
RooCategory channelCat = 0 
)
staticprotected

Definition at line 968 of file AsymptoticCalculator.cxx.

Referenced by GenerateAsimovDataSinglePdf().

const RooArgSet& RooStats::AsymptoticCalculator::GetBestFitParams ( ) const
inline

return best fit value for all parameters

Definition at line 122 of file AsymptoticCalculator.h.

const RooArgSet& RooStats::AsymptoticCalculator::GetBestFitPoi ( ) const
inline

return snapshot of the best fit parameter

Definition at line 118 of file AsymptoticCalculator.h.

double AsymptoticCalculator::GetExpectedPValues ( double  pnull,
double  palt,
double  nsigma,
bool  usecls,
bool  oneSided = true 
)
static

function given the null and the alt p value - return the expected one given the N - sigma value

Definition at line 770 of file AsymptoticCalculator.cxx.

Referenced by RooStats::HypoTestInverterResult::GetExpectedPValueDist().

HypoTestResult * AsymptoticCalculator::GetHypoTest ( ) const
virtual

re-implement HypoTest computation using the asymptotic

It performs an hypothesis tests using the likelihood function and computes the p values for the null and the alternate using the asymptotic formulae for the profile likelihood ratio.

See G. Cowan, K. Cranmer, E. Gross and O. Vitells. Asymptotic formulae for likelihood- based tests of new physics. Eur. Phys. J., C71:1–19, 2011. The formulae are valid only for one POI. If more than one POI exists consider as POI only the first one

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 441 of file AsymptoticCalculator.cxx.

const RooRealVar* RooStats::AsymptoticCalculator::GetMuHat ( ) const
inline

return best fit parameter (firs of poi)

Definition at line 120 of file AsymptoticCalculator.h.

bool AsymptoticCalculator::Initialize ( ) const

initialize the calculator by performin g a global fit and make the Asimov data set

Definition at line 94 of file AsymptoticCalculator.cxx.

Referenced by AsymptoticCalculator(), and GetHypoTest().

bool RooStats::AsymptoticCalculator::IsOneSidedDiscovery ( ) const
inline

Definition at line 111 of file AsymptoticCalculator.h.

bool RooStats::AsymptoticCalculator::IsTwoSided ( ) const
inline

Definition at line 110 of file AsymptoticCalculator.h.

Referenced by RooStats::HypoTestInverter::CreateResults().

RooAbsData * AsymptoticCalculator::MakeAsimovData ( RooAbsData realData,
const ModelConfig model,
const RooArgSet paramValues,
RooArgSet asimovGlobObs,
const RooArgSet genPoiValues = 0 
)
static

make the asimov data from the ModelConfig and list of poi - return data set annd snapshoot of global obs poiValues is the snapshot of POI used for finding the best buisance parameter values (conditioned at these values) genPoiValues is optionally a different set of POI values used for generating.

static function to the an Asimov data set given an observed dat set, a model and a snapshot of poi.

By default the same POI are used for generating and for finding the nuisance parameters

Return the asimov data set + global observables set to values satisfying the constraints

Definition at line 1153 of file AsymptoticCalculator.cxx.

Referenced by Initialize().

RooAbsData * AsymptoticCalculator::MakeAsimovData ( const ModelConfig model,
const RooArgSet allParamValues,
RooArgSet globObs 
)
static

make a nominal asimov data from the ModelConfig and parameter values The parameter values (including the nunisance) could be given from a fit to data or be at the nominal values

static function to the an Asimov data set given the model and the values of all parameters including the nuisance Return the asimov data set + global observables set to values satisfying the constraints

Definition at line 1256 of file AsymptoticCalculator.cxx.

virtual void RooStats::AsymptoticCalculator::SetAlternateModel ( const ModelConfig altModel)
inlinevirtual

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 100 of file AsymptoticCalculator.h.

virtual void RooStats::AsymptoticCalculator::SetData ( RooAbsData data)
inlinevirtual

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 104 of file AsymptoticCalculator.h.

virtual void RooStats::AsymptoticCalculator::SetNullModel ( const ModelConfig nullModel)
inlinevirtual

re-implementation of setters since they are needed to re-initialize the calculator

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 96 of file AsymptoticCalculator.h.

bool AsymptoticCalculator::SetObsToExpected ( RooAbsPdf pdf,
const RooArgSet obs 
)
staticprotected

Definition at line 912 of file AsymptoticCalculator.cxx.

Referenced by GenerateCountingAsimovData(), and SetObsToExpected().

bool AsymptoticCalculator::SetObsToExpected ( RooProdPdf prod,
const RooArgSet obs 
)
staticprotected

Definition at line 882 of file AsymptoticCalculator.cxx.

void RooStats::AsymptoticCalculator::SetOneSided ( bool  on)
inline

set test statistic for one sided (upper limits)

Definition at line 86 of file AsymptoticCalculator.h.

void RooStats::AsymptoticCalculator::SetOneSidedDiscovery ( bool  on)
inline

set the test statistics for one-sided discovery

Definition at line 93 of file AsymptoticCalculator.h.

void AsymptoticCalculator::SetPrintLevel ( int  level)
static

Definition at line 58 of file AsymptoticCalculator.cxx.

void RooStats::AsymptoticCalculator::SetQTilde ( bool  on)
inline

set using of qtilde, by default is controlled if RoORealVar is limited or not

Definition at line 115 of file AsymptoticCalculator.h.

void RooStats::AsymptoticCalculator::SetTwoSided ( )
inline

set the test statistics for two sided (in case of upper limits for discovery does not make really sense)

Definition at line 90 of file AsymptoticCalculator.h.

Member Data Documentation

RooAbsData* RooStats::AsymptoticCalculator::fAsimovData
mutableprotected

Definition at line 163 of file AsymptoticCalculator.h.

Referenced by GetHypoTest(), and Initialize().

RooArgSet RooStats::AsymptoticCalculator::fAsimovGlobObs
mutableprotected

Definition at line 164 of file AsymptoticCalculator.h.

Referenced by GetHypoTest(), and Initialize().

RooArgSet RooStats::AsymptoticCalculator::fBestFitParams
mutableprotected

Definition at line 166 of file AsymptoticCalculator.h.

Referenced by GetHypoTest(), and Initialize().

RooArgSet RooStats::AsymptoticCalculator::fBestFitPoi
mutableprotected
int AsymptoticCalculator::fgPrintLevel = 1
staticprotected
bool RooStats::AsymptoticCalculator::fIsInitialized
mutableprotected
double RooStats::AsymptoticCalculator::fNLLAsimov
mutableprotected

Definition at line 161 of file AsymptoticCalculator.h.

Referenced by GetHypoTest(), and Initialize().

double RooStats::AsymptoticCalculator::fNLLObs
mutableprotected

Definition at line 160 of file AsymptoticCalculator.h.

Referenced by GetHypoTest(), and Initialize().

bool RooStats::AsymptoticCalculator::fNominalAsimov
protected

Definition at line 156 of file AsymptoticCalculator.h.

Referenced by Initialize().

ClassDef (AsymptoticCalculator,2) private bool RooStats::AsymptoticCalculator::fOneSidedDiscovery
mutableprotected
int RooStats::AsymptoticCalculator::fUseQTilde
mutableprotected

flag to check if calculator is initialized

Definition at line 158 of file AsymptoticCalculator.h.

Referenced by GetHypoTest(), and SetQTilde().


The documentation for this class was generated from the following files: