Logo ROOT  
Reference Guide

Factory classes to create RooFit workspaces from histograms.

For documentation see CERN-OPEN-2012-016.

For tutorials see HistFactory Tutorials.


namespace  RooStats
 Namespace for the RooStats classes.


class  RooStats::HistFactory::Asimov
 TODO Here, we are missing some documentation. More...
class  RooStats::HistFactory::Channel
 This class encapsulates all information for the statistical interpretation of one experiment. More...
class  RooStats::HistFactory::ConfigParser
 TODO Add documentation. More...
class  RooStats::HistFactory::Data
class  RooStats::HistFactory::EstimateSummary
class  RooStats::HistFactory::FlexibleInterpVar
class  RooStats::HistFactory::HistFactoryNavigation
class  RooStats::HistFactory::HistFactorySimultaneous
 RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset. More...
class  RooStats::HistFactory::HistoFactor
 Configuration for an *un*constrained, coherent shape variation of affected samples. More...
class  RooStats::HistFactory::HistogramUncertaintyBase
 ////////////////////////////////////////////////////////////////////////////////////////////Base class to store the up and down variations for histogram uncertainties. More...
class  RooStats::HistFactory::HistoSys
 Configuration for a constrained, coherent shape variation of affected samples. More...
class  RooStats::HistFactory::HistoToWorkspaceFactory
class  RooStats::HistFactory::HistoToWorkspaceFactoryFast
class  RooStats::HistFactory::HistRef
 Internal class wrapping an histogram and managing its content. More...
class  RooStats::HistFactory::LinInterpVar
 RooAbsReal that does piecewise-linear interpolations. More...
class  RooStats::HistFactory::Measurement
 The RooStats::HistFactory::Measurement class can be used to construct a model by combining multiple RooStats::HistFactory::Channel objects. More...
class  RooStats::HistFactory::NormFactor
 Configuration for an un- constrained overall systematic to scale sample normalisations. More...
class  RooStats::HistFactory::OverallSys
 Configuration for a constrained overall systematic to scale sample normalisations. More...
class  ParamHistFunc
 A class which maps the current values of a RooRealVar (or a set of RooRealVars) to one of a number of RooRealVars: More...
class  PiecewiseInterpolation
class  RooStats::HistFactory::RooBarlowBeestonLL
 Class RooBarlowBeestonLL implements the profile likelihood estimator for a given likelihood and set of parameters of interest. More...
class  RooStats::HistFactory::Sample
class  RooStats::HistFactory::ShapeFactor
 *Un*constrained bin-by-bin variation of affected histogram. More...
class  RooStats::HistFactory::ShapeSys
 Constrained bin-by-bin variation of affected histogram. More...
class  RooStats::HistFactory::StatError
 Statistical error of Monte Carlo predictions. More...
class  RooStats::HistFactory::StatErrorConfig
 Configuration to automatically assign nuisance parameters for the statistical error of the Monte Carlo simulations. More...


 RooStats::HistFactory::PreprocessFunction::PreprocessFunction ()
std::string RooStats::HistFactory::channelNameFromPdf (RooAbsPdf *channelPdf)
void RooStats::HistFactory::FactorizeHistFactoryPdf (const RooArgSet &, RooAbsPdf &, RooArgList &, RooArgList &)
void RooStats::HistFactory::getDataValuesForObservables (std::map< std::string, std::vector< double > > &ChannelBinDataMap, RooAbsData *data, RooAbsPdf *simPdf)
int RooStats::HistFactory::getStatUncertaintyConstraintTerm (RooArgList *constraints, RooRealVar *gamma_stat, RooAbsReal *&pois_mean, RooRealVar *&tau)
bool RooStats::HistFactory::getStatUncertaintyFromChannel (RooAbsPdf *channel, ParamHistFunc *&paramfunc, RooArgList *gammaList)
RooAbsPdfRooStats::HistFactory::getSumPdfFromChannel (RooAbsPdf *channel)
int main (int argc, char **argv)
 main function of the hist2workspace executable. More...
RooWorkspaceRooStats::HistFactory::MakeModelAndMeasurementFast (RooStats::HistFactory::Measurement &measurement)

Function Documentation

