// @(#)root/roostats:$Id$ // Author: Sven Kreiss, Kyle Cranmer Nov 2010 /************************************************************************* * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOSTATS_AsymptoticCalculator #define ROOSTATS_AsymptoticCalculator //_________________________________________________ /* BEGIN_HTML
Calculator based on Asymptotic formula, on the ProfileLikelihood and the Asimov data set
END_HTML */ // #ifndef ROOSTATS_HypoTestCalculatorGeneric #include "RooStats/HypoTestCalculatorGeneric.h" #endif class RooArgSet; class RooPoisson; class RooProdPdf; namespace RooStats { class AsymptoticCalculator : public HypoTestCalculatorGeneric { public: AsymptoticCalculator( RooAbsData &data, // need to pass non-const since RooAbsPdf::fitTo takes a non-const data set const ModelConfig &altModel, const ModelConfig &nullModel, bool nominalAsimov = false ); // HypoTestCalculatorGeneric(data, altModel, nullModel, 0) // { // } ~AsymptoticCalculator() { } // re-implement HypoTest computation using the asymptotic virtual HypoTestResult *GetHypoTest() const; // 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. By default the same POI are used for generating and for finding the nuisance parameters static RooAbsData * MakeAsimovData( RooAbsData & data, const ModelConfig & model, const RooArgSet & poiValues, RooArgSet & globObs, const RooArgSet * genPoiValues = 0); // 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 RooAbsData * MakeAsimovData( const ModelConfig & model, const RooArgSet & allParamValues, RooArgSet & globObs); static RooAbsData * GenerateAsimovData(const RooAbsPdf & pdf, const RooArgSet & observables ); // function given the null and the alt p value - return the expected one given the N - sigma value static double GetExpectedPValues(double pnull, double palt, double nsigma, bool usecls, bool oneSided = true ); // set test statistic for one sided (upper limits) void SetOneSided(bool on) { fOneSided = on; } // set the test statistics for two sided (in case of upper limits // for discovery does not make really sense) void SetTwoSided() { fOneSided = false; fOneSidedDiscovery = false;} // set the test statistics for one-sided discovery void SetOneSidedDiscovery(bool on) { fOneSidedDiscovery = on; } bool IsTwoSided() const { return (!fOneSided && !fOneSidedDiscovery); } bool IsOneSidedDiscovery() const { return fOneSidedDiscovery; } // set using of qtilde, by default is controlled if RoORealVar is limited or not void SetQTilde(bool on) { fUseQTilde = on; } // return snapshot of the best fit parameter const RooArgSet & GetBestFitPoi() const { return fBestFitPoi; } // return best fit parameter (firs of poi) const RooRealVar * GetMuHat() const { return dynamic_cast