# Increase sampling frequency for projections

I want to project a 2 dimensional distribution, but it seems that the sampling of the integrator is not fine enough. How can I increase the sampling frequency? I use ROOT 6.06/08 with RooFit 3.60.

The attached minimal working example (mwe.C) is based on the following use case: I want to fit a Monte Carlo simulated spectrum (Compton continuum + photo peak) to experimental data considering the detector response. The Monte Carlo data f(x) are binned and given with respect to a “true energy” variable x. The detector response is a Gaussian over the “observed energy” y which mean mu=x and resolution sigma=sigma(x) depend on the true energy. The conditional probability to observe an event with true energy x at an observed energy y is therefore: g(y|x)=Gauss(y; x, sigma(x))*f(x). To get the observed spectrum, I integrate over the true energy x: h(y)=Int Gauss(y; x, sigma(x))*f(x) dx, i.e. I make a projection on the “observed energy” axis y.

The plot below shows at top the Monte Carlo Data f(x) und on the right bottom g(x|y); both are fine. However, when I make the projection h(y) (left plot), the integrator seems to miss some sparse parts of the distribution. Unfortunately, the missing parts contain also the photo peak, the most prominent feature of the spectrum. The attached ROOT scripts implement a minimal working example to reproduce the plot.
How can I tell the integrator to sample g(y|x) with higher frequency? It would be also fine for me if the integrator would just loop over all bins.

I had a look in the manual and in the examples (mainly rf111_numintconfig.C) and tried to increase the precision but with no effect on my problem.

I would be grateful for any help or hint how to solve the problem.

mwe.C (2.2 KB)

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