Logo ROOT  
Reference Guide
HistFactory

Factory classes to create RooFit workspaces from histograms.

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/)

For more documentation see CERN-OPEN-2012-016.

For tutorials see HistFactory Tutorials.

Namespaces

 RooStats
 

Classes

class  RooStats::HistFactory::Asimov
 
class  RooStats::HistFactory::Channel
 
class  RooStats::HistFactory::ConfigParser
 
class  RooStats::HistFactory::Data
 
class  RooStats::HistFactory::EstimateSummary
 
class  RooStats::HistFactory::FlexibleInterpVar
 
class  RooStats::HistFactory::HistFactoryNavigation
 
class  RooStats::HistFactory::HistFactorySimultaneous
 
class  RooStats::HistFactory::HistoFactor
 
class  RooStats::HistFactory::HistogramUncertaintyBase
 //////////////////////////////////////////////////////////////////////////////////////////// More...
 
class  RooStats::HistFactory::HistoSys
 
class  RooStats::HistFactory::HistoToWorkspaceFactory
 
class  RooStats::HistFactory::HistoToWorkspaceFactoryFast
 
class  RooStats::HistFactory::HistRef
 
class  RooStats::HistFactory::LinInterpVar
 
class  RooStats::HistFactory::Measurement
 
class  RooStats::HistFactory::NormFactor
 
class  RooStats::HistFactory::OverallSys
 
class  ParamHistFunc
 
class  PiecewiseInterpolation
 
class  RooStats::HistFactory::RooBarlowBeestonLL
 
class  RooStats::HistFactory::Sample
 
class  RooStats::HistFactory::ShapeFactor
 
class  RooStats::HistFactory::ShapeSys
 
class  RooStats::HistFactory::StatError
 
class  RooStats::HistFactory::StatErrorConfig
 

Functions

 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)
 
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 298 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.

Parameters
[in]-hHelp
[in]-standard_formStandard xml model definitions. See MakeModelAndMeasurementFast()
[in]-number_counting_formDeprecated
[in]-vSwitch HistFactory message stream to INFO level.
[in]-vvSwitch HistFactory message stream to DEBUG level.

Definition at line 72 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.