◆ PreprocessFunction()

RooStats::HistFactory::PreprocessFunction::PreprocessFunction ( )

Definition at line 19 of file PreprocessFunction.cxx.

◆ channelNameFromPdf()

std::string RooStats::HistFactory::channelNameFromPdf ( RooAbsPdf channelPdf)

Definition at line 28 of file HistFactoryModelUtils.cxx.

◆ FactorizeHistFactoryPdf()

void RooStats::HistFactory::FactorizeHistFactoryPdf ( const RooArgSet observables,
RooAbsPdf pdf,
RooArgList obsTerms,
RooArgList constraints 

Definition at line 79 of file HistFactoryModelUtils.cxx.

◆ getDataValuesForObservables()

void RooStats::HistFactory::getDataValuesForObservables ( std::map< std::string, std::vector< double > > &  ChannelBinDataMap,
RooAbsData data,
RooAbsPdf simPdf 

Definition at line 219 of file HistFactoryModelUtils.cxx.

◆ getStatUncertaintyConstraintTerm()

int RooStats::HistFactory::getStatUncertaintyConstraintTerm ( RooArgList constraints,
RooRealVar gamma_stat,
RooAbsReal *&  pois_mean,
RooRealVar *&  tau 

Definition at line 301 of file HistFactoryModelUtils.cxx.

◆ getStatUncertaintyFromChannel()

bool RooStats::HistFactory::getStatUncertaintyFromChannel ( RooAbsPdf channel,
ParamHistFunc *&  paramfunc,
RooArgList gammaList 

Definition at line 183 of file HistFactoryModelUtils.cxx.

◆ getSumPdfFromChannel()

RooAbsPdf * RooStats::HistFactory::getSumPdfFromChannel ( RooAbsPdf channel)

Definition at line 34 of file HistFactoryModelUtils.cxx.

◆ main()

int main ( int  argc,
char **  argv 

main function of the hist2workspace executable.

It creates RooFit models from an xml config and files with histograms. See MakeModelAndMeasurementFast(), for further instructions.

[in]-standard_formStandard xml model definitions. See MakeModelAndMeasurementFast()

Definition at line 69 of file hist2workspace.cxx.

◆ MakeModelAndMeasurementFast()

RooWorkspace * RooStats::HistFactory::MakeModelAndMeasurementFast ( RooStats::HistFactory::Measurement measurement)

This is a package that creates a RooFit probability density function from ROOT histograms of expected distributions and histograms that represent the +/- 1 sigma variations from systematic effects. The resulting probability density function can then be used with any of the statistical tools provided within RooStats, such as the profile likelihood ratio, Feldman-Cousins, etc. In this version, the model is directly fed to a likelihood ratio test, but it needs to be further factorized.

The user needs to provide histograms (in picobarns per bin) and configure the job with XML. The configuration XML is defined in the file $ROOTSYS/config/HistFactorySchema.dtd, but essentially it is organized as follows (see the examples in${ROOTSYS}/tutorials/histfactory/`)

  • a top level 'Combination' that is composed of:
    • several 'Channels' (eg. ee, emu, mumu), which are composed of:
      • several 'Samples' (eg. signal, bkg1, bkg2, ...), each of which has:
        • a name
        • if the sample is normalized by theory (eg N = L*sigma) or not (eg. data driven)
        • a nominal expectation histogram
        • a named 'Normalization Factor' (which can be fixed or allowed to float in a fit)
        • several 'Overall Systematics' in normalization with:
          • a name
          • +/- 1 sigma variations (eg. 1.05 and 0.95 for a 5% uncertainty)
        • several 'Histogram Systematics' in shape with:
          • a name (which can be shared with the OverallSyst if correlated)
          • +/- 1 sigma variational histograms
    • several 'Measurements' (corresponding to a full fit of the model) each of which specifies
      • a name for this fit to be used in tables and files
        • what is the luminosity associated to the measurement in picobarns
        • which bins of the histogram should be used
        • what is the relative uncertainty on the luminosity
        • what is (are) the parameter(s) of interest that will be measured
        • which parameters should be fixed/floating (eg. nuisance parameters)

Definition at line 104 of file MakeModelAndMeasurementsFast.cxx.