Skip to content
Snippets Groups Projects
Commit 4feb08d7 authored by Jonas Rembser's avatar Jonas Rembser
Browse files

[RF] Introducing binned likelihood fit optimization in HistFactory

In a binned likelihood fit, it is possible to skip the PDF normalization
when the unnormalized binned PDF can be interpreted directly in terms of
event yields. This is now done by default for models HistFactory models,
which results in great speedups for binned fits with many channels. Some
RooFit users like ATLAS were already using this for a long time, so this
feature is battle-tested.

To disable this optimization when using the `hist2workspace` executable,
add the `-disable_binned_fit_optimization` command line argument.
Directly in C++, you can also set the `binnedFitOptimization` to `false`
in the HistFactory configuration as follows:
```C++
RooStats::HistFactory::MakeModelAndMeasurementFast(measurement, {.binnedFitOptimization=false});
```
If your compiler doesn't support aggregate initialization with designators, you
need to create and edit the configuration struct explicitely:
```C++
RooStats::HistFactory::HistoToWorkspaceFactoryFast::Configuration hfCfg;
hfCfg.binnedFitOptimization = false;
RooStats::HistFactory::MakeModelAndMeasurementFast(measurement, hfCfg);
```
parent 67fd82e7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment