Implementing a binned, shape-varying nuisance parameter

Hi folks,
We are trying to incorporate shape-varying nuisance parameters into a model that ultimately gets used in a profile likelihood ratio (PLR) analysis of data with 2 observable dimensions. As is usually the case, our 2D PDF histogram templates are created using somewhat CPU-intensive Monte Carlo runs by varying the shape parameter of interest and filling 2D histograms in our observables.

We have experimented with RooMomentMorph quite a lot here, and at the moment its drawback is its speed: when used in our PLR machinery (actually based on this) it takes about ~60 seconds for a toy MC experiment to be generated and subsequently fit compared to an identical model with no shape parameters taking ~0.1 seconds for the same evaluation.

@jnikoley and myself have explored a speed up which is demonstrated in the attached macro which uses Gaussians as example templates. This method uses the MomentMorph machinery to fill a 3D RooHistPdf, where the third dimension is the shape variable (visualized in the attached ISO plot). This has worked in small tests like the attached, but when used in our full physics model we see many fits that fail to converge (about 30%). We suspect this is due to the binned nature of the NLL shown in the attached plot and the difficulty a derivative-based minimizer like Migrad would have with this (we’ve not had amazing success experimenting with other minimizing algorithms thus far). So this leads to a few questions for RooFit experts:

  1. Is there a way to tell the minimizer that it should take very large, perhaps even constant, steps in this parameter throughout its process?

  2. Is the RooMomentMorph class the current preferred method of handling shape varying parameters? It appears classes like RooIntegralMorph or HistFactory shapeVars have had more speed improvements included and may be able to handle this case. (we are not LHC-based, by the way)

gauss_example.C (7.6 KB)

I think @moneta can help.

1 Like

We’re now thinking that removing the binning by using the RooMomentMorph object directly gives the best results in terms of the minimizer, but with a slower speed. The solution to the speed issue was taken from RooIntegralMorph, which is to apply a cache in the observable dimensions (XY in this example). That smooths out the NLL by removing the binning and saves time by only updating the cache when the minimizer takes a step.

Is RooCachedPdf the best way to handle this caching or is there another method which can speed up this 3 dimensional interpolation?

I’m also still curious about the minimizer step sizes though, as that could still be useful in reducing the number of steps taken across the shape parameter axis.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.