ROOT logo
ROOT » ROOFIT » ROOSTATS » RooStats::AsymptoticCalculator

class RooStats::AsymptoticCalculator: public RooStats::HypoTestCalculatorGeneric

Function Members (Methods)

public:
virtual~AsymptoticCalculator()
RooStats::AsymptoticCalculatorAsymptoticCalculator(const RooStats::AsymptoticCalculator&)
RooStats::AsymptoticCalculatorAsymptoticCalculator(RooAbsData& data, const RooStats::ModelConfig& altModel, const RooStats::ModelConfig& nullModel)
static TClass*Class()
static RooAbsData*GenerateAsimovData(const RooAbsPdf& pdf, const RooArgSet& observables)
const RooStats::ModelConfig*RooStats::HypoTestCalculatorGeneric::GetAlternateModel() const
const RooAbsData*RooStats::HypoTestCalculatorGeneric::GetData() const
static doubleGetExpectedPValues(double pnull, double palt, double nsigma, bool usecls)
virtual RooStats::HypoTestResult*GetHypoTest() const
const RooStats::ModelConfig*RooStats::HypoTestCalculatorGeneric::GetNullModel() const
RooStats::TestStatSampler*RooStats::HypoTestCalculatorGeneric::GetTestStatSampler() const
RooStats::HypoTestCalculatorGenericRooStats::HypoTestCalculatorGeneric::HypoTestCalculatorGeneric(const RooStats::HypoTestCalculatorGeneric&)
RooStats::HypoTestCalculatorGenericRooStats::HypoTestCalculatorGeneric::HypoTestCalculatorGeneric(const RooAbsData& data, const RooStats::ModelConfig& altModel, const RooStats::ModelConfig& nullModel, RooStats::TestStatSampler* sampler = 0)
virtual TClass*IsA() const
static RooAbsData*MakeAsimovData(RooAbsData& data, const RooStats::ModelConfig& model, const RooArgSet& paramValues, RooArgSet& globObs)
RooStats::HypoTestCalculator&RooStats::HypoTestCalculator::operator=(const RooStats::HypoTestCalculator&)
virtual voidRooStats::HypoTestCalculatorGeneric::SetAlternateModel(const RooStats::ModelConfig& altModel)
virtual voidRooStats::HypoTestCalculator::SetCommonModel(const RooStats::ModelConfig& model)
virtual voidRooStats::HypoTestCalculatorGeneric::SetData(RooAbsData& data)
virtual voidRooStats::HypoTestCalculatorGeneric::SetNullModel(const RooStats::ModelConfig& nullModel)
voidSetOneSided(bool on)
static voidSetPrintLevel(int level)
voidSetQTilde(bool on)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
virtual intRooStats::HypoTestCalculatorGeneric::CheckHook() const
static doubleEvaluateNLL(RooAbsPdf& pdf, RooAbsData& data, const RooArgSet* poiSet = 0)
static voidFillBins(const RooAbsPdf& pdf, const RooArgList& obs, RooAbsData& data, int& index, double& binVolume, int& ibin)
static RooAbsData*GenerateAsimovDataSinglePdf(const RooAbsPdf& pdf, const RooArgSet& obs, const RooRealVar& weightVar, RooCategory* channelCat = 0)
static RooAbsData*GenerateCountingAsimovData(RooAbsPdf& pdf, const RooArgSet& obs, const RooRealVar& weightVar, RooCategory* channelCat = 0)
virtual intRooStats::HypoTestCalculatorGeneric::PreAltHook(RooArgSet*, double) const
virtual intRooStats::HypoTestCalculatorGeneric::PreNullHook(RooArgSet*, double) const
static voidSetObsToExpected(RooProdPdf& prod, const RooArgSet& obs)
static voidSetObsToExpected(RooPoisson& pois, const RooArgSet& obs)

Data Members

private:
RooAbsData*fAsimovDataasimov data set
RooArgSetfAsimovGlobObssnapshot of Asimov global observables
RooArgSetfBestFitPoisnapshot of best fitted POI values
doublefNLLAsimov
doublefNLLObs
boolfOneSided
intfUseQTildeflag to indicate if using qtilde or not (-1 (default based on RooRealVar)), 0 false, 1 (true)
static intfgPrintLevelcontrol print level (0 minimal, 1 normal, 2 debug)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void SetPrintLevel(int level)
 set print level (static function)
 0 minimal, 1 normal,  2 debug
AsymptoticCalculator(RooAbsData& data, const RooStats::ModelConfig& altModel, const RooStats::ModelConfig& nullModel)
 constructor for asymptotic calculator from Data set  and ModelConfig
 The constructor will perform a global fit of the model to the data
 and build an Asimov data set.
 It will then also fit the model to the Asimov data set to find the likelihood value
 of the Asimov data set
 NOTE: If a fit has been done before, one for speeding up could set all the initial prameters
 to the fit value and in addition set the null snapshot to the best fit
Double_t EvaluateNLL(RooAbsPdf& pdf, RooAbsData& data, const RooArgSet* poiSet = 0)
HypoTestResult* GetHypoTest() const
 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
double GetExpectedPValues(double pnull, double palt, double nsigma, bool usecls)
 function given the null and the alt p value - return the expected one given the N - sigma value
void FillBins(const RooAbsPdf& pdf, const RooArgList& obs, RooAbsData& data, int& index, double& binVolume, int& ibin)
 fill bins by looping recursivly on observables
void SetObsToExpected(RooProdPdf& prod, const RooArgSet& obs)
 iterate a Prod pdf to find the Poisson part to set the observed value to expected one
void SetObsToExpected(RooPoisson& pois, const RooArgSet& obs)
 set observed value in Poisson to the expected one
 need to iterate on the components of the POisson to get n and nu (nu can be a RooAbsReal)
 (code from G. Petrucciani)
RooAbsData * GenerateCountingAsimovData(RooAbsPdf& pdf, const RooArgSet& obs, const RooRealVar& weightVar, RooCategory* channelCat = 0)
 generate countuing Asimov data for the case when the pdf cannot be extended
 assume pdf is a RooPoisson or can be decomposed in a product of RooPoisson,
 otherwise we cannot know how to make the Asimov data sets in the other cases
RooAbsData * GenerateAsimovDataSinglePdf(const RooAbsPdf& pdf, const RooArgSet& obs, const RooRealVar& weightVar, RooCategory* channelCat = 0)
 compute the asimov data set for an observable of a pdf
 use the number of bins sets in the observables
 to do :  (possibility to change number of bins)
 impelment integration over bin content
RooAbsData * GenerateAsimovData(const RooAbsPdf& pdf, const RooArgSet& observables)
 generate the asimov data for the observables (not the global ones)
 need to deal with the case of a sim pdf
RooAbsData * MakeAsimovData(RooAbsData& data, const RooStats::ModelConfig& model, const RooArgSet& paramValues, RooArgSet& globObs)
 static function to the an Asimov data set
 given an observed dat set, a model and a snapshot of poi.
 Return the asimov data set + global observables set to values satisfying the constraints
AsymptoticCalculator(RooAbsData& data, const RooStats::ModelConfig& altModel, const RooStats::ModelConfig& nullModel)
    HypoTestCalculatorGeneric(data, altModel, nullModel, 0)
 {
 }
void SetOneSided(bool on)
 get expected limit
      static void GetExpectedLimit(double nsigma, double alpha, double &clsblimit, double &clslimit);
{ fOneSided = on; }
void SetQTilde(bool on)
 set using of qtilde, by default is controlled if RoORealVar is limited or not
{ fUseQTilde = on; }